| 1 |
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).singlefile={})}(this,(function(e){"use strict";const t="single-file-load-image",r="single-file-image-loaded",n=globalThis.browser,o=(e,t,r)=>globalThis.addEventListener(e,t,r),i=e=>{try{globalThis.dispatchEvent(e)}catch(e){}},s=globalThis.CustomEvent,a=globalThis.document,l=globalThis.Document;let c;if(c=window._singleFile_fontFaces?window._singleFile_fontFaces:window._singleFile_fontFaces=new Map,a instanceof l){o("single-file-new-font-face",(e=>{const t=e.detail,r=Object.assign({},t);delete r.src,c.set(JSON.stringify(r),t)})),o("single-file-delete-font",(e=>{const t=e.detail,r=Object.assign({},t);delete r.src,c.delete(JSON.stringify(r))})),o("single-file-clear-fonts",(()=>c=new Map));let e=a.createElement("script");e.src="data:,("+function(){"undefined"==typeof globalThis&&(window.globalThis=window);const e=globalThis.document,t=globalThis.console,r=e=>globalThis.dispatchEvent(e),n=globalThis.CustomEvent,o=globalThis.FileReader,i=globalThis.Blob,s=t&&t.warn&&((...e)=>t.warn(...e))||(()=>{}),a="single-file-new-font-face",l="single-file-delete-font",c="single-file-clear-fonts",u={family:"font-family",style:"font-style",weight:"font-weight",stretch:"font-stretch",unicodeRange:"unicode-range",variant:"font-variant",featureSettings:"font-feature-settings"};if(globalThis.FontFace){const t=globalThis.FontFace;let o;globalThis.FontFace=function(){return o||(s("SingleFile is hooking the FontFace constructor, document.fonts.delete and document.fonts.clear to handle dynamically loaded fonts."),o=!0),h(...arguments).then((e=>r(new n(a,{detail:e})))),new t(...arguments)},globalThis.FontFace.toString=function(){return"function FontFace() { [native code] }"};const i=e.fonts.delete;e.fonts.delete=function(t){return h(t.family).then((e=>r(new n(l,{detail:e})))),i.call(e.fonts,t)},e.fonts.delete.toString=function(){return"function delete() { [native code] }"};const u=e.fonts.clear;e.fonts.clear=function(){return r(new n(c)),u.call(e.fonts)},e.fonts.clear.toString=function(){return"function clear() { [native code] }"}}async function h(e,t,r){const n={};return n["font-family"]=e,n.src=t,r&&Object.keys(r).forEach((e=>{u[e]&&(n[u[e]]=r[e])})),new Promise((e=>{if(n.src instanceof ArrayBuffer){const t=new o;t.readAsDataURL(new i([n.src])),t.addEventListener("load",(()=>{n.src="url("+t.result+")",e(n)}))}else e(n)}))}}.toString()+")()",(a.documentElement||a).appendChild(e),e.remove(),n&&n.runtime&&n.runtime.getURL&&(e=a.createElement("script"),e.src=n.runtime.getURL("/lib/single-file-hooks-frames.js"),e.async=!1,(a.documentElement||a).appendChild(e),e.remove())}function u(){return Array.from(c.values())}function h(e){e.loadDeferredImagesBlockCookies&&i(new s("single-file-block-cookies-start")),e.loadDeferredImagesBlockStorage&&i(new s("single-file-block-storage-start")),e.loadDeferredImagesDispatchScrollEvent&&i(new s("single-file-dispatch-scroll-event-start")),e.loadDeferredImagesKeepZoomLevel?i(new s("single-file-load-deferred-images-keep-zoom-level-start")):i(new s("single-file-load-deferred-images-start"))}function d(e){e.loadDeferredImagesBlockCookies&&i(new s("single-file-block-cookies-end")),e.loadDeferredImagesBlockStorage&&i(new s("single-file-block-storage-end")),e.loadDeferredImagesDispatchScrollEvent&&i(new s("single-file-dispatch-scroll-event-end")),e.loadDeferredImagesKeepZoomLevel?i(new s("single-file-load-deferred-images-keep-zoom-level-end")):i(new s("single-file-load-deferred-images-end"))}function p(e){e.loadDeferredImagesKeepZoomLevel?i(new s("single-file-load-deferred-images-keep-zoom-level-reset")):i(new s("single-file-load-deferred-images-reset"))}var m=Object.freeze({__proto__:null,getFontsData:u,loadDeferredImagesStart:h,loadDeferredImagesEnd:d,loadDeferredImagesResetZoomLevel:p,LOAD_IMAGE_EVENT:t,IMAGE_LOADED_EVENT:r});const f=new RegExp("\\\\([\\da-f]{1,6}[\\x20\\t\\r\\n\\f]?|([\\x20\\t\\r\\n\\f])|.)","ig");function g(e){return e.replace(f,((e,t,r)=>{const n="0x"+t-65536;return n!=n||r?t:n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320)}))}var y=Object.freeze({__proto__:null,process:g});const b="single-file-on-before-capture",k="single-file-on-after-capture",v="data-single-file-removed-content",w="data-single-file-hidden-content",x="data-single-file-kept-content",E="data-single-file-hidden-frame",A="data-single-file-preserved-space-element",S="data-single-file-shadow-root-element",T="data-single-file-win-id",C="data-single-file-image",R="data-single-file-poster",_="data-single-file-video",I="data-single-file-canvas",L="data-single-file-import",N="data-single-file-movable-style",z="data-single-file-input-value",P="data-single-file-lazy-loaded-src",M="data-single-file-stylesheet",O="data-single-file-disabled-noscript",U="data-single-file-selected-content",D="data-single-file-invalid-element",F="data-single-file-async-script",q="*:not(base):not(link):not(meta):not(noscript):not(script):not(style):not(template):not(title)",B=["NOSCRIPT","DISABLED-NOSCRIPT","META","LINK","STYLE","TITLE","TEMPLATE","SOURCE","OBJECT","SCRIPT","HEAD"],j=/^'(.*?)'$/,H=/^"(.*?)"$/,V={regular:"400",normal:"400",bold:"700",bolder:"700",lighter:"100"},W="Page saved with SingleFile",$="Archive processed by SingleFile",G="single-file-ui-element",Y="data:,",J=(e,t,r)=>globalThis.addEventListener(e,t,r);function Q(e){e.querySelectorAll("meta[http-equiv=refresh]").forEach((e=>{e.removeAttribute("http-equiv"),e.setAttribute("disabled-http-equiv","refresh")}))}function K(e,t,r){e.querySelectorAll("noscript:not([data-single-file-disabled-noscript])").forEach((e=>{e.setAttribute(O,e.textContent),e.textContent=""})),Q(e),e.head&&e.head.querySelectorAll(q).forEach((e=>e.hidden=!0)),e.querySelectorAll("svg foreignObject").forEach((e=>{const t=e.querySelectorAll("html > head > "+q+", html > body > "+q);t.length&&(Array.from(e.childNodes).forEach((e=>e.remove())),t.forEach((t=>e.appendChild(t))))}));const n=new Map;let o;return t&&e.documentElement?(e.querySelectorAll("button button, a a, p div").forEach((t=>{const r=e.createElement("template");r.setAttribute(D,""),r.content.appendChild(t.cloneNode(!0)),n.set(t,r),t.replaceWith(r)})),o=Z(t,e,e.documentElement,r),r.moveStylesInHead&&e.querySelectorAll("body style, body ~ style").forEach((e=>{const r=t.getComputedStyle(e);r&&re(e,r)&&(e.setAttribute(N,""),o.markedElements.push(e))}))):o={canvases:[],images:[],posters:[],videos:[],usedFonts:[],shadowRoots:[],imports:[],markedElements:[]},{canvases:o.canvases,fonts:u(),stylesheets:oe(e),images:o.images,posters:o.posters,videos:o.videos,usedFonts:Array.from(o.usedFonts.values()),shadowRoots:o.shadowRoots,imports:o.imports,referrer:e.referrer,markedElements:o.markedElements,invalidElements:n}}function Z(e,t,r,n,o={usedFonts:new Map,canvases:[],images:[],posters:[],videos:[],shadowRoots:[],imports:[],markedElements:[]},i){return Array.from(r.childNodes).filter((t=>t instanceof e.HTMLElement||t instanceof e.SVGElement)).forEach((r=>{let s,a,l;if(!n.autoSaveExternalSave&&(n.removeHiddenElements||n.removeUnusedFonts||n.compressHTML)&&(l=e.getComputedStyle(r),r instanceof e.HTMLElement&&n.removeHiddenElements&&(a=(i||r.closest("html > head"))&&B.includes(r.tagName)||r.closest("details"),a||(s=i||re(r,l),s&&(r.setAttribute(w,""),o.markedElements.push(r)))),!s)){if(n.compressHTML&&l){const e=l.getPropertyValue("white-space");e&&e.startsWith("pre")&&(r.setAttribute(A,""),o.markedElements.push(r))}n.removeUnusedFonts&&(X(l,n,o.usedFonts),X(e.getComputedStyle(r,":first-letter"),n,o.usedFonts),X(e.getComputedStyle(r,":before"),n,o.usedFonts),X(e.getComputedStyle(r,":after"),n,o.usedFonts))}!function(e,t,r,n,o,i,s){if("CANVAS"==r.tagName)try{o.canvases.push({dataURI:r.toDataURL("image/png","")}),r.setAttribute(I,o.canvases.length-1),o.markedElements.push(r)}catch(e){}if("IMG"==r.tagName){const t={currentSrc:i?Y:n.loadDeferredImages&&r.getAttribute(P)||r.currentSrc};o.images.push(t),r.setAttribute(C,o.images.length-1),o.markedElements.push(r),r.removeAttribute(P);try{s=s||e.getComputedStyle(r)}catch(e){}if(s){t.size=function(e,t,r){let n=t.naturalWidth,o=t.naturalHeight;if(!n&&!o){const i=null==t.getAttribute("style");let s,a,l,c,u,h,d,p,m=!1;if("content-box"==(r=r||e.getComputedStyle(t)).getPropertyValue("box-sizing")){const e=t.style.getPropertyValue("box-sizing"),r=t.style.getPropertyPriority("box-sizing"),n=t.clientWidth;t.style.setProperty("box-sizing","border-box","important"),m=t.clientWidth!=n,e?t.style.setProperty("box-sizing",e,r):t.style.removeProperty("box-sizing")}s=ie("padding-left",r),a=ie("padding-right",r),l=ie("padding-top",r),c=ie("padding-bottom",r),m?(u=ie("border-left-width",r),h=ie("border-right-width",r),d=ie("border-top-width",r),p=ie("border-bottom-width",r)):u=h=d=p=0,n=Math.max(0,t.clientWidth-s-a-u-h),o=Math.max(0,t.clientHeight-l-c-d-p),i&&t.removeAttribute("style")}return{pxWidth:n,pxHeight:o}}(e,r,s);const n=s.getPropertyValue("box-shadow"),o=s.getPropertyValue("background-image");n&&"none"!=n||o&&"none"!=o||!(t.size.pxWidth>1||t.size.pxHeight>1)||(t.replaceable=!0,t.backgroundColor=s.getPropertyValue("background-color"),t.objectFit=s.getPropertyValue("object-fit"),t.boxSizing=s.getPropertyValue("box-sizing"),t.objectPosition=s.getPropertyValue("object-position"))}}if("VIDEO"==r.tagName){const n=r.currentSrc;if(n&&!n.startsWith("blob:")&&!n.startsWith("data:")){const t=e.getComputedStyle(r.parentNode).getPropertyValue("position");o.videos.push({positionParent:t,src:n,size:{pxWidth:r.clientWidth,pxHeight:r.clientHeight},currentTime:r.currentTime}),r.setAttribute(_,o.videos.length-1)}if(!r.poster){const e=t.createElement("canvas"),n=e.getContext("2d");e.width=r.clientWidth,e.height=r.clientHeight;try{n.drawImage(r,0,0,e.width,e.height),o.posters.push(e.toDataURL("image/png","")),r.setAttribute(R,o.posters.length-1),o.markedElements.push(r)}catch(e){}}}"IFRAME"==r.tagName&&i&&n.removeHiddenElements&&(r.setAttribute(E,""),o.markedElements.push(r));"LINK"==r.tagName&&r.import&&r.import.documentElement&&(o.imports.push({content:se(r.import)}),r.setAttribute(L,o.imports.length-1),o.markedElements.push(r));"INPUT"==r.tagName&&("password"!=r.type&&(r.setAttribute(z,r.value),o.markedElements.push(r)),"radio"!=r.type&&"checkbox"!=r.type||(r.setAttribute(z,r.checked),o.markedElements.push(r)));"TEXTAREA"==r.tagName&&(r.setAttribute(z,r.value),o.markedElements.push(r));"SELECT"==r.tagName&&r.querySelectorAll("option").forEach((e=>{e.selected&&(e.setAttribute(z,""),o.markedElements.push(e))}));"SCRIPT"==r.tagName&&(r.async&&""!=r.getAttribute("async")&&"async"!=r.getAttribute("async")&&(r.setAttribute(F,""),o.markedElements.push(r)),r.textContent=r.textContent.replace(/<\/script>/gi,"<\\/script>"))}(e,t,r,n,o,s,l);const c=!(r instanceof e.SVGElement)&&ee(r);if(c&&!r.classList.contains(G)){const i={};r.setAttribute(S,o.shadowRoots.length),o.markedElements.push(r),o.shadowRoots.push(i),Z(e,t,c,n,o,s),i.content=c.innerHTML,i.mode=c.mode;try{c.adoptedStyleSheets&&c.adoptedStyleSheets.length&&(i.adoptedStyleSheets=Array.from(c.adoptedStyleSheets).map((e=>Array.from(e.cssRules).map((e=>e.cssText)).join("\n"))))}catch(e){}}Z(e,t,r,n,o,s),!n.autoSaveExternalSave&&n.removeHiddenElements&&i&&(a||""==r.getAttribute(x)?r.parentElement&&(r.parentElement.setAttribute(x,""),o.markedElements.push(r.parentElement)):s&&(r.setAttribute(v,""),o.markedElements.push(r)))})),o}function X(e,t,r){if(e){const n=e.getPropertyValue("font-style")||"normal";e.getPropertyValue("font-family").split(",").forEach((o=>{if(o=te(o),!t.loadedFonts||t.loadedFonts.find((e=>te(e.family)==o&&e.style==n))){const t=le(e.getPropertyValue("font-weight")),i=e.getPropertyValue("font-variant")||"normal",s=[o,t,n,i];r.set(JSON.stringify(s),[o,t,n,i])}}))}}function ee(e){const t=globalThis.chrome;if(e.openOrClosedShadowRoot)return e.openOrClosedShadowRoot;if(!(t&&t.dom&&t.dom.openOrClosedShadowRoot))return e.shadowRoot;try{return t.dom.openOrClosedShadowRoot(e)}catch(t){return e.shadowRoot}}function te(e=""){return ae(g(e.trim())).toLowerCase()}function re(e,t){let r=!1;if(t){const n=t.getPropertyValue("display"),o=t.getPropertyValue("opacity"),i=t.getPropertyValue("visibility");if(r="none"==n,!r&&("0"==o||"hidden"==i)&&e.getBoundingClientRect){const t=e.getBoundingClientRect();r=!t.width&&!t.height}}return Boolean(r)}function ne(e,t,r){if(e.querySelectorAll("[data-single-file-disabled-noscript]").forEach((e=>{e.textContent=e.getAttribute(O),e.removeAttribute(O)})),e.querySelectorAll("meta[disabled-http-equiv]").forEach((e=>{e.setAttribute("http-equiv",e.getAttribute("disabled-http-equiv")),e.removeAttribute("disabled-http-equiv")})),e.head&&e.head.querySelectorAll("*:not(base):not(link):not(meta):not(noscript):not(script):not(style):not(template):not(title)").forEach((e=>e.removeAttribute("hidden"))),!t){const r=[v,E,w,A,C,R,_,I,z,S,L,M,F];t=e.querySelectorAll(r.map((e=>"["+e+"]")).join(","))}t.forEach((e=>{e.removeAttribute(v),e.removeAttribute(w),e.removeAttribute(x),e.removeAttribute(E),e.removeAttribute(A),e.removeAttribute(C),e.removeAttribute(R),e.removeAttribute(_),e.removeAttribute(I),e.removeAttribute(z),e.removeAttribute(S),e.removeAttribute(L),e.removeAttribute(M),e.removeAttribute(F),e.removeAttribute(N)})),r&&Array.from(r.entries()).forEach((([e,t])=>t.replaceWith(e)))}function oe(e){if(e){const t=[];return e.querySelectorAll("style").forEach(((r,n)=>{try{const o=e.createElement("style");o.textContent=r.textContent,e.body.appendChild(o);const i=o.sheet;o.remove(),i&&i.cssRules.length==r.sheet.cssRules.length||(r.setAttribute(M,n),t[n]=Array.from(r.sheet.cssRules).map((e=>e.cssText)).join("\n"))}catch(e){}})),t}}function ie(e,t){if(t.getPropertyValue(e).endsWith("px"))return parseFloat(t.getPropertyValue(e))}function se(e){const t=e.doctype;let r="";return t&&(r="<!DOCTYPE "+t.nodeName,t.publicId?(r+=' PUBLIC "'+t.publicId+'"',t.systemId&&(r+=' "'+t.systemId+'"')):t.systemId&&(r+=' SYSTEM "'+t.systemId+'"'),t.internalSubset&&(r+=" ["+t.internalSubset+"]"),r+="> "),r+e.documentElement.outerHTML}function ae(e){return(e=e.match(j)?e.replace(j,"$1"):e.replace(H,"$1")).trim()}function le(e){return V[e.toLowerCase().trim()]||e}function ce(e){return e.flat?e.flat():e.reduce(((e,t)=>e.concat(Array.isArray(t)?ce(t):t)),[])}var ue=Object.freeze({__proto__:null,initUserScriptHandler:function(){J("single-file-user-script-init",(()=>globalThis._singleFile_waitForUserScript=async e=>{const t=new CustomEvent(e+"-request",{cancelable:!0}),r=new Promise((t=>J(e+"-response",t)));(e=>{try{globalThis.dispatchEvent(e)}catch(e){}})(t),t.defaultPrevented&&await r}))},initDoc:Q,preProcessDoc:K,postProcessDoc:ne,serialize:se,removeQuotes:ae,flatten:ce,getFontWeight:le,normalizeFontFamily:te,getShadowRoot:ee,ON_BEFORE_CAPTURE_EVENT_NAME:b,ON_AFTER_CAPTURE_EVENT_NAME:k,WIN_ID_ATTRIBUTE_NAME:T,PRESERVED_SPACE_ELEMENT_ATTRIBUTE_NAME:A,REMOVED_CONTENT_ATTRIBUTE_NAME:v,HIDDEN_CONTENT_ATTRIBUTE_NAME:w,HIDDEN_FRAME_ATTRIBUTE_NAME:E,IMAGE_ATTRIBUTE_NAME:C,POSTER_ATTRIBUTE_NAME:R,VIDEO_ATTRIBUTE_NAME:_,CANVAS_ATTRIBUTE_NAME:I,INPUT_VALUE_ATTRIBUTE_NAME:z,SHADOW_ROOT_ATTRIBUTE_NAME:S,HTML_IMPORT_ATTRIBUTE_NAME:L,STYLE_ATTRIBUTE_NAME:N,LAZY_SRC_ATTRIBUTE_NAME:P,STYLESHEET_ATTRIBUTE_NAME:M,SELECTED_CONTENT_ATTRIBUTE_NAME:U,INVALID_ELEMENT_ATTRIBUTE_NAME:D,ASYNC_SCRIPT_ATTRIBUTE_NAME:F,COMMENT_HEADER:W,COMMENT_HEADER_LEGACY:$,SINGLE_FILE_UI_ELEMENT_CLASS:G,EMPTY_RESOURCE:Y});const he=P,de=G,pe="attributes",me=globalThis.browser,fe=globalThis.document,ge=globalThis.MutationObserver,ye=(e,t,r)=>globalThis.addEventListener(e,t,r),be=(e,t,r)=>globalThis.removeEventListener(e,t,r),ke=new Map;let ve;async function we(e){if(fe.documentElement){ke.clear();const n=Math.max(fe.documentElement.scrollHeight-1.5*fe.documentElement.clientHeight,0),o=Math.max(fe.documentElement.scrollWidth-1.5*fe.documentElement.clientWidth,0);if(globalThis.scrollY<=n&&globalThis.scrollX<=o)return function(e){return ve=0,new Promise((async n=>{let o;const i=new Set,s=new ge((async t=>{if((t=t.filter((e=>e.type==pe))).length){t.filter((e=>{if("src"==e.attributeName&&(e.target.setAttribute(he,e.target.src),e.target.addEventListener("load",l)),"src"==e.attributeName||"srcset"==e.attributeName||"SOURCE"==e.target.tagName)return!e.target.classList||!e.target.classList.contains(de)})).length&&(o=!0,await Ae(s,e,d),i.size||await Ee(s,e,d))}}));async function a(t){await Te("idleTimeout",(async()=>{o?ve<10&&(ve++,Re("idleTimeout"),await a(Math.max(500,t/2))):(Re("loadTimeout"),Re("maxTimeout"),Se(s,e,d))}),t)}function l(e){const t=e.target;t.removeAttribute(he),t.removeEventListener("load",l)}async function c(t){o=!0,await Ae(s,e,d),await Ee(s,e,d),t.detail&&i.add(t.detail)}async function u(t){await Ae(s,e,d),await Ee(s,e,d),i.delete(t.detail),i.size||await Ee(s,e,d)}function d(e){s.disconnect(),be(t,c),be(r,u),n(e)}await a(2*e.loadDeferredImagesMaxIdleTime),await Ae(s,e,d),s.observe(fe,{subtree:!0,childList:!0,attributes:!0}),ye(t,c),ye(r,u),h(e)}))}(e)}}function xe(e){p(e)}async function Ee(e,t,r){await Te("loadTimeout",(()=>Se(e,t,r)),t.loadDeferredImagesMaxIdleTime)}async function Ae(e,t,r){await Te("maxTimeout",(async()=>{await Re("loadTimeout"),await Se(e,t,r)}),10*t.loadDeferredImagesMaxIdleTime)}async function Se(e,t,r){await Re("idleTimeout"),d(t),await Te("endTimeout",(async()=>{await Re("maxTimeout"),r()}),t.loadDeferredImagesMaxIdleTime/2),e.disconnect()}async function Te(e,t,r){if(me&&me.runtime&&me.runtime.sendMessage){if(!ke.get(e)||!ke.get(e).pending){const n={callback:t,pending:!0};ke.set(e,n);try{await me.runtime.sendMessage({method:"singlefile.lazyTimeout.setTimeout",type:e,delay:r})}catch(n){Ce(e,t,r)}n.pending=!1}}else Ce(e,t,r)}function Ce(e,t,r){const n=ke.get(e);n&&globalThis.clearTimeout(n),ke.set(e,t),globalThis.setTimeout(t,r)}async function Re(e){if(me&&me.runtime&&me.runtime.sendMessage)try{await me.runtime.sendMessage({method:"singlefile.lazyTimeout.clearTimeout",type:e})}catch(t){_e(e)}else _e(e)}function _e(e){const t=ke.get(e);ke.delete(e),t&&globalThis.clearTimeout(t)}me&&me.runtime&&me.runtime.onMessage&&me.runtime.onMessage.addListener&&me.runtime.onMessage.addListener((e=>{if("singlefile.lazyTimeout.onTimeout"==e.method){const t=ke.get(e.type);if(t){ke.delete(e.type);try{t.callback()}catch(t){_e(e.type)}}}}));var Ie=Object.freeze({__proto__:null,process:we,resetZoomLevel:xe});const Le={ON_BEFORE_CAPTURE_EVENT_NAME:b,ON_AFTER_CAPTURE_EVENT_NAME:k,WIN_ID_ATTRIBUTE_NAME:T,preProcessDoc:K,serialize:se,postProcessDoc:ne,getShadowRoot:ee},Ne="__frameTree__::",ze='iframe, frame, object[type="text/html"][data]',Pe="singlefile.frameTree.initRequest",Me="singlefile.frameTree.ackInitRequest",Oe="singlefile.frameTree.cleanupRequest",Ue="singlefile.frameTree.initResponse",De=5e3,Fe=".",qe=globalThis.window==globalThis.top,Be=globalThis.browser,je=globalThis.top,He=globalThis.MessageChannel,Ve=globalThis.document;let We,$e=globalThis.sessions;var Ge,Ye,Je;function Qe(){return globalThis.crypto.getRandomValues(new Uint32Array(32)).join("")}async function Ke(e){const t=e.sessionId,r=globalThis._singleFile_waitForUserScript;delete globalThis._singleFile_cleaningUp,qe||(We=globalThis.frameId=e.windowId),et(Ve,e.options,We,t),qe||(e.options.userScriptEnabled&&r&&await r(Le.ON_BEFORE_CAPTURE_EVENT_NAME),ot({frames:[st(Ve,globalThis,We,e.options)],sessionId:t,requestedFrameId:Ve.documentElement.dataset.requestedFrameId&&We}),e.options.userScriptEnabled&&r&&await r(Le.ON_AFTER_CAPTURE_EVENT_NAME),delete Ve.documentElement.dataset.requestedFrameId)}function Ze(e){if(!globalThis._singleFile_cleaningUp){globalThis._singleFile_cleaningUp=!0;const t=e.sessionId;nt(at(Ve),e.windowId,t)}}function Xe(e){e.frames.forEach((t=>tt("responseTimeouts",e.sessionId,t.windowId)));const t=$e.get(e.sessionId);if(t){e.requestedFrameId&&(t.requestedFrameId=e.requestedFrameId),e.frames.forEach((e=>{let r=t.frames.find((t=>e.windowId==t.windowId));r||(r={windowId:e.windowId},t.frames.push(r)),r.processed||(r.content=e.content,r.baseURI=e.baseURI,r.title=e.title,r.canvases=e.canvases,r.fonts=e.fonts,r.stylesheets=e.stylesheets,r.images=e.images,r.posters=e.posters,r.videos=e.videos,r.usedFonts=e.usedFonts,r.shadowRoots=e.shadowRoots,r.imports=e.imports,r.processed=e.processed)}));t.frames.filter((e=>!e.processed)).length||(t.frames=t.frames.sort(((e,t)=>t.windowId.split(Fe).length-e.windowId.split(Fe).length)),t.resolve&&(t.requestedFrameId&&t.frames.forEach((e=>{e.windowId==t.requestedFrameId&&(e.requestedFrame=!0)})),t.resolve(t.frames)))}}function et(e,t,r,n){const o=at(e);!function(e,t,r,n,o){const i=[];let s;$e.get(o)?s=$e.get(o).requestTimeouts:(s={},$e.set(o,{requestTimeouts:s}));t.forEach(((e,t)=>{const r=n+Fe+t;e.setAttribute(Le.WIN_ID_ATTRIBUTE_NAME,r),i.push({windowId:r})})),ot({frames:i,sessionId:o,requestedFrameId:e.documentElement.dataset.requestedFrameId&&n}),t.forEach(((e,t)=>{const i=n+Fe+t;try{it(e.contentWindow,{method:Pe,windowId:i,sessionId:o,options:r})}catch(e){}s[i]=globalThis.setTimeout((()=>ot({frames:[{windowId:i,processed:!0}],sessionId:o})),De)})),delete e.documentElement.dataset.requestedFrameId}(e,o,t,r,n),o.length&&function(e,t,r,n,o){const i=[];t.forEach(((e,t)=>{const s=n+Fe+t;let a;try{a=e.contentDocument}catch(e){}if(a)try{const t=e.contentWindow;t.stop(),tt("requestTimeouts",o,s),et(a,r,s,o),i.push(st(a,t,s,r))}catch(e){i.push({windowId:s,processed:!0})}})),ot({frames:i,sessionId:o,requestedFrameId:e.documentElement.dataset.requestedFrameId&&n}),delete e.documentElement.dataset.requestedFrameId}(e,o,t,r,n)}function tt(e,t,r){const n=$e.get(t);if(n&&n[e]){const t=n[e][r];t&&(globalThis.clearTimeout(t),delete n[e][r])}}function rt(e,t){const r=$e.get(e);r&&r.responseTimeouts&&(r.responseTimeouts[t]=globalThis.setTimeout((()=>ot({frames:[{windowId:t,processed:!0}],sessionId:e})),1e4))}function nt(e,t,r){e.forEach(((e,n)=>{const o=t+Fe+n;e.removeAttribute(Le.WIN_ID_ATTRIBUTE_NAME);try{it(e.contentWindow,{method:Oe,windowId:o,sessionId:r})}catch(e){}})),e.forEach(((e,n)=>{const o=t+Fe+n;let i;try{i=e.contentDocument}catch(e){}if(i)try{nt(at(i),o,r)}catch(e){}}))}function ot(e){e.method=Ue;try{je.singlefile.processors.frameTree.initResponse(e)}catch(t){it(je,e,!0)}}function it(e,t,r){if(e==je&&Be&&Be.runtime&&Be.runtime.sendMessage)Be.runtime.sendMessage(t);else if(r){const r=new He;e.postMessage(Ne+JSON.stringify({method:t.method,sessionId:t.sessionId}),"*",[r.port2]),r.port1.postMessage(t)}else e.postMessage(Ne+JSON.stringify(t),"*")}function st(e,t,r,n){const o=Le.preProcessDoc(e,t,n),i=Le.serialize(e);Le.postProcessDoc(e,o.markedElements,o.invalidElements);return{windowId:r,content:i,baseURI:e.baseURI.split("#")[0],title:e.title,canvases:o.canvases,fonts:o.fonts,stylesheets:o.stylesheets,images:o.images,posters:o.posters,videos:o.videos,usedFonts:o.usedFonts,shadowRoots:o.shadowRoots,imports:o.imports,processed:!0}}function at(e){let t=Array.from(e.querySelectorAll(ze));return e.querySelectorAll("*").forEach((e=>{const r=Le.getShadowRoot(e);r&&(t=t.concat(...r.querySelectorAll(ze)))})),t}$e||($e=globalThis.sessions=new Map),qe&&(We="0",Be&&Be.runtime&&Be.runtime.onMessage&&Be.runtime.onMessage.addListener&&Be.runtime.onMessage.addListener((e=>e.method==Ue?(Xe(e),Promise.resolve({})):e.method==Me?(tt("requestTimeouts",e.sessionId,e.windowId),rt(e.sessionId,e.windowId),Promise.resolve({})):void 0))),Ge="message",Ye=async e=>{if("string"==typeof e.data&&e.data.startsWith(Ne)){e.preventDefault(),e.stopPropagation();const t=JSON.parse(e.data.substring(Ne.length));t.method==Pe?(e.source&&it(e.source,{method:Me,windowId:t.windowId,sessionId:t.sessionId}),qe||(globalThis.stop(),t.options.loadDeferredImages&&we(t.options),await Ke(t))):t.method==Me?(tt("requestTimeouts",t.sessionId,t.windowId),rt(t.sessionId,t.windowId)):t.method==Oe?Ze(t):t.method==Ue&&$e.get(t.sessionId)&&(e.ports[0].onmessage=e=>Xe(e.data))}},Je=!0,globalThis.addEventListener(Ge,Ye,Je);var lt=Object.freeze({__proto__:null,getAsync:function(e){const t=Qe();return e=JSON.parse(JSON.stringify(e)),new Promise((r=>{$e.set(t,{frames:[],requestTimeouts:{},responseTimeouts:{},resolve:e=>{e.sessionId=t,r(e)}}),Ke({windowId:We,sessionId:t,options:e})}))},getSync:function(e){const t=Qe();e=JSON.parse(JSON.stringify(e)),$e.set(t,{frames:[],requestTimeouts:{},responseTimeouts:{}}),function(e){const t=e.sessionId,r=globalThis._singleFile_waitForUserScript;delete globalThis._singleFile_cleaningUp,qe||(We=globalThis.frameId=e.windowId);et(Ve,e.options,We,t),qe||(e.options.userScriptEnabled&&r&&r(Le.ON_BEFORE_CAPTURE_EVENT_NAME),ot({frames:[st(Ve,globalThis,We,e.options)],sessionId:t,requestedFrameId:Ve.documentElement.dataset.requestedFrameId&&We}),e.options.userScriptEnabled&&r&&r(Le.ON_AFTER_CAPTURE_EVENT_NAME),delete Ve.documentElement.dataset.requestedFrameId)}({windowId:We,sessionId:t,options:e});const r=$e.get(t).frames;return r.sessionId=t,r},cleanup:function(e){$e.delete(e),Ze({windowId:We,sessionId:e,options:{sessionId:e}})},initResponse:Xe,TIMEOUT_INIT_REQUEST_MESSAGE:De});const ct=globalThis.browser,ut=globalThis.document;if(ut instanceof globalThis.Document){const e=ut.createElement("script");e.async=!1,ct&&ct.runtime&&ct.runtime.getURL&&(e.src=ct.runtime.getURL("/lib/single-file-hooks.js"),e.async=!1),(ut.documentElement||ut).appendChild(e),e.remove()}var ht=Object.freeze({__proto__:null}),dt=Object.freeze({__proto__:null,frameTree:lt,hooks:ht,hooksFrames:m,lazy:Ie});const pt=/^'(.*?)'$/,mt=/^"(.*?)"$/,ft=["inherit","initial","unset"],gt=["caption","icon","menu","message-box","small-caption","status-bar"],yt=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"],bt=["normal","italic","oblique"],kt=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"],vt=["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"],wt={splitBySpaces:function(e){return Ct(e,[" ","\n","\t"])},split:Ct,splitByCommas:function(e){return Ct(e,[","],{last:!0})}},xt={isSize:function(e){return!isNaN(parseFloat(e))||-1!==e.indexOf("/")||-1!==vt.indexOf(e)}},Et="[parse-css-font] ";function At(e){if("string"!=typeof e)throw new TypeError(Et+"Expected a string.");if(""===e)throw St("Cannot parse an empty string.");if(-1!==gt.indexOf(e))return{system:e};const t={lineHeight:"normal",stretch:"normal",style:"normal",variant:"normal",weight:"normal"};let r=!1;const n=wt.splitBySpaces(e);let o=n.shift();for(;o;o=n.shift())if("normal"!==o&&-1===ft.indexOf(o))if(-1===yt.indexOf(o))if(-1===bt.indexOf(o))if(-1===kt.indexOf(o)){if(xt.isSize(o)){const e=wt.split(o,["/"]);if(t.size=e[0],e[1]?t.lineHeight=Tt(e[1]):"/"===n[0]&&(n.shift(),t.lineHeight=Tt(n.shift())),!n.length)throw St("Missing required font-family.");return t.family=wt.splitByCommas(n.join(" ")).map(Rt),t}if("normal"!==t.variant)throw St("Unknown or unsupported font token: "+t.variant);r||(t.variant=o)}else{if(r)continue;t.stretch=o}else{if(r)continue;t.style=o}else{if(r)continue;t.weight=o}else["style","variant","weight","stretch"].forEach((e=>{t[e]=o})),r=!0;throw St("Missing required font-size.")}function St(e){return new Error(Et+e)}function Tt(e){const t=parseFloat(e);return t.toString()===e?t:e}function Ct(e,t,{last:r=!1}={}){if("string"!=typeof e)throw new TypeError("expected a string");if(!Array.isArray(t))throw new TypeError("expected a string array of separators");if("boolean"!=typeof r)throw new TypeError("expected a Boolean value for options.last");const n=[];let o="",i=!1,s=0,a=!1,l=!1;for(const r of e)a?l?l=!1:"\\"===r?l=!0:r===a&&(a=!1):'"'===r||"'"===r?a=r:"("===r?s+=1:")"===r?s>0&&(s-=1):0===s&&-1!==t.indexOf(r)&&(i=!0),i?(""!==o&&n.push(o.trim()),o="",i=!1):o+=r;return(r||""!==o)&&n.push(o.trim()),n}function Rt(e){return(e=e.match(pt)?e.replace(pt,"$1"):e.replace(mt,"$1")).trim()}var _t=Object.freeze({__proto__:null,parse:At});function It(e,t=0){const r=[{mode:"normal",character:null}],n=[];let o=0,i="",s=null,a=null,l=t,c=e;"("===e[0]&&")"===e[e.length-1]&&(c=e.substring(1,e.length-1),l++);for(let e=0;e<c.length;e++){const t=c[e];if("'"!==t&&'"'!==t||(!0===r[o].isCalculationEnabled?(r.push({mode:"string",isCalculationEnabled:!1,character:t}),o++):"string"===r[o].mode&&r[o].character===t&&"\\"!==c[e-1]&&(r.pop(),o--)),"{"===t?(r.push({mode:"interpolation",isCalculationEnabled:!0}),o++):"}"===t&&(r.pop(),o--),"normal"===r[o].mode&&":"===t){const t=c.substring(e+1);a={type:"value",before:/^(\s*)/.exec(t)[1],after:/(\s*)$/.exec(t)[1],value:t.trim()},a.sourceIndex=a.before.length+e+1+l,s={type:"colon",sourceIndex:e+l,after:a.before,value:":"};break}i+=t}return i={type:"media-feature",before:/^(\s*)/.exec(i)[1],after:/(\s*)$/.exec(i)[1],value:i.trim()},i.sourceIndex=i.before.length+l,n.push(i),null!==s&&(s.before=i.after,n.push(s)),null!==a&&n.push(a),n}function Lt(e,t=0){const r=[];let n,o=0,i=!1;n={before:"",after:"",value:""};for(let s=0;s<e.length;s++){const a=e[s];i?(n.value+=a,"{"!==a&&"("!==a||o++,")"!==a&&"}"!==a||o--):-1!==a.search(/\s/)?n.before+=a:("("===a&&(n.type="media-feature-expression",o++),n.value=a,n.sourceIndex=t+s,i=!0),!i||0!==o||")"!==a&&s!==e.length-1&&-1===e[s+1].search(/\s/)||(-1!==["not","only","and"].indexOf(n.value)&&(n.type="keyword"),"media-feature-expression"===n.type&&(n.nodes=It(n.value,n.sourceIndex)),r.push(Array.isArray(n.nodes)?new zt(n):new Pt(n)),n={before:"",after:"",value:""},i=!1)}for(let e=0;e<r.length;e++)if(n=r[e],e>0&&(r[e-1].after=n.before),void 0===n.type){if(e>0){if("media-feature-expression"===r[e-1].type){n.type="keyword";continue}if("not"===r[e-1].value||"only"===r[e-1].value){n.type="media-type";continue}if("and"===r[e-1].value){n.type="media-feature-expression";continue}"media-type"===r[e-1].type&&(r[e+1]?n.type="media-feature-expression"===r[e+1].type?"keyword":"media-feature-expression":n.type="media-feature-expression")}if(0===e){if(!r[e+1]){n.type="media-type";continue}if(r[e+1]&&("media-feature-expression"===r[e+1].type||"keyword"===r[e+1].type)){n.type="media-type";continue}if(r[e+2]){if("media-feature-expression"===r[e+2].type){n.type="media-type",r[e+1].type="keyword";continue}if("keyword"===r[e+2].type){n.type="keyword",r[e+1].type="media-type";continue}}if(r[e+3]&&"media-feature-expression"===r[e+3].type){n.type="keyword",r[e+1].type="media-type",r[e+2].type="keyword";continue}}}return r}function Nt(e){const t=[];let r=0,n=0;const o=/^(\s*)url\s*\(/.exec(e);if(null!==o){let n=o[0].length,i=1;for(;i>0;){const t=e[n];"("===t&&i++,")"===t&&i--,n++}t.unshift(new Pt({type:"url",value:e.substring(0,n).trim(),sourceIndex:o[1].length,before:o[1],after:/^(\s*)/.exec(e.substring(n))[1]})),r=n}for(let o=r;o<e.length;o++){const i=e[o];if("("===i&&n++,")"===i&&n--,0===n&&","===i){const n=e.substring(r,o),i=/^(\s*)/.exec(n)[1];t.push(new zt({type:"media-query",value:n.trim(),sourceIndex:r+i.length,nodes:Lt(n,r),before:i,after:/(\s*)$/.exec(n)[1]})),r=o+1}}const i=e.substring(r),s=/^(\s*)/.exec(i)[1];return t.push(new zt({type:"media-query",value:i.trim(),sourceIndex:r+s.length,nodes:Lt(i,r),before:s,after:/(\s*)$/.exec(i)[1]})),t}function zt(e){this.constructor(e),this.nodes=e.nodes,void 0===this.after&&(this.after=this.nodes.length>0?this.nodes[this.nodes.length-1].after:""),void 0===this.before&&(this.before=this.nodes.length>0?this.nodes[0].before:""),void 0===this.sourceIndex&&(this.sourceIndex=this.before.length),this.nodes.forEach((e=>{e.parent=this}))}function Pt(e){this.after=e.after,this.before=e.before,this.type=e.type,this.value=e.value,this.sourceIndex=e.sourceIndex}zt.prototype=Object.create(Pt.prototype),zt.constructor=Pt,zt.prototype.walk=function(e,t){const r="string"==typeof e||e instanceof RegExp,n=r?t:e,o="string"==typeof e?new RegExp(e):e;for(let i=0;i<this.nodes.length;i++){const s=this.nodes[i];if((!r||o.test(s.type))&&n&&!1===n(s,i,this.nodes))return!1;if(s.nodes&&!1===s.walk(e,t))return!1}return!0},zt.prototype.each=function(e=(()=>{})){for(let t=0;t<this.nodes.length;t++){if(!1===e(this.nodes[t],t,this.nodes))return!1}return!0};var Mt=Object.freeze({__proto__:null,parseMediaList:Nt});const Ot="___PRESERVED_TOKEN_",Ut={maxLineLen:0,expandVars:!1,uglyComments:!1,cuteComments:!1,debug:!1,output:""},Dt=/url\(\s*(["']?)data:/g,Ft=/\s+/g,qt=/\n/g;const Bt=/(=\s*?["']?)?#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])(\}|[^0-9a-f{][^{]*?\})/gi;const jt=/@[a-z0-9-_]*keyframes\s+[a-z0-9-_]+\s*{/gi,Ht=/(^\s|\s$)/g;const Vt=/"([^\\"]|\\.|\\)*"/g,Wt=/'([^\\']|\\.|\\)*'/g,$t=/progid:DXImageTransform.Microsoft.Alpha\(Opacity=/gi,Gt=/\r\n/g,Yt=/[\r\n]/g,Jt=/@variables\s*\{\s*([^}]+)\s*\}/g,Qt=/\s*([a-z0-9-]+)\s*:\s*([^;}]+)\s*/gi,Kt=/var\s*\(\s*([^)]+)\s*\)/g,Zt=/calc\(([^;}]*)\)/g,Xt=/(^\s*|\s*$)/g,er=/\( /g,tr=/ \)/g,rr=/\s*filter:\s*progid:DXImageTransform.Microsoft.Matrix\(([^)]+)\);/g,nr=/(^|\})(([^{:])+:)+([^{]*{)/g,or=/\s+([!{;:>+()\],])/g,ir=/([^\\])\s+([}])/g,sr=/!important/g,ar=/___PSEUDOCLASSCOLON___/g,lr=/:/g,cr=/\s*(animation|animation-delay|animation-duration|transition|transition-delay|transition-duration):\s*([^;}]+)/gi,ur=/(^|\D)0?\.?0(m?s)/gi,hr=/\s*(flex|flex-basis):\s*([^;}]+)/gi,dr=/\s+/,pr=/(hsla?)\(([^)]+)\)/g,mr=/(^\s+|\s+$)/g,fr=/:first-(line|letter)(\{|,)/gi,gr=/^(.*)(@charset)( "[^"]*";)/gi,yr=/^((\s*)(@charset)( [^;]+;\s*))+/gi,br=/@(font-face|import|(?:-(?:atsc|khtml|moz|ms|o|wap|webkit)-)?keyframe|media|page|namespace)/gi,kr=/:(active|after|before|checked|disabled|empty|enabled|first-(?:child|of-type)|focus|hover|last-(?:child|of-type)|link|only-(?:child|of-type)|root|:selection|target|visited)/gi,vr=/^(.*)(@charset "[^"]*";)/g,wr=/^(\s*@charset [^;]+;\s*)+/g,xr=/:(lang|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|(?:-(?:atsc|khtml|moz|ms|o|wap|webkit)-)?any)\(/gi,Er=/([:,( ]\s*)(attr|color-stop|from|rgba|to|url|(?:-(?:atsc|khtml|moz|ms|o|wap|webkit)-)?(?:calc|max|min|(?:repeating-)?(?:linear|radial)-gradient)|-webkit-gradient)/gi,Ar=/\s*\/\*/g,Sr=/\*\/\s*/g,Tr=/\band\(/gi,Cr=/([^:])not\(/gi,Rr=/\bor\(/gi,_r=/([!{}:;>+([,])\s+/g,Ir=/;+\}/g,Lr=/([0-9])\.0(ex|ch|r?em|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|g?rad|turn|m?s|k?Hz|dpi|dpcm|dppx|%| |;)/gi,Nr=/:0 0 0 0(;|\})/g,zr=/:0 0 0(;|\})/g,Pr=/(transform-origin|webkit-transform-origin|moz-transform-origin|o-transform-origin|ms-transform-origin|box-shadow):0(;|\})/gi,Mr=/(:|\s)0+\.(\d+)/g,Or=/rgb\s*\(\s*([0-9,\s]+)\s*\)/gi,Ur=/(border|border-top|border-right|border-bottom|border-left|outline|background):none(;|\})/gi,Dr=/progid:DXImageTransform\.Microsoft\.Alpha\(Opacity=/gi,Fr=/\(([-A-Za-z]+):([0-9]+)\/([0-9]+)\)/g,qr=/___QUERY_FRACTION___/g,Br=/;;+/g,jr=/(:|\s)(#f00)(;|})/g,Hr=/___PRESERVED_NEWLINE___/g,Vr=/(:|\s)(#000080)(;|})/g,Wr=/(:|\s)(#808080)(;|})/g,$r=/(:|\s)(#808000)(;|})/g,Gr=/(:|\s)(#800080)(;|})/g,Yr=/(:|\s)(#c0c0c0)(;|})/g,Jr=/(:|\s)(#008080)(;|})/g,Qr=/(:|\s)(#ffa500)(;|})/g,Kr=/(:|\s)(#800000)(;|})/g;function Zr(e="",t=Ut){const r=[],n=[];let o;const i=e;function s(t){e=e.replace(t,(e=>{const t=e.substring(0,1);if((e=e.slice(1,-1)).indexOf("___PRESERVE_CANDIDATE_COMMENT_")>=0)for(let t=0,n=r.length;t<n;t+=1)e=e.replace("___PRESERVE_CANDIDATE_COMMENT_"+t+"___",r[t]);return e=e.replace($t,"alpha(opacity="),n.push(e),t+Ot+(n.length-1)+"___"+t}))}e=function(e,t){const r=Dt,n=e.length-1,o=[];let i,s=0;for(;null!==(i=r.exec(e));){const a=i.index+4;let l=i[1];0===l.length&&(l=")");let c=!1,u=r.lastIndex-1;for(;!1===c&&u+1<=n&&-1!=u;)u=e.indexOf(l,u+1),u>0&&"\\"!==e.charAt(u-1)&&(c=!0,")"!=l&&(u=e.indexOf(")",u)));if(o.push(e.substring(s,i.index)),c){let r=e.substring(a,u);const n=r.split(",");n.length>1&&";base64"==n[0].slice(-7)?r=r.replace(Ft,""):(r=r.replace(qt," "),r=r.replace(Ft," "),r=r.replace(mr,"")),t.push(r);const i="url(___PRESERVED_TOKEN_"+(t.length-1)+"___)";o.push(i),s=u+1}else o.push(e.substring(i.index,r.lastIndex)),s=r.lastIndex}return o.push(e.substring(s)),o.join("")}(e,n),e=function(e,t){const r=[];let n,o=0;for(;;){const i=e.indexOf("/*",o);if(!(i>-1))break;if(n=e.indexOf("*/",i+2),!(n>-1)){n=-2;break}t.push(e.slice(i+2,n)),r.push(e.slice(o,i)),r.push("/*___PRESERVE_CANDIDATE_COMMENT_"+(t.length-1)+"___*/"),o=n+2}return r.push(e.slice(n+2)),r.join("")}(e,r),s(Vt),s(Wt);for(let o=0,i=r.length;o<i;o+=1){const i=r[o],s="___PRESERVE_CANDIDATE_COMMENT_"+o+"___";if("!"!==i.charAt(0))if("\\"!==i.charAt(i.length-1)){if(0===i.length){const t=e.indexOf(s);t>2&&">"===e.charAt(t-3)&&(n.push(""),e=e.replace(s,Ot+(n.length-1)+"___"))}e=e.replace(`/*${s}*/`,"")}else n.push("\\"),e=e.replace(s,Ot+(n.length-1)+"___"),o+=1,n.push(""),e=e.replace("___PRESERVE_CANDIDATE_COMMENT_"+o+"___",Ot+(n.length-1)+"___");else t.cuteComments?n.push(i.substring(1).replace(Gt,"\n")):t.uglyComments?n.push(i.substring(1).replace(Yt,"")):n.push(i),e=e.replace(s,Ot+(n.length-1)+"___")}if(t.expandVars){const t={};o=Jt,e=e.replace(o,((e,r)=>(o=Qt,r.replace(o,((e,r,n)=>(r&&n&&(t[r]=n),""))),""))),o=Kt,e=e.replace(o,((e,r)=>t[r]||"none"))}if(e=e.replace(Ft," "),o=Zt,e=e.replace(o,((e,t)=>(n.push("calc("+t.replace(Xt,"").replace(er,"(").replace(tr,")")+")"),Ot+(n.length-1)+"___"))),o=rr,e=e.replace(o,((e,t)=>(n.push(t),"filter:progid:DXImageTransform.Microsoft.Matrix(___PRESERVED_TOKEN_"+(n.length-1)+"___);"))),o=nr,e=(e=(e=(e=(e=e.replace(o,(e=>e.replace(lr,"___PSEUDOCLASSCOLON___")))).replace(or,"$1")).replace(ir,"$1$2")).replace(sr," !important")).replace(ar,":"),o=cr,e=e.replace(o,((e,t,r)=>t+":"+(r=r.replace(ur,((e,t,r)=>(n.push("0"+r),t+Ot+(n.length-1)+"___")))))),o=hr,e=function(e,t){const r=jt;let n,o=0;const i=(e,r)=>{"0"===(e=e.replace(Ht,"")).charAt(0)&&(t.push(e),n[r]=Ot+(t.length-1)+"___")};for(;;){let t=0;n="";let s=e.slice(o).search(r);if(s<0)break;o+=s,s=o;const a=e.length,l=[];for(;o<a;++o){const r=e.charAt(o);if("{"===r)0===t?l.push(n.replace(Ht,"")):1===t&&(n=n.split(","),n.forEach(i),l.push(n.join(",").replace(Ht,""))),n="",t+=1;else if("}"===r){if(2===t)l.push("{"+n.replace(Ht,"")+"}"),n="";else if(1===t){e=e.slice(0,s)+l.shift()+"{"+l.join("")+e.slice(o);break}t-=1}if(t<0)break;"{"!==r&&"}"!==r&&(n+=r)}}return e}(e=(e=e.replace(o,((e,t,r)=>{let o=r.split(dr);return n.push(o.pop()),o.push(Ot+(n.length-1)+"___"),o=o.join(" "),`${t}:${o}`}))).replace(pr,((e,t,r)=>{const o=[];return r.split(",").forEach((e=>{"0%"===(e=e.replace(mr,""))?(n.push("0%"),o.push(Ot+(n.length-1)+"___")):o.push(e)})),t+"("+o.join(",")+")"})),n),e=e.replace(fr,((e,t,r)=>":first-"+t.toLowerCase()+" "+r)),e=t.cuteComments?(e=e.replace(Ar,"___PRESERVED_NEWLINE___/*")).replace(Sr,"*/___PRESERVED_NEWLINE___"):e.replace(Sr,"*/"),o=gr,e=e.replace(o,((e,t,r,n)=>r.toLowerCase()+n+t)),o=yr,e=e.replace(o,((e,t,r,n,o)=>r+n.toLowerCase()+o)),o=br,e=e.replace(o,((e,t)=>"@"+t.toLowerCase())),o=kr,e=(e=(e=e.replace(o,((e,t)=>":"+t.toLowerCase()))).replace(vr,"$2$1")).replace(wr,"$1"),o=xr,e=e.replace(o,((e,t)=>":"+t.toLowerCase()+"(")),o=Er,e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(o,((e,t,r)=>t+r.toLowerCase()))).replace(Tr,"and (")).replace(Cr,"$1not (")).replace(Rr,"or (")).replace(_r,"$1")).replace(Ir,"}")).replace(Lr,"$1$2")).replace(Nr,":0$1")).replace(zr,":0$1"),o=Pr,e=(e=e.replace(o,((e,t,r)=>t.toLowerCase()+":0 0"+r))).replace(Mr,"$1.$2"),o=Or,e=function(e){const t=Bt,r=[];let n,o=0;for(;null!==(n=t.exec(e));)r.push(e.substring(o,n.index)),n[1]?r.push(n[1]+"#"+(n[2]+n[3]+n[4]+n[5]+n[6]+n[7])):n[2].toLowerCase()==n[3].toLowerCase()&&n[4].toLowerCase()==n[5].toLowerCase()&&n[6].toLowerCase()==n[7].toLowerCase()?r.push("#"+(n[3]+n[5]+n[7]).toLowerCase()):r.push("#"+(n[2]+n[3]+n[4]+n[5]+n[6]+n[7]).toLowerCase()),o=t.lastIndex=t.lastIndex-n[8].length;return r.push(e.substring(o)),r.join("")}(e=e.replace(o,((e,t)=>{const r=t.split(",");let n="#";for(let e=0;e<r.length;e+=1){let t=parseInt(r[e],10);t<16&&(n+="0"),t>255&&(t=255),n+=t.toString(16)}return n}))),e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(jr,"$1red$3")).replace(Vr,"$1navy$3")).replace(Wr,"$1gray$3")).replace($r,"$1olive$3")).replace(Gr,"$1purple$3")).replace(Yr,"$1silver$3")).replace(Jr,"$1teal$3")).replace(Qr,"$1orange$3")).replace(Kr,"$1maroon$3"),o=Ur,e=(e=(e=(e=e.replace(o,((e,t,r)=>t.toLowerCase()+":0"+r))).replace(Dr,"alpha(opacity=")).replace(Fr,"($1:$2___QUERY_FRACTION___$3)")).replace(qr,"/"),t.maxLineLen>0){const r=[];let n=[];for(let o=0,i=e.length;o<i;o+=1){const i=e.charAt(o);n.push(i),"}"===i&&n.length>t.maxLineLen&&(r.push(n.join("")),n=[])}n.length&&r.push(n.join("")),e=r.join("\n")}if(e=(e=e.replace(Br,";")).replace(Xt,""),n.length>1e3)return i;for(let t=n.length-1;t>=0;t--)e=e.replace(Ot+t+"___",n[t],"g");return e=e.replace(Hr,"\n")}var Xr=Object.freeze({__proto__:null,defaultOptions:Ut,processString:Zr}),en=Object.create,tn=Object.defineProperty,rn=Object.getOwnPropertyDescriptor,nn=Object.getOwnPropertyNames,on=Object.getPrototypeOf,sn=Object.prototype.hasOwnProperty,an=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ln=(e,t)=>{for(var r in t)tn(e,r,{get:t[r],enumerable:!0})},cn=an((e=>{var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");e.encode=function(e){if(0<=e&&e<t.length)return t[e];throw new TypeError("Must be between 0 and 63: "+e)},e.decode=function(e){return 65<=e&&e<=90?e-65:97<=e&&e<=122?e-97+26:48<=e&&e<=57?e-48+52:43==e?62:47==e?63:-1}})),un=an((e=>{var t=cn();e.encode=function(e){var r,n,o="",i=(n=e)<0?1+(-n<<1):0+(n<<1);do{r=31&i,(i>>>=5)>0&&(r|=32),o+=t.encode(r)}while(i>0);return o},e.decode=function(e,r,n){var o,i,s=e.length,a=0,l=0;do{if(r>=s)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(i=t.decode(e.charCodeAt(r++))))throw new Error("Invalid base64 digit: "+e.charAt(r-1));o=!!(32&i),a+=(i&=31)<<l,l+=5}while(o);n.value=function(e){var t=e>>1;return 1==(1&e)?-t:t}(a),n.rest=r}})),hn=an((e=>{e.getArg=function(e,t,r){if(t in e)return e[t];if(3===arguments.length)return r;throw new Error('"'+t+'" is a required argument.')};var t=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,r=/^data:.+\,.+$/;function n(e){var r=e.match(t);return r?{scheme:r[1],auth:r[2],host:r[3],port:r[4],path:r[5]}:null}function o(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}e.urlParse=n,e.urlGenerate=o;var i,s,a=(i=function(t){var r=t,i=n(t);if(i){if(!i.path)return t;r=i.path}for(var s=e.isAbsolute(r),a=[],l=0,c=0;;){if(l=c,-1===(c=r.indexOf("/",l))){a.push(r.slice(l));break}for(a.push(r.slice(l,c));c<r.length&&"/"===r[c];)c++}var u,h=0;for(c=a.length-1;c>=0;c--)"."===(u=a[c])?a.splice(c,1):".."===u?h++:h>0&&(""===u?(a.splice(c+1,h),h=0):(a.splice(c,2),h--));return""===(r=a.join("/"))&&(r=s?"/":"."),i?(i.path=r,o(i)):r},s=[],function(e){for(var t=0;t<s.length;t++)if(s[t].input===e){var r=s[0];return s[0]=s[t],s[t]=r,s[0].result}var n=i(e);return s.unshift({input:e,result:n}),s.length>32&&s.pop(),n});function l(e,t){""===e&&(e="."),""===t&&(t=".");var i=n(t),s=n(e);if(s&&(e=s.path||"/"),i&&!i.scheme)return s&&(i.scheme=s.scheme),o(i);if(i||t.match(r))return t;if(s&&!s.host&&!s.path)return s.host=t,o(s);var l="/"===t.charAt(0)?t:a(e.replace(/\/+$/,"")+"/"+t);return s?(s.path=l,o(s)):l}e.normalize=a,e.join=l,e.isAbsolute=function(e){return"/"===e.charAt(0)||t.test(e)},e.relative=function(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");for(var r=0;0!==t.indexOf(e+"/");){var n=e.lastIndexOf("/");if(n<0||(e=e.slice(0,n)).match(/^([^\/]+:\/)?\/*$/))return t;++r}return Array(r+1).join("../")+t.substr(e.length+1)};var c=!("__proto__"in Object.create(null));function u(e){return e}function h(e){if(!e)return!1;var t=e.length;if(t<9||95!==e.charCodeAt(t-1)||95!==e.charCodeAt(t-2)||111!==e.charCodeAt(t-3)||116!==e.charCodeAt(t-4)||111!==e.charCodeAt(t-5)||114!==e.charCodeAt(t-6)||112!==e.charCodeAt(t-7)||95!==e.charCodeAt(t-8)||95!==e.charCodeAt(t-9))return!1;for(var r=t-10;r>=0;r--)if(36!==e.charCodeAt(r))return!1;return!0}function d(e,t){return e===t?0:null===e?1:null===t?-1:e>t?1:-1}e.toSetString=c?u:function(e){return h(e)?"$"+e:e},e.fromSetString=c?u:function(e){return h(e)?e.slice(1):e},e.compareByOriginalPositions=function(e,t,r){var n=d(e.source,t.source);return 0!==n||0!==(n=e.originalLine-t.originalLine)||(0!==(n=e.originalColumn-t.originalColumn)||r)||0!==(n=e.generatedColumn-t.generatedColumn)||0!==(n=e.generatedLine-t.generatedLine)?n:d(e.name,t.name)},e.compareByOriginalPositionsNoSource=function(e,t,r){var n;return 0!==(n=e.originalLine-t.originalLine)||(0!==(n=e.originalColumn-t.originalColumn)||r)||0!==(n=e.generatedColumn-t.generatedColumn)||0!==(n=e.generatedLine-t.generatedLine)?n:d(e.name,t.name)},e.compareByGeneratedPositionsDeflated=function(e,t,r){var n=e.generatedLine-t.generatedLine;return 0!==n||(0!==(n=e.generatedColumn-t.generatedColumn)||r)||0!==(n=d(e.source,t.source))||0!==(n=e.originalLine-t.originalLine)||0!==(n=e.originalColumn-t.originalColumn)?n:d(e.name,t.name)},e.compareByGeneratedPositionsDeflatedNoLine=function(e,t,r){var n=e.generatedColumn-t.generatedColumn;return 0!==n||r||0!==(n=d(e.source,t.source))||0!==(n=e.originalLine-t.originalLine)||0!==(n=e.originalColumn-t.originalColumn)?n:d(e.name,t.name)},e.compareByGeneratedPositionsInflated=function(e,t){var r=e.generatedLine-t.generatedLine;return 0!==r||0!==(r=e.generatedColumn-t.generatedColumn)||0!==(r=d(e.source,t.source))||0!==(r=e.originalLine-t.originalLine)||0!==(r=e.originalColumn-t.originalColumn)?r:d(e.name,t.name)},e.parseSourceMapInput=function(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))},e.computeSourceURL=function(e,t,r){if(t=t||"",e&&("/"!==e[e.length-1]&&"/"!==t[0]&&(e+="/"),t=e+t),r){var i=n(r);if(!i)throw new Error("sourceMapURL could not be parsed");if(i.path){var s=i.path.lastIndexOf("/");s>=0&&(i.path=i.path.substring(0,s+1))}t=l(o(i),t)}return a(t)}})),dn=an((e=>{var t=hn(),r=Object.prototype.hasOwnProperty,n=typeof Map<"u";function o(){this._array=[],this._set=n?new Map:Object.create(null)}o.fromArray=function(e,t){for(var r=new o,n=0,i=e.length;n<i;n++)r.add(e[n],t);return r},o.prototype.size=function(){return n?this._set.size:Object.getOwnPropertyNames(this._set).length},o.prototype.add=function(e,o){var i=n?e:t.toSetString(e),s=n?this.has(e):r.call(this._set,i),a=this._array.length;(!s||o)&&this._array.push(e),s||(n?this._set.set(e,a):this._set[i]=a)},o.prototype.has=function(e){if(n)return this._set.has(e);var o=t.toSetString(e);return r.call(this._set,o)},o.prototype.indexOf=function(e){if(n){var o=this._set.get(e);if(o>=0)return o}else{var i=t.toSetString(e);if(r.call(this._set,i))return this._set[i]}throw new Error('"'+e+'" is not in the set.')},o.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)},o.prototype.toArray=function(){return this._array.slice()},e.ArraySet=o})),pn=an((e=>{var t=hn();function r(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}r.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)},r.prototype.add=function(e){!function(e,r){var n=e.generatedLine,o=r.generatedLine,i=e.generatedColumn,s=r.generatedColumn;return o>n||o==n&&s>=i||t.compareByGeneratedPositionsInflated(e,r)<=0}(this._last,e)?(this._sorted=!1,this._array.push(e)):(this._last=e,this._array.push(e))},r.prototype.toArray=function(){return this._sorted||(this._array.sort(t.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},e.MappingList=r})),mn=an((e=>{var t=un(),r=hn(),n=dn().ArraySet,o=pn().MappingList;function i(e){e||(e={}),this._file=r.getArg(e,"file",null),this._sourceRoot=r.getArg(e,"sourceRoot",null),this._skipValidation=r.getArg(e,"skipValidation",!1),this._sources=new n,this._names=new n,this._mappings=new o,this._sourcesContents=null}i.prototype._version=3,i.fromSourceMap=function(e){var t=e.sourceRoot,n=new i({file:e.file,sourceRoot:t});return e.eachMapping((function(e){var o={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(o.source=e.source,null!=t&&(o.source=r.relative(t,o.source)),o.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(o.name=e.name)),n.addMapping(o)})),e.sources.forEach((function(o){var i=o;null!==t&&(i=r.relative(t,o)),n._sources.has(i)||n._sources.add(i);var s=e.sourceContentFor(o);null!=s&&n.setSourceContent(o,s)})),n},i.prototype.addMapping=function(e){var t=r.getArg(e,"generated"),n=r.getArg(e,"original",null),o=r.getArg(e,"source",null),i=r.getArg(e,"name",null);this._skipValidation||this._validateMapping(t,n,o,i),null!=o&&(o=String(o),this._sources.has(o)||this._sources.add(o)),null!=i&&(i=String(i),this._names.has(i)||this._names.add(i)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:null!=n&&n.line,originalColumn:null!=n&&n.column,source:o,name:i})},i.prototype.setSourceContent=function(e,t){var n=e;null!=this._sourceRoot&&(n=r.relative(this._sourceRoot,n)),null!=t?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[r.toSetString(n)]=t):this._sourcesContents&&(delete this._sourcesContents[r.toSetString(n)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},i.prototype.applySourceMap=function(e,t,o){var i=t;if(null==t){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');i=e.file}var s=this._sourceRoot;null!=s&&(i=r.relative(s,i));var a=new n,l=new n;this._mappings.unsortedForEach((function(t){if(t.source===i&&null!=t.originalLine){var n=e.originalPositionFor({line:t.originalLine,column:t.originalColumn});null!=n.source&&(t.source=n.source,null!=o&&(t.source=r.join(o,t.source)),null!=s&&(t.source=r.relative(s,t.source)),t.originalLine=n.line,t.originalColumn=n.column,null!=n.name&&(t.name=n.name))}var c=t.source;null!=c&&!a.has(c)&&a.add(c);var u=t.name;null!=u&&!l.has(u)&&l.add(u)}),this),this._sources=a,this._names=l,e.sources.forEach((function(t){var n=e.sourceContentFor(t);null!=n&&(null!=o&&(t=r.join(o,t)),null!=s&&(t=r.relative(s,t)),this.setSourceContent(t,n))}),this)},i.prototype._validateMapping=function(e,t,r,n){if(t&&"number"!=typeof t.line&&"number"!=typeof t.column)throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||t||r||n){if(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&r)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:r,original:t,name:n}))}},i.prototype._serializeMappings=function(){for(var e,n,o,i,s=0,a=1,l=0,c=0,u=0,h=0,d="",p=this._mappings.toArray(),m=0,f=p.length;m<f;m++){if(e="",(n=p[m]).generatedLine!==a)for(s=0;n.generatedLine!==a;)e+=";",a++;else if(m>0){if(!r.compareByGeneratedPositionsInflated(n,p[m-1]))continue;e+=","}e+=t.encode(n.generatedColumn-s),s=n.generatedColumn,null!=n.source&&(i=this._sources.indexOf(n.source),e+=t.encode(i-h),h=i,e+=t.encode(n.originalLine-1-c),c=n.originalLine-1,e+=t.encode(n.originalColumn-l),l=n.originalColumn,null!=n.name&&(o=this._names.indexOf(n.name),e+=t.encode(o-u),u=o)),d+=e}return d},i.prototype._generateSourcesContent=function(e,t){return e.map((function(e){if(!this._sourcesContents)return null;null!=t&&(e=r.relative(t,e));var n=r.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null}),this)},i.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},i.prototype.toString=function(){return JSON.stringify(this.toJSON())},e.SourceMapGenerator=i})),fn={};ln(fn,{AtKeyword:()=>kn,BadString:()=>xn,BadUrl:()=>An,CDC:()=>Ln,CDO:()=>In,Colon:()=>Nn,Comma:()=>Pn,Comment:()=>Bn,Delim:()=>Sn,Dimension:()=>Rn,EOF:()=>gn,Function:()=>bn,Hash:()=>vn,Ident:()=>yn,LeftCurlyBracket:()=>Fn,LeftParenthesis:()=>Un,LeftSquareBracket:()=>Mn,Number:()=>Tn,Percentage:()=>Cn,RightCurlyBracket:()=>qn,RightParenthesis:()=>Dn,RightSquareBracket:()=>On,Semicolon:()=>zn,String:()=>wn,Url:()=>En,WhiteSpace:()=>_n});var gn=0,yn=1,bn=2,kn=3,vn=4,wn=5,xn=6,En=7,An=8,Sn=9,Tn=10,Cn=11,Rn=12,_n=13,In=14,Ln=15,Nn=16,zn=17,Pn=18,Mn=19,On=20,Un=21,Dn=22,Fn=23,qn=24,Bn=25;function jn(e){return e>=48&&e<=57}function Hn(e){return jn(e)||e>=65&&e<=70||e>=97&&e<=102}function Vn(e){return e>=65&&e<=90}function Wn(e){return function(e){return Vn(e)||function(e){return e>=97&&e<=122}(e)}(e)||function(e){return e>=128}(e)||95===e}function $n(e){return Wn(e)||jn(e)||45===e}function Gn(e){return e>=0&&e<=8||11===e||e>=14&&e<=31||127===e}function Yn(e){return 10===e||13===e||12===e}function Jn(e){return Yn(e)||32===e||9===e}function Qn(e,t){return!(92!==e||Yn(t)||0===t)}function Kn(e,t,r){return 45===e?Wn(t)||45===t||Qn(t,r):!!Wn(e)||92===e&&Qn(e,t)}function Zn(e,t,r){return 43===e||45===e?jn(t)?2:46===t&&jn(r)?3:0:46===e?jn(t)?2:0:jn(e)?1:0}function Xn(e){return 65279===e||65534===e?1:0}var eo=new Array(128),to=130;for(let e=0;e<eo.length;e++)eo[e]=(Jn(e)?to:jn(e)&&131)||Wn(e)&&132||Gn(e)&&133||e||128;function ro(e){return e<128?eo[e]:132}function no(e,t){return t<e.length?e.charCodeAt(t):0}function oo(e,t,r){return 13===r&&10===no(e,t+1)?2:1}function io(e,t,r){let n=e.charCodeAt(t);return Vn(n)&&(n|=32),n===r}function so(e,t,r,n){if(r-t!==n.length||t<0||r>e.length)return!1;for(let o=t;o<r;o++){let r=n.charCodeAt(o-t),i=e.charCodeAt(o);if(Vn(i)&&(i|=32),i!==r)return!1}return!0}function ao(e,t){for(;t<e.length&&Jn(e.charCodeAt(t));t++);return t}function lo(e,t){for(;t<e.length&&jn(e.charCodeAt(t));t++);return t}function co(e,t){if(Hn(no(e,(t+=2)-1))){for(let r=Math.min(e.length,t+5);t<r&&Hn(no(e,t));t++);let r=no(e,t);Jn(r)&&(t+=oo(e,t,r))}return t}function uo(e,t){for(;t<e.length;t++){let r=e.charCodeAt(t);if(!$n(r)){if(Qn(r,no(e,t+1))){t=co(e,t)-1;continue}break}}return t}function ho(e,t){let r=e.charCodeAt(t);if((43===r||45===r)&&(r=e.charCodeAt(t+=1)),jn(r)&&(t=lo(e,t+1),r=e.charCodeAt(t)),46===r&&jn(e.charCodeAt(t+1))&&(t=lo(e,t+=2)),io(e,t,101)){let n=0;r=e.charCodeAt(t+1),(45===r||43===r)&&(n=1,r=e.charCodeAt(t+2)),jn(r)&&(t=lo(e,t+1+n+1))}return t}function po(e,t){for(;t<e.length;t++){let r=e.charCodeAt(t);if(41===r){t++;break}Qn(r,no(e,t+1))&&(t=co(e,t))}return t}function mo(e){if(1===e.length&&!Hn(e.charCodeAt(0)))return e[0];let t=parseInt(e,16);return(0===t||t>=55296&&t<=57343||t>1114111)&&(t=65533),String.fromCodePoint(t)}var fo=["EOF-token","ident-token","function-token","at-keyword-token","hash-token","string-token","bad-string-token","url-token","bad-url-token","delim-token","number-token","percentage-token","dimension-token","whitespace-token","CDO-token","CDC-token","colon-token","semicolon-token","comma-token","[-token","]-token","(-token",")-token","{-token","}-token"];function go(e=null,t){return null===e||e.length<t?new Uint32Array(Math.max(t+1024,16384)):e}function yo(e){let t=e.source,r=t.length,n=t.length>0?Xn(t.charCodeAt(0)):0,o=go(e.lines,r),i=go(e.columns,r),s=e.startLine,a=e.startColumn;for(let e=n;e<r;e++){let n=t.charCodeAt(e);o[e]=s,i[e]=a++,(10===n||13===n||12===n)&&(13===n&&e+1<r&&10===t.charCodeAt(e+1)&&(e++,o[e]=s,i[e]=a),s++,a=1)}o[r]=s,i[r]=a,e.lines=o,e.columns=i,e.computed=!0}var bo=16777215,ko=24,vo=new Map([[2,22],[21,22],[19,20],[23,24]]),wo=class{constructor(e,t){this.setSource(e,t)}reset(){this.eof=!1,this.tokenIndex=-1,this.tokenType=0,this.tokenStart=this.firstCharOffset,this.tokenEnd=this.firstCharOffset}setSource(e="",t=(()=>{})){let r=(e=String(e||"")).length,n=go(this.offsetAndType,e.length+1),o=go(this.balance,e.length+1),i=0,s=0,a=0,l=-1;for(this.offsetAndType=null,this.balance=null,t(e,((e,t,c)=>{switch(e){default:o[i]=r;break;case s:{let e=a&bo;for(a=o[e],s=a>>ko,o[i]=e,o[e++]=i;e<i;e++)o[e]===r&&(o[e]=i);break}case 21:case 2:case 19:case 23:o[i]=a,s=vo.get(e),a=s<<ko|i}n[i++]=e<<ko|c,-1===l&&(l=t)})),n[i]=0|r,o[i]=r,o[r]=r;0!==a;){let e=a&bo;a=o[e],o[e]=r}this.source=e,this.firstCharOffset=-1===l?0:l,this.tokenCount=i,this.offsetAndType=n,this.balance=o,this.reset(),this.next()}lookupType(e){return(e+=this.tokenIndex)<this.tokenCount?this.offsetAndType[e]>>ko:0}lookupOffset(e){return(e+=this.tokenIndex)<this.tokenCount?this.offsetAndType[e-1]&bo:this.source.length}lookupValue(e,t){return(e+=this.tokenIndex)<this.tokenCount&&so(this.source,this.offsetAndType[e-1]&bo,this.offsetAndType[e]&bo,t)}getTokenStart(e){return e===this.tokenIndex?this.tokenStart:e>0?e<this.tokenCount?this.offsetAndType[e-1]&bo:this.offsetAndType[this.tokenCount]&bo:this.firstCharOffset}substrToCursor(e){return this.source.substring(e,this.tokenStart)}isBalanceEdge(e){return this.balance[this.tokenIndex]<e}isDelim(e,t){return t?9===this.lookupType(t)&&this.source.charCodeAt(this.lookupOffset(t))===e:9===this.tokenType&&this.source.charCodeAt(this.tokenStart)===e}skip(e){let t=this.tokenIndex+e;t<this.tokenCount?(this.tokenIndex=t,this.tokenStart=this.offsetAndType[t-1]&bo,t=this.offsetAndType[t],this.tokenType=t>>ko,this.tokenEnd=t&bo):(this.tokenIndex=this.tokenCount,this.next())}next(){let e=this.tokenIndex+1;e<this.tokenCount?(this.tokenIndex=e,this.tokenStart=this.tokenEnd,e=this.offsetAndType[e],this.tokenType=e>>ko,this.tokenEnd=e&bo):(this.eof=!0,this.tokenIndex=this.tokenCount,this.tokenType=0,this.tokenStart=this.tokenEnd=this.source.length)}skipSC(){for(;13===this.tokenType||25===this.tokenType;)this.next()}skipUntilBalanced(e,t){let r,n,o=e;e:for(;o<this.tokenCount&&(r=this.balance[o],!(r<e));o++)switch(n=o>0?this.offsetAndType[o-1]&bo:this.firstCharOffset,t(this.source.charCodeAt(n))){case 1:break e;case 2:o++;break e;default:this.balance[r]===o&&(o=r)}this.skip(o-this.tokenIndex)}forEachToken(e){for(let t=0,r=this.firstCharOffset;t<this.tokenCount;t++){let n=r,o=this.offsetAndType[t],i=o&bo;r=i,e(o>>ko,n,i,t)}}dump(){let e=new Array(this.tokenCount);return this.forEachToken(((t,r,n,o)=>{e[o]={idx:o,type:fo[t],chunk:this.source.substring(r,n),balance:this.balance[o]}})),e}};function xo(e,t){function r(t){return t<a?e.charCodeAt(t):0}function n(){return c=ho(e,c),Kn(r(c),r(c+1),r(c+2))?(s=12,void(c=uo(e,c))):37===r(c)?(s=11,void c++):void(s=10)}function o(){let t=c;return c=uo(e,c),so(e,t,c,"url")&&40===r(c)?(c=ao(e,c+1),34===r(c)||39===r(c)?(s=2,void(c=t+4)):void function(){for(s=7,c=ao(e,c);c<e.length;c++){let t=e.charCodeAt(c);switch(ro(t)){case 41:return void c++;case to:return c=ao(e,c),41===r(c)||c>=e.length?void(c<e.length&&c++):(c=po(e,c),void(s=8));case 34:case 39:case 40:case 133:return c=po(e,c),void(s=8);case 92:if(Qn(t,r(c+1))){c=co(e,c)-1;break}return c=po(e,c),void(s=8)}}}()):40===r(c)?(s=2,void c++):void(s=1)}function i(t){for(t||(t=r(c++)),s=5;c<e.length;c++){let n=e.charCodeAt(c);switch(ro(n)){case t:return void c++;case to:if(Yn(n))return c+=oo(e,c,n),void(s=6);break;case 92:if(c===e.length-1)break;let o=r(c+1);Yn(o)?c+=oo(e,c+1,o):Qn(n,o)&&(c=co(e,c)-1)}}}let s,a=(e=String(e||"")).length,l=Xn(r(0)),c=l;for(;c<a;){let a=e.charCodeAt(c);switch(ro(a)){case to:s=13,c=ao(e,c+1);break;case 34:i();break;case 35:$n(r(c+1))||Qn(r(c+1),r(c+2))?(s=4,c=uo(e,c+1)):(s=9,c++);break;case 39:i();break;case 40:s=21,c++;break;case 41:s=22,c++;break;case 43:Zn(a,r(c+1),r(c+2))?n():(s=9,c++);break;case 44:s=18,c++;break;case 45:Zn(a,r(c+1),r(c+2))?n():45===r(c+1)&&62===r(c+2)?(s=15,c+=3):Kn(a,r(c+1),r(c+2))?o():(s=9,c++);break;case 46:Zn(a,r(c+1),r(c+2))?n():(s=9,c++);break;case 47:42===r(c+1)?(s=25,c=e.indexOf("*/",c+2),c=-1===c?e.length:c+2):(s=9,c++);break;case 58:s=16,c++;break;case 59:s=17,c++;break;case 60:33===r(c+1)&&45===r(c+2)&&45===r(c+3)?(s=14,c+=4):(s=9,c++);break;case 64:Kn(r(c+1),r(c+2),r(c+3))?(s=3,c=uo(e,c+1)):(s=9,c++);break;case 91:s=19,c++;break;case 92:Qn(a,r(c+1))?o():(s=9,c++);break;case 93:s=20,c++;break;case 123:s=23,c++;break;case 125:s=24,c++;break;case 131:n();break;case 132:o();break;default:s=9,c++}t(s,l,l=c)}}var Eo=null,Ao=class{static createItem(e){return{prev:null,next:null,data:e}}constructor(){this.head=null,this.tail=null,this.cursor=null}createItem(e){return Ao.createItem(e)}allocateCursor(e,t){let r;return null!==Eo?(r=Eo,Eo=Eo.cursor,r.prev=e,r.next=t,r.cursor=this.cursor):r={prev:e,next:t,cursor:this.cursor},this.cursor=r,r}releaseCursor(){let{cursor:e}=this;this.cursor=e.cursor,e.prev=null,e.next=null,e.cursor=Eo,Eo=e}updateCursors(e,t,r,n){let{cursor:o}=this;for(;null!==o;)o.prev===e&&(o.prev=t),o.next===r&&(o.next=n),o=o.cursor}*[Symbol.iterator](){for(let e=this.head;null!==e;e=e.next)yield e.data}get size(){let e=0;for(let t=this.head;null!==t;t=t.next)e++;return e}get isEmpty(){return null===this.head}get first(){return this.head&&this.head.data}get last(){return this.tail&&this.tail.data}fromArray(e){let t=null;this.head=null;for(let r of e){let e=Ao.createItem(r);null!==t?t.next=e:this.head=e,e.prev=t,t=e}return this.tail=t,this}toArray(){return[...this]}toJSON(){return[...this]}forEach(e,t=this){let r=this.allocateCursor(null,this.head);for(;null!==r.next;){let n=r.next;r.next=n.next,e.call(t,n.data,n,this)}this.releaseCursor()}forEachRight(e,t=this){let r=this.allocateCursor(this.tail,null);for(;null!==r.prev;){let n=r.prev;r.prev=n.prev,e.call(t,n.data,n,this)}this.releaseCursor()}reduce(e,t,r=this){let n,o=this.allocateCursor(null,this.head),i=t;for(;null!==o.next;)n=o.next,o.next=n.next,i=e.call(r,i,n.data,n,this);return this.releaseCursor(),i}reduceRight(e,t,r=this){let n,o=this.allocateCursor(this.tail,null),i=t;for(;null!==o.prev;)n=o.prev,o.prev=n.prev,i=e.call(r,i,n.data,n,this);return this.releaseCursor(),i}some(e,t=this){for(let r=this.head;null!==r;r=r.next)if(e.call(t,r.data,r,this))return!0;return!1}map(e,t=this){let r=new Ao;for(let n=this.head;null!==n;n=n.next)r.appendData(e.call(t,n.data,n,this));return r}filter(e,t=this){let r=new Ao;for(let n=this.head;null!==n;n=n.next)e.call(t,n.data,n,this)&&r.appendData(n.data);return r}nextUntil(e,t,r=this){if(null===e)return;let n=this.allocateCursor(null,e);for(;null!==n.next;){let e=n.next;if(n.next=e.next,t.call(r,e.data,e,this))break}this.releaseCursor()}prevUntil(e,t,r=this){if(null===e)return;let n=this.allocateCursor(e,null);for(;null!==n.prev;){let e=n.prev;if(n.prev=e.prev,t.call(r,e.data,e,this))break}this.releaseCursor()}clear(){this.head=null,this.tail=null}copy(){let e=new Ao;for(let t of this)e.appendData(t);return e}prepend(e){return this.updateCursors(null,e,this.head,e),null!==this.head?(this.head.prev=e,e.next=this.head):this.tail=e,this.head=e,this}prependData(e){return this.prepend(Ao.createItem(e))}append(e){return this.insert(e)}appendData(e){return this.insert(Ao.createItem(e))}insert(e,t=null){if(null!==t)if(this.updateCursors(t.prev,e,t,e),null===t.prev){if(this.head!==t)throw new Error("before doesn't belong to list");this.head=e,t.prev=e,e.next=t,this.updateCursors(null,e)}else t.prev.next=e,e.prev=t.prev,t.prev=e,e.next=t;else this.updateCursors(this.tail,e,null,e),null!==this.tail?(this.tail.next=e,e.prev=this.tail):this.head=e,this.tail=e;return this}insertData(e,t){return this.insert(Ao.createItem(e),t)}remove(e){if(this.updateCursors(e,e.prev,e,e.next),null!==e.prev)e.prev.next=e.next;else{if(this.head!==e)throw new Error("item doesn't belong to list");this.head=e.next}if(null!==e.next)e.next.prev=e.prev;else{if(this.tail!==e)throw new Error("item doesn't belong to list");this.tail=e.prev}return e.prev=null,e.next=null,e}push(e){this.insert(Ao.createItem(e))}pop(){return null!==this.tail?this.remove(this.tail):null}unshift(e){this.prepend(Ao.createItem(e))}shift(){return null!==this.head?this.remove(this.head):null}prependList(e){return this.insertList(e,this.head)}appendList(e){return this.insertList(e)}insertList(e,t){return null===e.head||(null!=t?(this.updateCursors(t.prev,e.tail,t,e.head),null!==t.prev?(t.prev.next=e.head,e.head.prev=t.prev):this.head=e.head,t.prev=e.tail,e.tail.next=t):(this.updateCursors(this.tail,e.tail,null,e.head),null!==this.tail?(this.tail.next=e.head,e.head.prev=this.tail):this.head=e.head,this.tail=e.tail),e.head=null,e.tail=null),this}replace(e,t){"head"in t?this.insertList(t,e):this.insert(t,e),this.remove(e)}};function So(e,t){let r=Object.create(SyntaxError.prototype),n=new Error;return Object.assign(r,{name:e,message:t,get stack(){return(n.stack||"").replace(/^(.+\n){1,3}/,`${e}: ${t}\n`)}})}var To=" ";function Co({source:e,line:t,column:r},n){function o(e,t){return i.slice(e,t).map(((t,r)=>String(e+r+1).padStart(l)+" |"+t)).join("\n")}let i=e.split(/\r\n?|\n|\f/),s=Math.max(1,t-n)-1,a=Math.min(t+n,i.length+1),l=Math.max(4,String(a).length)+1,c=0;(r+=(To.length-1)*(i[t-1].substr(0,r-1).match(/\t/g)||[]).length)>100&&(c=r-60+3,r=58);for(let e=s;e<=a;e++)e>=0&&e<i.length&&(i[e]=i[e].replace(/\t/g,To),i[e]=(c>0&&i[e].length>c?"…":"")+i[e].substr(c,98)+(i[e].length>c+100-1?"…":""));return[o(s,t),new Array(r+l+2).join("-")+"^",o(t,a)].filter(Boolean).join("\n")}function Ro(e,t,r,n,o){return Object.assign(So("SyntaxError",e),{source:t,offset:r,line:n,column:o,sourceFragment:e=>Co({source:t,line:n,column:o},isNaN(e)?0:e),get formattedMessage(){return`Parse error: ${e}\n`+Co({source:t,line:n,column:o},2)}})}function _o(e){let t=this.createList(),r=!1,n={recognizer:e};for(;!this.eof;){switch(this.tokenType){case 25:this.next();continue;case 13:r=!0,this.next();continue}let o=e.getNode.call(this,n);if(void 0===o)break;r&&(e.onWhiteSpace&&e.onWhiteSpace.call(this,o,t,n),r=!1),t.push(o)}return r&&e.onWhiteSpace&&e.onWhiteSpace.call(this,null,t,n),t}var Io=()=>{};function Lo(e){return function(){return this[e]()}}function No(e){let t=Object.create(null);for(let r in e){let n=e[r],o=n.parse||n;o&&(t[r]=o)}return t}function zo(e){let t="",r="<unknown>",n=!1,o=Io,i=!1,s=new class{constructor(){this.lines=null,this.columns=null,this.computed=!1}setSource(e,t=0,r=1,n=1){this.source=e,this.startOffset=t,this.startLine=r,this.startColumn=n,this.computed=!1}getLocation(e,t){return this.computed||yo(this),{source:t,offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]}}getLocationRange(e,t,r){return this.computed||yo(this),{source:r,start:{offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]},end:{offset:this.startOffset+t,line:this.lines[t],column:this.columns[t]}}}},a=Object.assign(new wo,function(e){let t={context:Object.create(null),scope:Object.assign(Object.create(null),e.scope),atrule:No(e.atrule),pseudo:No(e.pseudo),node:No(e.node)};for(let r in e.parseContext)switch(typeof e.parseContext[r]){case"function":t.context[r]=e.parseContext[r];break;case"string":t.context[r]=Lo(e.parseContext[r])}return{config:t,...t,...t.node}}(e||{}),{parseAtrulePrelude:!0,parseRulePrelude:!0,parseValue:!0,parseCustomProperty:!1,readSequence:_o,consumeUntilBalanceEnd:()=>0,consumeUntilLeftCurlyBracket:e=>123===e?1:0,consumeUntilLeftCurlyBracketOrSemicolon:e=>123===e||59===e?1:0,consumeUntilExclamationMarkOrSemicolon:e=>33===e||59===e?1:0,consumeUntilSemicolonIncluded:e=>59===e?2:0,createList:()=>new Ao,createSingleNodeList:e=>(new Ao).appendData(e),getFirstListNode:e=>e&&e.first,getLastListNode:e=>e&&e.last,parseWithFallback(e,t){let r=this.tokenIndex;try{return e.call(this)}catch(e){if(i)throw e;let n=t.call(this,r);return i=!0,o(e,n),i=!1,n}},lookupNonWSType(e){let t;do{if(t=this.lookupType(e++),13!==t)return t}while(0!==t);return 0},charCodeAt:e=>e>=0&&e<t.length?t.charCodeAt(e):0,substring:(e,r)=>t.substring(e,r),substrToCursor(e){return this.source.substring(e,this.tokenStart)},cmpChar:(e,r)=>io(t,e,r),cmpStr:(e,r,n)=>so(t,e,r,n),consume(e){let t=this.tokenStart;return this.eat(e),this.substrToCursor(t)},consumeFunctionName(){let e=t.substring(this.tokenStart,this.tokenEnd-1);return this.eat(2),e},consumeNumber(e){let r=t.substring(this.tokenStart,ho(t,this.tokenStart));return this.eat(e),r},eat(e){if(this.tokenType!==e){let t=fo[e].slice(0,-6).replace(/-/g," ").replace(/^./,(e=>e.toUpperCase())),r=`${/[[\](){}]/.test(t)?`"${t}"`:t} is expected`,n=this.tokenStart;switch(e){case 1:2===this.tokenType||7===this.tokenType?(n=this.tokenEnd-1,r="Identifier is expected but function found"):r="Identifier is expected";break;case 4:this.isDelim(35)&&(this.next(),n++,r="Name is expected");break;case 11:10===this.tokenType&&(n=this.tokenEnd,r="Percent sign is expected")}this.error(r,n)}this.next()},eatIdent(e){(1!==this.tokenType||!1===this.lookupValue(0,e))&&this.error(`Identifier "${e}" is expected`),this.next()},eatDelim(e){this.isDelim(e)||this.error(`Delim "${String.fromCharCode(e)}" is expected`),this.next()},getLocation:(e,t)=>n?s.getLocationRange(e,t,r):null,getLocationFromList(e){if(n){let t=this.getFirstListNode(e),n=this.getLastListNode(e);return s.getLocationRange(null!==t?t.loc.start.offset-s.startOffset:this.tokenStart,null!==n?n.loc.end.offset-s.startOffset:this.tokenStart,r)}return null},error(e,r){let n=typeof r<"u"&&r<t.length?s.getLocation(r):this.eof?s.getLocation(function(e,t){for(;t>=0&&Jn(e.charCodeAt(t));t--);return t+1}(t,t.length-1)):s.getLocation(this.tokenStart);throw new Ro(e||"Unexpected input",t,n.offset,n.line,n.column)}});return Object.assign((function(e,l){t=e,l=l||{},a.setSource(t,xo),s.setSource(t,l.offset,l.line,l.column),r=l.filename||"<unknown>",n=Boolean(l.positions),o="function"==typeof l.onParseError?l.onParseError:Io,i=!1,a.parseAtrulePrelude=!("parseAtrulePrelude"in l)||Boolean(l.parseAtrulePrelude),a.parseRulePrelude=!("parseRulePrelude"in l)||Boolean(l.parseRulePrelude),a.parseValue=!("parseValue"in l)||Boolean(l.parseValue),a.parseCustomProperty="parseCustomProperty"in l&&Boolean(l.parseCustomProperty);let{context:c="default",onComment:u}=l;if(!(c in a.context))throw new Error("Unknown context `"+c+"`");"function"==typeof u&&a.forEachToken(((e,r,n)=>{if(25===e){let e=a.getLocation(r,n),o=so(t,n-2,n,"*/")?t.slice(r+2,n-2):t.slice(r+2,n);u(o,e)}}));let h=a.context[c].call(a,l);return a.eof||a.error(),h}),{SyntaxError:Ro,config:a.config})}var Po,Mo,Oo=(Po=mn(),Mo=1,((e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of nn(t))!sn.call(e,o)&&(r||"default"!==o)&&tn(e,o,{get:()=>t[o],enumerable:!(n=rn(t,o))||n.enumerable});return e})((e=>tn(e,"__esModule",{value:!0}))(tn(null!=Po?en(on(Po)):{},"default",!Mo&&Po&&Po.__esModule?{get:()=>Po.default,enumerable:!0}:{value:Po,enumerable:!0})),Po)),Uo=new Set(["Atrule","Selector","Declaration"]);var Do={};ln(Do,{safe:()=>Vo,spec:()=>Ho});var Fo=(e,t)=>{if(9===e&&(e=t),"string"==typeof e){let t=e.charCodeAt(0);return t>127?32768:t<<8}return e},qo=[[1,1],[1,2],[1,7],[1,8],[1,"-"],[1,10],[1,11],[1,12],[1,15],[1,21],[3,1],[3,2],[3,7],[3,8],[3,"-"],[3,10],[3,11],[3,12],[3,15],[4,1],[4,2],[4,7],[4,8],[4,"-"],[4,10],[4,11],[4,12],[4,15],[12,1],[12,2],[12,7],[12,8],[12,"-"],[12,10],[12,11],[12,12],[12,15],["#",1],["#",2],["#",7],["#",8],["#","-"],["#",10],["#",11],["#",12],["#",15],["-",1],["-",2],["-",7],["-",8],["-","-"],["-",10],["-",11],["-",12],["-",15],[10,1],[10,2],[10,7],[10,8],[10,10],[10,11],[10,12],[10,"%"],[10,15],["@",1],["@",2],["@",7],["@",8],["@","-"],["@",15],[".",10],[".",11],[".",12],["+",10],["+",11],["+",12],["/","*"]],Bo=qo.concat([[1,4],[12,4],[4,4],[3,21],[3,5],[3,16],[11,11],[11,12],[11,2],[11,"-"],[22,1],[22,2],[22,11],[22,12],[22,4],[22,"-"]]);function jo(e){let t=new Set(e.map((([e,t])=>Fo(e)<<16|Fo(t))));return function(e,r,n){let o=Fo(r,n),i=n.charCodeAt(0);return(45===i&&1!==r&&2!==r&&15!==r||43===i?t.has(e<<16|i<<8):t.has(e<<16|o))&&this.emit(" ",13,!0),o}}var Ho=jo(qo),Vo=jo(Bo);function Wo(e,t){if("function"!=typeof t)e.children.forEach(this.node,this);else{let r=null;e.children.forEach((e=>{null!==r&&t.call(this,r),this.node(e),r=e}))}}function $o(e){xo(e,((t,r,n)=>{this.token(t,e.slice(r,n))}))}function Go(e){let t=new Map;for(let r in e.node){let n=e.node[r];"function"==typeof(n.generate||n)&&t.set(r,n.generate||n)}return function(e,r){let n="",o=0,i={node(e){if(!t.has(e.type))throw new Error("Unknown node type: "+e.type);t.get(e.type).call(s,e)},tokenBefore:Vo,token(e,t){o=this.tokenBefore(o,e,t),this.emit(t,e,!1),9===e&&92===t.charCodeAt(0)&&this.emit("\n",13,!0)},emit(e){n+=e},result:()=>n};r&&("function"==typeof r.decorator&&(i=r.decorator(i)),r.sourceMap&&(i=function(e){let t=new Oo.SourceMapGenerator,r={line:1,column:0},n={line:0,column:0},o={line:1,column:0},i={generated:o},s=1,a=0,l=!1,c=e.node;e.node=function(e){if(e.loc&&e.loc.start&&Uo.has(e.type)){let c=e.loc.start.line,u=e.loc.start.column-1;(n.line!==c||n.column!==u)&&(n.line=c,n.column=u,r.line=s,r.column=a,l&&(l=!1,(r.line!==o.line||r.column!==o.column)&&t.addMapping(i)),l=!0,t.addMapping({source:e.loc.source,original:n,generated:r}))}c.call(this,e),l&&Uo.has(e.type)&&(o.line=s,o.column=a)};let u=e.emit;e.emit=function(e,t,r){for(let t=0;t<e.length;t++)10===e.charCodeAt(t)?(s++,a=0):a++;u(e,t,r)};let h=e.result;return e.result=function(){return l&&t.addMapping(i),{css:h(),map:t}},e}(i)),r.mode in Do&&(i.tokenBefore=Do[r.mode]));let s={node:e=>i.node(e),children:Wo,token:(e,t)=>i.token(e,t),tokenize:$o};return i.node(e),i.result()}}var{hasOwnProperty:Yo}=Object.prototype,Jo=function(){};function Qo(e){return"function"==typeof e?e:Jo}function Ko(e,t){return function(r,n,o){r.type===t&&e.call(this,r,n,o)}}function Zo(e,t){let r=t.structure,n=[];for(let e in r){if(!1===Yo.call(r,e))continue;let t=r[e],o={name:e,type:!1,nullable:!1};Array.isArray(t)||(t=[t]);for(let e of t)null===e?o.nullable=!0:"string"==typeof e?o.type="node":Array.isArray(e)&&(o.type="list");o.type&&n.push(o)}return n.length?{context:t.walkContext,fields:n}:null}function Xo(e,t){let r=e.fields.slice(),n=e.context,o="string"==typeof n;return t&&r.reverse(),function(e,i,s,a){let l;o&&(l=i[n],i[n]=e);for(let n of r){let r=e[n.name];if(!n.nullable||r)if("list"===n.type){if(t?r.reduceRight(a,!1):r.reduce(a,!1))return!0}else if(s(r))return!0}o&&(i[n]=l)}}function ei({StyleSheet:e,Atrule:t,Rule:r,Block:n,DeclarationList:o}){return{Atrule:{StyleSheet:e,Atrule:t,Rule:r,Block:n},Rule:{StyleSheet:e,Atrule:t,Rule:r,Block:n},Declaration:{StyleSheet:e,Atrule:t,Rule:r,Block:n,DeclarationList:o}}}function ti(e){let t=function(e){let t={};for(let r in e.node)if(Yo.call(e.node,r)){let n=e.node[r];if(!n.structure)throw new Error("Missed `structure` field in `"+r+"` node type definition");t[r]=Zo(0,n)}return t}(e),r={},n={},o=Symbol("break-walk"),i=Symbol("skip-node");for(let e in t)Yo.call(t,e)&&null!==t[e]&&(r[e]=Xo(t[e],!1),n[e]=Xo(t[e],!0));let s=ei(r),a=ei(n),l=function(e,l){function c(e,t,r){let n=u.call(m,e,t,r);return n===o||n!==i&&!!(d.hasOwnProperty(e.type)&&d[e.type](e,m,c,p)||h.call(m,e,t,r)===o)}let u=Jo,h=Jo,d=r,p=(e,t,r,n)=>e||c(t,r,n),m={break:o,skip:i,root:e,stylesheet:null,atrule:null,atrulePrelude:null,rule:null,selector:null,block:null,declaration:null,function:null};if("function"==typeof l)u=l;else if(l&&(u=Qo(l.enter),h=Qo(l.leave),l.reverse&&(d=n),l.visit)){if(s.hasOwnProperty(l.visit))d=l.reverse?a[l.visit]:s[l.visit];else if(!t.hasOwnProperty(l.visit))throw new Error("Bad value `"+l.visit+"` for `visit` option (should be: "+Object.keys(t).sort().join(", ")+")");u=Ko(u,l.visit),h=Ko(h,l.visit)}if(u===Jo&&h===Jo)throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");c(e)};return l.break=o,l.skip=i,l.find=function(e,t){let r=null;return l(e,(function(e,n,i){if(t.call(this,e,n,i))return r=e,o})),r},l.findLast=function(e,t){let r=null;return l(e,{reverse:!0,enter:function(e,n,i){if(t.call(this,e,n,i))return r=e,o}}),r},l.findAll=function(e,t){let r=[];return l(e,(function(e,n,o){t.call(this,e,n,o)&&r.push(e)})),r},l}function ri(e){return e}function ni(e,t,r,n){let o;switch(e.type){case"Group":o=function(e,t,r,n){let o=" "===e.combinator||n?e.combinator:" "+e.combinator+" ",i=e.terms.map((e=>ni(e,t,r,n))).join(o);return e.explicit||r?(n||","===i[0]?"[":"[ ")+i+(n?"]":" ]"):i}(e,t,r,n)+(e.disallowEmpty?"!":"");break;case"Multiplier":return ni(e.term,t,r,n)+t(function(e){let{min:t,max:r,comma:n}=e;return 0===t&&0===r?"*":0===t&&1===r?"?":1===t&&0===r?n?"#":"+":1===t&&1===r?"":(n?"#":"")+(t===r?"{"+t+"}":"{"+t+","+(0!==r?r:"")+"}")}(e),e);case"Type":o="<"+e.name+(e.opts?t(function(e){if("Range"===e.type)return" ["+(null===e.min?"-∞":e.min)+","+(null===e.max?"∞":e.max)+"]";throw new Error("Unknown node type `"+e.type+"`")}(e.opts),e.opts):"")+">";break;case"Property":o="<'"+e.name+"'>";break;case"Keyword":o=e.name;break;case"AtKeyword":o="@"+e.name;break;case"Function":o=e.name+"(";break;case"String":case"Token":o=e.value;break;case"Comma":o=",";break;default:throw new Error("Unknown node type `"+e.type+"`")}return t(o,e)}function oi(e,t){let r=ri,n=!1,o=!1;return"function"==typeof t?r=t:t&&(n=Boolean(t.forceBraces),o=Boolean(t.compact),"function"==typeof t.decorate&&(r=t.decorate)),ni(e,r,n,o)}var ii={offset:0,line:1,column:1};function si(e,t){let r=e&&e.loc&&e.loc[t];return r?"line"in r?ai(r):r:null}function ai({offset:e,line:t,column:r},n){let o={offset:e,line:t,column:r};if(n){let e=n.split(/\n|\r\n?|\f/);o.offset+=n.length,o.line+=e.length-1,o.column=1===e.length?o.column+n.length:e.pop().length+1}return o}var li=function(e,t){let r=So("SyntaxReferenceError",e+(t?" `"+t+"`":""));return r.reference=t,r},ci=function(e,t,r,n){let o=So("SyntaxMatchError",e),{css:i,mismatchOffset:s,mismatchLength:a,start:l,end:c}=function(e,t){let r,n,o=e.tokens,i=e.longestMatch,s=i<o.length&&o[i].node||null,a=s!==t?s:null,l=0,c=0,u=0,h="";for(let e=0;e<o.length;e++){let t=o[e].value;e===i&&(c=t.length,l=h.length),null!==a&&o[e].node===a&&(e<=i?u++:u=0),h+=t}return i===o.length||u>1?(r=si(a||t,"end")||ai(ii,h),n=ai(r)):(r=si(a,"start")||ai(si(t,"start")||ii,h.slice(0,l)),n=si(a,"end")||ai(r,h.substr(l,c))),{css:h,mismatchOffset:l,mismatchLength:c,start:r,end:n}}(n,r);return o.rawMessage=e,o.syntax=t?oi(t):"<generic>",o.css=i,o.mismatchOffset=s,o.mismatchLength=a,o.message=e+"\n syntax: "+o.syntax+"\n value: "+(i||"<empty string>")+"\n --------"+new Array(o.mismatchOffset+1).join("-")+"^",Object.assign(o,l),o.loc={source:r&&r.loc&&r.loc.source||"<unknown>",start:l,end:c},o},ui=new Map,hi=new Map,di=function(e){if(ui.has(e))return ui.get(e);let t=e.toLowerCase(),r=ui.get(t);if(void 0===r){let e=fi(t,0),n=e?"":gi(t,0);r=Object.freeze({basename:t.substr(n.length),name:t,prefix:n,vendor:n,custom:e})}return ui.set(e,r),r},pi=function(e){if(hi.has(e))return hi.get(e);let t=e,r=e[0];"/"===r?r="/"===e[1]?"//":"/":"_"!==r&&"*"!==r&&"$"!==r&&"#"!==r&&"+"!==r&&"&"!==r&&(r="");let n=fi(t,r.length);if(!n&&(t=t.toLowerCase(),hi.has(t))){let r=hi.get(t);return hi.set(e,r),r}let o=n?"":gi(t,r.length),i=t.substr(0,r.length+o.length),s=Object.freeze({basename:t.substr(i.length),name:t.substr(r.length),hack:r,vendor:o,prefix:i,custom:n});return hi.set(e,s),s},mi=gi;function fi(e,t){return t=t||0,e.length-t>=2&&45===e.charCodeAt(t)&&45===e.charCodeAt(t+1)}function gi(e,t){if(t=t||0,e.length-t>=3&&45===e.charCodeAt(t)&&45!==e.charCodeAt(t+1)){let r=e.indexOf("-",t+2);if(-1!==r)return e.substring(t,r+1)}return""}var yi=45,bi=!0;function ki(e,t){return null!==e&&9===e.type&&e.value.charCodeAt(0)===t}function vi(e,t,r){for(;null!==e&&(13===e.type||25===e.type);)e=r(++t);return t}function wi(e,t,r,n){if(!e)return 0;let o=e.value.charCodeAt(t);if(43===o||o===yi){if(r)return 0;t++}for(;t<e.value.length;t++)if(!jn(e.value.charCodeAt(t)))return 0;return n+1}function xi(e,t,r){let n=!1,o=vi(e,t,r);if(null===(e=r(o)))return t;if(10!==e.type){if(!ki(e,43)&&!ki(e,yi))return t;if(n=!0,o=vi(r(++o),o,r),null===(e=r(o))||10!==e.type)return 0}if(!n){let t=e.value.charCodeAt(0);if(43!==t&&t!==yi)return 0}return wi(e,n?0:1,n,o)}function Ei(e,t){return null!==e&&9===e.type&&e.value.charCodeAt(0)===t}function Ai(e,t,r){let n=0;for(let o=t;o<e.value.length;o++){let i=e.value.charCodeAt(o);if(45===i&&r&&0!==n)return Ai(e,t+n+1,!1),6;if(!Hn(i)||++n>6)return 0}return n}function Si(e,t,r){if(!e)return 0;for(;Ei(r(t),63);){if(++e>6)return 0;t++}return t}var Ti=["unset","initial","inherit"],Ci=["calc(","-moz-calc(","-webkit-calc("],Ri=new Map([[2,22],[21,22],[19,20],[23,24]]);function _i(e,t){return t<e.length?e.charCodeAt(t):0}function Ii(e,t){return so(e,0,e.length,t)}function Li(e,t){for(let r=0;r<t.length;r++)if(Ii(e,t[r]))return!0;return!1}function Ni(e,t){return t===e.length-2&&(92===_i(e,t)&&jn(_i(e,t+1)))}function zi(e,t,r){if(e&&"Range"===e.type){let n=Number(void 0!==r&&r!==t.length?t.substr(0,r):t);if(isNaN(n)||null!==e.min&&n<e.min||null!==e.max&&n>e.max)return!0}return!1}function Pi(e,t){let r=0,n=[],o=0;e:do{switch(e.type){case 24:case 22:case 20:if(e.type!==r)break e;if(r=n.pop(),0===n.length){o++;break e}break;case 2:case 21:case 19:case 23:n.push(r),r=Ri.get(e.type)}o++}while(e=t(o));return o}function Mi(e){return function(t,r,n){return null===t?0:2===t.type&&Li(t.value,Ci)?Pi(t,r):e(t,r,n)}}function Oi(e){return function(t){return null===t||t.type!==e?0:1}}function Ui(e){return e&&(e=new Set(e)),function(t,r,n){if(null===t||12!==t.type)return 0;let o=ho(t.value,0);if(null!==e){let r=t.value.indexOf("\\",o),n=-1!==r&&Ni(t.value,r)?t.value.substring(o,r):t.value.substr(o);if(!1===e.has(n.toLowerCase()))return 0}return zi(n,t.value,o)?0:1}}function Di(e){return"function"!=typeof e&&(e=function(){return 0}),function(t,r,n){return null!==t&&10===t.type&&0===Number(t.value)?1:e(t,r,n)}}var Fi={"ident-token":Oi(1),"function-token":Oi(2),"at-keyword-token":Oi(3),"hash-token":Oi(4),"string-token":Oi(5),"bad-string-token":Oi(6),"url-token":Oi(7),"bad-url-token":Oi(8),"delim-token":Oi(9),"number-token":Oi(10),"percentage-token":Oi(11),"dimension-token":Oi(12),"whitespace-token":Oi(13),"CDO-token":Oi(14),"CDC-token":Oi(15),"colon-token":Oi(16),"semicolon-token":Oi(17),"comma-token":Oi(18),"[-token":Oi(19),"]-token":Oi(20),"(-token":Oi(21),")-token":Oi(22),"{-token":Oi(23),"}-token":Oi(24),string:Oi(5),ident:Oi(1),"custom-ident":function(e){if(null===e||1!==e.type)return 0;let t=e.value.toLowerCase();return Li(t,Ti)||Ii(t,"default")?0:1},"custom-property-name":function(e){return null===e||1!==e.type||45!==_i(e.value,0)||45!==_i(e.value,1)?0:1},"hex-color":function(e){if(null===e||4!==e.type)return 0;let t=e.value.length;if(4!==t&&5!==t&&7!==t&&9!==t)return 0;for(let r=1;r<t;r++)if(!Hn(_i(e.value,r)))return 0;return 1},"id-selector":function(e){return null!==e&&4===e.type&&Kn(_i(e.value,1),_i(e.value,2),_i(e.value,3))?1:0},"an-plus-b":function(e,t){let r=0;if(!e)return 0;if(10===e.type)return wi(e,0,false,r);if(1===e.type&&e.value.charCodeAt(0)===yi){if(!io(e.value,1,110))return 0;switch(e.value.length){case 2:return xi(t(++r),r,t);case 3:return e.value.charCodeAt(2)!==yi?0:(r=vi(t(++r),r,t),wi(e=t(r),0,bi,r));default:return e.value.charCodeAt(2)!==yi?0:wi(e,3,bi,r)}}else if(1===e.type||ki(e,43)&&1===t(r+1).type){if(1!==e.type&&(e=t(++r)),null===e||!io(e.value,0,110))return 0;switch(e.value.length){case 1:return xi(t(++r),r,t);case 2:return e.value.charCodeAt(1)!==yi?0:(r=vi(t(++r),r,t),wi(e=t(r),0,bi,r));default:return e.value.charCodeAt(1)!==yi?0:wi(e,2,bi,r)}}else if(12===e.type){let n=e.value.charCodeAt(0),o=43===n||n===yi?1:0,i=o;for(;i<e.value.length&&jn(e.value.charCodeAt(i));i++);return i!==o&&io(e.value,i,110)?i+1===e.value.length?xi(t(++r),r,t):e.value.charCodeAt(i+1)!==yi?0:i+2===e.value.length?(r=vi(t(++r),r,t),wi(e=t(r),0,bi,r)):wi(e,i+2,bi,r):0}return 0},urange:function(e,t){let r=0;if(null===e||1!==e.type||!io(e.value,0,117)||null===(e=t(++r)))return 0;if(Ei(e,43))return null===(e=t(++r))?0:1===e.type?Si(Ai(e,0,!0),++r,t):Ei(e,63)?Si(1,++r,t):0;if(10===e.type){let n=Ai(e,1,!0);return 0===n?0:null===(e=t(++r))?r:12===e.type||10===e.type?function(e,t){return e.value.charCodeAt(0)===t}(e,45)&&Ai(e,1,!1)?r+1:0:Si(n,r,t)}return 12===e.type?Si(Ai(e,1,!0),++r,t):0},"declaration-value":function(e,t){if(!e)return 0;let r=0,n=[],o=0;e:do{switch(e.type){case 6:case 8:break e;case 24:case 22:case 20:if(e.type!==r)break e;r=n.pop();break;case 17:if(0===r)break e;break;case 9:if(0===r&&"!"===e.value)break e;break;case 2:case 21:case 19:case 23:n.push(r),r=Ri.get(e.type)}o++}while(e=t(o));return o},"any-value":function(e,t){if(!e)return 0;let r=0,n=[],o=0;e:do{switch(e.type){case 6:case 8:break e;case 24:case 22:case 20:if(e.type!==r)break e;r=n.pop();break;case 2:case 21:case 19:case 23:n.push(r),r=Ri.get(e.type)}o++}while(e=t(o));return o},dimension:Mi(Ui(null)),angle:Mi(Ui(["deg","grad","rad","turn"])),decibel:Mi(Ui(["db"])),frequency:Mi(Ui(["hz","khz"])),flex:Mi(Ui(["fr"])),length:Mi(Di(Ui(["px","mm","cm","in","pt","pc","q","em","ex","ch","rem","vh","vw","vmin","vmax","vm"]))),resolution:Mi(Ui(["dpi","dpcm","dppx","x"])),semitones:Mi(Ui(["st"])),time:Mi(Ui(["s","ms"])),percentage:Mi((function(e,t,r){return null===e||11!==e.type||zi(r,e.value,e.value.length-1)?0:1})),zero:Di(),number:Mi((function(e,t,r){if(null===e)return 0;let n=ho(e.value,0);return n!==e.value.length&&!Ni(e.value,n)||zi(r,e.value,n)?0:1})),integer:Mi((function(e,t,r){if(null===e||10!==e.type)return 0;let n=43===_i(e.value,0)||45===_i(e.value,0)?1:0;for(;n<e.value.length;n++)if(!jn(_i(e.value,n)))return 0;return zi(r,e.value,n)?0:1})),"-ms-legacy-expression":function(e){return e+="(",function(t,r){return null!==t&&Ii(t.value,e)?Pi(t,r):0}}("expression")},qi={};function Bi(e,t,r){return Object.assign(So("SyntaxError",e),{input:t,offset:r,rawMessage:e,message:e+"\n "+t+"\n--"+new Array((r||t.length)+1).join("-")+"^"})}ln(qi,{SyntaxError:()=>Bi,generate:()=>oi,parse:()=>rs,walk:()=>is});var ji=123,Hi=new Uint8Array(128).map(((e,t)=>/[a-zA-Z0-9\-]/.test(String.fromCharCode(t))?1:0)),Vi={" ":1,"&&":2,"||":3,"|":4};function Wi(e){return e.substringToPos(e.findWsEnd(e.pos))}function $i(e){let t=e.pos;for(;t<e.str.length;t++){let r=e.str.charCodeAt(t);if(r>=128||0===Hi[r])break}return e.pos===t&&e.error("Expect a keyword"),e.substringToPos(t)}function Gi(e){let t=e.pos;for(;t<e.str.length;t++){let r=e.str.charCodeAt(t);if(r<48||r>57)break}return e.pos===t&&e.error("Expect a number"),e.substringToPos(t)}function Yi(e){let t=e.str.indexOf("'",e.pos+1);return-1===t&&(e.pos=e.str.length,e.error("Expect an apostrophe")),e.substringToPos(t+1)}function Ji(e){let t=null,r=null;return e.eat(ji),t=Gi(e),44===e.charCode()?(e.pos++,125!==e.charCode()&&(r=Gi(e))):r=t,e.eat(125),{min:Number(t),max:r?Number(r):0}}function Qi(e,t){let r=function(e){let t=null,r=!1;switch(e.charCode()){case 42:e.pos++,t={min:0,max:0};break;case 43:e.pos++,t={min:1,max:0};break;case 63:e.pos++,t={min:0,max:1};break;case 35:e.pos++,r=!0,t=e.charCode()===ji?Ji(e):{min:1,max:0};break;case ji:t=Ji(e);break;default:return null}return{type:"Multiplier",comma:r,min:t.min,max:t.max,term:null}}(e);return null!==r?(r.term=t,r):t}function Ki(e){let t=e.peek();return""===t?null:{type:"Token",value:t}}function Zi(e){let t,r=null;return e.eat(60),t=$i(e),40===e.charCode()&&41===e.nextCharCode()&&(e.pos+=2,t+="()"),91===e.charCodeAt(e.findWsEnd(e.pos))&&(Wi(e),r=function(e){let t=null,r=null,n=1;return e.eat(91),45===e.charCode()&&(e.peek(),n=-1),-1==n&&8734===e.charCode()?e.peek():t=n*Number(Gi(e)),Wi(e),e.eat(44),Wi(e),8734===e.charCode()?e.peek():(n=1,45===e.charCode()&&(e.peek(),n=-1),r=n*Number(Gi(e))),e.eat(93),null===t&&null===r?null:{type:"Range",min:t,max:r}}(e)),e.eat(62),Qi(e,{type:"Type",name:t,opts:r})}function Xi(e,t){function r(e,t){return{type:"Group",terms:e,combinator:t,disallowEmpty:!1,explicit:!1}}let n;for(t=Object.keys(t).sort(((e,t)=>Vi[e]-Vi[t]));t.length>0;){n=t.shift();let o=0,i=0;for(;o<e.length;o++){let t=e[o];"Combinator"===t.type&&(t.value===n?(-1===i&&(i=o-1),e.splice(o,1),o--):(-1!==i&&o-i>1&&(e.splice(i,o-i,r(e.slice(i,o),n)),o=i+1),i=-1))}-1!==i&&t.length&&e.splice(i,o-i,r(e.slice(i,o),n))}return n}function es(e){let t,r=[],n={},o=null,i=e.pos;for(;t=ts(e);)"Spaces"!==t.type&&("Combinator"===t.type?((null===o||"Combinator"===o.type)&&(e.pos=i,e.error("Unexpected combinator")),n[t.value]=!0):null!==o&&"Combinator"!==o.type&&(n[" "]=!0,r.push({type:"Combinator",value:" "})),r.push(t),o=t,i=e.pos);return null!==o&&"Combinator"===o.type&&(e.pos-=i,e.error("Unexpected combinator")),{type:"Group",terms:r,combinator:Xi(r,n)||" ",disallowEmpty:!1,explicit:!1}}function ts(e){let t=e.charCode();if(t<128&&1===Hi[t])return function(e){let t=$i(e);return 40===e.charCode()?(e.pos++,{type:"Function",name:t}):Qi(e,{type:"Keyword",name:t})}(e);switch(t){case 93:break;case 91:return Qi(e,function(e){let t;return e.eat(91),t=es(e),e.eat(93),t.explicit=!0,33===e.charCode()&&(e.pos++,t.disallowEmpty=!0),t}(e));case 60:return 39===e.nextCharCode()?function(e){let t;return e.eat(60),e.eat(39),t=$i(e),e.eat(39),e.eat(62),Qi(e,{type:"Property",name:t})}(e):Zi(e);case 124:return{type:"Combinator",value:e.substringToPos(e.pos+(124===e.nextCharCode()?2:1))};case 38:return e.pos++,e.eat(38),{type:"Combinator",value:"&&"};case 44:return e.pos++,{type:"Comma"};case 39:return Qi(e,{type:"String",value:Yi(e)});case 32:case 9:case 10:case 13:case 12:return{type:"Spaces",value:Wi(e)};case 64:return t=e.nextCharCode(),t<128&&1===Hi[t]?(e.pos++,{type:"AtKeyword",name:$i(e)}):Ki(e);case 42:case 43:case 63:case 35:case 33:break;case ji:if(t=e.nextCharCode(),t<48||t>57)return Ki(e);break;default:return Ki(e)}}function rs(e){let t=new class{constructor(e){this.str=e,this.pos=0}charCodeAt(e){return e<this.str.length?this.str.charCodeAt(e):0}charCode(){return this.charCodeAt(this.pos)}nextCharCode(){return this.charCodeAt(this.pos+1)}nextNonWsCode(e){return this.charCodeAt(this.findWsEnd(e))}findWsEnd(e){for(;e<this.str.length;e++){let t=this.str.charCodeAt(e);if(13!==t&&10!==t&&12!==t&&32!==t&&9!==t)break}return e}substringToPos(e){return this.str.substring(this.pos,this.pos=e)}eat(e){this.charCode()!==e&&this.error("Expect `"+String.fromCharCode(e)+"`"),this.pos++}peek(){return this.pos<this.str.length?this.str.charAt(this.pos++):""}error(e){throw new Bi(e,this.str,this.pos)}}(e),r=es(t);return t.pos!==e.length&&t.error("Unexpected input"),1===r.terms.length&&"Group"===r.terms[0].type?r.terms[0]:r}var ns=function(){};function os(e){return"function"==typeof e?e:ns}function is(e,t,r){let n=ns,o=ns;if("function"==typeof t?n=t:t&&(n=os(t.enter),o=os(t.leave)),n===ns&&o===ns)throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");!function e(t){switch(n.call(r,t),t.type){case"Group":t.terms.forEach(e);break;case"Multiplier":e(t.term);break;case"Type":case"Property":case"Keyword":case"AtKeyword":case"Function":case"String":case"Token":case"Comma":break;default:throw new Error("Unknown type: "+t.type)}o.call(r,t)}(e)}var ss={decorator:function(e){let t=[],r=null;return{...e,node(t){let n=r;r=t,e.node.call(this,t),r=n},emit(e,n,o){t.push({type:n,value:e,node:o?null:r})},result:()=>t}}};function as(e,t){return"string"==typeof e?function(e){let t=[];return xo(e,((r,n,o)=>t.push({type:r,value:e.slice(n,o),node:null}))),t}(e):t.generate(e,ss)}var ls={type:"Match"},cs={type:"Mismatch"},us={type:"DisallowEmpty"};function hs(e,t,r){return t===ls&&r===cs||e===ls&&t===ls&&r===ls?e:("If"===e.type&&e.else===cs&&t===ls&&(t=e.then,e=e.match),{type:"If",match:e,then:t,else:r})}function ds(e){return e.length>2&&40===e.charCodeAt(e.length-2)&&41===e.charCodeAt(e.length-1)}function ps(e){return"Keyword"===e.type||"AtKeyword"===e.type||"Function"===e.type||"Type"===e.type&&ds(e.name)}function ms(e,t,r){switch(e){case" ":{let e=ls;for(let r=t.length-1;r>=0;r--){e=hs(t[r],e,cs)}return e}case"|":{let e=cs,r=null;for(let n=t.length-1;n>=0;n--){let o=t[n];if(ps(o)&&(null===r&&n>0&&ps(t[n-1])&&(r=Object.create(null),e=hs({type:"Enum",map:r},ls,e)),null!==r)){let e=(ds(o.name)?o.name.slice(0,-1):o.name).toLowerCase();if(!(e in r)){r[e]=o;continue}}r=null,e=hs(o,ls,e)}return e}case"&&":{if(t.length>5)return{type:"MatchOnce",terms:t,all:!0};let r=cs;for(let n=t.length-1;n>=0;n--){let o,i=t[n];o=t.length>1?ms(e,t.filter((function(e){return e!==i})),!1):ls,r=hs(i,o,r)}return r}case"||":{if(t.length>5)return{type:"MatchOnce",terms:t,all:!1};let n=r?ls:cs;for(let r=t.length-1;r>=0;r--){let o,i=t[r];o=t.length>1?ms(e,t.filter((function(e){return e!==i})),!0):ls,n=hs(i,o,n)}return n}}}function fs(e){if("function"==typeof e)return{type:"Generic",fn:e};switch(e.type){case"Group":{let t=ms(e.combinator,e.terms.map(fs),!1);return e.disallowEmpty&&(t=hs(t,us,cs)),t}case"Multiplier":return function(e){let t=ls,r=fs(e.term);if(0===e.max)r=hs(r,us,cs),t=hs(r,null,cs),t.then=hs(ls,ls,t),e.comma&&(t.then.else=hs({type:"Comma",syntax:e},t,cs));else for(let n=e.min||1;n<=e.max;n++)e.comma&&t!==ls&&(t=hs({type:"Comma",syntax:e},t,cs)),t=hs(r,hs(ls,ls,t),cs);if(0===e.min)t=hs(ls,ls,t);else for(let n=0;n<e.min-1;n++)e.comma&&t!==ls&&(t=hs({type:"Comma",syntax:e},t,cs)),t=hs(r,t,cs);return t}(e);case"Type":case"Property":return{type:e.type,name:e.name,syntax:e};case"Keyword":return{type:e.type,name:e.name.toLowerCase(),syntax:e};case"AtKeyword":return{type:e.type,name:"@"+e.name.toLowerCase(),syntax:e};case"Function":return{type:e.type,name:e.name.toLowerCase()+"(",syntax:e};case"String":return 3===e.value.length?{type:"Token",value:e.value.charAt(1),syntax:e}:{type:e.type,value:e.value.substr(1,e.value.length-2).replace(/\\'/g,"'"),syntax:e};case"Token":return{type:e.type,value:e.value,syntax:e};case"Comma":return{type:e.type,syntax:e};default:throw new Error("Unknown node type:",e.type)}}function gs(e,t){return"string"==typeof e&&(e=rs(e)),{type:"MatchGraph",match:fs(e),syntax:t||null,source:e}}var{hasOwnProperty:ys}=Object.prototype,bs="Match";function ks(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++){let n=t.charCodeAt(r),o=e.charCodeAt(r);if(o>=65&&o<=90&&(o|=32),o!==n)return!1}return!0}function vs(e){return null===e||(18===e.type||2===e.type||21===e.type||19===e.type||23===e.type||function(e){return 9===e.type&&"?"!==e.value}(e))}function ws(e){return null===e||(22===e.type||20===e.type||24===e.type||9===e.type)}function xs(e,t,r){let n=function(e,t,r){function n(){do{y++,g=y<e.length?e[y]:null}while(null!==g&&(13===g.type||25===g.type))}function o(t){let r=y+t;return r<e.length?e[r]:null}function i(e,t){return{nextState:e,matchStack:k,syntaxStack:u,thenStack:h,tokenIndex:y,prev:t}}function s(e){h={nextState:e,matchStack:k,syntaxStack:u,prev:h}}function a(e){d=i(e,d)}function l(){k={type:1,syntax:t.syntax,token:g,prev:k},n(),p=null,y>b&&(b=y)}function c(){k=2===k.type?k.prev:{type:3,syntax:u.syntax,token:k.token,prev:k},u=u.prev}let u=null,h=null,d=null,p=null,m=0,f=null,g=null,y=-1,b=0,k={type:0,syntax:null,token:null,prev:null};for(n();null===f&&++m<15e3;)switch(t.type){case"Match":if(null===h){if(null!==g&&(y!==e.length-1||"\\0"!==g.value&&"\\9"!==g.value)){t=cs;break}f=bs;break}if((t=h.nextState)===us){if(h.matchStack===k){t=cs;break}t=ls}for(;h.syntaxStack!==u;)c();h=h.prev;break;case"Mismatch":if(null!==p&&!1!==p)(null===d||y>d.tokenIndex)&&(d=p,p=!1);else if(null===d){f="Mismatch";break}t=d.nextState,h=d.thenStack,u=d.syntaxStack,k=d.matchStack,y=d.tokenIndex,g=y<e.length?e[y]:null,d=d.prev;break;case"MatchGraph":t=t.match;break;case"If":t.else!==cs&&a(t.else),t.then!==ls&&s(t.then),t=t.match;break;case"MatchOnce":t={type:"MatchOnceBuffer",syntax:t,index:0,mask:0};break;case"MatchOnceBuffer":{let e=t.syntax.terms;if(t.index===e.length){if(0===t.mask||t.syntax.all){t=cs;break}t=ls;break}if(t.mask===(1<<e.length)-1){t=ls;break}for(;t.index<e.length;t.index++){let r=1<<t.index;if(0==(t.mask&r)){a(t),s({type:"AddMatchOnce",syntax:t.syntax,mask:t.mask|r}),t=e[t.index++];break}}break}case"AddMatchOnce":t={type:"MatchOnceBuffer",syntax:t.syntax,index:0,mask:t.mask};break;case"Enum":if(null!==g){let e=g.value.toLowerCase();if(-1!==e.indexOf("\\")&&(e=e.replace(/\\[09].*$/,"")),ys.call(t.map,e)){t=t.map[e];break}}t=cs;break;case"Generic":{let e=null!==u?u.opts:null,r=y+Math.floor(t.fn(g,o,e));if(!isNaN(r)&&r>y){for(;y<r;)l();t=ls}else t=cs;break}case"Type":case"Property":{let e="Type"===t.type?"types":"properties",n=ys.call(r,e)?r[e][t.name]:null;if(!n||!n.match)throw new Error("Bad syntax reference: "+("Type"===t.type?"<"+t.name+">":"<'"+t.name+"'>"));if(!1!==p&&null!==g&&"Type"===t.type&&("custom-ident"===t.name&&1===g.type||"length"===t.name&&"0"===g.value)){null===p&&(p=i(t,d)),t=cs;break}u={syntax:t.syntax,opts:t.syntax.opts||null!==u&&u.opts||null,prev:u},k={type:2,syntax:t.syntax,token:k.token,prev:k},t=n.match;break}case"Keyword":{let e=t.name;if(null!==g){let r=g.value;if(-1!==r.indexOf("\\")&&(r=r.replace(/\\[09].*$/,"")),ks(r,e)){l(),t=ls;break}}t=cs;break}case"AtKeyword":case"Function":if(null!==g&&ks(g.value,t.name)){l(),t=ls;break}t=cs;break;case"Token":if(null!==g&&g.value===t.value){l(),t=ls;break}t=cs;break;case"Comma":null!==g&&18===g.type?vs(k.token)?t=cs:(l(),t=ws(g)?cs:ls):t=vs(k.token)||ws(g)?ls:cs;break;case"String":let n="",m=y;for(;m<e.length&&n.length<t.value.length;m++)n+=e[m].value;if(ks(n,t.value)){for(;y<m;)l();t=ls}else t=cs;break;default:throw new Error("Unknown node type: "+t.type)}switch(f){case null:console.warn("[csstree-match] BREAK after 15000 iterations"),f="Maximum iteration number exceeded (please fill an issue on https://github.com/csstree/csstree/issues)",k=null;break;case bs:for(;null!==u;)c();break;default:k=null}return{tokens:e,reason:f,iterations:m,match:k,longestMatch:b}}(e,t,r||{});if(null===n.match)return n;let o=n.match,i=n.match={syntax:t.syntax||null,match:[]},s=[i];for(o=function(e){let t=null,r=null,n=e;for(;null!==n;)r=n.prev,n.prev=t,t=n,n=r;return t}(o).prev;null!==o;){switch(o.type){case 2:i.match.push(i={syntax:o.syntax,match:[]}),s.push(i);break;case 3:s.pop(),i=s[s.length-1];break;default:i.match.push({syntax:o.syntax||null,token:o.token.value,node:o.token.node})}o=o.prev}return n}var Es={};function As(e){function t(e){return null!==e&&("Type"===e.type||"Property"===e.type||"Keyword"===e.type)}let r=null;return null!==this.matched&&function n(o){if(Array.isArray(o.match)){for(let e=0;e<o.match.length;e++)if(n(o.match[e]))return t(o.syntax)&&r.unshift(o.syntax),!0}else if(o.node===e)return r=t(o.syntax)?[o.syntax]:[],!0;return!1}(this.matched),r}function Ss(e,t){return Rs(this,e,(e=>"Type"===e.type&&e.name===t))}function Ts(e,t){return Rs(this,e,(e=>"Property"===e.type&&e.name===t))}function Cs(e){return Rs(this,e,(e=>"Keyword"===e.type))}function Rs(e,t,r){let n=As.call(e,t);return null!==n&&n.some(r)}function _s(e){return"node"in e?e.node:_s(e.match[0])}function Is(e){return"node"in e?e.node:Is(e.match[e.match.length-1])}function Ls(e,t,r,n,o){let i=[];return null!==r.matched&&function r(s){if(null!==s.syntax&&s.syntax.type===n&&s.syntax.name===o){let r=_s(s),n=Is(s);e.syntax.walk(t,(function(e,t,o){if(e===r){let e=new Ao;do{if(e.appendData(t.data),t.data===n)break;t=t.next}while(null!==t);i.push({parent:o,nodes:e})}}))}Array.isArray(s.match)&&s.match.forEach(r)}(r.matched),i}ln(Es,{getTrace:()=>As,isKeyword:()=>Cs,isProperty:()=>Ts,isType:()=>Ss});var{hasOwnProperty:Ns}=Object.prototype;function zs(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e&&e>=0}function Ps(e){return Boolean(e)&&zs(e.offset)&&zs(e.line)&&zs(e.column)}function Ms(e,t){return function(r,n){if(!r||r.constructor!==Object)return n(r,"Type of node should be an Object");for(let o in r){let i=!0;if(!1!==Ns.call(r,o)){if("type"===o)r.type!==e&&n(r,"Wrong node type `"+r.type+"`, expected `"+e+"`");else if("loc"===o){if(null===r.loc)continue;if(r.loc&&r.loc.constructor===Object)if("string"!=typeof r.loc.source)o+=".source";else if(Ps(r.loc.start)){if(Ps(r.loc.end))continue;o+=".end"}else o+=".start";i=!1}else if(t.hasOwnProperty(o)){i=!1;for(let e=0;!i&&e<t[o].length;e++){let n=t[o][e];switch(n){case String:i="string"==typeof r[o];break;case Boolean:i="boolean"==typeof r[o];break;case null:i=null===r[o];break;default:"string"==typeof n?i=r[o]&&r[o].type===n:Array.isArray(n)&&(i=r[o]instanceof Ao)}}}else n(r,"Unknown field `"+o+"` for "+e+" node type");i||n(r,"Bad value for `"+e+"."+o+"`")}}for(let o in t)Ns.call(t,o)&&!1===Ns.call(r,o)&&n(r,"Field `"+e+"."+o+"` is missed")}}function Os(e,t){let r=t.structure,n={type:String,loc:!0},o={type:'"'+e+'"'};for(let t in r){if(!1===Ns.call(r,t))continue;let i=[],s=n[t]=Array.isArray(r[t])?r[t].slice():[r[t]];for(let r=0;r<s.length;r++){let n=s[r];if(n===String||n===Boolean)i.push(n.name);else if(null===n)i.push("null");else if("string"==typeof n)i.push("<"+n+">");else{if(!Array.isArray(n))throw new Error("Wrong value `"+n+"` in `"+e+"."+t+"` structure definition");i.push("List")}}o[t]=i.join(" | ")}return{docs:o,check:Ms(e,n)}}var Us=gs("inherit | initial | unset"),Ds=gs("inherit | initial | unset | <-ms-legacy-expression>");function Fs(e,t,r){let n={};for(let o in e)e[o].syntax&&(n[o]=r?e[o].syntax:oi(e[o].syntax,{compact:t}));return n}function qs(e,t,r){let n={};for(let[o,i]of Object.entries(e))n[o]={prelude:i.prelude&&(r?i.prelude.syntax:oi(i.prelude.syntax,{compact:t})),descriptors:i.descriptors&&Fs(i.descriptors,t,r)};return n}function Bs(e,t,r){return{matched:e,iterations:r,error:t,...Es}}function js(e,t,r,n){let o,i=as(r,e.syntax);return function(e){for(let t=0;t<e.length;t++)if("var("===e[t].value.toLowerCase())return!0;return!1}(i)?Bs(null,new Error("Matching for a tree with var() is not supported")):(n&&(o=xs(i,e.valueCommonSyntax,e)),n&&o.match||(o=xs(i,t.match,e),o.match)?Bs(o.match,null,o.iterations):Bs(null,new ci(o.reason,t.syntax,r,o),o.iterations))}var Hs=class{constructor(e,t,r){if(this.valueCommonSyntax=Us,this.syntax=t,this.generic=!1,this.atrules=Object.create(null),this.properties=Object.create(null),this.types=Object.create(null),this.structure=r||function(e){let t={};if(e.node)for(let r in e.node)if(Ns.call(e.node,r)){let n=e.node[r];if(!n.structure)throw new Error("Missed `structure` field in `"+r+"` node type definition");t[r]=Os(r,n)}return t}(e),e){if(e.types)for(let t in e.types)this.addType_(t,e.types[t]);if(e.generic){this.generic=!0;for(let e in Fi)this.addType_(e,Fi[e])}if(e.atrules)for(let t in e.atrules)this.addAtrule_(t,e.atrules[t]);if(e.properties)for(let t in e.properties)this.addProperty_(t,e.properties[t])}}checkStructure(e){function t(e,t){n.push({node:e,message:t})}let r=this.structure,n=[];return this.syntax.walk(e,(function(e){r.hasOwnProperty(e.type)?r[e.type].check(e,t):t(e,"Unknown node type `"+e.type+"`")})),!!n.length&&n}createDescriptor(e,t,r,n=null){let o={type:t,name:r},i={type:t,name:r,parent:n,serializable:"string"==typeof e||e&&"string"==typeof e.type,syntax:null,match:null};return"function"==typeof e?i.match=gs(e,o):("string"==typeof e?Object.defineProperty(i,"syntax",{get:()=>(Object.defineProperty(i,"syntax",{value:rs(e)}),i.syntax)}):i.syntax=e,Object.defineProperty(i,"match",{get:()=>(Object.defineProperty(i,"match",{value:gs(i.syntax,o)}),i.match)})),i}addAtrule_(e,t){!t||(this.atrules[e]={type:"Atrule",name:e,prelude:t.prelude?this.createDescriptor(t.prelude,"AtrulePrelude",e):null,descriptors:t.descriptors?Object.keys(t.descriptors).reduce(((r,n)=>(r[n]=this.createDescriptor(t.descriptors[n],"AtruleDescriptor",n,e),r)),Object.create(null)):null})}addProperty_(e,t){!t||(this.properties[e]=this.createDescriptor(t,"Property",e))}addType_(e,t){!t||(this.types[e]=this.createDescriptor(t,"Type",e),t===Fi["-ms-legacy-expression"]&&(this.valueCommonSyntax=Ds))}checkAtruleName(e){if(!this.getAtrule(e))return new li("Unknown at-rule","@"+e)}checkAtrulePrelude(e,t){let r=this.checkAtruleName(e);if(r)return r;let n=this.getAtrule(e);return!n.prelude&&t?new SyntaxError("At-rule `@"+e+"` should not contain a prelude"):n.prelude&&!t?new SyntaxError("At-rule `@"+e+"` should contain a prelude"):void 0}checkAtruleDescriptorName(e,t){let r=this.checkAtruleName(e);if(r)return r;let n=this.getAtrule(e),o=di(t);return n.descriptors?n.descriptors[o.name]||n.descriptors[o.basename]?void 0:new li("Unknown at-rule descriptor",t):new SyntaxError("At-rule `@"+e+"` has no known descriptors")}checkPropertyName(e){if(!this.getProperty(e))return new li("Unknown property",e)}matchAtrulePrelude(e,t){let r=this.checkAtrulePrelude(e,t);return r?Bs(null,r):t?js(this,this.getAtrule(e).prelude,t,!1):Bs(null,null)}matchAtruleDescriptor(e,t,r){let n=this.checkAtruleDescriptorName(e,t);if(n)return Bs(null,n);let o=this.getAtrule(e),i=di(t);return js(this,o.descriptors[i.name]||o.descriptors[i.basename],r,!1)}matchDeclaration(e){return"Declaration"!==e.type?Bs(null,new Error("Not a Declaration node")):this.matchProperty(e.property,e.value)}matchProperty(e,t){if(pi(e).custom)return Bs(null,new Error("Lexer matching doesn't applicable for custom properties"));let r=this.checkPropertyName(e);return r?Bs(null,r):js(this,this.getProperty(e),t,!0)}matchType(e,t){let r=this.getType(e);return r?js(this,r,t,!1):Bs(null,new li("Unknown type",e))}match(e,t){return"string"==typeof e||e&&e.type?(("string"==typeof e||!e.match)&&(e=this.createDescriptor(e,"Type","anonymous")),js(this,e,t,!1)):Bs(null,new li("Bad syntax"))}findValueFragments(e,t,r,n){return Ls(this,t,this.matchProperty(e,t),r,n)}findDeclarationValueFragments(e,t,r){return Ls(this,e.value,this.matchDeclaration(e),t,r)}findAllFragments(e,t,r){let n=[];return this.syntax.walk(e,{visit:"Declaration",enter:e=>{n.push.apply(n,this.findDeclarationValueFragments(e,t,r))}}),n}getAtrule(e,t=!0){let r=di(e);return(r.vendor&&t?this.atrules[r.name]||this.atrules[r.basename]:this.atrules[r.name])||null}getAtrulePrelude(e,t=!0){let r=this.getAtrule(e,t);return r&&r.prelude||null}getAtruleDescriptor(e,t){return this.atrules.hasOwnProperty(e)&&this.atrules.declarators&&this.atrules[e].declarators[t]||null}getProperty(e,t=!0){let r=pi(e);return(r.vendor&&t?this.properties[r.name]||this.properties[r.basename]:this.properties[r.name])||null}getType(e){return hasOwnProperty.call(this.types,e)?this.types[e]:null}validate(){function e(n,o,i,s){if(i.has(o))return i.get(o);i.set(o,!1),null!==s.syntax&&is(s.syntax,(function(s){if("Type"!==s.type&&"Property"!==s.type)return;let a="Type"===s.type?n.types:n.properties,l="Type"===s.type?t:r;(!hasOwnProperty.call(a,s.name)||e(n,s.name,l,a[s.name]))&&i.set(o,!0)}),this)}let t=new Map,r=new Map;for(let r in this.types)e(this,r,t,this.types[r]);for(let t in this.properties)e(this,t,r,this.properties[t]);return t=[...t.keys()].filter((e=>t.get(e))),r=[...r.keys()].filter((e=>r.get(e))),t.length||r.length?{types:t,properties:r}:null}dump(e,t){return{generic:this.generic,types:Fs(this.types,!t,e),properties:Fs(this.properties,!t,e),atrules:qs(this.atrules,!t,e)}}toString(){return JSON.stringify(this.dump())}},{hasOwnProperty:Vs}=Object.prototype,Ws={generic:!0,types:Js,atrules:{prelude:Qs,descriptors:Qs},properties:Js,parseContext:function(e,t){return Object.assign(e,t)},scope:function e(t,r){for(let n in r)Vs.call(r,n)&&($s(t[n])?e(t[n],Gs(r[n])):t[n]=Gs(r[n]));return t},atrule:["parse"],pseudo:["parse"],node:["name","structure","parse","generate","walkContext"]};function $s(e){return e&&e.constructor===Object}function Gs(e){return $s(e)?{...e}:e}function Ys(e,t){return"string"==typeof t&&/^\s*\|/.test(t)?"string"==typeof e?e+t:t.replace(/^\s*\|\s*/,""):t||null}function Js(e,t){if("string"==typeof t)return Ys(e,t);let r={...e};for(let n in t)Vs.call(t,n)&&(r[n]=Ys(Vs.call(e,n)?e[n]:void 0,t[n]));return r}function Qs(e,t){let r=Js(e,t);return!$s(r)||Object.keys(r).length?r:null}function Ks(e,t,r){for(let n in r)if(!1!==Vs.call(r,n))if(!0===r[n])n in t&&Vs.call(t,n)&&(e[n]=Gs(t[n]));else if(r[n])if("function"==typeof r[n]){let o=r[n];e[n]=o({},e[n]),e[n]=o(e[n]||{},t[n])}else if($s(r[n])){let o={};for(let t in e[n])o[t]=Ks({},e[n][t],r[n]);for(let e in t[n])o[e]=Ks(o[e]||{},t[n][e],r[n]);e[n]=o}else if(Array.isArray(r[n])){let o={},i=r[n].reduce((function(e,t){return e[t]=!0,e}),{});for(let[t,r]of Object.entries(e[n]||{}))o[t]={},r&&Ks(o[t],r,i);for(let e in t[n])Vs.call(t[n],e)&&(o[e]||(o[e]={}),t[n]&&t[n][e]&&Ks(o[e],t[n][e],i));e[n]=o}return e}var Zs=(e,t)=>Ks(e,t,Ws);function Xs(e){let t=zo(e),r=ti(e),n=Go(e),{fromPlainObject:o,toPlainObject:i}=function(e){return{fromPlainObject:function(t){return e(t,{enter:function(e){e.children&&!(e.children instanceof Ao)&&(e.children=(new Ao).fromArray(e.children))}}),t},toPlainObject:function(t){return e(t,{leave:function(e){e.children&&e.children instanceof Ao&&(e.children=e.children.toArray())}}),t}}}(r),s={lexer:null,createLexer:e=>new Hs(e,s,s.lexer.structure),tokenize:xo,parse:t,generate:n,walk:r,find:r.find,findLast:r.findLast,findAll:r.findAll,fromPlainObject:o,toPlainObject:i,fork(t){let r=Zs({},e);return Xs("function"==typeof t?t(r,Object.assign):Zs(r,t))}};return s.lexer=new Hs({generic:!0,types:e.types,atrules:e.atrules,properties:e.properties,node:e.node},s),s}var ea=e=>Xs(Zs({},e)),ta={};ln(ta,{AnPlusB:()=>ra,Atrule:()=>fa,AtrulePrelude:()=>Ea,AttributeSelector:()=>_a,Block:()=>Oa,Brackets:()=>$a,CDC:()=>Ka,CDO:()=>rl,ClassSelector:()=>al,Combinator:()=>dl,Comment:()=>yl,Declaration:()=>xl,DeclarationList:()=>zl,Dimension:()=>Fl,Function:()=>Vl,Hash:()=>Ql,IdSelector:()=>ac,Identifier:()=>rc,MediaFeature:()=>dc,MediaQuery:()=>yc,MediaQueryList:()=>xc,Nth:()=>Cc,Number:()=>Nc,Operator:()=>Uc,Parentheses:()=>jc,Percentage:()=>Gc,PseudoClassSelector:()=>Zc,PseudoElementSelector:()=>ou,Ratio:()=>uu,Raw:()=>gu,Rule:()=>xu,Selector:()=>Iu,SelectorList:()=>Mu,String:()=>Bu,StyleSheet:()=>Ju,TypeSelector:()=>rh,UnicodeRange:()=>lh,Url:()=>yh,Value:()=>Sh,WhiteSpace:()=>Ih});var ra={};ln(ra,{generate:()=>ma,name:()=>ha,parse:()=>pa,structure:()=>da});var na=43,oa=45,ia=110,sa=!0;function aa(e,t){let r=this.tokenStart+e,n=this.charCodeAt(r);for((n===na||n===oa)&&(t&&this.error("Number sign is not allowed"),r++);r<this.tokenEnd;r++)jn(this.charCodeAt(r))||this.error("Integer is expected",r)}function la(e){return aa.call(this,0,e)}function ca(e,t){if(!this.cmpChar(this.tokenStart+e,t)){let r="";switch(t){case ia:r="N is expected";break;case oa:r="HyphenMinus is expected"}this.error(r,this.tokenStart+e)}}function ua(){let e=0,t=0,r=this.tokenType;for(;13===r||25===r;)r=this.lookupType(++e);if(10!==r){if(!this.isDelim(na,e)&&!this.isDelim(oa,e))return null;t=this.isDelim(na,e)?na:oa;do{r=this.lookupType(++e)}while(13===r||25===r);10!==r&&(this.skip(e),la.call(this,sa))}return e>0&&this.skip(e),0===t&&(r=this.charCodeAt(this.tokenStart),r!==na&&r!==oa&&this.error("Number sign is expected")),la.call(this,0!==t),t===oa?"-"+this.consume(10):this.consume(10)}var ha="AnPlusB",da={a:[String,null],b:[String,null]};function pa(){let e=this.tokenStart,t=null,r=null;if(10===this.tokenType)la.call(this,false),r=this.consume(10);else if(1===this.tokenType&&this.cmpChar(this.tokenStart,oa))switch(t="-1",ca.call(this,1,ia),this.tokenEnd-this.tokenStart){case 2:this.next(),r=ua.call(this);break;case 3:ca.call(this,2,oa),this.next(),this.skipSC(),la.call(this,sa),r="-"+this.consume(10);break;default:ca.call(this,2,oa),aa.call(this,3,sa),this.next(),r=this.substrToCursor(e+2)}else if(1===this.tokenType||this.isDelim(na)&&1===this.lookupType(1)){let n=0;switch(t="1",this.isDelim(na)&&(n=1,this.next()),ca.call(this,0,ia),this.tokenEnd-this.tokenStart){case 1:this.next(),r=ua.call(this);break;case 2:ca.call(this,1,oa),this.next(),this.skipSC(),la.call(this,sa),r="-"+this.consume(10);break;default:ca.call(this,1,oa),aa.call(this,2,sa),this.next(),r=this.substrToCursor(e+n+1)}}else if(12===this.tokenType){let n=this.charCodeAt(this.tokenStart),o=n===na||n===oa,i=this.tokenStart+o;for(;i<this.tokenEnd&&jn(this.charCodeAt(i));i++);i===this.tokenStart+o&&this.error("Integer is expected",this.tokenStart+o),ca.call(this,i-this.tokenStart,ia),t=this.substring(e,i),i+1===this.tokenEnd?(this.next(),r=ua.call(this)):(ca.call(this,i-this.tokenStart+1,oa),i+2===this.tokenEnd?(this.next(),this.skipSC(),la.call(this,sa),r="-"+this.consume(10)):(aa.call(this,i-this.tokenStart+2,sa),this.next(),r=this.substrToCursor(i+1)))}else this.error();return null!==t&&t.charCodeAt(0)===na&&(t=t.substr(1)),null!==r&&r.charCodeAt(0)===na&&(r=r.substr(1)),{type:"AnPlusB",loc:this.getLocation(e,this.tokenStart),a:t,b:r}}function ma(e){if(e.a){let t=("+1"===e.a||"1"===e.a?"n":"-1"===e.a&&"-n")||e.a+"n";if(e.b){let r="-"===e.b[0]||"+"===e.b[0]?e.b:"+"+e.b;this.tokenize(t+r)}else this.tokenize(t)}else this.tokenize(e.b)}var fa={};function ga(e){return this.Raw(e,this.consumeUntilLeftCurlyBracketOrSemicolon,!0)}function ya(){for(let e,t=1;e=this.lookupType(t);t++){if(24===e)return!0;if(23===e||3===e)return!1}return!1}ln(fa,{generate:()=>xa,name:()=>ba,parse:()=>wa,structure:()=>va,walkContext:()=>ka});var ba="Atrule",ka="atrule",va={name:String,prelude:["AtrulePrelude","Raw",null],block:["Block",null]};function wa(){let e,t,r=this.tokenStart,n=null,o=null;switch(this.eat(3),e=this.substrToCursor(r+1),t=e.toLowerCase(),this.skipSC(),!1===this.eof&&23!==this.tokenType&&17!==this.tokenType&&(n=this.parseAtrulePrelude?this.parseWithFallback(this.AtrulePrelude.bind(this,e),ga):ga.call(this,this.tokenIndex),this.skipSC()),this.tokenType){case 17:this.next();break;case 23:o=hasOwnProperty.call(this.atrule,t)&&"function"==typeof this.atrule[t].block?this.atrule[t].block.call(this):this.Block(ya.call(this))}return{type:"Atrule",loc:this.getLocation(r,this.tokenStart),name:e,prelude:n,block:o}}function xa(e){this.token(3,"@"+e.name),null!==e.prelude&&this.node(e.prelude),e.block?this.node(e.block):this.token(17,";")}var Ea={};ln(Ea,{generate:()=>Ra,name:()=>Aa,parse:()=>Ca,structure:()=>Ta,walkContext:()=>Sa});var Aa="AtrulePrelude",Sa="atrulePrelude",Ta={children:[[]]};function Ca(e){let t=null;return null!==e&&(e=e.toLowerCase()),this.skipSC(),t=hasOwnProperty.call(this.atrule,e)&&"function"==typeof this.atrule[e].prelude?this.atrule[e].prelude.call(this):this.readSequence(this.scope.AtrulePrelude),this.skipSC(),!0!==this.eof&&23!==this.tokenType&&17!==this.tokenType&&this.error("Semicolon or block is expected"),{type:"AtrulePrelude",loc:this.getLocationFromList(t),children:t}}function Ra(e){this.children(e)}var _a={};ln(_a,{generate:()=>Ma,name:()=>Na,parse:()=>Pa,structure:()=>za});function Ia(){this.eof&&this.error("Unexpected end of input");let e=this.tokenStart,t=!1;return this.isDelim(42)?(t=!0,this.next()):this.isDelim(124)||this.eat(1),this.isDelim(124)?61!==this.charCodeAt(this.tokenStart+1)?(this.next(),this.eat(1)):t&&this.error("Identifier is expected",this.tokenEnd):t&&this.error("Vertical line is expected"),{type:"Identifier",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e)}}function La(){let e=this.tokenStart,t=this.charCodeAt(e);return 61!==t&&126!==t&&94!==t&&36!==t&&42!==t&&124!==t&&this.error("Attribute selector (=, ~=, ^=, $=, *=, |=) is expected"),this.next(),61!==t&&(this.isDelim(61)||this.error("Equal sign is expected"),this.next()),this.substrToCursor(e)}var Na="AttributeSelector",za={name:"Identifier",matcher:[String,null],value:["String","Identifier",null],flags:[String,null]};function Pa(){let e,t=this.tokenStart,r=null,n=null,o=null;return this.eat(19),this.skipSC(),e=Ia.call(this),this.skipSC(),20!==this.tokenType&&(1!==this.tokenType&&(r=La.call(this),this.skipSC(),n=5===this.tokenType?this.String():this.Identifier(),this.skipSC()),1===this.tokenType&&(o=this.consume(1),this.skipSC())),this.eat(20),{type:"AttributeSelector",loc:this.getLocation(t,this.tokenStart),name:e,matcher:r,value:n,flags:o}}function Ma(e){this.token(9,"["),this.node(e.name),null!==e.matcher&&(this.tokenize(e.matcher),this.node(e.value)),null!==e.flags&&this.token(1,e.flags),this.token(9,"]")}var Oa={};function Ua(e){return this.Raw(e,null,!0)}function Da(){return this.parseWithFallback(this.Rule,Ua)}function Fa(e){return this.Raw(e,this.consumeUntilSemicolonIncluded,!0)}function qa(){if(17===this.tokenType)return Fa.call(this,this.tokenIndex);let e=this.parseWithFallback(this.Declaration,Fa);return 17===this.tokenType&&this.next(),e}ln(Oa,{generate:()=>Wa,name:()=>Ba,parse:()=>Va,structure:()=>Ha,walkContext:()=>ja});var Ba="Block",ja="block",Ha={children:[["Atrule","Rule","Declaration"]]};function Va(e){let t=e?qa:Da,r=this.tokenStart,n=this.createList();this.eat(23);e:for(;!this.eof;)switch(this.tokenType){case 24:break e;case 13:case 25:this.next();break;case 3:n.push(this.parseWithFallback(this.Atrule,Ua));break;default:n.push(t.call(this))}return this.eof||this.eat(24),{type:"Block",loc:this.getLocation(r,this.tokenStart),children:n}}function Wa(e){this.token(23,"{"),this.children(e,(e=>{"Declaration"===e.type&&this.token(17,";")})),this.token(24,"}")}var $a={};ln($a,{generate:()=>Qa,name:()=>Ga,parse:()=>Ja,structure:()=>Ya});var Ga="Brackets",Ya={children:[[]]};function Ja(e,t){let r=this.tokenStart,n=null;return this.eat(19),n=e.call(this,t),this.eof||this.eat(20),{type:"Brackets",loc:this.getLocation(r,this.tokenStart),children:n}}function Qa(e){this.token(9,"["),this.children(e),this.token(9,"]")}var Ka={};ln(Ka,{generate:()=>tl,name:()=>Za,parse:()=>el,structure:()=>Xa});var Za="CDC",Xa=[];function el(){let e=this.tokenStart;return this.eat(15),{type:"CDC",loc:this.getLocation(e,this.tokenStart)}}function tl(){this.token(15,"--\x3e")}var rl={};ln(rl,{generate:()=>sl,name:()=>nl,parse:()=>il,structure:()=>ol});var nl="CDO",ol=[];function il(){let e=this.tokenStart;return this.eat(14),{type:"CDO",loc:this.getLocation(e,this.tokenStart)}}function sl(){this.token(14,"\x3c!--")}var al={};ln(al,{generate:()=>hl,name:()=>ll,parse:()=>ul,structure:()=>cl});var ll="ClassSelector",cl={name:String};function ul(){return this.eatDelim(46),{type:"ClassSelector",loc:this.getLocation(this.tokenStart-1,this.tokenEnd),name:this.consume(1)}}function hl(e){this.token(9,"."),this.token(1,e.name)}var dl={};ln(dl,{generate:()=>gl,name:()=>pl,parse:()=>fl,structure:()=>ml});var pl="Combinator",ml={name:String};function fl(){let e,t=this.tokenStart;switch(this.tokenType){case 13:e=" ";break;case 9:switch(this.charCodeAt(this.tokenStart)){case 62:case 43:case 126:this.next();break;case 47:this.next(),this.eatIdent("deep"),this.eatDelim(47);break;default:this.error("Combinator is expected")}e=this.substrToCursor(t)}return{type:"Combinator",loc:this.getLocation(t,this.tokenStart),name:e}}function gl(e){this.tokenize(e.name)}var yl={};ln(yl,{generate:()=>wl,name:()=>bl,parse:()=>vl,structure:()=>kl});var bl="Comment",kl={value:String};function vl(){let e=this.tokenStart,t=this.tokenEnd;return this.eat(25),t-e+2>=2&&42===this.charCodeAt(t-2)&&47===this.charCodeAt(t-1)&&(t-=2),{type:"Comment",loc:this.getLocation(e,this.tokenStart),value:this.substring(e+2,t)}}function wl(e){this.token(25,"/*"+e.value+"*/")}var xl={};ln(xl,{generate:()=>Il,name:()=>Tl,parse:()=>_l,structure:()=>Rl,walkContext:()=>Cl});function El(e){return this.Raw(e,this.consumeUntilExclamationMarkOrSemicolon,!0)}function Al(e){return this.Raw(e,this.consumeUntilExclamationMarkOrSemicolon,!1)}function Sl(){let e=this.tokenIndex,t=this.Value();return"Raw"!==t.type&&!1===this.eof&&17!==this.tokenType&&!1===this.isDelim(33)&&!1===this.isBalanceEdge(e)&&this.error(),t}var Tl="Declaration",Cl="declaration",Rl={important:[Boolean,String],property:String,value:["Value","Raw"]};function _l(){let e,t=this.tokenStart,r=this.tokenIndex,n=Ll.call(this),o=fi(n),i=o?this.parseCustomProperty:this.parseValue,s=o?Al:El,a=!1;this.skipSC(),this.eat(16);let l=this.tokenIndex;if(o||this.skipSC(),e=i?this.parseWithFallback(Sl,s):s.call(this,this.tokenIndex),o&&"Value"===e.type&&e.children.isEmpty)for(let t=l-this.tokenIndex;t<=0;t++)if(13===this.lookupType(t)){e.children.appendData({type:"WhiteSpace",loc:null,value:" "});break}return this.isDelim(33)&&(a=Nl.call(this),this.skipSC()),!1===this.eof&&17!==this.tokenType&&!1===this.isBalanceEdge(r)&&this.error(),{type:"Declaration",loc:this.getLocation(t,this.tokenStart),important:a,property:n,value:e}}function Il(e){this.token(1,e.property),this.token(16,":"),this.node(e.value),e.important&&(this.token(9,"!"),this.token(1,!0===e.important?"important":e.important))}function Ll(){let e=this.tokenStart;if(9===this.tokenType)switch(this.charCodeAt(this.tokenStart)){case 42:case 36:case 43:case 35:case 38:this.next();break;case 47:this.next(),this.isDelim(47)&&this.next()}return 4===this.tokenType?this.eat(4):this.eat(1),this.substrToCursor(e)}function Nl(){this.eat(9),this.skipSC();let e=this.consume(1);return"important"===e||e}var zl={};function Pl(e){return this.Raw(e,this.consumeUntilSemicolonIncluded,!0)}ln(zl,{generate:()=>Dl,name:()=>Ml,parse:()=>Ul,structure:()=>Ol});var Ml="DeclarationList",Ol={children:[["Declaration"]]};function Ul(){let e=this.createList();for(;!this.eof;)switch(this.tokenType){case 13:case 25:case 17:this.next();break;default:e.push(this.parseWithFallback(this.Declaration,Pl))}return{type:"DeclarationList",loc:this.getLocationFromList(e),children:e}}function Dl(e){this.children(e,(e=>{"Declaration"===e.type&&this.token(17,";")}))}var Fl={};ln(Fl,{generate:()=>Hl,name:()=>ql,parse:()=>jl,structure:()=>Bl});var ql="Dimension",Bl={value:String,unit:String};function jl(){let e=this.tokenStart,t=this.consumeNumber(12);return{type:"Dimension",loc:this.getLocation(e,this.tokenStart),value:t,unit:this.substring(e+t.length,this.tokenStart)}}function Hl(e){this.token(12,e.value+e.unit)}var Vl={};ln(Vl,{generate:()=>Jl,name:()=>Wl,parse:()=>Yl,structure:()=>Gl,walkContext:()=>$l});var Wl="Function",$l="function",Gl={name:String,children:[[]]};function Yl(e,t){let r,n=this.tokenStart,o=this.consumeFunctionName(),i=o.toLowerCase();return r=t.hasOwnProperty(i)?t[i].call(this,t):e.call(this,t),this.eof||this.eat(22),{type:"Function",loc:this.getLocation(n,this.tokenStart),name:o,children:r}}function Jl(e){this.token(2,e.name+"("),this.children(e),this.token(22,")")}var Ql={};ln(Ql,{generate:()=>tc,name:()=>Zl,parse:()=>ec,structure:()=>Xl,xxx:()=>Kl});var Kl="XXX",Zl="Hash",Xl={value:String};function ec(){let e=this.tokenStart;return this.eat(4),{type:"Hash",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e+1)}}function tc(e){this.token(4,"#"+e.value)}var rc={};ln(rc,{generate:()=>sc,name:()=>nc,parse:()=>ic,structure:()=>oc});var nc="Identifier",oc={name:String};function ic(){return{type:"Identifier",loc:this.getLocation(this.tokenStart,this.tokenEnd),name:this.consume(1)}}function sc(e){this.token(1,e.name)}var ac={};ln(ac,{generate:()=>hc,name:()=>lc,parse:()=>uc,structure:()=>cc});var lc="IdSelector",cc={name:String};function uc(){let e=this.tokenStart;return this.eat(4),{type:"IdSelector",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e+1)}}function hc(e){this.token(9,"#"+e.name)}var dc={};ln(dc,{generate:()=>gc,name:()=>pc,parse:()=>fc,structure:()=>mc});var pc="MediaFeature",mc={name:String,value:["Identifier","Number","Dimension","Ratio",null]};function fc(){let e,t=this.tokenStart,r=null;if(this.eat(21),this.skipSC(),e=this.consume(1),this.skipSC(),22!==this.tokenType){switch(this.eat(16),this.skipSC(),this.tokenType){case 10:r=9===this.lookupNonWSType(1)?this.Ratio():this.Number();break;case 12:r=this.Dimension();break;case 1:r=this.Identifier();break;default:this.error("Number, dimension, ratio or identifier is expected")}this.skipSC()}return this.eat(22),{type:"MediaFeature",loc:this.getLocation(t,this.tokenStart),name:e,value:r}}function gc(e){this.token(21,"("),this.token(1,e.name),null!==e.value&&(this.token(16,":"),this.node(e.value)),this.token(22,")")}var yc={};ln(yc,{generate:()=>wc,name:()=>bc,parse:()=>vc,structure:()=>kc});var bc="MediaQuery",kc={children:[["Identifier","MediaFeature","WhiteSpace"]]};function vc(){let e=this.createList(),t=null;this.skipSC();e:for(;!this.eof;){switch(this.tokenType){case 25:case 13:this.next();continue;case 1:t=this.Identifier();break;case 21:t=this.MediaFeature();break;default:break e}e.push(t)}return null===t&&this.error("Identifier or parenthesis is expected"),{type:"MediaQuery",loc:this.getLocationFromList(e),children:e}}function wc(e){this.children(e)}var xc={};ln(xc,{generate:()=>Tc,name:()=>Ec,parse:()=>Sc,structure:()=>Ac});var Ec="MediaQueryList",Ac={children:[["MediaQuery"]]};function Sc(){let e=this.createList();for(this.skipSC();!this.eof&&(e.push(this.MediaQuery()),18===this.tokenType);)this.next();return{type:"MediaQueryList",loc:this.getLocationFromList(e),children:e}}function Tc(e){this.children(e,(()=>this.token(18,",")))}var Cc={};ln(Cc,{generate:()=>Lc,name:()=>Rc,parse:()=>Ic,structure:()=>_c});var Rc="Nth",_c={nth:["AnPlusB","Identifier"],selector:["SelectorList",null]};function Ic(){this.skipSC();let e,t=this.tokenStart,r=t,n=null;return e=this.lookupValue(0,"odd")||this.lookupValue(0,"even")?this.Identifier():this.AnPlusB(),r=this.tokenStart,this.skipSC(),this.lookupValue(0,"of")&&(this.next(),n=this.SelectorList(),r=this.tokenStart),{type:"Nth",loc:this.getLocation(t,r),nth:e,selector:n}}function Lc(e){this.node(e.nth),null!==e.selector&&(this.token(1,"of"),this.node(e.selector))}var Nc={};ln(Nc,{generate:()=>Oc,name:()=>zc,parse:()=>Mc,structure:()=>Pc});var zc="Number",Pc={value:String};function Mc(){return{type:"Number",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consume(10)}}function Oc(e){this.token(10,e.value)}var Uc={};ln(Uc,{generate:()=>Bc,name:()=>Dc,parse:()=>qc,structure:()=>Fc});var Dc="Operator",Fc={value:String};function qc(){let e=this.tokenStart;return this.next(),{type:"Operator",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e)}}function Bc(e){this.tokenize(e.value)}var jc={};ln(jc,{generate:()=>$c,name:()=>Hc,parse:()=>Wc,structure:()=>Vc});var Hc="Parentheses",Vc={children:[[]]};function Wc(e,t){let r=this.tokenStart,n=null;return this.eat(21),n=e.call(this,t),this.eof||this.eat(22),{type:"Parentheses",loc:this.getLocation(r,this.tokenStart),children:n}}function $c(e){this.token(21,"("),this.children(e),this.token(22,")")}var Gc={};ln(Gc,{generate:()=>Kc,name:()=>Yc,parse:()=>Qc,structure:()=>Jc});var Yc="Percentage",Jc={value:String};function Qc(){return{type:"Percentage",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consumeNumber(11)}}function Kc(e){this.token(11,e.value+"%")}var Zc={};ln(Zc,{generate:()=>nu,name:()=>Xc,parse:()=>ru,structure:()=>tu,walkContext:()=>eu});var Xc="PseudoClassSelector",eu="function",tu={name:String,children:[["Raw"],null]};function ru(){let e,t,r=this.tokenStart,n=null;return this.eat(16),2===this.tokenType?(e=this.consumeFunctionName(),t=e.toLowerCase(),hasOwnProperty.call(this.pseudo,t)?(this.skipSC(),n=this.pseudo[t].call(this),this.skipSC()):(n=this.createList(),n.push(this.Raw(this.tokenIndex,null,!1))),this.eat(22)):e=this.consume(1),{type:"PseudoClassSelector",loc:this.getLocation(r,this.tokenStart),name:e,children:n}}function nu(e){this.token(16,":"),null===e.children?this.token(1,e.name):(this.token(2,e.name+"("),this.children(e),this.token(22,")"))}var ou={};ln(ou,{generate:()=>cu,name:()=>iu,parse:()=>lu,structure:()=>au,walkContext:()=>su});var iu="PseudoElementSelector",su="function",au={name:String,children:[["Raw"],null]};function lu(){let e,t,r=this.tokenStart,n=null;return this.eat(16),this.eat(16),2===this.tokenType?(e=this.consumeFunctionName(),t=e.toLowerCase(),hasOwnProperty.call(this.pseudo,t)?(this.skipSC(),n=this.pseudo[t].call(this),this.skipSC()):(n=this.createList(),n.push(this.Raw(this.tokenIndex,null,!1))),this.eat(22)):e=this.consume(1),{type:"PseudoElementSelector",loc:this.getLocation(r,this.tokenStart),name:e,children:n}}function cu(e){this.token(16,":"),this.token(16,":"),null===e.children?this.token(1,e.name):(this.token(2,e.name+"("),this.children(e),this.token(22,")"))}var uu={};ln(uu,{generate:()=>fu,name:()=>du,parse:()=>mu,structure:()=>pu});function hu(){this.skipSC();let e=this.consume(10);for(let t=0;t<e.length;t++){let r=e.charCodeAt(t);!jn(r)&&46!==r&&this.error("Unsigned number is expected",this.tokenStart-e.length+t)}return 0===Number(e)&&this.error("Zero number is not allowed",this.tokenStart-e.length),e}var du="Ratio",pu={left:String,right:String};function mu(){let e,t=this.tokenStart,r=hu.call(this);return this.skipSC(),this.eatDelim(47),e=hu.call(this),{type:"Ratio",loc:this.getLocation(t,this.tokenStart),left:r,right:e}}function fu(e){this.token(10,e.left),this.token(9,"/"),this.token(10,e.right)}var gu={};function yu(){return this.tokenIndex>0&&13===this.lookupType(-1)?this.tokenIndex>1?this.getTokenStart(this.tokenIndex-1):this.firstCharOffset:this.tokenStart}ln(gu,{generate:()=>wu,name:()=>bu,parse:()=>vu,structure:()=>ku});var bu="Raw",ku={value:String};function vu(e,t,r){let n,o=this.getTokenStart(e);return this.skipUntilBalanced(e,t||this.consumeUntilBalanceEnd),n=r&&this.tokenStart>o?yu.call(this):this.tokenStart,{type:"Raw",loc:this.getLocation(o,n),value:this.substring(o,n)}}function wu(e){this.tokenize(e.value)}var xu={};function Eu(e){return this.Raw(e,this.consumeUntilLeftCurlyBracket,!0)}function Au(){let e=this.SelectorList();return"Raw"!==e.type&&!1===this.eof&&23!==this.tokenType&&this.error(),e}ln(xu,{generate:()=>_u,name:()=>Su,parse:()=>Ru,structure:()=>Cu,walkContext:()=>Tu});var Su="Rule",Tu="rule",Cu={prelude:["SelectorList","Raw"],block:["Block"]};function Ru(){let e,t,r=this.tokenIndex,n=this.tokenStart;return e=this.parseRulePrelude?this.parseWithFallback(Au,Eu):Eu.call(this,r),t=this.Block(!0),{type:"Rule",loc:this.getLocation(n,this.tokenStart),prelude:e,block:t}}function _u(e){this.node(e.prelude),this.node(e.block)}var Iu={};ln(Iu,{generate:()=>Pu,name:()=>Lu,parse:()=>zu,structure:()=>Nu});var Lu="Selector",Nu={children:[["TypeSelector","IdSelector","ClassSelector","AttributeSelector","PseudoClassSelector","PseudoElementSelector","Combinator","WhiteSpace"]]};function zu(){let e=this.readSequence(this.scope.Selector);return null===this.getFirstListNode(e)&&this.error("Selector is expected"),{type:"Selector",loc:this.getLocationFromList(e),children:e}}function Pu(e){this.children(e)}var Mu={};ln(Mu,{generate:()=>qu,name:()=>Ou,parse:()=>Fu,structure:()=>Du,walkContext:()=>Uu});var Ou="SelectorList",Uu="selector",Du={children:[["Selector","Raw"]]};function Fu(){let e=this.createList();for(;!this.eof&&(e.push(this.Selector()),18===this.tokenType);)this.next();return{type:"SelectorList",loc:this.getLocationFromList(e),children:e}}function qu(e){this.children(e,(()=>this.token(18,",")))}var Bu={};ln(Bu,{generate:()=>Yu,name:()=>Wu,parse:()=>Gu,structure:()=>$u});var ju={};ln(ju,{decode:()=>Hu,encode:()=>Vu});function Hu(e){let t=e.length,r=e.charCodeAt(0),n=34===r||39===r?1:0,o=1===n&&t>1&&e.charCodeAt(t-1)===r?t-2:t-1,i="";for(let r=n;r<=o;r++){let n=e.charCodeAt(r);if(92===n){if(r===o){r!==t-1&&(i=e.substr(r+1));break}if(n=e.charCodeAt(++r),Qn(92,n)){let t=r-1,n=co(e,t);r=n-1,i+=mo(e.substring(t+1,n))}else 13===n&&10===e.charCodeAt(r+1)&&r++}else i+=e[r]}return i}function Vu(e,t){let r=t?"'":'"',n=t?39:34,o="",i=!1;for(let t=0;t<e.length;t++){let r=e.charCodeAt(t);0!==r?r<=31||127===r?(o+="\\"+r.toString(16),i=!0):r===n||92===r?(o+="\\"+e.charAt(t),i=!1):(i&&(Hn(r)||Jn(r))&&(o+=" "),o+=e.charAt(t),i=!1):o+="�"}return r+o+r}var Wu="String",$u={value:String};function Gu(){return{type:"String",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:Hu(this.consume(5))}}function Yu(e){this.token(5,Vu(e.value))}var Ju={};ln(Ju,{generate:()=>th,name:()=>Ku,parse:()=>eh,structure:()=>Xu,walkContext:()=>Zu});function Qu(e){return this.Raw(e,null,!1)}var Ku="StyleSheet",Zu="stylesheet",Xu={children:[["Comment","CDO","CDC","Atrule","Rule","Raw"]]};function eh(){let e,t=this.tokenStart,r=this.createList();for(;!this.eof;){switch(this.tokenType){case 13:this.next();continue;case 25:if(33!==this.charCodeAt(this.tokenStart+2)){this.next();continue}e=this.Comment();break;case 14:e=this.CDO();break;case 15:e=this.CDC();break;case 3:e=this.parseWithFallback(this.Atrule,Qu);break;default:e=this.parseWithFallback(this.Rule,Qu)}r.push(e)}return{type:"StyleSheet",loc:this.getLocation(t,this.tokenStart),children:r}}function th(e){this.children(e)}var rh={};ln(rh,{generate:()=>ah,name:()=>oh,parse:()=>sh,structure:()=>ih});function nh(){1!==this.tokenType&&!1===this.isDelim(42)&&this.error("Identifier or asterisk is expected"),this.next()}var oh="TypeSelector",ih={name:String};function sh(){let e=this.tokenStart;return this.isDelim(124)?(this.next(),nh.call(this)):(nh.call(this),this.isDelim(124)&&(this.next(),nh.call(this))),{type:"TypeSelector",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e)}}function ah(e){this.tokenize(e.name)}var lh={};ln(lh,{generate:()=>gh,name:()=>ph,parse:()=>fh,structure:()=>mh});function ch(e,t){let r=0;for(let n=this.tokenStart+e;n<this.tokenEnd;n++){let o=this.charCodeAt(n);if(45===o&&t&&0!==r)return ch.call(this,e+r+1,!1),-1;Hn(o)||this.error(t&&0!==r?"Hyphen minus"+(r<6?" or hex digit":"")+" is expected":r<6?"Hex digit is expected":"Unexpected input",n),++r>6&&this.error("Too many hex digits",n)}return this.next(),r}function uh(e){let t=0;for(;this.isDelim(63);)++t>e&&this.error("Too many question marks"),this.next()}function hh(e){this.charCodeAt(this.tokenStart)!==e&&this.error((43===e?"Plus sign":"Hyphen minus")+" is expected")}function dh(){let e=0;switch(this.tokenType){case 10:if(e=ch.call(this,1,!0),this.isDelim(63)){uh.call(this,6-e);break}if(12===this.tokenType||10===this.tokenType){hh.call(this,45),ch.call(this,1,!1);break}break;case 12:e=ch.call(this,1,!0),e>0&&uh.call(this,6-e);break;default:if(this.eatDelim(43),1===this.tokenType){e=ch.call(this,0,!0),e>0&&uh.call(this,6-e);break}if(this.isDelim(63)){this.next(),uh.call(this,5);break}this.error("Hex digit or question mark is expected")}}var ph="UnicodeRange",mh={value:String};function fh(){let e=this.tokenStart;return this.eatIdent("u"),dh.call(this),{type:"UnicodeRange",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e)}}function gh(e){this.tokenize(e.value)}var yh={};ln(yh,{generate:()=>Ah,name:()=>wh,parse:()=>Eh,structure:()=>xh});var bh={};ln(bh,{decode:()=>kh,encode:()=>vh});function kh(e){let t=e.length,r=4,n=41===e.charCodeAt(t-1)?t-2:t-1,o="";for(;r<n&&Jn(e.charCodeAt(r));)r++;for(;r<n&&Jn(e.charCodeAt(n));)n--;for(let i=r;i<=n;i++){let r=e.charCodeAt(i);if(92===r){if(i===n){i!==t-1&&(o=e.substr(i+1));break}if(r=e.charCodeAt(++i),Qn(92,r)){let t=i-1,r=co(e,t);i=r-1,o+=mo(e.substring(t+1,r))}else 13===r&&10===e.charCodeAt(i+1)&&i++}else o+=e[i]}return o}function vh(e){let t="",r=!1;for(let n=0;n<e.length;n++){let o=e.charCodeAt(n);0!==o?o<=31||127===o?(t+="\\"+o.toString(16),r=!0):32===o||92===o||34===o||39===o||40===o||41===o?(t+="\\"+e.charAt(n),r=!1):(r&&Hn(o)&&(t+=" "),t+=e.charAt(n),r=!1):t+="�"}return"url("+t+")"}var wh="Url",xh={value:String};function Eh(){let e,t=this.tokenStart;switch(this.tokenType){case 7:e=kh(this.consume(7));break;case 2:this.cmpStr(this.tokenStart,this.tokenEnd,"url(")||this.error("Function name must be `url`"),this.eat(2),this.skipSC(),e=Hu(this.consume(5)),this.skipSC(),this.eof||this.eat(22);break;default:this.error("Url or Function is expected")}return{type:"Url",loc:this.getLocation(t,this.tokenStart),value:e}}function Ah(e){this.token(7,vh(e.value))}var Sh={};ln(Sh,{generate:()=>_h,name:()=>Th,parse:()=>Rh,structure:()=>Ch});var Th="Value",Ch={children:[[]]};function Rh(){let e=this.tokenStart,t=this.readSequence(this.scope.Value);return{type:"Value",loc:this.getLocation(e,this.tokenStart),children:t}}function _h(e){this.children(e)}var Ih={};ln(Ih,{generate:()=>Mh,name:()=>Nh,parse:()=>Ph,structure:()=>zh});var Lh=Object.freeze({type:"WhiteSpace",loc:null,value:" "}),Nh="WhiteSpace",zh={value:String};function Ph(){return this.eat(13),Lh}function Mh(e){this.token(13,e.value)}var Oh={generic:!0,generic:!0,types:{"absolute-size":"xx-small|x-small|small|medium|large|x-large|xx-large|xxx-large","alpha-value":"<number>|<percentage>","angle-percentage":"<angle>|<percentage>","angular-color-hint":"<angle-percentage>","angular-color-stop":"<color>&&<color-stop-angle>?","angular-color-stop-list":"[<angular-color-stop> [, <angular-color-hint>]?]# , <angular-color-stop>","animateable-feature":"scroll-position|contents|<custom-ident>",attachment:"scroll|fixed|local","attr()":"attr( <attr-name> <type-or-unit>? [, <attr-fallback>]? )","attr-matcher":"['~'|'|'|'^'|'$'|'*']? '='","attr-modifier":"i|s","attribute-selector":"'[' <wq-name> ']'|'[' <wq-name> <attr-matcher> [<string-token>|<ident-token>] <attr-modifier>? ']'","auto-repeat":"repeat( [auto-fill|auto-fit] , [<line-names>? <fixed-size>]+ <line-names>? )","auto-track-list":"[<line-names>? [<fixed-size>|<fixed-repeat>]]* <line-names>? <auto-repeat> [<line-names>? [<fixed-size>|<fixed-repeat>]]* <line-names>?","baseline-position":"[first|last]? baseline","basic-shape":"<inset()>|<circle()>|<ellipse()>|<polygon()>|<path()>","bg-image":"none|<image>","bg-layer":"<bg-image>||<bg-position> [/ <bg-size>]?||<repeat-style>||<attachment>||<box>||<box>","bg-position":"[[left|center|right|top|bottom|<length-percentage>]|[left|center|right|<length-percentage>] [top|center|bottom|<length-percentage>]|[center|[left|right] <length-percentage>?]&&[center|[top|bottom] <length-percentage>?]]","bg-size":"[<length-percentage>|auto]{1,2}|cover|contain","blur()":"blur( <length> )","blend-mode":"normal|multiply|screen|overlay|darken|lighten|color-dodge|color-burn|hard-light|soft-light|difference|exclusion|hue|saturation|color|luminosity",box:"border-box|padding-box|content-box","brightness()":"brightness( <number-percentage> )","calc()":"calc( <calc-sum> )","calc-sum":"<calc-product> [['+'|'-'] <calc-product>]*","calc-product":"<calc-value> ['*' <calc-value>|'/' <number>]*","calc-value":"<number>|<dimension>|<percentage>|( <calc-sum> )","cf-final-image":"<image>|<color>","cf-mixing-image":"<percentage>?&&<image>","circle()":"circle( [<shape-radius>]? [at <position>]? )","clamp()":"clamp( <calc-sum>#{3} )","class-selector":"'.' <ident-token>","clip-source":"<url>",color:"<rgb()>|<rgba()>|<hsl()>|<hsla()>|<hwb()>|<hex-color>|<named-color>|currentcolor|<deprecated-system-color>","color-stop":"<color-stop-length>|<color-stop-angle>","color-stop-angle":"<angle-percentage>{1,2}","color-stop-length":"<length-percentage>{1,2}","color-stop-list":"[<linear-color-stop> [, <linear-color-hint>]?]# , <linear-color-stop>",combinator:"'>'|'+'|'~'|['||']","common-lig-values":"[common-ligatures|no-common-ligatures]","compat-auto":"searchfield|textarea|push-button|slider-horizontal|checkbox|radio|square-button|menulist|listbox|meter|progress-bar|button","composite-style":"clear|copy|source-over|source-in|source-out|source-atop|destination-over|destination-in|destination-out|destination-atop|xor","compositing-operator":"add|subtract|intersect|exclude","compound-selector":"[<type-selector>? <subclass-selector>* [<pseudo-element-selector> <pseudo-class-selector>*]*]!","compound-selector-list":"<compound-selector>#","complex-selector":"<compound-selector> [<combinator>? <compound-selector>]*","complex-selector-list":"<complex-selector>#","conic-gradient()":"conic-gradient( [from <angle>]? [at <position>]? , <angular-color-stop-list> )","contextual-alt-values":"[contextual|no-contextual]","content-distribution":"space-between|space-around|space-evenly|stretch","content-list":"[<string>|contents|<image>|<counter>|<quote>|<target>|<leader()>]+","content-position":"center|start|end|flex-start|flex-end","content-replacement":"<image>","contrast()":"contrast( [<number-percentage>] )",counter:"<counter()>|<counters()>","counter()":"counter( <counter-name> , <counter-style>? )","counter-name":"<custom-ident>","counter-style":"<counter-style-name>|symbols( )","counter-style-name":"<custom-ident>","counters()":"counters( <counter-name> , <string> , <counter-style>? )","cross-fade()":"cross-fade( <cf-mixing-image> , <cf-final-image>? )","cubic-bezier-timing-function":"ease|ease-in|ease-out|ease-in-out|cubic-bezier( <number [0,1]> , <number> , <number [0,1]> , <number> )","deprecated-system-color":"ActiveBorder|ActiveCaption|AppWorkspace|Background|ButtonFace|ButtonHighlight|ButtonShadow|ButtonText|CaptionText|GrayText|Highlight|HighlightText|InactiveBorder|InactiveCaption|InactiveCaptionText|InfoBackground|InfoText|Menu|MenuText|Scrollbar|ThreeDDarkShadow|ThreeDFace|ThreeDHighlight|ThreeDLightShadow|ThreeDShadow|Window|WindowFrame|WindowText","discretionary-lig-values":"[discretionary-ligatures|no-discretionary-ligatures]","display-box":"contents|none","display-inside":"flow|flow-root|table|flex|grid|ruby","display-internal":"table-row-group|table-header-group|table-footer-group|table-row|table-cell|table-column-group|table-column|table-caption|ruby-base|ruby-text|ruby-base-container|ruby-text-container","display-legacy":"inline-block|inline-list-item|inline-table|inline-flex|inline-grid","display-listitem":"<display-outside>?&&[flow|flow-root]?&&list-item","display-outside":"block|inline|run-in","drop-shadow()":"drop-shadow( <length>{2,3} <color>? )","east-asian-variant-values":"[jis78|jis83|jis90|jis04|simplified|traditional]","east-asian-width-values":"[full-width|proportional-width]","element()":"element( <custom-ident> , [first|start|last|first-except]? )|element( <id-selector> )","ellipse()":"ellipse( [<shape-radius>{2}]? [at <position>]? )","ending-shape":"circle|ellipse","env()":"env( <custom-ident> , <declaration-value>? )","explicit-track-list":"[<line-names>? <track-size>]+ <line-names>?","family-name":"<string>|<custom-ident>+","feature-tag-value":"<string> [<integer>|on|off]?","feature-type":"@stylistic|@historical-forms|@styleset|@character-variant|@swash|@ornaments|@annotation","feature-value-block":"<feature-type> '{' <feature-value-declaration-list> '}'","feature-value-block-list":"<feature-value-block>+","feature-value-declaration":"<custom-ident> : <integer>+ ;","feature-value-declaration-list":"<feature-value-declaration>","feature-value-name":"<custom-ident>","fill-rule":"nonzero|evenodd","filter-function":"<blur()>|<brightness()>|<contrast()>|<drop-shadow()>|<grayscale()>|<hue-rotate()>|<invert()>|<opacity()>|<saturate()>|<sepia()>","filter-function-list":"[<filter-function>|<url>]+","final-bg-layer":"<'background-color'>||<bg-image>||<bg-position> [/ <bg-size>]?||<repeat-style>||<attachment>||<box>||<box>","fit-content()":"fit-content( [<length>|<percentage>] )","fixed-breadth":"<length-percentage>","fixed-repeat":"repeat( [<integer [1,∞]>] , [<line-names>? <fixed-size>]+ <line-names>? )","fixed-size":"<fixed-breadth>|minmax( <fixed-breadth> , <track-breadth> )|minmax( <inflexible-breadth> , <fixed-breadth> )","font-stretch-absolute":"normal|ultra-condensed|extra-condensed|condensed|semi-condensed|semi-expanded|expanded|extra-expanded|ultra-expanded|<percentage>","font-variant-css21":"[normal|small-caps]","font-weight-absolute":"normal|bold|<number [1,1000]>","frequency-percentage":"<frequency>|<percentage>","general-enclosed":"[<function-token> <any-value> )]|( <ident> <any-value> )","generic-family":"serif|sans-serif|cursive|fantasy|monospace|-apple-system","generic-name":"serif|sans-serif|cursive|fantasy|monospace","geometry-box":"<shape-box>|fill-box|stroke-box|view-box",gradient:"<linear-gradient()>|<repeating-linear-gradient()>|<radial-gradient()>|<repeating-radial-gradient()>|<conic-gradient()>|<-legacy-gradient>","grayscale()":"grayscale( <number-percentage> )","grid-line":"auto|<custom-ident>|[<integer>&&<custom-ident>?]|[span&&[<integer>||<custom-ident>]]","historical-lig-values":"[historical-ligatures|no-historical-ligatures]","hsl()":"hsl( <hue> <percentage> <percentage> [/ <alpha-value>]? )|hsl( <hue> , <percentage> , <percentage> , <alpha-value>? )","hsla()":"hsla( <hue> <percentage> <percentage> [/ <alpha-value>]? )|hsla( <hue> , <percentage> , <percentage> , <alpha-value>? )",hue:"<number>|<angle>","hue-rotate()":"hue-rotate( <angle> )","hwb()":"hwb( [<hue>|none] [<percentage>|none] [<percentage>|none] [/ [<alpha-value>|none]]? )",image:"<url>|<image()>|<image-set()>|<element()>|<paint()>|<cross-fade()>|<gradient>","image()":"image( <image-tags>? [<image-src>? , <color>?]! )","image-set()":"image-set( <image-set-option># )","image-set-option":"[<image>|<string>] [<resolution>||type( <string> )]","image-src":"<url>|<string>","image-tags":"ltr|rtl","inflexible-breadth":"<length>|<percentage>|min-content|max-content|auto","inset()":"inset( <length-percentage>{1,4} [round <'border-radius'>]? )","invert()":"invert( <number-percentage> )","keyframes-name":"<custom-ident>|<string>","keyframe-block":"<keyframe-selector># { <declaration-list> }","keyframe-block-list":"<keyframe-block>+","keyframe-selector":"from|to|<percentage>","layer()":"layer( <layer-name> )","leader()":"leader( <leader-type> )","leader-type":"dotted|solid|space|<string>","length-percentage":"<length>|<percentage>","line-names":"'[' <custom-ident>* ']'","line-name-list":"[<line-names>|<name-repeat>]+","line-style":"none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset","line-width":"<length>|thin|medium|thick","linear-color-hint":"<length-percentage>","linear-color-stop":"<color> <color-stop-length>?","linear-gradient()":"linear-gradient( [<angle>|to <side-or-corner>]? , <color-stop-list> )","mask-layer":"<mask-reference>||<position> [/ <bg-size>]?||<repeat-style>||<geometry-box>||[<geometry-box>|no-clip]||<compositing-operator>||<masking-mode>","mask-position":"[<length-percentage>|left|center|right] [<length-percentage>|top|center|bottom]?","mask-reference":"none|<image>|<mask-source>","mask-source":"<url>","masking-mode":"alpha|luminance|match-source","matrix()":"matrix( <number>#{6} )","matrix3d()":"matrix3d( <number>#{16} )","max()":"max( <calc-sum># )","media-and":"<media-in-parens> [and <media-in-parens>]+","media-condition":"<media-not>|<media-and>|<media-or>|<media-in-parens>","media-condition-without-or":"<media-not>|<media-and>|<media-in-parens>","media-feature":"( [<mf-plain>|<mf-boolean>|<mf-range>] )","media-in-parens":"( <media-condition> )|<media-feature>|<general-enclosed>","media-not":"not <media-in-parens>","media-or":"<media-in-parens> [or <media-in-parens>]+","media-query":"<media-condition>|[not|only]? <media-type> [and <media-condition-without-or>]?","media-query-list":"<media-query>#","media-type":"<ident>","mf-boolean":"<mf-name>","mf-name":"<ident>","mf-plain":"<mf-name> : <mf-value>","mf-range":"<mf-name> ['<'|'>']? '='? <mf-value>|<mf-value> ['<'|'>']? '='? <mf-name>|<mf-value> '<' '='? <mf-name> '<' '='? <mf-value>|<mf-value> '>' '='? <mf-name> '>' '='? <mf-value>","mf-value":"<number>|<dimension>|<ident>|<ratio>","min()":"min( <calc-sum># )","minmax()":"minmax( [<length>|<percentage>|min-content|max-content|auto] , [<length>|<percentage>|<flex>|min-content|max-content|auto] )","name-repeat":"repeat( [<positive-integer>|auto-fill] , <line-names>+ )","named-color":"transparent|aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen|<-non-standard-color>","namespace-prefix":"<ident>","ns-prefix":"[<ident-token>|'*']? '|'","number-percentage":"<number>|<percentage>","numeric-figure-values":"[lining-nums|oldstyle-nums]","numeric-fraction-values":"[diagonal-fractions|stacked-fractions]","numeric-spacing-values":"[proportional-nums|tabular-nums]",nth:"<an-plus-b>|even|odd","opacity()":"opacity( [<number-percentage>] )","overflow-position":"unsafe|safe","outline-radius":"<length>|<percentage>","page-body":"<declaration>? [; <page-body>]?|<page-margin-box> <page-body>","page-margin-box":"<page-margin-box-type> '{' <declaration-list> '}'","page-margin-box-type":"@top-left-corner|@top-left|@top-center|@top-right|@top-right-corner|@bottom-left-corner|@bottom-left|@bottom-center|@bottom-right|@bottom-right-corner|@left-top|@left-middle|@left-bottom|@right-top|@right-middle|@right-bottom","page-selector-list":"[<page-selector>#]?","page-selector":"<pseudo-page>+|<ident> <pseudo-page>*","page-size":"A5|A4|A3|B5|B4|JIS-B5|JIS-B4|letter|legal|ledger","path()":"path( [<fill-rule> ,]? <string> )","paint()":"paint( <ident> , <declaration-value>? )","perspective()":"perspective( <length> )","polygon()":"polygon( <fill-rule>? , [<length-percentage> <length-percentage>]# )",position:"[[left|center|right]||[top|center|bottom]|[left|center|right|<length-percentage>] [top|center|bottom|<length-percentage>]?|[[left|right] <length-percentage>]&&[[top|bottom] <length-percentage>]]","pseudo-class-selector":"':' <ident-token>|':' <function-token> <any-value> ')'","pseudo-element-selector":"':' <pseudo-class-selector>","pseudo-page":": [left|right|first|blank]",quote:"open-quote|close-quote|no-open-quote|no-close-quote","radial-gradient()":"radial-gradient( [<ending-shape>||<size>]? [at <position>]? , <color-stop-list> )","relative-selector":"<combinator>? <complex-selector>","relative-selector-list":"<relative-selector>#","relative-size":"larger|smaller","repeat-style":"repeat-x|repeat-y|[repeat|space|round|no-repeat]{1,2}","repeating-linear-gradient()":"repeating-linear-gradient( [<angle>|to <side-or-corner>]? , <color-stop-list> )","repeating-radial-gradient()":"repeating-radial-gradient( [<ending-shape>||<size>]? [at <position>]? , <color-stop-list> )","rgb()":"rgb( <percentage>{3} [/ <alpha-value>]? )|rgb( <number>{3} [/ <alpha-value>]? )|rgb( <percentage>#{3} , <alpha-value>? )|rgb( <number>#{3} , <alpha-value>? )","rgba()":"rgba( <percentage>{3} [/ <alpha-value>]? )|rgba( <number>{3} [/ <alpha-value>]? )|rgba( <percentage>#{3} , <alpha-value>? )|rgba( <number>#{3} , <alpha-value>? )","rotate()":"rotate( [<angle>|<zero>] )","rotate3d()":"rotate3d( <number> , <number> , <number> , [<angle>|<zero>] )","rotateX()":"rotateX( [<angle>|<zero>] )","rotateY()":"rotateY( [<angle>|<zero>] )","rotateZ()":"rotateZ( [<angle>|<zero>] )","saturate()":"saturate( <number-percentage> )","scale()":"scale( <number> , <number>? )","scale3d()":"scale3d( <number> , <number> , <number> )","scaleX()":"scaleX( <number> )","scaleY()":"scaleY( <number> )","scaleZ()":"scaleZ( <number> )","self-position":"center|start|end|self-start|self-end|flex-start|flex-end","shape-radius":"<length-percentage>|closest-side|farthest-side","skew()":"skew( [<angle>|<zero>] , [<angle>|<zero>]? )","skewX()":"skewX( [<angle>|<zero>] )","skewY()":"skewY( [<angle>|<zero>] )","sepia()":"sepia( <number-percentage> )",shadow:"inset?&&<length>{2,4}&&<color>?","shadow-t":"[<length>{2,3}&&<color>?]",shape:"rect( <top> , <right> , <bottom> , <left> )|rect( <top> <right> <bottom> <left> )","shape-box":"<box>|margin-box","side-or-corner":"[left|right]||[top|bottom]","single-animation":"<time>||<easing-function>||<time>||<single-animation-iteration-count>||<single-animation-direction>||<single-animation-fill-mode>||<single-animation-play-state>||[none|<keyframes-name>]","single-animation-direction":"normal|reverse|alternate|alternate-reverse","single-animation-fill-mode":"none|forwards|backwards|both","single-animation-iteration-count":"infinite|<number>","single-animation-play-state":"running|paused","single-transition":"[none|<single-transition-property>]||<time>||<easing-function>||<time>","single-transition-property":"all|<custom-ident>",size:"closest-side|farthest-side|closest-corner|farthest-corner|<length>|<length-percentage>{2}","step-position":"jump-start|jump-end|jump-none|jump-both|start|end","step-timing-function":"step-start|step-end|steps( <integer> [, <step-position>]? )","subclass-selector":"<id-selector>|<class-selector>|<attribute-selector>|<pseudo-class-selector>","supports-condition":"not <supports-in-parens>|<supports-in-parens> [and <supports-in-parens>]*|<supports-in-parens> [or <supports-in-parens>]*","supports-in-parens":"( <supports-condition> )|<supports-feature>|<general-enclosed>","supports-feature":"<supports-decl>|<supports-selector-fn>","supports-decl":"( <declaration> )","supports-selector-fn":"selector( <complex-selector> )",symbol:"<string>|<image>|<custom-ident>",target:"<target-counter()>|<target-counters()>|<target-text()>","target-counter()":"target-counter( [<string>|<url>] , <custom-ident> , <counter-style>? )","target-counters()":"target-counters( [<string>|<url>] , <custom-ident> , <string> , <counter-style>? )","target-text()":"target-text( [<string>|<url>] , [content|before|after|first-letter]? )","time-percentage":"<time>|<percentage>","easing-function":"linear|<cubic-bezier-timing-function>|<step-timing-function>","track-breadth":"<length-percentage>|<flex>|min-content|max-content|auto","track-list":"[<line-names>? [<track-size>|<track-repeat>]]+ <line-names>?","track-repeat":"repeat( [<integer [1,∞]>] , [<line-names>? <track-size>]+ <line-names>? )","track-size":"<track-breadth>|minmax( <inflexible-breadth> , <track-breadth> )|fit-content( [<length>|<percentage>] )","transform-function":"<matrix()>|<translate()>|<translateX()>|<translateY()>|<scale()>|<scaleX()>|<scaleY()>|<rotate()>|<skew()>|<skewX()>|<skewY()>|<matrix3d()>|<translate3d()>|<translateZ()>|<scale3d()>|<scaleZ()>|<rotate3d()>|<rotateX()>|<rotateY()>|<rotateZ()>|<perspective()>","transform-list":"<transform-function>+","translate()":"translate( <length-percentage> , <length-percentage>? )","translate3d()":"translate3d( <length-percentage> , <length-percentage> , <length> )","translateX()":"translateX( <length-percentage> )","translateY()":"translateY( <length-percentage> )","translateZ()":"translateZ( <length> )","type-or-unit":"string|color|url|integer|number|length|angle|time|frequency|cap|ch|em|ex|ic|lh|rlh|rem|vb|vi|vw|vh|vmin|vmax|mm|Q|cm|in|pt|pc|px|deg|grad|rad|turn|ms|s|Hz|kHz|%","type-selector":"<wq-name>|<ns-prefix>? '*'","var()":"var( <custom-property-name> , <declaration-value>? )","viewport-length":"auto|<length-percentage>","visual-box":"content-box|padding-box|border-box","wq-name":"<ns-prefix>? <ident-token>","-legacy-gradient":"<-webkit-gradient()>|<-legacy-linear-gradient>|<-legacy-repeating-linear-gradient>|<-legacy-radial-gradient>|<-legacy-repeating-radial-gradient>","-legacy-linear-gradient":"-moz-linear-gradient( <-legacy-linear-gradient-arguments> )|-webkit-linear-gradient( <-legacy-linear-gradient-arguments> )|-o-linear-gradient( <-legacy-linear-gradient-arguments> )","-legacy-repeating-linear-gradient":"-moz-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )|-webkit-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )|-o-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )","-legacy-linear-gradient-arguments":"[<angle>|<side-or-corner>]? , <color-stop-list>","-legacy-radial-gradient":"-moz-radial-gradient( <-legacy-radial-gradient-arguments> )|-webkit-radial-gradient( <-legacy-radial-gradient-arguments> )|-o-radial-gradient( <-legacy-radial-gradient-arguments> )","-legacy-repeating-radial-gradient":"-moz-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )|-webkit-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )|-o-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )","-legacy-radial-gradient-arguments":"[<position> ,]? [[[<-legacy-radial-gradient-shape>||<-legacy-radial-gradient-size>]|[<length>|<percentage>]{2}] ,]? <color-stop-list>","-legacy-radial-gradient-size":"closest-side|closest-corner|farthest-side|farthest-corner|contain|cover","-legacy-radial-gradient-shape":"circle|ellipse","-non-standard-font":"-apple-system-body|-apple-system-headline|-apple-system-subheadline|-apple-system-caption1|-apple-system-caption2|-apple-system-footnote|-apple-system-short-body|-apple-system-short-headline|-apple-system-short-subheadline|-apple-system-short-caption1|-apple-system-short-footnote|-apple-system-tall-body","-non-standard-color":"-moz-ButtonDefault|-moz-ButtonHoverFace|-moz-ButtonHoverText|-moz-CellHighlight|-moz-CellHighlightText|-moz-Combobox|-moz-ComboboxText|-moz-Dialog|-moz-DialogText|-moz-dragtargetzone|-moz-EvenTreeRow|-moz-Field|-moz-FieldText|-moz-html-CellHighlight|-moz-html-CellHighlightText|-moz-mac-accentdarkestshadow|-moz-mac-accentdarkshadow|-moz-mac-accentface|-moz-mac-accentlightesthighlight|-moz-mac-accentlightshadow|-moz-mac-accentregularhighlight|-moz-mac-accentregularshadow|-moz-mac-chrome-active|-moz-mac-chrome-inactive|-moz-mac-focusring|-moz-mac-menuselect|-moz-mac-menushadow|-moz-mac-menutextselect|-moz-MenuHover|-moz-MenuHoverText|-moz-MenuBarText|-moz-MenuBarHoverText|-moz-nativehyperlinktext|-moz-OddTreeRow|-moz-win-communicationstext|-moz-win-mediatext|-moz-activehyperlinktext|-moz-default-background-color|-moz-default-color|-moz-hyperlinktext|-moz-visitedhyperlinktext|-webkit-activelink|-webkit-focus-ring-color|-webkit-link|-webkit-text","-non-standard-image-rendering":"optimize-contrast|-moz-crisp-edges|-o-crisp-edges|-webkit-optimize-contrast","-non-standard-overflow":"-moz-scrollbars-none|-moz-scrollbars-horizontal|-moz-scrollbars-vertical|-moz-hidden-unscrollable","-non-standard-width":"fill-available|min-intrinsic|intrinsic|-moz-available|-moz-fit-content|-moz-min-content|-moz-max-content|-webkit-min-content|-webkit-max-content","-webkit-gradient()":"-webkit-gradient( <-webkit-gradient-type> , <-webkit-gradient-point> [, <-webkit-gradient-point>|, <-webkit-gradient-radius> , <-webkit-gradient-point>] [, <-webkit-gradient-radius>]? [, <-webkit-gradient-color-stop>]* )","-webkit-gradient-color-stop":"from( <color> )|color-stop( [<number-zero-one>|<percentage>] , <color> )|to( <color> )","-webkit-gradient-point":"[left|center|right|<length-percentage>] [top|center|bottom|<length-percentage>]","-webkit-gradient-radius":"<length>|<percentage>","-webkit-gradient-type":"linear|radial","-webkit-mask-box-repeat":"repeat|stretch|round","-webkit-mask-clip-style":"border|border-box|padding|padding-box|content|content-box|text","-ms-filter-function-list":"<-ms-filter-function>+","-ms-filter-function":"<-ms-filter-function-progid>|<-ms-filter-function-legacy>","-ms-filter-function-progid":"'progid:' [<ident-token> '.']* [<ident-token>|<function-token> <any-value>? )]","-ms-filter-function-legacy":"<ident-token>|<function-token> <any-value>? )","-ms-filter":"<string>",age:"child|young|old","attr-name":"<wq-name>","attr-fallback":"<any-value>","border-radius":"<length-percentage>{1,2}",bottom:"<length>|auto","generic-voice":"[<age>? <gender> <integer>?]",gender:"male|female|neutral",left:"<length>|auto","layer-name":"<ident> ['.' <ident>]*","mask-image":"<mask-reference>#",paint:"none|<color>|<url> [none|<color>]?|context-fill|context-stroke",ratio:"<integer> / <integer>",right:"<length>|auto","svg-length":"<percentage>|<length>|<number>","svg-writing-mode":"lr-tb|rl-tb|tb-rl|lr|rl|tb","single-animation-timeline":"auto|none|<timeline-name>","timeline-name":"<custom-ident>|<string>",top:"<length>|auto","track-group":"'(' [<string>* <track-minmax> <string>*]+ ')' ['[' <positive-integer> ']']?|<track-minmax>","track-list-v0":"[<string>* <track-group> <string>*]+|none","track-minmax":"minmax( <track-breadth> , <track-breadth> )|auto|<track-breadth>|fit-content",x:"<number>",y:"<number>",declaration:"<ident-token> : <declaration-value>? ['!' important]?","declaration-list":"[<declaration>? ';']* <declaration>?",url:"url( <string> <url-modifier>* )|<url-token>","url-modifier":"<ident>|<function-token> <any-value> )","number-zero-one":"<number [0,1]>","number-one-or-greater":"<number [1,∞]>","positive-integer":"<integer [0,∞]>","-non-standard-display":"-ms-inline-flexbox|-ms-grid|-ms-inline-grid|-webkit-flex|-webkit-inline-flex|-webkit-box|-webkit-inline-box|-moz-inline-stack|-moz-box|-moz-inline-box"},properties:{"--*":"<declaration-value>","-ms-accelerator":"false|true","-ms-block-progression":"tb|rl|bt|lr","-ms-content-zoom-chaining":"none|chained","-ms-content-zooming":"none|zoom","-ms-content-zoom-limit":"<'-ms-content-zoom-limit-min'> <'-ms-content-zoom-limit-max'>","-ms-content-zoom-limit-max":"<percentage>","-ms-content-zoom-limit-min":"<percentage>","-ms-content-zoom-snap":"<'-ms-content-zoom-snap-type'>||<'-ms-content-zoom-snap-points'>","-ms-content-zoom-snap-points":"snapInterval( <percentage> , <percentage> )|snapList( <percentage># )","-ms-content-zoom-snap-type":"none|proximity|mandatory","-ms-filter":"<string>","-ms-flow-from":"[none|<custom-ident>]#","-ms-flow-into":"[none|<custom-ident>]#","-ms-grid-columns":"none|<track-list>|<auto-track-list>","-ms-grid-rows":"none|<track-list>|<auto-track-list>","-ms-high-contrast-adjust":"auto|none","-ms-hyphenate-limit-chars":"auto|<integer>{1,3}","-ms-hyphenate-limit-lines":"no-limit|<integer>","-ms-hyphenate-limit-zone":"<percentage>|<length>","-ms-ime-align":"auto|after","-ms-overflow-style":"auto|none|scrollbar|-ms-autohiding-scrollbar","-ms-scrollbar-3dlight-color":"<color>","-ms-scrollbar-arrow-color":"<color>","-ms-scrollbar-base-color":"<color>","-ms-scrollbar-darkshadow-color":"<color>","-ms-scrollbar-face-color":"<color>","-ms-scrollbar-highlight-color":"<color>","-ms-scrollbar-shadow-color":"<color>","-ms-scrollbar-track-color":"<color>","-ms-scroll-chaining":"chained|none","-ms-scroll-limit":"<'-ms-scroll-limit-x-min'> <'-ms-scroll-limit-y-min'> <'-ms-scroll-limit-x-max'> <'-ms-scroll-limit-y-max'>","-ms-scroll-limit-x-max":"auto|<length>","-ms-scroll-limit-x-min":"<length>","-ms-scroll-limit-y-max":"auto|<length>","-ms-scroll-limit-y-min":"<length>","-ms-scroll-rails":"none|railed","-ms-scroll-snap-points-x":"snapInterval( <length-percentage> , <length-percentage> )|snapList( <length-percentage># )","-ms-scroll-snap-points-y":"snapInterval( <length-percentage> , <length-percentage> )|snapList( <length-percentage># )","-ms-scroll-snap-type":"none|proximity|mandatory","-ms-scroll-snap-x":"<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-x'>","-ms-scroll-snap-y":"<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-y'>","-ms-scroll-translation":"none|vertical-to-horizontal","-ms-text-autospace":"none|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space","-ms-touch-select":"grippers|none","-ms-user-select":"none|element|text","-ms-wrap-flow":"auto|both|start|end|maximum|clear","-ms-wrap-margin":"<length>","-ms-wrap-through":"wrap|none","-moz-appearance":"none|button|button-arrow-down|button-arrow-next|button-arrow-previous|button-arrow-up|button-bevel|button-focus|caret|checkbox|checkbox-container|checkbox-label|checkmenuitem|dualbutton|groupbox|listbox|listitem|menuarrow|menubar|menucheckbox|menuimage|menuitem|menuitemtext|menulist|menulist-button|menulist-text|menulist-textfield|menupopup|menuradio|menuseparator|meterbar|meterchunk|progressbar|progressbar-vertical|progresschunk|progresschunk-vertical|radio|radio-container|radio-label|radiomenuitem|range|range-thumb|resizer|resizerpanel|scale-horizontal|scalethumbend|scalethumb-horizontal|scalethumbstart|scalethumbtick|scalethumb-vertical|scale-vertical|scrollbarbutton-down|scrollbarbutton-left|scrollbarbutton-right|scrollbarbutton-up|scrollbarthumb-horizontal|scrollbarthumb-vertical|scrollbartrack-horizontal|scrollbartrack-vertical|searchfield|separator|sheet|spinner|spinner-downbutton|spinner-textfield|spinner-upbutton|splitter|statusbar|statusbarpanel|tab|tabpanel|tabpanels|tab-scroll-arrow-back|tab-scroll-arrow-forward|textfield|textfield-multiline|toolbar|toolbarbutton|toolbarbutton-dropdown|toolbargripper|toolbox|tooltip|treeheader|treeheadercell|treeheadersortarrow|treeitem|treeline|treetwisty|treetwistyopen|treeview|-moz-mac-unified-toolbar|-moz-win-borderless-glass|-moz-win-browsertabbar-toolbox|-moz-win-communicationstext|-moz-win-communications-toolbox|-moz-win-exclude-glass|-moz-win-glass|-moz-win-mediatext|-moz-win-media-toolbox|-moz-window-button-box|-moz-window-button-box-maximized|-moz-window-button-close|-moz-window-button-maximize|-moz-window-button-minimize|-moz-window-button-restore|-moz-window-frame-bottom|-moz-window-frame-left|-moz-window-frame-right|-moz-window-titlebar|-moz-window-titlebar-maximized","-moz-binding":"<url>|none","-moz-border-bottom-colors":"<color>+|none","-moz-border-left-colors":"<color>+|none","-moz-border-right-colors":"<color>+|none","-moz-border-top-colors":"<color>+|none","-moz-context-properties":"none|[fill|fill-opacity|stroke|stroke-opacity]#","-moz-float-edge":"border-box|content-box|margin-box|padding-box","-moz-force-broken-image-icon":"0|1","-moz-image-region":"<shape>|auto","-moz-orient":"inline|block|horizontal|vertical","-moz-outline-radius":"<outline-radius>{1,4} [/ <outline-radius>{1,4}]?","-moz-outline-radius-bottomleft":"<outline-radius>","-moz-outline-radius-bottomright":"<outline-radius>","-moz-outline-radius-topleft":"<outline-radius>","-moz-outline-radius-topright":"<outline-radius>","-moz-stack-sizing":"ignore|stretch-to-fit","-moz-text-blink":"none|blink","-moz-user-focus":"ignore|normal|select-after|select-before|select-menu|select-same|select-all|none","-moz-user-input":"auto|none|enabled|disabled","-moz-user-modify":"read-only|read-write|write-only","-moz-window-dragging":"drag|no-drag","-moz-window-shadow":"default|menu|tooltip|sheet|none","-webkit-appearance":"none|button|button-bevel|caps-lock-indicator|caret|checkbox|default-button|inner-spin-button|listbox|listitem|media-controls-background|media-controls-fullscreen-background|media-current-time-display|media-enter-fullscreen-button|media-exit-fullscreen-button|media-fullscreen-button|media-mute-button|media-overlay-play-button|media-play-button|media-seek-back-button|media-seek-forward-button|media-slider|media-sliderthumb|media-time-remaining-display|media-toggle-closed-captions-button|media-volume-slider|media-volume-slider-container|media-volume-sliderthumb|menulist|menulist-button|menulist-text|menulist-textfield|meter|progress-bar|progress-bar-value|push-button|radio|scrollbarbutton-down|scrollbarbutton-left|scrollbarbutton-right|scrollbarbutton-up|scrollbargripper-horizontal|scrollbargripper-vertical|scrollbarthumb-horizontal|scrollbarthumb-vertical|scrollbartrack-horizontal|scrollbartrack-vertical|searchfield|searchfield-cancel-button|searchfield-decoration|searchfield-results-button|searchfield-results-decoration|slider-horizontal|slider-vertical|sliderthumb-horizontal|sliderthumb-vertical|square-button|textarea|textfield|-apple-pay-button","-webkit-border-before":"<'border-width'>||<'border-style'>||<color>","-webkit-border-before-color":"<color>","-webkit-border-before-style":"<'border-style'>","-webkit-border-before-width":"<'border-width'>","-webkit-box-reflect":"[above|below|right|left]? <length>? <image>?","-webkit-line-clamp":"none|<integer>","-webkit-mask":"[<mask-reference>||<position> [/ <bg-size>]?||<repeat-style>||[<box>|border|padding|content|text]||[<box>|border|padding|content]]#","-webkit-mask-attachment":"<attachment>#","-webkit-mask-clip":"[<box>|border|padding|content|text]#","-webkit-mask-composite":"<composite-style>#","-webkit-mask-image":"<mask-reference>#","-webkit-mask-origin":"[<box>|border|padding|content]#","-webkit-mask-position":"<position>#","-webkit-mask-position-x":"[<length-percentage>|left|center|right]#","-webkit-mask-position-y":"[<length-percentage>|top|center|bottom]#","-webkit-mask-repeat":"<repeat-style>#","-webkit-mask-repeat-x":"repeat|no-repeat|space|round","-webkit-mask-repeat-y":"repeat|no-repeat|space|round","-webkit-mask-size":"<bg-size>#","-webkit-overflow-scrolling":"auto|touch","-webkit-tap-highlight-color":"<color>","-webkit-text-fill-color":"<color>","-webkit-text-stroke":"<length>||<color>","-webkit-text-stroke-color":"<color>","-webkit-text-stroke-width":"<length>","-webkit-touch-callout":"default|none","-webkit-user-modify":"read-only|read-write|read-write-plaintext-only","accent-color":"auto|<color>","align-content":"normal|<baseline-position>|<content-distribution>|<overflow-position>? <content-position>","align-items":"normal|stretch|<baseline-position>|[<overflow-position>? <self-position>]","align-self":"auto|normal|stretch|<baseline-position>|<overflow-position>? <self-position>","align-tracks":"[normal|<baseline-position>|<content-distribution>|<overflow-position>? <content-position>]#",all:"initial|inherit|unset|revert",animation:"<single-animation>#","animation-delay":"<time>#","animation-direction":"<single-animation-direction>#","animation-duration":"<time>#","animation-fill-mode":"<single-animation-fill-mode>#","animation-iteration-count":"<single-animation-iteration-count>#","animation-name":"[none|<keyframes-name>]#","animation-play-state":"<single-animation-play-state>#","animation-timing-function":"<easing-function>#","animation-timeline":"<single-animation-timeline>#",appearance:"none|auto|textfield|menulist-button|<compat-auto>","aspect-ratio":"auto|<ratio>",azimuth:"<angle>|[[left-side|far-left|left|center-left|center|center-right|right|far-right|right-side]||behind]|leftwards|rightwards","backdrop-filter":"none|<filter-function-list>","backface-visibility":"visible|hidden",background:"[<bg-layer> ,]* <final-bg-layer>","background-attachment":"<attachment>#","background-blend-mode":"<blend-mode>#","background-clip":"<box>#","background-color":"<color>","background-image":"<bg-image>#","background-origin":"<box>#","background-position":"<bg-position>#","background-position-x":"[center|[[left|right|x-start|x-end]? <length-percentage>?]!]#","background-position-y":"[center|[[top|bottom|y-start|y-end]? <length-percentage>?]!]#","background-repeat":"<repeat-style>#","background-size":"<bg-size>#","block-overflow":"clip|ellipsis|<string>","block-size":"<'width'>",border:"<line-width>||<line-style>||<color>","border-block":"<'border-top-width'>||<'border-top-style'>||<color>","border-block-color":"<'border-top-color'>{1,2}","border-block-style":"<'border-top-style'>","border-block-width":"<'border-top-width'>","border-block-end":"<'border-top-width'>||<'border-top-style'>||<color>","border-block-end-color":"<'border-top-color'>","border-block-end-style":"<'border-top-style'>","border-block-end-width":"<'border-top-width'>","border-block-start":"<'border-top-width'>||<'border-top-style'>||<color>","border-block-start-color":"<'border-top-color'>","border-block-start-style":"<'border-top-style'>","border-block-start-width":"<'border-top-width'>","border-bottom":"<line-width>||<line-style>||<color>","border-bottom-color":"<'border-top-color'>","border-bottom-left-radius":"<length-percentage>{1,2}","border-bottom-right-radius":"<length-percentage>{1,2}","border-bottom-style":"<line-style>","border-bottom-width":"<line-width>","border-collapse":"collapse|separate","border-color":"<color>{1,4}","border-end-end-radius":"<length-percentage>{1,2}","border-end-start-radius":"<length-percentage>{1,2}","border-image":"<'border-image-source'>||<'border-image-slice'> [/ <'border-image-width'>|/ <'border-image-width'>? / <'border-image-outset'>]?||<'border-image-repeat'>","border-image-outset":"[<length>|<number>]{1,4}","border-image-repeat":"[stretch|repeat|round|space]{1,2}","border-image-slice":"<number-percentage>{1,4}&&fill?","border-image-source":"none|<image>","border-image-width":"[<length-percentage>|<number>|auto]{1,4}","border-inline":"<'border-top-width'>||<'border-top-style'>||<color>","border-inline-end":"<'border-top-width'>||<'border-top-style'>||<color>","border-inline-color":"<'border-top-color'>{1,2}","border-inline-style":"<'border-top-style'>","border-inline-width":"<'border-top-width'>","border-inline-end-color":"<'border-top-color'>","border-inline-end-style":"<'border-top-style'>","border-inline-end-width":"<'border-top-width'>","border-inline-start":"<'border-top-width'>||<'border-top-style'>||<color>","border-inline-start-color":"<'border-top-color'>","border-inline-start-style":"<'border-top-style'>","border-inline-start-width":"<'border-top-width'>","border-left":"<line-width>||<line-style>||<color>","border-left-color":"<color>","border-left-style":"<line-style>","border-left-width":"<line-width>","border-radius":"<length-percentage>{1,4} [/ <length-percentage>{1,4}]?","border-right":"<line-width>||<line-style>||<color>","border-right-color":"<color>","border-right-style":"<line-style>","border-right-width":"<line-width>","border-spacing":"<length> <length>?","border-start-end-radius":"<length-percentage>{1,2}","border-start-start-radius":"<length-percentage>{1,2}","border-style":"<line-style>{1,4}","border-top":"<line-width>||<line-style>||<color>","border-top-color":"<color>","border-top-left-radius":"<length-percentage>{1,2}","border-top-right-radius":"<length-percentage>{1,2}","border-top-style":"<line-style>","border-top-width":"<line-width>","border-width":"<line-width>{1,4}",bottom:"<length>|<percentage>|auto","box-align":"start|center|end|baseline|stretch","box-decoration-break":"slice|clone","box-direction":"normal|reverse|inherit","box-flex":"<number>","box-flex-group":"<integer>","box-lines":"single|multiple","box-ordinal-group":"<integer>","box-orient":"horizontal|vertical|inline-axis|block-axis|inherit","box-pack":"start|center|end|justify","box-shadow":"none|<shadow>#","box-sizing":"content-box|border-box","break-after":"auto|avoid|always|all|avoid-page|page|left|right|recto|verso|avoid-column|column|avoid-region|region","break-before":"auto|avoid|always|all|avoid-page|page|left|right|recto|verso|avoid-column|column|avoid-region|region","break-inside":"auto|avoid|avoid-page|avoid-column|avoid-region","caption-side":"top|bottom|block-start|block-end|inline-start|inline-end","caret-color":"auto|<color>",clear:"none|left|right|both|inline-start|inline-end",clip:"<shape>|auto","clip-path":"<clip-source>|[<basic-shape>||<geometry-box>]|none",color:"<color>","print-color-adjust":"economy|exact","color-scheme":"normal|[light|dark|<custom-ident>]+&&only?","column-count":"<integer>|auto","column-fill":"auto|balance|balance-all","column-gap":"normal|<length-percentage>","column-rule":"<'column-rule-width'>||<'column-rule-style'>||<'column-rule-color'>","column-rule-color":"<color>","column-rule-style":"<'border-style'>","column-rule-width":"<'border-width'>","column-span":"none|all","column-width":"<length>|auto",columns:"<'column-width'>||<'column-count'>",contain:"none|strict|content|[size||layout||style||paint]",content:"normal|none|[<content-replacement>|<content-list>] [/ [<string>|<counter>]+]?","content-visibility":"visible|auto|hidden","counter-increment":"[<counter-name> <integer>?]+|none","counter-reset":"[<counter-name> <integer>?]+|none","counter-set":"[<counter-name> <integer>?]+|none",cursor:"[[<url> [<x> <y>]? ,]* [auto|default|none|context-menu|help|pointer|progress|wait|cell|crosshair|text|vertical-text|alias|copy|move|no-drop|not-allowed|e-resize|n-resize|ne-resize|nw-resize|s-resize|se-resize|sw-resize|w-resize|ew-resize|ns-resize|nesw-resize|nwse-resize|col-resize|row-resize|all-scroll|zoom-in|zoom-out|grab|grabbing|hand|-webkit-grab|-webkit-grabbing|-webkit-zoom-in|-webkit-zoom-out|-moz-grab|-moz-grabbing|-moz-zoom-in|-moz-zoom-out]]",direction:"ltr|rtl",display:"[<display-outside>||<display-inside>]|<display-listitem>|<display-internal>|<display-box>|<display-legacy>|<-non-standard-display>","empty-cells":"show|hide",filter:"none|<filter-function-list>|<-ms-filter-function-list>",flex:"none|[<'flex-grow'> <'flex-shrink'>?||<'flex-basis'>]","flex-basis":"content|<'width'>","flex-direction":"row|row-reverse|column|column-reverse","flex-flow":"<'flex-direction'>||<'flex-wrap'>","flex-grow":"<number>","flex-shrink":"<number>","flex-wrap":"nowrap|wrap|wrap-reverse",float:"left|right|none|inline-start|inline-end",font:"[[<'font-style'>||<font-variant-css21>||<'font-weight'>||<'font-stretch'>]? <'font-size'> [/ <'line-height'>]? <'font-family'>]|caption|icon|menu|message-box|small-caption|status-bar","font-family":"[<family-name>|<generic-family>]#","font-feature-settings":"normal|<feature-tag-value>#","font-kerning":"auto|normal|none","font-language-override":"normal|<string>","font-optical-sizing":"auto|none","font-variation-settings":"normal|[<string> <number>]#","font-size":"<absolute-size>|<relative-size>|<length-percentage>","font-size-adjust":"none|[ex-height|cap-height|ch-width|ic-width|ic-height]? [from-font|<number>]","font-smooth":"auto|never|always|<absolute-size>|<length>","font-stretch":"<font-stretch-absolute>","font-style":"normal|italic|oblique <angle>?","font-synthesis":"none|[weight||style||small-caps]","font-variant":"normal|none|[<common-lig-values>||<discretionary-lig-values>||<historical-lig-values>||<contextual-alt-values>||stylistic( <feature-value-name> )||historical-forms||styleset( <feature-value-name># )||character-variant( <feature-value-name># )||swash( <feature-value-name> )||ornaments( <feature-value-name> )||annotation( <feature-value-name> )||[small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps]||<numeric-figure-values>||<numeric-spacing-values>||<numeric-fraction-values>||ordinal||slashed-zero||<east-asian-variant-values>||<east-asian-width-values>||ruby]","font-variant-alternates":"normal|[stylistic( <feature-value-name> )||historical-forms||styleset( <feature-value-name># )||character-variant( <feature-value-name># )||swash( <feature-value-name> )||ornaments( <feature-value-name> )||annotation( <feature-value-name> )]","font-variant-caps":"normal|small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps","font-variant-east-asian":"normal|[<east-asian-variant-values>||<east-asian-width-values>||ruby]","font-variant-ligatures":"normal|none|[<common-lig-values>||<discretionary-lig-values>||<historical-lig-values>||<contextual-alt-values>]","font-variant-numeric":"normal|[<numeric-figure-values>||<numeric-spacing-values>||<numeric-fraction-values>||ordinal||slashed-zero]","font-variant-position":"normal|sub|super","font-weight":"<font-weight-absolute>|bolder|lighter","forced-color-adjust":"auto|none",gap:"<'row-gap'> <'column-gap'>?",grid:"<'grid-template'>|<'grid-template-rows'> / [auto-flow&&dense?] <'grid-auto-columns'>?|[auto-flow&&dense?] <'grid-auto-rows'>? / <'grid-template-columns'>","grid-area":"<grid-line> [/ <grid-line>]{0,3}","grid-auto-columns":"<track-size>+","grid-auto-flow":"[row|column]||dense","grid-auto-rows":"<track-size>+","grid-column":"<grid-line> [/ <grid-line>]?","grid-column-end":"<grid-line>","grid-column-gap":"<length-percentage>","grid-column-start":"<grid-line>","grid-gap":"<'grid-row-gap'> <'grid-column-gap'>?","grid-row":"<grid-line> [/ <grid-line>]?","grid-row-end":"<grid-line>","grid-row-gap":"<length-percentage>","grid-row-start":"<grid-line>","grid-template":"none|[<'grid-template-rows'> / <'grid-template-columns'>]|[<line-names>? <string> <track-size>? <line-names>?]+ [/ <explicit-track-list>]?","grid-template-areas":"none|<string>+","grid-template-columns":"none|<track-list>|<auto-track-list>|subgrid <line-name-list>?","grid-template-rows":"none|<track-list>|<auto-track-list>|subgrid <line-name-list>?","hanging-punctuation":"none|[first||[force-end|allow-end]||last]",height:"auto|<length>|<percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )","hyphenate-character":"auto|<string>",hyphens:"none|manual|auto","image-orientation":"from-image|<angle>|[<angle>? flip]","image-rendering":"auto|crisp-edges|pixelated|optimizeSpeed|optimizeQuality|<-non-standard-image-rendering>","image-resolution":"[from-image||<resolution>]&&snap?","ime-mode":"auto|normal|active|inactive|disabled","initial-letter":"normal|[<number> <integer>?]","initial-letter-align":"[auto|alphabetic|hanging|ideographic]","inline-size":"<'width'>","input-security":"auto|none",inset:"<'top'>{1,4}","inset-block":"<'top'>{1,2}","inset-block-end":"<'top'>","inset-block-start":"<'top'>","inset-inline":"<'top'>{1,2}","inset-inline-end":"<'top'>","inset-inline-start":"<'top'>",isolation:"auto|isolate","justify-content":"normal|<content-distribution>|<overflow-position>? [<content-position>|left|right]","justify-items":"normal|stretch|<baseline-position>|<overflow-position>? [<self-position>|left|right]|legacy|legacy&&[left|right|center]","justify-self":"auto|normal|stretch|<baseline-position>|<overflow-position>? [<self-position>|left|right]","justify-tracks":"[normal|<content-distribution>|<overflow-position>? [<content-position>|left|right]]#",left:"<length>|<percentage>|auto","letter-spacing":"normal|<length-percentage>","line-break":"auto|loose|normal|strict|anywhere","line-clamp":"none|<integer>","line-height":"normal|<number>|<length>|<percentage>","line-height-step":"<length>","list-style":"<'list-style-type'>||<'list-style-position'>||<'list-style-image'>","list-style-image":"<image>|none","list-style-position":"inside|outside","list-style-type":"<counter-style>|<string>|none",margin:"[<length>|<percentage>|auto]{1,4}","margin-block":"<'margin-left'>{1,2}","margin-block-end":"<'margin-left'>","margin-block-start":"<'margin-left'>","margin-bottom":"<length>|<percentage>|auto","margin-inline":"<'margin-left'>{1,2}","margin-inline-end":"<'margin-left'>","margin-inline-start":"<'margin-left'>","margin-left":"<length>|<percentage>|auto","margin-right":"<length>|<percentage>|auto","margin-top":"<length>|<percentage>|auto","margin-trim":"none|in-flow|all",mask:"<mask-layer>#","mask-border":"<'mask-border-source'>||<'mask-border-slice'> [/ <'mask-border-width'>? [/ <'mask-border-outset'>]?]?||<'mask-border-repeat'>||<'mask-border-mode'>","mask-border-mode":"luminance|alpha","mask-border-outset":"[<length>|<number>]{1,4}","mask-border-repeat":"[stretch|repeat|round|space]{1,2}","mask-border-slice":"<number-percentage>{1,4} fill?","mask-border-source":"none|<image>","mask-border-width":"[<length-percentage>|<number>|auto]{1,4}","mask-clip":"[<geometry-box>|no-clip]#","mask-composite":"<compositing-operator>#","mask-image":"<mask-reference>#","mask-mode":"<masking-mode>#","mask-origin":"<geometry-box>#","mask-position":"<position>#","mask-repeat":"<repeat-style>#","mask-size":"<bg-size>#","mask-type":"luminance|alpha","masonry-auto-flow":"[pack|next]||[definite-first|ordered]","math-style":"normal|compact","max-block-size":"<'max-width'>","max-height":"none|<length-percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )","max-inline-size":"<'max-width'>","max-lines":"none|<integer>","max-width":"none|<length-percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )|<-non-standard-width>","min-block-size":"<'min-width'>","min-height":"auto|<length>|<percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )","min-inline-size":"<'min-width'>","min-width":"auto|<length>|<percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )|<-non-standard-width>","mix-blend-mode":"<blend-mode>","object-fit":"fill|contain|cover|none|scale-down","object-position":"<position>",offset:"[<'offset-position'>? [<'offset-path'> [<'offset-distance'>||<'offset-rotate'>]?]?]! [/ <'offset-anchor'>]?","offset-anchor":"auto|<position>","offset-distance":"<length-percentage>","offset-path":"none|ray( [<angle>&&<size>&&contain?] )|<path()>|<url>|[<basic-shape>||<geometry-box>]","offset-position":"auto|<position>","offset-rotate":"[auto|reverse]||<angle>",opacity:"<alpha-value>",order:"<integer>",orphans:"<integer>",outline:"[<'outline-color'>||<'outline-style'>||<'outline-width'>]","outline-color":"<color>|invert","outline-offset":"<length>","outline-style":"auto|<'border-style'>","outline-width":"<line-width>",overflow:"[visible|hidden|clip|scroll|auto]{1,2}|<-non-standard-overflow>","overflow-anchor":"auto|none","overflow-block":"visible|hidden|clip|scroll|auto","overflow-clip-box":"padding-box|content-box","overflow-clip-margin":"<visual-box>||<length [0,∞]>","overflow-inline":"visible|hidden|clip|scroll|auto","overflow-wrap":"normal|break-word|anywhere","overflow-x":"visible|hidden|clip|scroll|auto","overflow-y":"visible|hidden|clip|scroll|auto","overscroll-behavior":"[contain|none|auto]{1,2}","overscroll-behavior-block":"contain|none|auto","overscroll-behavior-inline":"contain|none|auto","overscroll-behavior-x":"contain|none|auto","overscroll-behavior-y":"contain|none|auto",padding:"[<length>|<percentage>]{1,4}","padding-block":"<'padding-left'>{1,2}","padding-block-end":"<'padding-left'>","padding-block-start":"<'padding-left'>","padding-bottom":"<length>|<percentage>","padding-inline":"<'padding-left'>{1,2}","padding-inline-end":"<'padding-left'>","padding-inline-start":"<'padding-left'>","padding-left":"<length>|<percentage>","padding-right":"<length>|<percentage>","padding-top":"<length>|<percentage>","page-break-after":"auto|always|avoid|left|right|recto|verso","page-break-before":"auto|always|avoid|left|right|recto|verso","page-break-inside":"auto|avoid","paint-order":"normal|[fill||stroke||markers]",perspective:"none|<length>","perspective-origin":"<position>","place-content":"<'align-content'> <'justify-content'>?","place-items":"<'align-items'> <'justify-items'>?","place-self":"<'align-self'> <'justify-self'>?","pointer-events":"auto|none|visiblePainted|visibleFill|visibleStroke|visible|painted|fill|stroke|all|inherit",position:"static|relative|absolute|sticky|fixed|-webkit-sticky",quotes:"none|auto|[<string> <string>]+",resize:"none|both|horizontal|vertical|block|inline",right:"<length>|<percentage>|auto",rotate:"none|<angle>|[x|y|z|<number>{3}]&&<angle>","row-gap":"normal|<length-percentage>","ruby-align":"start|center|space-between|space-around","ruby-merge":"separate|collapse|auto","ruby-position":"[alternate||[over|under]]|inter-character",scale:"none|<number>{1,3}","scrollbar-color":"auto|<color>{2}","scrollbar-gutter":"auto|stable&&both-edges?","scrollbar-width":"auto|thin|none","scroll-behavior":"auto|smooth","scroll-margin":"<length>{1,4}","scroll-margin-block":"<length>{1,2}","scroll-margin-block-start":"<length>","scroll-margin-block-end":"<length>","scroll-margin-bottom":"<length>","scroll-margin-inline":"<length>{1,2}","scroll-margin-inline-start":"<length>","scroll-margin-inline-end":"<length>","scroll-margin-left":"<length>","scroll-margin-right":"<length>","scroll-margin-top":"<length>","scroll-padding":"[auto|<length-percentage>]{1,4}","scroll-padding-block":"[auto|<length-percentage>]{1,2}","scroll-padding-block-start":"auto|<length-percentage>","scroll-padding-block-end":"auto|<length-percentage>","scroll-padding-bottom":"auto|<length-percentage>","scroll-padding-inline":"[auto|<length-percentage>]{1,2}","scroll-padding-inline-start":"auto|<length-percentage>","scroll-padding-inline-end":"auto|<length-percentage>","scroll-padding-left":"auto|<length-percentage>","scroll-padding-right":"auto|<length-percentage>","scroll-padding-top":"auto|<length-percentage>","scroll-snap-align":"[none|start|end|center]{1,2}","scroll-snap-coordinate":"none|<position>#","scroll-snap-destination":"<position>","scroll-snap-points-x":"none|repeat( <length-percentage> )","scroll-snap-points-y":"none|repeat( <length-percentage> )","scroll-snap-stop":"normal|always","scroll-snap-type":"none|[x|y|block|inline|both] [mandatory|proximity]?","scroll-snap-type-x":"none|mandatory|proximity","scroll-snap-type-y":"none|mandatory|proximity","shape-image-threshold":"<alpha-value>","shape-margin":"<length-percentage>","shape-outside":"none|[<shape-box>||<basic-shape>]|<image>","tab-size":"<integer>|<length>","table-layout":"auto|fixed","text-align":"start|end|left|right|center|justify|match-parent","text-align-last":"auto|start|end|left|right|center|justify","text-combine-upright":"none|all|[digits <integer>?]","text-decoration":"<'text-decoration-line'>||<'text-decoration-style'>||<'text-decoration-color'>||<'text-decoration-thickness'>","text-decoration-color":"<color>","text-decoration-line":"none|[underline||overline||line-through||blink]|spelling-error|grammar-error","text-decoration-skip":"none|[objects||[spaces|[leading-spaces||trailing-spaces]]||edges||box-decoration]","text-decoration-skip-ink":"auto|all|none","text-decoration-style":"solid|double|dotted|dashed|wavy","text-decoration-thickness":"auto|from-font|<length>|<percentage>","text-emphasis":"<'text-emphasis-style'>||<'text-emphasis-color'>","text-emphasis-color":"<color>","text-emphasis-position":"[over|under]&&[right|left]","text-emphasis-style":"none|[[filled|open]||[dot|circle|double-circle|triangle|sesame]]|<string>","text-indent":"<length-percentage>&&hanging?&&each-line?","text-justify":"auto|inter-character|inter-word|none","text-orientation":"mixed|upright|sideways","text-overflow":"[clip|ellipsis|<string>]{1,2}","text-rendering":"auto|optimizeSpeed|optimizeLegibility|geometricPrecision","text-shadow":"none|<shadow-t>#","text-size-adjust":"none|auto|<percentage>","text-transform":"none|capitalize|uppercase|lowercase|full-width|full-size-kana","text-underline-offset":"auto|<length>|<percentage>","text-underline-position":"auto|from-font|[under||[left|right]]",top:"<length>|<percentage>|auto","touch-action":"auto|none|[[pan-x|pan-left|pan-right]||[pan-y|pan-up|pan-down]||pinch-zoom]|manipulation",transform:"none|<transform-list>","transform-box":"content-box|border-box|fill-box|stroke-box|view-box","transform-origin":"[<length-percentage>|left|center|right|top|bottom]|[[<length-percentage>|left|center|right]&&[<length-percentage>|top|center|bottom]] <length>?","transform-style":"flat|preserve-3d",transition:"<single-transition>#","transition-delay":"<time>#","transition-duration":"<time>#","transition-property":"none|<single-transition-property>#","transition-timing-function":"<easing-function>#",translate:"none|<length-percentage> [<length-percentage> <length>?]?","unicode-bidi":"normal|embed|isolate|bidi-override|isolate-override|plaintext|-moz-isolate|-moz-isolate-override|-moz-plaintext|-webkit-isolate|-webkit-isolate-override|-webkit-plaintext","user-select":"auto|text|none|contain|all","vertical-align":"baseline|sub|super|text-top|text-bottom|middle|top|bottom|<percentage>|<length>",visibility:"visible|hidden|collapse","white-space":"normal|pre|nowrap|pre-wrap|pre-line|break-spaces",widows:"<integer>",width:"auto|<length>|<percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )|fill|stretch|intrinsic|-moz-max-content|-webkit-max-content|-moz-fit-content|-webkit-fit-content","will-change":"auto|<animateable-feature>#","word-break":"normal|break-all|keep-all|break-word","word-spacing":"normal|<length>","word-wrap":"normal|break-word","writing-mode":"horizontal-tb|vertical-rl|vertical-lr|sideways-rl|sideways-lr|<svg-writing-mode>","z-index":"auto|<integer>",zoom:"normal|reset|<number>|<percentage>","-moz-background-clip":"padding|border","-moz-border-radius-bottomleft":"<'border-bottom-left-radius'>","-moz-border-radius-bottomright":"<'border-bottom-right-radius'>","-moz-border-radius-topleft":"<'border-top-left-radius'>","-moz-border-radius-topright":"<'border-bottom-right-radius'>","-moz-control-character-visibility":"visible|hidden","-moz-osx-font-smoothing":"auto|grayscale","-moz-user-select":"none|text|all|-moz-none","-ms-flex-align":"start|end|center|baseline|stretch","-ms-flex-item-align":"auto|start|end|center|baseline|stretch","-ms-flex-line-pack":"start|end|center|justify|distribute|stretch","-ms-flex-negative":"<'flex-shrink'>","-ms-flex-pack":"start|end|center|justify|distribute","-ms-flex-order":"<integer>","-ms-flex-positive":"<'flex-grow'>","-ms-flex-preferred-size":"<'flex-basis'>","-ms-interpolation-mode":"nearest-neighbor|bicubic","-ms-grid-column-align":"start|end|center|stretch","-ms-grid-row-align":"start|end|center|stretch","-ms-hyphenate-limit-last":"none|always|column|page|spread","-webkit-background-clip":"[<box>|border|padding|content|text]#","-webkit-column-break-after":"always|auto|avoid","-webkit-column-break-before":"always|auto|avoid","-webkit-column-break-inside":"always|auto|avoid","-webkit-font-smoothing":"auto|none|antialiased|subpixel-antialiased","-webkit-mask-box-image":"[<url>|<gradient>|none] [<length-percentage>{4} <-webkit-mask-box-repeat>{2}]?","-webkit-print-color-adjust":"economy|exact","-webkit-text-security":"none|circle|disc|square","-webkit-user-drag":"none|element|auto","-webkit-user-select":"auto|none|text|all","alignment-baseline":"auto|baseline|before-edge|text-before-edge|middle|central|after-edge|text-after-edge|ideographic|alphabetic|hanging|mathematical","baseline-shift":"baseline|sub|super|<svg-length>",behavior:"<url>+","clip-rule":"nonzero|evenodd",cue:"<'cue-before'> <'cue-after'>?","cue-after":"<url> <decibel>?|none","cue-before":"<url> <decibel>?|none","dominant-baseline":"auto|use-script|no-change|reset-size|ideographic|alphabetic|hanging|mathematical|central|middle|text-after-edge|text-before-edge",fill:"<paint>","fill-opacity":"<number-zero-one>","fill-rule":"nonzero|evenodd","glyph-orientation-horizontal":"<angle>","glyph-orientation-vertical":"<angle>",kerning:"auto|<svg-length>",marker:"none|<url>","marker-end":"none|<url>","marker-mid":"none|<url>","marker-start":"none|<url>",pause:"<'pause-before'> <'pause-after'>?","pause-after":"<time>|none|x-weak|weak|medium|strong|x-strong","pause-before":"<time>|none|x-weak|weak|medium|strong|x-strong",rest:"<'rest-before'> <'rest-after'>?","rest-after":"<time>|none|x-weak|weak|medium|strong|x-strong","rest-before":"<time>|none|x-weak|weak|medium|strong|x-strong","shape-rendering":"auto|optimizeSpeed|crispEdges|geometricPrecision",src:"[<url> [format( <string># )]?|local( <family-name> )]#",speak:"auto|none|normal","speak-as":"normal|spell-out||digits||[literal-punctuation|no-punctuation]",stroke:"<paint>","stroke-dasharray":"none|[<svg-length>+]#","stroke-dashoffset":"<svg-length>","stroke-linecap":"butt|round|square","stroke-linejoin":"miter|round|bevel","stroke-miterlimit":"<number-one-or-greater>","stroke-opacity":"<number-zero-one>","stroke-width":"<svg-length>","text-anchor":"start|middle|end","unicode-range":"<urange>#","voice-balance":"<number>|left|center|right|leftwards|rightwards","voice-duration":"auto|<time>","voice-family":"[[<family-name>|<generic-voice>] ,]* [<family-name>|<generic-voice>]|preserve","voice-pitch":"<frequency>&&absolute|[[x-low|low|medium|high|x-high]||[<frequency>|<semitones>|<percentage>]]","voice-range":"<frequency>&&absolute|[[x-low|low|medium|high|x-high]||[<frequency>|<semitones>|<percentage>]]","voice-rate":"[normal|x-slow|slow|medium|fast|x-fast]||<percentage>","voice-stress":"normal|strong|moderate|none|reduced","voice-volume":"silent|[[x-soft|soft|medium|loud|x-loud]||<decibel>]"},atrules:{charset:{prelude:"<string>",descriptors:null},"counter-style":{prelude:"<counter-style-name>",descriptors:{"additive-symbols":"[<integer>&&<symbol>]#",fallback:"<counter-style-name>",negative:"<symbol> <symbol>?",pad:"<integer>&&<symbol>",prefix:"<symbol>",range:"[[<integer>|infinite]{2}]#|auto","speak-as":"auto|bullets|numbers|words|spell-out|<counter-style-name>",suffix:"<symbol>",symbols:"<symbol>+",system:"cyclic|numeric|alphabetic|symbolic|additive|[fixed <integer>?]|[extends <counter-style-name>]"}},document:{prelude:"[<url>|url-prefix( <string> )|domain( <string> )|media-document( <string> )|regexp( <string> )]#",descriptors:null},"font-face":{prelude:null,descriptors:{"ascent-override":"normal|<percentage>","descent-override":"normal|<percentage>","font-display":"[auto|block|swap|fallback|optional]","font-family":"<family-name>","font-feature-settings":"normal|<feature-tag-value>#","font-variation-settings":"normal|[<string> <number>]#","font-stretch":"<font-stretch-absolute>{1,2}","font-style":"normal|italic|oblique <angle>{0,2}","font-weight":"<font-weight-absolute>{1,2}","font-variant":"normal|none|[<common-lig-values>||<discretionary-lig-values>||<historical-lig-values>||<contextual-alt-values>||stylistic( <feature-value-name> )||historical-forms||styleset( <feature-value-name># )||character-variant( <feature-value-name># )||swash( <feature-value-name> )||ornaments( <feature-value-name> )||annotation( <feature-value-name> )||[small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps]||<numeric-figure-values>||<numeric-spacing-values>||<numeric-fraction-values>||ordinal||slashed-zero||<east-asian-variant-values>||<east-asian-width-values>||ruby]","line-gap-override":"normal|<percentage>","size-adjust":"<percentage>",src:"[<url> [format( <string># )]?|local( <family-name> )]#","unicode-range":"<urange>#"}},"font-feature-values":{prelude:"<family-name>#",descriptors:null},import:{prelude:"[<string>|<url>] [layer|layer( <layer-name> )]? [supports( [<supports-condition>|<declaration>] )]? <media-query-list>?",descriptors:null},keyframes:{prelude:"<keyframes-name>",descriptors:null},layer:{prelude:"[<layer-name>#|<layer-name>?]",descriptors:null},media:{prelude:"<media-query-list>",descriptors:null},namespace:{prelude:"<namespace-prefix>? [<string>|<url>]",descriptors:null},page:{prelude:"<page-selector-list>",descriptors:{bleed:"auto|<length>",marks:"none|[crop||cross]",size:"<length>{1,2}|auto|[<page-size>||[portrait|landscape]]"}},property:{prelude:"<custom-property-name>",descriptors:{syntax:"<string>",inherits:"true|false","initial-value":"<string>"}},"scroll-timeline":{prelude:"<timeline-name>",descriptors:null},supports:{prelude:"<supports-condition>",descriptors:null},viewport:{prelude:null,descriptors:{height:"<viewport-length>{1,2}","max-height":"<viewport-length>","max-width":"<viewport-length>","max-zoom":"auto|<number>|<percentage>","min-height":"<viewport-length>","min-width":"<viewport-length>","min-zoom":"auto|<number>|<percentage>",orientation:"auto|portrait|landscape","user-zoom":"zoom|fixed","viewport-fit":"auto|contain|cover",width:"<viewport-length>{1,2}",zoom:"auto|<number>|<percentage>"}}},node:ta},Uh={};ln(Uh,{AtrulePrelude:()=>Fh,Selector:()=>qh,Value:()=>jh});function Dh(e){switch(this.tokenType){case 4:return this.Hash();case 18:return this.Operator();case 21:return this.Parentheses(this.readSequence,e.recognizer);case 19:return this.Brackets(this.readSequence,e.recognizer);case 5:return this.String();case 12:return this.Dimension();case 11:return this.Percentage();case 10:return this.Number();case 2:return this.cmpStr(this.tokenStart,this.tokenEnd,"url(")?this.Url():this.Function(this.readSequence,e.recognizer);case 7:return this.Url();case 1:return this.cmpChar(this.tokenStart,117)&&this.cmpChar(this.tokenStart+1,43)?this.UnicodeRange():this.Identifier();case 9:{let e=this.charCodeAt(this.tokenStart);if(47===e||42===e||43===e||45===e)return this.Operator();35===e&&this.error("Hex or identifier is expected",this.tokenStart+1);break}}}var Fh={getNode:Dh};var qh={onWhiteSpace:function(e,t){null!==t.last&&"Combinator"!==t.last.type&&null!==e&&"Combinator"!==e.type&&t.push({type:"Combinator",loc:null,name:" "})},getNode:function(){switch(this.tokenType){case 19:return this.AttributeSelector();case 4:return this.IdSelector();case 16:return 16===this.lookupType(1)?this.PseudoElementSelector():this.PseudoClassSelector();case 1:return this.TypeSelector();case 10:case 11:return this.Percentage();case 12:46===this.charCodeAt(this.tokenStart)&&this.error("Identifier is expected",this.tokenStart+1);break;case 9:switch(this.charCodeAt(this.tokenStart)){case 43:case 62:case 126:case 47:return this.Combinator();case 46:return this.ClassSelector();case 42:case 124:return this.TypeSelector();case 35:return this.IdSelector()}}}};function Bh(e){return null!==e&&"Operator"===e.type&&("-"===e.value[e.value.length-1]||"+"===e.value[e.value.length-1])}var jh={getNode:Dh,onWhiteSpace:function(e,t){Bh(e)&&(e.value=" "+e.value),Bh(t.last)&&(t.last.value+=" ")},expression:function(){return this.createSingleNodeList(this.Raw(this.tokenIndex,null,!1))},var:function(){let e=this.createList();if(this.skipSC(),e.push(this.Identifier()),this.skipSC(),18===this.tokenType){e.push(this.Operator());let t=this.tokenIndex,r=this.parseCustomProperty?this.Value(null):this.Raw(this.tokenIndex,this.consumeUntilExclamationMarkOrSemicolon,!1);if("Value"===r.type&&r.children.isEmpty)for(let e=t-this.tokenIndex;e<=0;e++)if(13===this.lookupType(e)){r.children.appendData({type:"WhiteSpace",loc:null,value:" "});break}e.push(r)}return e}},Hh={parse:{prelude(){let e=this.createList();switch(this.skipSC(),this.tokenType){case 5:e.push(this.String());break;case 7:case 2:e.push(this.Url());break;default:this.error("String or url() is expected")}return(1===this.lookupNonWSType(0)||21===this.lookupNonWSType(0))&&e.push(this.MediaQueryList()),e},block:null}};function Vh(){return this.createSingleNodeList(this.Raw(this.tokenIndex,null,!1))}function Wh(){return this.skipSC(),1===this.tokenType&&16===this.lookupNonWSType(1)?this.createSingleNodeList(this.Declaration()):$h.call(this)}function $h(){let e,t=this.createList();this.skipSC();e:for(;!this.eof;){switch(this.tokenType){case 25:case 13:this.next();continue;case 2:e=this.Function(Vh,this.scope.AtrulePrelude);break;case 1:e=this.Identifier();break;case 21:e=this.Parentheses(Wh,this.scope.AtrulePrelude);break;default:break e}t.push(e)}return t}var Gh={parse:{prelude(){let e=$h.call(this);return null===this.getFirstListNode(e)&&this.error("Condition is expected"),e},block(){return this.Block(!1)}}},Yh={"font-face":{parse:{prelude:null,block(){return this.Block(!0)}}},import:Hh,media:{parse:{prelude(){return this.createSingleNodeList(this.MediaQueryList())},block(){return this.Block(!1)}}},page:{parse:{prelude(){return this.createSingleNodeList(this.SelectorList())},block(){return this.Block(!0)}}},supports:Gh},Jh={parse(){return this.createSingleNodeList(this.SelectorList())}},Qh={parse(){return this.createSingleNodeList(this.Identifier())}},Kh={parse(){return this.createSingleNodeList(this.Nth())}},Zh={dir:Qh,has:Jh,lang:Qh,matches:Jh,is:Jh,"-moz-any":Jh,"-webkit-any":Jh,where:Jh,not:Jh,"nth-child":Kh,"nth-last-child":Kh,"nth-last-of-type":Kh,"nth-of-type":Kh,slotted:{parse(){return this.createSingleNodeList(this.Selector())}}},Xh={};ln(Xh,{AnPlusB:()=>pa,Atrule:()=>wa,AtrulePrelude:()=>Ca,AttributeSelector:()=>Pa,Block:()=>Va,Brackets:()=>Ja,CDC:()=>el,CDO:()=>il,ClassSelector:()=>ul,Combinator:()=>fl,Comment:()=>vl,Declaration:()=>_l,DeclarationList:()=>Ul,Dimension:()=>jl,Function:()=>Yl,Hash:()=>ec,IdSelector:()=>uc,Identifier:()=>ic,MediaFeature:()=>fc,MediaQuery:()=>vc,MediaQueryList:()=>Sc,Nth:()=>Ic,Number:()=>Mc,Operator:()=>qc,Parentheses:()=>Wc,Percentage:()=>Qc,PseudoClassSelector:()=>ru,PseudoElementSelector:()=>lu,Ratio:()=>mu,Raw:()=>vu,Rule:()=>Ru,Selector:()=>zu,SelectorList:()=>Fu,String:()=>Gu,StyleSheet:()=>eh,TypeSelector:()=>sh,UnicodeRange:()=>fh,Url:()=>Eh,Value:()=>Rh,WhiteSpace:()=>Ph});var ed={parseContext:{default:"StyleSheet",stylesheet:"StyleSheet",atrule:"Atrule",atrulePrelude:function(e){return this.AtrulePrelude(e.atrule?String(e.atrule):null)},mediaQueryList:"MediaQueryList",mediaQuery:"MediaQuery",rule:"Rule",selectorList:"SelectorList",selector:"Selector",block:function(){return this.Block(!0)},declarationList:"DeclarationList",declaration:"Declaration",value:"Value"},scope:Uh,atrule:Yh,pseudo:Zh,node:Xh},td=ea({...Oh,...ed,...{node:ta}});var rd={};ln(rd,{decode:()=>nd,encode:()=>od});function nd(e){let t=e.length-1,r="";for(let n=0;n<e.length;n++){let o=e.charCodeAt(n);if(92===o){if(n===t)break;if(o=e.charCodeAt(++n),Qn(92,o)){let t=n-1,o=co(e,t);n=o-1,r+=mo(e.substring(t+1,o))}else 13===o&&10===e.charCodeAt(n+1)&&n++}else r+=e[n]}return r}function od(e){let t="";if(1===e.length&&45===e.charCodeAt(0))return"\\-";for(let r=0;r<e.length;r++){let n=e.charCodeAt(r);0!==n?n<=31||127===n||n>=48&&n<=57&&(0===r||1===r&&45===e.charCodeAt(0))?t+="\\"+n.toString(16)+" ":$n(n)?t+=e.charAt(r):t+="\\"+e.charAt(r):t+="�"}return t}var{tokenize:id,parse:sd,generate:ad,lexer:ld,createLexer:cd,walk:ud,find:hd,findLast:dd,findAll:pd,toPlainObject:md,fromPlainObject:fd,fork:gd}=td,yd=Object.freeze({__proto__:null,Lexer:Hs,List:Ao,TokenStream:wo,clone:function e(t){let r={};for(let n in t){let o=t[n];o&&(Array.isArray(o)||o instanceof Ao?o=o.map(e):o.constructor===Object&&(o=e(o))),r[n]=o}return r},createLexer:cd,createSyntax:ea,definitionSyntax:qi,find:hd,findAll:pd,findLast:dd,fork:gd,fromPlainObject:fd,generate:ad,ident:rd,isCustomProperty:fi,keyword:di,lexer:ld,parse:sd,property:pi,string:ju,toPlainObject:md,tokenNames:fo,tokenTypes:fn,tokenize:id,url:bh,vendorPrefix:mi,version:"2.1.0",walk:ud});function bd(e){function t(e){return" "===e||"\t"===e||"\n"===e||"\f"===e||"\r"===e}function r(t){let r;const n=t.exec(e.substring(f));if(n)return r=n[0],f+=r.length,r}const n=e.length,o=/^[ \t\n\r\u000c]+/,i=/^[, \t\n\r\u000c]+/,s=/^[^ \t\n\r\u000c]+/,a=/[,]+$/,l=/^\d+$/,c=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/;let u,h,d,p,m,f=0;const g=[];for(;;){if(r(i),f>=n)return g;u=r(s),h=[],","===u.slice(-1)?(u=u.replace(a,""),b()):y()}function y(){for(r(o),d="",p="in descriptor";;){if(m=e.charAt(f),"in descriptor"===p)if(t(m))d&&(h.push(d),d="",p="after descriptor");else{if(","===m)return f+=1,d&&h.push(d),void b();if("("===m)d+=m,p="in parens";else{if(""===m)return d&&h.push(d),void b();d+=m}}else if("in parens"===p)if(")"===m)d+=m,p="in descriptor";else{if(""===m)return h.push(d),void b();d+=m}else if("after descriptor"===p)if(t(m));else{if(""===m)return void b();p="in descriptor",f-=1}f+=1}}function b(){let t,r,n,o,i,s,a,d,p,m=!1;const f={};for(o=0;o<h.length;o++)i=h[o],s=i[i.length-1],a=i.substring(0,i.length-1),d=parseInt(a,10),p=parseFloat(a),l.test(a)&&"w"===s?((t||r)&&(m=!0),0===d?m=!0:t=d):c.test(a)&&"x"===s?((t||r||n)&&(m=!0),p<0?m=!0:r=p):l.test(a)&&"h"===s?((n||r)&&(m=!0),0===d?m=!0:n=d):m=!0;m?console&&console.log&&console.log('Invalid srcset descriptor found in "'+e+'" at "'+i+'".'):(f.url=u,t&&(f.w=t),r&&(f.d=r),n&&(f.h=n),g.push(f))}}var kd=Object.freeze({__proto__:null,process:bd});let vd,wd,xd,Ed;vd={},vd.removeLeadingAndTrailingHTTPWhitespace=e=>e.replace(/^[ \t\n\r]+/,"").replace(/[ \t\n\r]+$/,""),vd.removeTrailingHTTPWhitespace=e=>e.replace(/[ \t\n\r]+$/,""),vd.isHTTPWhitespaceChar=e=>" "===e||"\t"===e||"\n"===e||"\r"===e,vd.solelyContainsHTTPTokenCodePoints=e=>/^[-!#$%&'*+.^_`|~A-Za-z0-9]*$/.test(e),vd.soleyContainsHTTPQuotedStringTokenCodePoints=e=>/^[\t\u0020-\u007E\u0080-\u00FF]*$/.test(e),vd.asciiLowercase=e=>e.replace(/[A-Z]/g,(e=>e.toLowerCase())),vd.collectAnHTTPQuotedString=(e,t)=>{let r="";for(t++;;){for(;t<e.length&&'"'!==e[t]&&"\\"!==e[t];)r+=e[t],++t;if(t>=e.length)break;const n=e[t];if(++t,"\\"!==n)break;if(t>=e.length){r+="\\";break}r+=e[t],++t}return[r,t]};{const{solelyContainsHTTPTokenCodePoints:e}=vd;xd=t=>{let r=`${t.type}/${t.subtype}`;if(0===t.parameters.size)return r;for(let[n,o]of t.parameters)r+=";",r+=n,r+="=",e(o)&&0!==o.length||(o=o.replace(/(["\\])/g,"\\$1"),o=`"${o}"`),r+=o;return r}}{const{removeLeadingAndTrailingHTTPWhitespace:e,removeTrailingHTTPWhitespace:t,isHTTPWhitespaceChar:r,solelyContainsHTTPTokenCodePoints:n,soleyContainsHTTPQuotedStringTokenCodePoints:o,asciiLowercase:i,collectAnHTTPQuotedString:s}=vd;wd=a=>{a=e(a);let l=0,c="";for(;l<a.length&&"/"!==a[l];)c+=a[l],++l;if(0===c.length||!n(c))return null;if(l>=a.length)return null;++l;let u="";for(;l<a.length&&";"!==a[l];)u+=a[l],++l;if(u=t(u),0===u.length||!n(u))return null;const h={type:i(c),subtype:i(u),parameters:new Map};for(;l<a.length;){for(++l;r(a[l]);)++l;let e="";for(;l<a.length&&";"!==a[l]&&"="!==a[l];)e+=a[l],++l;if(e=i(e),l<a.length){if(";"===a[l])continue;++l}let c=null;if('"'===a[l])for([c,l]=s(a,l);l<a.length&&";"!==a[l];)++l;else{for(c="";l<a.length&&";"!==a[l];)c+=a[l],++l;if(c=t(c),""===c)continue}e.length>0&&n(e)&&o(c)&&!h.parameters.has(e)&&h.parameters.set(e,c)}return h}}{const e=wd,t=xd,{asciiLowercase:r,solelyContainsHTTPTokenCodePoints:n,soleyContainsHTTPQuotedStringTokenCodePoints:o}=vd;Ed=class{constructor(t){t=String(t);const r=e(t);if(null===r)throw new Error(`Could not parse MIME type string "${t}"`);this._type=r.type,this._subtype=r.subtype,this._parameters=new i(r.parameters)}static parse(e){try{return new this(e)}catch(e){return null}}get essence(){return`${this.type}/${this.subtype}`}get type(){return this._type}set type(e){if(0===(e=r(String(e))).length)throw new Error("Invalid type: must be a non-empty string");if(!n(e))throw new Error(`Invalid type ${e}: must contain only HTTP token code points`);this._type=e}get subtype(){return this._subtype}set subtype(e){if(0===(e=r(String(e))).length)throw new Error("Invalid subtype: must be a non-empty string");if(!n(e))throw new Error(`Invalid subtype ${e}: must contain only HTTP token code points`);this._subtype=e}get parameters(){return this._parameters}toString(){return t(this)}isJavaScript({allowParameters:e=!1}={}){switch(this._type){case"text":switch(this._subtype){case"ecmascript":case"javascript":case"javascript1.0":case"javascript1.1":case"javascript1.2":case"javascript1.3":case"javascript1.4":case"javascript1.5":case"jscript":case"livescript":case"x-ecmascript":case"x-javascript":return e||0===this._parameters.size;default:return!1}case"application":switch(this._subtype){case"ecmascript":case"javascript":case"x-ecmascript":case"x-javascript":return e||0===this._parameters.size;default:return!1}default:return!1}}isXML(){return"xml"===this._subtype&&("text"===this._type||"application"===this._type)||this._subtype.endsWith("+xml")}isHTML(){return"html"===this._subtype&&"text"===this._type}};class i{constructor(e){this._map=e}get size(){return this._map.size}get(e){return e=r(String(e)),this._map.get(e)}has(e){return e=r(String(e)),this._map.has(e)}set(e,t){if(e=r(String(e)),t=String(t),!n(e))throw new Error(`Invalid MIME type parameter name "${e}": only HTTP token code points are valid.`);if(!o(t))throw new Error(`Invalid MIME type parameter value "${t}": only HTTP quoted-string token code points are valid.`);return this._map.set(e,t)}clear(){this._map.clear()}delete(e){return e=r(String(e)),this._map.delete(e)}forEach(e,t){this._map.forEach(e,t)}keys(){return this._map.keys()}values(){return this._map.values()}entries(){return this._map.entries()}[Symbol.iterator](){return this._map[Symbol.iterator]()}}}var Ad=Object.freeze({__proto__:null,fontPropertyParser:_t,mediaQueryParser:Mt,cssMinifier:Xr,cssTree:yd,cssUnescape:y,srcsetParser:kd,get MIMEType(){return Ed}});const Sd={normalizeFontFamily:te,getFontWeight:le},Td=globalThis.FontFace,Cd=/url\s*\(\s*'(.*?)'\s*\)/i,Rd=/url\s*\(\s*"(.*?)"\s*\)/i,_d=/url\s*\(\s*(.*?)\s*\)/i,Id=/(url|local|-sf-url-original)\(.*?\)\s*(,|$)/g,Ld=/^'(.*?)'$/,Nd=/^"(.*?)"$/,zd=/^url\(\s*["']?data:font\/(woff2?)/,Pd=/^url\(\s*["']?data:application\/x-font-(woff)/,Md=/\.([^.?#]+)((\?|#).*?)?$/,Od=/format\((.*?)\)\s*,?$/,Ud=/(.*?)\s*,?$/,Dd=/^url\(["']?data:[^,]*,?["']?\)/,Fd="local(",qd={"ultra-condensed":"50%","extra-condensed":"62.5%",condensed:"75%","semi-condensed":"87.5%",normal:"100%","semi-expanded":"112.5%",expanded:"125%","extra-expanded":"150%","ultra-expanded":"200%"};async function Bd(e,t,r,n){const o={fonts:new Map,medias:new Map,supports:new Map},i={rules:{processed:0,discarded:0},fonts:{processed:0,discarded:0}};let s=0;return t.forEach((t=>{const r=t.stylesheet.children;if(r)if(i.rules.processed+=r.size,i.rules.discarded+=r.size,t.mediaText&&"all"!=t.mediaText){const n=Yd();o.medias.set("media-"+s+"-"+t.mediaText,n),jd(e,r,s,n)}else jd(e,r,s,o);s++})),Hd(o),await Promise.all([...t].map((async([,e],t)=>{const s=e.stylesheet.children,a=e.mediaText;s&&(a&&"all"!=a?await Vd(s,t,o.medias.get("media-"+t+"-"+a),r,n,i):await Vd(s,t,o,r,n,i),i.rules.discarded-=s.size)}))),i}function jd(e,t,r,n){let o=0,i=0;t.forEach((t=>{if("Atrule"==t.type&&"media"==t.name&&t.block&&t.block.children&&t.prelude){const i=ad(t.prelude),s=Yd();n.medias.set("media-"+r+"-"+o+"-"+i,s),o++,jd(e,t.block.children,r,s)}else if("Atrule"==t.type&&"supports"==t.name&&t.block&&t.block.children&&t.prelude){const o=ad(t.prelude),s=Yd();n.supports.set("supports-"+r+"-"+i+"-"+o,s),i++,jd(e,t.block.children,r,s)}else if("Atrule"==t.type&&"font-face"==t.name&&t.block&&t.block.children){const e=Gd(t);let r=n.fonts.get(e);r||(r=[],n.fonts.set(e,r));const o=$d(t,"src");if(o){const e=o.match(Id);e&&e.forEach((e=>r.unshift(e)))}}}))}function Hd(e){e.fonts.forEach(((t,r)=>{e.fonts.set(r,t.map((e=>{const t=e.match(Od);let r;const n=function(e){const t=(e=e.replace(/url\(-sf-url-original\\\(\\"(.*?)\\"\\\)\\ /g,"")).match(Cd)||e.match(Rd)||e.match(_d);return t&&t[1]}(e);if(t&&t[1]&&(r=t[1].replace(Ld,"$1").replace(Nd,"$1").toLowerCase()),!r){const t=e.match(zd);if(t&&t[1])r=t[1];else{const t=e.match(Pd);t&&t[1]&&(r=t[1])}}if(!r&&n){const e=n.match(Md);e&&e[1]&&(r=e[1])}return{src:e.match(Ud)[1],fontUrl:n,format:r}})))})),e.medias.forEach((e=>Hd(e))),e.supports.forEach((e=>Hd(e)))}async function Vd(e,t,r,n,o,i){const s=[];let a=0,l=0;for(let c=e.head;c;c=c.next){const e=c.data;if("Atrule"==e.type&&"media"==e.name&&e.block&&e.block.children&&e.prelude){const s=ad(e.prelude);await Vd(e.block.children,t,r.medias.get("media-"+t+"-"+a+"-"+s),n,o,i),a++}else if("Atrule"==e.type&&"supports"==e.name&&e.block&&e.block.children&&e.prelude){const s=ad(e.prelude);await Vd(e.block.children,t,r.supports.get("supports-"+t+"-"+l+"-"+s),n,o,i),l++}else if("Atrule"==e.type&&"font-face"==e.name){const t=Gd(e),a=r.fonts.get(t);if(a){await Wd(e,a,n,o,i)&&r.fonts.delete(t)}else s.push(c)}}s.forEach((t=>e.remove(t)))}async function Wd(e,t,r,n,o){const i=[];for(let t=e.block.children.head;t;t=t.next)"src"==t.data.property&&i.push(t);i.pop(),i.forEach((t=>e.block.children.remove(t)));const s=e.block.children.filter((e=>"src"==e.property)).tail;if(s){await Promise.all(t.map((async e=>{if(n.has(e.src))e.valid=n.get(e.src);else{if(Td&&e.fontUrl){const t=new Td("test-font",e.src);try{let r;await Promise.race([t.load().then((()=>t.loaded)).then((()=>{e.valid=!0,globalThis.clearTimeout(r)})),new Promise((t=>r=globalThis.setTimeout((()=>{e.valid=!0,t()}),5e3)))])}catch(t){const n=pd(s.data,(e=>"Url"==e.type)),o=Array.from(r).find((([t])=>n.includes(t)&&t.value==e.fontUrl));if(o&&o[1].length){const t=o[1][0];if(t){const r=new Td("test-font","url("+t+")");try{let t;await Promise.race([r.load().then((()=>r.loaded)).then((()=>{e.valid=!0,globalThis.clearTimeout(t)})),new Promise((r=>t=globalThis.setTimeout((()=>{e.valid=!0,r()}),5e3)))])}catch(e){}}}else e.valid=!0}}else e.valid=!0;n.set(e.src,e.valid)}})));const e=(e,r)=>t.find((t=>!t.src.match(Dd)&&t.format==e&&(!r||t.valid))),i=e=>t.filter((t=>t==e||t.src.startsWith(Fd)));o.fonts.processed+=t.length,o.fonts.discarded+=t.length;const a=e("woff2-variations",!0)||e("woff2",!0)||e("woff",!0);if(a)t=i(a);else{const r=e("truetype-variations",!0)||e("truetype",!0);if(r)t=i(r);else{const r=e("opentype")||e("embedded-opentype");t=r?i(r):t.filter((e=>!e.src.match(Dd)&&e.valid||e.src.startsWith(Fd)))}}o.fonts.discarded-=t.length,t.reverse();try{s.data.value=sd(t.map((e=>e.src)).join(","),{context:"value",parseCustomProperty:!0})}catch(e){}return!0}return!1}function $d(e,t){let r;if(e.block.children&&(r=e.block.children.filter((e=>{try{return e.property==t&&!ad(e.value).match(/\\9$/)}catch(r){return e.property==t}})).tail),r)try{return ad(r.data.value)}catch(e){}}function Gd(e){return JSON.stringify([Sd.normalizeFontFamily($d(e,"font-family")),Sd.getFontWeight($d(e,"font-weight")||"400"),$d(e,"font-style")||"normal",$d(e,"unicode-range"),(t=$d(e,"font-stretch"),qd[t]||t),$d(e,"font-variant")||"normal",$d(e,"font-feature-settings"),$d(e,"font-variation-settings")]);var t}function Yd(){return{fonts:new Map,medias:new Map,supports:new Map}}var Jd=Object.freeze({__proto__:null,process:Bd});const Qd={normalizeFontFamily:te,flatten:ce,getFontWeight:le,removeQuotes:ae},Kd=/\s*,\s*/,Zd=/-/,Xd=/\?/g,ep=/^U\+/i,tp=[/^normal$/,/^italic$/,/^oblique$/,/^oblique\s+/];function rp(e,t,r,n){const o={rules:{processed:0,discarded:0},fonts:{processed:0,discarded:0}},i={declared:[],used:[]},s=e.createElement("style");let a="";e.body.appendChild(s),t.forEach((t=>{const r=t.stylesheet.children;r&&(o.processed+=r.size,o.discarded+=r.size,np(r,i),a=dp(e,r,s,a))})),r.forEach((e=>{const t=lp(e);t.length&&i.used.push(t),a=pp(e.children,s,a)})),s.remove(),a+=e.body.innerText,globalThis.getComputedStyle&&n.doc&&(i.used=i.used.map((e=>e.map((e=>{const t=e.match(/^var\((--.*)\)$/);if(t&&t[1]){const r=globalThis.getComputedStyle(n.doc.body).getPropertyValue(t[1]);return r&&r.split(",").map((e=>Qd.normalizeFontFamily(e)))||e}return e})))),i.used=i.used.map((e=>Qd.flatten(e))));let l,c;return i.used.find((e=>e.find((e=>e.startsWith("var(--")))))?l=[]:(c=new Map,i.used.forEach((e=>e.forEach((e=>{if(i.declared.find((t=>t.fontFamily==e))){const t=n.usedFonts&&n.usedFonts.filter((t=>t[0]==e));t&&t.length&&c.set(e,t)}})))),l=i.declared.filter((e=>!c.has(e.fontFamily)))),t.forEach((e=>{const t=e.stylesheet.children;t&&(op(t,i.declared,l,c,a),o.rules.discarded-=t.size)})),o}function np(e,t){e.forEach((e=>{if("Atrule"==e.type&&("media"==e.name||"supports"==e.name)&&e.block&&e.block.children)np(e.block.children,t);else if("Rule"==e.type){const r=lp(e.block);r.length&&t.used.push(r)}else if("Atrule"==e.type&&"font-face"==e.name){const r=Qd.normalizeFontFamily(ap(e.block.children,"font-family"));if(r){const n=ap(e.block.children,"font-weight")||"400",o=ap(e.block.children,"font-style")||"normal",i=ap(e.block.children,"font-variant")||"normal";n.split(",").forEach((e=>t.declared.push({fontFamily:r,fontWeight:Qd.getFontWeight(Qd.removeQuotes(e)),fontStyle:o,fontVariant:i})))}}}))}function op(e,t,r,n,o){const i=[];for(let s=e.head;s;s=s.next){const e=s.data;if("Atrule"==e.type&&("media"==e.name||"supports"==e.name)&&e.block&&e.block.children)op(e.block.children,t,r,n,o);else if("Atrule"==e.type&&"font-face"==e.name){const a=Qd.normalizeFontFamily(ap(e.block.children,"font-family"));if(a){const l=ap(e.block.children,"unicode-range");!r.find((e=>e.fontFamily==a))&&fp(o,l)&&ip(e,a,t,n)||i.push(s)}const l=[];for(let t=e.block.children.head;t;t=t.next)"font-display"==t.data.property&&l.push(t);l.length&&l.forEach((t=>e.block.children.remove(t)))}}i.forEach((t=>e.remove(t)))}function ip(e,t,r,n){let o;const i=n&&n.get(t);if(i&&i.length){let n=ap(e.block.children,"font-style")||"normal";if(tp.find((e=>n.trim().match(e)))){const s=Qd.getFontWeight(ap(e.block.children,"font-weight")||"400"),a=r.filter((e=>e.fontFamily==t&&e.fontStyle==n)).map((e=>e.fontWeight)).sort(((e,t)=>Number.parseInt(e,10)-Number.parseInt(t,10)));let l=i.map((e=>cp(e,n,a)));o=sp(s,l),o||(l=i.map((e=>((e=Array.from(e))[2]="normal",cp(e,n,a))))),o=sp(s,l)}else o=!0}else o=!0;return o}function sp(e,t){let r;for(const n of e.split(/[ ,]/))r=r||t.includes(Qd.getFontWeight(Qd.removeQuotes(n)));return r}function ap(e,t){let r;if(e&&(r=e.filter((e=>e.property==t)).tail),r)try{return Qd.removeQuotes(ad(r.data.value)).toLowerCase()}catch(e){}}function lp(e){let t=e.children.filter((e=>"font-family"==e.property)).tail,r=[];if(t){let e="";if(t.data.value.children){let n;t.data.value.children.forEach((t=>{"Operator"==t.type&&","==t.value&&e?(r.push(Qd.normalizeFontFamily(e)),e="",n=null):("Identifier"==n&&"Identifier"==t.type&&(e+=" "),e+=ad(t)),n=t.type}))}else t=ad(t.data.value);e&&r.push(Qd.normalizeFontFamily(e))}const n=e.children.filter((e=>"font"==e.property)).tail;if(n&&n.data&&n.data.value)try{At(ad(n.data.value)).family.forEach((e=>r.push(Qd.normalizeFontFamily(e))))}catch(e){}return r}function cp(e,t,r){let n;if(r=r.map((e=>String(Number.parseInt(e,10)))),e[2]==t){let t=Number(e[1]);r.length>1?(t>=400&&t<=500&&(n=r.find((e=>e>=t&&e<=500)),n||(n=up(t,r)),n||(n=hp(t,r))),t<400&&(n=r.slice().reverse().find((e=>e<=t)),n||(n=hp(t,r))),t>500&&(n=r.find((e=>e>=t)),n||(n=up(t,r)))):n=r[0]}return n}function up(e,t){return t.slice().reverse().find((t=>t<e))}function hp(e,t){return t.find((t=>t>e))}function dp(e,t,r,n){return t.forEach((t=>{t.block&&t.block.children&&t.prelude&&t.prelude.children&&("Atrule"!=t.type||"media"!=t.name&&"supports"!=t.name?"Rule"==t.type&&(n=pp(t.block.children,r,n)):n=dp(e,t.block.children,r,n))})),n}function pp(e,t,r){const n=mp(e,"content",t),o=mp(e,"quotes",t);return r.includes(n)||(r+=n),r.includes(o)||(r+=o),r}function mp(e,t,r){const n=ap(e,t)||"";return n?(r.textContent='tmp { content:"'+n+'"}',r.sheet&&r.sheet.cssRules?Qd.removeQuotes(r.sheet.cssRules[0].style.getPropertyValue("content")):n):""}function fp(e,t){if(t){const r=t.split(Kd);let n;const o=r.filter((t=>{const r=t.split(Zd);let o;if(2==r.length&&(r[0]=gp(r[0]),o="["+r[0]+"-"+gp("U+"+r[1])+"]"),1==r.length)if(r[0].includes("?")){const e=gp(r[0]),t=e;o="["+e.replace(Xd,"0")+"-"+t.replace(Xd,"F")+"]"}else r[0]&&(o="["+gp(r[0])+"]");if(o)try{return new RegExp(o,"u").test(e)}catch(e){return n=!0,!1}return!0}));return!n&&(!r.length||o.length)}return!0}function gp(e){for(e=e.replace(ep,"");e.length<6;)e="0"+e;return"\\u{"+e+"}"}var yp=Object.freeze({__proto__:null,process:rp});const bp="all",kp=["after","before","first-letter","first-line","placeholder","selection","part","marker"],vp="sf-hidden",wp=/-(ms|webkit|moz|o)-/;class xp{constructor(e,t,r){this.doc=e,this.mediaAllInfo=Ap(bp);const n=new Map;let o=0;const i=e.createElement("style");e.body.appendChild(i),t.forEach((t=>{if(!t.scoped){const s=t.stylesheet.children;if(s)if(t.mediaText&&t.mediaText!=bp){const a=Ap(t.mediaText);this.mediaAllInfo.medias.set("style-"+o+"-"+t.mediaText,a),Sp(e,s,a,o,r,n,i)}else Sp(e,s,this.mediaAllInfo,o,r,n,i)}o++})),_p(this.mediaAllInfo),Cp(this.mediaAllInfo,[],this.mediaAllInfo,i),i.remove()}getMediaAllInfo(){return this.mediaAllInfo}}function Ep(e,t,r){return new xp(e,t,r).getMediaAllInfo()}function Ap(e){const t={media:e,elements:new Map,medias:new Map,rules:new Map,pseudoRules:new Map};return e==bp&&(t.matchedStyles=new Map),t}function Sp(e,t,r,n,o,i,s){let a=0,l=0;t.forEach((t=>{if(t.block&&t.block.children&&t.prelude&&t.prelude.children)if("Atrule"==t.type&&"media"==t.name){const l=ad(t.prelude),c=Ap(l);r.medias.set("rule-"+n+"-"+a+"-"+l,c),a++,Sp(e,t.block.children,c,n,o,i,s)}else if("Rule"==t.type){const a=t.prelude.children.toArray(),c=t.prelude.children.toArray().map((e=>ad(e))),u={ruleData:t,mediaInfo:r,ruleIndex:l,sheetIndex:n,matchedSelectors:new Set,declarations:new Set,selectors:a,selectorsText:c};if(!function(e,t){return t.textContent=e+"{}",t.sheet?!t.sheet.cssRules.length:t.sheet}(c.join(","),s))for(let r=t.prelude.children.head,n=0;r;r=r.next,n++){const t=c[n];Tp(e,{selector:r,selectorText:t,ruleInfo:u},o,i)}l++}}))}function Tp(e,t,r,n){const o=function(e,t){const r=[];n(e={data:sd(ad(e.data),{context:"selector"})}),r.length&&(r.forEach((({parentSelector:e,selector:t})=>{0!=e.data.children.size&&t.prev&&"Combinator"!=t.prev.data.type&&"WhiteSpace"!=t.prev.data.type?e.data.children.remove(t):e.data.children.replace(t,sd("*",{context:"selector"}).children.head)})),t=ad(e.data).trim());return t;function n(e,t){if(e.data.children)for(let t=e.data.children.head;t;t=t.next)n(t,e);("PseudoClassSelector"==e.data.type||"PseudoElementSelector"==e.data.type&&(o(e)||kp.includes(e.data.name)))&&r.push({parentSelector:t,selector:e})}function o(e){const t=e.data.name;return t.startsWith("-")||t.startsWith("\\-")}}(t.selector,t.selectorText),i=o!=t.selectorText?o:t.selectorText,s=n.get(i);let a=s;if(!a)try{a=e.querySelectorAll(i),".sf-hidden"!=i&&(a=Array.from(e.querySelectorAll(i)).filter((e=>!e.classList.contains(vp)&&("none"!=e.style.getPropertyValue("display")||"important"!=e.style.getPropertyPriority("display")))))}catch(e){}if(a&&(s||n.set(i,a),a.length))if(o==t.selectorText)a.forEach((e=>function(e,t,r){const n=t.ruleInfo.mediaInfo,o=r.get(e);let i=n.elements.get(e);i||(i=[],o&&i.push({styleInfo:{styleData:o,declarations:new Set}}),n.elements.set(e,i));const s=Ip(t.selector.data);s.ruleIndex=t.ruleInfo.ruleIndex,s.sheetIndex=t.ruleInfo.sheetIndex,t.specificity=s,i.push(t)}(e,t,r)));else{let e=t.ruleInfo.mediaInfo.pseudoRules.get(t.ruleInfo.ruleData);e||(e=new Set,t.ruleInfo.mediaInfo.pseudoRules.set(t.ruleInfo.ruleData,e)),e.add(t.selectorText)}}function Cp(e,t,r,n){e.elements.forEach((o=>function(e,t){const r=new Map,n=new Set;return e.forEach((e=>{let o;o=e.styleInfo?e.styleInfo.styleData.children:e.ruleInfo.ruleData.block.children,function(e,t,r,n,o){for(let i=t.tail;i;i=i.prev){const t=i.data,s=ad(t);if("Declaration"==t.type&&(s.match(wp)||!n.has(t.property)||t.important)&&!Rp(s,o)){const o=e.get(t);(!o||t.important&&!o.important)&&(e.set(t,{selectorInfo:r,important:t.important}),s.match(wp)||n.add(t.property))}}}(r,o,e,n,t)})),r}(o,n).forEach(((n,o)=>{if(n.selectorInfo.ruleInfo||e==r){let i;if(n.selectorInfo.ruleInfo){i=n.selectorInfo.ruleInfo;const r=i.ruleData;([e,...t].find((e=>e.rules.get(r)))||e).rules.set(r,i),r&&i.matchedSelectors.add(n.selectorInfo.selectorText)}else{i=n.selectorInfo.styleInfo;const e=i.styleData;r.matchedStyles.get(e)||r.matchedStyles.set(e,i)}i.declarations.has(o)||i.declarations.add(o)}})))),delete e.elements,e.medias.forEach((o=>Cp(o,[e,...t],r,n)))}function Rp(e,t){let r;return t.textContent="single-file-declaration { "+e+"}",t.sheet&&!t.sheet.cssRules[0].style.length&&(e.match(wp)||(r=!0)),r}function _p(e){e.elements.forEach((e=>e.sort(((e,t)=>{return e.styleInfo&&!t.styleInfo?-1:!e.styleInfo&&t.styleInfo?1:(r=e.specificity,n=t.specificity,r.a>n.a?-1:r.a<n.a?1:r.b>n.b?-1:r.b<n.b?1:r.c>n.c?-1:r.c<n.c?1:r.sheetIndex>n.sheetIndex?-1:r.sheetIndex<n.sheetIndex?1:r.ruleIndex>n.ruleIndex?-1:r.ruleIndex<n.ruleIndex?1:-1);var r,n})))),e.medias.forEach(_p)}function Ip(e,t={a:0,b:0,c:0}){return"IdSelector"==e.type&&t.a++,("ClassSelector"==e.type||"AttributeSelector"==e.type||"PseudoClassSelector"==e.type&&"not"!=e.name)&&t.b++,("TypeSelector"==e.type&&"*"!=e.name||"PseudoElementSelector"==e.type)&&t.c++,e.children&&e.children.forEach((e=>Ip(e,t))),t}var Lp=Object.freeze({__proto__:null,getMediaAllInfo:Ep});const Np={flatten:ce},zp="all",Pp="screen";function Mp(e){const t={processed:0,discarded:0};return e.forEach(((r,n)=>{if(Up(r.mediaText||zp,Pp)&&r.stylesheet.children){Op(r.stylesheet.children,t).forEach((({cssRules:e,cssRule:t})=>e.remove(t)))}else e.delete(n)})),t}function Op(e,t,r=[]){for(let n=e.head;n;n=n.next){const o=n.data;"Atrule"==o.type&&"media"==o.name&&o.block&&o.block.children&&o.prelude&&o.prelude.children&&(t.processed++,Up(ad(o.prelude),Pp)?Op(o.block.children,t,r):(r.push({cssRules:e,cssRule:n}),t.discarded++))}return r}function Up(e,t){return Np.flatten(Nt(e).map((e=>Dp(e,t)))).find((e=>!e.not&&(e.value==t||e.value==zp)||e.not&&(e.value==zp||e.value!=t)))}function Dp(e,t,r=[]){return e.nodes.map(((n,o)=>{if("media-query"==n.type)return Dp(n,t,r);if("media-type"==n.type){const t={not:Boolean(o&&"keyword"==e.nodes[0].type&&"not"==e.nodes[0].value),value:n.value};r.find((e=>t.not==e.not&&t.value==e.value))||r.push(t)}})),r.length||r.push({not:!1,value:zp}),r}var Fp=Object.freeze({__proto__:null,process:Mp});function qp(e,t,r){const n={processed:0,discarded:0};let o=0;return e.forEach((e=>{if(!e.scoped){const t=e.stylesheet.children;if(t){let i;n.processed+=t.size,n.discarded+=t.size,i=e.mediaText&&"all"!=e.mediaText?r.medias.get("style-"+o+"-"+e.mediaText):r,Bp(t,o,i),n.discarded-=t.size}}o++})),t.forEach((e=>function(e,t){const r=[],n=t.matchedStyles.get(e);if(n){let t;for(let o=e.children.head;o&&!t;o=o.next)n.declarations.has(o.data)||r.push(o);r.forEach((t=>e.children.remove(t)))}}(e,r))),n}function Bp(e,t,r){let n=0;const o=[];for(let i=e.head;i;i=i.next){const e=i.data;if(e.block&&e.block.children&&e.prelude&&e.prelude.children){if("Atrule"==e.type&&"media"==e.name){const s=ad(e.prelude);Bp(e.block.children,t,r.medias.get("rule-"+t+"-"+n+"-"+s)),e.prelude.children.size&&e.block.children.size||o.push(i),n++}else if("Rule"==e.type){const t=r.rules.get(e),n=r.pseudoRules.get(e);t||n?t&&(jp(e,t,n),e.prelude.children.size&&e.block.children.size||o.push(i)):o.push(i)}}else e&&"Raw"!=e.type&&("Rule"!=e.type||e.prelude&&"Raw"!=e.prelude.type)||o.push(i)}o.forEach((t=>e.remove(t)))}function jp(e,t,r){const n=[],o=[];let i;for(let n=e.prelude.children.head;n;n=n.next){const e=ad(n.data);r&&r.has(e)&&(i=!0),t.matchedSelectors.has(e)||r&&r.has(e)||o.push(n)}if(!i)for(let r=e.block.children.tail;r;r=r.prev)t.declarations.has(r.data)||n.push(r);n.forEach((t=>e.block.children.remove(t))),o.forEach((t=>e.prelude.children.remove(t)))}var Hp=Object.freeze({__proto__:null,process:qp});const Vp="data:,";function Wp(e){e.querySelectorAll("picture").forEach((e=>{const t=e.querySelector("img");if(t){let{src:r,srcset:n}=$p(t);if(!r){const t=function(e){let t=e.find((e=>e.src)),r=t&&t.src,n=t&&t.srcset;r||(t=e.find((e=>Yp(e.src))),r=t&&t.src,r==Vp&&(r=null));n||(t=e.find((e=>Yp(e.srcset))),n=t&&t.srcset,n==Vp&&(n=null));return{src:r,srcset:n}}(Array.from(e.querySelectorAll("source")).reverse());r=t.src,n||(n=t.srcset)}Gp({src:r,srcset:n},t,e)}})),e.querySelectorAll(":not(picture) > img[srcset]").forEach((e=>Gp($p(e),e)))}function $p(e){let t=e.getAttribute("src");t==Vp&&(t=null);let r=Yp(e.getAttribute("srcset"));return r==Vp&&(r=null),{src:t,srcset:r}}function Gp(e,t,r){e.src?(t.setAttribute("src",e.src),t.setAttribute("srcset",""),t.setAttribute("sizes","")):(t.setAttribute("src",Vp),e.srcset?t.setAttribute("srcset",e.srcset):(t.setAttribute("srcset",""),t.setAttribute("sizes",""))),r&&r.querySelectorAll("source").forEach((e=>e.remove()))}function Yp(e){if(e){const t=bd(e);if(t.length)return t.find((e=>e.url)).url}}var Jp=Object.freeze({__proto__:null,process:Wp});const Qp=["allowfullscreen","async","autofocus","autoplay","checked","compact","controls","declare","default","defaultchecked","defaultmuted","defaultselected","defer","disabled","enabled","formnovalidate","hidden","indeterminate","inert","ismap","itemscope","loop","multiple","muted","nohref","noresize","noshade","novalidate","nowrap","open","pauseonexit","readonly","required","reversed","scoped","seamless","selected","sortable","truespeed","typemustmatch","visible"],Kp=["script","style","pre","textarea"],Zp=["id","class","style","lang","dir","onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmousemove","onmouseout","onkeypress","onkeydown","onkeyup"],Xp={form:{method:"get"},script:{language:"javascript",type:"text/javascript",charset:e=>!e.getAttribute("src")},style:{media:"all",type:"text/css"},link:{media:"all"}},em=/[ \t\f\r]+/g,tm=/[\n]+/g,rm=/^\s+$/,nm=[function(e){1==e.nodeType&&Array.from(e.attributes).forEach((t=>{Qp.includes(t.name)&&e.setAttribute(t.name,"")}))},function(e){3==e.nodeType&&e.previousSibling&&3==e.previousSibling.nodeType&&(e.textContent=e.previousSibling.textContent+e.textContent,e.previousSibling.remove())},function(e,t){if(3==e.nodeType){let r=e.parentElement;if(!(""==r.getAttribute(t.PRESERVED_SPACE_ELEMENT_ATTRIBUTE_NAME))){const t=e.textContent;let n=im(r);for(;n;)r=r.parentElement,n=r&&im(r);(!r||n)&&t.length>1&&(e.textContent=t.replace(em,function(e){return e.parentElement&&"HEAD"==e.parentElement.tagName?"\n":" "}(e)).replace(tm,"\n"))}}},function(e){if(8==e.nodeType&&"HTML"!=e.parentElement.tagName)return!e.textContent.toLowerCase().trim().startsWith("[if")},function(e){1==e.nodeType&&Array.from(e.attributes).forEach((t=>{if(Zp.includes(t.name.toLowerCase())){const r=e.getAttribute(t.name);(""==r||(r||"").match(rm))&&e.removeAttribute(t.name)}}))},function(e){if(1==e.nodeType){const t=Xp[e.tagName.toLowerCase()];t&&Object.keys(t).forEach((r=>{const n=t[r];("function"==typeof n?n(e):e.getAttribute(r)==n)&&e.removeAttribute(r)}))}},function(e){if(1==e.nodeType&&"SCRIPT"==e.tagName&&"application/ld+json"==e.type&&e.textContent.trim())try{e.textContent=JSON.stringify(JSON.parse(e.textContent))}catch(e){}},e=>function(e,t,r){if(1==e.nodeType&&e.tagName.toLowerCase()==t.toLowerCase()){let t=e.previousSibling;const n=[];for(;t&&3==t.nodeType&&!t.textContent.trim();)n.push(t),t=t.previousSibling;t&&1==t.nodeType&&t.tagName==e.tagName&&r(e,t)&&(e.textContent=t.textContent+e.textContent,n.forEach((e=>e.remove())),t.remove())}}(e,"style",((e,t)=>e.parentElement&&"HEAD"==e.parentElement.tagName&&e.media==t.media&&e.title==t.title))];function om(e,t){!function(e){e.querySelectorAll("style, script:not([src])").forEach((e=>{e.textContent.trim()||e.remove()}))}(e);const r=e.createTreeWalker(e.documentElement,4294967295,null,!1);let n=r.nextNode();for(;n;){const e=nm.find((e=>e(n,t))),o=n;n=r.nextNode(),e&&o.remove()}}function im(e){return e&&!Kp.includes(e.tagName.toLowerCase())}var sm=Object.freeze({__proto__:null,process:om});const am=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],lm=[{tagName:"head",accept:e=>!e.childNodes.length||1==e.childNodes[0].nodeType},{tagName:"body",accept:e=>!e.childNodes.length}],cm=[{tagName:"html",accept:e=>!e||8!=e.nodeType},{tagName:"head",accept:e=>!e||8!=e.nodeType&&(3!=e.nodeType||!pm(e.textContent))},{tagName:"body",accept:e=>!e||8!=e.nodeType},{tagName:"li",accept:(e,t)=>!e&&t.parentElement&&("UL"==t.parentElement.tagName||"OL"==t.parentElement.tagName)||e&&["LI"].includes(e.tagName)},{tagName:"dt",accept:e=>!e||["DT","DD"].includes(e.tagName)},{tagName:"p",accept:e=>e&&["ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","DETAILS","DIV","DL","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","H1","H2","H3","H4","H5","H6","HEADER","HR","MAIN","NAV","OL","P","PRE","SECTION","TABLE","UL"].includes(e.tagName)},{tagName:"dd",accept:e=>!e||["DT","DD"].includes(e.tagName)},{tagName:"rt",accept:e=>!e||["RT","RP"].includes(e.tagName)},{tagName:"rp",accept:e=>!e||["RT","RP"].includes(e.tagName)},{tagName:"optgroup",accept:e=>!e||["OPTGROUP"].includes(e.tagName)},{tagName:"option",accept:e=>!e||["OPTION","OPTGROUP"].includes(e.tagName)},{tagName:"colgroup",accept:e=>!e||8!=e.nodeType&&(3!=e.nodeType||!pm(e.textContent))},{tagName:"caption",accept:e=>!e||8!=e.nodeType&&(3!=e.nodeType||!pm(e.textContent))},{tagName:"thead",accept:e=>!e||["TBODY","TFOOT"].includes(e.tagName)},{tagName:"tbody",accept:e=>!e||["TBODY","TFOOT"].includes(e.tagName)},{tagName:"tfoot",accept:e=>!e},{tagName:"tr",accept:e=>!e||["TR"].includes(e.tagName)},{tagName:"td",accept:e=>!e||["TD","TH"].includes(e.tagName)},{tagName:"th",accept:e=>!e||["TD","TH"].includes(e.tagName)}],um=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"];function hm(e,t){const r=e.doctype;let n="";return r&&(n="<!DOCTYPE "+r.nodeName,r.publicId?(n+=' PUBLIC "'+r.publicId+'"',r.systemId&&(n+=' "'+r.systemId+'"')):r.systemId&&(n+=' SYSTEM "'+r.systemId+'"'),r.internalSubset&&(n+=" ["+r.internalSubset+"]"),n+="> "),n+dm(e.documentElement,t)}function dm(e,t,r){return 3==e.nodeType?function(e){const t=e.parentNode;let r;t&&1==t.nodeType&&(r=t.tagName.toLowerCase());return!r||um.includes(r)?"script"==r?e.textContent.replace(/<\//gi,"<\\/").replace(/\/>/gi,"\\/>"):e.textContent:e.textContent.replace(/&/g,"&").replace(/\u00a0/g," ").replace(/</g,"<").replace(/>/g,">")}(e):8==e.nodeType?"\x3c!--"+e.textContent+"--\x3e":1==e.nodeType?function(e,t,r){const n=e.tagName.toLowerCase(),o=t&&lm.find((t=>n==t.tagName&&t.accept(e)));let i="";o&&!e.attributes.length||(i="<"+n,Array.from(e.attributes).forEach((r=>i+=function(e,t,r){const n=e.name;let o="";if(!n.match(/["'>/=]/)){let i,s=e.value;r&&"class"==n&&(s=Array.from(t.classList).map((e=>e.trim())).join(" ")),s=s.replace(/&/g,"&").replace(/\u00a0/g," "),s.includes('"')&&(s.includes("'")||!r?s=s.replace(/"/g,"""):i=!0);const a=!r||!s.match(/^[^ \t\n\f\r'"`=<>]+$/);o+=" ",e.namespace?"http://www.w3.org/XML/1998/namespace"==e.namespaceURI?o+="xml:"+n:"http://www.w3.org/2000/xmlns/"==e.namespaceURI?("xmlns"!==n&&(o+="xmlns:"),o+=n):"http://www.w3.org/1999/xlink"==e.namespaceURI?o+="xlink:"+n:o+=n:o+=n,""!=s&&(o+="=",a&&(o+=i?"'":'"'),o+=s,a&&(o+=i?"'":'"'))}return o}(r,e,t))),i+=">");"TEMPLATE"!=e.tagName||e.childNodes.length?Array.from(e.childNodes).forEach((e=>i+=dm(e,t,r||"svg"==n))):i+=e.innerHTML;const s=t&&cm.find((t=>n==t.tagName&&t.accept(e.nextSibling,e)));(r||!s&&!am.includes(n))&&(i+="</"+n+">");return i}(e,t,r):void 0}function pm(e){return Boolean(e.match(/^[ \t\n\f\r]/))}var mm=Object.freeze({__proto__:null,process:hm}),fm=Object.freeze({__proto__:null,fontsAltMinifier:Jd,fontsMinifier:yp,matchedRules:Lp,mediasAltMinifier:Fp,cssRulesMinifier:Hp,imagesAltMinifier:Jp,htmlMinifier:sm,serializer:mm});const gm=globalThis.Set,ym=globalThis.Map;let bm,km;class vm{constructor(e){this.options=e}async run(){const e=globalThis._singleFile_waitForUserScript;this.options.userScriptEnabled&&e&&await e(bm.ON_BEFORE_CAPTURE_EVENT_NAME),this.runner=new zm(this.options,!0),await this.runner.loadPage(),await this.runner.initialize(),this.options.userScriptEnabled&&e&&await e(bm.ON_AFTER_CAPTURE_EVENT_NAME),await this.runner.run()}cancel(){this.cancelled=!0,this.runner&&this.runner.cancel()}getPageData(){return this.runner.getPageData()}}const wm="page-loading",xm="page-loaded",Em="resource-initializing",Am="resources-initialized",Sm="resource-loaded",Tm="page-ended",Cm="stage-started",Rm="stage-ended",_m="stage-task-started",Im="stage-task-ended";class Lm{constructor(e,t){return{type:e,detail:t,PAGE_LOADING:wm,PAGE_LOADED:xm,RESOURCES_INITIALIZING:Em,RESOURCES_INITIALIZED:Am,RESOURCE_LOADED:Sm,PAGE_ENDED:Tm,STAGE_STARTED:Cm,STAGE_ENDED:Rm,STAGE_TASK_STARTED:_m,STAGE_TASK_ENDED:Im}}}const Nm=[{sequential:[{action:"preProcessPage"},{option:"loadDeferredImagesKeepZoomLevel",action:"resetZoomLevel"},{action:"replaceStyleContents"},{action:"replaceInvalidElements"},{action:"resetCharsetMeta"},{option:"saveFavicon",action:"saveFavicon"},{action:"replaceCanvasElements"},{action:"insertFonts"},{action:"insertShadowRootContents"},{action:"setInputValues"},{option:"moveStylesInHead",action:"moveStylesInHead"},{option:"blockScripts",action:"removeEmbedScripts"},{option:"selected",action:"removeUnselectedElements"},{option:"blockVideos",action:"insertVideoPosters"},{option:"blockVideos",action:"insertVideoLinks"},{option:"removeFrames",action:"removeFrames"},{action:"removeDiscardedResources"},{option:"removeHiddenElements",action:"removeHiddenElements"},{action:"resolveHrefs"},{action:"resolveStyleAttributeURLs"}],parallel:[{option:"blockVideos",action:"insertMissingVideoPosters"},{action:"resolveStylesheetURLs"},{option:"!removeFrames",action:"resolveFrameURLs"},{action:"resolveHtmlImportURLs"}]},{sequential:[{option:"removeUnusedStyles",action:"removeUnusedStyles"},{option:"removeAlternativeMedias",action:"removeAlternativeMedias"},{option:"removeUnusedFonts",action:"removeUnusedFonts"}],parallel:[{action:"processStylesheets"},{action:"processStyleAttributes"},{action:"processPageResources"},{action:"processScripts"}]},{sequential:[{option:"removeAlternativeImages",action:"removeAlternativeImages"}],parallel:[{option:"removeAlternativeFonts",action:"removeAlternativeFonts"},{option:"!removeFrames",action:"processFrames"},{option:"!removeImports",action:"processHtmlImports"}]},{sequential:[{action:"replaceStylesheets"},{action:"replaceStyleAttributes"},{action:"insertVariables"},{option:"compressHTML",action:"compressHTML"},{action:"cleanupPage"}],parallel:[{option:"enableMaff",action:"insertMAFFMetaData"},{action:"setDocInfo"}]}];class zm{constructor(e,t){const r=t&&e.doc;this.root=t,this.options=e,this.options.url=this.options.url||r&&this.options.doc.location.href;const n=this.options.url.match(/^.*\//);if(this.options.resourceReferrer=this.options.passReferrerOnError&&n&&n[0],this.options.baseURI=r&&this.options.doc.baseURI,this.options.rootDocument=t,this.options.updatedResources=this.options.updatedResources||{},this.options.fontTests=new ym,this.batchRequest=new Pm,this.processor=new Hm(e,this.batchRequest),r){const e=bm.preProcessDoc(this.options.doc,this.options.win,this.options);this.options.canvases=e.canvases,this.options.fonts=e.fonts,this.options.stylesheets=e.stylesheets,this.options.images=e.images,this.options.posters=e.posters,this.options.videos=e.videos,this.options.usedFonts=e.usedFonts,this.options.shadowRoots=e.shadowRoots,this.options.imports=e.imports,this.options.referrer=e.referrer,this.markedElements=e.markedElements,this.invalidElements=e.invalidElements}this.options.saveRawPage&&(this.options.removeFrames=!0),this.options.content=this.options.content||(r?bm.serialize(this.options.doc):null),this.onprogress=e.onprogress||(()=>{})}async loadPage(){this.onprogress(new Lm(wm,{pageURL:this.options.url,frame:!this.root})),await this.processor.loadPage(this.options.content),this.onprogress(new Lm(xm,{pageURL:this.options.url,frame:!this.root}))}async initialize(){this.onprogress(new Lm(Em,{pageURL:this.options.url})),await this.executeStage(0),this.pendingPromises=this.executeStage(1),this.root&&this.options.doc&&bm.postProcessDoc(this.options.doc,this.markedElements,this.invalidElements)}cancel(){function e(e){e.runner&&e.runner.cancel()}this.cancelled=!0,this.batchRequest.cancel(),this.root&&(this.options.frames&&this.options.frames.forEach(e),this.options.imports&&this.options.imports.forEach(e))}async run(){this.root&&(this.processor.initialize(this.batchRequest),this.onprogress(new Lm(Am,{pageURL:this.options.url,max:this.processor.maxResources}))),await this.batchRequest.run((e=>{e.pageURL=this.options.url,this.onprogress(new Lm(Sm,e))}),this.options),await this.pendingPromises,this.options.doc=null,this.options.win=null,await this.executeStage(2),await this.executeStage(3),this.processor.finalize()}getDocument(){return this.processor.doc}getStyleSheets(){return this.processor.stylesheets}getPageData(){return this.root&&this.onprogress(new Lm(Tm,{pageURL:this.options.url})),this.processor.getPageData()}async executeStage(e){const t=!this.root;let r;return this.onprogress(new Lm(Cm,{pageURL:this.options.url,step:e,frame:t})),Nm[e].sequential.forEach((r=>{this.onprogress(new Lm(_m,{pageURL:this.options.url,step:e,task:r.action,frame:t})),this.cancelled||this.executeTask(r),this.onprogress(new Lm(Im,{pageURL:this.options.url,step:e,task:r.action,frame:t}))})),r=Nm[e].parallel?await Promise.all(Nm[e].parallel.map((async r=>{this.onprogress(new Lm(_m,{pageURL:this.options.url,step:e,task:r.action,frame:t})),this.cancelled||await this.executeTask(r),this.onprogress(new Lm(Im,{pageURL:this.options.url,step:e,task:r.action,frame:t}))}))):Promise.resolve(),this.onprogress(new Lm(Rm,{pageURL:this.options.url,step:e,frame:t})),r}executeTask(e){if(!e.option||e.option.startsWith("!")&&!this.options[e.option]||this.options[e.option])return this.processor[e.action]()}}class Pm{constructor(){this.requests=new ym,this.duplicates=new ym}addURL(e,{asBinary:t,expectedType:r,groupDuplicates:n,baseURI:o,blockMixedContent:i}={}){return new Promise(((s,a)=>{const l=JSON.stringify([e,t,r,o,i]);let c=this.requests.get(l);c||(c=[],this.requests.set(l,c));const u={resolve:s,reject:a};if(c.push(u),n){let e=this.duplicates.get(l);e||(e=[],this.duplicates.set(l,e)),e.push(u)}}))}getMaxResources(){return this.requests.size}run(e,t){const r=[...this.requests.keys()];let n=0;return Promise.all(r.map((async r=>{const[o,i,s,a,l]=JSON.parse(r),c=this.requests.get(r);try{const u=n;n+=1;const h=await bm.getContent(o,{asBinary:i,expectedType:s,maxResourceSize:t.maxResourceSize,maxResourceSizeEnabled:t.maxResourceSizeEnabled,frameId:t.windowId,resourceReferrer:t.resourceReferrer,baseURI:a,blockMixedContent:l,acceptHeaders:t.acceptHeaders,networkTimeout:t.networkTimeout});e({url:o}),this.cancelled||c.forEach((e=>{const t=this.duplicates.get(r),n=t&&t.length>1&&t.includes(e);e.resolve({content:h.data,indexResource:u,duplicate:n})}))}catch(t){n+=1,e({url:o}),c.forEach((e=>e.reject(t)))}this.requests.delete(r)})))}cancel(){this.cancelled=!0;[...this.requests.keys()].forEach((e=>{this.requests.get(e).forEach((e=>e.reject())),this.requests.delete(e)}))}}const Mm=["data:text/"],Om="data:image/svg+xml",Um=/<script/gi,Dm=/<noscript/gi,Fm=/<canvas/gi,qm="shadowroot",Bm="data-template-shadow-root",jm="utf-8";class Hm{constructor(e,t){this.options=e,this.stats=new ff(e),this.baseURI=rf(e.baseURI||e.url),this.batchRequest=t,this.stylesheets=new ym,this.styles=new ym,this.cssVariables=new ym,this.fontTests=e.fontTests}initialize(){this.options.saveDate=new Date,this.options.saveUrl=this.options.url,this.options.enableMaff&&(this.maffMetaDataPromise=this.batchRequest.addURL(bm.resolveURL("index.rdf",this.options.baseURI||this.options.url),{expectedType:"document"})),this.maxResources=this.batchRequest.getMaxResources(),this.options.saveRawPage||this.options.removeFrames||!this.options.frames||this.options.frames.forEach((e=>this.maxResources+=e.maxResources||0)),!this.options.removeImports&&this.options.imports&&this.options.imports.forEach((e=>this.maxResources+=e.maxResources||0)),this.stats.set("processed","resources",this.maxResources)}async loadPage(e,t){let r;if(e&&!this.options.saveRawPage||(r=await bm.getContent(this.baseURI,{maxResourceSize:this.options.maxResourceSize,maxResourceSizeEnabled:this.options.maxResourceSizeEnabled,charset:t,frameId:this.options.windowId,resourceReferrer:this.options.resourceReferrer,expectedType:"document",acceptHeaders:this.options.acceptHeaders,networkTimeout:this.options.networkTimeout}),e=r.data),this.doc=bm.parseDocContent(e,this.baseURI),this.options.saveRawPage){let t;if(this.doc.querySelectorAll('meta[charset], meta[http-equiv="content-type"]').forEach((e=>{const r=e.content.split(";")[1];r&&!t&&(t=r.split("=")[1].trim().toLowerCase())})),t&&r.charset&&t.toLowerCase()!=r.charset.toLowerCase())return this.loadPage(e,t)}this.workStyleElement=this.doc.createElement("style"),this.doc.body.appendChild(this.workStyleElement),this.onEventAttributeNames=function(e){const t=e.createElement("div"),r=[];for(const e in t)e.startsWith("on")&&r.push(e);return r.push("onunload"),r}(this.doc)}finalize(){this.workStyleElement.parentNode&&this.workStyleElement.remove()}async getPageData(){bm.postProcessDoc(this.doc);const e=bm.parseURL(this.baseURI);if(this.options.insertSingleFileComment){const e=this.doc.documentElement.firstChild;let t=this.options.saveUrl,r=this.options.saveDate;if(8==e.nodeType&&(e.textContent.includes(bm.COMMENT_HEADER_LEGACY)||e.textContent.includes(bm.COMMENT_HEADER))){const n=this.doc.documentElement.firstChild.textContent.split("\n");try{const[,,o,i]=n;t=o.split("url: ")[1],r=i.split("saved date: ")[1],e.remove()}catch(e){}}const n=(this.options.infobarContent||"").replace(/\\n/g,"\n").replace(/\\t/g,"\t"),o=this.doc.createComment("\n "+(this.options.useLegacyCommentHeader?bm.COMMENT_HEADER_LEGACY:bm.COMMENT_HEADER)+" \n url: "+t+" \n saved date: "+r+(n?" \n info: "+n:"")+"\n");this.doc.documentElement.insertBefore(o,this.doc.documentElement.firstChild)}if(this.options.insertCanonicalLink&&this.options.saveUrl.match(Km)){let e=this.doc.querySelector("link[rel=canonical]");e||(e=this.doc.createElement("link"),e.setAttribute("rel","canonical"),this.doc.head.appendChild(e)),e&&!e.href&&(e.href=this.options.saveUrl)}if(this.options.insertMetaCSP){const e=this.doc.createElement("meta");e.httpEquiv="content-security-policy",e.content="default-src 'none'; font-src 'self' data:; img-src 'self' data:; style-src 'unsafe-inline'; media-src 'self' data:; script-src 'unsafe-inline' data:;",this.doc.head.appendChild(e)}if(this.options.insertMetaNoIndex){let e=this.doc.querySelector("meta[name=robots][content*=noindex]");e||(e=this.doc.createElement("meta"),e.setAttribute("name","robots"),e.setAttribute("content","noindex"),this.doc.head.appendChild(e))}const t=this.doc.createElement("style");let r;t.textContent='img[src="data:,"],source[src="data:,"]{display:none!important}',this.doc.head.appendChild(t),this.options.displayStats&&(r=bm.getContentSize(this.doc.documentElement.outerHTML));const n=bm.serialize(this.doc,this.options.compressHTML);if(this.options.displayStats){const e=bm.getContentSize(n);this.stats.set("processed","HTML bytes",e),this.stats.add("discarded","HTML bytes",r-e)}let o=await Jm.evalTemplate(this.options.filenameTemplate,this.options,n)||"";const i=this.options.filenameReplacementCharacter;if(o=bm.getValidFilename(o,this.options.filenameReplacedCharacters,i),this.options.backgroundSave||(o=o.replace(/\//g,i)),!this.options.saveToGDrive&&!this.options.saveToGitHub&&!this.options.saveWithCompanion&&("bytes"==this.options.filenameMaxLengthUnit&&bm.getContentSize(o)>this.options.filenameMaxLength||o.length>this.options.filenameMaxLength)){const e=o.match(/(\.[^.]{3,4})$/),t=e&&e[0]&&e[0].length>1?e[0]:"";o="bytes"==this.options.filenameMaxLengthUnit?await bm.truncateText(o,this.options.filenameMaxLength-t.length):o.substring(0,this.options.filenameMaxLength-t.length),o=o+"…"+t}o||(o="Unnamed page");const s=this.baseURI.match(/([^/]*)\/?(\.html?.*)$/)||this.baseURI.match(/\/\/([^/]*)\/?$/),a={stats:this.stats.data,title:this.options.title||(this.baseURI&&s?s[1]:e.hostname?e.hostname:""),filename:o,content:n};return this.options.addProof&&(a.hash=await bm.digest("SHA-256",n)),this.options.retrieveLinks&&(a.links=Array.from(new gm(Array.from(this.doc.links).map((e=>e.href))))),a}preProcessPage(){this.options.win&&this.doc.body.querySelectorAll(':not(svg) title, meta, link[href][rel*="icon"]').forEach((e=>e instanceof this.options.win.HTMLElement&&this.doc.head.appendChild(e))),this.options.images&&!this.options.saveRawPage&&(this.doc.querySelectorAll("img["+bm.IMAGE_ATTRIBUTE_NAME+"]").forEach((e=>{const t=e.getAttribute(bm.IMAGE_ATTRIBUTE_NAME);if(t){const r=this.options.images[Number(t)];r&&(this.options.removeHiddenElements&&(r.size&&!r.size.pxWidth&&!r.size.pxHeight||""==e.getAttribute(bm.HIDDEN_CONTENT_ATTRIBUTE_NAME))?e.setAttribute("src",bm.EMPTY_RESOURCE):(r.currentSrc&&(e.dataset.singleFileOriginURL=e.getAttribute("src"),e.setAttribute("src",r.currentSrc)),this.options.loadDeferredImages&&(e.getAttribute("src")&&e.getAttribute("src")!=bm.EMPTY_RESOURCE||!e.getAttribute("data-src")||(r.src=e.dataset.src,e.setAttribute("src",e.dataset.src),e.removeAttribute("data-src")))))}})),this.options.loadDeferredImages&&this.doc.querySelectorAll("img[data-srcset]").forEach((e=>{!e.getAttribute("srcset")&&e.getAttribute("data-srcset")&&(e.setAttribute("srcset",e.dataset.srcset),e.removeAttribute("data-srcset"))})))}replaceStyleContents(){this.options.stylesheets&&this.doc.querySelectorAll("style").forEach(((e,t)=>{if(e.getAttribute(bm.STYLESHEET_ATTRIBUTE_NAME)){const r=this.options.stylesheets[Number(t)];r&&(e.textContent=r)}}))}removeUnselectedElements(){function e(e){1==e.nodeType&&e.querySelector("svg,style,link")||!r(e)?t(e):e.remove()}function t(t){r(t)&&(t.style.setProperty("display","none","important"),Array.from(t.childNodes).forEach(e))}function r(e){if(1==e.nodeType){const t=e.tagName&&e.tagName.toLowerCase();return"svg"!=t&&"style"!=t&&"link"!=t}}!function r(n){let o=!1;Array.from(n.childNodes).forEach((n=>{if(1==n.nodeType){const i=""==n.getAttribute(bm.SELECTED_CONTENT_ATTRIBUTE_NAME);o=o||i,i?(n.removeAttribute(bm.SELECTED_CONTENT_ATTRIBUTE_NAME),r(n)):o?e(n):t(n)}}))}(this.doc.body),this.doc.body.removeAttribute(bm.SELECTED_CONTENT_ATTRIBUTE_NAME)}insertVideoPosters(){this.options.posters&&this.doc.querySelectorAll("video[src], video > source[src]").forEach((e=>{let t;t="VIDEO"==e.tagName?e:e.parentElement;const r=e.getAttribute(bm.POSTER_ATTRIBUTE_NAME);if(r){const e=this.options.posters[Number(r)];!t.poster&&e&&t.setAttribute("poster",e)}}))}insertVideoLinks(){const e="16px";this.doc.querySelectorAll("video").forEach((t=>{const r=t.getAttribute(bm.VIDEO_ATTRIBUTE_NAME);if(r){const n=this.options.videos[Number(r)],o=n.src||t.src;if(t&&o){const r=this.doc.createElement("a"),i=this.doc.createElement("img");r.href=o,r.target="_blank",r.style.setProperty("z-index",2147483647,"important"),r.style.setProperty("position","absolute","important"),r.style.setProperty("top","8px","important"),r.style.setProperty("left","8px","important"),r.style.setProperty("width",e,"important"),r.style.setProperty("height",e,"important"),r.style.setProperty("min-width",e,"important"),r.style.setProperty("min-height",e,"important"),r.style.setProperty("max-width",e,"important"),r.style.setProperty("max-height",e,"important"),i.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABAAgMAAADXB5lNAAABhmlDQ1BJQ0MgcHJvZmlsZQAAKJF9kj1Iw0AYht+mSkUrDnYQcchQnSyIijqWKhbBQmkrtOpgcukfNGlIUlwcBdeCgz+LVQcXZ10dXAVB8AfEydFJ0UVK/C4ptIjx4LiH9+59+e67A4RGhalm1wSgapaRisfEbG5VDLyiDwEAvZiVmKkn0osZeI6ve/j4ehfhWd7n/hz9St5kgE8kjjLdsIg3iGc2LZ3zPnGIlSSF+Jx43KACiR+5Lrv8xrnosMAzQ0YmNU8cIhaLHSx3MCsZKvE0cVhRNcoXsi4rnLc4q5Uaa9XJbxjMaytprtMcQRxLSCAJETJqKKMCCxFaNVJMpGg/5uEfdvxJcsnkKoORYwFVqJAcP/gb/O6tWZiadJOCMaD7xbY/RoHALtCs2/b3sW03TwD/M3Cltf3VBjD3SXq9rYWPgIFt4OK6rcl7wOUOMPSkS4bkSH6aQqEAvJ/RM+WAwVv6EGtu31r7OH0AMtSr5Rvg4BAYK1L2use9ezr79u+ZVv9+AFlNcp0UUpiqAAAACXBIWXMAAC4jAAAuIwF4pT92AAAAB3RJTUUH5AsHAB8H+DhhoQAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAAAAJUExURQAAAICHi4qKioTuJAkAAAABdFJOUwBA5thmAAAAAWJLR0QCZgt8ZAAAAJJJREFUOI3t070NRCEMA2CnYAOyDyPwpHj/Va7hJ3FzV7zy3ET5JIwoAF6Jk4wzAJAkzxAYG9YRTgB+24wBgKmfrGAKTcEfAY4KRlRoIeBTgKOCERVaCPgU4Khge2GqKOBTgKOCERVaAEC/4PNcnyoSWHpjqkhwKxbcig0Q6AorXYF/+A6eIYD1lVbwG/jdA6/kA2THRAURVubcAAAAAElFTkSuQmCC",i.style.setProperty("width",e,"important"),i.style.setProperty("height",e,"important"),i.style.setProperty("min-width",e,"important"),i.style.setProperty("min-height",e,"important"),i.style.setProperty("max-width",e,"important"),i.style.setProperty("max-height",e,"important"),r.appendChild(i),t.insertAdjacentElement("afterend",r);const s=t.parentNode.style.getPropertyValue("position");(n.positionParent||s&&"static"==s)&&"static"!=n.positionParent||t.parentNode.style.setProperty("position","relative","important")}}}))}removeFrames(){const e=this.doc.querySelectorAll('iframe, frame, object[type="text/html"][data]');this.stats.set("discarded","frames",e.length),this.stats.set("processed","frames",e.length),this.doc.querySelectorAll('iframe, frame, object[type="text/html"][data]').forEach((e=>e.remove()))}removeEmbedScripts(){const e="javascript:";this.onEventAttributeNames.forEach((e=>this.doc.querySelectorAll("["+e+"]").forEach((t=>t.removeAttribute(e))))),this.doc.querySelectorAll("[href]").forEach((t=>{t.href&&t.href.match&&t.href.trim().startsWith(e)&&t.removeAttribute("href")})),this.doc.querySelectorAll("[src]").forEach((t=>{t.src&&t.src.trim().startsWith(e)&&t.removeAttribute("src")}));const t=this.doc.querySelectorAll('script:not([type="application/ld+json"]):not([data-template-shadow-root])');this.stats.set("discarded","scripts",t.length),this.stats.set("processed","scripts",t.length),t.forEach((e=>e.remove()))}removeDiscardedResources(){this.doc.querySelectorAll("."+bm.SINGLE_FILE_UI_ELEMENT_CLASS).forEach((e=>e.remove()));const e=new ym;this.doc.querySelectorAll("noscript").forEach((t=>{const r=this.doc.createElement("div");r.innerHTML=t.dataset.singleFileDisabledNoscript,t.replaceWith(r),e.set(r,t)})),this.doc.querySelectorAll("meta[http-equiv=refresh], meta[disabled-http-equiv]").forEach((e=>e.remove())),Array.from(e).forEach((([e,t])=>{t.dataset.singleFileDisabledNoscript=e.innerHTML,e.replaceWith(t)})),this.doc.querySelectorAll('meta[http-equiv="content-security-policy"]').forEach((e=>e.remove()));const t=this.doc.querySelectorAll('applet, object[data]:not([type="image/svg+xml"]):not([type="image/svg-xml"]):not([type="text/html"]), embed[src]:not([src*=".svg"]):not([src*=".pdf"])');this.stats.set("discarded","objects",t.length),this.stats.set("processed","objects",t.length),t.forEach((e=>e.remove()));this.doc.querySelectorAll("link[rel~=preconnect], link[rel~=prerender], link[rel~=dns-prefetch], link[rel~=preload], link[rel~=manifest], link[rel~=prefetch]").forEach((e=>{const t=e.getAttribute("rel").replace(/(preconnect|prerender|dns-prefetch|preload|prefetch|manifest)/g,"").trim();t.length?e.setAttribute("rel",t):e.remove()})),this.doc.querySelectorAll('link[rel*=stylesheet][rel*=alternate][title],link[rel*=stylesheet]:not([href]),link[rel*=stylesheet][href=""]').forEach((e=>e.remove())),this.options.removeHiddenElements&&this.doc.querySelectorAll("input[type=hidden]").forEach((e=>e.remove())),this.options.saveFavicon||this.doc.querySelectorAll('link[rel*="icon"]').forEach((e=>e.remove())),this.doc.querySelectorAll("a[ping]").forEach((e=>e.removeAttribute("ping")))}replaceInvalidElements(){this.doc.querySelectorAll("template["+bm.INVALID_ELEMENT_ATTRIBUTE_NAME+"]").forEach((e=>{const t=this.doc.createElement("span"),r=e.content.firstChild;r&&(r.hasAttributes()&&Array.from(r.attributes).forEach((e=>t.setAttribute(e.name,e.value))),r.childNodes.forEach((e=>t.appendChild(e.cloneNode(!0))))),e.replaceWith(t)}))}resetCharsetMeta(){let e;this.doc.querySelectorAll('meta[charset], meta[http-equiv="content-type"]').forEach((t=>{const r=t.content.split(";")[1];r&&!e&&(e=r.split("=")[1],e&&(this.charset=e.trim().toLowerCase())),t.remove()}));const t=this.doc.createElement("meta");t.setAttribute("charset",jm),this.doc.head.firstChild?this.doc.head.insertBefore(t,this.doc.head.firstChild):this.doc.head.appendChild(t)}setInputValues(){this.doc.querySelectorAll("input:not([type=radio]):not([type=checkbox])").forEach((e=>{const t=e.getAttribute(bm.INPUT_VALUE_ATTRIBUTE_NAME);e.setAttribute("value",t||"")})),this.doc.querySelectorAll("input[type=radio], input[type=checkbox]").forEach((e=>{"true"==e.getAttribute(bm.INPUT_VALUE_ATTRIBUTE_NAME)&&e.setAttribute("checked","")})),this.doc.querySelectorAll("textarea").forEach((e=>{const t=e.getAttribute(bm.INPUT_VALUE_ATTRIBUTE_NAME);e.textContent=t||""})),this.doc.querySelectorAll("select").forEach((e=>{e.querySelectorAll("option").forEach((e=>{null!=e.getAttribute(bm.INPUT_VALUE_ATTRIBUTE_NAME)&&e.setAttribute("selected","")}))}))}moveStylesInHead(){this.doc.querySelectorAll("style").forEach((e=>{""==e.getAttribute(bm.STYLE_ATTRIBUTE_NAME)&&this.doc.head.appendChild(e)}))}saveFavicon(){let e=this.doc.querySelector('link[href][rel="icon"]');e||(e=this.doc.querySelector('link[href][rel="shortcut icon"]')),e||(e=this.doc.createElement("link"),e.setAttribute("type","image/x-icon"),e.setAttribute("rel","shortcut icon"),e.setAttribute("href","/favicon.ico")),this.doc.head.appendChild(e)}replaceCanvasElements(){this.options.canvases&&this.doc.querySelectorAll("canvas").forEach((e=>{const t=e.getAttribute(bm.CANVAS_ATTRIBUTE_NAME);if(t){const r=this.options.canvases[Number(t)];r&&(Jm.setBackgroundImage(e,"url("+r.dataURI+")"),this.stats.add("processed","canvas",1))}}))}insertFonts(){if(this.options.fonts&&this.options.fonts.length){let e="";if(this.options.fonts.forEach((t=>{if(t["font-family"]&&t.src){e+="@font-face{";let r="";Object.keys(t).forEach((e=>{r&&(r+=";"),r+=e+":"+t[e]})),e+=r+"}"}})),e){const t=this.doc.createElement("style");t.textContent=e;const r=this.doc.querySelector("style");r?r.parentElement.insertBefore(t,r):this.doc.head.insertBefore(t,this.doc.head.firstChild)}}}removeHiddenElements(){const e=this.doc.querySelectorAll("["+bm.HIDDEN_CONTENT_ATTRIBUTE_NAME+"]"),t=this.doc.querySelectorAll("["+bm.REMOVED_CONTENT_ATTRIBUTE_NAME+"]");if(this.stats.set("discarded","hidden elements",t.length),this.stats.set("processed","hidden elements",t.length),e.length){const t=this.doc.createElement("style");t.textContent=".sf-hidden{display:none!important;}",this.doc.head.appendChild(t),e.forEach((e=>{"none"!=e.style.getPropertyValue("display")&&("important"==e.style.getPropertyPriority("display")?e.style.setProperty("display","none","important"):e.classList.add("sf-hidden"))}))}t.forEach((e=>e.remove()))}resolveHrefs(){this.doc.querySelectorAll("a[href], area[href], link[href]").forEach((e=>{const t=e.getAttribute("href").trim();if("LINK"==e.tagName&&e.rel.includes("stylesheet")&&this.options.saveOriginalURLs&&!uf(t)&&e.setAttribute("data-sf-original-href",t),!hf(t)){let r;try{r=bm.resolveURL(t,this.options.baseURI||this.options.url)}catch(e){}if(r){const t=rf(this.options.url);!r.startsWith(t+"#")||r.startsWith(t+"#!")||this.options.resolveFragmentIdentifierURLs||(r=r.substring(t.length));try{e.setAttribute("href",r)}catch(e){}}}}))}async insertMissingVideoPosters(){await Promise.all(Array.from(this.doc.querySelectorAll("video[src], video > source[src]")).map((async e=>{let t;if(t="VIDEO"==e.tagName?e:e.parentElement,!t.poster){const e=t.getAttribute(bm.VIDEO_ATTRIBUTE_NAME);if(e){const r=this.options.videos[Number(e)],n=r.src||t.src;if(n){const e=this.doc.createElement("video");e.src=n,e.style.setProperty("width",r.size.pxWidth+"px","important"),e.style.setProperty("height",r.size.pxHeight+"px","important"),e.style.setProperty("display","none","important"),e.crossOrigin="anonymous";const o=this.doc.createElement("canvas"),i=o.getContext("2d");return this.options.doc.body.appendChild(e),new Promise((n=>{e.currentTime=r.currentTime,e.oncanplay=()=>{o.width=r.size.pxWidth,o.height=r.size.pxHeight,i.drawImage(e,0,0,o.width,o.height);try{t.poster=o.toDataURL("image/png","")}catch(e){}e.remove(),n()},e.onerror=()=>{e.remove(),n()}}))}}}})))}resolveStyleAttributeURLs(){this.doc.querySelectorAll("[style]").forEach((e=>{const t=e.getAttribute("style"),r=km.parse(t,{context:"declarationList",parseCustomProperty:!0});Jm.resolveStylesheetURLs(r,this.baseURI,this.workStyleElement),this.styles.set(e,r)}))}async resolveStylesheetURLs(){if(await Promise.all(Array.from(this.doc.querySelectorAll("style, link[rel*=stylesheet]")).map((async t=>{const r=Object.assign({},this.options,{charset:this.charset});let n;t.media&&(n=t.media.toLowerCase());const o={mediaText:n};t.closest("[shadowroot]")&&(o.scoped=!0),"LINK"==t.tagName&&t.charset&&(r.charset=t.charset),await e(t,o,this.stylesheets,this.baseURI,r,this.workStyleElement)}))),this.options.rootDocument){const t=Object.keys(this.options.updatedResources).filter((e=>"stylesheet"==this.options.updatedResources[e].type&&!this.options.updatedResources[e].retrieved)).map((e=>this.options.updatedResources[e]));await Promise.all(t.map((async t=>{t.retrieved=!0;const r=this.doc.createElement("style");this.doc.body.appendChild(r),r.textContent=t.content,await e(r,{},this.stylesheets,this.baseURI,this.options,this.workStyleElement)})))}async function e(e,t,r,n,o,i){let s;r.set(e,t),o.blockStylesheets||(s=await async function(e,t,r,n){let o;if(!r.blockStylesheets)if("LINK"==e.tagName)o=await Jm.resolveLinkStylesheetURLs(e.href,t,r,n);else{o=km.parse(e.textContent,{context:"stylesheet",parseCustomProperty:!0});await Jm.resolveImportURLs(o,t,r,n)&&(o=km.parse(km.generate(o),{context:"stylesheet",parseCustomProperty:!0}))}return o}(e,n,o,i)),s&&s.children?(o.compressCSS&&Jm.removeSingleLineCssComments(s),t.stylesheet=s):r.delete(e)}}async resolveFrameURLs(){if(!this.options.saveRawPage){const e=Array.from(this.doc.querySelectorAll('iframe, frame, object[type="text/html"][data]'));await Promise.all(e.map((async e=>{if("OBJECT"==e.tagName)e.setAttribute("data","data:text/html,");else{const t=e.getAttribute("src");this.options.saveOriginalURLs&&t&&!uf(t)&&e.setAttribute("data-sf-original-src",t),e.removeAttribute("src"),e.removeAttribute("srcdoc")}Array.from(e.childNodes).forEach((e=>e.remove()));const t=e.getAttribute(bm.WIN_ID_ATTRIBUTE_NAME);if(this.options.frames&&t){const r=this.options.frames.find((e=>e.windowId==t));r&&await async function(e,t,r,n,o){o.insertSingleFileComment=!1,o.insertCanonicalLink=!1,o.insertMetaNoIndex=!1,o.saveFavicon=!1,o.url=e.baseURI,o.windowId=r,e.content&&(o.content=e.content,o.canvases=e.canvases,o.fonts=e.fonts,o.stylesheets=e.stylesheets,o.images=e.images,o.posters=e.posters,o.videos=e.videos,o.usedFonts=e.usedFonts,o.shadowRoots=e.shadowRoots,o.imports=e.imports,e.runner=new zm(o),e.frameElement=t,await e.runner.loadPage(),await e.runner.initialize(),e.maxResources=n.getMaxResources())}(r,e,t,this.batchRequest,Object.create(this.options))}})))}}insertShadowRootContents(){const e=this.doc,t=this.options;if(t.shadowRoots&&t.shadowRoots.length){!function r(n){Array.from(n.querySelectorAll("["+bm.SHADOW_ROOT_ATTRIBUTE_NAME+"]")).forEach((n=>{const o=n.getAttribute(bm.SHADOW_ROOT_ATTRIBUTE_NAME);if(o){const i=t.shadowRoots[Number(o)];if(i){const t=e.createElement("template");t.setAttribute(qm,i.mode),i.adoptedStyleSheets&&i.adoptedStyleSheets.forEach((r=>{const n=e.createElement("style");n.textContent=r,t.appendChild(n)}));const o=bm.parseDocContent(i.content);if(o.head){const e=o.head.querySelector("meta[charset]");e&&e.remove(),o.head.childNodes.forEach((e=>t.appendChild(o.importNode(e,!0))))}o.body&&o.body.childNodes.forEach((e=>t.appendChild(o.importNode(e,!0)))),r(t),n.firstChild?n.insertBefore(t,n.firstChild):n.appendChild(t)}}}))}(this.doc),t.blockScripts&&this.doc.querySelectorAll("script[data-template-shadow-root]").forEach((e=>e.remove()));const r=e.createElement("script");r.setAttribute(Bm,""),r.textContent='(()=>{document.currentScript.remove();processNode(document);function processNode(node){node.querySelectorAll("template[shadowroot]").forEach(element=>{let shadowRoot = element.parentElement.shadowRoot;if (!shadowRoot) {try {shadowRoot=element.parentElement.attachShadow({mode:element.getAttribute("shadowroot")});shadowRoot.innerHTML=element.innerHTML;element.remove()} catch (error) {} if (shadowRoot) {processNode(shadowRoot)}}})}})()',e.body.appendChild(r)}}async resolveHtmlImportURLs(){const e=Array.from(this.doc.querySelectorAll("link[rel=import][href]"));await Promise.all(e.map((async e=>{const t=e.href;this.options.saveOriginalURLs&&!uf(t)&&e.setAttribute("data-sf-original-href",t),e.removeAttribute("href");const r=Object.create(this.options);r.insertSingleFileComment=!1,r.insertCanonicalLink=!1,r.insertMetaNoIndex=!1,r.saveFavicon=!1,r.removeUnusedStyles=!1,r.removeAlternativeMedias=!1,r.removeUnusedFonts=!1,r.removeHiddenElements=!1,r.url=t;const n=e.getAttribute(bm.HTML_IMPORT_ATTRIBUTE_NAME);if(n){const t=r.imports[Number(n)];t&&(r.content=t.content,t.runner=new zm(r),await t.runner.loadPage(),await t.runner.initialize(),r.removeImports||(t.maxResources=t.runner.batchRequest.getMaxResources()),t.runner.getStyleSheets().forEach((t=>{const r=this.doc.createElement("style");e.insertAdjacentElement("afterEnd",r),this.stylesheets.set(r,t)})))}r.removeImports&&(e.remove(),this.stats.add("discarded","HTML imports",1))})))}removeUnusedStyles(){this.mediaAllInfo||(this.mediaAllInfo=bm.getMediaAllInfo(this.doc,this.stylesheets,this.styles));const e=bm.minifyCSSRules(this.stylesheets,this.styles,this.mediaAllInfo);this.stats.set("processed","CSS rules",e.processed),this.stats.set("discarded","CSS rules",e.discarded)}removeUnusedFonts(){bm.removeUnusedFonts(this.doc,this.stylesheets,this.styles,this.options)}removeAlternativeMedias(){const e=bm.minifyMedias(this.stylesheets);this.stats.set("processed","medias",e.processed),this.stats.set("discarded","medias",e.discarded)}async processStylesheets(){this.options.fontDeclarations=new ym,await Promise.all([...this.stylesheets].map((([,e])=>Jm.processStylesheet(e.stylesheet.children,this.baseURI,this.options,this.cssVariables,this.batchRequest))))}async processStyleAttributes(){return Promise.all([...this.styles].map((([,e])=>Jm.processStyle(e,this.baseURI,this.options,this.cssVariables,this.batchRequest))))}async processPageResources(){this.options.blockImages&&this.doc.querySelectorAll("svg").forEach((e=>e.remove()));let e=[['link[href][rel*="icon"]',"href",!1,!0],['object[type="image/svg+xml"], object[type="image/svg-xml"]',"data"],["img[src], input[src][type=image]","src",!0],['embed[src*=".svg"], embed[src*=".pdf"]',"src"],["video[poster]","poster"],["*[background]","background"],["image","xlink:href"],["image","href"]].map((([e,t,r,n])=>Jm.processAttribute(this.doc.querySelectorAll(e),t,this.baseURI,this.options,"image",this.cssVariables,this.styles,this.batchRequest,r,n)));e=e.concat([Jm.processXLinks(this.doc.querySelectorAll("use"),this.doc,this.baseURI,this.options,this.batchRequest),Jm.processSrcset(this.doc.querySelectorAll("img[srcset], source[srcset]"),this.baseURI,this.options,this.batchRequest)]),e.push(Jm.processAttribute(this.doc.querySelectorAll("audio[src], audio > source[src]"),"src",this.baseURI,this.options,"audio",this.cssVariables,this.styles,this.batchRequest)),e.push(Jm.processAttribute(this.doc.querySelectorAll("video[src], video > source[src]"),"src",this.baseURI,this.options,"video",this.cssVariables,this.styles,this.batchRequest)),await Promise.all(e),this.options.saveFavicon&&Jm.processShortcutIcons(this.doc)}async processScripts(){await Promise.all(Array.from(this.doc.querySelectorAll("script[src]")).map((async e=>{let t,r;if(r=e.getAttribute("src"),this.options.saveOriginalURLs&&!uf(r)&&e.setAttribute("data-sf-original-src",r),e.removeAttribute("integrity"),this.options.blockScripts)e.removeAttribute("src");else{e.textContent="";try{t=bm.resolveURL(r,this.baseURI)}catch(e){}if(pf(t)){e.removeAttribute("src");const r=await bm.getContent(t,{asBinary:!0,charset:this.charset!=jm&&this.charset,maxResourceSize:this.options.maxResourceSize,maxResourceSizeEnabled:this.options.maxResourceSizeEnabled,frameId:this.options.windowId,resourceReferrer:this.options.resourceReferrer,baseURI:this.options.baseURI,blockMixedContent:this.options.blockMixedContent,expectedType:"script",acceptHeaders:this.options.acceptHeaders,networkTimeout:this.options.networkTimeout});r.data=tf(t,r,this.options),e.setAttribute("src",r.data),"async"!=e.getAttribute("async")&&""!=e.getAttribute(bm.ASYNC_SCRIPT_ATTRIBUTE_NAME)||e.setAttribute("async","")}}this.stats.add("processed","scripts",1)})))}removeAlternativeImages(){bm.removeAlternativeImages(this.doc)}async removeAlternativeFonts(){await bm.removeAlternativeFonts(this.doc,this.stylesheets,this.options.fontDeclarations,this.options.fontTests)}async processFrames(){if(this.options.frames){const e=Array.from(this.doc.querySelectorAll('iframe, frame, object[type="text/html"][data]'));await Promise.all(e.map((async e=>{const t=e.getAttribute(bm.WIN_ID_ATTRIBUTE_NAME);if(t){const r=this.options.frames.find((e=>e.windowId==t));if(r)if(this.options.frames=this.options.frames.filter((e=>e.windowId!=t)),r.runner&&""!=e.getAttribute(bm.HIDDEN_FRAME_ATTRIBUTE_NAME)){this.stats.add("processed","frames",1),await r.runner.run();const t=await r.runner.getPageData();e.removeAttribute(bm.WIN_ID_ATTRIBUTE_NAME);let n="allow-popups allow-top-navigation allow-top-navigation-by-user-activation";(t.content.match(Dm)||t.content.match(Fm)||t.content.match(Um))&&(n+=" allow-scripts allow-same-origin"),e.setAttribute("sandbox",n),"OBJECT"==e.tagName?e.setAttribute("data","data:text/html,"+t.content):"FRAME"==e.tagName?e.setAttribute("src","data:text/html,"+t.content.replace(/%/g,"%25").replace(/#/g,"%23")):(e.setAttribute("srcdoc",t.content),e.removeAttribute("src")),this.stats.addAll(t)}else e.removeAttribute(bm.WIN_ID_ATTRIBUTE_NAME),this.stats.add("discarded","frames",1)}})))}}async processHtmlImports(){const e=Array.from(this.doc.querySelectorAll("link[rel=import]"));await Promise.all(e.map((async e=>{const t=e.getAttribute(bm.HTML_IMPORT_ATTRIBUTE_NAME);if(t){const r=this.options.imports[Number(t)];if(r.runner){this.stats.add("processed","HTML imports",1),await r.runner.run();const t=await r.runner.getPageData();e.removeAttribute(bm.HTML_IMPORT_ATTRIBUTE_NAME),e.setAttribute("href","data:text/html,"+t.content),this.stats.addAll(t)}else this.stats.add("discarded","HTML imports",1)}})))}replaceStylesheets(){this.doc.querySelectorAll("style").forEach((e=>{const t=this.stylesheets.get(e);t?(this.stylesheets.delete(e),e.textContent=lf(t.stylesheet,this.options),t.mediaText&&(e.media=t.mediaText)):e.remove()})),this.doc.querySelectorAll("link[rel*=stylesheet]").forEach((e=>{const t=this.stylesheets.get(e);if(t){this.stylesheets.delete(e);const r=this.doc.createElement("style");t.mediaText&&(r.media=t.mediaText),r.textContent=lf(t.stylesheet,this.options),e.parentElement.replaceChild(r,e)}else e.remove()}))}replaceStyleAttributes(){this.doc.querySelectorAll("[style]").forEach((e=>{const t=this.styles.get(e);t?(this.styles.delete(e),e.setAttribute("style",lf(t,this.options))):e.setAttribute("style","")}))}insertVariables(){if(this.cssVariables.size){const e=this.doc.createElement("style"),t=this.doc.head.querySelector("style");t?this.doc.head.insertBefore(e,t):this.doc.head.appendChild(e);let r="";this.cssVariables.forEach((({content:e,url:t},n)=>{this.cssVariables.delete(n),r&&(r+=";"),r+=`${Gm+n}: `,this.options.saveOriginalURLs&&(r+=`/* original URL: ${t} */ `),r+=`url("${e}")`})),e.textContent=":root{"+r+"}"}}compressHTML(){let e;this.options.displayStats&&(e=bm.getContentSize(this.doc.documentElement.outerHTML)),bm.minifyHTML(this.doc,{PRESERVED_SPACE_ELEMENT_ATTRIBUTE_NAME:bm.PRESERVED_SPACE_ELEMENT_ATTRIBUTE_NAME}),this.options.displayStats&&this.stats.add("discarded","HTML bytes",e-bm.getContentSize(this.doc.documentElement.outerHTML))}cleanupPage(){this.doc.querySelectorAll("base").forEach((e=>e.remove()));const e=this.doc.head.querySelector("meta[charset]");e&&(this.doc.head.insertBefore(e,this.doc.head.firstChild),1==this.doc.head.querySelectorAll("*").length&&0==this.doc.body.childNodes.length&&this.doc.head.querySelector("meta[charset]").remove())}resetZoomLevel(){const e=this.doc.documentElement.style.getPropertyValue("-sf-transform"),t=this.doc.documentElement.style.getPropertyPriority("-sf-transform"),r=this.doc.documentElement.style.getPropertyValue("-sf-transform-origin"),n=this.doc.documentElement.style.getPropertyPriority("-sf-transform-origin"),o=this.doc.documentElement.style.getPropertyValue("-sf-min-height"),i=this.doc.documentElement.style.getPropertyPriority("-sf-min-height");this.doc.documentElement.style.setProperty("transform",e,t),this.doc.documentElement.style.setProperty("transform-origin",r,n),this.doc.documentElement.style.setProperty("min-height",o,i),this.doc.documentElement.style.removeProperty("-sf-transform"),this.doc.documentElement.style.removeProperty("-sf-transform-origin"),this.doc.documentElement.style.removeProperty("-sf-min-height")}async insertMAFFMetaData(){const e=await this.maffMetaDataPromise;if(e&&e.content){const t="http://www.w3.org/1999/02/22-rdf-syntax-ns#",r=bm.parseXMLContent(e.content),n=r.querySelector("RDF > Description > originalurl"),o=r.querySelector("RDF > Description > archivetime");if(n&&(this.options.saveUrl=n.getAttributeNS(t,"resource")),o){const e=o.getAttributeNS(t,"resource");if(e){const t=new Date(e);isNaN(t.getTime())||(this.options.saveDate=new Date(e))}}}}async setDocInfo(){const e=this.doc.querySelector("title"),t=this.doc.querySelector("meta[name=description]"),r=this.doc.querySelector("meta[name=author]"),n=this.doc.querySelector("meta[name=creator]"),o=this.doc.querySelector("meta[name=publisher]"),i=this.doc.querySelector("h1");this.options.title=e?e.textContent.trim():"",this.options.info={description:t&&t.content?t.content.trim():"",lang:this.doc.documentElement.lang,author:r&&r.content?r.content.trim():"",creator:n&&n.content?n.content.trim():"",publisher:o&&o.content?o.content.trim():"",heading:i&&i.textContent?i.textContent.trim():""},this.options.infobarContent=await Jm.evalTemplate(this.options.infobarTemplate,this.options,null,!0)}}const Vm="data:",Wm="about:blank",$m=/(#.+?)$/,Gm="--sf-img-",Ym=524288;class Jm{static async evalTemplate(e="",t,r,n){const o=bm.parseURL(t.saveUrl);e=await sf(e,"page-title",(()=>t.title||"No title"),n,t.filenameReplacementCharacter),e=await sf(e,"page-heading",(()=>t.info.heading||"No heading"),n,t.filenameReplacementCharacter),e=await sf(e,"page-language",(()=>t.info.lang||"No language"),n,t.filenameReplacementCharacter),e=await sf(e,"page-description",(()=>t.info.description||"No description"),n,t.filenameReplacementCharacter),e=await sf(e,"page-author",(()=>t.info.author||"No author"),n,t.filenameReplacementCharacter),e=await sf(e,"page-creator",(()=>t.info.creator||"No creator"),n,t.filenameReplacementCharacter),e=await sf(e,"page-publisher",(()=>t.info.publisher||"No publisher"),n,t.filenameReplacementCharacter),await c(t.saveDate),await c(t.visitDate,"visit-"),e=await sf(e,"url-hash",(()=>o.hash.substring(1)||"No hash"),n,t.filenameReplacementCharacter),e=await sf(e,"url-host",(()=>o.host.replace(/\/$/,"")||"No host"),n,t.filenameReplacementCharacter),e=await sf(e,"url-hostname",(()=>o.hostname.replace(/\/$/,"")||"No hostname"),n,t.filenameReplacementCharacter);const i=l(o.href);e=await sf(e,"url-href",(()=>i||"No href"),void 0===n||n,t.filenameReplacementCharacter),e=await sf(e,"url-href-digest-sha-1",i?async()=>bm.digest("SHA-1",i):"No href",n,t.filenameReplacementCharacter),e=await sf(e,"url-href-flat",(()=>l(o.href)||"No href"),!1,t.filenameReplacementCharacter),e=await sf(e,"url-referrer",(()=>l(t.referrer)||"No referrer"),void 0===n||n,t.filenameReplacementCharacter),e=await sf(e,"url-referrer-flat",(()=>l(t.referrer)||"No referrer"),!1,t.filenameReplacementCharacter),e=await sf(e,"url-password",(()=>o.password||"No password"),n,t.filenameReplacementCharacter),e=await sf(e,"url-pathname",(()=>l(o.pathname).replace(/^\//,"").replace(/\/$/,"")||"No pathname"),void 0===n||n,t.filenameReplacementCharacter),e=await sf(e,"url-pathname-flat",(()=>l(o.pathname)||"No pathname"),!1,t.filenameReplacementCharacter),e=await sf(e,"url-port",(()=>o.port||"No port"),n,t.filenameReplacementCharacter),e=await sf(e,"url-protocol",(()=>o.protocol||"No protocol"),n,t.filenameReplacementCharacter),e=await sf(e,"url-search",(()=>o.search.substring(1)||"No search"),n,t.filenameReplacementCharacter);const s=bm.getSearchParams(o.search);for(const[r,o]of s)e=await sf(e,"url-search-"+r,(()=>o||""),n,t.filenameReplacementCharacter);e=e.replace(/{\s*url-search-[^}\s]*\s*}/gi,""),e=await sf(e,"url-username",(()=>o.username||"No username"),n,t.filenameReplacementCharacter),e=await sf(e,"tab-id",(()=>String(t.tabId||"No tab id")),n,t.filenameReplacementCharacter),e=await sf(e,"tab-index",(()=>String(t.tabIndex||"No tab index")),n,t.filenameReplacementCharacter),e=await sf(e,"url-last-segment",(()=>l(function(e,t){let r=e.pathname.match(/\/([^/]+)$/),n=r&&r[0];n||(r=e.href.match(/([^/]+)\/?$/),n=r&&r[0]);n||(r=n.match(/(.*)\.[^.]+$/),n=r&&r[0]);n||(n=e.hostname.replace(/\/+/g,t).replace(/\/$/,""));r=n.match(/(.*)\.[^.]+$/),r&&r[1]&&(n=r[1]);return n=n.replace(/\/$/,"").replace(/^\//,""),n}(o,t.filenameReplacementCharacter))||"No last segment"),n,t.filenameReplacementCharacter),r&&(e=await sf(e,"digest-sha-256",(async()=>bm.digest("SHA-256",r)),n,t.filenameReplacementCharacter),e=await sf(e,"digest-sha-384",(async()=>bm.digest("SHA-384",r)),n,t.filenameReplacementCharacter),e=await sf(e,"digest-sha-512",(async()=>bm.digest("SHA-512",r)),n,t.filenameReplacementCharacter));const a=t.bookmarkFolders&&t.bookmarkFolders.join("/")||"";return e=await sf(e,"bookmark-pathname",(()=>a),void 0===n||n,t.filenameReplacementCharacter),e=await sf(e,"bookmark-pathname-flat",(()=>a),!1,t.filenameReplacementCharacter),(e=await sf(e,"profile-name",(()=>t.profileName),n,t.filenameReplacementCharacter)).trim();function l(e){try{return decodeURI(e)}catch(t){return e}}async function c(r,o=""){r&&(e=await sf(e,o+"datetime-iso",(()=>r.toISOString()),n,t.filenameReplacementCharacter),e=await sf(e,o+"date-iso",(()=>r.toISOString().split("T")[0]),n,t.filenameReplacementCharacter),e=await sf(e,o+"time-iso",(()=>r.toISOString().split("T")[1].split("Z")[0]),n,t.filenameReplacementCharacter),e=await sf(e,o+"date-locale",(()=>r.toLocaleDateString()),n,t.filenameReplacementCharacter),e=await sf(e,o+"time-locale",(()=>r.toLocaleTimeString()),n,t.filenameReplacementCharacter),e=await sf(e,o+"day-locale",(()=>String(r.getDate()).padStart(2,"0")),n,t.filenameReplacementCharacter),e=await sf(e,o+"month-locale",(()=>String(r.getMonth()+1).padStart(2,"0")),n,t.filenameReplacementCharacter),e=await sf(e,o+"year-locale",(()=>String(r.getFullYear())),n,t.filenameReplacementCharacter),e=await sf(e,o+"datetime-locale",(()=>r.toLocaleString()),n,t.filenameReplacementCharacter),e=await sf(e,o+"datetime-utc",(()=>r.toUTCString()),n,t.filenameReplacementCharacter),e=await sf(e,o+"day-utc",(()=>String(r.getUTCDate()).padStart(2,"0")),n,t.filenameReplacementCharacter),e=await sf(e,o+"month-utc",(()=>String(r.getUTCMonth()+1).padStart(2,"0")),n,t.filenameReplacementCharacter),e=await sf(e,o+"year-utc",(()=>String(r.getUTCFullYear())),n,t.filenameReplacementCharacter),e=await sf(e,o+"hours-locale",(()=>String(r.getHours()).padStart(2,"0")),n,t.filenameReplacementCharacter),e=await sf(e,o+"minutes-locale",(()=>String(r.getMinutes()).padStart(2,"0")),n,t.filenameReplacementCharacter),e=await sf(e,o+"seconds-locale",(()=>String(r.getSeconds()).padStart(2,"0")),n,t.filenameReplacementCharacter),e=await sf(e,o+"hours-utc",(()=>String(r.getUTCHours()).padStart(2,"0")),n,t.filenameReplacementCharacter),e=await sf(e,o+"minutes-utc",(()=>String(r.getUTCMinutes()).padStart(2,"0")),n,t.filenameReplacementCharacter),e=await sf(e,o+"seconds-utc",(()=>String(r.getUTCSeconds()).padStart(2,"0")),n,t.filenameReplacementCharacter),e=await sf(e,o+"time-ms",(()=>String(r.getTime())),n,t.filenameReplacementCharacter))}}static setBackgroundImage(e,t,r){e.style.setProperty("background-blend-mode","normal","important"),e.style.setProperty("background-clip","content-box","important"),e.style.setProperty("background-position",r&&r["background-position"]?r["background-position"]:"center","important"),e.style.setProperty("background-color",r&&r["background-color"]?r["background-color"]:"transparent","important"),e.style.setProperty("background-image",t,"important"),e.style.setProperty("background-size",r&&r["background-size"]?r["background-size"]:"100% 100%","important"),e.style.setProperty("background-origin","content-box","important"),e.style.setProperty("background-repeat","no-repeat","important")}static processShortcutIcons(e){let t=cf(Array.from(e.querySelectorAll('link[href][rel="icon"], link[href][rel="shortcut icon"]')));t||(t=cf(Array.from(e.querySelectorAll('link[href][rel*="icon"]'))),t&&(t.rel="icon")),t&&e.querySelectorAll('link[href][rel*="icon"]').forEach((e=>{e!=t&&e.remove()}))}static removeSingleLineCssComments(e){const t=[];for(let r=e.children.head;r;r=r.next){const e=r.data;"Raw"==e.type&&e.value&&e.value.trim().startsWith("//")&&t.push(r)}t.forEach((t=>e.children.remove(t)))}static async resolveImportURLs(e,t,r,n,o=new gm){let i;Jm.resolveStylesheetURLs(e,t,n);const s=(a=e,km.findAll(a,(e=>"Atrule"==e.type&&"import"==e.name)));var a;return await Promise.all(s.map((async e=>{const s=km.find(e,(e=>"Url"==e.type))||km.find(e,(e=>"String"==e.type));let a=rf(s.value);if(!hf(a)&&df(a)){s.value=bm.EMPTY_RESOURCE;try{a=bm.resolveURL(a,t)}catch(e){}if(pf(a)&&!o.has(a)){const t=await async function(e){const t=await bm.getContent(e,{maxResourceSize:r.maxResourceSize,maxResourceSizeEnabled:r.maxResourceSizeEnabled,validateTextContentType:!0,frameId:r.frameId,charset:r.charset,resourceReferrer:r.resourceReferrer,baseURI:r.baseURI,blockMixedContent:r.blockMixedContent,expectedType:"stylesheet",acceptHeaders:r.acceptHeaders,networkTimeout:r.networkTimeout});return nf(t.data,t.charset)||nf(t.data,r.charset)?t:(r=Object.assign({},r,{charset:of(t.data)}),bm.getContent(e,{maxResourceSize:r.maxResourceSize,maxResourceSizeEnabled:r.maxResourceSizeEnabled,validateTextContentType:!0,frameId:r.frameId,charset:r.charset,resourceReferrer:r.resourceReferrer,baseURI:r.baseURI,blockMixedContent:r.blockMixedContent,expectedType:"stylesheet",acceptHeaders:r.acceptHeaders,networkTimeout:r.networkTimeout}))}(a);a=t.resourceURL,t.data=tf(a,t,r),t.data&&t.data.match(/^<!doctype /i)&&(t.data="");const s=km.find(e,(e=>"MediaQueryList"==e.type));s&&(t.data=(l=t.data,(c=km.generate(s))?"@media "+c+"{ "+l+" }":l));const u=km.parse(t.data,{context:"stylesheet",parseCustomProperty:!0}),h=new gm(o);h.add(a),await Jm.resolveImportURLs(u,a,r,n,h);for(let t of Object.keys(u))e[t]=u[t];i=!0}}var l,c}))),i}static resolveStylesheetURLs(e,t,r){af(e).map((e=>{const n=e.value;let o=rf(n);if(r.textContent='tmp { content:"'+o+'"}',r.sheet&&r.sheet.cssRules&&(o=bm.removeQuotes(r.sheet.cssRules[0].style.getPropertyValue("content"))),!hf(o))if(!o||df(o)){let r;if(!n.startsWith("#"))try{r=bm.resolveURL(o,t)}catch(e){}pf(r)&&(e.value=r)}else e.value=bm.EMPTY_RESOURCE}))}static async resolveLinkStylesheetURLs(e,t,r,n){if((e=rf(e))&&e!=t&&e!=Wm){const o=await bm.getContent(e,{maxResourceSize:r.maxResourceSize,maxResourceSizeEnabled:r.maxResourceSizeEnabled,charset:r.charset,frameId:r.frameId,resourceReferrer:r.resourceReferrer,validateTextContentType:!0,baseURI:t,blockMixedContent:r.blockMixedContent,expectedType:"stylesheet",acceptHeaders:r.acceptHeaders,networkTimeout:r.networkTimeout});if(!nf(o.data,o.charset)&&!nf(o.data,r.charset))return r=Object.assign({},r,{charset:of(o.data)}),Jm.resolveLinkStylesheetURLs(e,t,r,n);e=o.resourceURL,o.data=tf(o.resourceURL,o,r),o.data&&o.data.match(/^<!doctype /i)&&(o.data="");let i=km.parse(o.data,{context:"stylesheet",parseCustomProperty:!0});return await Jm.resolveImportURLs(i,e,r,n)&&(i=km.parse(km.generate(i),{context:"stylesheet",parseCustomProperty:!0})),i}}static async processStylesheet(e,t,r,n,o){const i=[],s=[];for(let l=e.head;l;l=l.next){const e=l.data;"Atrule"==e.type&&"charset"==e.name?s.push(l):e.block&&e.block.children&&("Rule"==e.type?i.push(this.processStyle(e,t,r,n,o)):"Atrule"!=e.type||"media"!=e.name&&"supports"!=e.name?"Atrule"==e.type&&"font-face"==e.name&&i.push(a(e)):i.push(this.processStylesheet(e.block.children,t,r,n,o)))}async function a(e){const n=af(e);await Promise.all(n.map((async e=>{const n=e.value;if(r.blockFonts)e.value=bm.EMPTY_RESOURCE;else{const i=rf(n);if(!hf(i)&&pf(i)){let{content:s}=await o.addURL(i,{asBinary:!0,expectedType:"font",baseURI:t,blockMixedContent:r.blockMixedContent}),a=r.fontDeclarations.get(e);a||(a=[],r.fontDeclarations.set(e,a)),a.push(i),!uf(i)&&r.saveOriginalURLs?e.value="-sf-url-original("+JSON.stringify(n)+") "+s:e.value=s}}})))}s.forEach((t=>e.remove(t))),await Promise.all(i)}static async processStyle(e,t,r,n,o){const i=af(e);await Promise.all(i.map((async e=>{const t=e.value;if(r.blockImages)e.value=bm.EMPTY_RESOURCE;else{const i=rf(t);if(!hf(i)&&pf(i)){let{content:s,indexResource:a,duplicate:l}=await o.addURL(i,{asBinary:!0,expectedType:"image",groupDuplicates:r.groupDuplicateImages});if(!t.startsWith("#"))if(l&&r.groupDuplicateImages&&bm.getContentSize(s)<Ym){const r=km.parse("var("+Gm+a+")",{context:"value"});for(let t of Object.keys(r.children.head.data))e[t]=r.children.head.data[t];n.set(a,{content:s,url:t})}else!uf(i)&&r.saveOriginalURLs?e.value="-sf-url-original("+JSON.stringify(t)+") "+s:e.value=s}}})))}static async processAttribute(e,t,r,n,o,i,s,a,l,c){function u(e,t,r){"video"==r||"audio"==r?e.removeAttribute(t):e.setAttribute(t,bm.EMPTY_RESOURCE)}await Promise.all(Array.from(e).map((async e=>{let h=e.getAttribute(t);if(null!=h){h=rf(h);let d=e.dataset.singleFileOriginURL;if(n.saveOriginalURLs&&!uf(h)&&e.setAttribute("data-sf-original-"+t,h),delete e.dataset.singleFileOriginURL,n["block"+o.charAt(0).toUpperCase()+o.substring(1)+"s"])u(e,t,o);else if(!hf(h)&&(u(e,t,o),df(h))){try{h=bm.resolveURL(h,r)}catch(e){}if(pf(h)){let{content:u,indexResource:p,duplicate:m}=await a.addURL(h,{asBinary:!0,expectedType:o,groupDuplicates:n.groupDuplicateImages&&"IMG"==e.tagName&&"src"==t});if(d&&u==bm.EMPTY_RESOURCE){try{d=bm.resolveURL(d,r)}catch(e){}try{h=d,u=(await bm.getContent(h,{asBinary:!0,expectedType:o,maxResourceSize:n.maxResourceSize,maxResourceSizeEnabled:n.maxResourceSizeEnabled,frameId:n.windowId,resourceReferrer:n.resourceReferrer,acceptHeaders:n.acceptHeaders,networkTimeout:n.networkTimeout})).data}catch(e){}}if(c&&u==bm.EMPTY_RESOURCE)e.remove();else if(u!==bm.EMPTY_RESOURCE){if(!Mm.filter((e=>u.startsWith(e))).length){const r=u.startsWith(Om);if("image"==o&&l&&m&&!r&&bm.getContentSize(u)<Ym)if(Jm.replaceImageSource(e,Gm+p,n)){i.set(p,{content:u,url:d});const t=km.parse(e.getAttribute("style"),{context:"declarationList",parseCustomProperty:!0});s.set(e,t)}else e.setAttribute(t,u);else e.setAttribute(t,u)}}}}}})))}static async processXLinks(e,t,r,n,o){let i="xlink:href";await Promise.all(Array.from(e).map((async e=>{let t=e.getAttribute(i);null==t&&(i="href",t=e.getAttribute(i)),n.saveOriginalURLs&&!uf(t)&&e.setAttribute("data-sf-original-href",t);let s=rf(t);if(n.blockImages)e.setAttribute(i,bm.EMPTY_RESOURCE);else if(df(s)&&!hf(s)){e.setAttribute(i,bm.EMPTY_RESOURCE);try{s=bm.resolveURL(s,r)}catch(e){}if(pf(s)){const n=t.match($m);if(t.startsWith(r+"#"))e.setAttribute(i,n[0]);else{const t=await o.addURL(s,{expectedType:"image"}),r=bm.parseSVGContent(t.content);if(n&&n[0]){let t;try{t=r.querySelector(n[0])}catch(e){}t&&(e.setAttribute(i,n[0]),e.parentElement.insertBefore(t,e.parentElement.firstChild))}else{const t=await o.addURL(s,{expectedType:"image"});e.setAttribute(i,"data:image/svg+xml,"+t)}}}}else s==n.url&&e.setAttribute(i,t.substring(s.length))})))}static async processSrcset(e,t,r,n){await Promise.all(Array.from(e).map((async e=>{const o=e.getAttribute("srcset"),i=bm.parseSrcset(o);if(r.saveOriginalURLs&&!uf(o)&&e.setAttribute("data-sf-original-srcset",o),r.blockImages)e.setAttribute("srcset","");else{const r=await Promise.all(i.map((async e=>{let r=rf(e.url);if(hf(r))return r+(e.w?" "+e.w+"w":e.d?" "+e.d+"x":"");if(df(r)){try{r=bm.resolveURL(r,t)}catch(e){}if(pf(r)){const{content:t}=await n.addURL(r,{asBinary:!0,expectedType:"image"});return Mm.filter((e=>t.startsWith(e))).length?"":t+(e.w?" "+e.w+"w":e.d?" "+e.d+"x":"")}return""}return""})));e.setAttribute("srcset",r.join(", "))}})))}static replaceImageSource(e,t,r){if(e.getAttribute(bm.IMAGE_ATTRIBUTE_NAME)){const n=r.images[Number(e.getAttribute(bm.IMAGE_ATTRIBUTE_NAME))];if(n&&n.replaceable){e.setAttribute("src",`data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="${n.size.pxWidth}" height="${n.size.pxHeight}"><rect fill-opacity="0"/></svg>`);const r={};return("content"==n.objectFit||"cover"==n.objectFit)&&n.objectFit&&(r["background-size"]=n.objectFit),n.objectPosition&&(r["background-position"]=n.objectPosition),n.backgroundColor&&(r["background-color"]=n.backgroundColor),Jm.setBackgroundImage(e,"var("+t+")",r),e.removeAttribute(bm.IMAGE_ATTRIBUTE_NAME),!0}}}}const Qm="blob:",Km=/^https?:\/\//,Zm=/^file:\/\//,Xm=/^https?:\/\/+\s*$/,ef=/^(https?:\/\/|file:\/\/|blob:).+/;function tf(e,t,r){return r.rootDocument&&r.updatedResources[e]?(r.updatedResources[e].retrieved=!0,r.updatedResources[e].content):t.data||""}function rf(e){return!e||e.startsWith(Vm)?e:e.split("#")[0]}function nf(e,t="utf-8"){const r=of(e);return!r||r==t.toLowerCase()}function of(e){const t=e.match(/^@charset\s+"([^"]*)";/i);if(t&&t[1])return t[1].toLowerCase().trim()}async function sf(e,t,r,n,o){let i,s;if(e){const a="{\\s*"+t.replace(/\W|_/g,"[$&]")+"\\s*}";let l=new RegExp(a+"\\[\\d+(ch)?\\]","g");if(e.match(l)){const t=e.match(l)[0];t.match(/\[(\d+)\]$/)?(i=Number(t.match(/\[(\d+)\]$/)[1]),(isNaN(i)||i<=0)&&(i=null)):(s=Number(t.match(/\[(\d+)ch\]$/)[1]),(isNaN(s)||s<=0)&&(s=null))}else l=new RegExp(a,"g");if(e.match(l)){let t=await r();return n||(t=t.replace(/\/+/g,o)),i?t=await bm.truncateText(t,i):s&&(t=t.substring(0,s)),e.replace(l,t)}}return e}function af(e){return km.findAll(e,(e=>"Url"==e.type))}function lf(e,t){let r=km.generate(e);return t.compressCSS&&(r=bm.compressCSS(r)),t.saveOriginalURLs&&(r=function(e){return e.replace(/url\(-sf-url-original\\\(\\"(.*?)\\"\\\)\\ /g,"/* original URL: $1 */url(")}(r)),r}function cf(e){return(e=e.filter((e=>e.href!=bm.EMPTY_RESOURCE))).sort(((e,t)=>(parseInt(t.sizes,10)||16)-(parseInt(e.sizes,10)||16))),e[0]}function uf(e){return e&&(e.startsWith(Vm)||e.startsWith(Qm))}function hf(e){return e&&(e.startsWith(Vm)||e==Wm)}function df(e){return e&&!e.match(Xm)}function pf(e){return df(e)&&(e.match(Km)||e.match(Zm)||e.startsWith(Qm))&&e.match(ef)}const mf={discarded:{"HTML bytes":0,"hidden elements":0,"HTML imports":0,scripts:0,objects:0,"audio sources":0,"video sources":0,frames:0,"CSS rules":0,canvas:0,stylesheets:0,resources:0,medias:0},processed:{"HTML bytes":0,"hidden elements":0,"HTML imports":0,scripts:0,objects:0,"audio sources":0,"video sources":0,frames:0,"CSS rules":0,canvas:0,stylesheets:0,resources:0,medias:0}};class ff{constructor(e){this.options=e,e.displayStats&&(this.data=JSON.parse(JSON.stringify(mf)))}set(e,t,r){this.options.displayStats&&(this.data[e][t]=r)}add(e,t,r){this.options.displayStats&&(this.data[e][t]+=r)}addAll(e){this.options.displayStats&&(Object.keys(this.data.discarded).forEach((t=>this.add("discarded",t,e.stats.discarded[t]||0))),Object.keys(this.data.processed).forEach((t=>this.add("processed",t,e.stats.processed[t]||0))))}}const gf=1048576,yf=["~","+","\\\\","?","%","*",":","|",'"',"<",">","\0-",""],bf=globalThis.URL,kf=globalThis.DOMParser,vf=globalThis.Blob,wf=globalThis.FileReader,xf=(e,t)=>globalThis.fetch(e,t),Ef=globalThis.crypto,Af=globalThis.TextDecoder,Sf=globalThis.TextEncoder;function Tf(e){return(e=e||{}).fetch=e.fetch||xf,e.frameFetch=e.frameFetch||e.fetch||xf,{getContent:async function(t,r){let n,o,i,s;const a=e.fetch,l=e.frameFetch;if(r.blockMixedContent&&/^https:/i.test(r.baseURI)&&!/^https:/i.test(t))return Cf(t,r);i=r.networkTimeout?new Promise(((e,t)=>{s=e,o=globalThis.setTimeout((()=>t(new Error("network timeout"))),r.networkTimeout)})):new Promise((e=>{s=e}));try{const e=r.acceptHeaders?r.acceptHeaders[r.expectedType]:"*/*";if(r.frameId)try{n=await Promise.race([l(t,{frameId:r.frameId,referrer:r.resourceReferrer,headers:{accept:e}}),i])}catch(r){n=await Promise.race([a(t,{headers:{accept:e}}),i])}else n=await Promise.race([a(t,{referrer:r.resourceReferrer,headers:{accept:e}}),i])}catch(e){return Cf(t,r)}finally{s(),r.networkTimeout&&globalThis.clearTimeout(o)}let c;try{c=await n.arrayBuffer()}catch(e){return{data:r.asBinary?Y:"",resourceURL:t}}t=n.url||t;let u,h="";try{const e=new Ed(n.headers.get("content-type"));h=e.type+"/"+e.subtype,u=e.parameters.get("charset")}catch(e){}h||(h=function(e,t){if("image"==e){if(r([255,255,255,255],[0,0,1,0]))return"image/x-icon";if(r([255,255,255,255],[0,0,2,0]))return"image/x-icon";if(r([255,255],[78,77]))return"image/bmp";if(r([255,255,255,255,255,255],[71,73,70,56,57,97]))return"image/gif";if(r([255,255,255,255,255,255],[71,73,70,56,59,97]))return"image/gif";if(r([255,255,255,255,0,0,0,0,255,255,255,255,255,255],[82,73,70,70,0,0,0,0,87,69,66,80,86,80]))return"image/webp";if(r([255,255,255,255,255,255,255,255],[137,80,78,71,13,10,26,10]))return"image/png";if(r([255,255,255],[255,216,255]))return"image/jpeg"}if("font"==e){if(r([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,76,80]))return"application/vnd.ms-fontobject";if(r([255,255,255,255],[0,1,0,0]))return"font/ttf";if(r([255,255,255,255],[79,84,84,79]))return"font/otf";if(r([255,255,255,255],[116,116,99,102]))return"font/collection";if(r([255,255,255,255],[119,79,70,70]))return"font/woff";if(r([255,255,255,255],[119,79,70,50]))return"font/woff2"}function r(e,r){let n=!0,o=0;if(t.byteLength>=r.length){const i=new Uint8Array(t,0,e.length);for(o=0;o<e.length&&n;o++)n=n&&(i[o]&e[o])==r[o];return n}}}(r.expectedType,c));!u&&r.charset&&(u=r.charset);if(r.asBinary){if(n.status>=400)return Cf(t,r);try{return r.maxResourceSizeEnabled&&c.byteLength>r.maxResourceSize*gf?Cf(t,r):Cf(t,r,c,null,h)}catch(e){return Cf(t,r)}}else{if(n.status>=400||r.validateTextContentType&&h&&!h.startsWith("text/"))return Cf(t,r);if(u||(u="utf-8"),r.maxResourceSizeEnabled&&c.byteLength>r.maxResourceSize*gf)return Cf(t,r,null,u);try{return Cf(t,r,c,u,h)}catch(e){return Cf(t,r,null,u)}}},parseURL:(e,t)=>void 0===t?new bf(e):new bf(e,t),resolveURL(e,t){return this.parseURL(e,t).href},getSearchParams:e=>Array.from(new URLSearchParams(e)),getValidFilename:(e,t=yf,r="_")=>(t.forEach((t=>e=e.replace(new RegExp("["+t+"]+","g"),r))),e=e.replace(/\.\.\//g,"").replace(/^\/+/,"").replace(/\/+/g,"/").replace(/\/$/,"").replace(/\.$/,"").replace(/\.\//g,"."+r).replace(/\/\./g,"/"+r)),parseDocContent(e,t){const r=(new kf).parseFromString(e,"text/html");r.head||r.documentElement.insertBefore(r.createElement("HEAD"),r.body);let n=r.querySelector("base");return n&&n.getAttribute("href")||(n&&n.remove(),n=r.createElement("base"),n.setAttribute("href",t),r.head.insertBefore(n,r.head.firstChild)),r},parseXMLContent:e=>(new kf).parseFromString(e,"text/xml"),parseSVGContent(e){const t=(new kf).parseFromString(e,"image/svg+xml");return t.querySelector("parsererror")?(new kf).parseFromString(e,"text/html"):t},async digest(e,t){try{return function(e){const t=[],r=new DataView(e);for(let e=0;e<r.byteLength;e+=4){const n="00000000",o=(n+r.getUint32(e).toString(16)).slice(-n.length);t.push(o)}return t.join("")}(await Ef.subtle.digest(e,new Sf("utf-8").encode(t)))}catch(e){return""}},getContentSize:e=>new vf([e]).size,truncateText(e,t){const r=new vf([e]),n=new wf;return n.readAsText(r.slice(0,t)),new Promise(((r,o)=>{n.addEventListener("load",(()=>{e.startsWith(n.result)?r(n.result):this.truncateText(e,t-1).then(r).catch(o)}),!1),n.addEventListener("error",o,!1)}))},minifyHTML:(e,t)=>om(e,t),minifyCSSRules:(e,t,r)=>qp(e,t,r),removeUnusedFonts:(e,t,r,n)=>rp(e,t,r,n),removeAlternativeFonts:(e,t,r,n)=>Bd(e,t,r,n),getMediaAllInfo:(e,t,r)=>Ep(e,t,r),compressCSS:(e,t)=>Zr(e,t),minifyMedias:e=>Mp(e),removeAlternativeImages:e=>Wp(e),parseSrcset:e=>bd(e),preProcessDoc:(e,t,r)=>K(e,t,r),postProcessDoc(e,t,r){ne(e,t,r)},serialize:(e,t)=>hm(e,t),removeQuotes:e=>ae(e),ON_BEFORE_CAPTURE_EVENT_NAME:b,ON_AFTER_CAPTURE_EVENT_NAME:k,WIN_ID_ATTRIBUTE_NAME:T,REMOVED_CONTENT_ATTRIBUTE_NAME:v,HIDDEN_CONTENT_ATTRIBUTE_NAME:w,HIDDEN_FRAME_ATTRIBUTE_NAME:E,IMAGE_ATTRIBUTE_NAME:C,POSTER_ATTRIBUTE_NAME:R,VIDEO_ATTRIBUTE_NAME:_,CANVAS_ATTRIBUTE_NAME:I,HTML_IMPORT_ATTRIBUTE_NAME:L,STYLE_ATTRIBUTE_NAME:N,INPUT_VALUE_ATTRIBUTE_NAME:z,SHADOW_ROOT_ATTRIBUTE_NAME:S,PRESERVED_SPACE_ELEMENT_ATTRIBUTE_NAME:A,STYLESHEET_ATTRIBUTE_NAME:M,SELECTED_CONTENT_ATTRIBUTE_NAME:U,INVALID_ELEMENT_ATTRIBUTE_NAME:D,COMMENT_HEADER:W,COMMENT_HEADER_LEGACY:$,SINGLE_FILE_UI_ELEMENT_CLASS:G,EMPTY_RESOURCE:Y}}async function Cf(e,t,r,n,o){if(r)if(t.asBinary){const e=new wf;e.readAsDataURL(new vf([r],{type:o+(t.charset?";charset="+t.charset:"")})),r=await new Promise(((t,r)=>{e.addEventListener("load",(()=>t(e.result)),!1),e.addEventListener("error",r,!1)}))}else{const e=new Uint8Array(r.slice(0,4));132==e[0]&&49==e[1]&&149==e[2]&&51==e[3]?n="gb18030":255==e[0]&&254==e[1]?n="utf-16le":254==e[0]&&255==e[1]&&(n="utf-16be");try{r=new Af(n).decode(r)}catch(e){r=new Af(n="utf-8").decode(r)}}else r=t.asBinary?Y:"";return{data:r,resourceURL:e,charset:n}}function Rf(t){e.SingleFile=function(...e){return[bm,km]=e,vm}(Tf(t),yd)}e.SingleFile=void 0,e.getPageData=async function(t={},r,n=globalThis.document,o=globalThis){const i=lt;let s;if(Rf(r),n&&o){Q(n);const e=[];if(!t.saveRawPage){if(!t.removeFrames&&i&&globalThis.frames&&globalThis.frames.length){let r;r=t.loadDeferredImages?new Promise((e=>globalThis.setTimeout((()=>e(i.getAsync(t))),t.loadDeferredImagesMaxIdleTime-i.TIMEOUT_INIT_REQUEST_MESSAGE))):i.getAsync(t),e.push(r)}t.loadDeferredImages&&e.push(we(t))}[t.frames]=await Promise.all(e),s=t.frames&&t.frames.sessionId}t.doc=n,t.win=o,t.insertCanonicalLink=!0,t.onprogress=e=>{e.type===e.RESOURCES_INITIALIZED&&n&&o&&t.loadDeferredImages&&xe(t)};const a=new e.SingleFile(t);return await a.run(),s&&i.cleanup(s),await a.getPageData()},e.helper=ue,e.init=Rf,e.modules=fm,e.processors=dt,e.vendor=Ad,Object.defineProperty(e,"__esModule",{value:!0})}));
|