!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-deferred-images-start",r="single-file-load-deferred-images-end",n="single-file-load-deferred-images-keep-zoom-level-start",o="single-file-load-deferred-images-keep-zoom-level-end",i="single-file-load-deferred-images-keep-zoom-level-reset",a="single-file-load-deferred-images-reset",s="single-file-block-cookies-start",l="single-file-block-cookies-end",c="single-file-dispatch-scroll-event-start",u="single-file-dispatch-scroll-event-end",h="single-file-block-storage-start",d="single-file-block-storage-end",p="single-file-load-image",m="single-file-image-loaded",f=(e,t,r)=>globalThis.addEventListener(e,t,r),g=e=>{try{globalThis.dispatchEvent(e)}catch(e){}},y=globalThis.CustomEvent,b=globalThis.document,k=globalThis.Document,v=globalThis.JSON;let w;function x(){return Array.from(w.values())}function A(e){e.loadDeferredImagesBlockCookies&&g(new y(s)),e.loadDeferredImagesBlockStorage&&g(new y(h)),e.loadDeferredImagesDispatchScrollEvent&&g(new y(c)),e.loadDeferredImagesKeepZoomLevel?g(new y(n)):g(new y(t))}function E(e){e.loadDeferredImagesBlockCookies&&g(new y(l)),e.loadDeferredImagesBlockStorage&&g(new y(d)),e.loadDeferredImagesDispatchScrollEvent&&g(new y(u)),e.loadDeferredImagesKeepZoomLevel?g(new y(o)):g(new y(r))}function S(e){e.loadDeferredImagesKeepZoomLevel?g(new y(i)):g(new y(a))}w=window._singleFile_fontFaces?window._singleFile_fontFaces:window._singleFile_fontFaces=new Map,b instanceof k&&(f("single-file-new-font-face",(e=>{const t=e.detail,r=Object.assign({},t);delete r.src,w.set(v.stringify(r),t)})),f("single-file-delete-font",(e=>{const t=e.detail,r=Object.assign({},t);delete r.src,w.delete(v.stringify(r))})),f("single-file-clear-fonts",(()=>w=new Map)));var T=Object.freeze({__proto__:null,getFontsData:x,loadDeferredImagesStart:A,loadDeferredImagesEnd:E,loadDeferredImagesResetZoomLevel:S,LOAD_IMAGE_EVENT:p,IMAGE_LOADED_EVENT:m});const C="[\\x20\\t\\r\\n\\f]",R=new RegExp("\\\\([\\da-f]{1,6}"+C+"?|("+C+")|.)","ig");function _(e){return e.replace(R,((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 I=Object.freeze({__proto__:null,process:_});const L="single-file-on-before-capture",N="single-file-on-after-capture",z="data-single-file-removed-content",P="data-single-file-hidden-content",M="data-single-file-kept-content",O="data-single-file-hidden-frame",U="data-single-file-preserved-space-element",D="data-single-file-shadow-root-element",F="data-single-file-win-id",q="data-single-file-image",B="data-single-file-poster",j="data-single-file-video",H="data-single-file-canvas",V="data-single-file-movable-style",W="data-single-file-input-value",$="data-single-file-lazy-loaded-src",G="data-single-file-stylesheet",Y="data-single-file-disabled-noscript",Q="data-single-file-selected-content",K="data-single-file-invalid-element",J="data-single-file-async-script",Z="*:not(base):not(link):not(meta):not(noscript):not(script):not(style):not(template):not(title)",X=["NOSCRIPT","DISABLED-NOSCRIPT","META","LINK","STYLE","TITLE","TEMPLATE","SOURCE","OBJECT","SCRIPT","HEAD","BODY"],ee=/^'(.*?)'$/,te=/^"(.*?)"$/,re={regular:"400",normal:"400",bold:"700",bolder:"700",lighter:"100"},ne="Page saved with SingleFile",oe="Archive processed by SingleFile",ie="single-file-ui-element",ae="data:,",se=(e,t,r)=>globalThis.addEventListener(e,t,r),le=globalThis.JSON;function ce(e){e.querySelectorAll("meta[http-equiv=refresh]").forEach((e=>{e.removeAttribute("http-equiv"),e.setAttribute("disabled-http-equiv","refresh")}))}function ue(e,t,r){e.querySelectorAll("noscript:not(["+Y+"])").forEach((e=>{e.setAttribute(Y,e.textContent),e.textContent=""})),ce(e),e.head&&e.head.querySelectorAll(Z).forEach((e=>e.hidden=!0)),e.querySelectorAll("svg foreignObject").forEach((e=>{const t=e.querySelectorAll("html > head > "+Z+", html > body > "+Z);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").forEach((t=>{const r=e.createElement("template");r.setAttribute(K,""),r.content.appendChild(t.cloneNode(!0)),n.set(t,r),t.replaceWith(r)})),o=he(t,e,e.documentElement,r),r.moveStylesInHead&&e.querySelectorAll("body style, body ~ style").forEach((e=>{const r=Ae(t,e);r&&fe(e,r)&&(e.setAttribute(V,""),o.markedElements.push(e))}))):o={canvases:[],images:[],posters:[],videos:[],usedFonts:[],shadowRoots:[],markedElements:[]},{canvases:o.canvases,fonts:x(),stylesheets:ye(e),images:o.images,posters:o.posters,videos:o.videos,usedFonts:Array.from(o.usedFonts.values()),shadowRoots:o.shadowRoots,referrer:e.referrer,markedElements:o.markedElements,invalidElements:n}}function he(e,t,r,n,o={usedFonts:new Map,canvases:[],images:[],posters:[],videos:[],shadowRoots:[],markedElements:[]},i){return Array.from(r.childNodes).filter((t=>t instanceof e.HTMLElement||t instanceof e.SVGElement)).forEach((r=>{let a,s,l;if(!n.autoSaveExternalSave&&(n.removeHiddenElements||n.removeUnusedFonts||n.compressHTML)&&(l=Ae(e,r),r instanceof e.HTMLElement&&n.removeHiddenElements&&(s=(i||r.closest("html > head"))&&X.includes(r.tagName)||r.closest("details"),s||(a=i||fe(r,l),a&&(r.setAttribute(P,""),o.markedElements.push(r)))),!a)){if(n.compressHTML&&l){const e=l.getPropertyValue("white-space");e&&e.startsWith("pre")&&(r.setAttribute(U,""),o.markedElements.push(r))}n.removeUnusedFonts&&(de(l,n,o.usedFonts),de(Ae(e,r,":first-letter"),n,o.usedFonts),de(Ae(e,r,":before"),n,o.usedFonts),de(Ae(e,r,":after"),n,o.usedFonts))}!function(e,t,r,n,o,i,a){if("CANVAS"==r.tagName)try{o.canvases.push({dataURI:r.toDataURL("image/png","")}),r.setAttribute(H,o.canvases.length-1),o.markedElements.push(r)}catch(e){}if("IMG"==r.tagName){const t={currentSrc:i?ae:n.loadDeferredImages&&r.getAttribute($)||r.currentSrc};if(o.images.push(t),r.setAttribute(q,o.images.length-1),o.markedElements.push(r),r.removeAttribute($),a=a||Ae(e,r)){t.size=function(e,t,r){let n=t.naturalWidth,o=t.naturalHeight;if(!n&&!o){const i=null==t.getAttribute("style");if(r=r||Ae(e,t)){let e,a,s,l,c,u,h,d,p=!1;if("content-box"==r.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"),p=t.clientWidth!=n,e?t.style.setProperty("box-sizing",e,r):t.style.removeProperty("box-sizing")}e=be("padding-left",r),a=be("padding-right",r),s=be("padding-top",r),l=be("padding-bottom",r),p?(c=be("border-left-width",r),u=be("border-right-width",r),h=be("border-top-width",r),d=be("border-bottom-width",r)):c=u=h=d=0,n=Math.max(0,t.clientWidth-e-a-c-u),o=Math.max(0,t.clientHeight-s-l-h-d),i&&t.removeAttribute("style")}}return{pxWidth:n,pxHeight:o}}(e,r,a);const n=a.getPropertyValue("box-shadow"),o=a.getPropertyValue("background-image");n&&"none"!=n||o&&"none"!=o||!(t.size.pxWidth>1||t.size.pxHeight>1)||(t.replaceable=!0,t.backgroundColor=a.getPropertyValue("background-color"),t.objectFit=a.getPropertyValue("object-fit"),t.boxSizing=a.getPropertyValue("box-sizing"),t.objectPosition=a.getPropertyValue("object-position"))}}if("VIDEO"==r.tagName){const n=r.currentSrc;if(n&&!n.startsWith("blob:")&&!n.startsWith("data:")){const t=Ae(e,r.parentNode);o.videos.push({positionParent:t&&t.getPropertyValue("position"),src:n,size:{pxWidth:r.clientWidth,pxHeight:r.clientHeight},currentTime:r.currentTime}),r.setAttribute(j,o.videos.length-1)}if(!r.getAttribute("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(B,o.posters.length-1),o.markedElements.push(r)}catch(e){}}}"IFRAME"==r.tagName&&i&&n.removeHiddenElements&&(r.setAttribute(O,""),o.markedElements.push(r));"INPUT"==r.tagName&&("password"!=r.type&&(r.setAttribute(W,r.value),o.markedElements.push(r)),"radio"!=r.type&&"checkbox"!=r.type||(r.setAttribute(W,r.checked),o.markedElements.push(r)));"TEXTAREA"==r.tagName&&(r.setAttribute(W,r.value),o.markedElements.push(r));"SELECT"==r.tagName&&r.querySelectorAll("option").forEach((e=>{e.selected&&(e.setAttribute(W,""),o.markedElements.push(e))}));"SCRIPT"==r.tagName&&(r.async&&""!=r.getAttribute("async")&&"async"!=r.getAttribute("async")&&(r.setAttribute(J,""),o.markedElements.push(r)),r.textContent=r.textContent.replace(/<\/script>/gi,"<\\/script>"))}(e,t,r,n,o,a,l);const c=!(r instanceof e.SVGElement)&&pe(r);if(c&&!r.classList.contains(ie)){const i={};r.setAttribute(D,o.shadowRoots.length),o.markedElements.push(r),o.shadowRoots.push(i),he(e,t,c,n,o,a),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){}}he(e,t,r,n,o,a),!n.autoSaveExternalSave&&n.removeHiddenElements&&i&&(s||""==r.getAttribute(M)?r.parentElement&&(r.parentElement.setAttribute(M,""),o.markedElements.push(r.parentElement)):a&&(r.setAttribute(z,""),o.markedElements.push(r)))})),o}function de(e,t,r){if(e){const n=e.getPropertyValue("font-style")||"normal";e.getPropertyValue("font-family").split(",").forEach((o=>{if(o=me(o),!t.loadedFonts||t.loadedFonts.find((e=>me(e.family)==o&&e.style==n))){const t=we(e.getPropertyValue("font-weight")),i=e.getPropertyValue("font-variant")||"normal",a=[o,t,n,i];r.set(le.stringify(a),[o,t,n,i])}}))}}function pe(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 me(e=""){return ve(_(e.trim())).toLowerCase()}function fe(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 ge(e,t,r){if(e.querySelectorAll("["+Y+"]").forEach((e=>{e.textContent=e.getAttribute(Y),e.removeAttribute(Y)})),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=[z,O,P,U,q,B,j,H,W,D,G,J];t=e.querySelectorAll(r.map((e=>"["+e+"]")).join(","))}t.forEach((e=>{e.removeAttribute(z),e.removeAttribute(P),e.removeAttribute(M),e.removeAttribute(O),e.removeAttribute(U),e.removeAttribute(q),e.removeAttribute(B),e.removeAttribute(j),e.removeAttribute(H),e.removeAttribute(W),e.removeAttribute(D),e.removeAttribute(G),e.removeAttribute(J),e.removeAttribute(V)})),r&&Array.from(r.entries()).forEach((([e,t])=>t.replaceWith(e)))}function ye(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(G,n),t[n]=Array.from(r.sheet.cssRules).map((e=>e.cssText)).join("\n"))}catch(e){}})),t}}function be(e,t){if(t.getPropertyValue(e).endsWith("px"))return parseFloat(t.getPropertyValue(e))}function ke(e){const t=e.doctype;let r="";return t&&(r=" "),r+e.documentElement.outerHTML}function ve(e){return(e=e.match(ee)?e.replace(ee,"$1"):e.replace(te,"$1")).trim()}function we(e){return re[e.toLowerCase().trim()]||e}function xe(e){return e.flat?e.flat():e.reduce(((e,t)=>e.concat(Array.isArray(t)?xe(t):t)),[])}function Ae(e,t,r){try{return e.getComputedStyle(t,r)}catch(e){}}var Ee=Object.freeze({__proto__:null,initUserScriptHandler:function(){se("single-file-user-script-init",(()=>globalThis._singleFile_waitForUserScript=async e=>{const t=new CustomEvent(e+"-request",{cancelable:!0}),r=new Promise((t=>se(e+"-response",t)));(e=>{try{globalThis.dispatchEvent(e)}catch(e){}})(t),t.defaultPrevented&&await r}))},initDoc:ce,preProcessDoc:ue,postProcessDoc:ge,serialize:ke,removeQuotes:ve,flatten:xe,getFontWeight:we,normalizeFontFamily:me,getShadowRoot:pe,ON_BEFORE_CAPTURE_EVENT_NAME:L,ON_AFTER_CAPTURE_EVENT_NAME:N,WIN_ID_ATTRIBUTE_NAME:F,PRESERVED_SPACE_ELEMENT_ATTRIBUTE_NAME:U,REMOVED_CONTENT_ATTRIBUTE_NAME:z,HIDDEN_CONTENT_ATTRIBUTE_NAME:P,HIDDEN_FRAME_ATTRIBUTE_NAME:O,IMAGE_ATTRIBUTE_NAME:q,POSTER_ATTRIBUTE_NAME:B,VIDEO_ATTRIBUTE_NAME:j,CANVAS_ATTRIBUTE_NAME:H,INPUT_VALUE_ATTRIBUTE_NAME:W,SHADOW_ROOT_ATTRIBUTE_NAME:D,STYLE_ATTRIBUTE_NAME:V,LAZY_SRC_ATTRIBUTE_NAME:$,STYLESHEET_ATTRIBUTE_NAME:G,SELECTED_CONTENT_ATTRIBUTE_NAME:Q,INVALID_ELEMENT_ATTRIBUTE_NAME:K,ASYNC_SCRIPT_ATTRIBUTE_NAME:J,COMMENT_HEADER:ne,COMMENT_HEADER_LEGACY:oe,SINGLE_FILE_UI_ELEMENT_CLASS:ie,EMPTY_RESOURCE:ae});const Se={LAZY_SRC_ATTRIBUTE_NAME:$,SINGLE_FILE_UI_ELEMENT_CLASS:ie},Te=10,Ce="attributes",Re=globalThis.browser,_e=globalThis.document,Ie=globalThis.MutationObserver,Le=(e,t,r)=>globalThis.addEventListener(e,t,r),Ne=(e,t,r)=>globalThis.removeEventListener(e,t,r),ze=new Map;let Pe;async function Me(e){if(_e.documentElement){ze.clear();const t=_e.body&&_e.body.scrollHeight||_e.documentElement.scrollHeight,r=_e.body&&_e.body.scrollWidth||_e.documentElement.scrollWidth;if(t>globalThis.innerHeight||r>globalThis.innerWidth){const n=Math.max(t-1.5*globalThis.innerHeight,0),o=Math.max(r-1.5*globalThis.innerWidth,0);if(globalThis.scrollY{let r;const n=new Set,o=new Ie((async t=>{if((t=t.filter((e=>e.type==Ce))).length){t.filter((e=>{if("src"==e.attributeName&&(e.target.setAttribute(Se.LAZY_SRC_ATTRIBUTE_NAME,e.target.src),e.target.addEventListener("load",a)),"src"==e.attributeName||"srcset"==e.attributeName||"SOURCE"==e.target.tagName)return!e.target.classList||!e.target.classList.contains(Se.SINGLE_FILE_UI_ELEMENT_CLASS)})).length&&(r=!0,await De(o,e,c),n.size||await Ue(o,e,c))}}));async function i(t){await qe("idleTimeout",(async()=>{r?PeFe(e,t,r)),t.loadDeferredImagesMaxIdleTime,t.loadDeferredImagesNativeTimeout)}async function De(e,t,r){await qe("maxTimeout",(async()=>{await je("loadTimeout"),await Fe(e,t,r)}),10*t.loadDeferredImagesMaxIdleTime,t.loadDeferredImagesNativeTimeout)}async function Fe(e,t,r){await je("idleTimeout"),E(t),await qe("endTimeout",(async()=>{await je("maxTimeout"),r()}),t.loadDeferredImagesMaxIdleTime/2,t.loadDeferredImagesNativeTimeout),e.disconnect()}async function qe(e,t,r,n){if(Re&&Re.runtime&&Re.runtime.sendMessage&&!n){if(!ze.get(e)||!ze.get(e).pending){const n={callback:t,pending:!0};ze.set(e,n);try{await Re.runtime.sendMessage({method:"singlefile.lazyTimeout.setTimeout",type:e,delay:r})}catch(n){Be(e,t,r)}n.pending=!1}}else Be(e,t,r)}function Be(e,t,r){const n=ze.get(e);n&&globalThis.clearTimeout(n),ze.set(e,t),globalThis.setTimeout(t,r)}async function je(e){if(Re&&Re.runtime&&Re.runtime.sendMessage)try{await Re.runtime.sendMessage({method:"singlefile.lazyTimeout.clearTimeout",type:e})}catch(t){He(e)}else He(e)}function He(e){const t=ze.get(e);ze.delete(e),t&&globalThis.clearTimeout(t)}Re&&Re.runtime&&Re.runtime.onMessage&&Re.runtime.onMessage.addListener&&Re.runtime.onMessage.addListener((e=>{if("singlefile.lazyTimeout.onTimeout"==e.method){const t=ze.get(e.type);if(t){ze.delete(e.type);try{t.callback()}catch(t){He(e.type)}}}}));var Ve=Object.freeze({__proto__:null,process:Me,resetZoomLevel:Oe});const We={ON_BEFORE_CAPTURE_EVENT_NAME:L,ON_AFTER_CAPTURE_EVENT_NAME:N,WIN_ID_ATTRIBUTE_NAME:F,preProcessDoc:ue,serialize:ke,postProcessDoc:ge,getShadowRoot:pe},$e="__frameTree__::",Ge='iframe, frame, object[type="text/html"][data]',Ye="*",Qe="singlefile.frameTree.initRequest",Ke="singlefile.frameTree.ackInitRequest",Je="singlefile.frameTree.cleanupRequest",Ze="singlefile.frameTree.initResponse",Xe="*",et=5e3,tt=".",rt=globalThis.window==globalThis.top,nt=globalThis.browser,ot=globalThis.top,it=globalThis.MessageChannel,at=globalThis.document,st=globalThis.JSON;let lt,ct=globalThis.sessions;var ut,ht,dt;function pt(){return globalThis.crypto.getRandomValues(new Uint32Array(32)).join("")}async function mt(e){const t=e.sessionId,r=globalThis._singleFile_waitForUserScript;delete globalThis._singleFile_cleaningUp,rt||(lt=globalThis.frameId=e.windowId),yt(at,e.options,lt,t),rt||(e.options.userScriptEnabled&&r&&await r(We.ON_BEFORE_CAPTURE_EVENT_NAME),wt({frames:[At(at,globalThis,lt,e.options)],sessionId:t,requestedFrameId:at.documentElement.dataset.requestedFrameId&<}),e.options.userScriptEnabled&&r&&await r(We.ON_AFTER_CAPTURE_EVENT_NAME),delete at.documentElement.dataset.requestedFrameId)}function ft(e){if(!globalThis._singleFile_cleaningUp){globalThis._singleFile_cleaningUp=!0;const t=e.sessionId;vt(Et(at),e.windowId,t)}}function gt(e){e.frames.forEach((t=>bt("responseTimeouts",e.sessionId,t.windowId)));const t=ct.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.processed=e.processed)}));t.frames.filter((e=>!e.processed)).length||(t.frames=t.frames.sort(((e,t)=>t.windowId.split(tt).length-e.windowId.split(tt).length)),t.resolve&&(t.requestedFrameId&&t.frames.forEach((e=>{e.windowId==t.requestedFrameId&&(e.requestedFrame=!0)})),t.resolve(t.frames)))}}function yt(e,t,r,n){const o=Et(e);!function(e,t,r,n,o){const i=[];let a;ct.get(o)?a=ct.get(o).requestTimeouts:(a={},ct.set(o,{requestTimeouts:a}));t.forEach(((e,t)=>{const r=n+tt+t;e.setAttribute(We.WIN_ID_ATTRIBUTE_NAME,r),i.push({windowId:r})})),wt({frames:i,sessionId:o,requestedFrameId:e.documentElement.dataset.requestedFrameId&&n}),t.forEach(((e,t)=>{const i=n+tt+t;try{xt(e.contentWindow,{method:Qe,windowId:i,sessionId:o,options:r})}catch(e){}a[i]=globalThis.setTimeout((()=>wt({frames:[{windowId:i,processed:!0}],sessionId:o})),et)})),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 a=n+tt+t;let s;try{s=e.contentDocument}catch(e){}if(s)try{const t=e.contentWindow;t.stop(),bt("requestTimeouts",o,a),yt(s,r,a,o),i.push(At(s,t,a,r))}catch(e){i.push({windowId:a,processed:!0})}})),wt({frames:i,sessionId:o,requestedFrameId:e.documentElement.dataset.requestedFrameId&&n}),delete e.documentElement.dataset.requestedFrameId}(e,o,t,r,n)}function bt(e,t,r){const n=ct.get(t);if(n&&n[e]){const t=n[e][r];t&&(globalThis.clearTimeout(t),delete n[e][r])}}function kt(e,t){const r=ct.get(e);r&&r.responseTimeouts&&(r.responseTimeouts[t]=globalThis.setTimeout((()=>wt({frames:[{windowId:t,processed:!0}],sessionId:e})),1e4))}function vt(e,t,r){e.forEach(((e,n)=>{const o=t+tt+n;e.removeAttribute(We.WIN_ID_ATTRIBUTE_NAME);try{xt(e.contentWindow,{method:Je,windowId:o,sessionId:r})}catch(e){}})),e.forEach(((e,n)=>{const o=t+tt+n;let i;try{i=e.contentDocument}catch(e){}if(i)try{vt(Et(i),o,r)}catch(e){}}))}function wt(e){e.method=Ze;try{ot.singlefile.processors.frameTree.initResponse(e)}catch(t){xt(ot,e,!0)}}function xt(e,t,r){if(e==ot&&nt&&nt.runtime&&nt.runtime.sendMessage)nt.runtime.sendMessage(t);else if(r){const r=new it;e.postMessage($e+st.stringify({method:t.method,sessionId:t.sessionId}),Xe,[r.port2]),r.port1.postMessage(t)}else e.postMessage($e+st.stringify(t),Xe)}function At(e,t,r,n){const o=We.preProcessDoc(e,t,n),i=We.serialize(e);We.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,processed:!0}}function Et(e){let t=Array.from(e.querySelectorAll(Ge));return e.querySelectorAll(Ye).forEach((e=>{const r=We.getShadowRoot(e);r&&(t=t.concat(...r.querySelectorAll(Ge)))})),t}ct||(ct=globalThis.sessions=new Map),rt&&(lt="0",nt&&nt.runtime&&nt.runtime.onMessage&&nt.runtime.onMessage.addListener&&nt.runtime.onMessage.addListener((e=>e.method==Ze?(gt(e),Promise.resolve({})):e.method==Ke?(bt("requestTimeouts",e.sessionId,e.windowId),kt(e.sessionId,e.windowId),Promise.resolve({})):void 0))),ut="message",ht=async e=>{if("string"==typeof e.data&&e.data.startsWith($e)){e.preventDefault(),e.stopPropagation();const t=st.parse(e.data.substring($e.length));t.method==Qe?(e.source&&xt(e.source,{method:Ke,windowId:t.windowId,sessionId:t.sessionId}),rt||(globalThis.stop(),t.options.loadDeferredImages&&Me(t.options),await mt(t))):t.method==Ke?(bt("requestTimeouts",t.sessionId,t.windowId),kt(t.sessionId,t.windowId)):t.method==Je?ft(t):t.method==Ze&&ct.get(t.sessionId)&&(e.ports[0].onmessage=e=>gt(e.data))}},dt=!0,globalThis.addEventListener(ut,ht,dt);var St=Object.freeze({__proto__:null,getAsync:function(e){const t=pt();return e=st.parse(st.stringify(e)),new Promise((r=>{ct.set(t,{frames:[],requestTimeouts:{},responseTimeouts:{},resolve:e=>{e.sessionId=t,r(e)}}),mt({windowId:lt,sessionId:t,options:e})}))},getSync:function(e){const t=pt();e=st.parse(st.stringify(e)),ct.set(t,{frames:[],requestTimeouts:{},responseTimeouts:{}}),function(e){const t=e.sessionId,r=globalThis._singleFile_waitForUserScript;delete globalThis._singleFile_cleaningUp,rt||(lt=globalThis.frameId=e.windowId);yt(at,e.options,lt,t),rt||(e.options.userScriptEnabled&&r&&r(We.ON_BEFORE_CAPTURE_EVENT_NAME),wt({frames:[At(at,globalThis,lt,e.options)],sessionId:t,requestedFrameId:at.documentElement.dataset.requestedFrameId&<}),e.options.userScriptEnabled&&r&&r(We.ON_AFTER_CAPTURE_EVENT_NAME),delete at.documentElement.dataset.requestedFrameId)}({windowId:lt,sessionId:t,options:e});const r=ct.get(t).frames;return r.sessionId=t,r},cleanup:function(e){ct.delete(e),ft({windowId:lt,sessionId:e,options:{sessionId:e}})},initResponse:gt,TIMEOUT_INIT_REQUEST_MESSAGE:et}),Tt=Object.freeze({__proto__:null,frameTree:St,hooksFrames:T,lazy:Ve}),Ct=Object.create,Rt=Object.defineProperty,_t=Object.defineProperties,It=Object.getOwnPropertyDescriptor,Lt=Object.getOwnPropertyDescriptors,Nt=Object.getOwnPropertyNames,zt=Object.getOwnPropertySymbols,Pt=Object.getPrototypeOf,Mt=Object.prototype.hasOwnProperty,Ot=Object.prototype.propertyIsEnumerable,Ut=(e,t,r)=>t in e?Rt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Dt=(e,t)=>{for(var r in t||(t={}))Mt.call(t,r)&&Ut(e,r,t[r]);if(zt)for(var r of zt(t))Ot.call(t,r)&&Ut(e,r,t[r]);return e},Ft=(e,t)=>_t(e,Lt(t)),qt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Bt=(e,t)=>{for(var r in t)Rt(e,r,{get:t[r],enumerable:!0})},jt=qt((e=>{var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");e.encode=function(e){if(0<=e&&e{var t=jt();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,a=e.length,s=0,l=0;do{if(r>=a)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),s+=(i&=31)<>1;return 1==(1&e)?-t:t}(s),n.rest=r}})),Vt=qt((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,a,s=(i=function(t){var r=t,i=n(t);if(i){if(!i.path)return t;r=i.path}for(var a=e.isAbsolute(r),s=[],l=0,c=0;;){if(l=c,-1===(c=r.indexOf("/",l))){s.push(r.slice(l));break}for(s.push(r.slice(l,c));c=0;c--)"."===(u=s[c])?s.splice(c,1):".."===u?h++:h>0&&(""===u?(s.splice(c+1,h),h=0):(s.splice(c,2),h--));return""===(r=s.join("/"))&&(r=a?"/":"."),i?(i.path=r,o(i)):r},a=[],function(e){for(var t=0;t32&&a.pop(),n});function l(e,t){""===e&&(e="."),""===t&&(t=".");var i=n(t),a=n(e);if(a&&(e=a.path||"/"),i&&!i.scheme)return a&&(i.scheme=a.scheme),o(i);if(i||t.match(r))return t;if(a&&!a.host&&!a.path)return a.host=t,o(a);var l="/"===t.charAt(0)?t:s(e.replace(/\/+$/,"")+"/"+t);return a?(a.path=l,o(a)):l}e.normalize=s,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 a=i.path.lastIndexOf("/");a>=0&&(i.path=i.path.substring(0,a+1))}t=l(o(i),t)}return s(t)}})),Wt=qt((e=>{var t=Vt(),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=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{var t=Vt();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,a=r.generatedColumn;return o>n||o==n&&a>=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})),Gt=qt((e=>{var t=Ht(),r=Vt(),n=Wt().ArraySet,o=$t().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 a=e.sourceContentFor(o);null!=a&&n.setSourceContent(o,a)})),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 a=this._sourceRoot;null!=a&&(i=r.relative(a,i));var s=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!=a&&(t.source=r.relative(a,t.source)),t.originalLine=n.line,t.originalColumn=n.column,null!=n.name&&(t.name=n.name))}var c=t.source;null!=c&&!s.has(c)&&s.add(c);var u=t.name;null!=u&&!l.has(u)&&l.add(u)}),this),this._sources=s,this._names=l,e.sources.forEach((function(t){var n=e.sourceContentFor(t);null!=n&&(null!=o&&(t=r.join(o,t)),null!=a&&(t=r.relative(a,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,a=0,s=1,l=0,c=0,u=0,h=0,d="",p=this._mappings.toArray(),m=0,f=p.length;m0){if(!r.compareByGeneratedPositionsInflated(n,p[m-1]))continue;e+=","}e+=t.encode(n.generatedColumn-a),a=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})),Yt={};Bt(Yt,{AtKeyword:()=>Zt,BadString:()=>tr,BadUrl:()=>nr,CDC:()=>ur,CDO:()=>cr,Colon:()=>hr,Comma:()=>pr,Comment:()=>vr,Delim:()=>or,Dimension:()=>sr,EOF:()=>Qt,Function:()=>Jt,Hash:()=>Xt,Ident:()=>Kt,LeftCurlyBracket:()=>br,LeftParenthesis:()=>gr,LeftSquareBracket:()=>mr,Number:()=>ir,Percentage:()=>ar,RightCurlyBracket:()=>kr,RightParenthesis:()=>yr,RightSquareBracket:()=>fr,Semicolon:()=>dr,String:()=>er,Url:()=>rr,WhiteSpace:()=>lr});var Qt=0,Kt=1,Jt=2,Zt=3,Xt=4,er=5,tr=6,rr=7,nr=8,or=9,ir=10,ar=11,sr=12,lr=13,cr=14,ur=15,hr=16,dr=17,pr=18,mr=19,fr=20,gr=21,yr=22,br=23,kr=24,vr=25;function wr(e){return e>=48&&e<=57}function xr(e){return wr(e)||e>=65&&e<=70||e>=97&&e<=102}function Ar(e){return e>=65&&e<=90}function Er(e){return function(e){return Ar(e)||function(e){return e>=97&&e<=122}(e)}(e)||function(e){return e>=128}(e)||95===e}function Sr(e){return Er(e)||wr(e)||45===e}function Tr(e){return e>=0&&e<=8||11===e||e>=14&&e<=31||127===e}function Cr(e){return 10===e||13===e||12===e}function Rr(e){return Cr(e)||32===e||9===e}function _r(e,t){return!(92!==e||Cr(t)||0===t)}function Ir(e,t,r){return 45===e?Er(t)||45===t||_r(t,r):!!Er(e)||92===e&&_r(e,t)}function Lr(e,t,r){return 43===e||45===e?wr(t)?2:46===t&&wr(r)?3:0:46===e?wr(t)?2:0:wr(e)?1:0}function Nr(e){return 65279===e||65534===e?1:0}var zr=new Array(128),Pr=130,Mr=131,Or=132,Ur=133;for(let e=0;ee.length)return!1;for(let o=t;o=55296&&t<=57343||t>1114111)&&(t=65533),String.fromCodePoint(t)}var Kr=["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 Jr(e=null,t){return null===e||e.length0?Nr(t.charCodeAt(0)):0,o=Jr(e.lines,r),i=Jr(e.columns,r),a=e.startLine,s=e.startColumn;for(let e=n;e{})){let r=(e=String(e||"")).length,n=Jr(this.offsetAndType,e.length+1),o=Jr(this.balance,e.length+1),i=0,a=0,s=0,l=-1;for(this.offsetAndType=null,this.balance=null,t(e,((e,t,c)=>{switch(e){default:o[i]=r;break;case a:{let e=s&en;for(s=o[e],a=s>>tn,o[i]=e,o[e++]=i;e>tn:0}lookupOffset(e){return(e+=this.tokenIndex)0?e>tn,this.tokenEnd=t&en):(this.tokenIndex=this.tokenCount,this.next())}next(){let e=this.tokenIndex+1;e>tn,this.tokenEnd=e&en):(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(;o0?this.offsetAndType[o-1]&en: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>tn,n,i,t)}}dump(){let e=new Array(this.tokenCount);return this.forEachToken(((t,r,n,o)=>{e[o]={idx:o,type:Kr[t],chunk:this.source.substring(r,n),balance:this.balance[o]}})),e}};function on(e,t){function r(t){return t=e.length?void(cString(e+r+1).padStart(l)+" |"+t)).join("\n")}let i=e.split(/\r\n?|\n|\f/),a=Math.max(1,t-n)-1,s=Math.min(t+n,i.length+1),l=Math.max(4,String(s).length)+1,c=0;(r+=(hn.length-1)*(i[t-1].substr(0,r-1).match(/\t/g)||[]).length)>cn&&(c=r-un+3,r=un-2);for(let e=a;e<=s;e++)e>=0&&e0&&i[e].length>c?"…":"")+i[e].substr(c,cn-2)+(i[e].length>c+cn-1?"…":""));return[o(a,t),new Array(r+l+2).join("-")+"^",o(t,s)].filter(Boolean).join("\n")}function pn(e,t,r,n,o){return Object.assign(ln("SyntaxError",e),{source:t,offset:r,line:n,column:o,sourceFragment:e=>dn({source:t,line:n,column:o},isNaN(e)?0:e),get formattedMessage(){return`Parse error: ${e}\n`+dn({source:t,line:n,column:o},2)}})}function mn(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 fn=()=>{},gn=33,yn=35,bn=59,kn=123,vn=0;function wn(e){return function(){return this[e]()}}function xn(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 An(e){let t="",r="",n=!1,o=fn,i=!1,a=new Xr,s=Object.assign(new nn,function(e){let t={context:Object.create(null),scope:Object.assign(Object.create(null),e.scope),atrule:xn(e.atrule),pseudo:xn(e.pseudo),node:xn(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]=wn(e.parseContext[r])}return Dt(Dt({config:t},t),t.node)}(e||{}),{parseAtrulePrelude:!0,parseRulePrelude:!0,parseValue:!0,parseCustomProperty:!1,readSequence:mn,consumeUntilBalanceEnd:()=>0,consumeUntilLeftCurlyBracket:e=>e===kn?1:0,consumeUntilLeftCurlyBracketOrSemicolon:e=>e===kn||e===bn?1:0,consumeUntilExclamationMarkOrSemicolon:e=>e===gn||e===bn?1:0,consumeUntilSemicolonIncluded:e=>e===bn?2:0,createList:()=>new sn,createSingleNodeList:e=>(new sn).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(t!==vn);return vn},charCodeAt:e=>e>=0&&et.substring(e,r),substrToCursor(e){return this.source.substring(e,this.tokenStart)},cmpChar:(e,r)=>Br(t,e,r),cmpStr:(e,r,n)=>jr(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,Gr(t,this.tokenStart));return this.eat(e),r},eat(e){if(this.tokenType!==e){let t=Kr[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(yn)&&(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?a.getLocationRange(e,t,r):null,getLocationFromList(e){if(n){let t=this.getFirstListNode(e),n=this.getLastListNode(e);return a.getLocationRange(null!==t?t.loc.start.offset-a.startOffset:this.tokenStart,null!==n?n.loc.end.offset-a.startOffset:this.tokenStart,r)}return null},error(e,r){let n=void 0!==r&&r=0&&Rr(e.charCodeAt(t));t--);return t+1}(t,t.length-1)):a.getLocation(this.tokenStart);throw new pn(e||"Unexpected input",t,n.offset,n.line,n.column)}});return Object.assign((function(e,l){t=e,l=l||{},s.setSource(t,on),a.setSource(t,l.offset,l.line,l.column),r=l.filename||"",n=Boolean(l.positions),o="function"==typeof l.onParseError?l.onParseError:fn,i=!1,s.parseAtrulePrelude=!("parseAtrulePrelude"in l)||Boolean(l.parseAtrulePrelude),s.parseRulePrelude=!("parseRulePrelude"in l)||Boolean(l.parseRulePrelude),s.parseValue=!("parseValue"in l)||Boolean(l.parseValue),s.parseCustomProperty="parseCustomProperty"in l&&Boolean(l.parseCustomProperty);let{context:c="default",onComment:u}=l;if(!(c in s.context))throw new Error("Unknown context `"+c+"`");"function"==typeof u&&s.forEachToken(((e,r,n)=>{if(25===e){let e=s.getLocation(r,n),o=jr(t,n-2,n,"*/")?t.slice(r+2,n-2):t.slice(r+2,n);u(o,e)}}));let h=s.context[c].call(s,l);return s.eof||s.error(),h}),{SyntaxError:pn,config:s.config})}var En,Sn,Tn,Cn=(En=Gt(),Sn=1,Tn=null!=En?Ct(Pt(En)):{},((e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of Nt(t))!Mt.call(e,o)&&o!==r&&Rt(e,o,{get:()=>t[o],enumerable:!(n=It(t,o))||n.enumerable});return e})(!Sn&&En&&En.__esModule?Tn:Rt(Tn,"default",{value:En,enumerable:!0}),En)),Rn=new Set(["Atrule","Selector","Declaration"]);var _n={};Bt(_n,{safe:()=>Mn,spec:()=>Pn});var In=(e,t)=>{if(9===e&&(e=t),"string"==typeof e){let t=e.charCodeAt(0);return t>127?32768:t<<8}return e},Ln=[[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],["/","*"]],Nn=Ln.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 zn(e){let t=new Set(e.map((([e,t])=>In(e)<<16|In(t))));return function(e,r,n){let o=In(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 Pn=zn(Ln),Mn=zn(Nn),On=92;function Un(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 Dn(e){on(e,((t,r,n)=>{this.token(t,e.slice(r,n))}))}function Fn(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(a,e)},tokenBefore:Mn,token(e,t){o=this.tokenBefore(o,e,t),this.emit(t,e,!1),9===e&&t.charCodeAt(0)===On&&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 Cn.SourceMapGenerator,r={line:1,column:0},n={line:0,column:0},o={line:1,column:0},i={generated:o},a=1,s=0,l=!1,c=e.node;e.node=function(e){if(e.loc&&e.loc.start&&Rn.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=a,r.column=s,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&&Rn.has(e.type)&&(o.line=a,o.column=s)};let u=e.emit;e.emit=function(e,t,r){for(let t=0;ti.node(e),children:Un,token:(e,t)=>i.token(e,t),tokenize:Dn};return i.node(e),i.result()}}var{hasOwnProperty:qn}=Object.prototype,Bn=function(){};function jn(e){return"function"==typeof e?e:Bn}function Hn(e,t){return function(r,n,o){r.type===t&&e.call(this,r,n,o)}}function Vn(e,t){let r=t.structure,n=[];for(let e in r){if(!1===qn.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 Wn(e,t){let r=e.fields.slice(),n=e.context,o="string"==typeof n;return t&&r.reverse(),function(e,i,a,s){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(s,!1):r.reduce(s,!1))return!0}else if(a(r))return!0}o&&(i[n]=l)}}function $n({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 Gn(e){let t=function(e){let t={};for(let r in e.node)if(qn.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]=Vn(0,n)}return t}(e),r={},n={},o=Symbol("break-walk"),i=Symbol("skip-node");for(let e in t)qn.call(t,e)&&null!==t[e]&&(r[e]=Wn(t[e],!1),n[e]=Wn(t[e],!0));let a=$n(r),s=$n(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=Bn,h=Bn,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=jn(l.enter),h=jn(l.leave),l.reverse&&(d=n),l.visit)){if(a.hasOwnProperty(l.visit))d=l.reverse?s[l.visit]:a[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=Hn(u,l.visit),h=Hn(h,l.visit)}if(u===Bn&&h===Bn)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(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 Yn(e){return e}function Qn(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=>Qn(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 Qn(e.term,t,r,n)+t(function(e){let{min:t,max:r,comma:n}=e;return 0===t&&0===r?n?"#?":"*":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 Kn(e,t){let r=Yn,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)),Qn(e,r,n,o)}var Jn={offset:0,line:1,column:1};function Zn(e,t){let r=e&&e.loc&&e.loc[t];return r?"line"in r?Xn(r):r:null}function Xn({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 eo=function(e,t){let r=ln("SyntaxReferenceError",e+(t?" `"+t+"`":""));return r.reference=t,r},to=function(e,t,r,n){let o=ln("SyntaxMatchError",e),{css:i,mismatchOffset:a,mismatchLength:s,start:l,end:c}=function(e,t){let r,n,o=e.tokens,i=e.longestMatch,a=i1?(r=Zn(s||t,"end")||Xn(Jn,h),n=Xn(r)):(r=Zn(s,"start")||Xn(Zn(t,"start")||Jn,h.slice(0,l)),n=Zn(s,"end")||Xn(r,h.substr(l,c))),{css:h,mismatchOffset:l,mismatchLength:c,start:r,end:n}}(n,r);return o.rawMessage=e,o.syntax=t?Kn(t):"",o.css=i,o.mismatchOffset=a,o.mismatchLength=s,o.message=e+"\n syntax: "+o.syntax+"\n value: "+(i||"")+"\n --------"+new Array(o.mismatchOffset+1).join("-")+"^",Object.assign(o,l),o.loc={source:r&&r.loc&&r.loc.source||"",start:l,end:c},o},ro=new Map,no=new Map,oo=45,io=function(e){if(ro.has(e))return ro.get(e);let t=e.toLowerCase(),r=ro.get(t);if(void 0===r){let e=lo(t,0),n=e?"":co(t,0);r=Object.freeze({basename:t.substr(n.length),name:t,prefix:n,vendor:n,custom:e})}return ro.set(e,r),r},ao=function(e){if(no.has(e))return no.get(e);let t=e,r=e[0];"/"===r?r="/"===e[1]?"//":"/":"_"!==r&&"*"!==r&&"$"!==r&&"#"!==r&&"+"!==r&&"&"!==r&&(r="");let n=lo(t,r.length);if(!n&&(t=t.toLowerCase(),no.has(t))){let r=no.get(t);return no.set(e,r),r}let o=n?"":co(t,r.length),i=t.substr(0,r.length+o.length),a=Object.freeze({basename:t.substr(i.length),name:t.substr(r.length),hack:r,vendor:o,prefix:i,custom:n});return no.set(e,a),a},so=co;function lo(e,t){return t=t||0,e.length-t>=2&&e.charCodeAt(t)===oo&&e.charCodeAt(t+1)===oo}function co(e,t){if(t=t||0,e.length-t>=3&&e.charCodeAt(t)===oo&&e.charCodeAt(t+1)!==oo){let r=e.indexOf("-",t+2);if(-1!==r)return e.substring(t,r+1)}return""}var uo=["initial","inherit","unset","revert","revert-layer"],ho=43,po=45,mo=!0;function fo(e,t){return null!==e&&9===e.type&&e.value.charCodeAt(0)===t}function go(e,t,r){for(;null!==e&&(13===e.type||25===e.type);)e=r(++t);return t}function yo(e,t,r,n){if(!e)return 0;let o=e.value.charCodeAt(t);if(o===ho||o===po){if(r)return 0;t++}for(;t6)return 0}return n}function Ao(e,t,r){if(!e)return 0;for(;wo(r(t),vo);){if(++e>6)return 0;t++}return t}var Eo=["calc(","-moz-calc(","-webkit-calc("],So=new Map([[2,22],[21,22],[19,20],[23,24]]);function To(e,t){return te.max&&"string"!=typeof e.max)return!0}return!1}function Lo(e){return function(t,r,n){return null===t?0:2===t.type&&Ro(t.value,Eo)?function(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=So.get(e.type)}o++}while(e=t(o));return o}(t,r):e(t,r,n)}}function No(e){return function(t){return null===t||t.type!==e?0:1}}function zo(e){return e&&(e=new Set(e)),function(t,r,n){if(null===t||12!==t.type)return 0;let o=Gr(t.value,0);if(null!==e){let r=t.value.indexOf("\\",o),n=-1!==r&&_o(t.value,r)?t.value.substring(o,r):t.value.substr(o);if(!1===e.has(n.toLowerCase()))return 0}return Io(n,t.value,o)?0:1}}function Po(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 Mo={"ident-token":No(1),"function-token":No(2),"at-keyword-token":No(3),"hash-token":No(4),"string-token":No(5),"bad-string-token":No(6),"url-token":No(7),"bad-url-token":No(8),"delim-token":No(9),"number-token":No(10),"percentage-token":No(11),"dimension-token":No(12),"whitespace-token":No(13),"CDO-token":No(14),"CDC-token":No(15),"colon-token":No(16),"semicolon-token":No(17),"comma-token":No(18),"[-token":No(19),"]-token":No(20),"(-token":No(21),")-token":No(22),"{-token":No(23),"}-token":No(24)},Oo={string:No(5),ident:No(1),percentage:Lo((function(e,t,r){return null===e||11!==e.type||Io(r,e.value,e.value.length-1)?0:1})),zero:Po(),number:Lo((function(e,t,r){if(null===e)return 0;let n=Gr(e.value,0);return n!==e.value.length&&!_o(e.value,n)||Io(r,e.value,n)?0:1})),integer:Lo((function(e,t,r){if(null===e||10!==e.type)return 0;let n=43===To(e.value,0)||45===To(e.value,0)?1:0;for(;nqo,decibel:()=>Wo,flex:()=>Vo,frequency:()=>jo,length:()=>Fo,resolution:()=>Ho,semitones:()=>$o,time:()=>Bo});var Fo=["cm","mm","q","in","pt","pc","px","em","rem","ex","rex","cap","rcap","ch","rch","ic","ric","lh","rlh","vw","svw","lvw","dvw","vh","svh","lvh","dvh","vi","svi","lvi","dvi","vb","svb","lvb","dvb","vmin","svmin","lvmin","dvmin","vmax","svmax","lvmax","dvmax","cqw","cqh","cqi","cqb","cqmin","cqmax"],qo=["deg","grad","rad","turn"],Bo=["s","ms"],jo=["hz","khz"],Ho=["dpi","dpcm","dppx","x"],Vo=["fr"],Wo=["db"],$o=["st"],Go={};function Yo(e,t,r){return Object.assign(ln("SyntaxError",e),{input:t,offset:r,rawMessage:e,message:e+"\n "+t+"\n--"+new Array((r||t.length)+1).join("-")+"^"})}Bt(Go,{SyntaxError:()=>Yo,generate:()=>Kn,parse:()=>Pi,walk:()=>Ui});var Qo=class{constructor(e){this.str=e,this.pos=0}charCodeAt(e){return e/[a-zA-Z0-9\-]/.test(String.fromCharCode(t))?1:0)),xi={" ":1,"&&":2,"||":3,"|":4};function Ai(e){return e.substringToPos(e.findWsEnd(e.pos))}function Ei(e){let t=e.pos;for(;t=128||0===wi[r])break}return e.pos===t&&e.error("Expect a keyword"),e.substringToPos(t)}function Si(e){let t=e.pos;for(;t57)break}return e.pos===t&&e.error("Expect a number"),e.substringToPos(t)}function Ti(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 Ci(e){let t=null,r=null;return e.eat(yi),t=Si(e),e.charCode()===ci?(e.pos++,e.charCode()!==ki&&(r=Si(e))):r=t,e.eat(ki),{min:Number(t),max:r?Number(r):0}}function Ri(e,t){let r=function(e){let t=null,r=!1;switch(e.charCode()){case si:e.pos++,t={min:0,max:0};break;case li:e.pos++,t={min:1,max:0};break;case pi:e.pos++,t={min:0,max:1};break;case ri:e.pos++,r=!0,e.charCode()===yi?t=Ci(e):e.charCode()===pi?(e.pos++,t={min:0,max:0}):t={min:1,max:0};break;case yi:t=Ci(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,e.charCode()===ri&&e.charCodeAt(e.pos-1)===li?Ri(e,r):r):t}function _i(e){let t=e.peek();return""===t?null:{type:"Token",value:t}}function Ii(e){let t,r=null;return e.eat(hi),t=Ei(e),e.charCode()===ii&&e.nextCharCode()===ai&&(e.pos+=2,t+="()"),e.charCodeAt(e.findWsEnd(e.pos))===fi&&(Ai(e),r=function(e){let t=null,r=null,n=1;return e.eat(fi),e.charCode()===ui&&(e.peek(),n=-1),-1==n&&e.charCode()===vi?e.peek():(t=n*Number(Si(e)),0!==wi[e.charCode()]&&(t+=Ei(e))),Ai(e),e.eat(ci),Ai(e),e.charCode()===vi?e.peek():(n=1,e.charCode()===ui&&(e.peek(),n=-1),r=n*Number(Si(e)),0!==wi[e.charCode()]&&(r+=Ei(e))),e.eat(gi),{type:"Range",min:t,max:r}}(e)),e.eat(di),Ri(e,{type:"Type",name:t,opts:r})}function Li(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)=>xi[e]-xi[t]));t.length>0;){n=t.shift();let o=0,i=0;for(;o1&&(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 Ni(e){let t,r=[],n={},o=null,i=e.pos;for(;t=zi(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:Li(r,n)||" ",disallowEmpty:!1,explicit:!1}}function zi(e){let t=e.charCode();if(t<128&&1===wi[t])return function(e){let t=Ei(e);return e.charCode()===ii?(e.pos++,{type:"Function",name:t}):Ri(e,{type:"Keyword",name:t})}(e);switch(t){case gi:break;case fi:return Ri(e,function(e){let t;return e.eat(fi),t=Ni(e),e.eat(gi),t.explicit=!0,e.charCode()===ti&&(e.pos++,t.disallowEmpty=!0),t}(e));case hi:return e.nextCharCode()===oi?function(e){let t;return e.eat(hi),e.eat(oi),t=Ei(e),e.eat(oi),e.eat(di),Ri(e,{type:"Property",name:t})}(e):Ii(e);case bi:return{type:"Combinator",value:e.substringToPos(e.pos+(e.nextCharCode()===bi?2:1))};case ni:return e.pos++,e.eat(ni),{type:"Combinator",value:"&&"};case ci:return e.pos++,{type:"Comma"};case oi:return Ri(e,{type:"String",value:Ti(e)});case ei:case Ko:case Jo:case Xo:case Zo:return{type:"Spaces",value:Ai(e)};case mi:return t=e.nextCharCode(),t<128&&1===wi[t]?(e.pos++,{type:"AtKeyword",name:Ei(e)}):_i(e);case si:case li:case pi:case ri:case ti:break;case yi:if(t=e.nextCharCode(),t<48||t>57)return _i(e);break;default:return _i(e)}}function Pi(e){let t=new Qo(e),r=Ni(t);return t.pos!==e.length&&t.error("Unexpected input"),1===r.terms.length&&"Group"===r.terms[0].type?r.terms[0]:r}var Mi=function(){};function Oi(e){return"function"==typeof e?e:Mi}function Ui(e,t,r){let n=Mi,o=Mi;if("function"==typeof t?n=t:t&&(n=Oi(t.enter),o=Oi(t.leave)),n===Mi&&o===Mi)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 Di={decorator(e){let t=[],r=null;return Ft(Dt({},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 Fi(e,t){return"string"==typeof e?function(e){let t=[];return on(e,((r,n,o)=>t.push({type:r,value:e.slice(n,o),node:null}))),t}(e):t.generate(e,Di)}var qi={type:"Match"},Bi={type:"Mismatch"},ji={type:"DisallowEmpty"},Hi=40,Vi=41;function Wi(e,t,r){return t===qi&&r===Bi||e===qi&&t===qi&&r===qi?e:("If"===e.type&&e.else===Bi&&t===qi&&(t=e.then,e=e.match),{type:"If",match:e,then:t,else:r})}function $i(e){return e.length>2&&e.charCodeAt(e.length-2)===Hi&&e.charCodeAt(e.length-1)===Vi}function Gi(e){return"Keyword"===e.type||"AtKeyword"===e.type||"Function"===e.type||"Type"===e.type&&$i(e.name)}function Yi(e,t,r){switch(e){case" ":{let e=qi;for(let r=t.length-1;r>=0;r--){e=Wi(t[r],e,Bi)}return e}case"|":{let e=Bi,r=null;for(let n=t.length-1;n>=0;n--){let o=t[n];if(Gi(o)&&(null===r&&n>0&&Gi(t[n-1])&&(r=Object.create(null),e=Wi({type:"Enum",map:r},qi,e)),null!==r)){let e=($i(o.name)?o.name.slice(0,-1):o.name).toLowerCase();if(!(e in r)){r[e]=o;continue}}r=null,e=Wi(o,qi,e)}return e}case"&&":{if(t.length>5)return{type:"MatchOnce",terms:t,all:!0};let r=Bi;for(let n=t.length-1;n>=0;n--){let o,i=t[n];o=t.length>1?Yi(e,t.filter((function(e){return e!==i})),!1):qi,r=Wi(i,o,r)}return r}case"||":{if(t.length>5)return{type:"MatchOnce",terms:t,all:!1};let n=r?qi:Bi;for(let r=t.length-1;r>=0;r--){let o,i=t[r];o=t.length>1?Yi(e,t.filter((function(e){return e!==i})),!0):qi,n=Wi(i,o,n)}return n}}}function Qi(e){if("function"==typeof e)return{type:"Generic",fn:e};switch(e.type){case"Group":{let t=Yi(e.combinator,e.terms.map(Qi),!1);return e.disallowEmpty&&(t=Wi(t,ji,Bi)),t}case"Multiplier":return function(e){let t=qi,r=Qi(e.term);if(0===e.max)r=Wi(r,ji,Bi),t=Wi(r,null,Bi),t.then=Wi(qi,qi,t),e.comma&&(t.then.else=Wi({type:"Comma",syntax:e},t,Bi));else for(let n=e.min||1;n<=e.max;n++)e.comma&&t!==qi&&(t=Wi({type:"Comma",syntax:e},t,Bi)),t=Wi(r,Wi(qi,qi,t),Bi);if(0===e.min)t=Wi(qi,qi,t);else for(let n=0;n=65&&o<=90&&(o|=32),o!==n)return!1}return!0}function sa(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 la(e){return null===e||(22===e.type||20===e.type||24===e.type||9===e.type&&"/"===e.value)}function ca(e,t,r){let n=function(e,t,r){function n(){do{y++,g=yb&&(b=y)}function c(){k=k.type===ea?k.prev:{type:ta,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:Zi,syntax:null,token:null,prev:null};for(n();null===f&&++md.tokenIndex)&&(d=p,p=!1);else if(null===d){f=na;break}t=d.nextState,h=d.thenStack,u=d.syntaxStack,k=d.matchStack,y=d.tokenIndex,g=yy){for(;y":"<'"+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=Bi;break}u={syntax:t.syntax,opts:t.syntax.opts||null!==u&&u.opts||null,prev:u},k={type:ea,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].*$/,"")),aa(r,e)){l(),t=qi;break}}t=Bi;break}case"AtKeyword":case"Function":if(null!==g&&aa(g.value,t.name)){l(),t=qi;break}t=Bi;break;case"Token":if(null!==g&&g.value===t.value){l(),t=qi;break}t=Bi;break;case"Comma":null!==g&&18===g.type?sa(k.token)?t=Bi:(l(),t=la(g)?Bi:qi):t=sa(k.token)||la(g)?qi:Bi;break;case"String":let n="",m=y;for(;m"Type"===e.type&&e.name===t))}function pa(e,t){return fa(this,e,(e=>"Property"===e.type&&e.name===t))}function ma(e){return fa(this,e,(e=>"Keyword"===e.type))}function fa(e,t,r){let n=ha.call(e,t);return null!==n&&n.some(r)}function ga(e){return"node"in e?e.node:ga(e.match[0])}function ya(e){return"node"in e?e.node:ya(e.match[e.match.length-1])}function ba(e,t,r,n,o){let i=[];return null!==r.matched&&function r(a){if(null!==a.syntax&&a.syntax.type===n&&a.syntax.name===o){let r=ga(a),n=ya(a);e.syntax.walk(t,(function(e,t,o){if(e===r){let e=new sn;do{if(e.appendData(t.data),t.data===n)break;t=t.next}while(null!==t);i.push({parent:o,nodes:e})}}))}Array.isArray(a.match)&&a.match.forEach(r)}(r.matched),i}Bt(ua,{getTrace:()=>ha,isKeyword:()=>ma,isProperty:()=>pa,isType:()=>da});var{hasOwnProperty:ka}=Object.prototype;function va(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e&&e>=0}function wa(e){return Boolean(e)&&va(e.offset)&&va(e.line)&&va(e.column)}function xa(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!==ka.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(wa(r.loc.start)){if(wa(r.loc.end))continue;o+=".end"}else o+=".start";i=!1}else if(t.hasOwnProperty(o)){i=!1;for(let e=0;!i&&e");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:xa(e,n)}}var Ea=Ki(uo.join(" | "));function Sa(e,t,r){let n={};for(let o in e)e[o].syntax&&(n[o]=r?e[o].syntax:Kn(e[o].syntax,{compact:t}));return n}function Ta(e,t,r){let n={};for(let[o,i]of Object.entries(e))n[o]={prelude:i.prelude&&(r?i.prelude.syntax:Kn(i.prelude.syntax,{compact:t})),descriptors:i.descriptors&&Sa(i.descriptors,t,r)};return n}function Ca(e,t,r){return Dt({matched:e,iterations:r,error:t},ua)}function Ra(e,t,r,n){let o,i=Fi(r,e.syntax);return function(e){for(let t=0;t(Object.defineProperty(i,"syntax",{value:Pi(e)}),i.syntax)}):i.syntax=e,Object.defineProperty(i,"match",{get:()=>(Object.defineProperty(i,"match",{value:Ki(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))}checkAtruleName(e){if(!this.getAtrule(e))return new eo("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||Ra(this,n.prelude,"",!1).matched?void 0:new SyntaxError("At-rule `@"+e+"` should contain a prelude")}checkAtruleDescriptorName(e,t){let r=this.checkAtruleName(e);if(r)return r;let n=this.getAtrule(e),o=io(t);return n.descriptors?n.descriptors[o.name]||n.descriptors[o.basename]?void 0:new eo("Unknown at-rule descriptor",t):new SyntaxError("At-rule `@"+e+"` has no known descriptors")}checkPropertyName(e){if(!this.getProperty(e))return new eo("Unknown property",e)}matchAtrulePrelude(e,t){let r=this.checkAtrulePrelude(e,t);if(r)return Ca(null,r);let n=this.getAtrule(e);return n.prelude?Ra(this,n.prelude,t||"",!1):Ca(null,null)}matchAtruleDescriptor(e,t,r){let n=this.checkAtruleDescriptorName(e,t);if(n)return Ca(null,n);let o=this.getAtrule(e),i=io(t);return Ra(this,o.descriptors[i.name]||o.descriptors[i.basename],r,!1)}matchDeclaration(e){return"Declaration"!==e.type?Ca(null,new Error("Not a Declaration node")):this.matchProperty(e.property,e.value)}matchProperty(e,t){if(ao(e).custom)return Ca(null,new Error("Lexer matching doesn't applicable for custom properties"));let r=this.checkPropertyName(e);return r?Ca(null,r):Ra(this,this.getProperty(e),t,!0)}matchType(e,t){let r=this.getType(e);return r?Ra(this,r,t,!1):Ca(null,new eo("Unknown type",e))}match(e,t){return"string"==typeof e||e&&e.type?(("string"==typeof e||!e.match)&&(e=this.createDescriptor(e,"Type","anonymous")),Ra(this,e,t,!1)):Ca(null,new eo("Bad syntax"))}findValueFragments(e,t,r,n){return ba(this,t,this.matchProperty(e,t),r,n)}findDeclarationValueFragments(e,t,r){return ba(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=io(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=ao(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,a){if(i.has(o))return i.get(o);i.set(o,!1),null!==a.syntax&&Ui(a.syntax,(function(a){if("Type"!==a.type&&"Property"!==a.type)return;let s="Type"===a.type?n.types:n.properties,l="Type"===a.type?t:r;(!hasOwnProperty.call(s,a.name)||e(n,a.name,l,s[a.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,units:this.units,types:Sa(this.types,!t,e),properties:Sa(this.properties,!t,e),atrules:Ta(this.atrules,!t,e)}}toString(){return JSON.stringify(this.dump())}};function Ia(e,t){return"string"==typeof t&&/^\s*\|/.test(t)?"string"==typeof e?e+t:t.replace(/^\s*\|\s*/,""):t||null}function La(e,t){let r=Object.create(null);for(let[n,o]of Object.entries(e))if(o){r[n]={};for(let e of Object.keys(o))t.includes(e)&&(r[n][e]=o[e])}return r}function Na(e,t){let r=Dt({},e);for(let[n,o]of Object.entries(t))switch(n){case"generic":r[n]=Boolean(o);break;case"units":r[n]=Dt({},e[n]);for(let[e,t]of Object.entries(o))r[n][e]=Array.isArray(t)?t:[];break;case"atrules":r[n]=Dt({},e[n]);for(let[e,t]of Object.entries(o)){let o=r[n][e]||{},i=r[n][e]={prelude:o.prelude||null,descriptors:Dt({},o.descriptors)};if(t){i.prelude=t.prelude?Ia(i.prelude,t.prelude):i.prelude||null;for(let[e,r]of Object.entries(t.descriptors||{}))i.descriptors[e]=r?Ia(i.descriptors[e],r):null;Object.keys(i.descriptors).length||(i.descriptors=null)}}break;case"types":case"properties":r[n]=Dt({},e[n]);for(let[e,t]of Object.entries(o))r[n][e]=Ia(r[n][e],t);break;case"scope":r[n]=Dt({},e[n]);for(let[e,t]of Object.entries(o))r[n][e]=Dt(Dt({},r[n][e]),t);break;case"parseContext":r[n]=Dt(Dt({},e[n]),o);break;case"atrule":case"pseudo":r[n]=Dt(Dt({},e[n]),La(o,["parse"]));break;case"node":r[n]=Dt(Dt({},e[n]),La(o,["name","structure","parse","generate","walkContext"]))}return r}function za(e){let t=An(e),r=Gn(e),n=Fn(e),{fromPlainObject:o,toPlainObject:i}=function(e){return{fromPlainObject:t=>(e(t,{enter(e){e.children&&!(e.children instanceof sn)&&(e.children=(new sn).fromArray(e.children))}}),t),toPlainObject:t=>(e(t,{leave(e){e.children&&e.children instanceof sn&&(e.children=e.children.toArray())}}),t)}}(r),a={lexer:null,createLexer:e=>new _a(e,a,a.lexer.structure),tokenize:on,parse:t,generate:n,walk:r,find:r.find,findLast:r.findLast,findAll:r.findAll,fromPlainObject:o,toPlainObject:i,fork(t){let r=Na({},e);return za("function"==typeof t?t(r,Object.assign):Na(r,t))}};return a.lexer=new _a({generic:!0,units:e.units,types:e.types,atrules:e.atrules,properties:e.properties,node:e.node},a),a}var Pa=e=>za(Na({},e)),Ma={};Bt(Ma,{AnPlusB:()=>Oa,Atrule:()=>Ka,AtrulePrelude:()=>os,AttributeSelector:()=>us,Block:()=>As,Brackets:()=>Ps,CDC:()=>Fs,CDO:()=>Vs,ClassSelector:()=>Qs,Combinator:()=>tl,Comment:()=>ul,Declaration:()=>yl,DeclarationList:()=>Ml,Dimension:()=>jl,Function:()=>Gl,Hash:()=>Xl,IdSelector:()=>uc,Identifier:()=>ic,MediaFeature:()=>fc,MediaQuery:()=>vc,MediaQueryList:()=>Sc,NestingSelector:()=>Ic,Nth:()=>Oc,Number:()=>Bc,Operator:()=>$c,Parentheses:()=>Jc,Percentage:()=>ru,PseudoClassSelector:()=>su,PseudoElementSelector:()=>pu,Ratio:()=>ku,Raw:()=>Cu,Rule:()=>zu,Selector:()=>Bu,SelectorList:()=>$u,String:()=>Zu,StyleSheet:()=>ch,TypeSelector:()=>yh,UnicodeRange:()=>Sh,Url:()=>Uh,Value:()=>Jh,WhiteSpace:()=>rd});var Oa={};Bt(Oa,{generate:()=>Qa,name:()=>$a,parse:()=>Ya,structure:()=>Ga});var Ua=43,Da=45,Fa=110,qa=!0,Ba=!1;function ja(e,t){let r=this.tokenStart+e,n=this.charCodeAt(r);for((n===Ua||n===Da)&&(t&&this.error("Number sign is not allowed"),r++);r0&&this.skip(e),0===t&&(r=this.charCodeAt(this.tokenStart),r!==Ua&&r!==Da&&this.error("Number sign is expected")),Ha.call(this,0!==t),t===Da?"-"+this.consume(10):this.consume(10)}var $a="AnPlusB",Ga={a:[String,null],b:[String,null]};function Ya(){let e=this.tokenStart,t=null,r=null;if(10===this.tokenType)Ha.call(this,Ba),r=this.consume(10);else if(1===this.tokenType&&this.cmpChar(this.tokenStart,Da))switch(t="-1",Va.call(this,1,Fa),this.tokenEnd-this.tokenStart){case 2:this.next(),r=Wa.call(this);break;case 3:Va.call(this,2,Da),this.next(),this.skipSC(),Ha.call(this,qa),r="-"+this.consume(10);break;default:Va.call(this,2,Da),ja.call(this,3,qa),this.next(),r=this.substrToCursor(e+2)}else if(1===this.tokenType||this.isDelim(Ua)&&1===this.lookupType(1)){let n=0;switch(t="1",this.isDelim(Ua)&&(n=1,this.next()),Va.call(this,0,Fa),this.tokenEnd-this.tokenStart){case 1:this.next(),r=Wa.call(this);break;case 2:Va.call(this,1,Da),this.next(),this.skipSC(),Ha.call(this,qa),r="-"+this.consume(10);break;default:Va.call(this,1,Da),ja.call(this,2,qa),this.next(),r=this.substrToCursor(e+n+1)}}else if(12===this.tokenType){let n=this.charCodeAt(this.tokenStart),o=n===Ua||n===Da,i=this.tokenStart+o;for(;ins,name:()=>Xa,parse:()=>rs,structure:()=>ts,walkContext:()=>es});var Xa="Atrule",es="atrule",ts={name:String,prelude:["AtrulePrelude","Raw",null],block:["Block",null]};function rs(e=!1){let t,r,n=this.tokenStart,o=null,i=null;switch(this.eat(3),t=this.substrToCursor(n+1),r=t.toLowerCase(),this.skipSC(),!1===this.eof&&23!==this.tokenType&&17!==this.tokenType&&(o=this.parseAtrulePrelude?this.parseWithFallback(this.AtrulePrelude.bind(this,t,e),Ja):Ja.call(this,this.tokenIndex),this.skipSC()),this.tokenType){case 17:this.next();break;case 23:i=hasOwnProperty.call(this.atrule,r)&&"function"==typeof this.atrule[r].block?this.atrule[r].block.call(this,e):this.Block(Za.call(this))}return{type:"Atrule",loc:this.getLocation(n,this.tokenStart),name:t,prelude:o,block:i}}function ns(e){this.token(3,"@"+e.name),null!==e.prelude&&this.node(e.prelude),e.block?this.node(e.block):this.token(17,";")}var os={};Bt(os,{generate:()=>cs,name:()=>is,parse:()=>ls,structure:()=>ss,walkContext:()=>as});var is="AtrulePrelude",as="atrulePrelude",ss={children:[[]]};function ls(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 cs(e){this.children(e)}var us={};Bt(us,{generate:()=>xs,name:()=>ks,parse:()=>ws,structure:()=>vs});var hs=36,ds=42,ps=61,ms=94,fs=124,gs=126;function ys(){this.eof&&this.error("Unexpected end of input");let e=this.tokenStart,t=!1;return this.isDelim(ds)?(t=!0,this.next()):this.isDelim(fs)||this.eat(1),this.isDelim(fs)?this.charCodeAt(this.tokenStart+1)!==ps?(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 bs(){let e=this.tokenStart,t=this.charCodeAt(e);return t!==ps&&t!==gs&&t!==ms&&t!==hs&&t!==ds&&t!==fs&&this.error("Attribute selector (=, ~=, ^=, $=, *=, |=) is expected"),this.next(),t!==ps&&(this.isDelim(ps)||this.error("Equal sign is expected"),this.next()),this.substrToCursor(e)}var ks="AttributeSelector",vs={name:"Identifier",matcher:[String,null],value:["String","Identifier",null],flags:[String,null]};function ws(){let e,t=this.tokenStart,r=null,n=null,o=null;return this.eat(19),this.skipSC(),e=ys.call(this),this.skipSC(),20!==this.tokenType&&(1!==this.tokenType&&(r=bs.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 xs(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 As={};Bt(As,{generate:()=>zs,name:()=>_s,parse:()=>Ns,structure:()=>Ls,walkContext:()=>Is});var Es=38;function Ss(e){return this.Raw(e,null,!0)}function Ts(){return this.parseWithFallback(this.Rule,Ss)}function Cs(e){return this.Raw(e,this.consumeUntilSemicolonIncluded,!0)}function Rs(){if(17===this.tokenType)return Cs.call(this,this.tokenIndex);let e=this.parseWithFallback(this.Declaration,Cs);return 17===this.tokenType&&this.next(),e}var _s="Block",Is="block",Ls={children:[["Atrule","Rule","Declaration"]]};function Ns(e){let t=e?Rs:Ts,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.bind(this,e),Ss));break;default:e&&this.isDelim(Es)?n.push(Ts.call(this)):n.push(t.call(this))}return this.eof||this.eat(24),{type:"Block",loc:this.getLocation(r,this.tokenStart),children:n}}function zs(e){this.token(23,"{"),this.children(e,(e=>{"Declaration"===e.type&&this.token(17,";")})),this.token(24,"}")}var Ps={};Bt(Ps,{generate:()=>Ds,name:()=>Ms,parse:()=>Us,structure:()=>Os});var Ms="Brackets",Os={children:[[]]};function Us(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 Ds(e){this.token(9,"["),this.children(e),this.token(9,"]")}var Fs={};Bt(Fs,{generate:()=>Hs,name:()=>qs,parse:()=>js,structure:()=>Bs});var qs="CDC",Bs=[];function js(){let e=this.tokenStart;return this.eat(15),{type:"CDC",loc:this.getLocation(e,this.tokenStart)}}function Hs(){this.token(15,"--\x3e")}var Vs={};Bt(Vs,{generate:()=>Ys,name:()=>Ws,parse:()=>Gs,structure:()=>$s});var Ws="CDO",$s=[];function Gs(){let e=this.tokenStart;return this.eat(14),{type:"CDO",loc:this.getLocation(e,this.tokenStart)}}function Ys(){this.token(14,"\x3c!--")}var Qs={};Bt(Qs,{generate:()=>el,name:()=>Js,parse:()=>Xs,structure:()=>Zs});var Ks=46,Js="ClassSelector",Zs={name:String};function Xs(){return this.eatDelim(Ks),{type:"ClassSelector",loc:this.getLocation(this.tokenStart-1,this.tokenEnd),name:this.consume(1)}}function el(e){this.token(9,"."),this.token(1,e.name)}var tl={};Bt(tl,{generate:()=>cl,name:()=>al,parse:()=>ll,structure:()=>sl});var rl=43,nl=47,ol=62,il=126,al="Combinator",sl={name:String};function ll(){let e,t=this.tokenStart;switch(this.tokenType){case 13:e=" ";break;case 9:switch(this.charCodeAt(this.tokenStart)){case ol:case rl:case il:this.next();break;case nl:this.next(),this.eatIdent("deep"),this.eatDelim(nl);break;default:this.error("Combinator is expected")}e=this.substrToCursor(t)}return{type:"Combinator",loc:this.getLocation(t,this.tokenStart),name:e}}function cl(e){this.tokenize(e.name)}var ul={};Bt(ul,{generate:()=>gl,name:()=>pl,parse:()=>fl,structure:()=>ml});var hl=42,dl=47,pl="Comment",ml={value:String};function fl(){let e=this.tokenStart,t=this.tokenEnd;return this.eat(25),t-e+2>=2&&this.charCodeAt(t-2)===hl&&this.charCodeAt(t-1)===dl&&(t-=2),{type:"Comment",loc:this.getLocation(e,this.tokenStart),value:this.substring(e+2,t)}}function gl(e){this.token(25,"/*"+e.value+"*/")}var yl={};Bt(yl,{generate:()=>Nl,name:()=>Rl,parse:()=>Ll,structure:()=>Il,walkContext:()=>_l});var bl=33,kl=35,vl=36,wl=38,xl=42,Al=43,El=47;function Sl(e){return this.Raw(e,this.consumeUntilExclamationMarkOrSemicolon,!0)}function Tl(e){return this.Raw(e,this.consumeUntilExclamationMarkOrSemicolon,!1)}function Cl(){let e=this.tokenIndex,t=this.Value();return"Raw"!==t.type&&!1===this.eof&&17!==this.tokenType&&!1===this.isDelim(bl)&&!1===this.isBalanceEdge(e)&&this.error(),t}var Rl="Declaration",_l="declaration",Il={important:[Boolean,String],property:String,value:["Value","Raw"]};function Ll(){let e,t=this.tokenStart,r=this.tokenIndex,n=zl.call(this),o=lo(n),i=o?this.parseCustomProperty:this.parseValue,a=o?Tl:Sl,s=!1;this.skipSC(),this.eat(16);let l=this.tokenIndex;if(o||this.skipSC(),e=i?this.parseWithFallback(Cl,a):a.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(bl)&&(s=Pl.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:s,property:n,value:e}}function Nl(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 zl(){let e=this.tokenStart;if(9===this.tokenType)switch(this.charCodeAt(this.tokenStart)){case xl:case vl:case Al:case kl:case wl:this.next();break;case El:this.next(),this.isDelim(El)&&this.next()}return 4===this.tokenType?this.eat(4):this.eat(1),this.substrToCursor(e)}function Pl(){this.eat(9),this.skipSC();let e=this.consume(1);return"important"===e||e}var Ml={};Bt(Ml,{generate:()=>Bl,name:()=>Dl,parse:()=>ql,structure:()=>Fl});var Ol=38;function Ul(e){return this.Raw(e,this.consumeUntilSemicolonIncluded,!0)}var Dl="DeclarationList",Fl={children:[["Declaration","Atrule","Rule"]]};function ql(){let e=this.createList();for(;!this.eof;)switch(this.tokenType){case 13:case 25:case 17:this.next();break;case 3:e.push(this.parseWithFallback(this.Atrule.bind(this,!0),Ul));break;default:this.isDelim(Ol)?e.push(this.parseWithFallback(this.Rule,Ul)):e.push(this.parseWithFallback(this.Declaration,Ul))}return{type:"DeclarationList",loc:this.getLocationFromList(e),children:e}}function Bl(e){this.children(e,(e=>{"Declaration"===e.type&&this.token(17,";")}))}var jl={};Bt(jl,{generate:()=>$l,name:()=>Hl,parse:()=>Wl,structure:()=>Vl});var Hl="Dimension",Vl={value:String,unit:String};function Wl(){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 $l(e){this.token(12,e.value+e.unit)}var Gl={};Bt(Gl,{generate:()=>Zl,name:()=>Yl,parse:()=>Jl,structure:()=>Kl,walkContext:()=>Ql});var Yl="Function",Ql="function",Kl={name:String,children:[[]]};function Jl(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 Zl(e){this.token(2,e.name+"("),this.children(e),this.token(22,")")}var Xl={};Bt(Xl,{generate:()=>oc,name:()=>tc,parse:()=>nc,structure:()=>rc,xxx:()=>ec});var ec="XXX",tc="Hash",rc={value:String};function nc(){let e=this.tokenStart;return this.eat(4),{type:"Hash",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e+1)}}function oc(e){this.token(4,"#"+e.value)}var ic={};Bt(ic,{generate:()=>cc,name:()=>ac,parse:()=>lc,structure:()=>sc});var ac="Identifier",sc={name:String};function lc(){return{type:"Identifier",loc:this.getLocation(this.tokenStart,this.tokenEnd),name:this.consume(1)}}function cc(e){this.token(1,e.name)}var uc={};Bt(uc,{generate:()=>mc,name:()=>hc,parse:()=>pc,structure:()=>dc});var hc="IdSelector",dc={name:String};function pc(){let e=this.tokenStart;return this.eat(4),{type:"IdSelector",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e+1)}}function mc(e){this.token(9,"#"+e.name)}var fc={};Bt(fc,{generate:()=>kc,name:()=>gc,parse:()=>bc,structure:()=>yc});var gc="MediaFeature",yc={name:String,value:["Identifier","Number","Dimension","Ratio",null]};function bc(){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 kc(e){this.token(21,"("),this.token(1,e.name),null!==e.value&&(this.token(16,":"),this.node(e.value)),this.token(22,")")}var vc={};Bt(vc,{generate:()=>Ec,name:()=>wc,parse:()=>Ac,structure:()=>xc});var wc="MediaQuery",xc={children:[["Identifier","MediaFeature","WhiteSpace"]]};function Ac(){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 Ec(e){this.children(e)}var Sc={};Bt(Sc,{generate:()=>_c,name:()=>Tc,parse:()=>Rc,structure:()=>Cc});var Tc="MediaQueryList",Cc={children:[["MediaQuery"]]};function Rc(){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 _c(e){this.children(e,(()=>this.token(18,",")))}var Ic={};Bt(Ic,{generate:()=>Mc,name:()=>Nc,parse:()=>Pc,structure:()=>zc});var Lc=38,Nc="NestingSelector",zc={};function Pc(){let e=this.tokenStart;return this.eatDelim(Lc),{type:"NestingSelector",loc:this.getLocation(e,this.tokenStart)}}function Mc(){this.token(9,"&")}var Oc={};Bt(Oc,{generate:()=>qc,name:()=>Uc,parse:()=>Fc,structure:()=>Dc});var Uc="Nth",Dc={nth:["AnPlusB","Identifier"],selector:["SelectorList",null]};function Fc(){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 qc(e){this.node(e.nth),null!==e.selector&&(this.token(1,"of"),this.node(e.selector))}var Bc={};Bt(Bc,{generate:()=>Wc,name:()=>jc,parse:()=>Vc,structure:()=>Hc});var jc="Number",Hc={value:String};function Vc(){return{type:"Number",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consume(10)}}function Wc(e){this.token(10,e.value)}var $c={};Bt($c,{generate:()=>Kc,name:()=>Gc,parse:()=>Qc,structure:()=>Yc});var Gc="Operator",Yc={value:String};function Qc(){let e=this.tokenStart;return this.next(),{type:"Operator",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e)}}function Kc(e){this.tokenize(e.value)}var Jc={};Bt(Jc,{generate:()=>tu,name:()=>Zc,parse:()=>eu,structure:()=>Xc});var Zc="Parentheses",Xc={children:[[]]};function eu(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 tu(e){this.token(21,"("),this.children(e),this.token(22,")")}var ru={};Bt(ru,{generate:()=>au,name:()=>nu,parse:()=>iu,structure:()=>ou});var nu="Percentage",ou={value:String};function iu(){return{type:"Percentage",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consumeNumber(11)}}function au(e){this.token(11,e.value+"%")}var su={};Bt(su,{generate:()=>du,name:()=>lu,parse:()=>hu,structure:()=>uu,walkContext:()=>cu});var lu="PseudoClassSelector",cu="function",uu={name:String,children:[["Raw"],null]};function hu(){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 du(e){this.token(16,":"),null===e.children?this.token(1,e.name):(this.token(2,e.name+"("),this.children(e),this.token(22,")"))}var pu={};Bt(pu,{generate:()=>bu,name:()=>mu,parse:()=>yu,structure:()=>gu,walkContext:()=>fu});var mu="PseudoElementSelector",fu="function",gu={name:String,children:[["Raw"],null]};function yu(){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 bu(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 ku={};Bt(ku,{generate:()=>Tu,name:()=>Au,parse:()=>Su,structure:()=>Eu});var vu=47,wu=46;function xu(){this.skipSC();let e=this.consume(10);for(let t=0;t0&&13===this.lookupType(-1)?this.tokenIndex>1?this.getTokenStart(this.tokenIndex-1):this.firstCharOffset:this.tokenStart}Bt(Cu,{generate:()=>Nu,name:()=>_u,parse:()=>Lu,structure:()=>Iu});var _u="Raw",Iu={value:String};function Lu(e,t,r){let n,o=this.getTokenStart(e);return this.skipUntilBalanced(e,t||this.consumeUntilBalanceEnd),n=r&&this.tokenStart>o?Ru.call(this):this.tokenStart,{type:"Raw",loc:this.getLocation(o,n),value:this.substring(o,n)}}function Nu(e){this.tokenize(e.value)}var zu={};function Pu(e){return this.Raw(e,this.consumeUntilLeftCurlyBracket,!0)}function Mu(){let e=this.SelectorList();return"Raw"!==e.type&&!1===this.eof&&23!==this.tokenType&&this.error(),e}Bt(zu,{generate:()=>qu,name:()=>Ou,parse:()=>Fu,structure:()=>Du,walkContext:()=>Uu});var Ou="Rule",Uu="rule",Du={prelude:["SelectorList","Raw"],block:["Block"]};function Fu(){let e,t,r=this.tokenIndex,n=this.tokenStart;return e=this.parseRulePrelude?this.parseWithFallback(Mu,Pu):Pu.call(this,r),t=this.Block(!0),{type:"Rule",loc:this.getLocation(n,this.tokenStart),prelude:e,block:t}}function qu(e){this.node(e.prelude),this.node(e.block)}var Bu={};Bt(Bu,{generate:()=>Wu,name:()=>ju,parse:()=>Vu,structure:()=>Hu});var ju="Selector",Hu={children:[["TypeSelector","IdSelector","ClassSelector","AttributeSelector","PseudoClassSelector","PseudoElementSelector","Combinator","WhiteSpace"]]};function Vu(){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 Wu(e){this.children(e)}var $u={};Bt($u,{generate:()=>Ju,name:()=>Gu,parse:()=>Ku,structure:()=>Qu,walkContext:()=>Yu});var Gu="SelectorList",Yu="selector",Qu={children:[["Selector","Raw"]]};function Ku(){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 Ju(e){this.children(e,(()=>this.token(18,",")))}var Zu={};Bt(Zu,{generate:()=>lh,name:()=>ih,parse:()=>sh,structure:()=>ah});var Xu={};Bt(Xu,{decode:()=>nh,encode:()=>oh});var eh=92,th=34,rh=39;function nh(e){let t=e.length,r=e.charCodeAt(0),n=r===th||r===rh?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(n===eh){if(r===o){r!==t-1&&(i=e.substr(r+1));break}if(n=e.charCodeAt(++r),_r(eh,n)){let t=r-1,n=Wr(e,t);r=n-1,i+=Qr(e.substring(t+1,n))}else 13===n&&10===e.charCodeAt(r+1)&&r++}else i+=e[r]}return i}function oh(e,t){let r=t?"'":'"',n=t?rh:th,o="",i=!1;for(let t=0;tgh,name:()=>dh,parse:()=>fh,structure:()=>mh,walkContext:()=>ph});var uh=33;function hh(e){return this.Raw(e,null,!1)}var dh="StyleSheet",ph="stylesheet",mh={children:[["Comment","CDO","CDC","Atrule","Rule","Raw"]]};function fh(){let e,t=this.tokenStart,r=this.createList();for(;!this.eof;){switch(this.tokenType){case 13:this.next();continue;case 25:if(this.charCodeAt(this.tokenStart+2)!==uh){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,hh);break;default:e=this.parseWithFallback(this.Rule,hh)}r.push(e)}return{type:"StyleSheet",loc:this.getLocation(t,this.tokenStart),children:r}}function gh(e){this.children(e)}var yh={};Bt(yh,{generate:()=>Eh,name:()=>wh,parse:()=>Ah,structure:()=>xh});var bh=42,kh=124;function vh(){1!==this.tokenType&&!1===this.isDelim(bh)&&this.error("Identifier or asterisk is expected"),this.next()}var wh="TypeSelector",xh={name:String};function Ah(){let e=this.tokenStart;return this.isDelim(kh)?(this.next(),vh.call(this)):(vh.call(this),this.isDelim(kh)&&(this.next(),vh.call(this))),{type:"TypeSelector",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e)}}function Eh(e){this.tokenize(e.name)}var Sh={};Bt(Sh,{generate:()=>Oh,name:()=>zh,parse:()=>Mh,structure:()=>Ph});var Th=43,Ch=45,Rh=63;function _h(e,t){let r=0;for(let n=this.tokenStart+e;n6&&this.error("Too many hex digits",n)}return this.next(),r}function Ih(e){let t=0;for(;this.isDelim(Rh);)++t>e&&this.error("Too many question marks"),this.next()}function Lh(e){this.charCodeAt(this.tokenStart)!==e&&this.error((e===Th?"Plus sign":"Hyphen minus")+" is expected")}function Nh(){let e=0;switch(this.tokenType){case 10:if(e=_h.call(this,1,!0),this.isDelim(Rh)){Ih.call(this,6-e);break}if(12===this.tokenType||10===this.tokenType){Lh.call(this,Ch),_h.call(this,1,!1);break}break;case 12:e=_h.call(this,1,!0),e>0&&Ih.call(this,6-e);break;default:if(this.eatDelim(Th),1===this.tokenType){e=_h.call(this,0,!0),e>0&&Ih.call(this,6-e);break}if(this.isDelim(Rh)){this.next(),Ih.call(this,5);break}this.error("Hex digit or question mark is expected")}}var zh="UnicodeRange",Ph={value:String};function Mh(){let e=this.tokenStart;return this.eatIdent("u"),Nh.call(this),{type:"UnicodeRange",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e)}}function Oh(e){this.tokenize(e.value)}var Uh={};Bt(Uh,{generate:()=>Kh,name:()=>Gh,parse:()=>Qh,structure:()=>Yh});var Dh={};Bt(Dh,{decode:()=>Wh,encode:()=>$h});var Fh=32,qh=92,Bh=34,jh=39,Hh=40,Vh=41;function Wh(e){let t=e.length,r=4,n=e.charCodeAt(t-1)===Vh?t-2:t-1,o="";for(;rtd,name:()=>Zh,parse:()=>ed,structure:()=>Xh});var Zh="Value",Xh={children:[[]]};function ed(){let e=this.tokenStart,t=this.readSequence(this.scope.Value);return{type:"Value",loc:this.getLocation(e,this.tokenStart),children:t}}function td(e){this.children(e)}var rd={};Bt(rd,{generate:()=>sd,name:()=>od,parse:()=>ad,structure:()=>id});var nd=Object.freeze({type:"WhiteSpace",loc:null,value:" "}),od="WhiteSpace",id={value:String};function ad(){return this.eat(13),nd}function sd(e){this.token(13,e.value)}var ld=Ft(Dt({generic:!0},{generic:!0,units:{angle:["deg","grad","rad","turn"],decibel:["db"],flex:["fr"],frequency:["hz","khz"],length:["cm","mm","q","in","pt","pc","px","em","rem","ex","rex","cap","rcap","ch","rch","ic","ric","lh","rlh","vw","svw","lvw","dvw","vh","svh","lvh","dvh","vi","svi","lvi","dvi","vb","svb","lvb","dvb","vmin","svmin","lvmin","dvmin","vmax","svmax","lvmax","dvmax","cqw","cqh","cqi","cqb","cqmin","cqmax"],resolution:["dpi","dpcm","dppx","x"],semitones:["st"],time:["s","ms"]},types:{"abs()":"abs( )","absolute-size":"xx-small|x-small|small|medium|large|x-large|xx-large|xxx-large","acos()":"acos( )","alpha-value":"|","angle-percentage":"|","angular-color-hint":"","angular-color-stop":"&&?","angular-color-stop-list":"[ [, ]?]# , ","animateable-feature":"scroll-position|contents|","asin()":"asin( )","atan()":"atan( )","atan2()":"atan2( , )",attachment:"scroll|fixed|local","attr()":"attr( ? [, ]? )","attr-matcher":"['~'|'|'|'^'|'$'|'*']? '='","attr-modifier":"i|s","attribute-selector":"'[' ']'|'[' [|] ? ']'","auto-repeat":"repeat( [auto-fill|auto-fit] , [? ]+ ? )","auto-track-list":"[? [|]]* ? [? [|]]* ?",axis:"block|inline|vertical|horizontal","baseline-position":"[first|last]? baseline","basic-shape":"||||","bg-image":"none|","bg-layer":"|| [/ ]?||||||||","bg-position":"[[left|center|right|top|bottom|]|[left|center|right|] [top|center|bottom|]|[center|[left|right] ?]&&[center|[top|bottom] ?]]","bg-size":"[|auto]{1,2}|cover|contain","blur()":"blur( )","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( )","calc()":"calc( )","calc-sum":" [['+'|'-'] ]*","calc-product":" ['*' |'/' ]*","calc-value":"||||( )","calc-constant":"e|pi|infinity|-infinity|NaN","cf-final-image":"|","cf-mixing-image":"?&&","circle()":"circle( []? [at ]? )","clamp()":"clamp( #{3} )","class-selector":"'.' ","clip-source":"",color:"|||||||||currentcolor|","color-stop":"|","color-stop-angle":"{1,2}","color-stop-length":"{1,2}","color-stop-list":"[ [, ]?]# , ",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":"[? * [ *]*]!","compound-selector-list":"#","complex-selector":" [? ]*","complex-selector-list":"#","conic-gradient()":"conic-gradient( [from ]? [at ]? , )","contextual-alt-values":"[contextual|no-contextual]","content-distribution":"space-between|space-around|space-evenly|stretch","content-list":"[|contents||||||]+","content-position":"center|start|end|flex-start|flex-end","content-replacement":"","contrast()":"contrast( [] )","cos()":"cos( )",counter:"|","counter()":"counter( , ? )","counter-name":"","counter-style":"|symbols( )","counter-style-name":"","counters()":"counters( , , ? )","cross-fade()":"cross-fade( , ? )","cubic-bezier-timing-function":"ease|ease-in|ease-out|ease-in-out|cubic-bezier( , , , )","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":"?&&[flow|flow-root]?&&list-item","display-outside":"block|inline|run-in","drop-shadow()":"drop-shadow( {2,3} ? )","east-asian-variant-values":"[jis78|jis83|jis90|jis04|simplified|traditional]","east-asian-width-values":"[full-width|proportional-width]","element()":"element( , [first|start|last|first-except]? )|element( )","ellipse()":"ellipse( [{2}]? [at ]? )","ending-shape":"circle|ellipse","env()":"env( , ? )","exp()":"exp( )","explicit-track-list":"[? ]+ ?","family-name":"|+","feature-tag-value":" [|on|off]?","feature-type":"@stylistic|@historical-forms|@styleset|@character-variant|@swash|@ornaments|@annotation","feature-value-block":" '{' '}'","feature-value-block-list":"+","feature-value-declaration":" : + ;","feature-value-declaration-list":"","feature-value-name":"","fill-rule":"nonzero|evenodd","filter-function":"|||||||||","filter-function-list":"[|]+","final-bg-layer":"<'background-color'>|||| [/ ]?||||||||","fixed-breadth":"","fixed-repeat":"repeat( [] , [? ]+ ? )","fixed-size":"|minmax( , )|minmax( , )","font-stretch-absolute":"normal|ultra-condensed|extra-condensed|condensed|semi-condensed|semi-expanded|expanded|extra-expanded|ultra-expanded|","font-variant-css21":"[normal|small-caps]","font-weight-absolute":"normal|bold|","frequency-percentage":"|","general-enclosed":"[ )]|( )","generic-family":"serif|sans-serif|cursive|fantasy|monospace|-apple-system","generic-name":"serif|sans-serif|cursive|fantasy|monospace","geometry-box":"|fill-box|stroke-box|view-box",gradient:"||||||<-legacy-gradient>","grayscale()":"grayscale( )","grid-line":"auto||[&&?]|[span&&[||]]","historical-lig-values":"[historical-ligatures|no-historical-ligatures]","hsl()":"hsl( [/ ]? )|hsl( , , , ? )","hsla()":"hsla( [/ ]? )|hsla( , , , ? )",hue:"|","hue-rotate()":"hue-rotate( )","hwb()":"hwb( [|none] [|none] [|none] [/ [|none]]? )","hypot()":"hypot( # )",image:"||||||","image()":"image( ? [? , ?]! )","image-set()":"image-set( # )","image-set-option":"[|] [||type( )]","image-src":"|","image-tags":"ltr|rtl","inflexible-breadth":"|min-content|max-content|auto","inset()":"inset( {1,4} [round <'border-radius'>]? )","invert()":"invert( )","keyframes-name":"|","keyframe-block":"# { }","keyframe-block-list":"+","keyframe-selector":"from|to|","lab()":"lab( [||none] [||none] [||none] [/ [|none]]? )","layer()":"layer( )","layer-name":" ['.' ]*","lch()":"lch( [||none] [||none] [|none] [/ [|none]]? )","leader()":"leader( )","leader-type":"dotted|solid|space|","length-percentage":"|","line-names":"'[' * ']'","line-name-list":"[|]+","line-style":"none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset","line-width":"|thin|medium|thick","linear-color-hint":"","linear-color-stop":" ?","linear-gradient()":"linear-gradient( [|to ]? , )","log()":"log( , ? )","mask-layer":"|| [/ ]?||||||[|no-clip]||||","mask-position":"[|left|center|right] [|top|center|bottom]?","mask-reference":"none||","mask-source":"","masking-mode":"alpha|luminance|match-source","matrix()":"matrix( #{6} )","matrix3d()":"matrix3d( #{16} )","max()":"max( # )","media-and":" [and ]+","media-condition":"|||","media-condition-without-or":"||","media-feature":"( [||] )","media-in-parens":"( )||","media-not":"not ","media-or":" [or ]+","media-query":"|[not|only]? [and ]?","media-query-list":"#","media-type":"","mf-boolean":"","mf-name":"","mf-plain":" : ","mf-range":" ['<'|'>']? '='? | ['<'|'>']? '='? | '<' '='? '<' '='? | '>' '='? '>' '='? ","mf-value":"|||","min()":"min( # )","minmax()":"minmax( [|min-content|max-content|auto] , [||min-content|max-content|auto] )","mod()":"mod( , )","name-repeat":"repeat( [|auto-fill] , + )","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":"","ns-prefix":"[|'*']? '|'","number-percentage":"|","numeric-figure-values":"[lining-nums|oldstyle-nums]","numeric-fraction-values":"[diagonal-fractions|stacked-fractions]","numeric-spacing-values":"[proportional-nums|tabular-nums]",nth:"|even|odd","opacity()":"opacity( [] )","overflow-position":"unsafe|safe","outline-radius":"|","page-body":"? [; ]?| ","page-margin-box":" '{' '}'","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-size":"A5|A4|A3|B5|B4|JIS-B5|JIS-B4|letter|legal|ledger","path()":"path( [ ,]? )","paint()":"paint( , ? )","perspective()":"perspective( [|none] )","polygon()":"polygon( ? , [ ]# )",position:"[[left|center|right]||[top|center|bottom]|[left|center|right|] [top|center|bottom|]?|[[left|right] ]&&[[top|bottom] ]]","pow()":"pow( , )","pseudo-class-selector":"':' |':' ')'","pseudo-element-selector":"':' ","pseudo-page":": [left|right|first|blank]",quote:"open-quote|close-quote|no-open-quote|no-close-quote","radial-gradient()":"radial-gradient( [||]? [at ]? , )",ratio:" [/ ]?","relative-selector":"? ","relative-selector-list":"#","relative-size":"larger|smaller","rem()":"rem( , )","repeat-style":"repeat-x|repeat-y|[repeat|space|round|no-repeat]{1,2}","repeating-conic-gradient()":"repeating-conic-gradient( [from ]? [at ]? , )","repeating-linear-gradient()":"repeating-linear-gradient( [|to ]? , )","repeating-radial-gradient()":"repeating-radial-gradient( [||]? [at ]? , )","reversed-counter-name":"reversed( )","rgb()":"rgb( {3} [/ ]? )|rgb( {3} [/ ]? )|rgb( #{3} , ? )|rgb( #{3} , ? )","rgba()":"rgba( {3} [/ ]? )|rgba( {3} [/ ]? )|rgba( #{3} , ? )|rgba( #{3} , ? )","rotate()":"rotate( [|] )","rotate3d()":"rotate3d( , , , [|] )","rotateX()":"rotateX( [|] )","rotateY()":"rotateY( [|] )","rotateZ()":"rotateZ( [|] )","round()":"round( ? , , )","rounding-strategy":"nearest|up|down|to-zero","saturate()":"saturate( )","scale()":"scale( [|]#{1,2} )","scale3d()":"scale3d( [|]#{3} )","scaleX()":"scaleX( [|] )","scaleY()":"scaleY( [|] )","scaleZ()":"scaleZ( [|] )",scroller:"root|nearest","self-position":"center|start|end|self-start|self-end|flex-start|flex-end","shape-radius":"|closest-side|farthest-side","sign()":"sign( )","skew()":"skew( [|] , [|]? )","skewX()":"skewX( [|] )","skewY()":"skewY( [|] )","sepia()":"sepia( )",shadow:"inset?&&{2,4}&&?","shadow-t":"[{2,3}&&?]",shape:"rect( , , , )|rect( )","shape-box":"|margin-box","side-or-corner":"[left|right]||[top|bottom]","sin()":"sin( )","single-animation":"