1
2
3
4
5
6
7
8
9
| !function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){"use strict";const{getOwnPropertyDescriptor:e}=Object,{DOCUMENT_POSITION_CONTAINED_BY:t,DOCUMENT_POSITION_CONTAINS:r,DOCUMENT_POSITION_PRECEDING:n,DOCUMENT_POSITION_FOLLOWING:o,ELEMENT_NODE:i,TEXT_NODE:s,CDATA_SECTION_NODE:a,PROCESSING_INSTRUCTION_NODE:u,COMMENT_NODE:c,DOCUMENT_FRAGMENT_NODE:l}=Node,{appendChild:f,cloneNode:p,compareDocumentPosition:h,insertBefore:d,removeChild:v,replaceChild:y,hasChildNodes:g,getRootNode:b}=Node.prototype,T=e(Node.prototype,"firstChild").get,m=e(Node.prototype,"lastChild").get;e(Node.prototype,"textContent").get;const w=e(Node.prototype,"parentNode").get;e(Node.prototype,"ownerDocument").get;const E=e(Node.prototype,"parentElement").get,S=e(Node.prototype,"textContent").get,_=e(Node.prototype,"childNodes").get;e(Node.prototype,"isConnected").get;const{getOwnPropertyDescriptor:P,hasOwnProperty:O}=Object,{addEventListener:k,getAttribute:I,getBoundingClientRect:x,getElementsByTagName:D,getElementsByTagNameNS:N,getElementsByClassName:A,matches:L,closest:C,hasAttribute:M,querySelector:R,querySelectorAll:F,removeAttribute:j,removeEventListener:q,setAttribute:G}=Element.prototype;O.call(Element.prototype,"attachShadow")&&Element.prototype.attachShadow;const U=P(Element.prototype,"childElementCount").get,B=P(Element.prototype,"firstElementChild").get,Y=P(Element.prototype,"lastElementChild").get,W=P(Element.prototype,"innerHTML"),V=W.get;W.set;const H=P(Element.prototype,"outerHTML"),Q=H.get;H.set;const $=P(Element.prototype,"tagName").get,K=P(HTMLElement.prototype,"tabIndex");K.get,K.set;const z=P(Element.prototype,"children").get,X=P(Element.prototype,"shadowRoot").get,{getOwnPropertyDescriptor:J}=Object;J(Document.prototype,"activeElement").get,J(Document.prototype,"defaultView").get;const{createComment:Z,querySelector:ee,querySelectorAll:te,getElementById:re,getElementsByName:ne,getElementsByClassName:oe,getElementsByTagName:ie,getElementsByTagNameNS:se}=Document.prototype,{setPrototypeOf:ae}=Reflect;var ue;function ce(){const e=Array,{isArray:t}=Array,{defineProperties:r,freeze:n,isFrozen:o,isSealed:i,seal:s}=Object,{hasOwnProperty:a,toString:u}=Object.prototype,{revocable:c}=Proxy,{apply:l,construct:f,defineProperty:p,deleteProperty:h,get:d,getOwnPropertyDescriptor:v,getPrototypeOf:y,has:g,isExtensible:b,ownKeys:T,preventExtensions:m,set:w,setPrototypeOf:E}=Reflect,{slice:S}=String.prototype,_=TypeError,{get:P,set:O}=WeakMap.prototype,k="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||(p(Object.prototype,"globalThis",{__proto__:null,configurable:!0,get(){return h(Object.prototype,"globalThis"),this||self}}),globalThis),{eval:I}=k,x=Symbol.for("@@lockerLiveValue"),D=Symbol.for("@@lockerMagicValue"),{toStringTag:N}=Symbol,A=Symbol.for("@@membraneUndefinedValue");let L,C,M;return function(e){e[e.None=0]="None",e[e.MagicMarker=1]="MagicMarker"}(L||(L={})),E(L,null),function(e){e[e.None=0]="None",e[e.IsNotExtensible=1]="IsNotExtensible",e[e.IsSealed=2]="IsSealed",e[e.IsFrozen=4]="IsFrozen",e[e.Revoked=16]="Revoked"}(C||(C={})),E(C,null),function(e){e[e.None=0]="None",e[e.IsArray=1]="IsArray",e[e.IsFunction=2]="IsFunction",e[e.IsObject=4]="IsObject",e[e.IsArrowFunction=8]="IsArrowFunction",e[e.Revoked=16]="Revoked"}(M||(M={})),E(M,null),function(R,F,j=ue.None,q,G){const{distortionCallback:U=(e=>e),instrumentation:B}=G||{__proto__:null},Y=new WeakMap,W=`to:${R}`,V=`from:${R}`,H=!!(j&L.MagicMarker);let Q,$,K,z,X,J,Z,ee,te,re,ne,oe,ie,se,ae,ce;function le(e,t){let n=[];te(t,((...e)=>{n=e}));const o={};let i;const s=(e,t,r,n,o,s)=>{i=fe(e,t,r,n,o,s)};for(let e=0,r=n.length;e<r;e+=1){const r=n[e];J(t,r,s),i&&(o[r]=i)}r(e,o)}function fe(e,t,r,n,o,i){const s={__proto__:null};return e!==A&&(s.configurable=!!e),t!==A&&(s.enumerable=!!t),r!==A&&(s.writable=!!r),o!==A&&(s.get=ye(o)),i!==A&&(s.set=ye(i)),n!==A&&(s.value=ye(n)),s}function pe(e){const t=()=>{ce=e};return t["[[OriginalTarget]]"]=e,t["[[Color]]"]=R,t}function he(e){return function(...t){try{return l(e,this,t)}catch(e){const t=ge();if(t)throw t;throw new _(null==e?void 0:e.message)}}}function de(e){const t=Oe(e),{configurable:r,enumerable:n,writable:o,value:i,get:s,set:a}=t;return["configurable"in t?!!r:A,"enumerable"in t?!!n:A,"writable"in t?!!o:A,"value"in t?Te(i):A,"get"in t?Te(s):A,"set"in t?Te(a):A]}function ve(e,t){let r=Ee(e);for(;r;){const e=v(r,t);if(e)return Oe(e);r=y(r)}}function ye(e){return"function"==typeof e?(e(),ge()):e}function ge(){const e=ce;return ce=void 0,e}function be(e){let r=l(P,Y,[e]);if(r)return r;const n=function(e){let t;try{return t=U(e),t}finally{if(t!==e&&typeof t!=typeof e)throw new _(`Invalid distortion ${e}.`)}}(e),o=pe(n),i=function(e){let r=M.None;if("function"==typeof e){r|=M.IsFunction;try{r|=+!("prototype"in e)&&M.IsArrowFunction}catch(e){}}else{let n=!1;try{n=t(e)}catch(e){r|=M.Revoked}r|=+n&&M.IsArray,r|=+!n&&M.IsObject}return r}(n);let s;if("function"==typeof e)try{const t=v(e,"name");if(t){s=Oe(t).value}}catch(e){}return r=Q(o,i,s),l(O,Y,[e,r]),r}function Te(e){if(void 0!==e)return null===e||"function"!=typeof e&&"object"!=typeof e?e:be(e)}function me(e,t,r){return B?function(...n){const o=B.startActivity(t,{crossingDirection:r});try{return l(e,this,n)}catch(e){throw o.error(e),e}finally{o.stop()}}:e}function we(e,t,r){let n;return J(e,r,((e,o,i,s,a,u)=>{n=fe(e,o,i,s,a,u),!1===n.configurable&&p(t,r,n)})),n}function Ee(e){return ye(Z(e))}function Se(e,t,r,n,o,i){const s=we(e,t,r),u=s||ve(e,r);if(u){if("get"in u||"set"in u){const{set:e}=u;return!!e&&(l(e,o,[n]),!0)}if(!1===u.writable)return!1}let c;if(i)c=s;else{if(null===o||"function"!=typeof o&&"object"!=typeof o)return!1;const e=v(o,r);e&&(c=Oe(e))}return c?!("get"in c)&&!("set"in c)&&!1!==c.writable&&(!function(e){return H&&l(a,e,[D])}(o)?p(o,r,{__proto__:null,value:n}):ne(e,r,Te(n),be(o)),!0):p(o,r,{__proto__:null,configurable:!0,enumerable:!0,value:n,writable:!0})}function _e(e,t){le(e,t);const r=Ee(t);E(e,r),m(e)}function Pe(e){const t=Te(e);return"function"==typeof t&&t(),e}function Oe(e){return E(e,null),e}class ke{constructor(e,t,r){this.color=R,this.apply=function(e,t,r){const{foreignTargetPointer:n}=this,o=[n,Te(t)],{length:i}=r,{length:s}=o;o.length+=i;for(let e=0,t=i;e<t;e+=1){const t=r[e],n=e+s;o[n]=void 0===t?void 0:null===t||"function"!=typeof t&&"object"!=typeof t?t:be(t)}return ye(l($,void 0,o))},this.construct=function(e,t,r){if(void 0===r)throw new _;const{foreignTargetPointer:n}=this,o=[n,Te(r)],{length:i}=t,{length:s}=o;o.length+=i;for(let e=0,r=i;e<r;e+=1){const r=t[e],n=e+s;o[n]=void 0===r?void 0:null===r||"function"!=typeof r&&"object"!=typeof r?r:be(r)}return ye(l(K,void 0,o))};const o=function(e,t){let r;return e&M.IsFunction?(r=e&M.IsArrowFunction?()=>{}:function(){},p(r,"name",{__proto__:null,configurable:!0,enumerable:!1,value:t,writable:!1})):r=e&M.IsArray?[]:{},r}(t,r),{proxy:i,revoke:s}=c(o,this);this.foreignTargetPointer=e,this.proxy=i,this.revoke=s,this.defineProperty=ke.defaultDefinePropertyTrap,this.deleteProperty=ke.defaultDeletePropertyTrap,this.isExtensible=ke.defaultIsExtensibleTrap,this.getOwnPropertyDescriptor=ke.defaultGetOwnPropertyDescriptorTrap,this.getPrototypeOf=ke.defaultGetPrototypeOfTrap,this.get=ke.defaultGetTrap,this.has=ke.defaultHasTrap,this.ownKeys=ke.defaultOwnKeysTrap,this.preventExtensions=ke.defaultPreventExtensionsTrap,this.setPrototypeOf=ke.defaultSetPrototypeOfTrap,this.set=ke.defaultSetTrap,t&M.Revoked&&s(),F||n(this)}makeProxyLive(){this.defineProperty=ke.liveDefinePropertyTrap,this.deleteProperty=ke.liveDeletePropertyTrap,this.preventExtensions=ke.livePreventExtensionsTrap,this.set=ke.liveSetTrap,this.setPrototypeOf=ke.liveSetPrototypeOfTrap,n(this)}makeProxyStatic(e){const{foreignTargetPointer:t}=this,r=ie(t);if(r&C.Revoked)this.revoke();else{try{const r=Ee(t);E(e,r)}catch(e){return void this.revoke()}le(e,t),r&C.IsFrozen?n(e):r&C.IsSealed?s(e):r&C.IsNotExtensible&&m(e),this.defineProperty=ke.staticDefinePropertyTrap,this.deleteProperty=ke.staticDeletePropertyTrap,this.get=ke.staticGetTrap,this.getOwnPropertyDescriptor=ke.staticGetOwnPropertyDescriptorTrap,this.getPrototypeOf=ke.staticGetPrototypeOfTrap,this.has=ke.staticHasTrap,this.isExtensible=ke.staticIsExtensibleTrap,this.ownKeys=ke.staticOwnKeysTrap,this.preventExtensions=ke.staticPreventExtensionsTrap,this.set=ke.staticSetTrap,this.setPrototypeOf=ke.staticSetPrototypeOfTrap,n(this)}}makeProxyUnambiguous(e){var t;t=this.foreignTargetPointer,ae(t,x)?this.makeProxyLive():this.makeProxyStatic(e)}static liveDefinePropertyTrap(e,t,r){return function(e,t,r,n){const o=de(n),i=z(e,r,o[0],o[1],o[2],o[3],o[4],o[5]);return i&&!1===o[0]&&J(e,r,((e,n,o,i,s,a)=>{p(t,r,fe(e,n,o,i,s,a))})),i}(this.foreignTargetPointer,e,t,r)}static liveDeletePropertyTrap(e,t){return function(e,t,r){return X(e,r)}(this.foreignTargetPointer,0,t)}static liveGetOwnPropertyDescriptorTrap(e,t){return we(this.foreignTargetPointer,e,t)}static liveGetPrototypeOfTrap(e){return Ee(this.foreignTargetPointer)}static liveGetTrap(e,t,r){return function(e,t,r,n){const o=we(e,t,r)||ve(e,r);if(o){const{get:e,value:t}=o;return e?l(e,n,[]):t}if(r===N)return se(e)}(this.foreignTargetPointer,e,t,r)}static liveHasTrap(e,t){return function(e,t){if(ae(e,t))return!0;let r=Ee(e);for(;r;){if(l(a,r,[t]))return!0;r=y(r)}return!1}(this.foreignTargetPointer,t)}static liveIsExtensibleTrap(e){return function(e,t){if(b(t)){if(ee(e))return!0;_e(t,e)}return!1}(this.foreignTargetPointer,e)}static liveOwnKeysTrap(e){return function(e){let t;return te(e,((...e)=>{t=e})),t||[]}(this.foreignTargetPointer)}static livePreventExtensionsTrap(e){return function(e,t){if(b(t)){if(!re(e))return ee(e)||_e(t,e),!1;_e(t,e)}return!0}(this.foreignTargetPointer,e)}static liveSetPrototypeOfTrap(e,t){return function(e,t){const r=Te(t);return oe(e,r)}(this.foreignTargetPointer,t)}static liveSetTrap(e,t,r,n){const o=this.proxy===n;return Se(this.foreignTargetPointer,e,t,r,n,o)}static pendingDefinePropertyTrap(e,t,r){return this.makeProxyUnambiguous(e),this.defineProperty(e,t,r)}static pendingDeletePropertyTrap(e,t){return this.makeProxyUnambiguous(e),this.deleteProperty(e,t)}static pendingPreventExtensionsTrap(e){return this.makeProxyUnambiguous(e),this.preventExtensions(e)}static pendingSetPrototypeOfTrap(e,t){return this.makeProxyUnambiguous(e),this.setPrototypeOf(e,t)}static pendingSetTrap(e,t,r,n){return this.makeProxyUnambiguous(e),this.set(e,t,r,n)}static staticGetTrap(e,t,r){return t===N?se(this.foreignTargetPointer):d(e,t,r)}}return ke.staticDefinePropertyTrap=p,ke.staticDeletePropertyTrap=h,ke.staticGetOwnPropertyDescriptorTrap=v,ke.staticGetPrototypeOfTrap=y,ke.staticHasTrap=g,ke.staticIsExtensibleTrap=b,ke.staticOwnKeysTrap=T,ke.staticPreventExtensionsTrap=m,ke.staticSetTrap=w,ke.staticSetPrototypeOfTrap=E,ke.defaultGetTrap=ke.liveGetTrap,ke.defaultGetOwnPropertyDescriptorTrap=ke.liveGetOwnPropertyDescriptorTrap,ke.defaultGetPrototypeOfTrap=ke.liveGetPrototypeOfTrap,ke.defaultHasTrap=ke.liveHasTrap,ke.defaultIsExtensibleTrap=ke.liveIsExtensibleTrap,ke.defaultOwnKeysTrap=ke.liveOwnKeysTrap,ke.defaultDefinePropertyTrap=F?ke.pendingDefinePropertyTrap:ke.liveDefinePropertyTrap,ke.defaultDeletePropertyTrap=F?ke.pendingDeletePropertyTrap:ke.liveDeletePropertyTrap,ke.defaultPreventExtensionsTrap=F?ke.pendingPreventExtensionsTrap:ke.livePreventExtensionsTrap,ke.defaultSetTrap=F?ke.pendingSetTrap:ke.liveSetTrap,ke.defaultSetPrototypeOfTrap=F?ke.pendingSetPrototypeOfTrap:ke.liveSetPrototypeOfTrap,E(ke.prototype,null),n(ke.prototype),q(pe(k),ge,Te,((e,t)=>{e();return pe(ge()[t])}),(e=>{try{return Te(I(e))}catch(e){throw Pe(e)}}),((e,t)=>{e();const r=ge();l(O,Y,[r,t])}),((e,t,r)=>{const{proxy:n}=new ke(e,t,r);return l(O,Y,[n,e]),pe(n)}),me(((t,r,...n)=>{t();const o=ge(),i=ye(r),{length:s}=n,a=new e(s);for(let e=0,t=s;e<t;e+=1)a[e]=ye(n[e]);let u;try{u=l(o,i,a)}catch(e){throw Pe(e)}return Te(u)}),"callableApply",W),me(((t,r,...n)=>{t();const o=ge(),i=ye(r),{length:s}=n,a=new e(s);for(let e=0,t=s;e<t;e+=1)a[e]=ye(n[e]);let u;try{u=f(o,a,i)}catch(e){throw Pe(e)}return Te(u)}),"callableConstruct",W),me(((e,t,r,n,o,i,s,a)=>{e();const u=ge();try{return p(u,t,fe(r,n,o,i,s,a))}catch(e){throw Pe(e)}}),"callableDefineProperty",W),me(((e,t)=>{e();const r=ge();try{return h(r,t)}catch(e){throw Pe(e)}}),"callableDeleteProperty",W),me(((e,t,r)=>{e();const n=ge();let o;try{o=v(n,t)}catch(e){throw Pe(e)}if(o){const e=de(o);r(e[0],e[1],e[2],e[3],e[4],e[5])}}),"callableGetOwnPropertyDescriptor",W),me((e=>{e();const t=ge();let r;try{r=y(t)}catch(e){throw Pe(e)}return Te(r)}),"callableGetPrototypeOf",W),me((e=>{e();const t=ge();try{return b(t)}catch(e){throw Pe(e)}}),"callableIsExtensible",W),me(((e,t)=>{e();const r=ge();let n;try{n=T(r)}catch(e){throw Pe(e)}l(t,void 0,n)}),"callableOwnKeys",W),me((e=>{e();const t=ge();try{return m(t)}catch(e){throw Pe(e)}}),"callablePreventExtensions",W),me(((e,t,r,n)=>{e();const o=ge();try{return w(o,t,ye(r),ye(n))}catch(e){throw Pe(e)}}),"callableSet",W),me(((e,t)=>{e();const r=ge(),n=ye(t);try{return E(r,n)}catch(e){throw Pe(e)}}),"callableSetPrototypeOf",W),me((e=>{e();return function(e){let r=C.None;try{o(e)?r|=C.IsSealed&C.IsFrozen&C.IsNotExtensible:i(e)?r|=C.IsSealed:b(e)||(r|=C.IsNotExtensible),t(e)}catch(e){r|=C.Revoked}return r}(ge())}),"callableGetTargetIntegrityTraits",W),me((e=>{e();const r=ge();try{if("object"==typeof r&&null!==r&&!t(r)){const e=l(u,r,[]);return l(S,e,[8,-1])}}catch(e){}}),"callableGetUnbrandedTag",W),me(((e,t)=>{e();const r=ge();try{return l(a,r,[t])}catch(e){throw Pe(e)}}),"callableHasOwnProperty",W)),(...e)=>{const{6:t,7:r,8:n,9:o,10:i,11:s,12:a,13:u,14:c,15:l,16:f,17:p,18:h,19:d,20:v}=e;Q=t,$=he(me(r,"callableApply",V)),K=he(me(n,"callableConstruct",V)),z=he(me(o,"callableDefineProperty",V)),X=he(me(i,"callableDeleteProperty",V)),J=he(me(s,"callableGetOwnPropertyDescriptor",V)),Z=he(me(a,"callableGetPrototypeOf",V)),ee=he(me(u,"callableIsExtensible",V)),te=he(me(c,"callableOwnKeys",V)),re=he(me(l,"callablePreventExtensions",V)),ne=he(me(f,"callableSet",V)),oe=he(me(p,"callableSetPrototypeOf",V)),ie=he(me(h,"callableGetTargetIntegrityTraits",V)),se=he(me(d,"callableGetUnbrandedTag",V)),ae=he(me(v,"callableHasOwnProperty",V))}}}!function(e){e[e.None=0]="None",e[e.MagicMarker=1]="MagicMarker"}(ue||(ue={})),ae(ue,null);const le=TypeError,fe=`\n(function(){\n 'use strict';\n (${function(){"number"==typeof Error.stackTraceLimit&&(Error.stackTraceLimit*=2)}.toString()})();\n return (${ce.toString()})\n})()`;const pe=Symbol.for("@@membraneUndefinedValue"),he=Error,{assign:de,keys:ve}=Object,{apply:ye,ownKeys:ge}=Reflect,{slice:be,toUpperCase:Te}=String.prototype;function me(e){const{length:t}=e;if(!t)return e;const r=ye(Te,e[0],[]);return 1===t?r:r+ye(be,e,[1])}class we{constructor(e){if(void 0===e)throw new he("Missing VirtualEnvironmentOptions options bag.");const{blueConnector:t,redConnector:r,distortionCallback:n,support:o,instrumentation:i}=e;this.blueConnector=t,this.redConnector=r;let s=ue.None;const a=o?ve(o):[];for(let e=0,t=a.length;e<t;e+=1){const t=me(a[e]);s|=ue[t]}let u,c;const l=t("blue",false,s,((...e)=>{u=e}),{distortionCallback:n,instrumentation:i}),f=r("red",true,s,((...e)=>{c=e}));ye(l,void 0,c),ye(f,void 0,u);const{0:p,1:h,2:d,3:v,5:y}=u;this.blueGlobalThisPointer=p,this.blueGetSelectedTarget=h,this.blueGetTransferableValue=d,this.blueCallableGetPropertyValuePointer=v,this.blueCallableLinkPointers=y;const{0:g,3:b,4:T,5:m,9:w,17:E}=c;this.redGlobalThisPointer=g,this.redCallableEvaluate=T,this.redCallableSetPrototypeOf=E,this.redCallableDefineProperty=w,this.redCallableGetPropertyValuePointer=b,this.redCallableLinkPointers=m}evaluate(e){try{const t=this.redCallableEvaluate(e);return"function"==typeof t?(t(),this.blueGetSelectedTarget()):t}catch(e){const t=this.blueGetSelectedTarget();if(t)throw t;throw e}}link(...e){let t=this.blueGlobalThisPointer,r=this.redGlobalThisPointer;for(let n=0,o=e.length;n<o;n+=1){const o=e[n];t=this.blueCallableGetPropertyValuePointer(t,o),r=this.redCallableGetPropertyValuePointer(r,o)}this.redCallableLinkPointers(r,t),this.blueCallableLinkPointers(t,r)}remap(e,t){const r=ge(t),n=this.blueGetTransferableValue(e);for(let e=0,o=r.length;e<o;e+=1){const o=r[e],i=t[o],s=de({__proto__:null},i);this.redCallableDefineProperty(n,o,"configurable"in s?!!s.configurable:pe,"enumerable"in s?!!s.enumerable:pe,"writable"in s?!!s.writable:pe,"value"in s?this.blueGetTransferableValue(s.value):pe,"get"in s?this.blueGetTransferableValue(s.get):pe,"set"in s?this.blueGetTransferableValue(s.set):pe)}}remapProto(e,t){const r=this.blueGetTransferableValue(e),n=this.blueGetTransferableValue(t);this.redCallableSetPrototypeOf(r,n)}}const{includes:Ee}=Array.prototype,{has:Se}=Set.prototype,{apply:_e,getOwnPropertyDescriptor:Pe,ownKeys:Oe}=Reflect,ke=new Set(["globalThis","Infinity","NaN","undefined","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","AggregateError","Array","ArrayBuffer","BigInt","BigInt64Array","BigUint64Array","Boolean","DataView","Error","EvalError","FinalizationRegistry","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Number","Object","Proxy","RangeError","ReferenceError","RegExp","SharedArrayBuffer","String","Symbol","SyntaxError","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","URIError","WeakRef","Atomics","JSON","Math","Reflect","escape","unescape"]),Ie=["AggregateError","Array","Error","EvalError","Function","Object","Proxy","RangeError","ReferenceError","SyntaxError","TypeError","URIError","eval"];function xe(e,t){const r=Oe(t);for(let n=0,o=r.length;n<o;n+=1){const o=r[n];if(!_e(Se,ke,[o])&&!_e(Ee,Ie,[o])){const r=Pe(t,o);r&&(e[o]=r)}}return e}const De=TypeError;const{assign:Ne,getOwnPropertyDescriptors:Ae}=Object,{getPrototypeOf:Le,apply:Ce}=Reflect,{get:Me,set:Re}=WeakMap.prototype,Fe=new WeakMap;function je(e){let t=Ce(Me,Fe,[e]);return t||(t=function(e){const t={__proto__:null};return t.window=e.window,t.document=e.document,t.WindowProto=Le(t.window),t.WindowPropertiesProto=Le(t.WindowProto),t.EventTargetProto=Le(t.WindowPropertiesProto),t.DocumentProto=Le(t.document),t}(e),Ce(Re,Fe,[e,t]),t.EventTargetProtoDescriptors=Ae(t.EventTargetProto),t)}function qe(e,t,r){e.remapProto(t.document,t.DocumentProto);const n=function(e){const t={};return Ne(t,e),delete t.document,delete t.location,delete t.top,delete t.window,delete t.crypto,delete t.chrome,t}(r);e.remap(t.window,n),e.remap(t.EventTargetProto,t.EventTargetProtoDescriptors)}je(window);const Ge=[],{close:Ue,createElement:Be,open:Ye}=document,{remove:We,setAttribute:Ve}=Element.prototype,{appendChild:He}=Node.prototype,{assign:Qe}=Object,{__lookupGetter__:$e,hasOwnProperty:Ke}=Object.prototype,{apply:ze}=Reflect;function Xe(e,t){if(null!=e&&ze(Ke,e,[t]))return ze($e,e,[t])}const Je=Xe(Document.prototype,"body"),Ze=Xe(HTMLElement.prototype,"style"),et=Xe(HTMLIFrameElement.prototype,"contentWindow"),tt=Xe(Node.prototype,"isConnected"),rt=Xe(Node.prototype,"lastChild");function nt(){const e=(t=document,ze(Be,t,["iframe"]));var t;const r=function(e){return ze(Je,e,Ge)}(document)||function(e){return ze(rt,e,Ge)}(document);return ze(Ze,e,Ge).display="none",function(e,t,r){ze(Ve,e,[t,r])}(e,"sandbox","allow-same-origin allow-scripts"),function(e,t){ze(He,e,[t])}(r,e),e}function ot(e){(function(e){return ze(tt,e,Ge)})(e)&&ze(We,e,Ge)}const it=ce();function st(e){const t=e.length,r=[];if(t>0)for(let n=0;n<t;n++)r[n]=e[n];return r}const{assign:at,create:ut,defineProperties:ct,defineProperty:lt,freeze:ft,getOwnPropertyDescriptor:pt,getOwnPropertyNames:ht,getPrototypeOf:dt,hasOwnProperty:vt,keys:yt,seal:gt,setPrototypeOf:bt}=Object,{filter:Tt,find:mt,indexOf:wt,join:Et,map:St,push:_t,reduce:Pt,reverse:Ot,slice:kt,splice:It,unshift:xt,forEach:Dt}=Array.prototype;function Nt(e){return void 0===e}function At(e){return null===e}function Lt(e){return!0===e}function Ct(e){return"string"==typeof e}const Mt=e=>new Map(e);function Rt(e){return Symbol(e)}function Ft(e,t,r){e[t]=r}function jt(e,t){return e[t]}function qt(e){return e instanceof HTMLElement&&!!X.call(e)}function Gt(e){return X.call(e)}const Ut=Rt("StaticNodeListItems");function Bt(){throw new TypeError("Illegal constructor")}function Yt(e){const t=ut(Bt.prototype);return Ft(t,Ut,e),Dt.call(e,((e,r)=>{lt(t,r,{value:e,enumerable:!0,configurable:!0})})),t}Bt.prototype=ut(NodeList.prototype,{constructor:{writable:!0,configurable:!0,value:Bt},item:{writable:!0,enumerable:!0,configurable:!0,value(e){return this[e]}},length:{enumerable:!0,configurable:!0,get(){return jt(this,Ut).length}},forEach:{writable:!0,enumerable:!0,configurable:!0,value(e,t){Dt.call(jt(this,Ut),e,t)}},entries:{writable:!0,enumerable:!0,configurable:!0,value(){return St.call(jt(this,Ut),((e,t)=>[t,e]))}},keys:{writable:!0,enumerable:!0,configurable:!0,value(){return St.call(jt(this,Ut),((e,t)=>t))}},values:{writable:!0,enumerable:!0,configurable:!0,value(){return jt(this,Ut)}},[Symbol.iterator]:{writable:!0,configurable:!0,value(){let e=0;return{next:()=>{const t=jt(this,Ut);return e<t.length?{value:t[e++],done:!1}:{done:!0}}}}},[Symbol.toStringTag]:{configurable:!0,get:()=>"NodeList"}}),bt(Bt,NodeList);const Wt=pt(Element.prototype,"assignedSlot").get;function Vt(e){return e instanceof HTMLSlotElement}function Ht(e){return Vt(e)?e.assignedNodes({flatten:!0}):qt(e)?st(_.call(Gt(e))):st(_.call(e))}function Qt(e){switch(e.nodeType){case i:case l:{const t=Ht(e);let r="";for(let e=0,n=t.length;e<n;e+=1){const n=t[e];n.nodeType!==c&&(r+=Qt(n))}return r}default:return e.nodeValue}}var $t=Mt([[T,function(){const e=Ht(this);return e.length>0?e[0]:null}],[m,function(){const e=Ht(this);return e.length>0?e[e.length-1]:null}],[S,function(){return Qt(this)}],[w,function(){const e=Wt.call(this);if(e)return e;const t=w.call(this);return t&&t instanceof ShadowRoot?t.host:t}],[E,function(){const e=Wt.call(this);if(e)return e;const t=w.call(this);return t&&t instanceof ShadowRoot?t.host:E.call(this)}],[_,function(){return Yt(Ht(this))}],[g,function(){return Ht(this).length>0}],[b,function(){return this.isConnected?this.ownerDocument:b.call(this)}]]);var Kt=Mt([[pt(Text.prototype,"assignedSlot").get,function(){return null}]]);const{assignedNodes:zt,assignedElements:Xt}=HTMLSlotElement.prototype;var Jt=Mt([[Xt,function(e){return!Nt(e)&&Lt(e.flatten)?Xt.call(this,{flatten:!0}):[]}],[zt,function(e){return!Nt(e)&&Lt(e.flatten)?zt.call(this,{flatten:!0}):[]}]]);const Zt=Rt("StaticHTMLCollectionItems");function er(){throw new TypeError("Illegal constructor")}function tr(e){let t="";for(let r=0,n=e.length;r<n;r+=1)t+=fr(e[r]);return t}function rr(e){return Vt(e)?tr(e.assignedNodes({flatten:!0})):qt(e)?tr(_.call(Gt(e))):tr(_.call(e))}er.prototype=ut(HTMLCollection.prototype,{constructor:{writable:!0,configurable:!0,value:er},item:{writable:!0,enumerable:!0,configurable:!0,value(e){return this[e]}},length:{enumerable:!0,configurable:!0,get(){return jt(this,Zt).length}},namedItem:{writable:!0,enumerable:!0,configurable:!0,value(e){if(""===e)return null;const t=jt(this,Zt);for(let r=0,n=t.length;r<n;r++){const r=t[n];if(e===I.call(r,"id")||e===I.call(r,"name"))return r}return null}},forEach:{writable:!0,enumerable:!0,configurable:!0,value(e,t){Dt.call(jt(this,Zt),e,t)}},entries:{writable:!0,enumerable:!0,configurable:!0,value(){return St.call(jt(this,Zt),((e,t)=>[t,e]))}},keys:{writable:!0,enumerable:!0,configurable:!0,value(){return St.call(jt(this,Zt),((e,t)=>t))}},values:{writable:!0,enumerable:!0,configurable:!0,value(){return jt(this,Zt)}},[Symbol.iterator]:{writable:!0,configurable:!0,value(){let e=0;return{next:()=>{const t=jt(this,Zt);return e<t.length?{value:t[e++],done:!1}:{done:!0}}}}},[Symbol.toStringTag]:{configurable:!0,get:()=>"HTMLCollection"}}),bt(er,HTMLCollection);const nr=/[&\u00A0"]/g,or=/[&\u00A0<>]/g,{replace:ir,toLowerCase:sr}=String.prototype;function ar(e){switch(e){case"&":return"&";case"<":return"<";case">":return">";case'"':return""";case" ":return" ";default:return""}}function ur(e){return ir.call(e,nr,ar)}const cr=new Set(["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR"]),lr=new Set(["STYLE","SCRIPT","XMP","IFRAME","NOEMBED","NOFRAMES","PLAINTEXT","NOSCRIPT"]);function fr(e){switch(e.nodeType){case i:{const{attributes:t}=e,r=$.call(e);let n="<"+sr.call(r);for(let e,r=0;e=t[r];r++)n+=" "+e.name+'="'+ur(e.value)+'"';return n+=">",cr.has(r)?n:n+rr(e)+"</"+sr.call(r)+">"}case s:{const{data:r,parentNode:n}=e;return n instanceof Element&&lr.has($.call(n))?r:(t=r,ir.call(t,or,ar))}case a:return`<!CDATA[[${e.data}]]>`;case u:return`<?${e.target} ${e.data}?>`;case c:return`\x3c!--${e.data}--\x3e`;default:return""}var t}const pr=pt(Event.prototype,"target").get,hr=pt(FocusEvent.prototype,"relatedTarget").get,{composedPath:dr}=Event.prototype,vr=new WeakMap;function yr(e){let t=vr.get(e);return t||(t={target:pr.call(e),composedPath:dr.call(e)},e instanceof FocusEvent&&(t.relatedTarget=hr.call(e)),vr.set(e,t),t)}var gr=Mt([[pr,function(){return yr(this).target}],[dr,function(){return Tt.call(yr(this).composedPath,(e=>!(e instanceof ShadowRoot)))}],[hr,function(){return yr(this).relatedTarget}]]);
| /*! http://mths.be/startswith v0.2.0 by @mathias */String.prototype.startsWith||function(){var e=function(){try{var e={},t=Object.defineProperty,r=t(e,e,e)&&t}catch(e){}return r}(),t={}.toString,r=function(e){if(null==this)throw TypeError();var r=String(this);if(e&&"[object RegExp]"==t.call(e))throw TypeError();var n=r.length,o=String(e),i=o.length,s=arguments.length>1?arguments[1]:void 0,a=s?Number(s):0;a!=a&&(a=0);var u=Math.min(Math.max(a,0),n);if(i+u>n)return!1;for(var c=-1;++c<i;)if(r.charCodeAt(u+c)!=o.charCodeAt(c))return!1;return!0};e?e(String.prototype,"startsWith",{value:r,configurable:!0,writable:!0}):String.prototype.startsWith=r}()
| /*! http://mths.be/endswith v0.2.0 by @mathias */,String.prototype.endsWith||function(){var e=function(){try{var e={},t=Object.defineProperty,r=t(e,e,e)&&t}catch(e){}return r}(),t={}.toString,r=function(e){if(null==this)throw TypeError();var r=String(this);if(e&&"[object RegExp]"==t.call(e))throw TypeError();var n=r.length,o=String(e),i=o.length,s=n;if(arguments.length>1){var a=arguments[1];void 0!==a&&(s=a?Number(a):0)!=s&&(s=0)}var u=Math.min(Math.max(s,0),n),c=u-i;if(c<0)return!1;for(var l=-1;++l<i;)if(r.charCodeAt(c+l)!=o.charCodeAt(l))return!1;return!0};e?e(String.prototype,"endsWith",{value:r,configurable:!0,writable:!0}):String.prototype.endsWith=r}()
| /*
| object-assign
| (c) Sindre Sorhus
| @license MIT
| */;var br=Object.getOwnPropertySymbols,Tr=Object.prototype.hasOwnProperty,mr=Object.prototype.propertyIsEnumerable;function wr(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var Er=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var r,n,o=arguments,i=wr(e),s=1;s<arguments.length;s++){for(var a in r=Object(o[s]))Tr.call(r,a)&&(i[a]=r[a]);if(br){n=br(r);for(var u=0;u<n.length;u++)mr.call(r,n[u])&&(i[n[u]]=r[n[u]])}}return i},Sr="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function _r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Pr(e,t,r){return e(r={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&r.path)}},r.exports),r.exports}var Or=function(e,t){for(var r=-1,n=[];-1!==(r=e.indexOf(t,r+1));)n.push(r);return n};var kr=function(e,t,r){return 0===e.length?e:t?(r||e.sort(t),function(e,t){for(var r=1,n=e.length,o=e[0],i=e[0],s=1;s<n;++s)if(i=o,t(o=e[s],i)){if(s===r){r++;continue}e[r++]=o}return e.length=r,e}(e,t)):(r||e.sort(),function(e){for(var t=1,r=e.length,n=e[0],o=e[0],i=1;i<r;++i,o=n)if(o=n,(n=e[i])!==o){if(i===t){t++;continue}e[t++]=n}return e.length=t,e}(e))},Ir=Pr((function(e,t){t.__esModule=!0,t.default=function(e){return e.replace(r,(function(e,t,r){var n="0x"+t-65536;return n!=n||r?t:n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320)}))};var r=new RegExp("\\\\([\\da-f]{1,6}[\\x20\\t\\r\\n\\f]?|([\\x20\\t\\r\\n\\f])|.)","ig");e.exports=t.default})),xr=Pr((function(e,t){t.__esModule=!0,t.default=function(e){for(var t=arguments,r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=t[o];for(;n.length>0;){var i=n.shift();if(!e[i])return;e=e[i]}return e},e.exports=t.default})),Dr=Pr((function(e,t){t.__esModule=!0,t.default=function(e){for(var t=arguments,r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=t[o];for(;n.length>0;){var i=n.shift();e[i]||(e[i]={}),e=e[i]}},e.exports=t.default})),Nr=Pr((function(e,t){t.__esModule=!0,t.default=function(e){var t="",r=e.indexOf("/*"),n=0;for(;r>=0;){t+=e.slice(n,r);var o=e.indexOf("*/",r+2);if(o<0)return t;n=o+2,r=e.indexOf("/*",n)}return t+=e.slice(n)},e.exports=t.default})),Ar=Pr((function(e,t){t.__esModule=!0,t.stripComments=t.ensureObject=t.getProp=t.unesc=void 0;var r=s(Ir);t.unesc=r.default;var n=s(xr);t.getProp=n.default;var o=s(Dr);t.ensureObject=o.default;var i=s(Nr);function s(e){return e&&e.__esModule?e:{default:e}}t.stripComments=i.default})),Lr=Pr((function(e,t){function r(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}t.__esModule=!0,t.default=void 0;var n=function e(t,r){if("object"!=typeof t||null===t)return t;var n=new t.constructor;for(var o in t)if(t.hasOwnProperty(o)){var i=t[o];"parent"===o&&"object"===typeof i?r&&(n[o]=r):n[o]=i instanceof Array?i.map((function(t){return e(t,n)})):e(i,n)}return n},o=function(){function e(e){void 0===e&&(e={}),Er(this,e),this.spaces=this.spaces||{},this.spaces.before=this.spaces.before||"",this.spaces.after=this.spaces.after||""}var t,o,i,s=e.prototype;return s.remove=function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this},s.replaceWith=function(){var e=arguments;if(this.parent){for(var t in arguments)this.parent.insertBefore(this,e[t]);this.remove()}return this},s.next=function(){return this.parent.at(this.parent.index(this)+1)},s.prev=function(){return this.parent.at(this.parent.index(this)-1)},s.clone=function(e){void 0===e&&(e={});var t=n(this);for(var r in e)t[r]=e[r];return t},s.appendToPropertyAndEscape=function(e,t,r){this.raws||(this.raws={});var n=this[e],o=this.raws[e];this[e]=n+t,o||r!==t?this.raws[e]=(o||n)+r:delete this.raws[e]},s.setPropertyAndEscape=function(e,t,r){this.raws||(this.raws={}),this[e]=t,this.raws[e]=r},s.setPropertyWithoutEscape=function(e,t){this[e]=t,this.raws&&delete this.raws[e]},s.isAtPosition=function(e,t){if(this.source&&this.source.start&&this.source.end)return!(this.source.start.line>e)&&(!(this.source.end.line<e)&&(!(this.source.start.line===e&&this.source.start.column>t)&&!(this.source.end.line===e&&this.source.end.column<t)))},s.stringifyProperty=function(e){return this.raws&&this.raws[e]||this[e]},s.valueToString=function(){return String(this.stringifyProperty("value"))},s.toString=function(){return[this.rawSpaceBefore,this.valueToString(),this.rawSpaceAfter].join("")},t=e,(o=[{key:"rawSpaceBefore",get:function(){var e=this.raws&&this.raws.spaces&&this.raws.spaces.before;return void 0===e&&(e=this.spaces&&this.spaces.before),e||""},set:function(e){(0,Ar.ensureObject)(this,"raws","spaces"),this.raws.spaces.before=e}},{key:"rawSpaceAfter",get:function(){var e=this.raws&&this.raws.spaces&&this.raws.spaces.after;return void 0===e&&(e=this.spaces.after),e||""},set:function(e){(0,Ar.ensureObject)(this,"raws","spaces"),this.raws.spaces.after=e}}])&&r(t.prototype,o),i&&r(t,i),e}();t.default=o,e.exports=t.default})),Cr=Pr((function(e,t){t.__esModule=!0,t.UNIVERSAL=t.ATTRIBUTE=t.CLASS=t.COMBINATOR=t.COMMENT=t.ID=t.NESTING=t.PSEUDO=t.ROOT=t.SELECTOR=t.STRING=t.TAG=void 0;t.TAG="tag";t.STRING="string";t.SELECTOR="selector";t.ROOT="root";t.PSEUDO="pseudo";t.NESTING="nesting";t.ID="id";t.COMMENT="comment";t.COMBINATOR="combinator";t.CLASS="class";t.ATTRIBUTE="attribute";t.UNIVERSAL="universal"})),Mr=Pr((function(e,t){t.__esModule=!0,t.default=void 0;var r,n=(r=Lr)&&r.__esModule?r:{default:r},o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}(Cr);function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var s=function(e){var t,r;function n(t){var r;return(r=e.call(this,t)||this).nodes||(r.nodes=[]),r}r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var s,a,u,c=n.prototype;return c.append=function(e){return e.parent=this,this.nodes.push(e),this},c.prepend=function(e){return e.parent=this,this.nodes.unshift(e),this},c.at=function(e){return this.nodes[e]},c.index=function(e){return"number"==typeof e?e:this.nodes.indexOf(e)},c.removeChild=function(e){var t;for(var r in e=this.index(e),this.at(e).parent=void 0,this.nodes.splice(e,1),this.indexes)(t=this.indexes[r])>=e&&(this.indexes[r]=t-1);return this},c.removeAll=function(){var e=this.nodes,t=Array.isArray(e),r=0;for(e=t?e:e[Symbol.iterator]();;){var n;if(t){if(r>=e.length)break;n=e[r++]}else{if((r=e.next()).done)break;n=r.value}n.parent=void 0}return this.nodes=[],this},c.empty=function(){return this.removeAll()},c.insertAfter=function(e,t){t.parent=this;var r,n=this.index(e);for(var o in this.nodes.splice(n+1,0,t),t.parent=this,this.indexes)n<=(r=this.indexes[o])&&(this.indexes[o]=r+1);return this},c.insertBefore=function(e,t){t.parent=this;var r,n=this.index(e);for(var o in this.nodes.splice(n,0,t),t.parent=this,this.indexes)(r=this.indexes[o])<=n&&(this.indexes[o]=r+1);return this},c._findChildAtPosition=function(e,t){var r=void 0;return this.each((function(n){if(n.atPosition){var o=n.atPosition(e,t);if(o)return r=o,!1}else if(n.isAtPosition(e,t))return r=n,!1})),r},c.atPosition=function(e,t){return this.isAtPosition(e,t)?this._findChildAtPosition(e,t)||this:void 0},c._inferEndPosition=function(){this.last&&this.last.source&&this.last.source.end&&(this.source=this.source||{},this.source.end=this.source.end||{},Er(this.source.end,this.last.source.end))},c.each=function(e){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach++;var t=this.lastEach;if(this.indexes[t]=0,this.length){for(var r,n;this.indexes[t]<this.length&&(r=this.indexes[t],!1!==(n=e(this.at(r),r)));)this.indexes[t]+=1;return delete this.indexes[t],!1!==n&&void 0}},c.walk=function(e){return this.each((function(t,r){var n=e(t,r);if(!1!==n&&t.length&&(n=t.walk(e)),!1===n)return!1}))},c.walkAttributes=function(e){var t=this;return this.walk((function(r){if(r.type===o.ATTRIBUTE)return e.call(t,r)}))},c.walkClasses=function(e){var t=this;return this.walk((function(r){if(r.type===o.CLASS)return e.call(t,r)}))},c.walkCombinators=function(e){var t=this;return this.walk((function(r){if(r.type===o.COMBINATOR)return e.call(t,r)}))},c.walkComments=function(e){var t=this;return this.walk((function(r){if(r.type===o.COMMENT)return e.call(t,r)}))},c.walkIds=function(e){var t=this;return this.walk((function(r){if(r.type===o.ID)return e.call(t,r)}))},c.walkNesting=function(e){var t=this;return this.walk((function(r){if(r.type===o.NESTING)return e.call(t,r)}))},c.walkPseudos=function(e){var t=this;return this.walk((function(r){if(r.type===o.PSEUDO)return e.call(t,r)}))},c.walkTags=function(e){var t=this;return this.walk((function(r){if(r.type===o.TAG)return e.call(t,r)}))},c.walkUniversals=function(e){var t=this;return this.walk((function(r){if(r.type===o.UNIVERSAL)return e.call(t,r)}))},c.split=function(e){var t=this,r=[];return this.reduce((function(n,o,i){var s=e.call(t,o);return r.push(o),s?(n.push(r),r=[]):i===t.length-1&&n.push(r),n}),[])},c.map=function(e){return this.nodes.map(e)},c.reduce=function(e,t){return this.nodes.reduce(e,t)},c.every=function(e){return this.nodes.every(e)},c.some=function(e){return this.nodes.some(e)},c.filter=function(e){return this.nodes.filter(e)},c.sort=function(e){return this.nodes.sort(e)},c.toString=function(){return this.map(String).join("")},s=n,(a=[{key:"first",get:function(){return this.at(0)}},{key:"last",get:function(){return this.at(this.length-1)}},{key:"length",get:function(){return this.nodes.length}}])&&i(s.prototype,a),u&&i(s,u),n}(n.default);t.default=s,e.exports=t.default})),Rr=Pr((function(e,t){var r;function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}t.__esModule=!0,t.default=void 0;var o=function(e){var t,r;function o(t){var r;return(r=e.call(this,t)||this).type=Cr.ROOT,r}r=e,(t=o).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var i,s,a,u=o.prototype;return u.toString=function(){var e=this.reduce((function(e,t){return e.push(String(t)),e}),[]).join(",");return this.trailingComma?e+",":e},u.error=function(e,t){return this._error?this._error(e,t):new Error(e)},i=o,(s=[{key:"errorGenerator",set:function(e){this._error=e}}])&&n(i.prototype,s),a&&n(i,a),o}(((r=Mr)&&r.__esModule?r:{default:r}).default);t.default=o,e.exports=t.default})),Fr=Pr((function(e,t){var r;t.__esModule=!0,t.default=void 0;var n=function(e){var t,r;function n(t){var r;return(r=e.call(this,t)||this).type=Cr.SELECTOR,r}return r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r,n}(((r=Mr)&&r.__esModule?r:{default:r}).default);t.default=n,e.exports=t.default})),jr={}.hasOwnProperty,qr=/[ -,\.\/:-@\[-\^`\{-~]/,Gr=/[ -,\.\/:-@\[\]\^`\{-~]/,Ur=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g,Br=function e(t,r){"single"!=(r=function(e,t){if(!e)return t;var r={};for(var n in t)r[n]=jr.call(e,n)?e[n]:t[n];return r}(r,e.options)).quotes&&"double"!=r.quotes&&(r.quotes="single");for(var n="double"==r.quotes?'"':"'",o=r.isIdentifier,i=t.charAt(0),s="",a=0,u=t.length;a<u;){var c=t.charAt(a++),l=c.charCodeAt(),f=void 0;if(l<32||l>126){if(l>=55296&&l<=56319&&a<u){var p=t.charCodeAt(a++);56320==(64512&p)?l=((1023&l)<<10)+(1023&p)+65536:a--}f="\\"+l.toString(16).toUpperCase()+" "}else f=r.escapeEverything?qr.test(c)?"\\"+c:"\\"+l.toString(16).toUpperCase()+" ":/[\t\n\f\r\x0B]/.test(c)?"\\"+l.toString(16).toUpperCase()+" ":"\\"==c||!o&&('"'==c&&n==c||"'"==c&&n==c)||o&&Gr.test(c)?"\\"+c:c;s+=f}return o&&(/^-[-\d]/.test(s)?s="\\-"+s.slice(1):/\d/.test(i)&&(s="\\3"+i+" "+s.slice(1))),s=s.replace(Ur,(function(e,t,r){return t&&t.length%2?e:(t||"")+r})),!o&&r.wrap?n+s+n:s};Br.options={escapeEverything:!1,isIdentifier:!1,quotes:"single",wrap:!1},Br.version="3.0.0";var Yr=Br,Wr=Pr((function(e,t){t.__esModule=!0,t.default=void 0;var r=n(Yr);function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var i=function(e){var t,n,i,s,a;function u(t){var r;return(r=e.call(this,t)||this).type=Cr.CLASS,r._constructed=!0,r}return n=e,(t=u).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,u.prototype.valueToString=function(){return"."+e.prototype.valueToString.call(this)},i=u,(s=[{key:"value",set:function(e){if(this._constructed){var t=(0,r.default)(e,{isIdentifier:!0});t!==e?((0,Ar.ensureObject)(this,"raws"),this.raws.value=t):this.raws&&delete this.raws.value}this._value=e},get:function(){return this._value}}])&&o(i.prototype,s),a&&o(i,a),u}(n(Lr).default);t.default=i,e.exports=t.default})),Vr=Pr((function(e,t){var r;t.__esModule=!0,t.default=void 0;var n=function(e){var t,r;function n(t){var r;return(r=e.call(this,t)||this).type=Cr.COMMENT,r}return r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r,n}(((r=Lr)&&r.__esModule?r:{default:r}).default);t.default=n,e.exports=t.default})),Hr=Pr((function(e,t){var r;t.__esModule=!0,t.default=void 0;var n=function(e){var t,r;function n(t){var r;return(r=e.call(this,t)||this).type=Cr.ID,r}return r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r,n.prototype.valueToString=function(){return"#"+e.prototype.valueToString.call(this)},n}(((r=Lr)&&r.__esModule?r:{default:r}).default);t.default=n,e.exports=t.default})),Qr=Pr((function(e,t){t.__esModule=!0,t.default=void 0;var r=n(Yr);function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var i=function(e){var t,n;function i(){return e.apply(this,arguments)||this}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var s,a,u,c=i.prototype;return c.qualifiedName=function(e){return this.namespace?this.namespaceString+"|"+e:e},c.valueToString=function(){return this.qualifiedName(e.prototype.valueToString.call(this))},s=i,a=[{key:"namespace",get:function(){return this._namespace},set:function(e){if(!0===e||"*"===e||"&"===e)return this._namespace=e,void(this.raws&&delete this.raws.namespace);var t=(0,r.default)(e,{isIdentifier:!0});this._namespace=e,t!==e?((0,Ar.ensureObject)(this,"raws"),this.raws.namespace=t):this.raws&&delete this.raws.namespace}},{key:"ns",get:function(){return this._namespace},set:function(e){this.namespace=e}},{key:"namespaceString",get:function(){if(this.namespace){var e=this.stringifyProperty("namespace");return!0===e?"":e}return""}}],a&&o(s.prototype,a),u&&o(s,u),i}(n(Lr).default);t.default=i,e.exports=t.default})),$r=Pr((function(e,t){var r;t.__esModule=!0,t.default=void 0;var n=function(e){var t,r;function n(t){var r;return(r=e.call(this,t)||this).type=Cr.TAG,r}return r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r,n}(((r=Qr)&&r.__esModule?r:{default:r}).default);t.default=n,e.exports=t.default})),Kr=Pr((function(e,t){var r;t.__esModule=!0,t.default=void 0;var n=function(e){var t,r;function n(t){var r;return(r=e.call(this,t)||this).type=Cr.STRING,r}return r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r,n}(((r=Lr)&&r.__esModule?r:{default:r}).default);t.default=n,e.exports=t.default})),zr=Pr((function(e,t){var r;t.__esModule=!0,t.default=void 0;var n=function(e){var t,r;function n(t){var r;return(r=e.call(this,t)||this).type=Cr.PSEUDO,r}return r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r,n.prototype.toString=function(){var e=this.length?"("+this.map(String).join(",")+")":"";return[this.rawSpaceBefore,this.stringifyProperty("value"),e,this.rawSpaceAfter].join("")},n}(((r=Mr)&&r.__esModule?r:{default:r}).default);t.default=n,e.exports=t.default})),Xr=function(e,t){if(Jr("noDeprecation"))return e;var r=!1;return function(){if(!r){if(Jr("throwDeprecation"))throw new Error(t);Jr("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}};function Jr(e){try{if(!Sr.localStorage)return!1}catch(e){return!1}var t=Sr.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}var Zr=Pr((function(e,t){t.__esModule=!0,t.unescapeValue=p,t.default=void 0;var r,n=s(Yr),o=s(Ir),i=s(Qr);function s(e){return e&&e.__esModule?e:{default:e}}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var u=/^('|")(.*)\1$/,c=Xr((function(){}),"Assigning an attribute a value containing characters that might need to be escaped is deprecated. Call attribute.setValue() instead."),l=Xr((function(){}),"Assigning attr.quoted is deprecated and has no effect. Assign to attr.quoteMark instead."),f=Xr((function(){}),"Constructing an Attribute selector with a value without specifying quoteMark is deprecated. Note: The value should be unescaped now.");function p(e){var t=!1,r=null,n=e,i=n.match(u);return i&&(r=i[1],n=i[2]),(n=(0,o.default)(n))!==e&&(t=!0),{deprecatedUsage:t,unescaped:n,quoteMark:r}}var h=function(e){var t,r;function o(t){var r;return void 0===t&&(t={}),r=e.call(this,function(e){if(void 0!==e.quoteMark)return e;if(void 0===e.value)return e;f();var t=p(e.value),r=t.quoteMark,n=t.unescaped;return e.raws||(e.raws={}),void 0===e.raws.value&&(e.raws.value=e.value),e.value=n,e.quoteMark=r,e}(t))||this,r.type=Cr.ATTRIBUTE,r.raws=r.raws||{},Object.defineProperty(r.raws,"unquoted",{get:Xr((function(){return r.value}),"attr.raws.unquoted is deprecated. Call attr.value instead."),set:Xr((function(){return r.value}),"Setting attr.raws.unquoted is deprecated and has no effect. attr.value is unescaped by default now.")}),r._constructed=!0,r}r=e,(t=o).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var i,s,u,h=o.prototype;return h.getQuotedValue=function(e){void 0===e&&(e={});var t=this._determineQuoteMark(e),r=d[t];return(0,n.default)(this._value,r)},h._determineQuoteMark=function(e){return e.smart?this.smartQuoteMark(e):this.preferredQuoteMark(e)},h.setValue=function(e,t){void 0===t&&(t={}),this._value=e,this._quoteMark=this._determineQuoteMark(t),this._syncRawValue()},h.smartQuoteMark=function(e){var t=this.value,r=t.replace(/[^']/g,"").length,i=t.replace(/[^"]/g,"").length;if(r+i===0){var s=(0,n.default)(t,{isIdentifier:!0});if(s===t)return o.NO_QUOTE;var a=this.preferredQuoteMark(e);if(a===o.NO_QUOTE){var u=this.quoteMark||e.quoteMark||o.DOUBLE_QUOTE,c=d[u];if((0,n.default)(t,c).length<s.length)return u}return a}return i===r?this.preferredQuoteMark(e):i<r?o.DOUBLE_QUOTE:o.SINGLE_QUOTE},h.preferredQuoteMark=function(e){var t=e.preferCurrentQuoteMark?this.quoteMark:e.quoteMark;return void 0===t&&(t=e.preferCurrentQuoteMark?e.quoteMark:this.quoteMark),void 0===t&&(t=o.DOUBLE_QUOTE),t},h._syncRawValue=function(){var e=(0,n.default)(this._value,d[this.quoteMark]);e===this._value?this.raws&&delete this.raws.value:this.raws.value=e},h._handleEscapes=function(e,t){if(this._constructed){var r=(0,n.default)(t,{isIdentifier:!0});r!==t?this.raws[e]=r:delete this.raws[e]}},h._spacesFor=function(e){var t=this.spaces[e]||{},r=this.raws.spaces&&this.raws.spaces[e]||{};return Er({before:"",after:""},t,r)},h._stringFor=function(e,t,r){void 0===t&&(t=e),void 0===r&&(r=v);var n=this._spacesFor(t);return r(this.stringifyProperty(e),n)},h.offsetOf=function(e){var t=1,r=this._spacesFor("attribute");if(t+=r.before.length,"namespace"===e||"ns"===e)return this.namespace?t:-1;if("attributeNS"===e)return t;if(t+=this.namespaceString.length,this.namespace&&(t+=1),"attribute"===e)return t;t+=this.stringifyProperty("attribute").length,t+=r.after.length;var n=this._spacesFor("operator");t+=n.before.length;var o=this.stringifyProperty("operator");if("operator"===e)return o?t:-1;t+=o.length,t+=n.after.length;var i=this._spacesFor("value");t+=i.before.length;var s=this.stringifyProperty("value");return"value"===e?s?t:-1:(t+=s.length,t+=i.after.length,t+=this._spacesFor("insensitive").before.length,"insensitive"===e&&this.insensitive?t:-1)},h.toString=function(){var e=this,t=[this.rawSpaceBefore,"["];return t.push(this._stringFor("qualifiedAttribute","attribute")),this.operator&&(this.value||""===this.value)&&(t.push(this._stringFor("operator")),t.push(this._stringFor("value")),t.push(this._stringFor("insensitiveFlag","insensitive",(function(t,r){return!(t.length>0)||e.quoted||0!==r.before.length||e.spaces.value&&e.spaces.value.after||(r.before=" "),v(t,r)})))),t.push("]"),t.push(this.rawSpaceAfter),t.join("")},i=o,(s=[{key:"quoted",get:function(){var e=this.quoteMark;return"'"===e||'"'===e},set:function(e){l()}},{key:"quoteMark",get:function(){return this._quoteMark},set:function(e){this._constructed?this._quoteMark!==e&&(this._quoteMark=e,this._syncRawValue()):this._quoteMark=e}},{key:"qualifiedAttribute",get:function(){return this.qualifiedName(this.raws.attribute||this.attribute)}},{key:"insensitiveFlag",get:function(){return this.insensitive?"i":""}},{key:"value",get:function(){return this._value},set:function(e){if(this._constructed){var t=p(e),r=t.deprecatedUsage,n=t.unescaped,o=t.quoteMark;if(r&&c(),n===this._value&&o===this._quoteMark)return;this._value=n,this._quoteMark=o,this._syncRawValue()}else this._value=e}},{key:"attribute",get:function(){return this._attribute},set:function(e){this._handleEscapes("attribute",e),this._attribute=e}}])&&a(i.prototype,s),u&&a(i,u),o}(i.default);t.default=h,h.NO_QUOTE=null,h.SINGLE_QUOTE="'",h.DOUBLE_QUOTE='"';var d=((r={"'":{quotes:"single",wrap:!0},'"':{quotes:"double",wrap:!0}}).null={isIdentifier:!0},r);function v(e,t){return""+t.before+e+t.after}})),en=Pr((function(e,t){var r;t.__esModule=!0,t.default=void 0;var n=function(e){var t,r;function n(t){var r;return(r=e.call(this,t)||this).type=Cr.UNIVERSAL,r.value="*",r}return r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r,n}(((r=Qr)&&r.__esModule?r:{default:r}).default);t.default=n,e.exports=t.default})),tn=Pr((function(e,t){var r;t.__esModule=!0,t.default=void 0;var n=function(e){var t,r;function n(t){var r;return(r=e.call(this,t)||this).type=Cr.COMBINATOR,r}return r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r,n}(((r=Lr)&&r.__esModule?r:{default:r}).default);t.default=n,e.exports=t.default})),rn=Pr((function(e,t){var r;t.__esModule=!0,t.default=void 0;var n=function(e){var t,r;function n(t){var r;return(r=e.call(this,t)||this).type=Cr.NESTING,r.value="&",r}return r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r,n}(((r=Lr)&&r.__esModule?r:{default:r}).default);t.default=n,e.exports=t.default})),nn=Pr((function(e,t){t.__esModule=!0,t.default=function(e){return e.sort((function(e,t){return e-t}))},e.exports=t.default})),on=Pr((function(e,t){t.__esModule=!0,t.combinator=t.word=t.comment=t.str=t.tab=t.newline=t.feed=t.cr=t.backslash=t.bang=t.slash=t.doubleQuote=t.singleQuote=t.space=t.greaterThan=t.pipe=t.equals=t.plus=t.caret=t.tilde=t.dollar=t.closeSquare=t.openSquare=t.closeParenthesis=t.openParenthesis=t.semicolon=t.colon=t.comma=t.at=t.asterisk=t.ampersand=void 0;t.ampersand=38;t.asterisk=42;t.at=64;t.comma=44;t.colon=58;t.semicolon=59;t.openParenthesis=40;t.closeParenthesis=41;t.openSquare=91;t.closeSquare=93;t.dollar=36;t.tilde=126;t.caret=94;t.plus=43;t.equals=61;t.pipe=124;t.greaterThan=62;t.space=32;t.singleQuote=39;t.doubleQuote=34;t.slash=47;t.bang=33;t.backslash=92;t.cr=13;t.feed=12;t.newline=10;t.tab=9;t.str=39;t.comment=-1;t.word=-2;t.combinator=-3})),sn=Pr((function(e,t){t.__esModule=!0,t.default=function(e){var t,r,n,i,s,a,u,c,f,p,h,d,v,y=[],g=e.css.valueOf(),b=g.length,T=-1,m=1,w=0,E=0;function S(t,r){if(!e.safe)throw e.error("Unclosed "+t,m,w-T,w);f=(g+=r).length-1}for(;w<b;){switch((t=g.charCodeAt(w))===o.newline&&(T=w,m+=1),t){case o.space:case o.tab:case o.newline:case o.cr:case o.feed:f=w;do{f+=1,(t=g.charCodeAt(f))===o.newline&&(T=f,m+=1)}while(t===o.space||t===o.newline||t===o.tab||t===o.cr||t===o.feed);v=o.space,i=m,n=f-T-1,E=f;break;case o.plus:case o.greaterThan:case o.tilde:case o.pipe:f=w;do{f+=1,t=g.charCodeAt(f)}while(t===o.plus||t===o.greaterThan||t===o.tilde||t===o.pipe);v=o.combinator,i=m,n=w-T,E=f;break;case o.asterisk:case o.ampersand:case o.bang:case o.comma:case o.equals:case o.dollar:case o.caret:case o.openSquare:case o.closeSquare:case o.colon:case o.semicolon:case o.openParenthesis:case o.closeParenthesis:v=t,i=m,n=w-T,E=(f=w)+1;break;case o.singleQuote:case o.doubleQuote:d=t===o.singleQuote?"'":'"',f=w;do{for(s=!1,-1===(f=g.indexOf(d,f+1))&&S("quote",d),a=f;g.charCodeAt(a-1)===o.backslash;)a-=1,s=!s}while(s);v=o.str,i=m,n=w-T,E=f+1;break;default:t===o.slash&&g.charCodeAt(w+1)===o.asterisk?(0===(f=g.indexOf("*/",w+2)+1)&&S("comment","*/"),r=g.slice(w,f+1),c=r.split("\n"),(u=c.length-1)>0?(p=m+u,h=f-c[u].length):(p=m,h=T),v=o.comment,m=p,i=p,n=f-h):t===o.slash?(v=t,i=m,n=w-T,E=(f=w)+1):(f=l(g,w),v=o.word,i=m,n=f-T),E=f+1}y.push([v,m,w-T,i,n,w,E]),h&&(T=h,h=null),w=E}return y},t.FIELDS=void 0;var r,n,o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}(on);for(var i=((r={})[o.tab]=!0,r[o.newline]=!0,r[o.cr]=!0,r[o.feed]=!0,r),s=((n={})[o.space]=!0,n[o.tab]=!0,n[o.newline]=!0,n[o.cr]=!0,n[o.feed]=!0,n[o.ampersand]=!0,n[o.asterisk]=!0,n[o.bang]=!0,n[o.comma]=!0,n[o.colon]=!0,n[o.semicolon]=!0,n[o.openParenthesis]=!0,n[o.closeParenthesis]=!0,n[o.openSquare]=!0,n[o.closeSquare]=!0,n[o.singleQuote]=!0,n[o.doubleQuote]=!0,n[o.plus]=!0,n[o.pipe]=!0,n[o.tilde]=!0,n[o.greaterThan]=!0,n[o.equals]=!0,n[o.dollar]=!0,n[o.caret]=!0,n[o.slash]=!0,n),a={},u="0123456789abcdefABCDEF",c=0;c<u.length;c++)a[u.charCodeAt(c)]=!0;function l(e,t){var r,n=t;do{if(r=e.charCodeAt(n),s[r])return n-1;r===o.backslash?n=f(e,n)+1:n++}while(n<e.length);return n-1}function f(e,t){var r=t,n=e.charCodeAt(r+1);if(i[n]);else if(a[n]){var s=0;do{r++,s++,n=e.charCodeAt(r+1)}while(a[n]&&s<6);s<6&&n===o.space&&r++}else r++;return r}t.FIELDS={TYPE:0,START_LINE:1,START_COL:2,END_LINE:3,END_COL:4,START_POS:5,END_POS:6}})),an=Pr((function(e,t){t.__esModule=!0,t.default=void 0;var r,n,o=S(Or),i=S(kr),s=S(Rr),a=S(Fr),u=S(Wr),c=S(Vr),l=S(Hr),f=S($r),p=S(Kr),h=S(zr),d=E(Zr),v=S(en),y=S(tn),g=S(rn),b=S(nn),T=E(sn),m=E(on),w=E(Cr);function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}function S(e){return e&&e.__esModule?e:{default:e}}function _(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var P=((r={})[m.space]=!0,r[m.cr]=!0,r[m.feed]=!0,r[m.newline]=!0,r[m.tab]=!0,r),O=Er({},P,((n={})[m.comment]=!0,n));function k(e){return{line:e[T.FIELDS.START_LINE],column:e[T.FIELDS.START_COL]}}function I(e){return{line:e[T.FIELDS.END_LINE],column:e[T.FIELDS.END_COL]}}function x(e,t,r,n){return{start:{line:e,column:t},end:{line:r,column:n}}}function D(e){return x(e[T.FIELDS.START_LINE],e[T.FIELDS.START_COL],e[T.FIELDS.END_LINE],e[T.FIELDS.END_COL])}function N(e,t){if(e)return x(e[T.FIELDS.START_LINE],e[T.FIELDS.START_COL],t[T.FIELDS.END_LINE],t[T.FIELDS.END_COL])}function A(e,t){var r=e[t];if("string"==typeof r)return-1!==r.indexOf("\\")&&((0,Ar.ensureObject)(e,"raws"),e[t]=(0,Ar.unesc)(r),void 0===e.raws[t]&&(e.raws[t]=r)),e}var L=function(){function e(e,t){void 0===t&&(t={}),this.rule=e,this.options=Er({lossy:!1,safe:!1},t),this.position=0,this.css="string"==typeof this.rule?this.rule:this.rule.selector,this.tokens=(0,T.default)({css:this.css,error:this._errorGenerator(),safe:this.options.safe});var r=N(this.tokens[0],this.tokens[this.tokens.length-1]);this.root=new s.default({source:r}),this.root.errorGenerator=this._errorGenerator();var n=new a.default({source:{start:{line:1,column:1}}});this.root.append(n),this.current=n,this.loop()}var t,r,n,E=e.prototype;return E._errorGenerator=function(){var e=this;return function(t,r){return"string"==typeof e.rule?new Error(t):e.rule.error(t,r)}},E.attribute=function(){var e=[],t=this.currToken;for(this.position++;this.position<this.tokens.length&&this.currToken[T.FIELDS.TYPE]!==m.closeSquare;)e.push(this.currToken),this.position++;if(this.currToken[T.FIELDS.TYPE]!==m.closeSquare)return this.expected("closing square bracket",this.currToken[T.FIELDS.START_POS]);var r=e.length,n={source:x(t[1],t[2],this.currToken[3],this.currToken[4]),sourceIndex:t[T.FIELDS.START_POS]};if(1===r&&!~[m.word].indexOf(e[0][T.FIELDS.TYPE]))return this.expected("attribute",e[0][T.FIELDS.START_POS]);for(var o=0,i="",s="",a=null,u=!1;o<r;){var c=e[o],l=this.content(c),f=e[o+1];switch(c[T.FIELDS.TYPE]){case m.space:if(u=!0,this.options.lossy)break;if(a){(0,Ar.ensureObject)(n,"spaces",a);var p=n.spaces[a].after||"";n.spaces[a].after=p+l;var h=(0,Ar.getProp)(n,"raws","spaces",a,"after")||null;h&&(n.raws.spaces[a].after=h+l)}else i+=l,s+=l;break;case m.asterisk:if(f[T.FIELDS.TYPE]===m.equals)n.operator=l,a="operator";else if((!n.namespace||"namespace"===a&&!u)&&f){i&&((0,Ar.ensureObject)(n,"spaces","attribute"),n.spaces.attribute.before=i,i=""),s&&((0,Ar.ensureObject)(n,"raws","spaces","attribute"),n.raws.spaces.attribute.before=i,s=""),n.namespace=(n.namespace||"")+l,((0,Ar.getProp)(n,"raws","namespace")||null)&&(n.raws.namespace+=l),a="namespace"}u=!1;break;case m.dollar:if("value"===a){var v=(0,Ar.getProp)(n,"raws","value");n.value+="$",v&&(n.raws.value=v+"$");break}case m.caret:f[T.FIELDS.TYPE]===m.equals&&(n.operator=l,a="operator"),u=!1;break;case m.combinator:if("~"===l&&f[T.FIELDS.TYPE]===m.equals&&(n.operator=l,a="operator"),"|"!==l){u=!1;break}f[T.FIELDS.TYPE]===m.equals?(n.operator=l,a="operator"):n.namespace||n.attribute||(n.namespace=!0),u=!1;break;case m.word:if(f&&"|"===this.content(f)&&e[o+2]&&e[o+2][T.FIELDS.TYPE]!==m.equals&&!n.operator&&!n.namespace)n.namespace=l,a="namespace";else if(!n.attribute||"attribute"===a&&!u){i&&((0,Ar.ensureObject)(n,"spaces","attribute"),n.spaces.attribute.before=i,i=""),s&&((0,Ar.ensureObject)(n,"raws","spaces","attribute"),n.raws.spaces.attribute.before=s,s=""),n.attribute=(n.attribute||"")+l,((0,Ar.getProp)(n,"raws","attribute")||null)&&(n.raws.attribute+=l),a="attribute"}else if(!n.value&&""!==n.value||"value"===a&&!u){var y=(0,Ar.unesc)(l),g=(0,Ar.getProp)(n,"raws","value")||"",b=n.value||"";n.value=b+y,n.quoteMark=null,(y!==l||g)&&((0,Ar.ensureObject)(n,"raws"),n.raws.value=(g||b)+l),a="value"}else{var w="i"===l||"I"===l;!n.value&&""!==n.value||!n.quoteMark&&!u?(n.value||""===n.value)&&(a="value",n.value+=l,n.raws.value&&(n.raws.value+=l)):(n.insensitive=w,w&&"I"!==l||((0,Ar.ensureObject)(n,"raws"),n.raws.insensitiveFlag=l),a="insensitive",i&&((0,Ar.ensureObject)(n,"spaces","insensitive"),n.spaces.insensitive.before=i,i=""),s&&((0,Ar.ensureObject)(n,"raws","spaces","insensitive"),n.raws.spaces.insensitive.before=s,s=""))}u=!1;break;case m.str:if(!n.attribute||!n.operator)return this.error("Expected an attribute followed by an operator preceding the string.",{index:c[T.FIELDS.START_POS]});var E=(0,d.unescapeValue)(l),S=E.unescaped,_=E.quoteMark;n.value=S,n.quoteMark=_,a="value",(0,Ar.ensureObject)(n,"raws"),n.raws.value=l,u=!1;break;case m.equals:if(!n.attribute)return this.expected("attribute",c[T.FIELDS.START_POS],l);if(n.value)return this.error('Unexpected "=" found; an operator was already defined.',{index:c[T.FIELDS.START_POS]});n.operator=n.operator?n.operator+l:l,a="operator",u=!1;break;case m.comment:if(a)if(u||f&&f[T.FIELDS.TYPE]===m.space||"insensitive"===a){var P=(0,Ar.getProp)(n,"spaces",a,"after")||"",O=(0,Ar.getProp)(n,"raws","spaces",a,"after")||P;(0,Ar.ensureObject)(n,"raws","spaces",a),n.raws.spaces[a].after=O+l}else{var k=n[a]||"",I=(0,Ar.getProp)(n,"raws",a)||k;(0,Ar.ensureObject)(n,"raws"),n.raws[a]=I+l}else s+=l;break;default:return this.error('Unexpected "'+l+'" found.',{index:c[T.FIELDS.START_POS]})}o++}A(n,"attribute"),A(n,"namespace"),this.newNode(new d.default(n)),this.position++},E.parseWhitespaceEquivalentTokens=function(e){e<0&&(e=this.tokens.length);var t=this.position,r=[],n="",o=void 0;do{if(P[this.currToken[T.FIELDS.TYPE]])this.options.lossy||(n+=this.content());else if(this.currToken[T.FIELDS.TYPE]===m.comment){var i={};n&&(i.before=n,n=""),o=new c.default({value:this.content(),source:D(this.currToken),sourceIndex:this.currToken[T.FIELDS.START_POS],spaces:i}),r.push(o)}}while(++this.position<e);if(n)if(o)o.spaces.after=n;else if(!this.options.lossy){var s=this.tokens[t],a=this.tokens[this.position-1];r.push(new p.default({value:"",source:x(s[T.FIELDS.START_LINE],s[T.FIELDS.START_COL],a[T.FIELDS.END_LINE],a[T.FIELDS.END_COL]),sourceIndex:s[T.FIELDS.START_POS],spaces:{before:n,after:""}}))}return r},E.convertWhitespaceNodesToSpace=function(e,t){var r=this;void 0===t&&(t=!1);var n="",o="";return e.forEach((function(e){var i=r.lossySpace(e.spaces.before,t),s=r.lossySpace(e.rawSpaceBefore,t);n+=i+r.lossySpace(e.spaces.after,t&&0===i.length),o+=i+e.value+r.lossySpace(e.rawSpaceAfter,t&&0===s.length)})),o===n&&(o=void 0),{space:n,rawSpace:o}},E.isNamedCombinator=function(e){return void 0===e&&(e=this.position),this.tokens[e+0]&&this.tokens[e+0][T.FIELDS.TYPE]===m.slash&&this.tokens[e+1]&&this.tokens[e+1][T.FIELDS.TYPE]===m.word&&this.tokens[e+2]&&this.tokens[e+2][T.FIELDS.TYPE]===m.slash},E.namedCombinator=function(){if(this.isNamedCombinator()){var e=this.content(this.tokens[this.position+1]),t=(0,Ar.unesc)(e).toLowerCase(),r={};t!==e&&(r.value="/"+e+"/");var n=new y.default({value:"/"+t+"/",source:x(this.currToken[T.FIELDS.START_LINE],this.currToken[T.FIELDS.START_COL],this.tokens[this.position+2][T.FIELDS.END_LINE],this.tokens[this.position+2][T.FIELDS.END_COL]),sourceIndex:this.currToken[T.FIELDS.START_POS],raws:r});return this.position=this.position+3,n}this.unexpected()},E.combinator=function(){var e=this;if("|"===this.content())return this.namespace();var t=this.locateNextMeaningfulToken(this.position);if(!(t<0||this.tokens[t][T.FIELDS.TYPE]===m.comma)){var r,n=this.currToken,o=void 0;if(t>this.position&&(o=this.parseWhitespaceEquivalentTokens(t)),this.isNamedCombinator()?r=this.namedCombinator():this.currToken[T.FIELDS.TYPE]===m.combinator?(r=new y.default({value:this.content(),source:D(this.currToken),sourceIndex:this.currToken[T.FIELDS.START_POS]}),this.position++):P[this.currToken[T.FIELDS.TYPE]]||o||this.unexpected(),r){if(o){var i=this.convertWhitespaceNodesToSpace(o),s=i.space,a=i.rawSpace;r.spaces.before=s,r.rawSpaceBefore=a}}else{var u=this.convertWhitespaceNodesToSpace(o,!0),c=u.space,l=u.rawSpace;l||(l=c);var f={},p={spaces:{}};c.endsWith(" ")&&l.endsWith(" ")?(f.before=c.slice(0,c.length-1),p.spaces.before=l.slice(0,l.length-1)):c.startsWith(" ")&&l.startsWith(" ")?(f.after=c.slice(1),p.spaces.after=l.slice(1)):p.value=l,r=new y.default({value:" ",source:N(n,this.tokens[this.position-1]),sourceIndex:n[T.FIELDS.START_POS],spaces:f,raws:p})}return this.currToken&&this.currToken[T.FIELDS.TYPE]===m.space&&(r.spaces.after=this.optionalSpace(this.content()),this.position++),this.newNode(r)}var h=this.parseWhitespaceEquivalentTokens(t);if(h.length>0){var d=this.current.last;if(d){var v=this.convertWhitespaceNodesToSpace(h),g=v.space,b=v.rawSpace;void 0!==b&&(d.rawSpaceAfter+=b),d.spaces.after+=g}else h.forEach((function(t){return e.newNode(t)}))}},E.comma=function(){if(this.position===this.tokens.length-1)return this.root.trailingComma=!0,void this.position++;this.current._inferEndPosition();var e=new a.default({source:{start:k(this.tokens[this.position+1])}});this.current.parent.append(e),this.current=e,this.position++},E.comment=function(){var e=this.currToken;this.newNode(new c.default({value:this.content(),source:D(e),sourceIndex:e[T.FIELDS.START_POS]})),this.position++},E.error=function(e,t){throw this.root.error(e,t)},E.missingBackslash=function(){return this.error("Expected a backslash preceding the semicolon.",{index:this.currToken[T.FIELDS.START_POS]})},E.missingParenthesis=function(){return this.expected("opening parenthesis",this.currToken[T.FIELDS.START_POS])},E.missingSquareBracket=function(){return this.expected("opening square bracket",this.currToken[T.FIELDS.START_POS])},E.unexpected=function(){return this.error("Unexpected '"+this.content()+"'. Escaping special characters with \\ may help.",this.currToken[T.FIELDS.START_POS])},E.namespace=function(){var e=this.prevToken&&this.content(this.prevToken)||!0;return this.nextToken[T.FIELDS.TYPE]===m.word?(this.position++,this.word(e)):this.nextToken[T.FIELDS.TYPE]===m.asterisk?(this.position++,this.universal(e)):void 0},E.nesting=function(){if(this.nextToken&&"|"===this.content(this.nextToken))return void this.position++;var e=this.currToken;this.newNode(new g.default({value:this.content(),source:D(e),sourceIndex:e[T.FIELDS.START_POS]})),this.position++},E.parentheses=function(){var e=this.current.last,t=1;if(this.position++,e&&e.type===w.PSEUDO){var r=new a.default({source:{start:k(this.tokens[this.position-1])}}),n=this.current;for(e.append(r),this.current=r;this.position<this.tokens.length&&t;)this.currToken[T.FIELDS.TYPE]===m.openParenthesis&&t++,this.currToken[T.FIELDS.TYPE]===m.closeParenthesis&&t--,t?this.parse():(this.current.source.end=I(this.currToken),this.current.parent.source.end=I(this.currToken),this.position++);this.current=n}else{for(var o,i=this.currToken,s="(";this.position<this.tokens.length&&t;)this.currToken[T.FIELDS.TYPE]===m.openParenthesis&&t++,this.currToken[T.FIELDS.TYPE]===m.closeParenthesis&&t--,o=this.currToken,s+=this.parseParenthesisToken(this.currToken),this.position++;e?e.appendToPropertyAndEscape("value",s,s):this.newNode(new p.default({value:s,source:x(i[T.FIELDS.START_LINE],i[T.FIELDS.START_COL],o[T.FIELDS.END_LINE],o[T.FIELDS.END_COL]),sourceIndex:i[T.FIELDS.START_POS]}))}if(t)return this.expected("closing parenthesis",this.currToken[T.FIELDS.START_POS])},E.pseudo=function(){for(var e=this,t="",r=this.currToken;this.currToken&&this.currToken[T.FIELDS.TYPE]===m.colon;)t+=this.content(),this.position++;return this.currToken?this.currToken[T.FIELDS.TYPE]!==m.word?this.expected(["pseudo-class","pseudo-element"],this.currToken[T.FIELDS.START_POS]):void this.splitWord(!1,(function(n,o){t+=n,e.newNode(new h.default({value:t,source:N(r,e.currToken),sourceIndex:r[T.FIELDS.START_POS]})),o>1&&e.nextToken&&e.nextToken[T.FIELDS.TYPE]===m.openParenthesis&&e.error("Misplaced parenthesis.",{index:e.nextToken[T.FIELDS.START_POS]})})):this.expected(["pseudo-class","pseudo-element"],this.position-1)},E.space=function(){var e=this.content();0===this.position||this.prevToken[T.FIELDS.TYPE]===m.comma||this.prevToken[T.FIELDS.TYPE]===m.openParenthesis||this.current.nodes.every((function(e){return"comment"===e.type}))?(this.spaces=this.optionalSpace(e),this.position++):this.position===this.tokens.length-1||this.nextToken[T.FIELDS.TYPE]===m.comma||this.nextToken[T.FIELDS.TYPE]===m.closeParenthesis?(this.current.last.spaces.after=this.optionalSpace(e),this.position++):this.combinator()},E.string=function(){var e=this.currToken;this.newNode(new p.default({value:this.content(),source:D(e),sourceIndex:e[T.FIELDS.START_POS]})),this.position++},E.universal=function(e){var t=this.nextToken;if(t&&"|"===this.content(t))return this.position++,this.namespace();var r=this.currToken;this.newNode(new v.default({value:this.content(),source:D(r),sourceIndex:r[T.FIELDS.START_POS]}),e),this.position++},E.splitWord=function(e,t){for(var r=this,n=this.nextToken,s=this.content();n&&~[m.dollar,m.caret,m.equals,m.word].indexOf(n[T.FIELDS.TYPE]);){this.position++;var a=this.content();if(s+=a,a.lastIndexOf("\\")===a.length-1){var c=this.nextToken;c&&c[T.FIELDS.TYPE]===m.space&&(s+=this.requiredSpace(this.content(c)),this.position++)}n=this.nextToken}var p=(0,o.default)(s,".").filter((function(e){return"\\"!==s[e-1]})),h=(0,o.default)(s,"#").filter((function(e){return"\\"!==s[e-1]})),d=(0,o.default)(s,"#{");d.length&&(h=h.filter((function(e){return!~d.indexOf(e)})));var v=(0,b.default)((0,i.default)([0].concat(p,h)));v.forEach((function(n,o){var i,a=v[o+1]||s.length,c=s.slice(n,a);if(0===o&&t)return t.call(r,c,v.length);var d=r.currToken,y=d[T.FIELDS.START_POS]+v[o],g=x(d[1],d[2]+n,d[3],d[2]+(a-1));if(~p.indexOf(n)){var b={value:c.slice(1),source:g,sourceIndex:y};i=new u.default(A(b,"value"))}else if(~h.indexOf(n)){var m={value:c.slice(1),source:g,sourceIndex:y};i=new l.default(A(m,"value"))}else{var w={value:c,source:g,sourceIndex:y};A(w,"value"),i=new f.default(w)}r.newNode(i,e),e=null})),this.position++},E.word=function(e){var t=this.nextToken;return t&&"|"===this.content(t)?(this.position++,this.namespace()):this.splitWord(e)},E.loop=function(){for(;this.position<this.tokens.length;)this.parse(!0);return this.current._inferEndPosition(),this.root},E.parse=function(e){switch(this.currToken[T.FIELDS.TYPE]){case m.space:this.space();break;case m.comment:this.comment();break;case m.openParenthesis:this.parentheses();break;case m.closeParenthesis:e&&this.missingParenthesis();break;case m.openSquare:this.attribute();break;case m.dollar:case m.caret:case m.equals:case m.word:this.word();break;case m.colon:this.pseudo();break;case m.comma:this.comma();break;case m.asterisk:this.universal();break;case m.ampersand:this.nesting();break;case m.slash:case m.combinator:this.combinator();break;case m.str:this.string();break;case m.closeSquare:this.missingSquareBracket();case m.semicolon:this.missingBackslash();default:this.unexpected()}},E.expected=function(e,t,r){if(Array.isArray(e)){var n=e.pop();e=e.join(", ")+" or "+n}var o=/^[aeiou]/.test(e[0])?"an":"a";return r?this.error("Expected "+o+" "+e+', found "'+r+'" instead.',{index:t}):this.error("Expected "+o+" "+e+".",{index:t})},E.requiredSpace=function(e){return this.options.lossy?" ":e},E.optionalSpace=function(e){return this.options.lossy?"":e},E.lossySpace=function(e,t){return this.options.lossy?t?" ":"":e},E.parseParenthesisToken=function(e){var t=this.content(e);return e[T.FIELDS.TYPE]===m.space?this.requiredSpace(t):t},E.newNode=function(e,t){return t&&(/^ +$/.test(t)&&(this.options.lossy||(this.spaces=(this.spaces||"")+t),t=!0),e.namespace=t,A(e,"namespace")),this.spaces&&(e.spaces.before=this.spaces,this.spaces=""),this.current.append(e)},E.content=function(e){return void 0===e&&(e=this.currToken),this.css.slice(e[T.FIELDS.START_POS],e[T.FIELDS.END_POS])},E.locateNextMeaningfulToken=function(e){void 0===e&&(e=this.position+1);for(var t=e;t<this.tokens.length;){if(!O[this.tokens[t][T.FIELDS.TYPE]])return t;t++}return-1},t=e,(r=[{key:"currToken",get:function(){return this.tokens[this.position]}},{key:"nextToken",get:function(){return this.tokens[this.position+1]}},{key:"prevToken",get:function(){return this.tokens[this.position-1]}}])&&_(t.prototype,r),n&&_(t,n),e}();t.default=L,e.exports=t.default})),un=Pr((function(e,t){t.__esModule=!0,t.default=void 0;var r,n=(r=an)&&r.__esModule?r:{default:r};var o=function(){function e(e,t){this.func=e||function(){},this.funcRes=null,this.options=t}var t=e.prototype;return t._shouldUpdateSelector=function(e,t){return void 0===t&&(t={}),!1!==Er({},this.options,t).updateSelector&&"string"!=typeof e},t._isLossy=function(e){return void 0===e&&(e={}),!1===Er({},this.options,e).lossless},t._root=function(e,t){return void 0===t&&(t={}),new n.default(e,this._parseOptions(t)).root},t._parseOptions=function(e){return{lossy:this._isLossy(e)}},t._run=function(e,t){var r=this;return void 0===t&&(t={}),new Promise((function(n,o){try{var i=r._root(e,t);Promise.resolve(r.func(i)).then((function(n){var o=void 0;return r._shouldUpdateSelector(e,t)&&(o=i.toString(),e.selector=o),{transform:n,root:i,string:o}})).then(n,o)}catch(e){return void o(e)}}))},t._runSync=function(e,t){void 0===t&&(t={});var r=this._root(e,t),n=this.func(r);if(n&&"function"==typeof n.then)throw new Error("Selector processor returned a promise to a synchronous call.");var o=void 0;return t.updateSelector&&"string"!=typeof e&&(o=r.toString(),e.selector=o),{transform:n,root:r,string:o}},t.ast=function(e,t){return this._run(e,t).then((function(e){return e.root}))},t.astSync=function(e,t){return this._runSync(e,t).root},t.transform=function(e,t){return this._run(e,t).then((function(e){return e.transform}))},t.transformSync=function(e,t){return this._runSync(e,t).transform},t.process=function(e,t){return this._run(e,t).then((function(e){return e.string||e.root.toString()}))},t.processSync=function(e,t){var r=this._runSync(e,t);return r.string||r.root.toString()},e}();t.default=o,e.exports=t.default})),cn=Pr((function(e,t){t.__esModule=!0,t.universal=t.tag=t.string=t.selector=t.root=t.pseudo=t.nesting=t.id=t.comment=t.combinator=t.className=t.attribute=void 0;var r=d(Zr),n=d(Wr),o=d(tn),i=d(Vr),s=d(Hr),a=d(rn),u=d(zr),c=d(Rr),l=d(Fr),f=d(Kr),p=d($r),h=d(en);function d(e){return e&&e.__esModule?e:{default:e}}t.attribute=function(e){return new r.default(e)};t.className=function(e){return new n.default(e)};t.combinator=function(e){return new o.default(e)};t.comment=function(e){return new i.default(e)};t.id=function(e){return new s.default(e)};t.nesting=function(e){return new a.default(e)};t.pseudo=function(e){return new u.default(e)};t.root=function(e){return new c.default(e)};t.selector=function(e){return new l.default(e)};t.string=function(e){return new f.default(e)};t.tag=function(e){return new p.default(e)};t.universal=function(e){return new h.default(e)}})),ln=Pr((function(e,t){var r;t.__esModule=!0,t.isNode=o,t.isPseudoElement=b,t.isPseudoClass=function(e){return p(e)&&!b(e)},t.isContainer=function(e){return!(!o(e)||!e.walk)},t.isNamespace=function(e){return s(e)||y(e)},t.isUniversal=t.isTag=t.isString=t.isSelector=t.isRoot=t.isPseudo=t.isNesting=t.isIdentifier=t.isComment=t.isCombinator=t.isClassName=t.isAttribute=void 0;var n=((r={})[Cr.ATTRIBUTE]=!0,r[Cr.CLASS]=!0,r[Cr.COMBINATOR]=!0,r[Cr.COMMENT]=!0,r[Cr.ID]=!0,r[Cr.NESTING]=!0,r[Cr.PSEUDO]=!0,r[Cr.ROOT]=!0,r[Cr.SELECTOR]=!0,r[Cr.STRING]=!0,r[Cr.TAG]=!0,r[Cr.UNIVERSAL]=!0,r);function o(e){return"object"==typeof e&&n[e.type]}function i(e,t){return o(t)&&t.type===e}var s=i.bind(null,Cr.ATTRIBUTE);t.isAttribute=s;var a=i.bind(null,Cr.CLASS);t.isClassName=a;var u=i.bind(null,Cr.COMBINATOR);t.isCombinator=u;var c=i.bind(null,Cr.COMMENT);t.isComment=c;var l=i.bind(null,Cr.ID);t.isIdentifier=l;var f=i.bind(null,Cr.NESTING);t.isNesting=f;var p=i.bind(null,Cr.PSEUDO);t.isPseudo=p;var h=i.bind(null,Cr.ROOT);t.isRoot=h;var d=i.bind(null,Cr.SELECTOR);t.isSelector=d;var v=i.bind(null,Cr.STRING);t.isString=v;var y=i.bind(null,Cr.TAG);t.isTag=y;var g=i.bind(null,Cr.UNIVERSAL);function b(e){return p(e)&&e.value&&(e.value.startsWith("::")||":before"===e.value.toLowerCase()||":after"===e.value.toLowerCase())}t.isUniversal=g})),fn=Pr((function(e,t){t.__esModule=!0,Object.keys(Cr).forEach((function(e){"default"!==e&&"__esModule"!==e&&(t[e]=Cr[e])})),Object.keys(cn).forEach((function(e){"default"!==e&&"__esModule"!==e&&(t[e]=cn[e])})),Object.keys(ln).forEach((function(e){"default"!==e&&"__esModule"!==e&&(t[e]=ln[e])}))})),pn=Pr((function(e,t){t.__esModule=!0,t.default=void 0;var r,n=(r=un)&&r.__esModule?r:{default:r},o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}(fn);var i=function(e){return new n.default(e)};Er(i,o),delete i.__esModule;var s=i;t.default=s,e.exports=t.default})),hn=_r(pn),dn=Element.prototype.matches||Element.prototype.msMatchesSelector;var vn=function(e){this._queue=[e],this.next()};function yn(e){for(var t=[],r=e.length-1;r>=0;r--){var n=e[r];if("combinator"===n.type)break;t.push(n)}return t.reverse()}function gn(e){if("function"!=typeof e.assignedElements&&e.assignedSlot&&e.assignedSlot.parentElement)return e.assignedSlot.parentElement;if(e.parentElement)return e.parentElement;var t=e.getRootNode();return t!==document?t.host:void 0}function bn(e,t){for(var r=gn(e);r;){if(mn(r,{nodes:t}))return r;r=gn(r)}}function Tn(e,t){for(var r=e.previousElementSibling;r;){if(mn(r,{nodes:t}))return r;r=r.previousElementSibling}}function mn(e,t){for(var r=t.nodes,n=r.length-1;n>=0;n--){var o=r[n];if("id"===o.type){if(e.id!==o.value)return!1}else if("class"===o.type){if(!e.classList.contains(o.value))return!1}else if("tag"===o.type){if(e.tagName.toLowerCase()!==o.value.toLowerCase())return!1}else if("pseudo"===o.type||"attribute"===o.type){if(!dn.call(e,o.sourceCode))return!1}else if("combinator"===o.type)if(" "===o.value){var i=yn(r.slice(0,n)),s=bn(e,i);if(!s)return!1;e=s,n-=i.length}else if(">"===o.value){var a=yn(r.slice(0,n)),u=gn(e);if(!u||!mn(u,{nodes:a}))return!1;e=u,n-=1}else if("+"===o.value){var c=yn(r.slice(0,n)),l=e.previousElementSibling;if(!l||!mn(l,{nodes:c}))return!1;n-=c.length}else if("~"===o.value){var f=yn(r.slice(0,n));if(!Tn(e,f))return!1;n-=f.length}}return!0}function wn(e,t){for(var r=0,n=e.nodes;r<n.length;r+=1){var o=n[r];if("pseudo"===o.type||"attribute"===o.type){for(var i=t.split("\n"),s=o.source,a=s.start,u=s.end,c="",l=a.line-1;l<u.line;l++){var f=i[l],p=l===a.line-1?a.column:0,h=l===u.line-1?u.column:f.length;c+=f.substring(p,h)}o.sourceCode=("pseudo"===o.type?":":"[")+c}o.nodes&&wn(o,t)}}function En(e){if(11!==e.nodeType&&9!==e.nodeType)throw new TypeError("Provided context must be of type Document or ShadowRoot")}function Sn(e){var t=hn().astSync(e);return wn(t,e),t}function _n(e,t,r){var n=Sn(e);return function(e,t,r){for(var n,o=r?[]:null;n=e.next();)for(var i=0,s=t.nodes;i<s.length;i+=1)if(mn(n,s[i])){if(!r)return n;o.push(n)}return o}(new vn(t),n,r)}function Pn(e,t){return void 0===t&&(t=document),_n(e,t,!1)}function On(e,t){return void 0===t&&(t=document),_n(e,t,!0)}function kn(e,t){!function(e){if(!e||1!==e.nodeType)throw new TypeError("Provided context must be of type Element")}(t);for(var r=0,n=Sn(e).nodes;r<n.length;r+=1){if(mn(t,n[r]))return!0}return!1}vn.prototype.next=function(){var e=this._queue.pop();if(e){var t=function(e){if(e.documentElement)return[e.documentElement];if(e.shadowRoot)return e.shadowRoot.children;if("function"==typeof e.assignedElements){var t=e.assignedElements();return t.length?t:e.children}return e.children}(e);if(t)for(var r=t.length-1;r>=0;r--)this._queue.push(t[r])}return e};const In=pt(Element.prototype,"assignedSlot").get,xn=pt(DocumentFragment.prototype,"children").get;function Dn(e){return Vt(e)?e.assignedElements({flatten:!0}):qt(e)?st(xn.call(Gt(e))):st(z.call(e))}var Nn=Mt([[V,function(){return rr(this)}],[Q,function(){return fr(this)}],[X,function(){return null}],[z,function(){return function(e){const t=ut(er.prototype);return Ft(t,Zt,e),Dt.call(e,((e,r)=>{lt(t,r,{value:e,enumerable:!0,configurable:!0})})),t}(Dn(this))}],[U,function(){return Dn(this).length}],[B,function(){return Dn(this)[0]}],[Y,function(){const e=Dn(this);return e[e.length-1]}],[In,function(){return null}],[R,function(e){return Pn(e,this)}],[F,function(e){return Yt(On(e,this))}],[A,function(e){const t=function(e,t){return void 0===t&&(t=document),function(e,t){for(var r,n=[],o=function(){var e=r.classList,o=t.every((function(t){return e.contains(t)}));o&&n.push(r)};r=e.next();)o();return n}(new vn(t),e.trim().split(/\s+/))}(e,this);return Yt(t)}],[D,function(e){const t=function(e,t){return void 0===t&&(t=document),function(e,t){for(var r,n=[],o=t.toLowerCase();r=e.next();)"*"!==t&&o!==r.tagName.toLowerCase()||n.push(r);return n}(new vn(t),e)}(e,this);return Yt(t)}],[N,function(e,t){const r=function(e,t,r){return void 0===r&&(r=document),function(e,t,r){var n,o=[];if(!t)return o;for(;n=e.next();){var i=n.outerHTML.toUpperCase().indexOf(n.tagName.toUpperCase()),s=r===n.outerHTML.substr(i,n.tagName.length)||"*"===r,a=n.namespaceURI===t||"*"===t;s&&a&&o.push(n)}return o}(new vn(r),e,t)}(e,t,this);return Yt(r)}],[L,function(e){return kn(e,this)}],[C,function(e){return function(e,t){for(var r=0,n=Sn(e).nodes;r<n.length;r+=1){var o=n[r];if(mn(t,o))return t;var i=bn(t,o.nodes);if(i)return i}return null}(e,this)}]]);const{attachShadow:An}=Element.prototype;function Ln(e){yr(e)}function Cn(){const e=new Map;let t=Array.from(document.querySelectorAll("*")).filter((e=>qt(e)));for(;t.length>0;){const r=t.shift();if(!e.has(r)){const n=Gt(r);if(n){e.set(r,n);const o=Array.from(n.querySelectorAll("*")).filter((e=>qt(e)));t=t.concat(o)}}}return e}lt(Element.prototype,"attachShadow",{value:function(e){const t=An.call(this,e);return Reflect.ownKeys(Mn).forEach((e=>k.call(t,e,Ln))),t},enumerable:!0,writable:!0,configurable:!0});const Mn=ut(null);function Rn(e){Mn[e]||(Mn[e]=1,Cn().forEach((t=>{k.call(t,e,Ln)})))}const Fn=pt(Document.prototype,"activeElement").get;var jn=Mt([[Fn,function(){let e=Fn.call(this);for(;e;){const t=Gt(e);if(!t)return e;e=t.activeElement}return e}],[re,function(e){return function(e,t){return void 0===t&&(t=document),En(t),function(e,t){for(var r;r=e.next();)if(r.id===t)return r;return null}(new vn(t),e)}(e,this)}],[ne,function(e){return function(e,t){return void 0===t&&(t=document),En(t),function(e,t){for(var r,n=[];r=e.next();)r.name===t&&n.push(r);return n}(new vn(t),e)}(e,this)}],[ee,function(e){return Pn(e,this)}],[te,function(e){return On(e,this)}]]);const{addEventListener:qn,dispatchEvent:Gn}=EventTarget.prototype;var Un=Mt([[qn,function(...e){const[t]=e;return Rn(t),qn.apply(this,e)}]]);const{createElement:Bn}=document,{prepend:Yn,append:Wn,appendChild:Vn,insertBefore:Hn,setAttribute:Qn}=Element.prototype,$n=Reflect.getOwnPropertyDescriptor(Document.prototype,"body").get;const Kn=Object.create(Object.prototype,{$oasisExternalDefineProperty$:{value:function(e,t){Reflect.defineProperty(window,e,t)}},$oasisExternalGetProperty$:{value:function(e){return window[e]}}});function zn(e){return e instanceof HTMLScriptElement}const Xn=function(e){const t=new Map;return e.forEach((e=>{e.forEach(((e,r)=>{t.set(r,e)}))})),t}([Mt([[Vn,function(...e){const[t]=e;return zn(t)?(so(t),t):Vn.apply(this,e)}],[Hn,function(...e){const[t]=e;return zn(t)?(so(t),t):Hn.apply(this,e)}],[Wn,function(...e){const[t]=e;Ct(t)||!zn(t)?Wn.apply(this,e):so(t)}],[Yn,function(...e){const[t]=e;Ct(t)||!zn(t)?Yn.apply(this,e):so(t)}]]),$t,Kt,Jt,Nn,gr,jn,Un]),Jn=function(e,t,r){!function(e,t){if(!e)throw new De("Missing global object shape.");if(!t)throw new De("Missing global object virtualization target.")}(e,t);const n=Qe({__proto__:null,keepAlive:!1},r),{distortionCallback:o,endowments:i={},keepAlive:s,support:a,instrumentation:u}=n,c=nt(),l=function(e){return ze(et,e,Ge)}(c).window,{document:f}=l,p=it,h=function(e){if("function"!=typeof e)throw new le("Missing evaluator function.");return e(fe)()}(l.eval),d=je(t),v=new we({blueConnector:p,distortionCallback:o,redConnector:h,support:a,instrumentation:u});return v.link("window"),function(e,t){for(let r=0,n=Ie.length;r<n;r+=1){const n=Ie[r],o=t[n];o&&(e.link(n),o.prototype&&e.link(n,"prototype"))}}(v,t),function(e,t){t.EventTarget&&t instanceof EventTarget&&(e.link("document"),e.link("__proto__"),e.link("__proto__","__proto__"),e.link("__proto__","__proto__","__proto__"))}(v,t),qe(v,d,function(...e){const t={};for(let r=0,n=e.length;r<n;r+=1){const n=e[r];n&&xe(t,n)}return t}(e,i)),!0!==s?ot(c):(ze(Ye,f,Ge),function(e){ze(Ue,e,Ge)}(f)),v}(window,window,{distortionCallback:e=>Xn.get(e)||e,endowments:Kn,keepAlive:!0}),Zn=document.querySelector("iframe");if(At(Zn))throw new Error("Invalid Initialization");const eo=Zn.contentWindow.document,to=$n.call(eo),ro=Reflect.getOwnPropertyDescriptor(HTMLIFrameElement.prototype,"contentWindow"),no=ro.get;ro.get=function(){return this===Zn?null:no.call(this)},Reflect.defineProperty(HTMLIFrameElement.prototype,"contentWindow",ro);const oo=Reflect.getOwnPropertyDescriptor(HTMLIFrameElement.prototype,"contentDocument"),io=oo.get;function so(e){const{attributes:t,textContent:r}=e,n=Bn.call(eo,"script");for(let e=0,r=t.length;e<r;e+=1){const r=t.item(e);At(r)||0===r.name.indexOf("on")||Qn.call(n,r.name,r.value)}""!==lo&&t.getNamedItem("nonce")&&Qn.call(n,"nonce",lo),qn.call(n,"error",(t=>{Gn.call(e,new ErrorEvent("error",t))})),qn.call(n,"load",(()=>Gn.call(e,new Event("load")))),qn.call(eo,"securitypolicyviolation",(t=>{Gn.call(e,new SecurityPolicyViolationEvent("securitypolicyviolation",t))})),r&&(n.textContent=r),Vn.call(to,n)}function ao(e){return At(e)||Nt(e)?[]:e.split(",").map((e=>e.trim())).filter((e=>co.test(e)))}function uo(e){e.evaluate||(e.evaluate=!0,ao(e.exportedGlobalNames).forEach((e=>{Jn.evaluate(`\n 'use strict';\n const key = \`${e}\`;\n $oasisExternalDefineProperty$(key, {\n get() { return window[key]; },\n enumerable: true,\n configurable: true,\n });\n `)})),function(e){e.forEach((e=>{Jn.evaluate(`\n 'use strict';\n const key = \`${e}\`;\n Object.defineProperty(window, key, {\n get() { return $oasisExternalGetProperty$(key); },\n enumerable: true,\n configurable: true,\n });\n `)}))}(ao(e.importedGlobalNames)),so(e))}oo.get=function(){return this===Zn?null:io.call(this)},Reflect.defineProperty(HTMLIFrameElement.prototype,"contentDocument",oo),Jn.evaluate("\n // This initialization will prevent any of these APIs to be polyfilled\n // on the blue realm that can affect this sandbox.\n [\n HTMLElement.prototype,\n Element.prototype,\n Node.prototype,\n Event.prototype,\n Document.prototype,\n EventTarget.prototype,\n MutationObserver.prototype,\n HTMLCollection.prototype,\n NodeList.prototype,\n ShadowRoot.prototype,\n HTMLSlotElement.prototype,\n Text.prototype,\n ].forEach(o => delete o.$);\n");const co=/^\S+$/;let lo="";class fo extends HTMLElement{static get observedAttributes(){return["nonce"]}constructor(){super();const e=document.createElement("slot");qn.call(e,"slotchange",(()=>uo(this)),{once:!0}),this.attachShadow({mode:"open"}).appendChild(e)}get exportedGlobalNames(){return this.getAttribute("exported-global-names")}set exportedGlobalNames(e){At(e)||Nt(e)||""===e?this.removeAttribute("exported-global-names"):this.setAttribute("exported-global-names",e)}get importedGlobalNames(){return this.getAttribute("imported-global-names")}set importedGlobalNames(e){At(e)||Nt(e)||""===e?this.removeAttribute("imported-global-names"):this.setAttribute("imported-global-names",e)}get src(){var e;return null!==(e=this.getAttribute("src"))&&void 0!==e?e:""}set src(e){At(e)||Nt(e)||""===e?this.removeAttribute("src"):this.setAttribute("src",e)}attributeChangedCallback(e,t,r){"nonce"===e&&""!==r&&(lo=r)}connectedCallback(){this.setAttribute("hidden","true");const{src:e}=this;(e&&e.length||this.textContent)&&uo(this)}}customElements.define("x-oasis-script",fo)}));
| //# sourceMappingURL=oasis.min.js.map
|
|