@getvitops/generator 8.1.0 → 8.2.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,10 @@
1
- var e=Object.defineProperty,t=Object.defineProperties,n=Object.getOwnPropertyDescriptors,r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable,o=(t,n,r)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r,s=(e,t)=>{for(var n in t||={})i.call(t,n)&&o(e,n,t[n]);if(r)for(var n of r(t))a.call(t,n)&&o(e,n,t[n]);return e},c=(e,r)=>t(e,n(r)),l=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())});const u=Math.min,d=Math.max,f=Math.round,p=Math.floor,m=e=>({x:e,y:e});function h(e,t){return typeof e==`function`?e(t):e}function g(e){return s({top:0,right:0,bottom:0,left:0},e)}function ee(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:g(e)}function _(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function v(e,t){return l(this,null,function*(){var n;t===void 0&&(t={});let{x:r,y:i,platform:a,rects:o,elements:s,strategy:c}=e,{boundary:l=`clippingAncestors`,rootBoundary:u=`viewport`,elementContext:d=`floating`,altBoundary:f=!1,padding:p=0}=h(t,e),m=ee(p),g=s[f?d===`floating`?`reference`:`floating`:d],v=_(yield a.getClippingRect({element:(n=yield a.isElement==null?void 0:a.isElement(g))==null||n?g:g.contextElement||(yield a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:l,rootBoundary:u,strategy:c})),y=d===`floating`?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,b=yield a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating),x=(yield a.isElement==null?void 0:a.isElement(b))&&(yield a.getScale==null?void 0:a.getScale(b))||{x:1,y:1},S=_(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:b,strategy:c}):y);return{top:(v.top-S.top+m.top)/x.y,bottom:(S.bottom-v.bottom+m.bottom)/x.y,left:(v.left-S.left+m.left)/x.x,right:(S.right-v.right+m.right)/x.x}})}function y(){return typeof window<`u`}function b(e){return te(e)?(e.nodeName||``).toLowerCase():`#document`}function x(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function S(e){return((te(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function te(e){return y()?e instanceof Node||e instanceof x(e).Node:!1}function C(e){return y()?e instanceof Element||e instanceof x(e).Element:!1}function w(e){return y()?e instanceof HTMLElement||e instanceof x(e).HTMLElement:!1}function ne(e){return!y()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof x(e).ShadowRoot}const re=new Set([`inline`,`contents`]);function ie(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=E(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!re.has(i)}const ae=new Set([`table`,`td`,`th`]);function oe(e){return ae.has(b(e))}const se=[`:popover-open`,`:modal`];function ce(e){return se.some(t=>{try{return e.matches(t)}catch{return!1}})}const le=[`transform`,`translate`,`scale`,`rotate`,`perspective`],ue=[`transform`,`translate`,`scale`,`rotate`,`perspective`,`filter`],de=[`paint`,`layout`,`strict`,`content`];function fe(e){let t=me(),n=C(e)?E(e):e;return le.some(e=>n[e]?n[e]!==`none`:!1)||(n.containerType?n.containerType!==`normal`:!1)||!t&&(n.backdropFilter?n.backdropFilter!==`none`:!1)||!t&&(n.filter?n.filter!==`none`:!1)||ue.some(e=>(n.willChange||``).includes(e))||de.some(e=>(n.contain||``).includes(e))}function pe(e){let t=D(e);for(;w(t)&&!T(t);){if(fe(t))return t;if(ce(t))return null;t=D(t)}return null}function me(){return typeof CSS>`u`||!CSS.supports?!1:CSS.supports(`-webkit-backdrop-filter`,`none`)}const he=new Set([`html`,`body`,`#document`]);function T(e){return he.has(b(e))}function E(e){return x(e).getComputedStyle(e)}function ge(e){return C(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function D(e){if(b(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||ne(e)&&e.host||S(e);return ne(t)?t.host:t}function _e(e){let t=D(e);return T(t)?e.ownerDocument?e.ownerDocument.body:e.body:w(t)&&ie(t)?t:_e(t)}function O(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=_e(e),i=r===e.ownerDocument?.body,a=x(r);if(i){let e=ve(a);return t.concat(a,a.visualViewport||[],ie(r)?r:[],e&&n?O(e):[])}return t.concat(r,O(r,[],n))}function ve(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ye(e){let t=E(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=w(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=f(n)!==a||f(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function be(e){return C(e)?e:e.contextElement}function k(e){let t=be(e);if(!w(t))return m(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=ye(t),o=(a?f(n.width):n.width)/r,s=(a?f(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}const xe=m(0);function Se(e){let t=x(e);return!me()||!t.visualViewport?xe:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ce(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==x(e)?!1:t}function A(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=be(e),o=m(1);t&&(r?C(r)&&(o=k(r)):o=k(e));let s=Ce(a,n,r)?Se(a):m(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=x(a),t=r&&C(r)?x(r):r,n=e,i=ve(n);for(;i&&r&&t!==n;){let e=k(i),t=i.getBoundingClientRect(),r=E(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=x(i),i=ve(n)}}return _({width:u,height:d,x:c,y:l})}function we(e,t){let n=ge(e).scrollLeft;return t?t.left+n:A(S(e)).left+n}function Te(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-we(e,n),y:n.top+t.scrollTop}}function Ee(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=S(r),s=t?ce(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=m(1),u=m(0),d=w(r);if((d||!d&&!a)&&((b(r)!==`body`||ie(o))&&(c=ge(r)),w(r))){let e=A(r);l=k(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Te(o,c):m(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function De(e){return Array.from(e.getClientRects())}function Oe(e){let t=S(e),n=ge(e),r=e.ownerDocument.body,i=d(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=d(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+we(e),s=-n.scrollTop;return E(r).direction===`rtl`&&(o+=d(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}function ke(e,t){let n=x(e),r=S(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=me();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=we(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=25&&(a-=o)}else l<=25&&(a+=l);return{width:a,height:o,x:s,y:c}}const Ae=new Set([`absolute`,`fixed`]);function je(e,t){let n=A(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=w(e)?k(e):m(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Me(e,t,n){let r;if(t===`viewport`)r=ke(e,n);else if(t===`document`)r=Oe(S(e));else if(C(t))r=je(t,n);else{let n=Se(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return _(r)}function Ne(e,t){let n=D(e);return n===t||!C(n)||T(n)?!1:E(n).position===`fixed`||Ne(n,t)}function Pe(e,t){let n=t.get(e);if(n)return n;let r=O(e,[],!1).filter(e=>C(e)&&b(e)!==`body`),i=null,a=E(e).position===`fixed`,o=a?D(e):e;for(;C(o)&&!T(o);){let t=E(o),n=fe(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&Ae.has(i.position)||ie(o)&&!n&&Ne(e,o))?r=r.filter(e=>e!==o):i=t,o=D(o)}return t.set(e,r),r}function Fe(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?ce(t)?[]:Pe(t,this._c):[].concat(n),r],o=a[0],s=a.reduce((e,n)=>{let r=Me(t,n,i);return e.top=d(r.top,e.top),e.right=u(r.right,e.right),e.bottom=u(r.bottom,e.bottom),e.left=d(r.left,e.left),e},Me(t,o,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function Ie(e){let{width:t,height:n}=ye(e);return{width:t,height:n}}function Le(e,t,n){let r=w(t),i=S(t),a=n===`fixed`,o=A(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=m(0);function l(){c.x=we(i)}if(r||!r&&!a)if((b(t)!==`body`||ie(i))&&(s=ge(t)),r){let e=A(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?Te(i,s):m(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function Re(e){return E(e).position===`static`}function ze(e,t){if(!w(e)||E(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return S(e)===n&&(n=n.ownerDocument.body),n}function Be(e,t){let n=x(e);if(ce(e))return n;if(!w(e)){let t=D(e);for(;t&&!T(t);){if(C(t)&&!Re(t))return t;t=D(t)}return n}let r=ze(e,t);for(;r&&oe(r)&&Re(r);)r=ze(r,t);return r&&T(r)&&Re(r)&&!fe(r)?n:r||pe(e)||n}const Ve=function(e){return l(this,null,function*(){let t=this.getOffsetParent||Be,n=this.getDimensions,r=yield n(e.floating);return{reference:Le(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function He(e){return E(e).direction===`rtl`}const j={convertOffsetParentRelativeRectToViewportRelativeRect:Ee,getDocumentElement:S,getClippingRect:Fe,getOffsetParent:Be,getElementRects:Ve,getClientRects:De,getDimensions:Ie,getScale:k,isElement:C,isRTL:He};function Ue(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function We(e,t){let n=null,r,i=S(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(l,f){l===void 0&&(l=!1),f===void 0&&(f=1),a();let m=e.getBoundingClientRect(),{left:h,top:g,width:ee,height:_}=m;if(l||t(),!ee||!_)return;let v=p(g),y=p(i.clientWidth-(h+ee)),b=p(i.clientHeight-(g+_)),x=p(h),S={rootMargin:-v+`px `+-y+`px `+-b+`px `+-x+`px`,threshold:d(0,u(1,f))||1},te=!0;function C(t){let n=t[0].intersectionRatio;if(n!==f){if(!te)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!Ue(m,e.getBoundingClientRect())&&o(),te=!1}try{n=new IntersectionObserver(C,c(s({},S),{root:i.ownerDocument}))}catch{n=new IntersectionObserver(C,S)}n.observe(e)}return o(!0),a}function Ge(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=be(e),u=i||a?[...l?O(l):[],...O(t)]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?We(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),p.observe(t));let m,h=c?A(e):null;c&&g();function g(){let t=A(e);h&&!Ue(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}const Ke=v;let M=null;var qe=class e{static createItem(e){return{prev:null,next:null,data:e}}constructor(){this.head=null,this.tail=null,this.cursor=null}createItem(t){return e.createItem(t)}allocateCursor(e,t){let n;return M===null?n={prev:e,next:t,cursor:this.cursor}:(n=M,M=M.cursor,n.prev=e,n.next=t,n.cursor=this.cursor),this.cursor=n,n}releaseCursor(){let{cursor:e}=this;this.cursor=e.cursor,e.prev=null,e.next=null,e.cursor=M,M=e}updateCursors(e,t,n,r){let{cursor:i}=this;for(;i!==null;)i.prev===e&&(i.prev=t),i.next===n&&(i.next=r),i=i.cursor}*[Symbol.iterator](){for(let e=this.head;e!==null;e=e.next)yield e.data}get size(){let e=0;for(let t=this.head;t!==null;t=t.next)e++;return e}get isEmpty(){return this.head===null}get first(){return this.head&&this.head.data}get last(){return this.tail&&this.tail.data}fromArray(t){let n=null;this.head=null;for(let r of t){let t=e.createItem(r);n===null?this.head=t:n.next=t,t.prev=n,n=t}return this.tail=n,this}toArray(){return[...this]}toJSON(){return[...this]}forEach(e,t=this){let n=this.allocateCursor(null,this.head);for(;n.next!==null;){let r=n.next;n.next=r.next,e.call(t,r.data,r,this)}this.releaseCursor()}forEachRight(e,t=this){let n=this.allocateCursor(this.tail,null);for(;n.prev!==null;){let r=n.prev;n.prev=r.prev,e.call(t,r.data,r,this)}this.releaseCursor()}reduce(e,t,n=this){let r=this.allocateCursor(null,this.head),i=t,a;for(;r.next!==null;)a=r.next,r.next=a.next,i=e.call(n,i,a.data,a,this);return this.releaseCursor(),i}reduceRight(e,t,n=this){let r=this.allocateCursor(this.tail,null),i=t,a;for(;r.prev!==null;)a=r.prev,r.prev=a.prev,i=e.call(n,i,a.data,a,this);return this.releaseCursor(),i}some(e,t=this){for(let n=this.head;n!==null;n=n.next)if(e.call(t,n.data,n,this))return!0;return!1}map(t,n=this){let r=new e;for(let e=this.head;e!==null;e=e.next)r.appendData(t.call(n,e.data,e,this));return r}filter(t,n=this){let r=new e;for(let e=this.head;e!==null;e=e.next)t.call(n,e.data,e,this)&&r.appendData(e.data);return r}nextUntil(e,t,n=this){if(e===null)return;let r=this.allocateCursor(null,e);for(;r.next!==null;){let e=r.next;if(r.next=e.next,t.call(n,e.data,e,this))break}this.releaseCursor()}prevUntil(e,t,n=this){if(e===null)return;let r=this.allocateCursor(e,null);for(;r.prev!==null;){let e=r.prev;if(r.prev=e.prev,t.call(n,e.data,e,this))break}this.releaseCursor()}clear(){this.head=null,this.tail=null}copy(){let t=new e;for(let e of this)t.appendData(e);return t}prepend(e){return this.updateCursors(null,e,this.head,e),this.head===null?this.tail=e:(this.head.prev=e,e.next=this.head),this.head=e,this}prependData(t){return this.prepend(e.createItem(t))}append(e){return this.insert(e)}appendData(t){return this.insert(e.createItem(t))}insert(e,t=null){if(t!==null)if(this.updateCursors(t.prev,e,t,e),t.prev===null){if(this.head!==t)throw Error(`before doesn't belong to list`);this.head=e,t.prev=e,e.next=t,this.updateCursors(null,e)}else t.prev.next=e,e.prev=t.prev,t.prev=e,e.next=t;else this.updateCursors(this.tail,e,null,e),this.tail===null?this.head=e:(this.tail.next=e,e.prev=this.tail),this.tail=e;return this}insertData(t,n){return this.insert(e.createItem(t),n)}remove(e){if(this.updateCursors(e,e.prev,e,e.next),e.prev!==null)e.prev.next=e.next;else{if(this.head!==e)throw Error(`item doesn't belong to list`);this.head=e.next}if(e.next!==null)e.next.prev=e.prev;else{if(this.tail!==e)throw Error(`item doesn't belong to list`);this.tail=e.prev}return e.prev=null,e.next=null,e}push(t){this.insert(e.createItem(t))}pop(){return this.tail===null?null:this.remove(this.tail)}unshift(t){this.prepend(e.createItem(t))}shift(){return this.head===null?null:this.remove(this.head)}prependList(e){return this.insertList(e,this.head)}appendList(e){return this.insertList(e)}insertList(e,t){return e.head===null?this:(t==null?(this.updateCursors(this.tail,e.tail,null,e.head),this.tail===null?this.head=e.head:(this.tail.next=e.head,e.head.prev=this.tail),this.tail=e.tail):(this.updateCursors(t.prev,e.tail,t,e.head),t.prev===null?this.head=e.head:(t.prev.next=e.head,e.head.prev=t.prev),t.prev=e.tail,e.tail.next=t),e.head=null,e.tail=null,this)}replace(e,t){`head`in t?this.insertList(t,e):this.insert(t,e),this.remove(e)}};function Je(e){let t={};for(let n of Object.keys(e)){let r=e[n];r&&(Array.isArray(r)||r instanceof qe?r=r.map(Je):r.constructor===Object&&(r=Je(r))),t[n]=r}return t}function N(e){return e>=48&&e<=57}function P(e){return N(e)||e>=65&&e<=70||e>=97&&e<=102}function Ye(e){return e>=65&&e<=90}function Xe(e){return e>=97&&e<=122}function Ze(e){return Ye(e)||Xe(e)}function Qe(e){return e>=128}function $e(e){return Ze(e)||Qe(e)||e===95}function et(e){return $e(e)||N(e)||e===45}function tt(e){return e>=0&&e<=8||e===11||e>=14&&e<=31||e===127}function nt(e){return e===10||e===13||e===12}function F(e){return nt(e)||e===32||e===9}function I(e,t){return!(e!==92||nt(t)||t===0)}function rt(e,t,n){return e===45?$e(t)||t===45||I(t,n):$e(e)?!0:e===92?I(e,t):!1}function it(e,t,n){return e===43||e===45?N(t)?2:t===46&&N(n)?3:0:e===46?N(t)?2:0:+!!N(e)}function at(e){return+(e===65279||e===65534)}const ot=Array(128);for(let e=0;e<ot.length;e++)ot[e]=F(e)&&130||N(e)&&131||$e(e)&&132||tt(e)&&133||e||128;function st(e){return e<128?ot[e]:132}function L(e,t){return t<e.length?e.charCodeAt(t):0}function ct(e,t,n){return n===13&&L(e,t+1)===10?2:1}function lt(e,t,n){let r=e.charCodeAt(t);return Ye(r)&&(r|=32),r===n}function ut(e,t,n,r){if(n-t!==r.length||t<0||n>e.length)return!1;for(let i=t;i<n;i++){let n=r.charCodeAt(i-t),a=e.charCodeAt(i);if(Ye(a)&&(a|=32),a!==n)return!1}return!0}function dt(e,t){for(;t>=0&&F(e.charCodeAt(t));t--);return t+1}function ft(e,t){for(;t<e.length&&F(e.charCodeAt(t));t++);return t}function pt(e,t){for(;t<e.length&&N(e.charCodeAt(t));t++);return t}function R(e,t){if(t+=2,P(L(e,t-1))){for(let n=Math.min(e.length,t+5);t<n&&P(L(e,t));t++);let n=L(e,t);F(n)&&(t+=ct(e,t,n))}return t}function mt(e,t){for(;t<e.length;t++){let n=e.charCodeAt(t);if(!et(n)){if(I(n,L(e,t+1))){t=R(e,t)-1;continue}break}}return t}function ht(e,t){let n=e.charCodeAt(t);if((n===43||n===45)&&(n=e.charCodeAt(t+=1)),N(n)&&(t=pt(e,t+1),n=e.charCodeAt(t)),n===46&&N(e.charCodeAt(t+1))&&(t+=2,t=pt(e,t)),lt(e,t,101)){let r=0;n=e.charCodeAt(t+1),(n===45||n===43)&&(r=1,n=e.charCodeAt(t+2)),N(n)&&(t=pt(e,t+1+r+1))}return t}function gt(e,t){for(;t<e.length;t++){let n=e.charCodeAt(t);if(n===41){t++;break}I(n,L(e,t+1))&&(t=R(e,t))}return t}function _t(e){if(e.length===1&&!P(e.charCodeAt(0)))return e[0];let t=parseInt(e,16);return(t===0||t>=55296&&t<=57343||t>1114111)&&(t=65533),String.fromCodePoint(t)}const vt=`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.comment-token`.split(`.`);function yt(e=null,t){return e===null||e.length<t?new Uint32Array(Math.max(t+1024,16384)):e}function bt(e){let t=e.source,n=t.length,r=t.length>0?at(t.charCodeAt(0)):0,i=yt(e.lines,n),a=yt(e.columns,n),o=e.startLine,s=e.startColumn;for(let e=r;e<n;e++){let r=t.charCodeAt(e);i[e]=o,a[e]=s++,(r===10||r===13||r===12)&&(r===13&&e+1<n&&t.charCodeAt(e+1)===10&&(e++,i[e]=o,a[e]=s),o++,s=1)}i[n]=o,a[n]=s,e.lines=i,e.columns=a,e.computed=!0}var xt=class{constructor(e,t,n,r){this.setSource(e,t,n,r),this.lines=null,this.columns=null}setSource(e=``,t=0,n=1,r=1){this.source=e,this.startOffset=t,this.startLine=n,this.startColumn=r,this.computed=!1}getLocation(e,t){return this.computed||bt(this),{source:t,offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]}}getLocationRange(e,t,n){return this.computed||bt(this),{source:n,start:{offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]},end:{offset:this.startOffset+t,line:this.lines[t],column:this.columns[t]}}}};const z=16777215,B=new Uint8Array(32);B[2]=22,B[21]=22,B[19]=20,B[23]=24;function St(e){return B[e]!==0}var Ct=class{constructor(e,t){this.setSource(e,t)}reset(){this.eof=!1,this.tokenIndex=-1,this.tokenType=0,this.tokenStart=this.firstCharOffset,this.tokenEnd=this.firstCharOffset}setSource(e=``,t=()=>{}){e=String(e||``);let n=e.length,r=yt(this.offsetAndType,e.length+1),i=yt(this.balance,e.length+1),a=0,o=-1,s=0,c=e.length;this.offsetAndType=null,this.balance=null,i.fill(0),t(e,(e,t,n)=>{let l=a++;if(r[l]=e<<24|n,o===-1&&(o=t),i[l]=c,e===s){let e=i[c];i[c]=l,c=e,s=B[r[e]>>24]}else St(e)&&(c=l,s=B[e])}),r[a]=0|n,i[a]=a;for(let e=0;e<a;e++){let t=i[e];if(t<=e){let n=i[t];n!==e&&(i[e]=n)}else t>a&&(i[e]=a)}this.source=e,this.firstCharOffset=o===-1?0:o,this.tokenCount=a,this.offsetAndType=r,this.balance=i,this.reset(),this.next()}lookupType(e){return e+=this.tokenIndex,e<this.tokenCount?this.offsetAndType[e]>>24:0}lookupTypeNonSC(e){for(let t=this.tokenIndex;t<this.tokenCount;t++){let n=this.offsetAndType[t]>>24;if(n!==13&&n!==25&&e--===0)return n}return 0}lookupOffset(e){return e+=this.tokenIndex,e<this.tokenCount?this.offsetAndType[e-1]&z:this.source.length}lookupOffsetNonSC(e){for(let t=this.tokenIndex;t<this.tokenCount;t++){let n=this.offsetAndType[t]>>24;if(n!==13&&n!==25&&e--===0)return t-this.tokenIndex}return 0}lookupValue(e,t){return e+=this.tokenIndex,e<this.tokenCount?ut(this.source,this.offsetAndType[e-1]&z,this.offsetAndType[e]&z,t):!1}getTokenStart(e){return e===this.tokenIndex?this.tokenStart:e>0?e<this.tokenCount?this.offsetAndType[e-1]&z:this.offsetAndType[this.tokenCount]&z:this.firstCharOffset}substrToCursor(e){return this.source.substring(e,this.tokenStart)}isBalanceEdge(e){return this.balance[this.tokenIndex]<e}isDelim(e,t){return t?this.lookupType(t)===9&&this.source.charCodeAt(this.lookupOffset(t))===e:this.tokenType===9&&this.source.charCodeAt(this.tokenStart)===e}skip(e){let t=this.tokenIndex+e;t<this.tokenCount?(this.tokenIndex=t,this.tokenStart=this.offsetAndType[t-1]&z,t=this.offsetAndType[t],this.tokenType=t>>24,this.tokenEnd=t&z):(this.tokenIndex=this.tokenCount,this.next())}next(){let e=this.tokenIndex+1;e<this.tokenCount?(this.tokenIndex=e,this.tokenStart=this.tokenEnd,e=this.offsetAndType[e],this.tokenType=e>>24,this.tokenEnd=e&z):(this.eof=!0,this.tokenIndex=this.tokenCount,this.tokenType=0,this.tokenStart=this.tokenEnd=this.source.length)}skipSC(){for(;this.tokenType===13||this.tokenType===25;)this.next()}skipUntilBalanced(e,t){let n=e,r=0,i=0;t:for(;n<this.tokenCount;n++){if(r=this.balance[n],r<e)break t;switch(i=n>0?this.offsetAndType[n-1]&z:this.firstCharOffset,t(this.source.charCodeAt(i))){case 1:break t;case 2:n++;break t;default:St(this.offsetAndType[n]>>24)&&(n=r)}}this.skip(n-this.tokenIndex)}forEachToken(e){for(let t=0,n=this.firstCharOffset;t<this.tokenCount;t++){let r=n,i=this.offsetAndType[t],a=i&z,o=i>>24;n=a,e(o,r,a,t)}}dump(){let e=Array(this.tokenCount);return this.forEachToken((t,n,r,i)=>{e[i]={idx:i,type:vt[t],chunk:this.source.substring(n,r),balance:this.balance[i]}}),e}};function wt(e,t){function n(t){return t<s?e.charCodeAt(t):0}function r(){if(l=ht(e,l),rt(n(l),n(l+1),n(l+2))){u=12,l=mt(e,l);return}if(n(l)===37){u=11,l++;return}u=10}function i(){let t=l;if(l=mt(e,l),ut(e,t,l,`url`)&&n(l)===40){if(l=ft(e,l+1),n(l)===34||n(l)===39){u=2,l=t+4;return}o();return}if(n(l)===40){u=2,l++;return}u=1}function a(t){for(t||=n(l++),u=5;l<e.length;l++){let r=e.charCodeAt(l);switch(st(r)){case t:l++;return;case 130:if(nt(r)){l+=ct(e,l,r),u=6;return}break;case 92:if(l===e.length-1)break;let i=n(l+1);nt(i)?l+=ct(e,l+1,i):I(r,i)&&(l=R(e,l)-1);break}}}function o(){for(u=7,l=ft(e,l);l<e.length;l++){let t=e.charCodeAt(l);switch(st(t)){case 41:l++;return;case 130:if(l=ft(e,l),n(l)===41||l>=e.length){l<e.length&&l++;return}l=gt(e,l),u=8;return;case 34:case 39:case 40:case 133:l=gt(e,l),u=8;return;case 92:if(I(t,n(l+1))){l=R(e,l)-1;break}l=gt(e,l),u=8;return}}}e=String(e||``);let s=e.length,c=at(n(0)),l=c,u;for(;l<s;){let o=e.charCodeAt(l);switch(st(o)){case 130:u=13,l=ft(e,l+1);break;case 34:a();break;case 35:et(n(l+1))||I(n(l+1),n(l+2))?(u=4,l=mt(e,l+1)):(u=9,l++);break;case 39:a();break;case 40:u=21,l++;break;case 41:u=22,l++;break;case 43:it(o,n(l+1),n(l+2))?r():(u=9,l++);break;case 44:u=18,l++;break;case 45:it(o,n(l+1),n(l+2))?r():n(l+1)===45&&n(l+2)===62?(u=15,l+=3):rt(o,n(l+1),n(l+2))?i():(u=9,l++);break;case 46:it(o,n(l+1),n(l+2))?r():(u=9,l++);break;case 47:n(l+1)===42?(u=25,l=e.indexOf(`*/`,l+2),l=l===-1?e.length:l+2):(u=9,l++);break;case 58:u=16,l++;break;case 59:u=17,l++;break;case 60:n(l+1)===33&&n(l+2)===45&&n(l+3)===45?(u=14,l+=4):(u=9,l++);break;case 64:rt(n(l+1),n(l+2),n(l+3))?(u=3,l=mt(e,l+1)):(u=9,l++);break;case 91:u=19,l++;break;case 92:I(o,n(l+1))?i():(u=9,l++);break;case 93:u=20,l++;break;case 123:u=23,l++;break;case 125:u=24,l++;break;case 131:r();break;case 132:i();break;default:u=9,l++}t(u,c,c=l)}}function Tt(e,t){return t||=0,e.length-t>=2&&e.charCodeAt(t)===45&&e.charCodeAt(t+1)===45}function Et(e){let t=e.length,n=e.charCodeAt(0),r=+(n===34||n===39),i=r===1&&t>1&&e.charCodeAt(t-1)===n?t-2:t-1,a=``;for(let n=r;n<=i;n++){let r=e.charCodeAt(n);if(r===92){if(n===i){n!==t-1&&(a=e.substr(n+1));break}if(r=e.charCodeAt(++n),I(92,r)){let t=n-1,r=R(e,t);n=r-1,a+=_t(e.substring(t+1,r))}else r===13&&e.charCodeAt(n+1)===10&&n++}else a+=e[n]}return a}function Dt(e,t){let n=``,r=!1;for(let t=0;t<e.length;t++){let i=e.charCodeAt(t);if(i===0){n+=`�`;continue}if(i<=31||i===127){n+=`\\`+i.toString(16),r=!0;continue}i===34||i===92?(n+=`\\`+e.charAt(t),r=!1):(r&&(P(i)||F(i))&&(n+=` `),n+=e.charAt(t),r=!1)}return`"`+n+`"`}function Ot(e){let t=e.length,n=4,r=e.charCodeAt(t-1)===41?t-2:t-1,i=``;for(;n<r&&F(e.charCodeAt(n));)n++;for(;n<r&&F(e.charCodeAt(r));)r--;for(let a=n;a<=r;a++){let n=e.charCodeAt(a);if(n===92){if(a===r){a!==t-1&&(i=e.substr(a+1));break}if(n=e.charCodeAt(++a),I(92,n)){let t=a-1,n=R(e,t);a=n-1,i+=_t(e.substring(t+1,n))}else n===13&&e.charCodeAt(a+1)===10&&a++}else i+=e[a]}return i}function kt(e){let t=``,n=!1;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r);if(i===0){t+=`�`;continue}if(i<=31||i===127){t+=`\\`+i.toString(16),n=!0;continue}i===32||i===92||i===34||i===39||i===40||i===41?(t+=`\\`+e.charAt(r),n=!1):(n&&P(i)&&(t+=` `),t+=e.charAt(r),n=!1)}return`url(`+t+`)`}const{hasOwnProperty:At}=Object.prototype,V=function(){};function jt(e){return typeof e==`function`?e:V}function Mt(e,t){return function(n,r,i){n.type===t&&e.call(this,n,r,i)}}function Nt(e,t){let n=t.structure,r=[];for(let e in n){if(At.call(n,e)===!1)continue;let t=n[e],i={name:e,type:!1,nullable:!1};Array.isArray(t)||(t=[t]);for(let e of t)e===null?i.nullable=!0:typeof e==`string`?i.type=`node`:Array.isArray(e)&&(i.type=`list`);i.type&&r.push(i)}return r.length?{context:t.walkContext,fields:r}:null}function Pt(e){let t={};for(let n in e.node)if(At.call(e.node,n)){let r=e.node[n];if(!r.structure)throw Error("Missed `structure` field in `"+n+"` node type definition");t[n]=Nt(n,r)}return t}function Ft(e,t){let n=e.fields.slice(),r=e.context,i=typeof r==`string`;return t&&n.reverse(),function(e,a,o,s){let c;i&&(c=a[r],a[r]=e);for(let r of n){let n=e[r.name];if(!r.nullable||n){if(r.type===`list`){if(t?n.reduceRight(s,!1):n.reduce(s,!1))return!0}else if(o(n))return!0}}i&&(a[r]=c)}}function It({StyleSheet:e,Atrule:t,Rule:n,Block:r,DeclarationList:i}){return{Atrule:{StyleSheet:e,Atrule:t,Rule:n,Block:r},Rule:{StyleSheet:e,Atrule:t,Rule:n,Block:r},Declaration:{StyleSheet:e,Atrule:t,Rule:n,Block:r,DeclarationList:i}}}function Lt(e){let t=Pt(e),n={},r={},i=Symbol(`break-walk`),a=Symbol(`skip-node`);for(let e in t)At.call(t,e)&&t[e]!==null&&(n[e]=Ft(t[e],!1),r[e]=Ft(t[e],!0));let o=It(n),s=It(r),c=function(e,c){function l(e,t,n){let r=u.call(m,e,t,n);return r===i?!0:r===a?!1:!!(f.hasOwnProperty(e.type)&&f[e.type](e,m,l,p)||d.call(m,e,t,n)===i)}let u=V,d=V,f=n,p=(e,t,n,r)=>e||l(t,n,r),m={break:i,skip:a,root:e,stylesheet:null,atrule:null,atrulePrelude:null,rule:null,selector:null,block:null,declaration:null,function:null};if(typeof c==`function`)u=c;else if(c&&(u=jt(c.enter),d=jt(c.leave),c.reverse&&(f=r),c.visit)){if(o.hasOwnProperty(c.visit))f=c.reverse?s[c.visit]:o[c.visit];else if(!t.hasOwnProperty(c.visit))throw Error("Bad value `"+c.visit+"` for `visit` option (should be: "+Object.keys(t).sort().join(`, `)+`)`);u=Mt(u,c.visit),d=Mt(d,c.visit)}if(u===V&&d===V)throw Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");l(e)};return c.break=i,c.skip=a,c.find=function(e,t){let n=null;return c(e,function(e,r,a){if(t.call(this,e,r,a))return n=e,i}),n},c.findLast=function(e,t){let n=null;return c(e,{reverse:!0,enter(e,r,a){if(t.call(this,e,r,a))return n=e,i}}),n},c.findAll=function(e,t){let n=[];return c(e,function(e,r,i){t.call(this,e,r,i)&&n.push(e)}),n},c}function Rt(e,t){let n=this.tokenStart+e,r=this.charCodeAt(n);for((r===43||r===45)&&(t&&this.error(`Number sign is not allowed`),n++);n<this.tokenEnd;n++)N(this.charCodeAt(n))||this.error(`Integer is expected`,n)}function H(e){return Rt.call(this,0,e)}function U(e,t){if(!this.cmpChar(this.tokenStart+e,t)){let n=``;switch(t){case 110:n=`N is expected`;break;case 45:n=`HyphenMinus is expected`;break}this.error(n,this.tokenStart+e)}}function zt(){let e=0,t=0,n=this.tokenType;for(;n===13||n===25;)n=this.lookupType(++e);if(n!==10)if(this.isDelim(43,e)||this.isDelim(45,e)){t=this.isDelim(43,e)?43:45;do n=this.lookupType(++e);while(n===13||n===25);n!==10&&(this.skip(e),H.call(this,!0))}else return null;return e>0&&this.skip(e),t===0&&(n=this.charCodeAt(this.tokenStart),n!==43&&n!==45&&this.error(`Number sign is expected`)),H.call(this,t!==0),t===45?`-`+this.consume(10):this.consume(10)}const Bt={a:[String,null],b:[String,null]};function Vt(){let e=this.tokenStart,t=null,n=null;if(this.tokenType===10)H.call(this,!1),n=this.consume(10);else if(this.tokenType===1&&this.cmpChar(this.tokenStart,45))switch(t=`-1`,U.call(this,1,110),this.tokenEnd-this.tokenStart){case 2:this.next(),n=zt.call(this);break;case 3:U.call(this,2,45),this.next(),this.skipSC(),H.call(this,!0),n=`-`+this.consume(10);break;default:U.call(this,2,45),Rt.call(this,3,!0),this.next(),n=this.substrToCursor(e+2)}else if(this.tokenType===1||this.isDelim(43)&&this.lookupType(1)===1){let r=0;switch(t=`1`,this.isDelim(43)&&(r=1,this.next()),U.call(this,0,110),this.tokenEnd-this.tokenStart){case 1:this.next(),n=zt.call(this);break;case 2:U.call(this,1,45),this.next(),this.skipSC(),H.call(this,!0),n=`-`+this.consume(10);break;default:U.call(this,1,45),Rt.call(this,2,!0),this.next(),n=this.substrToCursor(e+r+1)}}else if(this.tokenType===12){let r=this.charCodeAt(this.tokenStart),i=r===43||r===45,a=this.tokenStart+i;for(;a<this.tokenEnd&&N(this.charCodeAt(a));a++);a===this.tokenStart+i&&this.error(`Integer is expected`,this.tokenStart+i),U.call(this,a-this.tokenStart,110),t=this.substring(e,a),a+1===this.tokenEnd?(this.next(),n=zt.call(this)):(U.call(this,a-this.tokenStart+1,45),a+2===this.tokenEnd?(this.next(),this.skipSC(),H.call(this,!0),n=`-`+this.consume(10)):(Rt.call(this,a-this.tokenStart+2,!0),this.next(),n=this.substrToCursor(a+1)))}else this.error();return t!==null&&t.charCodeAt(0)===43&&(t=t.substr(1)),n!==null&&n.charCodeAt(0)===43&&(n=n.substr(1)),{type:`AnPlusB`,loc:this.getLocation(e,this.tokenStart),a:t,b:n}}function Ht(e){if(e.a){let t=e.a===`+1`&&`n`||e.a===`1`&&`n`||e.a===`-1`&&`-n`||e.a+`n`;if(e.b){let n=e.b[0]===`-`||e.b[0]===`+`?e.b:`+`+e.b;this.tokenize(t+n)}else this.tokenize(t)}else this.tokenize(e.b)}const Ut=Object.freeze(Object.defineProperty({__proto__:null,generate:Ht,name:`AnPlusB`,parse:Vt,structure:Bt},Symbol.toStringTag,{value:`Module`}));function Wt(){return this.Raw(this.consumeUntilLeftCurlyBracketOrSemicolon,!0)}function Gt(){for(let e=1,t;t=this.lookupType(e);e++){if(t===24)return!0;if(t===23||t===3)return!1}return!1}const Kt={name:String,prelude:[`AtrulePrelude`,`Raw`,null],block:[`Block`,null]};function qt(e=!1){let t=this.tokenStart,n,r,i=null,a=null;switch(this.eat(3),n=this.substrToCursor(t+1),r=n.toLowerCase(),this.skipSC(),this.eof===!1&&this.tokenType!==23&&this.tokenType!==17&&(i=this.parseAtrulePrelude?this.parseWithFallback(this.AtrulePrelude.bind(this,n,e),Wt):Wt.call(this,this.tokenIndex),this.skipSC()),this.tokenType){case 17:this.next();break;case 23:a=hasOwnProperty.call(this.atrule,r)&&typeof this.atrule[r].block==`function`?this.atrule[r].block.call(this,e):this.Block(Gt.call(this));break}return{type:`Atrule`,loc:this.getLocation(t,this.tokenStart),name:n,prelude:i,block:a}}function Jt(e){this.token(3,`@`+e.name),e.prelude!==null&&this.node(e.prelude),e.block?this.node(e.block):this.token(17,`;`)}const Yt=Object.freeze(Object.defineProperty({__proto__:null,generate:Jt,name:`Atrule`,parse:qt,structure:Kt,walkContext:`atrule`},Symbol.toStringTag,{value:`Module`})),Xt={children:[[]]};function Zt(e){let t=null;return e!==null&&(e=e.toLowerCase()),this.skipSC(),t=hasOwnProperty.call(this.atrule,e)&&typeof this.atrule[e].prelude==`function`?this.atrule[e].prelude.call(this):this.readSequence(this.scope.AtrulePrelude),this.skipSC(),this.eof!==!0&&this.tokenType!==23&&this.tokenType!==17&&this.error(`Semicolon or block is expected`),{type:`AtrulePrelude`,loc:this.getLocationFromList(t),children:t}}function Qt(e){this.children(e)}const $t=Object.freeze(Object.defineProperty({__proto__:null,generate:Qt,name:`AtrulePrelude`,parse:Zt,structure:Xt,walkContext:`atrulePrelude`},Symbol.toStringTag,{value:`Module`}));function en(){this.eof&&this.error(`Unexpected end of input`);let e=this.tokenStart,t=!1;return this.isDelim(42)?(t=!0,this.next()):this.isDelim(124)||this.eat(1),this.isDelim(124)?this.charCodeAt(this.tokenStart+1)===61?t&&this.error(`Identifier is expected`,this.tokenEnd):(this.next(),this.eat(1)):t&&this.error(`Vertical line is expected`),{type:`Identifier`,loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e)}}function tn(){let e=this.tokenStart,t=this.charCodeAt(e);return t!==61&&t!==126&&t!==94&&t!==36&&t!==42&&t!==124&&this.error(`Attribute selector (=, ~=, ^=, $=, *=, |=) is expected`),this.next(),t!==61&&(this.isDelim(61)||this.error(`Equal sign is expected`),this.next()),this.substrToCursor(e)}const nn={name:`Identifier`,matcher:[String,null],value:[`String`,`Identifier`,null],flags:[String,null]};function rn(){let e=this.tokenStart,t,n=null,r=null,i=null;return this.eat(19),this.skipSC(),t=en.call(this),this.skipSC(),this.tokenType!==20&&(this.tokenType!==1&&(n=tn.call(this),this.skipSC(),r=this.tokenType===5?this.String():this.Identifier(),this.skipSC()),this.tokenType===1&&(i=this.consume(1),this.skipSC())),this.eat(20),{type:`AttributeSelector`,loc:this.getLocation(e,this.tokenStart),name:t,matcher:n,value:r,flags:i}}function an(e){this.token(9,`[`),this.node(e.name),e.matcher!==null&&(this.tokenize(e.matcher),this.node(e.value)),e.flags!==null&&this.token(1,e.flags),this.token(9,`]`)}const on=Object.freeze(Object.defineProperty({__proto__:null,generate:an,name:`AttributeSelector`,parse:rn,structure:nn},Symbol.toStringTag,{value:`Module`}));function sn(){return this.Raw(null,!0)}function cn(){return this.parseWithFallback(this.Rule,sn)}function ln(){return this.Raw(this.consumeUntilSemicolonIncluded,!0)}function un(){if(this.tokenType===17)return ln.call(this,this.tokenIndex);let e=this.parseWithFallback(this.Declaration,ln);return this.tokenType===17&&this.next(),e}const dn={children:[[`Atrule`,`Rule`,`Declaration`]]};function fn(e){let t=e?un:cn,n=this.tokenStart,r=this.createList();this.eat(23);t:for(;!this.eof;)switch(this.tokenType){case 24:break t;case 13:case 25:this.next();break;case 3:r.push(this.parseWithFallback(this.Atrule.bind(this,e),sn));break;default:e&&this.isDelim(38)?r.push(cn.call(this)):r.push(t.call(this))}return this.eof||this.eat(24),{type:`Block`,loc:this.getLocation(n,this.tokenStart),children:r}}function pn(e){this.token(23,`{`),this.children(e,e=>{e.type===`Declaration`&&this.token(17,`;`)}),this.token(24,`}`)}const mn=Object.freeze(Object.defineProperty({__proto__:null,generate:pn,name:`Block`,parse:fn,structure:dn,walkContext:`block`},Symbol.toStringTag,{value:`Module`})),hn={children:[[]]};function gn(e,t){let n=this.tokenStart,r=null;return this.eat(19),r=e.call(this,t),this.eof||this.eat(20),{type:`Brackets`,loc:this.getLocation(n,this.tokenStart),children:r}}function _n(e){this.token(9,`[`),this.children(e),this.token(9,`]`)}const vn=Object.freeze(Object.defineProperty({__proto__:null,generate:_n,name:`Brackets`,parse:gn,structure:hn},Symbol.toStringTag,{value:`Module`})),yn=[];function bn(){let e=this.tokenStart;return this.eat(15),{type:`CDC`,loc:this.getLocation(e,this.tokenStart)}}function xn(){this.token(15,`-->`)}const Sn=Object.freeze(Object.defineProperty({__proto__:null,generate:xn,name:`CDC`,parse:bn,structure:yn},Symbol.toStringTag,{value:`Module`})),Cn=[];function wn(){let e=this.tokenStart;return this.eat(14),{type:`CDO`,loc:this.getLocation(e,this.tokenStart)}}function Tn(){this.token(14,`<!--`)}const En=Object.freeze(Object.defineProperty({__proto__:null,generate:Tn,name:`CDO`,parse:wn,structure:Cn},Symbol.toStringTag,{value:`Module`})),Dn={name:String};function On(){return this.eatDelim(46),{type:`ClassSelector`,loc:this.getLocation(this.tokenStart-1,this.tokenEnd),name:this.consume(1)}}function kn(e){this.token(9,`.`),this.token(1,e.name)}const An=Object.freeze(Object.defineProperty({__proto__:null,generate:kn,name:`ClassSelector`,parse:On,structure:Dn},Symbol.toStringTag,{value:`Module`})),jn={name:String};function Mn(){let e=this.tokenStart,t;switch(this.tokenType){case 13:t=` `;break;case 9:switch(this.charCodeAt(this.tokenStart)){case 62:case 43:case 126:this.next();break;case 47:this.next(),this.eatIdent(`deep`),this.eatDelim(47);break;default:this.error(`Combinator is expected`)}t=this.substrToCursor(e);break}return{type:`Combinator`,loc:this.getLocation(e,this.tokenStart),name:t}}function Nn(e){this.tokenize(e.name)}const Pn=Object.freeze(Object.defineProperty({__proto__:null,generate:Nn,name:`Combinator`,parse:Mn,structure:jn},Symbol.toStringTag,{value:`Module`})),Fn={value:String};function In(){let e=this.tokenStart,t=this.tokenEnd;return this.eat(25),t-e+2>=2&&this.charCodeAt(t-2)===42&&this.charCodeAt(t-1)===47&&(t-=2),{type:`Comment`,loc:this.getLocation(e,this.tokenStart),value:this.substring(e+2,t)}}function Ln(e){this.token(25,`/*`+e.value+`*/`)}const Rn=Object.freeze(Object.defineProperty({__proto__:null,generate:Ln,name:`Comment`,parse:In,structure:Fn},Symbol.toStringTag,{value:`Module`})),zn=new Set([16,22,0]),Bn={kind:String,children:[[`Identifier`,`Feature`,`FeatureFunction`,`FeatureRange`,`SupportsDeclaration`]]};function Vn(e){return this.lookupTypeNonSC(1)===1&&zn.has(this.lookupTypeNonSC(2))?this.Feature(e):this.FeatureRange(e)}const Hn={media:Vn,container:Vn,supports(){return this.SupportsDeclaration()}};function Un(e=`media`){let t=this.createList();t:for(;!this.eof;)switch(this.tokenType){case 25:case 13:this.next();continue;case 1:t.push(this.Identifier());break;case 21:{let n=this.parseWithFallback(()=>Hn[e].call(this,e),()=>null);n||=this.parseWithFallback(()=>{this.eat(21);let t=this.Condition(e);return this.eat(22),t},()=>this.GeneralEnclosed(e)),t.push(n);break}case 2:{let n=this.parseWithFallback(()=>this.FeatureFunction(e),()=>null);n||=this.GeneralEnclosed(e),t.push(n);break}default:break t}return t.isEmpty&&this.error(`Condition is expected`),{type:`Condition`,loc:this.getLocationFromList(t),kind:e,children:t}}function Wn(e){e.children.forEach(e=>{e.type===`Condition`?(this.token(21,`(`),this.node(e),this.token(22,`)`)):this.node(e)})}const Gn=Object.freeze(Object.defineProperty({__proto__:null,generate:Wn,name:`Condition`,parse:Un,structure:Bn},Symbol.toStringTag,{value:`Module`}));function Kn(){return this.Raw(this.consumeUntilExclamationMarkOrSemicolon,!0)}function qn(){return this.Raw(this.consumeUntilExclamationMarkOrSemicolon,!1)}function Jn(){let e=this.tokenIndex,t=this.Value();return t.type!==`Raw`&&this.eof===!1&&this.tokenType!==17&&this.isDelim(33)===!1&&this.isBalanceEdge(e)===!1&&this.error(),t}const Yn={important:[Boolean,String],property:String,value:[`Value`,`Raw`]};function Xn(){let e=this.tokenStart,t=this.tokenIndex,n=Qn.call(this),r=Tt(n),i=r?this.parseCustomProperty:this.parseValue,a=r?qn:Kn,o=!1,s;this.skipSC(),this.eat(16);let c=this.tokenIndex;if(r||this.skipSC(),s=i?this.parseWithFallback(Jn,a):a.call(this,this.tokenIndex),r&&s.type===`Value`&&s.children.isEmpty){for(let e=c-this.tokenIndex;e<=0;e++)if(this.lookupType(e)===13){s.children.appendData({type:`WhiteSpace`,loc:null,value:` `});break}}return this.isDelim(33)&&(o=$n.call(this),this.skipSC()),this.eof===!1&&this.tokenType!==17&&this.isBalanceEdge(t)===!1&&this.error(),{type:`Declaration`,loc:this.getLocation(e,this.tokenStart),important:o,property:n,value:s}}function Zn(e){this.token(1,e.property),this.token(16,`:`),this.node(e.value),e.important&&(this.token(9,`!`),this.token(1,e.important===!0?`important`:e.important))}function Qn(){let e=this.tokenStart;if(this.tokenType===9)switch(this.charCodeAt(this.tokenStart)){case 42:case 36:case 43:case 35:case 38:this.next();break;case 47:this.next(),this.isDelim(47)&&this.next();break}return this.tokenType===4?this.eat(4):this.eat(1),this.substrToCursor(e)}function $n(){this.eat(9),this.skipSC();let e=this.consume(1);return e===`important`?!0:e}const er=Object.freeze(Object.defineProperty({__proto__:null,generate:Zn,name:`Declaration`,parse:Xn,structure:Yn,walkContext:`declaration`},Symbol.toStringTag,{value:`Module`}));function tr(){return this.Raw(this.consumeUntilSemicolonIncluded,!0)}const nr={children:[[`Declaration`,`Atrule`,`Rule`]]};function rr(){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),tr));break;default:this.isDelim(38)?e.push(this.parseWithFallback(this.Rule,tr)):e.push(this.parseWithFallback(this.Declaration,tr))}return{type:`DeclarationList`,loc:this.getLocationFromList(e),children:e}}function ir(e){this.children(e,e=>{e.type===`Declaration`&&this.token(17,`;`)})}const ar=Object.freeze(Object.defineProperty({__proto__:null,generate:ir,name:`DeclarationList`,parse:rr,structure:nr},Symbol.toStringTag,{value:`Module`})),or={value:String,unit:String};function sr(){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 cr(e){this.token(12,e.value+e.unit)}const lr=Object.freeze(Object.defineProperty({__proto__:null,generate:cr,name:`Dimension`,parse:sr,structure:or},Symbol.toStringTag,{value:`Module`})),ur={kind:String,name:String,value:[`Identifier`,`Number`,`Dimension`,`Ratio`,`Function`,null]};function dr(e){let t=this.tokenStart,n,r=null;if(this.eat(21),this.skipSC(),n=this.consume(1),this.skipSC(),this.tokenType!==22){switch(this.eat(16),this.skipSC(),this.tokenType){case 10:r=this.lookupNonWSType(1)===9?this.Ratio():this.Number();break;case 12:r=this.Dimension();break;case 1:r=this.Identifier();break;case 2:r=this.parseWithFallback(()=>{let e=this.Function(this.readSequence,this.scope.Value);return this.skipSC(),this.isDelim(47)&&this.error(),e},()=>this.Ratio());break;default:this.error(`Number, dimension, ratio or identifier is expected`)}this.skipSC()}return this.eof||this.eat(22),{type:`Feature`,loc:this.getLocation(t,this.tokenStart),kind:e,name:n,value:r}}function fr(e){this.token(21,`(`),this.token(1,e.name),e.value!==null&&(this.token(16,`:`),this.node(e.value)),this.token(22,`)`)}const pr=Object.freeze(Object.defineProperty({__proto__:null,generate:fr,name:`Feature`,parse:dr,structure:ur},Symbol.toStringTag,{value:`Module`})),mr={kind:String,feature:String,value:[`Declaration`,`Selector`]};function hr(e,t){let n=(this.features[e]||{})[t];return typeof n!=`function`&&this.error(`Unknown feature ${t}()`),n}function gr(e=`unknown`){let t=this.tokenStart,n=this.consumeFunctionName(),r=hr.call(this,e,n.toLowerCase());this.skipSC();let i=this.parseWithFallback(()=>{let e=this.tokenIndex,t=r.call(this);return this.eof===!1&&this.isBalanceEdge(e)===!1&&this.error(),t},()=>this.Raw(null,!1));return this.eof||this.eat(22),{type:`FeatureFunction`,loc:this.getLocation(t,this.tokenStart),kind:e,feature:n,value:i}}function _r(e){this.token(2,e.feature+`(`),this.node(e.value),this.token(22,`)`)}const vr=Object.freeze(Object.defineProperty({__proto__:null,generate:_r,name:`FeatureFunction`,parse:gr,structure:mr},Symbol.toStringTag,{value:`Module`})),yr={kind:String,left:[`Identifier`,`Number`,`Dimension`,`Ratio`,`Function`],leftComparison:String,middle:[`Identifier`,`Number`,`Dimension`,`Ratio`,`Function`],rightComparison:[String,null],right:[`Identifier`,`Number`,`Dimension`,`Ratio`,`Function`,null]};function br(){switch(this.skipSC(),this.tokenType){case 10:return this.isDelim(47,this.lookupOffsetNonSC(1))?this.Ratio():this.Number();case 12:return this.Dimension();case 1:return this.Identifier();case 2:return this.parseWithFallback(()=>{let e=this.Function(this.readSequence,this.scope.Value);return this.skipSC(),this.isDelim(47)&&this.error(),e},()=>this.Ratio());default:this.error(`Number, dimension, ratio or identifier is expected`)}}function xr(e){if(this.skipSC(),this.isDelim(60)||this.isDelim(62)){let e=this.source[this.tokenStart];return this.next(),this.isDelim(61)?(this.next(),e+`=`):e}if(this.isDelim(61))return`=`;this.error(`Expected ${e?`":", `:``}"<", ">", "=" or ")"`)}function Sr(e=`unknown`){let t=this.tokenStart;this.skipSC(),this.eat(21);let n=br.call(this),r=xr.call(this,n.type===`Identifier`),i=br.call(this),a=null,o=null;return this.lookupNonWSType(0)!==22&&(a=xr.call(this),o=br.call(this)),this.skipSC(),this.eat(22),{type:`FeatureRange`,loc:this.getLocation(t,this.tokenStart),kind:e,left:n,leftComparison:r,middle:i,rightComparison:a,right:o}}function Cr(e){this.token(21,`(`),this.node(e.left),this.tokenize(e.leftComparison),this.node(e.middle),e.right&&(this.tokenize(e.rightComparison),this.node(e.right)),this.token(22,`)`)}const wr=Object.freeze(Object.defineProperty({__proto__:null,generate:Cr,name:`FeatureRange`,parse:Sr,structure:yr},Symbol.toStringTag,{value:`Module`})),Tr={name:String,children:[[]]};function Er(e,t){let n=this.tokenStart,r=this.consumeFunctionName(),i=r.toLowerCase(),a;return a=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:r,children:a}}function Dr(e){this.token(2,e.name+`(`),this.children(e),this.token(22,`)`)}const Or=Object.freeze(Object.defineProperty({__proto__:null,generate:Dr,name:`Function`,parse:Er,structure:Tr,walkContext:`function`},Symbol.toStringTag,{value:`Module`})),kr={kind:String,function:[String,null],children:[[]]};function Ar(e){let t=this.tokenStart,n=null;this.tokenType===2?n=this.consumeFunctionName():this.eat(21);let r=this.parseWithFallback(()=>{let e=this.tokenIndex,t=this.readSequence(this.scope.Value);return this.eof===!1&&this.isBalanceEdge(e)===!1&&this.error(),t},()=>this.createSingleNodeList(this.Raw(null,!1)));return this.eof||this.eat(22),{type:`GeneralEnclosed`,loc:this.getLocation(t,this.tokenStart),kind:e,function:n,children:r}}function jr(e){e.function?this.token(2,e.function+`(`):this.token(21,`(`),this.children(e),this.token(22,`)`)}const Mr=Object.freeze(Object.defineProperty({__proto__:null,generate:jr,name:`GeneralEnclosed`,parse:Ar,structure:kr},Symbol.toStringTag,{value:`Module`})),Nr={value:String};function Pr(){let e=this.tokenStart;return this.eat(4),{type:`Hash`,loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e+1)}}function Fr(e){this.token(4,`#`+e.value)}const Ir=Object.freeze(Object.defineProperty({__proto__:null,generate:Fr,name:`Hash`,parse:Pr,structure:Nr,xxx:`XXX`},Symbol.toStringTag,{value:`Module`})),Lr={name:String};function Rr(){return{type:`Identifier`,loc:this.getLocation(this.tokenStart,this.tokenEnd),name:this.consume(1)}}function zr(e){this.token(1,e.name)}const Br=Object.freeze(Object.defineProperty({__proto__:null,generate:zr,name:`Identifier`,parse:Rr,structure:Lr},Symbol.toStringTag,{value:`Module`})),Vr={name:String};function Hr(){let e=this.tokenStart;return this.eat(4),{type:`IdSelector`,loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e+1)}}function Ur(e){this.token(9,`#`+e.name)}const Wr=Object.freeze(Object.defineProperty({__proto__:null,generate:Ur,name:`IdSelector`,parse:Hr,structure:Vr},Symbol.toStringTag,{value:`Module`})),Gr={name:String};function Kr(){let e=this.tokenStart,t=this.consume(1);for(;this.isDelim(46);)this.eat(9),t+=`.`+this.consume(1);return{type:`Layer`,loc:this.getLocation(e,this.tokenStart),name:t}}function qr(e){this.tokenize(e.name)}const Jr=Object.freeze(Object.defineProperty({__proto__:null,generate:qr,name:`Layer`,parse:Kr,structure:Gr},Symbol.toStringTag,{value:`Module`})),Yr={children:[[`Layer`]]};function Xr(){let e=this.createList();for(this.skipSC();!this.eof&&(e.push(this.Layer()),this.lookupTypeNonSC(0)===18);)this.skipSC(),this.next(),this.skipSC();return{type:`LayerList`,loc:this.getLocationFromList(e),children:e}}function Zr(e){this.children(e,()=>this.token(18,`,`))}const Qr=Object.freeze(Object.defineProperty({__proto__:null,generate:Zr,name:`LayerList`,parse:Xr,structure:Yr},Symbol.toStringTag,{value:`Module`})),$r={modifier:[String,null],mediaType:[String,null],condition:[`Condition`,null]};function ei(){let e=this.tokenStart,t=null,n=null,r=null;if(this.skipSC(),this.tokenType===1&&this.lookupTypeNonSC(1)!==21){let e=this.consume(1),i=e.toLowerCase();switch(i===`not`||i===`only`?(this.skipSC(),t=i,n=this.consume(1)):n=e,this.lookupTypeNonSC(0)){case 1:this.skipSC(),this.eatIdent(`and`),r=this.Condition(`media`);break;case 23:case 17:case 18:case 0:break;default:this.error(`Identifier or parenthesis is expected`)}}else switch(this.tokenType){case 1:case 21:case 2:r=this.Condition(`media`);break;case 23:case 17:case 0:break;default:this.error(`Identifier or parenthesis is expected`)}return{type:`MediaQuery`,loc:this.getLocation(e,this.tokenStart),modifier:t,mediaType:n,condition:r}}function ti(e){e.mediaType?(e.modifier&&this.token(1,e.modifier),this.token(1,e.mediaType),e.condition&&(this.token(1,`and`),this.node(e.condition))):e.condition&&this.node(e.condition)}const ni=Object.freeze(Object.defineProperty({__proto__:null,generate:ti,name:`MediaQuery`,parse:ei,structure:$r},Symbol.toStringTag,{value:`Module`})),ri={children:[[`MediaQuery`]]};function ii(){let e=this.createList();for(this.skipSC();!this.eof&&(e.push(this.MediaQuery()),this.tokenType===18);)this.next();return{type:`MediaQueryList`,loc:this.getLocationFromList(e),children:e}}function ai(e){this.children(e,()=>this.token(18,`,`))}const oi=Object.freeze(Object.defineProperty({__proto__:null,generate:ai,name:`MediaQueryList`,parse:ii,structure:ri},Symbol.toStringTag,{value:`Module`})),si={};function ci(){let e=this.tokenStart;return this.eatDelim(38),{type:`NestingSelector`,loc:this.getLocation(e,this.tokenStart)}}function li(){this.token(9,`&`)}const ui=Object.freeze(Object.defineProperty({__proto__:null,generate:li,name:`NestingSelector`,parse:ci,structure:si},Symbol.toStringTag,{value:`Module`})),di={nth:[`AnPlusB`,`Identifier`],selector:[`SelectorList`,null]};function fi(){this.skipSC();let e=this.tokenStart,t=e,n=null,r;return r=this.lookupValue(0,`odd`)||this.lookupValue(0,`even`)?this.Identifier():this.AnPlusB(),t=this.tokenStart,this.skipSC(),this.lookupValue(0,`of`)&&(this.next(),n=this.SelectorList(),t=this.tokenStart),{type:`Nth`,loc:this.getLocation(e,t),nth:r,selector:n}}function pi(e){this.node(e.nth),e.selector!==null&&(this.token(1,`of`),this.node(e.selector))}const mi=Object.freeze(Object.defineProperty({__proto__:null,generate:pi,name:`Nth`,parse:fi,structure:di},Symbol.toStringTag,{value:`Module`})),hi={value:String};function gi(){return{type:`Number`,loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consume(10)}}function _i(e){this.token(10,e.value)}const vi=Object.freeze(Object.defineProperty({__proto__:null,generate:_i,name:`Number`,parse:gi,structure:hi},Symbol.toStringTag,{value:`Module`})),yi={value:String};function bi(){let e=this.tokenStart;return this.next(),{type:`Operator`,loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e)}}function xi(e){this.tokenize(e.value)}const Si=Object.freeze(Object.defineProperty({__proto__:null,generate:xi,name:`Operator`,parse:bi,structure:yi},Symbol.toStringTag,{value:`Module`})),Ci={children:[[]]};function wi(e,t){let n=this.tokenStart,r=null;return this.eat(21),r=e.call(this,t),this.eof||this.eat(22),{type:`Parentheses`,loc:this.getLocation(n,this.tokenStart),children:r}}function Ti(e){this.token(21,`(`),this.children(e),this.token(22,`)`)}const Ei=Object.freeze(Object.defineProperty({__proto__:null,generate:Ti,name:`Parentheses`,parse:wi,structure:Ci},Symbol.toStringTag,{value:`Module`})),Di={value:String};function Oi(){return{type:`Percentage`,loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consumeNumber(11)}}function ki(e){this.token(11,e.value+`%`)}const Ai=Object.freeze(Object.defineProperty({__proto__:null,generate:ki,name:`Percentage`,parse:Oi,structure:Di},Symbol.toStringTag,{value:`Module`})),ji={name:String,children:[[`Raw`],null]};function Mi(){let e=this.tokenStart,t=null,n,r;return this.eat(16),this.tokenType===2?(n=this.consumeFunctionName(),r=n.toLowerCase(),this.lookupNonWSType(0)==22?t=this.createList():hasOwnProperty.call(this.pseudo,r)?(this.skipSC(),t=this.pseudo[r].call(this),this.skipSC()):(t=this.createList(),t.push(this.Raw(null,!1))),this.eat(22)):n=this.consume(1),{type:`PseudoClassSelector`,loc:this.getLocation(e,this.tokenStart),name:n,children:t}}function Ni(e){this.token(16,`:`),e.children===null?this.token(1,e.name):(this.token(2,e.name+`(`),this.children(e),this.token(22,`)`))}const Pi=Object.freeze(Object.defineProperty({__proto__:null,generate:Ni,name:`PseudoClassSelector`,parse:Mi,structure:ji,walkContext:`function`},Symbol.toStringTag,{value:`Module`})),Fi={name:String,children:[[`Raw`],null]};function Ii(){let e=this.tokenStart,t=null,n,r;return this.eat(16),this.eat(16),this.tokenType===2?(n=this.consumeFunctionName(),r=n.toLowerCase(),this.lookupNonWSType(0)==22?t=this.createList():hasOwnProperty.call(this.pseudo,r)?(this.skipSC(),t=this.pseudo[r].call(this),this.skipSC()):(t=this.createList(),t.push(this.Raw(null,!1))),this.eat(22)):n=this.consume(1),{type:`PseudoElementSelector`,loc:this.getLocation(e,this.tokenStart),name:n,children:t}}function Li(e){this.token(16,`:`),this.token(16,`:`),e.children===null?this.token(1,e.name):(this.token(2,e.name+`(`),this.children(e),this.token(22,`)`))}const Ri=Object.freeze(Object.defineProperty({__proto__:null,generate:Li,name:`PseudoElementSelector`,parse:Ii,structure:Fi,walkContext:`function`},Symbol.toStringTag,{value:`Module`}));function zi(){switch(this.skipSC(),this.tokenType){case 10:return this.Number();case 2:return this.Function(this.readSequence,this.scope.Value);default:this.error(`Number of function is expected`)}}const Bi={left:[`Number`,`Function`],right:[`Number`,`Function`,null]};function Vi(){let e=this.tokenStart,t=zi.call(this),n=null;return this.skipSC(),this.isDelim(47)&&(this.eatDelim(47),n=zi.call(this)),{type:`Ratio`,loc:this.getLocation(e,this.tokenStart),left:t,right:n}}function Hi(e){this.node(e.left),this.token(9,`/`),e.right?this.node(e.right):this.node(10,1)}const Ui=Object.freeze(Object.defineProperty({__proto__:null,generate:Hi,name:`Ratio`,parse:Vi,structure:Bi},Symbol.toStringTag,{value:`Module`}));function Wi(){return this.tokenIndex>0&&this.lookupType(-1)===13?this.tokenIndex>1?this.getTokenStart(this.tokenIndex-1):this.firstCharOffset:this.tokenStart}const Gi={value:String};function Ki(e,t){let n=this.getTokenStart(this.tokenIndex),r;return this.skipUntilBalanced(this.tokenIndex,e||this.consumeUntilBalanceEnd),r=t&&this.tokenStart>n?Wi.call(this):this.tokenStart,{type:`Raw`,loc:this.getLocation(n,r),value:this.substring(n,r)}}function qi(e){this.tokenize(e.value)}const Ji=Object.freeze(Object.defineProperty({__proto__:null,generate:qi,name:`Raw`,parse:Ki,structure:Gi},Symbol.toStringTag,{value:`Module`}));function Yi(){return this.Raw(this.consumeUntilLeftCurlyBracket,!0)}function Xi(){let e=this.SelectorList();return e.type!==`Raw`&&this.eof===!1&&this.tokenType!==23&&this.error(),e}const Zi={prelude:[`SelectorList`,`Raw`],block:[`Block`]};function Qi(){let e=this.tokenIndex,t=this.tokenStart,n,r;return n=this.parseRulePrelude?this.parseWithFallback(Xi,Yi):Yi.call(this,e),r=this.Block(!0),{type:`Rule`,loc:this.getLocation(t,this.tokenStart),prelude:n,block:r}}function $i(e){this.node(e.prelude),this.node(e.block)}const ea=Object.freeze(Object.defineProperty({__proto__:null,generate:$i,name:`Rule`,parse:Qi,structure:Zi,walkContext:`rule`},Symbol.toStringTag,{value:`Module`})),ta={root:[`SelectorList`,`Raw`,null],limit:[`SelectorList`,`Raw`,null]};function na(){let e=null,t=null;this.skipSC();let n=this.tokenStart;return this.tokenType===21&&(this.next(),this.skipSC(),e=this.parseWithFallback(this.SelectorList,()=>this.Raw(!1,!0)),this.skipSC(),this.eat(22)),this.lookupNonWSType(0)===1&&(this.skipSC(),this.eatIdent(`to`),this.skipSC(),this.eat(21),this.skipSC(),t=this.parseWithFallback(this.SelectorList,()=>this.Raw(!1,!0)),this.skipSC(),this.eat(22)),{type:`Scope`,loc:this.getLocation(n,this.tokenStart),root:e,limit:t}}function ra(e){e.root&&(this.token(21,`(`),this.node(e.root),this.token(22,`)`)),e.limit&&(this.token(1,`to`),this.token(21,`(`),this.node(e.limit),this.token(22,`)`))}const ia=Object.freeze(Object.defineProperty({__proto__:null,generate:ra,name:`Scope`,parse:na,structure:ta},Symbol.toStringTag,{value:`Module`})),aa={children:[[`TypeSelector`,`IdSelector`,`ClassSelector`,`AttributeSelector`,`PseudoClassSelector`,`PseudoElementSelector`,`Combinator`]]};function oa(){let e=this.readSequence(this.scope.Selector);return this.getFirstListNode(e)===null&&this.error(`Selector is expected`),{type:`Selector`,loc:this.getLocationFromList(e),children:e}}function sa(e){this.children(e)}const ca=Object.freeze(Object.defineProperty({__proto__:null,generate:sa,name:`Selector`,parse:oa,structure:aa},Symbol.toStringTag,{value:`Module`})),la={children:[[`Selector`,`Raw`]]};function ua(){let e=this.createList();for(;!this.eof;){if(e.push(this.Selector()),this.tokenType===18){this.next();continue}break}return{type:`SelectorList`,loc:this.getLocationFromList(e),children:e}}function da(e){this.children(e,()=>this.token(18,`,`))}const fa=Object.freeze(Object.defineProperty({__proto__:null,generate:da,name:`SelectorList`,parse:ua,structure:la,walkContext:`selector`},Symbol.toStringTag,{value:`Module`})),pa={value:String};function ma(){return{type:`String`,loc:this.getLocation(this.tokenStart,this.tokenEnd),value:Et(this.consume(5))}}function ha(e){this.token(5,Dt(e.value))}const ga=Object.freeze(Object.defineProperty({__proto__:null,generate:ha,name:`String`,parse:ma,structure:pa},Symbol.toStringTag,{value:`Module`}));function _a(){return this.Raw(null,!1)}const va={children:[[`Comment`,`CDO`,`CDC`,`Atrule`,`Rule`,`Raw`]]};function ya(){let e=this.tokenStart,t=this.createList(),n;for(;!this.eof;){switch(this.tokenType){case 13:this.next();continue;case 25:if(this.charCodeAt(this.tokenStart+2)!==33){this.next();continue}n=this.Comment();break;case 14:n=this.CDO();break;case 15:n=this.CDC();break;case 3:n=this.parseWithFallback(this.Atrule,_a);break;default:n=this.parseWithFallback(this.Rule,_a)}t.push(n)}return{type:`StyleSheet`,loc:this.getLocation(e,this.tokenStart),children:t}}function ba(e){this.children(e)}const xa=Object.freeze(Object.defineProperty({__proto__:null,generate:ba,name:`StyleSheet`,parse:ya,structure:va,walkContext:`stylesheet`},Symbol.toStringTag,{value:`Module`})),Sa={declaration:`Declaration`};function Ca(){let e=this.tokenStart;this.eat(21),this.skipSC();let t=this.Declaration();return this.eof||this.eat(22),{type:`SupportsDeclaration`,loc:this.getLocation(e,this.tokenStart),declaration:t}}function wa(e){this.token(21,`(`),this.node(e.declaration),this.token(22,`)`)}const Ta=Object.freeze(Object.defineProperty({__proto__:null,generate:wa,name:`SupportsDeclaration`,parse:Ca,structure:Sa},Symbol.toStringTag,{value:`Module`}));function Ea(){this.tokenType!==1&&this.isDelim(42)===!1&&this.error(`Identifier or asterisk is expected`),this.next()}const Da={name:String};function Oa(){let e=this.tokenStart;return this.isDelim(124)?(this.next(),Ea.call(this)):(Ea.call(this),this.isDelim(124)&&(this.next(),Ea.call(this))),{type:`TypeSelector`,loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e)}}function ka(e){this.tokenize(e.name)}const Aa=Object.freeze(Object.defineProperty({__proto__:null,generate:ka,name:`TypeSelector`,parse:Oa,structure:Da},Symbol.toStringTag,{value:`Module`}));function ja(e,t){let n=0;for(let r=this.tokenStart+e;r<this.tokenEnd;r++){let i=this.charCodeAt(r);if(i===45&&t&&n!==0)return ja.call(this,e+n+1,!1),-1;P(i)||this.error(t&&n!==0?`Hyphen minus`+(n<6?` or hex digit`:``)+` is expected`:n<6?`Hex digit is expected`:`Unexpected input`,r),++n>6&&this.error(`Too many hex digits`,r)}return this.next(),n}function Ma(e){let t=0;for(;this.isDelim(63);)++t>e&&this.error(`Too many question marks`),this.next()}function Na(e){this.charCodeAt(this.tokenStart)!==e&&this.error((e===43?`Plus sign`:`Hyphen minus`)+` is expected`)}function Pa(){let e=0;switch(this.tokenType){case 10:if(e=ja.call(this,1,!0),this.isDelim(63)){Ma.call(this,6-e);break}if(this.tokenType===12||this.tokenType===10){Na.call(this,45),ja.call(this,1,!1);break}break;case 12:e=ja.call(this,1,!0),e>0&&Ma.call(this,6-e);break;default:if(this.eatDelim(43),this.tokenType===1){e=ja.call(this,0,!0),e>0&&Ma.call(this,6-e);break}if(this.isDelim(63)){this.next(),Ma.call(this,5);break}this.error(`Hex digit or question mark is expected`)}}const Fa={value:String};function Ia(){let e=this.tokenStart;return this.eatIdent(`u`),Pa.call(this),{type:`UnicodeRange`,loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e)}}function La(e){this.tokenize(e.value)}const Ra=Object.freeze(Object.defineProperty({__proto__:null,generate:La,name:`UnicodeRange`,parse:Ia,structure:Fa},Symbol.toStringTag,{value:`Module`})),za={value:String};function Ba(){let e=this.tokenStart,t;switch(this.tokenType){case 7:t=Ot(this.consume(7));break;case 2:this.cmpStr(this.tokenStart,this.tokenEnd,`url(`)||this.error("Function name must be `url`"),this.eat(2),this.skipSC(),t=Et(this.consume(5)),this.skipSC(),this.eof||this.eat(22);break;default:this.error(`Url or Function is expected`)}return{type:`Url`,loc:this.getLocation(e,this.tokenStart),value:t}}function Va(e){this.token(7,kt(e.value))}const Ha=Object.freeze(Object.defineProperty({__proto__:null,generate:Va,name:`Url`,parse:Ba,structure:za},Symbol.toStringTag,{value:`Module`})),Ua={children:[[]]};function Wa(){let e=this.tokenStart,t=this.readSequence(this.scope.Value);return{type:`Value`,loc:this.getLocation(e,this.tokenStart),children:t}}function Ga(e){this.children(e)}const Ka=Object.freeze(Object.defineProperty({__proto__:null,generate:Ga,name:`Value`,parse:Wa,structure:Ua},Symbol.toStringTag,{value:`Module`})),qa=Object.freeze({type:`WhiteSpace`,loc:null,value:` `}),Ja={value:String};function Ya(){return this.eat(13),qa}function Xa(e){this.token(13,e.value)}const W=Lt({node:Object.freeze(Object.defineProperty({__proto__:null,AnPlusB:Ut,Atrule:Yt,AtrulePrelude:$t,AttributeSelector:on,Block:mn,Brackets:vn,CDC:Sn,CDO:En,ClassSelector:An,Combinator:Pn,Comment:Rn,Condition:Gn,Declaration:er,DeclarationList:ar,Dimension:lr,Feature:pr,FeatureFunction:vr,FeatureRange:wr,Function:Or,GeneralEnclosed:Mr,Hash:Ir,IdSelector:Wr,Identifier:Br,Layer:Jr,LayerList:Qr,MediaQuery:ni,MediaQueryList:oi,NestingSelector:ui,Nth:mi,Number:vi,Operator:Si,Parentheses:Ei,Percentage:Ai,PseudoClassSelector:Pi,PseudoElementSelector:Ri,Ratio:Ui,Raw:Ji,Rule:ea,Scope:ia,Selector:ca,SelectorList:fa,String:ga,StyleSheet:xa,SupportsDeclaration:Ta,TypeSelector:Aa,UnicodeRange:Ra,Url:Ha,Value:Ka,WhiteSpace:Object.freeze(Object.defineProperty({__proto__:null,generate:Xa,name:`WhiteSpace`,parse:Ya,structure:Ja},Symbol.toStringTag,{value:`Module`}))},Symbol.toStringTag,{value:`Module`}))}),Za=[`left`,`right`,`top`,`bottom`,`inset-block-start`,`inset-block-end`,`inset-inline-start`,`inset-inline-end`,`inset-block`,`inset-inline`,`inset`];function Qa(e){return Za.includes(e)}const $a=[`margin-block-start`,`margin-block-end`,`margin-block`,`margin-inline-start`,`margin-inline-end`,`margin-inline`,`margin-bottom`,`margin-left`,`margin-right`,`margin-top`,`margin`];function eo(e){return $a.includes(e)}const to=[`width`,`height`,`min-width`,`min-height`,`max-width`,`max-height`,`block-size`,`inline-size`,`min-block-size`,`min-inline-size`,`max-block-size`,`max-inline-size`];function no(e){return to.includes(e)}const ro=[`justify-self`,`align-self`,`place-self`];function io(e){return ro.includes(e)}const ao=[...Za,...$a,...to,...ro,`position-anchor`,`position-area`],oo=[...to,...Za,...$a];function so(e){return oo.includes(e)}const co=[`top`,`left`,`right`,`bottom`,`start`,`end`,`self-start`,`self-end`,`center`,`inside`,`outside`];function lo(e){return co.includes(e)}const uo=[`width`,`height`,`block`,`inline`,`self-block`,`self-inline`];function fo(e){return uo.includes(e)}const po=new Set([`Atrule`,`Selector`,`Declaration`]);function mo(e){let t=new SourceMapGenerator,n={line:1,column:0},r={line:0,column:0},i={line:1,column:0},a={generated:i},o=1,s=0,c=!1,l=e.node;e.node=function(e){if(e.loc&&e.loc.start&&po.has(e.type)){let l=e.loc.start.line,u=e.loc.start.column-1;(r.line!==l||r.column!==u)&&(r.line=l,r.column=u,n.line=o,n.column=s,c&&(c=!1,(n.line!==i.line||n.column!==i.column)&&t.addMapping(a)),c=!0,t.addMapping({source:e.loc.source,original:r,generated:n}))}l.call(this,e),c&&po.has(e.type)&&(i.line=o,i.column=s)};let u=e.emit;e.emit=function(e,t,n){for(let t=0;t<e.length;t++)e.charCodeAt(t)===10?(o++,s=0):s++;u(e,t,n)};let d=e.result;return e.result=function(){return c&&t.addMapping(a),{css:d(),map:t}},e}const ho=(e,t)=>{if(e===9&&(e=t),typeof e==`string`){let t=e.charCodeAt(0);return t>127?32768:t<<8}return e},go=[[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],[`/`,`*`]],_o=go.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 vo(e){let t=new Set(e.map(([e,t])=>ho(e)<<16|ho(t)));return function(e,n,r){let i=ho(n,r),a=r.charCodeAt(0);return(a===45&&n!==1&&n!==2&&n!==15||a===43?t.has(e<<16|a<<8):t.has(e<<16|i))&&this.emit(` `,13,!0),i}}const yo=vo(go),bo=vo(_o),xo=Object.freeze(Object.defineProperty({__proto__:null,safe:bo,spec:yo},Symbol.toStringTag,{value:`Module`}));function So(e,t){if(typeof t==`function`){let n=null;e.children.forEach(e=>{n!==null&&t.call(this,n),this.node(e),n=e});return}e.children.forEach(this.node,this)}function Co(e){wt(e,(t,n,r)=>{this.token(t,e.slice(n,r))})}function wo(e){let t=new Map;for(let[n,r]of Object.entries(e.node))typeof(r.generate||r)==`function`&&t.set(n,r.generate||r);return function(e,n){let r=``,i=0,a={node(e){if(t.has(e.type))t.get(e.type).call(o,e);else throw Error(`Unknown node type: `+e.type)},tokenBefore:bo,token(e,t){i=this.tokenBefore(i,e,t),this.emit(t,e,!1),e===9&&t.charCodeAt(0)===92&&this.emit(`
2
- `,13,!0)},emit(e){r+=e},result(){return r}};n&&(typeof n.decorator==`function`&&(a=n.decorator(a)),n.sourceMap&&(a=mo(a)),n.mode in xo&&(a.tokenBefore=xo[n.mode]));let o={node:e=>a.node(e),children:So,token:(e,t)=>a.token(e,t),tokenize:Co};return a.node(e),a.result()}}const To=wo({node:Object.freeze(Object.defineProperty({__proto__:null,AnPlusB:Ht,Atrule:Jt,AtrulePrelude:Qt,AttributeSelector:an,Block:pn,Brackets:_n,CDC:xn,CDO:Tn,ClassSelector:kn,Combinator:Nn,Comment:Ln,Condition:Wn,Declaration:Zn,DeclarationList:ir,Dimension:cr,Feature:fr,FeatureFunction:_r,FeatureRange:Cr,Function:Dr,GeneralEnclosed:jr,Hash:Fr,IdSelector:Ur,Identifier:zr,Layer:qr,LayerList:Zr,MediaQuery:ti,MediaQueryList:ai,NestingSelector:li,Nth:pi,Number:_i,Operator:xi,Parentheses:Ti,Percentage:ki,PseudoClassSelector:Ni,PseudoElementSelector:Li,Ratio:Hi,Raw:qi,Rule:$i,Scope:ra,Selector:sa,SelectorList:da,String:ha,StyleSheet:ba,SupportsDeclaration:wa,TypeSelector:ka,UnicodeRange:La,Url:Va,Value:Ga,WhiteSpace:Xa},Symbol.toStringTag,{value:`Module`}))});function Eo(e,t){let n=Object.create(SyntaxError.prototype),r=Error();return Object.assign(n,{name:e,message:t,get stack(){return(r.stack||``).replace(/^(.+\n){1,3}/,`${e}: ${t}
1
+ var e=Object.defineProperty,t=Object.defineProperties,n=Object.getOwnPropertyDescriptors,r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable,o=(t,n,r)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r,s=(e,t)=>{for(var n in t||={})i.call(t,n)&&o(e,n,t[n]);if(r)for(var n of r(t))a.call(t,n)&&o(e,n,t[n]);return e},c=(e,r)=>t(e,n(r)),l=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())});const u=Math.min,d=Math.max,f=Math.round,p=Math.floor,m=e=>({x:e,y:e});function h(e,t){return typeof e==`function`?e(t):e}function g(e){return s({top:0,right:0,bottom:0,left:0},e)}function ee(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:g(e)}function _(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function v(e,t){return l(this,null,function*(){var n;t===void 0&&(t={});let{x:r,y:i,platform:a,rects:o,elements:s,strategy:c}=e,{boundary:l=`clippingAncestors`,rootBoundary:u=`viewport`,elementContext:d=`floating`,altBoundary:f=!1,padding:p=0}=h(t,e),m=ee(p),g=s[f?d===`floating`?`reference`:`floating`:d],v=_(yield a.getClippingRect({element:(n=yield a.isElement==null?void 0:a.isElement(g))==null||n?g:g.contextElement||(yield a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:l,rootBoundary:u,strategy:c})),y=d===`floating`?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,b=yield a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating),x=(yield a.isElement==null?void 0:a.isElement(b))&&(yield a.getScale==null?void 0:a.getScale(b))||{x:1,y:1},S=_(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:b,strategy:c}):y);return{top:(v.top-S.top+m.top)/x.y,bottom:(S.bottom-v.bottom+m.bottom)/x.y,left:(v.left-S.left+m.left)/x.x,right:(S.right-v.right+m.right)/x.x}})}function y(){return typeof window<`u`}function b(e){return te(e)?(e.nodeName||``).toLowerCase():`#document`}function x(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function S(e){return((te(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function te(e){return y()?e instanceof Node||e instanceof x(e).Node:!1}function C(e){return y()?e instanceof Element||e instanceof x(e).Element:!1}function w(e){return y()?e instanceof HTMLElement||e instanceof x(e).HTMLElement:!1}function ne(e){return!y()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof x(e).ShadowRoot}const re=/* @__PURE__ */ new Set([`inline`,`contents`]);function ie(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=E(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!re.has(i)}const ae=/* @__PURE__ */ new Set([`table`,`td`,`th`]);function oe(e){return ae.has(b(e))}const se=[`:popover-open`,`:modal`];function ce(e){return se.some(t=>{try{return e.matches(t)}catch{return!1}})}const le=[`transform`,`translate`,`scale`,`rotate`,`perspective`],ue=[`transform`,`translate`,`scale`,`rotate`,`perspective`,`filter`],de=[`paint`,`layout`,`strict`,`content`];function fe(e){let t=me(),n=C(e)?E(e):e;return le.some(e=>n[e]?n[e]!==`none`:!1)||(n.containerType?n.containerType!==`normal`:!1)||!t&&(n.backdropFilter?n.backdropFilter!==`none`:!1)||!t&&(n.filter?n.filter!==`none`:!1)||ue.some(e=>(n.willChange||``).includes(e))||de.some(e=>(n.contain||``).includes(e))}function pe(e){let t=D(e);for(;w(t)&&!T(t);){if(fe(t))return t;if(ce(t))return null;t=D(t)}return null}function me(){return typeof CSS>`u`||!CSS.supports?!1:CSS.supports(`-webkit-backdrop-filter`,`none`)}const he=/* @__PURE__ */ new Set([`html`,`body`,`#document`]);function T(e){return he.has(b(e))}function E(e){return x(e).getComputedStyle(e)}function ge(e){return C(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function D(e){if(b(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||ne(e)&&e.host||S(e);return ne(t)?t.host:t}function _e(e){let t=D(e);return T(t)?e.ownerDocument?e.ownerDocument.body:e.body:w(t)&&ie(t)?t:_e(t)}function O(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=_e(e),i=r===e.ownerDocument?.body,a=x(r);if(i){let e=ve(a);return t.concat(a,a.visualViewport||[],ie(r)?r:[],e&&n?O(e):[])}return t.concat(r,O(r,[],n))}function ve(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ye(e){let t=E(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=w(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=f(n)!==a||f(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function be(e){return C(e)?e:e.contextElement}function k(e){let t=be(e);if(!w(t))return m(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=ye(t),o=(a?f(n.width):n.width)/r,s=(a?f(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}const xe=/* @__PURE__ */ m(0);function Se(e){let t=x(e);return!me()||!t.visualViewport?xe:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ce(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==x(e)?!1:t}function A(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=be(e),o=m(1);t&&(r?C(r)&&(o=k(r)):o=k(e));let s=Ce(a,n,r)?Se(a):m(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=x(a),t=r&&C(r)?x(r):r,n=e,i=ve(n);for(;i&&r&&t!==n;){let e=k(i),t=i.getBoundingClientRect(),r=E(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=x(i),i=ve(n)}}return _({width:u,height:d,x:c,y:l})}function we(e,t){let n=ge(e).scrollLeft;return t?t.left+n:A(S(e)).left+n}function Te(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-we(e,n),y:n.top+t.scrollTop}}function Ee(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=S(r),s=t?ce(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=m(1),u=m(0),d=w(r);if((d||!d&&!a)&&((b(r)!==`body`||ie(o))&&(c=ge(r)),w(r))){let e=A(r);l=k(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Te(o,c):m(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function De(e){return Array.from(e.getClientRects())}function Oe(e){let t=S(e),n=ge(e),r=e.ownerDocument.body,i=d(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=d(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+we(e),s=-n.scrollTop;return E(r).direction===`rtl`&&(o+=d(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}function ke(e,t){let n=x(e),r=S(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=me();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=we(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=25&&(a-=o)}else l<=25&&(a+=l);return{width:a,height:o,x:s,y:c}}const Ae=/* @__PURE__ */ new Set([`absolute`,`fixed`]);function je(e,t){let n=A(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=w(e)?k(e):m(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Me(e,t,n){let r;if(t===`viewport`)r=ke(e,n);else if(t===`document`)r=Oe(S(e));else if(C(t))r=je(t,n);else{let n=Se(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return _(r)}function Ne(e,t){let n=D(e);return n===t||!C(n)||T(n)?!1:E(n).position===`fixed`||Ne(n,t)}function Pe(e,t){let n=t.get(e);if(n)return n;let r=O(e,[],!1).filter(e=>C(e)&&b(e)!==`body`),i=null,a=E(e).position===`fixed`,o=a?D(e):e;for(;C(o)&&!T(o);){let t=E(o),n=fe(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&Ae.has(i.position)||ie(o)&&!n&&Ne(e,o))?r=r.filter(e=>e!==o):i=t,o=D(o)}return t.set(e,r),r}function Fe(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?ce(t)?[]:Pe(t,this._c):[].concat(n),r],o=a[0],s=a.reduce((e,n)=>{let r=Me(t,n,i);return e.top=d(r.top,e.top),e.right=u(r.right,e.right),e.bottom=u(r.bottom,e.bottom),e.left=d(r.left,e.left),e},Me(t,o,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function Ie(e){let{width:t,height:n}=ye(e);return{width:t,height:n}}function Le(e,t,n){let r=w(t),i=S(t),a=n===`fixed`,o=A(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=m(0);function l(){c.x=we(i)}if(r||!r&&!a){if((b(t)!==`body`||ie(i))&&(s=ge(t)),r){let e=A(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l()}a&&!r&&i&&l();let u=i&&!r&&!a?Te(i,s):m(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function Re(e){return E(e).position===`static`}function ze(e,t){if(!w(e)||E(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return S(e)===n&&(n=n.ownerDocument.body),n}function Be(e,t){let n=x(e);if(ce(e))return n;if(!w(e)){let t=D(e);for(;t&&!T(t);){if(C(t)&&!Re(t))return t;t=D(t)}return n}let r=ze(e,t);for(;r&&oe(r)&&Re(r);)r=ze(r,t);return r&&T(r)&&Re(r)&&!fe(r)?n:r||pe(e)||n}const Ve=function(e){return l(this,null,function*(){let t=this.getOffsetParent||Be,n=this.getDimensions,r=yield n(e.floating);return{reference:Le(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function He(e){return E(e).direction===`rtl`}const j={convertOffsetParentRelativeRectToViewportRelativeRect:Ee,getDocumentElement:S,getClippingRect:Fe,getOffsetParent:Be,getElementRects:Ve,getClientRects:De,getDimensions:Ie,getScale:k,isElement:C,isRTL:He};function Ue(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function We(e,t){let n=null,r,i=S(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(l,f){l===void 0&&(l=!1),f===void 0&&(f=1),a();let m=e.getBoundingClientRect(),{left:h,top:g,width:ee,height:_}=m;if(l||t(),!ee||!_)return;let v=p(g),y=p(i.clientWidth-(h+ee)),b=p(i.clientHeight-(g+_)),x=p(h),S={rootMargin:-v+`px `+-y+`px `+-b+`px `+-x+`px`,threshold:d(0,u(1,f))||1},te=!0;function C(t){let n=t[0].intersectionRatio;if(n!==f){if(!te)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!Ue(m,e.getBoundingClientRect())&&o(),te=!1}try{n=new IntersectionObserver(C,c(s({},S),{root:i.ownerDocument}))}catch{n=new IntersectionObserver(C,S)}n.observe(e)}return o(!0),a}function Ge(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=be(e),u=i||a?[...l?O(l):[],...O(t)]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?We(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),p.observe(t));let m,h=c?A(e):null;c&&g();function g(){let t=A(e);h&&!Ue(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}const Ke=v;let M=null;var qe=class e{static createItem(e){return{prev:null,next:null,data:e}}constructor(){this.head=null,this.tail=null,this.cursor=null}createItem(t){return e.createItem(t)}allocateCursor(e,t){let n;return M===null?n={prev:e,next:t,cursor:this.cursor}:(n=M,M=M.cursor,n.prev=e,n.next=t,n.cursor=this.cursor),this.cursor=n,n}releaseCursor(){let{cursor:e}=this;this.cursor=e.cursor,e.prev=null,e.next=null,e.cursor=M,M=e}updateCursors(e,t,n,r){let{cursor:i}=this;for(;i!==null;)i.prev===e&&(i.prev=t),i.next===n&&(i.next=r),i=i.cursor}*[Symbol.iterator](){for(let e=this.head;e!==null;e=e.next)yield e.data}get size(){let e=0;for(let t=this.head;t!==null;t=t.next)e++;return e}get isEmpty(){return this.head===null}get first(){return this.head&&this.head.data}get last(){return this.tail&&this.tail.data}fromArray(t){let n=null;this.head=null;for(let r of t){let t=e.createItem(r);n===null?this.head=t:n.next=t,t.prev=n,n=t}return this.tail=n,this}toArray(){return[...this]}toJSON(){return[...this]}forEach(e,t=this){let n=this.allocateCursor(null,this.head);for(;n.next!==null;){let r=n.next;n.next=r.next,e.call(t,r.data,r,this)}this.releaseCursor()}forEachRight(e,t=this){let n=this.allocateCursor(this.tail,null);for(;n.prev!==null;){let r=n.prev;n.prev=r.prev,e.call(t,r.data,r,this)}this.releaseCursor()}reduce(e,t,n=this){let r=this.allocateCursor(null,this.head),i=t,a;for(;r.next!==null;)a=r.next,r.next=a.next,i=e.call(n,i,a.data,a,this);return this.releaseCursor(),i}reduceRight(e,t,n=this){let r=this.allocateCursor(this.tail,null),i=t,a;for(;r.prev!==null;)a=r.prev,r.prev=a.prev,i=e.call(n,i,a.data,a,this);return this.releaseCursor(),i}some(e,t=this){for(let n=this.head;n!==null;n=n.next)if(e.call(t,n.data,n,this))return!0;return!1}map(t,n=this){let r=new e;for(let e=this.head;e!==null;e=e.next)r.appendData(t.call(n,e.data,e,this));return r}filter(t,n=this){let r=new e;for(let e=this.head;e!==null;e=e.next)t.call(n,e.data,e,this)&&r.appendData(e.data);return r}nextUntil(e,t,n=this){if(e===null)return;let r=this.allocateCursor(null,e);for(;r.next!==null;){let e=r.next;if(r.next=e.next,t.call(n,e.data,e,this))break}this.releaseCursor()}prevUntil(e,t,n=this){if(e===null)return;let r=this.allocateCursor(e,null);for(;r.prev!==null;){let e=r.prev;if(r.prev=e.prev,t.call(n,e.data,e,this))break}this.releaseCursor()}clear(){this.head=null,this.tail=null}copy(){let t=new e;for(let e of this)t.appendData(e);return t}prepend(e){return this.updateCursors(null,e,this.head,e),this.head===null?this.tail=e:(this.head.prev=e,e.next=this.head),this.head=e,this}prependData(t){return this.prepend(e.createItem(t))}append(e){return this.insert(e)}appendData(t){return this.insert(e.createItem(t))}insert(e,t=null){if(t!==null){if(this.updateCursors(t.prev,e,t,e),t.prev===null){if(this.head!==t)throw Error(`before doesn't belong to list`);this.head=e,t.prev=e,e.next=t,this.updateCursors(null,e)}else t.prev.next=e,e.prev=t.prev,t.prev=e,e.next=t}else this.updateCursors(this.tail,e,null,e),this.tail===null?this.head=e:(this.tail.next=e,e.prev=this.tail),this.tail=e;return this}insertData(t,n){return this.insert(e.createItem(t),n)}remove(e){if(this.updateCursors(e,e.prev,e,e.next),e.prev!==null)e.prev.next=e.next;else{if(this.head!==e)throw Error(`item doesn't belong to list`);this.head=e.next}if(e.next!==null)e.next.prev=e.prev;else{if(this.tail!==e)throw Error(`item doesn't belong to list`);this.tail=e.prev}return e.prev=null,e.next=null,e}push(t){this.insert(e.createItem(t))}pop(){return this.tail===null?null:this.remove(this.tail)}unshift(t){this.prepend(e.createItem(t))}shift(){return this.head===null?null:this.remove(this.head)}prependList(e){return this.insertList(e,this.head)}appendList(e){return this.insertList(e)}insertList(e,t){return e.head===null?this:(t==null?(this.updateCursors(this.tail,e.tail,null,e.head),this.tail===null?this.head=e.head:(this.tail.next=e.head,e.head.prev=this.tail),this.tail=e.tail):(this.updateCursors(t.prev,e.tail,t,e.head),t.prev===null?this.head=e.head:(t.prev.next=e.head,e.head.prev=t.prev),t.prev=e.tail,e.tail.next=t),e.head=null,e.tail=null,this)}replace(e,t){`head`in t?this.insertList(t,e):this.insert(t,e),this.remove(e)}};function Je(e){let t={};for(let n of Object.keys(e)){let r=e[n];r&&(Array.isArray(r)||r instanceof qe?r=r.map(Je):r.constructor===Object&&(r=Je(r))),t[n]=r}return t}function N(e){return e>=48&&e<=57}function P(e){return N(e)||e>=65&&e<=70||e>=97&&e<=102}function Ye(e){return e>=65&&e<=90}function Xe(e){return e>=97&&e<=122}function Ze(e){return Ye(e)||Xe(e)}function Qe(e){return e>=128}function $e(e){return Ze(e)||Qe(e)||e===95}function et(e){return $e(e)||N(e)||e===45}function tt(e){return e>=0&&e<=8||e===11||e>=14&&e<=31||e===127}function nt(e){return e===10||e===13||e===12}function F(e){return nt(e)||e===32||e===9}function I(e,t){return!(e!==92||nt(t)||t===0)}function rt(e,t,n){return e===45?$e(t)||t===45||I(t,n):$e(e)?!0:e===92&&I(e,t)}function it(e,t,n){return e===43||e===45?N(t)?2:t===46&&N(n)?3:0:e===46?N(t)?2:0:+!!N(e)}function at(e){return+(e===65279||e===65534)}const ot=Array(128);for(let e=0;e<ot.length;e++)ot[e]=F(e)&&130||N(e)&&131||$e(e)&&132||tt(e)&&133||e||128;function st(e){return e<128?ot[e]:132}function L(e,t){return t<e.length?e.charCodeAt(t):0}function ct(e,t,n){return n===13&&L(e,t+1)===10?2:1}function lt(e,t,n){let r=e.charCodeAt(t);return Ye(r)&&(r|=32),r===n}function ut(e,t,n,r){if(n-t!==r.length||t<0||n>e.length)return!1;for(let i=t;i<n;i++){let n=r.charCodeAt(i-t),a=e.charCodeAt(i);if(Ye(a)&&(a|=32),a!==n)return!1}return!0}function dt(e,t){for(;t>=0&&F(e.charCodeAt(t));t--);return t+1}function ft(e,t){for(;t<e.length&&F(e.charCodeAt(t));t++);return t}function pt(e,t){for(;t<e.length&&N(e.charCodeAt(t));t++);return t}function R(e,t){if(t+=2,P(L(e,t-1))){for(let n=Math.min(e.length,t+5);t<n&&P(L(e,t));t++);let n=L(e,t);F(n)&&(t+=ct(e,t,n))}return t}function mt(e,t){for(;t<e.length;t++){let n=e.charCodeAt(t);if(!et(n)){if(I(n,L(e,t+1))){t=R(e,t)-1;continue}break}}return t}function ht(e,t){let n=e.charCodeAt(t);if((n===43||n===45)&&(n=e.charCodeAt(t+=1)),N(n)&&(t=pt(e,t+1),n=e.charCodeAt(t)),n===46&&N(e.charCodeAt(t+1))&&(t+=2,t=pt(e,t)),lt(e,t,101)){let r=0;n=e.charCodeAt(t+1),(n===45||n===43)&&(r=1,n=e.charCodeAt(t+2)),N(n)&&(t=pt(e,t+1+r+1))}return t}function gt(e,t){for(;t<e.length;t++){let n=e.charCodeAt(t);if(n===41){t++;break}I(n,L(e,t+1))&&(t=R(e,t))}return t}function _t(e){if(e.length===1&&!P(e.charCodeAt(0)))return e[0];let t=parseInt(e,16);return(t===0||t>=55296&&t<=57343||t>1114111)&&(t=65533),String.fromCodePoint(t)}const vt=/* @__PURE__ */ `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.comment-token`.split(`.`);function yt(e=null,t){return e===null||e.length<t?new Uint32Array(Math.max(t+1024,16384)):e}function bt(e){let t=e.source,n=t.length,r=t.length>0?at(t.charCodeAt(0)):0,i=yt(e.lines,n),a=yt(e.columns,n),o=e.startLine,s=e.startColumn;for(let e=r;e<n;e++){let r=t.charCodeAt(e);i[e]=o,a[e]=s++,(r===10||r===13||r===12)&&(r===13&&e+1<n&&t.charCodeAt(e+1)===10&&(e++,i[e]=o,a[e]=s),o++,s=1)}i[n]=o,a[n]=s,e.lines=i,e.columns=a,e.computed=!0}var xt=class{constructor(e,t,n,r){this.setSource(e,t,n,r),this.lines=null,this.columns=null}setSource(e=``,t=0,n=1,r=1){this.source=e,this.startOffset=t,this.startLine=n,this.startColumn=r,this.computed=!1}getLocation(e,t){return this.computed||bt(this),{source:t,offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]}}getLocationRange(e,t,n){return this.computed||bt(this),{source:n,start:{offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]},end:{offset:this.startOffset+t,line:this.lines[t],column:this.columns[t]}}}};const z=16777215,B=/* @__PURE__ */ new Uint8Array(32);B[2]=22,B[21]=22,B[19]=20,B[23]=24;function St(e){return B[e]!==0}var Ct=class{constructor(e,t){this.setSource(e,t)}reset(){this.eof=!1,this.tokenIndex=-1,this.tokenType=0,this.tokenStart=this.firstCharOffset,this.tokenEnd=this.firstCharOffset}setSource(e=``,t=()=>{}){e=String(e||``);let n=e.length,r=yt(this.offsetAndType,e.length+1),i=yt(this.balance,e.length+1),a=0,o=-1,s=0,c=e.length;this.offsetAndType=null,this.balance=null,i.fill(0),t(e,(e,t,n)=>{let l=a++;if(r[l]=e<<24|n,o===-1&&(o=t),i[l]=c,e===s){let e=i[c];i[c]=l,c=e,s=B[r[e]>>24]}else St(e)&&(c=l,s=B[e])}),r[a]=0|n,i[a]=a;for(let e=0;e<a;e++){let t=i[e];if(t<=e){let n=i[t];n!==e&&(i[e]=n)}else t>a&&(i[e]=a)}this.source=e,this.firstCharOffset=o===-1?0:o,this.tokenCount=a,this.offsetAndType=r,this.balance=i,this.reset(),this.next()}lookupType(e){return e+=this.tokenIndex,e<this.tokenCount?this.offsetAndType[e]>>24:0}lookupTypeNonSC(e){for(let t=this.tokenIndex;t<this.tokenCount;t++){let n=this.offsetAndType[t]>>24;if(n!==13&&n!==25&&e--===0)return n}return 0}lookupOffset(e){return e+=this.tokenIndex,e<this.tokenCount?this.offsetAndType[e-1]&z:this.source.length}lookupOffsetNonSC(e){for(let t=this.tokenIndex;t<this.tokenCount;t++){let n=this.offsetAndType[t]>>24;if(n!==13&&n!==25&&e--===0)return t-this.tokenIndex}return 0}lookupValue(e,t){return e+=this.tokenIndex,e<this.tokenCount&&ut(this.source,this.offsetAndType[e-1]&z,this.offsetAndType[e]&z,t)}getTokenStart(e){return e===this.tokenIndex?this.tokenStart:e>0?e<this.tokenCount?this.offsetAndType[e-1]&z:this.offsetAndType[this.tokenCount]&z:this.firstCharOffset}substrToCursor(e){return this.source.substring(e,this.tokenStart)}isBalanceEdge(e){return this.balance[this.tokenIndex]<e}isDelim(e,t){return t?this.lookupType(t)===9&&this.source.charCodeAt(this.lookupOffset(t))===e:this.tokenType===9&&this.source.charCodeAt(this.tokenStart)===e}skip(e){let t=this.tokenIndex+e;t<this.tokenCount?(this.tokenIndex=t,this.tokenStart=this.offsetAndType[t-1]&z,t=this.offsetAndType[t],this.tokenType=t>>24,this.tokenEnd=t&z):(this.tokenIndex=this.tokenCount,this.next())}next(){let e=this.tokenIndex+1;e<this.tokenCount?(this.tokenIndex=e,this.tokenStart=this.tokenEnd,e=this.offsetAndType[e],this.tokenType=e>>24,this.tokenEnd=e&z):(this.eof=!0,this.tokenIndex=this.tokenCount,this.tokenType=0,this.tokenStart=this.tokenEnd=this.source.length)}skipSC(){for(;this.tokenType===13||this.tokenType===25;)this.next()}skipUntilBalanced(e,t){let n=e,r=0,i=0;t:for(;n<this.tokenCount;n++){if(r=this.balance[n],r<e)break t;switch(i=n>0?this.offsetAndType[n-1]&z:this.firstCharOffset,t(this.source.charCodeAt(i))){case 1:break t;case 2:n++;break t;default:St(this.offsetAndType[n]>>24)&&(n=r)}}this.skip(n-this.tokenIndex)}forEachToken(e){for(let t=0,n=this.firstCharOffset;t<this.tokenCount;t++){let r=n,i=this.offsetAndType[t],a=i&z,o=i>>24;n=a,e(o,r,a,t)}}dump(){let e=Array(this.tokenCount);return this.forEachToken((t,n,r,i)=>{e[i]={idx:i,type:vt[t],chunk:this.source.substring(n,r),balance:this.balance[i]}}),e}};function wt(e,t){function n(t){return t<s?e.charCodeAt(t):0}function r(){if(l=ht(e,l),rt(n(l),n(l+1),n(l+2))){u=12,l=mt(e,l);return}if(n(l)===37){u=11,l++;return}u=10}function i(){let t=l;if(l=mt(e,l),ut(e,t,l,`url`)&&n(l)===40){if(l=ft(e,l+1),n(l)===34||n(l)===39){u=2,l=t+4;return}o();return}if(n(l)===40){u=2,l++;return}u=1}function a(t){for(t||=n(l++),u=5;l<e.length;l++){let r=e.charCodeAt(l);switch(st(r)){case t:l++;return;case 130:if(nt(r)){l+=ct(e,l,r),u=6;return}break;case 92:if(l===e.length-1)break;let i=n(l+1);nt(i)?l+=ct(e,l+1,i):I(r,i)&&(l=R(e,l)-1)}}}function o(){for(u=7,l=ft(e,l);l<e.length;l++){let t=e.charCodeAt(l);switch(st(t)){case 41:l++;return;case 130:if(l=ft(e,l),n(l)===41||l>=e.length){l<e.length&&l++;return}l=gt(e,l),u=8;return;case 34:case 39:case 40:case 133:l=gt(e,l),u=8;return;case 92:if(I(t,n(l+1))){l=R(e,l)-1;break}l=gt(e,l),u=8;return}}}e=String(e||``);let s=e.length,c=at(n(0)),l=c,u;for(;l<s;){let o=e.charCodeAt(l);switch(st(o)){case 130:u=13,l=ft(e,l+1);break;case 34:a();break;case 35:et(n(l+1))||I(n(l+1),n(l+2))?(u=4,l=mt(e,l+1)):(u=9,l++);break;case 39:a();break;case 40:u=21,l++;break;case 41:u=22,l++;break;case 43:it(o,n(l+1),n(l+2))?r():(u=9,l++);break;case 44:u=18,l++;break;case 45:it(o,n(l+1),n(l+2))?r():n(l+1)===45&&n(l+2)===62?(u=15,l+=3):rt(o,n(l+1),n(l+2))?i():(u=9,l++);break;case 46:it(o,n(l+1),n(l+2))?r():(u=9,l++);break;case 47:n(l+1)===42?(u=25,l=e.indexOf(`*/`,l+2),l=l===-1?e.length:l+2):(u=9,l++);break;case 58:u=16,l++;break;case 59:u=17,l++;break;case 60:n(l+1)===33&&n(l+2)===45&&n(l+3)===45?(u=14,l+=4):(u=9,l++);break;case 64:rt(n(l+1),n(l+2),n(l+3))?(u=3,l=mt(e,l+1)):(u=9,l++);break;case 91:u=19,l++;break;case 92:I(o,n(l+1))?i():(u=9,l++);break;case 93:u=20,l++;break;case 123:u=23,l++;break;case 125:u=24,l++;break;case 131:r();break;case 132:i();break;default:u=9,l++}t(u,c,c=l)}}function Tt(e,t){return t||=0,e.length-t>=2&&e.charCodeAt(t)===45&&e.charCodeAt(t+1)===45}function Et(e){let t=e.length,n=e.charCodeAt(0),r=+(n===34||n===39),i=r===1&&t>1&&e.charCodeAt(t-1)===n?t-2:t-1,a=``;for(let n=r;n<=i;n++){let r=e.charCodeAt(n);if(r===92){if(n===i){n!==t-1&&(a=e.substr(n+1));break}if(r=e.charCodeAt(++n),I(92,r)){let t=n-1,r=R(e,t);n=r-1,a+=_t(e.substring(t+1,r))}else r===13&&e.charCodeAt(n+1)===10&&n++}else a+=e[n]}return a}function Dt(e,t){let n=``,r=!1;for(let t=0;t<e.length;t++){let i=e.charCodeAt(t);if(i===0){n+=`�`;continue}if(i<=31||i===127){n+=`\\`+i.toString(16),r=!0;continue}i===34||i===92?(n+=`\\`+e.charAt(t),r=!1):(r&&(P(i)||F(i))&&(n+=` `),n+=e.charAt(t),r=!1)}return`"`+n+`"`}function Ot(e){let t=e.length,n=4,r=e.charCodeAt(t-1)===41?t-2:t-1,i=``;for(;n<r&&F(e.charCodeAt(n));)n++;for(;n<r&&F(e.charCodeAt(r));)r--;for(let a=n;a<=r;a++){let n=e.charCodeAt(a);if(n===92){if(a===r){a!==t-1&&(i=e.substr(a+1));break}if(n=e.charCodeAt(++a),I(92,n)){let t=a-1,n=R(e,t);a=n-1,i+=_t(e.substring(t+1,n))}else n===13&&e.charCodeAt(a+1)===10&&a++}else i+=e[a]}return i}function kt(e){let t=``,n=!1;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r);if(i===0){t+=`�`;continue}if(i<=31||i===127){t+=`\\`+i.toString(16),n=!0;continue}i===32||i===92||i===34||i===39||i===40||i===41?(t+=`\\`+e.charAt(r),n=!1):(n&&P(i)&&(t+=` `),t+=e.charAt(r),n=!1)}return`url(`+t+`)`}const{hasOwnProperty:At}=Object.prototype,V=function(){};function jt(e){return typeof e==`function`?e:V}function Mt(e,t){return function(n,r,i){n.type===t&&e.call(this,n,r,i)}}function Nt(e,t){let n=t.structure,r=[];for(let e in n){if(At.call(n,e)===!1)continue;let t=n[e],i={name:e,type:!1,nullable:!1};Array.isArray(t)||(t=[t]);for(let e of t)e===null?i.nullable=!0:typeof e==`string`?i.type=`node`:Array.isArray(e)&&(i.type=`list`);i.type&&r.push(i)}return r.length?{context:t.walkContext,fields:r}:null}function Pt(e){let t={};for(let n in e.node)if(At.call(e.node,n)){let r=e.node[n];if(!r.structure)throw Error("Missed `structure` field in `"+n+"` node type definition");t[n]=Nt(n,r)}return t}function Ft(e,t){let n=e.fields.slice(),r=e.context,i=typeof r==`string`;return t&&n.reverse(),function(e,a,o,s){let c;i&&(c=a[r],a[r]=e);for(let r of n){let n=e[r.name];if(!r.nullable||n){if(r.type===`list`){if(t?n.reduceRight(s,!1):n.reduce(s,!1))return!0}else if(o(n))return!0}}i&&(a[r]=c)}}function It({StyleSheet:e,Atrule:t,Rule:n,Block:r,DeclarationList:i}){return{Atrule:{StyleSheet:e,Atrule:t,Rule:n,Block:r},Rule:{StyleSheet:e,Atrule:t,Rule:n,Block:r},Declaration:{StyleSheet:e,Atrule:t,Rule:n,Block:r,DeclarationList:i}}}function Lt(e){let t=Pt(e),n={},r={},i=/* @__PURE__ */ Symbol(`break-walk`),a=/* @__PURE__ */ Symbol(`skip-node`);for(let e in t)At.call(t,e)&&t[e]!==null&&(n[e]=Ft(t[e],!1),r[e]=Ft(t[e],!0));let o=It(n),s=It(r),c=function(e,c){function l(e,t,n){let r=u.call(m,e,t,n);return r===i||r!==a&&!!(f.hasOwnProperty(e.type)&&f[e.type](e,m,l,p)||d.call(m,e,t,n)===i)}let u=V,d=V,f=n,p=(e,t,n,r)=>e||l(t,n,r),m={break:i,skip:a,root:e,stylesheet:null,atrule:null,atrulePrelude:null,rule:null,selector:null,block:null,declaration:null,function:null};if(typeof c==`function`)u=c;else if(c&&(u=jt(c.enter),d=jt(c.leave),c.reverse&&(f=r),c.visit)){if(o.hasOwnProperty(c.visit))f=c.reverse?s[c.visit]:o[c.visit];else if(!t.hasOwnProperty(c.visit))throw Error("Bad value `"+c.visit+"` for `visit` option (should be: "+Object.keys(t).sort().join(`, `)+`)`);u=Mt(u,c.visit),d=Mt(d,c.visit)}if(u===V&&d===V)throw Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");l(e)};return c.break=i,c.skip=a,c.find=function(e,t){let n=null;return c(e,function(e,r,a){if(t.call(this,e,r,a))return n=e,i}),n},c.findLast=function(e,t){let n=null;return c(e,{reverse:!0,enter(e,r,a){if(t.call(this,e,r,a))return n=e,i}}),n},c.findAll=function(e,t){let n=[];return c(e,function(e,r,i){t.call(this,e,r,i)&&n.push(e)}),n},c}function Rt(e,t){let n=this.tokenStart+e,r=this.charCodeAt(n);for((r===43||r===45)&&(t&&this.error(`Number sign is not allowed`),n++);n<this.tokenEnd;n++)N(this.charCodeAt(n))||this.error(`Integer is expected`,n)}function H(e){return Rt.call(this,0,e)}function U(e,t){if(!this.cmpChar(this.tokenStart+e,t)){let n=``;switch(t){case 110:n=`N is expected`;break;case 45:n=`HyphenMinus is expected`}this.error(n,this.tokenStart+e)}}function zt(){let e=0,t=0,n=this.tokenType;for(;n===13||n===25;)n=this.lookupType(++e);if(n!==10){if(this.isDelim(43,e)||this.isDelim(45,e)){t=this.isDelim(43,e)?43:45;do n=this.lookupType(++e);while(n===13||n===25);n!==10&&(this.skip(e),H.call(this,!0))}else return null}return e>0&&this.skip(e),t===0&&(n=this.charCodeAt(this.tokenStart),n!==43&&n!==45&&this.error(`Number sign is expected`)),H.call(this,t!==0),t===45?`-`+this.consume(10):this.consume(10)}const Bt={a:[String,null],b:[String,null]};function Vt(){let e=this.tokenStart,t=null,n=null;if(this.tokenType===10)H.call(this,!1),n=this.consume(10);else if(this.tokenType===1&&this.cmpChar(this.tokenStart,45))switch(t=`-1`,U.call(this,1,110),this.tokenEnd-this.tokenStart){case 2:this.next(),n=zt.call(this);break;case 3:U.call(this,2,45),this.next(),this.skipSC(),H.call(this,!0),n=`-`+this.consume(10);break;default:U.call(this,2,45),Rt.call(this,3,!0),this.next(),n=this.substrToCursor(e+2)}else if(this.tokenType===1||this.isDelim(43)&&this.lookupType(1)===1){let r=0;switch(t=`1`,this.isDelim(43)&&(r=1,this.next()),U.call(this,0,110),this.tokenEnd-this.tokenStart){case 1:this.next(),n=zt.call(this);break;case 2:U.call(this,1,45),this.next(),this.skipSC(),H.call(this,!0),n=`-`+this.consume(10);break;default:U.call(this,1,45),Rt.call(this,2,!0),this.next(),n=this.substrToCursor(e+r+1)}}else if(this.tokenType===12){let r=this.charCodeAt(this.tokenStart),i=r===43||r===45,a=this.tokenStart+i;for(;a<this.tokenEnd&&N(this.charCodeAt(a));a++);a===this.tokenStart+i&&this.error(`Integer is expected`,this.tokenStart+i),U.call(this,a-this.tokenStart,110),t=this.substring(e,a),a+1===this.tokenEnd?(this.next(),n=zt.call(this)):(U.call(this,a-this.tokenStart+1,45),a+2===this.tokenEnd?(this.next(),this.skipSC(),H.call(this,!0),n=`-`+this.consume(10)):(Rt.call(this,a-this.tokenStart+2,!0),this.next(),n=this.substrToCursor(a+1)))}else this.error();return t!==null&&t.charCodeAt(0)===43&&(t=t.substr(1)),n!==null&&n.charCodeAt(0)===43&&(n=n.substr(1)),{type:`AnPlusB`,loc:this.getLocation(e,this.tokenStart),a:t,b:n}}function Ht(e){if(e.a){let t=e.a===`+1`&&`n`||e.a===`1`&&`n`||e.a===`-1`&&`-n`||e.a+`n`;if(e.b){let n=e.b[0]===`-`||e.b[0]===`+`?e.b:`+`+e.b;this.tokenize(t+n)}else this.tokenize(t)}else this.tokenize(e.b)}const Ut=/* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({__proto__:null,generate:Ht,name:`AnPlusB`,parse:Vt,structure:Bt},Symbol.toStringTag,{value:`Module`}));function Wt(){return this.Raw(this.consumeUntilLeftCurlyBracketOrSemicolon,!0)}function Gt(){for(let e=1,t;t=this.lookupType(e);e++){if(t===24)return!0;if(t===23||t===3)return!1}return!1}const Kt={name:String,prelude:[`AtrulePrelude`,`Raw`,null],block:[`Block`,null]};function qt(e=!1){let t=this.tokenStart,n,r,i=null,a=null;switch(this.eat(3),n=this.substrToCursor(t+1),r=n.toLowerCase(),this.skipSC(),this.eof===!1&&this.tokenType!==23&&this.tokenType!==17&&(i=this.parseAtrulePrelude?this.parseWithFallback(this.AtrulePrelude.bind(this,n,e),Wt):Wt.call(this,this.tokenIndex),this.skipSC()),this.tokenType){case 17:this.next();break;case 23:a=hasOwnProperty.call(this.atrule,r)&&typeof this.atrule[r].block==`function`?this.atrule[r].block.call(this,e):this.Block(Gt.call(this))}return{type:`Atrule`,loc:this.getLocation(t,this.tokenStart),name:n,prelude:i,block:a}}function Jt(e){this.token(3,`@`+e.name),e.prelude!==null&&this.node(e.prelude),e.block?this.node(e.block):this.token(17,`;`)}const Yt=/* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({__proto__:null,generate:Jt,name:`Atrule`,parse:qt,structure:Kt,walkContext:`atrule`},Symbol.toStringTag,{value:`Module`})),Xt={children:[[]]};function Zt(e){let t=null;return e!==null&&(e=e.toLowerCase()),this.skipSC(),t=hasOwnProperty.call(this.atrule,e)&&typeof this.atrule[e].prelude==`function`?this.atrule[e].prelude.call(this):this.readSequence(this.scope.AtrulePrelude),this.skipSC(),this.eof!==!0&&this.tokenType!==23&&this.tokenType!==17&&this.error(`Semicolon or block is expected`),{type:`AtrulePrelude`,loc:this.getLocationFromList(t),children:t}}function Qt(e){this.children(e)}const $t=/* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({__proto__:null,generate:Qt,name:`AtrulePrelude`,parse:Zt,structure:Xt,walkContext:`atrulePrelude`},Symbol.toStringTag,{value:`Module`}));function en(){this.eof&&this.error(`Unexpected end of input`);let e=this.tokenStart,t=!1;return this.isDelim(42)?(t=!0,this.next()):this.isDelim(124)||this.eat(1),this.isDelim(124)?this.charCodeAt(this.tokenStart+1)===61?t&&this.error(`Identifier is expected`,this.tokenEnd):(this.next(),this.eat(1)):t&&this.error(`Vertical line is expected`),{type:`Identifier`,loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e)}}function tn(){let e=this.tokenStart,t=this.charCodeAt(e);return t!==61&&t!==126&&t!==94&&t!==36&&t!==42&&t!==124&&this.error(`Attribute selector (=, ~=, ^=, $=, *=, |=) is expected`),this.next(),t!==61&&(this.isDelim(61)||this.error(`Equal sign is expected`),this.next()),this.substrToCursor(e)}const nn={name:`Identifier`,matcher:[String,null],value:[`String`,`Identifier`,null],flags:[String,null]};function rn(){let e=this.tokenStart,t,n=null,r=null,i=null;return this.eat(19),this.skipSC(),t=en.call(this),this.skipSC(),this.tokenType!==20&&(this.tokenType!==1&&(n=tn.call(this),this.skipSC(),r=this.tokenType===5?this.String():this.Identifier(),this.skipSC()),this.tokenType===1&&(i=this.consume(1),this.skipSC())),this.eat(20),{type:`AttributeSelector`,loc:this.getLocation(e,this.tokenStart),name:t,matcher:n,value:r,flags:i}}function an(e){this.token(9,`[`),this.node(e.name),e.matcher!==null&&(this.tokenize(e.matcher),this.node(e.value)),e.flags!==null&&this.token(1,e.flags),this.token(9,`]`)}const on=/* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({__proto__:null,generate:an,name:`AttributeSelector`,parse:rn,structure:nn},Symbol.toStringTag,{value:`Module`}));function sn(){return this.Raw(null,!0)}function cn(){return this.parseWithFallback(this.Rule,sn)}function ln(){return this.Raw(this.consumeUntilSemicolonIncluded,!0)}function un(){if(this.tokenType===17)return ln.call(this,this.tokenIndex);let e=this.parseWithFallback(this.Declaration,ln);return this.tokenType===17&&this.next(),e}const dn={children:[[`Atrule`,`Rule`,`Declaration`]]};function fn(e){let t=e?un:cn,n=this.tokenStart,r=this.createList();this.eat(23);t:for(;!this.eof;)switch(this.tokenType){case 24:break t;case 13:case 25:this.next();break;case 3:r.push(this.parseWithFallback(this.Atrule.bind(this,e),sn));break;default:e&&this.isDelim(38)?r.push(cn.call(this)):r.push(t.call(this))}return this.eof||this.eat(24),{type:`Block`,loc:this.getLocation(n,this.tokenStart),children:r}}function pn(e){this.token(23,`{`),this.children(e,e=>{e.type===`Declaration`&&this.token(17,`;`)}),this.token(24,`}`)}const mn=/* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({__proto__:null,generate:pn,name:`Block`,parse:fn,structure:dn,walkContext:`block`},Symbol.toStringTag,{value:`Module`})),hn={children:[[]]};function gn(e,t){let n=this.tokenStart,r=null;return this.eat(19),r=e.call(this,t),this.eof||this.eat(20),{type:`Brackets`,loc:this.getLocation(n,this.tokenStart),children:r}}function _n(e){this.token(9,`[`),this.children(e),this.token(9,`]`)}const vn=/* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({__proto__:null,generate:_n,name:`Brackets`,parse:gn,structure:hn},Symbol.toStringTag,{value:`Module`})),yn=[];function bn(){let e=this.tokenStart;return this.eat(15),{type:`CDC`,loc:this.getLocation(e,this.tokenStart)}}function xn(){this.token(15,`-->`)}const Sn=/* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({__proto__:null,generate:xn,name:`CDC`,parse:bn,structure:yn},Symbol.toStringTag,{value:`Module`})),Cn=[];function wn(){let e=this.tokenStart;return this.eat(14),{type:`CDO`,loc:this.getLocation(e,this.tokenStart)}}function Tn(){this.token(14,`<!--`)}const En=/* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({__proto__:null,generate:Tn,name:`CDO`,parse:wn,structure:Cn},Symbol.toStringTag,{value:`Module`})),Dn={name:String};function On(){return this.eatDelim(46),{type:`ClassSelector`,loc:this.getLocation(this.tokenStart-1,this.tokenEnd),name:this.consume(1)}}function kn(e){this.token(9,`.`),this.token(1,e.name)}const An=/* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({__proto__:null,generate:kn,name:`ClassSelector`,parse:On,structure:Dn},Symbol.toStringTag,{value:`Module`})),jn={name:String};function Mn(){let e=this.tokenStart,t;switch(this.tokenType){case 13:t=` `;break;case 9:switch(this.charCodeAt(this.tokenStart)){case 62:case 43:case 126:this.next();break;case 47:this.next(),this.eatIdent(`deep`),this.eatDelim(47);break;default:this.error(`Combinator is expected`)}t=this.substrToCursor(e)}return{type:`Combinator`,loc:this.getLocation(e,this.tokenStart),name:t}}function Nn(e){this.tokenize(e.name)}const Pn=/* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({__proto__:null,generate:Nn,name:`Combinator`,parse:Mn,structure:jn},Symbol.toStringTag,{value:`Module`})),Fn={value:String};function In(){let e=this.tokenStart,t=this.tokenEnd;return this.eat(25),t-e+2>=2&&this.charCodeAt(t-2)===42&&this.charCodeAt(t-1)===47&&(t-=2),{type:`Comment`,loc:this.getLocation(e,this.tokenStart),value:this.substring(e+2,t)}}function Ln(e){this.token(25,`/*`+e.value+`*/`)}const Rn=/* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({__proto__:null,generate:Ln,name:`Comment`,parse:In,structure:Fn},Symbol.toStringTag,{value:`Module`})),zn=/* @__PURE__ */ new Set([16,22,0]),Bn={kind:String,children:[[`Identifier`,`Feature`,`FeatureFunction`,`FeatureRange`,`SupportsDeclaration`]]};function Vn(e){return this.lookupTypeNonSC(1)===1&&zn.has(this.lookupTypeNonSC(2))?this.Feature(e):this.FeatureRange(e)}const Hn={media:Vn,container:Vn,supports(){return this.SupportsDeclaration()}};function Un(e=`media`){let t=this.createList();t:for(;!this.eof;)switch(this.tokenType){case 25:case 13:this.next();continue;case 1:t.push(this.Identifier());break;case 21:{let n=this.parseWithFallback(()=>Hn[e].call(this,e),()=>null);n||=this.parseWithFallback(()=>{this.eat(21);let t=this.Condition(e);return this.eat(22),t},()=>this.GeneralEnclosed(e)),t.push(n);break}case 2:{let n=this.parseWithFallback(()=>this.FeatureFunction(e),()=>null);n||=this.GeneralEnclosed(e),t.push(n);break}default:break t}return t.isEmpty&&this.error(`Condition is expected`),{type:`Condition`,loc:this.getLocationFromList(t),kind:e,children:t}}function Wn(e){e.children.forEach(e=>{e.type===`Condition`?(this.token(21,`(`),this.node(e),this.token(22,`)`)):this.node(e)})}const Gn=/* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({__proto__:null,generate:Wn,name:`Condition`,parse:Un,structure:Bn},Symbol.toStringTag,{value:`Module`}));function Kn(){return this.Raw(this.consumeUntilExclamationMarkOrSemicolon,!0)}function qn(){return this.Raw(this.consumeUntilExclamationMarkOrSemicolon,!1)}function Jn(){let e=this.tokenIndex,t=this.Value();return t.type!==`Raw`&&this.eof===!1&&this.tokenType!==17&&this.isDelim(33)===!1&&this.isBalanceEdge(e)===!1&&this.error(),t}const Yn={important:[Boolean,String],property:String,value:[`Value`,`Raw`]};function Xn(){let e=this.tokenStart,t=this.tokenIndex,n=Qn.call(this),r=Tt(n),i=r?this.parseCustomProperty:this.parseValue,a=r?qn:Kn,o=!1,s;this.skipSC(),this.eat(16);let c=this.tokenIndex;if(r||this.skipSC(),s=i?this.parseWithFallback(Jn,a):a.call(this,this.tokenIndex),r&&s.type===`Value`&&s.children.isEmpty){for(let e=c-this.tokenIndex;e<=0;e++)if(this.lookupType(e)===13){s.children.appendData({type:`WhiteSpace`,loc:null,value:` `});break}}return this.isDelim(33)&&(o=$n.call(this),this.skipSC()),this.eof===!1&&this.tokenType!==17&&this.isBalanceEdge(t)===!1&&this.error(),{type:`Declaration`,loc:this.getLocation(e,this.tokenStart),important:o,property:n,value:s}}function Zn(e){this.token(1,e.property),this.token(16,`:`),this.node(e.value),e.important&&(this.token(9,`!`),this.token(1,e.important===!0?`important`:e.important))}function Qn(){let e=this.tokenStart;if(this.tokenType===9)switch(this.charCodeAt(this.tokenStart)){case 42:case 36:case 43:case 35:case 38:this.next();break;case 47:this.next(),this.isDelim(47)&&this.next()}return this.tokenType===4?this.eat(4):this.eat(1),this.substrToCursor(e)}function $n(){this.eat(9),this.skipSC();let e=this.consume(1);return e===`important`||e}const er=/* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({__proto__:null,generate:Zn,name:`Declaration`,parse:Xn,structure:Yn,walkContext:`declaration`},Symbol.toStringTag,{value:`Module`}));function tr(){return this.Raw(this.consumeUntilSemicolonIncluded,!0)}const nr={children:[[`Declaration`,`Atrule`,`Rule`]]};function rr(){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),tr));break;default:this.isDelim(38)?e.push(this.parseWithFallback(this.Rule,tr)):e.push(this.parseWithFallback(this.Declaration,tr))}return{type:`DeclarationList`,loc:this.getLocationFromList(e),children:e}}function ir(e){this.children(e,e=>{e.type===`Declaration`&&this.token(17,`;`)})}const ar=/* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({__proto__:null,generate:ir,name:`DeclarationList`,parse:rr,structure:nr},Symbol.toStringTag,{value:`Module`})),or={value:String,unit:String};function sr(){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 cr(e){this.token(12,e.value+e.unit)}const lr=/* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({__proto__:null,generate:cr,name:`Dimension`,parse:sr,structure:or},Symbol.toStringTag,{value:`Module`})),ur={kind:String,name:String,value:[`Identifier`,`Number`,`Dimension`,`Ratio`,`Function`,null]};function dr(e){let t=this.tokenStart,n,r=null;if(this.eat(21),this.skipSC(),n=this.consume(1),this.skipSC(),this.tokenType!==22){switch(this.eat(16),this.skipSC(),this.tokenType){case 10:r=this.lookupNonWSType(1)===9?this.Ratio():this.Number();break;case 12:r=this.Dimension();break;case 1:r=this.Identifier();break;case 2:r=this.parseWithFallback(()=>{let e=this.Function(this.readSequence,this.scope.Value);return this.skipSC(),this.isDelim(47)&&this.error(),e},()=>this.Ratio());break;default:this.error(`Number, dimension, ratio or identifier is expected`)}this.skipSC()}return this.eof||this.eat(22),{type:`Feature`,loc:this.getLocation(t,this.tokenStart),kind:e,name:n,value:r}}function fr(e){this.token(21,`(`),this.token(1,e.name),e.value!==null&&(this.token(16,`:`),this.node(e.value)),this.token(22,`)`)}const pr=/* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({__proto__:null,generate:fr,name:`Feature`,parse:dr,structure:ur},Symbol.toStringTag,{value:`Module`})),mr={kind:String,feature:String,value:[`Declaration`,`Selector`]};function hr(e,t){let n=(this.features[e]||{})[t];return typeof n!=`function`&&this.error(`Unknown feature ${t}()`),n}function gr(e=`unknown`){let t=this.tokenStart,n=this.consumeFunctionName(),r=hr.call(this,e,n.toLowerCase());this.skipSC();let i=this.parseWithFallback(()=>{let e=this.tokenIndex,t=r.call(this);return this.eof===!1&&this.isBalanceEdge(e)===!1&&this.error(),t},()=>this.Raw(null,!1));return this.eof||this.eat(22),{type:`FeatureFunction`,loc:this.getLocation(t,this.tokenStart),kind:e,feature:n,value:i}}function _r(e){this.token(2,e.feature+`(`),this.node(e.value),this.token(22,`)`)}const vr=/* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({__proto__:null,generate:_r,name:`FeatureFunction`,parse:gr,structure:mr},Symbol.toStringTag,{value:`Module`})),yr={kind:String,left:[`Identifier`,`Number`,`Dimension`,`Ratio`,`Function`],leftComparison:String,middle:[`Identifier`,`Number`,`Dimension`,`Ratio`,`Function`],rightComparison:[String,null],right:[`Identifier`,`Number`,`Dimension`,`Ratio`,`Function`,null]};function br(){switch(this.skipSC(),this.tokenType){case 10:return this.isDelim(47,this.lookupOffsetNonSC(1))?this.Ratio():this.Number();case 12:return this.Dimension();case 1:return this.Identifier();case 2:return this.parseWithFallback(()=>{let e=this.Function(this.readSequence,this.scope.Value);return this.skipSC(),this.isDelim(47)&&this.error(),e},()=>this.Ratio());default:this.error(`Number, dimension, ratio or identifier is expected`)}}function xr(e){if(this.skipSC(),this.isDelim(60)||this.isDelim(62)){let e=this.source[this.tokenStart];return this.next(),this.isDelim(61)?(this.next(),e+`=`):e}if(this.isDelim(61))return`=`;this.error(`Expected ${e?`":", `:``}"<", ">", "=" or ")"`)}function Sr(e=`unknown`){let t=this.tokenStart;this.skipSC(),this.eat(21);let n=br.call(this),r=xr.call(this,n.type===`Identifier`),i=br.call(this),a=null,o=null;return this.lookupNonWSType(0)!==22&&(a=xr.call(this),o=br.call(this)),this.skipSC(),this.eat(22),{type:`FeatureRange`,loc:this.getLocation(t,this.tokenStart),kind:e,left:n,leftComparison:r,middle:i,rightComparison:a,right:o}}function Cr(e){this.token(21,`(`),this.node(e.left),this.tokenize(e.leftComparison),this.node(e.middle),e.right&&(this.tokenize(e.rightComparison),this.node(e.right)),this.token(22,`)`)}const wr=/* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({__proto__:null,generate:Cr,name:`FeatureRange`,parse:Sr,structure:yr},Symbol.toStringTag,{value:`Module`})),Tr={name:String,children:[[]]};function Er(e,t){let n=this.tokenStart,r=this.consumeFunctionName(),i=r.toLowerCase(),a;return a=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:r,children:a}}function Dr(e){this.token(2,e.name+`(`),this.children(e),this.token(22,`)`)}const Or=/* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({__proto__:null,generate:Dr,name:`Function`,parse:Er,structure:Tr,walkContext:`function`},Symbol.toStringTag,{value:`Module`})),kr={kind:String,function:[String,null],children:[[]]};function Ar(e){let t=this.tokenStart,n=null;this.tokenType===2?n=this.consumeFunctionName():this.eat(21);let r=this.parseWithFallback(()=>{let e=this.tokenIndex,t=this.readSequence(this.scope.Value);return this.eof===!1&&this.isBalanceEdge(e)===!1&&this.error(),t},()=>this.createSingleNodeList(this.Raw(null,!1)));return this.eof||this.eat(22),{type:`GeneralEnclosed`,loc:this.getLocation(t,this.tokenStart),kind:e,function:n,children:r}}function jr(e){e.function?this.token(2,e.function+`(`):this.token(21,`(`),this.children(e),this.token(22,`)`)}const Mr=/* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({__proto__:null,generate:jr,name:`GeneralEnclosed`,parse:Ar,structure:kr},Symbol.toStringTag,{value:`Module`})),Nr={value:String};function Pr(){let e=this.tokenStart;return this.eat(4),{type:`Hash`,loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e+1)}}function Fr(e){this.token(4,`#`+e.value)}const Ir=/* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({__proto__:null,generate:Fr,name:`Hash`,parse:Pr,structure:Nr,xxx:`XXX`},Symbol.toStringTag,{value:`Module`})),Lr={name:String};function Rr(){return{type:`Identifier`,loc:this.getLocation(this.tokenStart,this.tokenEnd),name:this.consume(1)}}function zr(e){this.token(1,e.name)}const Br=/* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({__proto__:null,generate:zr,name:`Identifier`,parse:Rr,structure:Lr},Symbol.toStringTag,{value:`Module`})),Vr={name:String};function Hr(){let e=this.tokenStart;return this.eat(4),{type:`IdSelector`,loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e+1)}}function Ur(e){this.token(9,`#`+e.name)}const Wr=/* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({__proto__:null,generate:Ur,name:`IdSelector`,parse:Hr,structure:Vr},Symbol.toStringTag,{value:`Module`})),Gr={name:String};function Kr(){let e=this.tokenStart,t=this.consume(1);for(;this.isDelim(46);)this.eat(9),t+=`.`+this.consume(1);return{type:`Layer`,loc:this.getLocation(e,this.tokenStart),name:t}}function qr(e){this.tokenize(e.name)}const Jr=/* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({__proto__:null,generate:qr,name:`Layer`,parse:Kr,structure:Gr},Symbol.toStringTag,{value:`Module`})),Yr={children:[[`Layer`]]};function Xr(){let e=this.createList();for(this.skipSC();!this.eof&&(e.push(this.Layer()),this.lookupTypeNonSC(0)===18);)this.skipSC(),this.next(),this.skipSC();return{type:`LayerList`,loc:this.getLocationFromList(e),children:e}}function Zr(e){this.children(e,()=>this.token(18,`,`))}const Qr=/* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({__proto__:null,generate:Zr,name:`LayerList`,parse:Xr,structure:Yr},Symbol.toStringTag,{value:`Module`})),$r={modifier:[String,null],mediaType:[String,null],condition:[`Condition`,null]};function ei(){let e=this.tokenStart,t=null,n=null,r=null;if(this.skipSC(),this.tokenType===1&&this.lookupTypeNonSC(1)!==21){let e=this.consume(1),i=e.toLowerCase();switch(i===`not`||i===`only`?(this.skipSC(),t=i,n=this.consume(1)):n=e,this.lookupTypeNonSC(0)){case 1:this.skipSC(),this.eatIdent(`and`),r=this.Condition(`media`);break;case 23:case 17:case 18:case 0:break;default:this.error(`Identifier or parenthesis is expected`)}}else switch(this.tokenType){case 1:case 21:case 2:r=this.Condition(`media`);break;case 23:case 17:case 0:break;default:this.error(`Identifier or parenthesis is expected`)}return{type:`MediaQuery`,loc:this.getLocation(e,this.tokenStart),modifier:t,mediaType:n,condition:r}}function ti(e){e.mediaType?(e.modifier&&this.token(1,e.modifier),this.token(1,e.mediaType),e.condition&&(this.token(1,`and`),this.node(e.condition))):e.condition&&this.node(e.condition)}const ni=/* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({__proto__:null,generate:ti,name:`MediaQuery`,parse:ei,structure:$r},Symbol.toStringTag,{value:`Module`})),ri={children:[[`MediaQuery`]]};function ii(){let e=this.createList();for(this.skipSC();!this.eof&&(e.push(this.MediaQuery()),this.tokenType===18);)this.next();return{type:`MediaQueryList`,loc:this.getLocationFromList(e),children:e}}function ai(e){this.children(e,()=>this.token(18,`,`))}const oi=/* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({__proto__:null,generate:ai,name:`MediaQueryList`,parse:ii,structure:ri},Symbol.toStringTag,{value:`Module`})),si={};function ci(){let e=this.tokenStart;return this.eatDelim(38),{type:`NestingSelector`,loc:this.getLocation(e,this.tokenStart)}}function li(){this.token(9,`&`)}const ui=/* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({__proto__:null,generate:li,name:`NestingSelector`,parse:ci,structure:si},Symbol.toStringTag,{value:`Module`})),di={nth:[`AnPlusB`,`Identifier`],selector:[`SelectorList`,null]};function fi(){this.skipSC();let e=this.tokenStart,t=e,n=null,r;return r=this.lookupValue(0,`odd`)||this.lookupValue(0,`even`)?this.Identifier():this.AnPlusB(),t=this.tokenStart,this.skipSC(),this.lookupValue(0,`of`)&&(this.next(),n=this.SelectorList(),t=this.tokenStart),{type:`Nth`,loc:this.getLocation(e,t),nth:r,selector:n}}function pi(e){this.node(e.nth),e.selector!==null&&(this.token(1,`of`),this.node(e.selector))}const mi=/* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({__proto__:null,generate:pi,name:`Nth`,parse:fi,structure:di},Symbol.toStringTag,{value:`Module`})),hi={value:String};function gi(){return{type:`Number`,loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consume(10)}}function _i(e){this.token(10,e.value)}const vi=/* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({__proto__:null,generate:_i,name:`Number`,parse:gi,structure:hi},Symbol.toStringTag,{value:`Module`})),yi={value:String};function bi(){let e=this.tokenStart;return this.next(),{type:`Operator`,loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e)}}function xi(e){this.tokenize(e.value)}const Si=/* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({__proto__:null,generate:xi,name:`Operator`,parse:bi,structure:yi},Symbol.toStringTag,{value:`Module`})),Ci={children:[[]]};function wi(e,t){let n=this.tokenStart,r=null;return this.eat(21),r=e.call(this,t),this.eof||this.eat(22),{type:`Parentheses`,loc:this.getLocation(n,this.tokenStart),children:r}}function Ti(e){this.token(21,`(`),this.children(e),this.token(22,`)`)}const Ei=/* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({__proto__:null,generate:Ti,name:`Parentheses`,parse:wi,structure:Ci},Symbol.toStringTag,{value:`Module`})),Di={value:String};function Oi(){return{type:`Percentage`,loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consumeNumber(11)}}function ki(e){this.token(11,e.value+`%`)}const Ai=/* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({__proto__:null,generate:ki,name:`Percentage`,parse:Oi,structure:Di},Symbol.toStringTag,{value:`Module`})),ji={name:String,children:[[`Raw`],null]};function Mi(){let e=this.tokenStart,t=null,n,r;return this.eat(16),this.tokenType===2?(n=this.consumeFunctionName(),r=n.toLowerCase(),this.lookupNonWSType(0)==22?t=this.createList():hasOwnProperty.call(this.pseudo,r)?(this.skipSC(),t=this.pseudo[r].call(this),this.skipSC()):(t=this.createList(),t.push(this.Raw(null,!1))),this.eat(22)):n=this.consume(1),{type:`PseudoClassSelector`,loc:this.getLocation(e,this.tokenStart),name:n,children:t}}function Ni(e){this.token(16,`:`),e.children===null?this.token(1,e.name):(this.token(2,e.name+`(`),this.children(e),this.token(22,`)`))}const Pi=/* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({__proto__:null,generate:Ni,name:`PseudoClassSelector`,parse:Mi,structure:ji,walkContext:`function`},Symbol.toStringTag,{value:`Module`})),Fi={name:String,children:[[`Raw`],null]};function Ii(){let e=this.tokenStart,t=null,n,r;return this.eat(16),this.eat(16),this.tokenType===2?(n=this.consumeFunctionName(),r=n.toLowerCase(),this.lookupNonWSType(0)==22?t=this.createList():hasOwnProperty.call(this.pseudo,r)?(this.skipSC(),t=this.pseudo[r].call(this),this.skipSC()):(t=this.createList(),t.push(this.Raw(null,!1))),this.eat(22)):n=this.consume(1),{type:`PseudoElementSelector`,loc:this.getLocation(e,this.tokenStart),name:n,children:t}}function Li(e){this.token(16,`:`),this.token(16,`:`),e.children===null?this.token(1,e.name):(this.token(2,e.name+`(`),this.children(e),this.token(22,`)`))}const Ri=/* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({__proto__:null,generate:Li,name:`PseudoElementSelector`,parse:Ii,structure:Fi,walkContext:`function`},Symbol.toStringTag,{value:`Module`}));function zi(){switch(this.skipSC(),this.tokenType){case 10:return this.Number();case 2:return this.Function(this.readSequence,this.scope.Value);default:this.error(`Number of function is expected`)}}const Bi={left:[`Number`,`Function`],right:[`Number`,`Function`,null]};function Vi(){let e=this.tokenStart,t=zi.call(this),n=null;return this.skipSC(),this.isDelim(47)&&(this.eatDelim(47),n=zi.call(this)),{type:`Ratio`,loc:this.getLocation(e,this.tokenStart),left:t,right:n}}function Hi(e){this.node(e.left),this.token(9,`/`),e.right?this.node(e.right):this.node(10,1)}const Ui=/* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({__proto__:null,generate:Hi,name:`Ratio`,parse:Vi,structure:Bi},Symbol.toStringTag,{value:`Module`}));function Wi(){return this.tokenIndex>0&&this.lookupType(-1)===13?this.tokenIndex>1?this.getTokenStart(this.tokenIndex-1):this.firstCharOffset:this.tokenStart}const Gi={value:String};function Ki(e,t){let n=this.getTokenStart(this.tokenIndex),r;return this.skipUntilBalanced(this.tokenIndex,e||this.consumeUntilBalanceEnd),r=t&&this.tokenStart>n?Wi.call(this):this.tokenStart,{type:`Raw`,loc:this.getLocation(n,r),value:this.substring(n,r)}}function qi(e){this.tokenize(e.value)}const Ji=/* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({__proto__:null,generate:qi,name:`Raw`,parse:Ki,structure:Gi},Symbol.toStringTag,{value:`Module`}));function Yi(){return this.Raw(this.consumeUntilLeftCurlyBracket,!0)}function Xi(){let e=this.SelectorList();return e.type!==`Raw`&&this.eof===!1&&this.tokenType!==23&&this.error(),e}const Zi={prelude:[`SelectorList`,`Raw`],block:[`Block`]};function Qi(){let e=this.tokenIndex,t=this.tokenStart,n,r;return n=this.parseRulePrelude?this.parseWithFallback(Xi,Yi):Yi.call(this,e),r=this.Block(!0),{type:`Rule`,loc:this.getLocation(t,this.tokenStart),prelude:n,block:r}}function $i(e){this.node(e.prelude),this.node(e.block)}const ea=/* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({__proto__:null,generate:$i,name:`Rule`,parse:Qi,structure:Zi,walkContext:`rule`},Symbol.toStringTag,{value:`Module`})),ta={root:[`SelectorList`,`Raw`,null],limit:[`SelectorList`,`Raw`,null]};function na(){let e=null,t=null;this.skipSC();let n=this.tokenStart;return this.tokenType===21&&(this.next(),this.skipSC(),e=this.parseWithFallback(this.SelectorList,()=>this.Raw(!1,!0)),this.skipSC(),this.eat(22)),this.lookupNonWSType(0)===1&&(this.skipSC(),this.eatIdent(`to`),this.skipSC(),this.eat(21),this.skipSC(),t=this.parseWithFallback(this.SelectorList,()=>this.Raw(!1,!0)),this.skipSC(),this.eat(22)),{type:`Scope`,loc:this.getLocation(n,this.tokenStart),root:e,limit:t}}function ra(e){e.root&&(this.token(21,`(`),this.node(e.root),this.token(22,`)`)),e.limit&&(this.token(1,`to`),this.token(21,`(`),this.node(e.limit),this.token(22,`)`))}const ia=/* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({__proto__:null,generate:ra,name:`Scope`,parse:na,structure:ta},Symbol.toStringTag,{value:`Module`})),aa={children:[[`TypeSelector`,`IdSelector`,`ClassSelector`,`AttributeSelector`,`PseudoClassSelector`,`PseudoElementSelector`,`Combinator`]]};function oa(){let e=this.readSequence(this.scope.Selector);return this.getFirstListNode(e)===null&&this.error(`Selector is expected`),{type:`Selector`,loc:this.getLocationFromList(e),children:e}}function sa(e){this.children(e)}const ca=/* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({__proto__:null,generate:sa,name:`Selector`,parse:oa,structure:aa},Symbol.toStringTag,{value:`Module`})),la={children:[[`Selector`,`Raw`]]};function ua(){let e=this.createList();for(;!this.eof;){if(e.push(this.Selector()),this.tokenType===18){this.next();continue}break}return{type:`SelectorList`,loc:this.getLocationFromList(e),children:e}}function da(e){this.children(e,()=>this.token(18,`,`))}const fa=/* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({__proto__:null,generate:da,name:`SelectorList`,parse:ua,structure:la,walkContext:`selector`},Symbol.toStringTag,{value:`Module`})),pa={value:String};function ma(){return{type:`String`,loc:this.getLocation(this.tokenStart,this.tokenEnd),value:Et(this.consume(5))}}function ha(e){this.token(5,Dt(e.value))}const ga=/* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({__proto__:null,generate:ha,name:`String`,parse:ma,structure:pa},Symbol.toStringTag,{value:`Module`}));function _a(){return this.Raw(null,!1)}const va={children:[[`Comment`,`CDO`,`CDC`,`Atrule`,`Rule`,`Raw`]]};function ya(){let e=this.tokenStart,t=this.createList(),n;for(;!this.eof;){switch(this.tokenType){case 13:this.next();continue;case 25:if(this.charCodeAt(this.tokenStart+2)!==33){this.next();continue}n=this.Comment();break;case 14:n=this.CDO();break;case 15:n=this.CDC();break;case 3:n=this.parseWithFallback(this.Atrule,_a);break;default:n=this.parseWithFallback(this.Rule,_a)}t.push(n)}return{type:`StyleSheet`,loc:this.getLocation(e,this.tokenStart),children:t}}function ba(e){this.children(e)}const xa=/* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({__proto__:null,generate:ba,name:`StyleSheet`,parse:ya,structure:va,walkContext:`stylesheet`},Symbol.toStringTag,{value:`Module`})),Sa={declaration:`Declaration`};function Ca(){let e=this.tokenStart;this.eat(21),this.skipSC();let t=this.Declaration();return this.eof||this.eat(22),{type:`SupportsDeclaration`,loc:this.getLocation(e,this.tokenStart),declaration:t}}function wa(e){this.token(21,`(`),this.node(e.declaration),this.token(22,`)`)}const Ta=/* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({__proto__:null,generate:wa,name:`SupportsDeclaration`,parse:Ca,structure:Sa},Symbol.toStringTag,{value:`Module`}));function Ea(){this.tokenType!==1&&this.isDelim(42)===!1&&this.error(`Identifier or asterisk is expected`),this.next()}const Da={name:String};function Oa(){let e=this.tokenStart;return this.isDelim(124)?(this.next(),Ea.call(this)):(Ea.call(this),this.isDelim(124)&&(this.next(),Ea.call(this))),{type:`TypeSelector`,loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e)}}function ka(e){this.tokenize(e.name)}const Aa=/* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({__proto__:null,generate:ka,name:`TypeSelector`,parse:Oa,structure:Da},Symbol.toStringTag,{value:`Module`}));function ja(e,t){let n=0;for(let r=this.tokenStart+e;r<this.tokenEnd;r++){let i=this.charCodeAt(r);if(i===45&&t&&n!==0)return ja.call(this,e+n+1,!1),-1;P(i)||this.error(t&&n!==0?`Hyphen minus`+(n<6?` or hex digit`:``)+` is expected`:n<6?`Hex digit is expected`:`Unexpected input`,r),++n>6&&this.error(`Too many hex digits`,r)}return this.next(),n}function Ma(e){let t=0;for(;this.isDelim(63);)++t>e&&this.error(`Too many question marks`),this.next()}function Na(e){this.charCodeAt(this.tokenStart)!==e&&this.error((e===43?`Plus sign`:`Hyphen minus`)+` is expected`)}function Pa(){let e=0;switch(this.tokenType){case 10:if(e=ja.call(this,1,!0),this.isDelim(63)){Ma.call(this,6-e);break}if(this.tokenType===12||this.tokenType===10){Na.call(this,45),ja.call(this,1,!1);break}break;case 12:e=ja.call(this,1,!0),e>0&&Ma.call(this,6-e);break;default:if(this.eatDelim(43),this.tokenType===1){e=ja.call(this,0,!0),e>0&&Ma.call(this,6-e);break}if(this.isDelim(63)){this.next(),Ma.call(this,5);break}this.error(`Hex digit or question mark is expected`)}}const Fa={value:String};function Ia(){let e=this.tokenStart;return this.eatIdent(`u`),Pa.call(this),{type:`UnicodeRange`,loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e)}}function La(e){this.tokenize(e.value)}const Ra=/* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({__proto__:null,generate:La,name:`UnicodeRange`,parse:Ia,structure:Fa},Symbol.toStringTag,{value:`Module`})),za={value:String};function Ba(){let e=this.tokenStart,t;switch(this.tokenType){case 7:t=Ot(this.consume(7));break;case 2:this.cmpStr(this.tokenStart,this.tokenEnd,`url(`)||this.error("Function name must be `url`"),this.eat(2),this.skipSC(),t=Et(this.consume(5)),this.skipSC(),this.eof||this.eat(22);break;default:this.error(`Url or Function is expected`)}return{type:`Url`,loc:this.getLocation(e,this.tokenStart),value:t}}function Va(e){this.token(7,kt(e.value))}const Ha=/* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({__proto__:null,generate:Va,name:`Url`,parse:Ba,structure:za},Symbol.toStringTag,{value:`Module`})),Ua={children:[[]]};function Wa(){let e=this.tokenStart,t=this.readSequence(this.scope.Value);return{type:`Value`,loc:this.getLocation(e,this.tokenStart),children:t}}function Ga(e){this.children(e)}const Ka=/* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({__proto__:null,generate:Ga,name:`Value`,parse:Wa,structure:Ua},Symbol.toStringTag,{value:`Module`})),qa=Object.freeze({type:`WhiteSpace`,loc:null,value:` `}),Ja={value:String};function Ya(){return this.eat(13),qa}function Xa(e){this.token(13,e.value)}const W=Lt({node:/* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({__proto__:null,AnPlusB:Ut,Atrule:Yt,AtrulePrelude:$t,AttributeSelector:on,Block:mn,Brackets:vn,CDC:Sn,CDO:En,ClassSelector:An,Combinator:Pn,Comment:Rn,Condition:Gn,Declaration:er,DeclarationList:ar,Dimension:lr,Feature:pr,FeatureFunction:vr,FeatureRange:wr,Function:Or,GeneralEnclosed:Mr,Hash:Ir,IdSelector:Wr,Identifier:Br,Layer:Jr,LayerList:Qr,MediaQuery:ni,MediaQueryList:oi,NestingSelector:ui,Nth:mi,Number:vi,Operator:Si,Parentheses:Ei,Percentage:Ai,PseudoClassSelector:Pi,PseudoElementSelector:Ri,Ratio:Ui,Raw:Ji,Rule:ea,Scope:ia,Selector:ca,SelectorList:fa,String:ga,StyleSheet:xa,SupportsDeclaration:Ta,TypeSelector:Aa,UnicodeRange:Ra,Url:Ha,Value:Ka,WhiteSpace:/* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({__proto__:null,generate:Xa,name:`WhiteSpace`,parse:Ya,structure:Ja},Symbol.toStringTag,{value:`Module`}))},Symbol.toStringTag,{value:`Module`}))}),Za=[`left`,`right`,`top`,`bottom`,`inset-block-start`,`inset-block-end`,`inset-inline-start`,`inset-inline-end`,`inset-block`,`inset-inline`,`inset`];function Qa(e){return Za.includes(e)}const $a=[`margin-block-start`,`margin-block-end`,`margin-block`,`margin-inline-start`,`margin-inline-end`,`margin-inline`,`margin-bottom`,`margin-left`,`margin-right`,`margin-top`,`margin`];function eo(e){return $a.includes(e)}const to=[`width`,`height`,`min-width`,`min-height`,`max-width`,`max-height`,`block-size`,`inline-size`,`min-block-size`,`min-inline-size`,`max-block-size`,`max-inline-size`];function no(e){return to.includes(e)}const ro=[`justify-self`,`align-self`,`place-self`];function io(e){return ro.includes(e)}const ao=[...Za,...$a,...to,...ro,`position-anchor`,`position-area`],oo=[...to,...Za,...$a];function so(e){return oo.includes(e)}const co=[`top`,`left`,`right`,`bottom`,`start`,`end`,`self-start`,`self-end`,`center`,`inside`,`outside`];function lo(e){return co.includes(e)}const uo=[`width`,`height`,`block`,`inline`,`self-block`,`self-inline`];function fo(e){return uo.includes(e)}const po=/* @__PURE__ */ new Set([`Atrule`,`Selector`,`Declaration`]);function mo(e){let t=new SourceMapGenerator,n={line:1,column:0},r={line:0,column:0},i={line:1,column:0},a={generated:i},o=1,s=0,c=!1,l=e.node;e.node=function(e){if(e.loc&&e.loc.start&&po.has(e.type)){let l=e.loc.start.line,u=e.loc.start.column-1;(r.line!==l||r.column!==u)&&(r.line=l,r.column=u,n.line=o,n.column=s,c&&(c=!1,(n.line!==i.line||n.column!==i.column)&&t.addMapping(a)),c=!0,t.addMapping({source:e.loc.source,original:r,generated:n}))}l.call(this,e),c&&po.has(e.type)&&(i.line=o,i.column=s)};let u=e.emit;e.emit=function(e,t,n){for(let t=0;t<e.length;t++)e.charCodeAt(t)===10?(o++,s=0):s++;u(e,t,n)};let d=e.result;return e.result=function(){return c&&t.addMapping(a),{css:d(),map:t}},e}const ho=(e,t)=>{if(e===9&&(e=t),typeof e==`string`){let t=e.charCodeAt(0);return t>127?32768:t<<8}return e},go=[[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],[`/`,`*`]],_o=go.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 vo(e){let t=new Set(e.map(([e,t])=>ho(e)<<16|ho(t)));return function(e,n,r){let i=ho(n,r),a=r.charCodeAt(0);return(a===45&&n!==1&&n!==2&&n!==15||a===43?t.has(e<<16|a<<8):t.has(e<<16|i))&&this.emit(` `,13,!0),i}}const yo=vo(go),bo=vo(_o),xo=/* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({__proto__:null,safe:bo,spec:yo},Symbol.toStringTag,{value:`Module`}));function So(e,t){if(typeof t==`function`){let n=null;e.children.forEach(e=>{n!==null&&t.call(this,n),this.node(e),n=e});return}e.children.forEach(this.node,this)}function Co(e){wt(e,(t,n,r)=>{this.token(t,e.slice(n,r))})}function wo(e){let t=/* @__PURE__ */ new Map;for(let[n,r]of Object.entries(e.node))typeof(r.generate||r)==`function`&&t.set(n,r.generate||r);return function(e,n){let r=``,i=0,a={node(e){if(t.has(e.type))t.get(e.type).call(o,e);else throw Error(`Unknown node type: `+e.type)},tokenBefore:bo,token(e,t){i=this.tokenBefore(i,e,t),this.emit(t,e,!1),e===9&&t.charCodeAt(0)===92&&this.emit(`
2
+ `,13,!0)},emit(e){r+=e},result(){return r}};n&&(typeof n.decorator==`function`&&(a=n.decorator(a)),n.sourceMap&&(a=mo(a)),n.mode in xo&&(a.tokenBefore=xo[n.mode]));let o={node:e=>a.node(e),children:So,token:(e,t)=>a.token(e,t),tokenize:Co};return a.node(e),a.result()}}const To=wo({node:/* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({__proto__:null,AnPlusB:Ht,Atrule:Jt,AtrulePrelude:Qt,AttributeSelector:an,Block:pn,Brackets:_n,CDC:xn,CDO:Tn,ClassSelector:kn,Combinator:Nn,Comment:Ln,Condition:Wn,Declaration:Zn,DeclarationList:ir,Dimension:cr,Feature:fr,FeatureFunction:_r,FeatureRange:Cr,Function:Dr,GeneralEnclosed:jr,Hash:Fr,IdSelector:Ur,Identifier:zr,Layer:qr,LayerList:Zr,MediaQuery:ti,MediaQueryList:ai,NestingSelector:li,Nth:pi,Number:_i,Operator:xi,Parentheses:Ti,Percentage:ki,PseudoClassSelector:Ni,PseudoElementSelector:Li,Ratio:Hi,Raw:qi,Rule:$i,Scope:ra,Selector:sa,SelectorList:da,String:ha,StyleSheet:ba,SupportsDeclaration:wa,TypeSelector:ka,UnicodeRange:La,Url:Va,Value:Ga,WhiteSpace:Xa},Symbol.toStringTag,{value:`Module`}))});function Eo(e,t){let n=Object.create(SyntaxError.prototype),r=/* @__PURE__ */ Error();return Object.assign(n,{name:e,message:t,get stack(){return(r.stack||``).replace(/^(.+\n){1,3}/,`${e}: ${t}
3
3
  `)}})}function Do({source:e,line:t,column:n,baseLine:r,baseColumn:i},a){function o(e,t){return s.slice(e,t).map((t,n)=>String(e+n+1).padStart(u)+` |`+t).join(`
4
4
  `)}let s=(`
5
5
  `.repeat(Math.max(r-1,0))+` `.repeat(Math.max(i-1,0))+e).split(/\r\n?|\n|\f/),c=Math.max(1,t-a)-1,l=Math.min(t+a,s.length+1),u=Math.max(4,String(l).length)+1,d=0;n+=3*(s[t-1].substr(0,n-1).match(/\t/g)||[]).length,n>100&&(d=n-60+3,n=58);for(let e=c;e<=l;e++)e>=0&&e<s.length&&(s[e]=s[e].replace(/\t/g,` `),s[e]=(d>0&&s[e].length>d?`…`:``)+s[e].substr(d,98)+(s[e].length>d+100-1?`…`:``));return[o(c,t),Array(n+u+2).join(`-`)+`^`,o(t,l)].filter(Boolean).join(`
6
6
  `).replace(/^(\s+\d+\s+\|\n)+/,``).replace(/\n(\s+\d+\s+\|)+$/,``)}function Oo(e,t,n,r,i,a=1,o=1){return Object.assign(Eo(`SyntaxError`,e),{source:t,offset:n,line:r,column:i,sourceFragment(e){return Do({source:t,line:r,column:i,baseLine:a,baseColumn:o},isNaN(e)?0:e)},get formattedMessage(){return`Parse error: ${e}
7
- `+Do({source:t,line:r,column:i,baseLine:a,baseColumn:o},2)}})}function ko(e){let t=this.createList(),n=!1,r={recognizer:e};for(;!this.eof;){switch(this.tokenType){case 25:this.next();continue;case 13:n=!0,this.next();continue}let i=e.getNode.call(this,r);if(i===void 0)break;n&&=(e.onWhiteSpace&&e.onWhiteSpace.call(this,i,t,r),!1),t.push(i)}return n&&e.onWhiteSpace&&e.onWhiteSpace.call(this,null,t,r),t}const Ao=()=>{};function jo(e){return function(){return this[e]()}}function Mo(e){let t=Object.create(null);for(let n of Object.keys(e)){let r=e[n],i=r.parse||r;i&&(t[n]=i)}return t}function No(e){let t={context:Object.create(null),features:Object.assign(Object.create(null),e.features),scope:Object.assign(Object.create(null),e.scope),atrule:Mo(e.atrule),pseudo:Mo(e.pseudo),node:Mo(e.node)};for(let[n,r]of Object.entries(e.parseContext))switch(typeof r){case`function`:t.context[n]=r;break;case`string`:t.context[n]=jo(r);break}return s(s({config:t},t),t.node)}function Po(e){let t=``,n=`<unknown>`,r=!1,i=Ao,a=!1,o=new xt,s=Object.assign(new Ct,No(e||{}),{parseAtrulePrelude:!0,parseRulePrelude:!0,parseValue:!0,parseCustomProperty:!1,readSequence:ko,consumeUntilBalanceEnd:()=>0,consumeUntilLeftCurlyBracket(e){return+(e===123)},consumeUntilLeftCurlyBracketOrSemicolon(e){return+(e===123||e===59)},consumeUntilExclamationMarkOrSemicolon(e){return+(e===33||e===59)},consumeUntilSemicolonIncluded(e){return e===59?2:0},createList(){return new qe},createSingleNodeList(e){return new qe().appendData(e)},getFirstListNode(e){return e&&e.first},getLastListNode(e){return e&&e.last},parseWithFallback(e,t){let n=this.tokenIndex;try{return e.call(this)}catch(e){if(a)throw e;this.skip(n-this.tokenIndex);let r=t.call(this);return a=!0,i(e,r),a=!1,r}},lookupNonWSType(e){let t;do if(t=this.lookupType(e++),t!==13&&t!==25)return t;while(t!==0);return 0},charCodeAt(e){return e>=0&&e<t.length?t.charCodeAt(e):0},substring(e,n){return t.substring(e,n)},substrToCursor(e){return this.source.substring(e,this.tokenStart)},cmpChar(e,n){return lt(t,e,n)},cmpStr(e,n,r){return ut(t,e,n,r)},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 n=t.substring(this.tokenStart,ht(t,this.tokenStart));return this.eat(e),n},eat(e){if(this.tokenType!==e){let t=vt[e].slice(0,-6).replace(/-/g,` `).replace(/^./,e=>e.toUpperCase()),n=`${/[[\](){}]/.test(t)?`"${t}"`:t} is expected`,r=this.tokenStart;switch(e){case 1:this.tokenType===2||this.tokenType===7?(r=this.tokenEnd-1,n=`Identifier is expected but function found`):n=`Identifier is expected`;break;case 4:this.isDelim(35)&&(this.next(),r++,n=`Name is expected`);break;case 11:this.tokenType===10&&(r=this.tokenEnd,n=`Percent sign is expected`);break}this.error(n,r)}this.next()},eatIdent(e){(this.tokenType!==1||this.lookupValue(0,e)===!1)&&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){return r?o.getLocationRange(e,t,n):null},getLocationFromList(e){if(r){let t=this.getFirstListNode(e),r=this.getLastListNode(e);return o.getLocationRange(t===null?this.tokenStart:t.loc.start.offset-o.startOffset,r===null?this.tokenStart:r.loc.end.offset-o.startOffset,n)}return null},error(e,n){let r=n!==void 0&&n<t.length?o.getLocation(n):this.eof?o.getLocation(dt(t,t.length-1)):o.getLocation(this.tokenStart);throw new Oo(e||`Unexpected input`,t,r.offset,r.line,r.column,o.startLine,o.startColumn)}});return Object.assign(function(e,c){t=e,c||={},s.setSource(t,wt),o.setSource(t,c.offset,c.line,c.column),n=c.filename||`<unknown>`,r=!!c.positions,i=typeof c.onParseError==`function`?c.onParseError:Ao,a=!1,s.parseAtrulePrelude=`parseAtrulePrelude`in c?!!c.parseAtrulePrelude:!0,s.parseRulePrelude=`parseRulePrelude`in c?!!c.parseRulePrelude:!0,s.parseValue=`parseValue`in c?!!c.parseValue:!0,s.parseCustomProperty=`parseCustomProperty`in c?!!c.parseCustomProperty:!1;let{context:l=`default`,onComment:u}=c;if(!(l in s.context))throw Error("Unknown context `"+l+"`");typeof u==`function`&&s.forEachToken((e,n,r)=>{if(e===25){let e=s.getLocation(n,r);u(ut(t,r-2,r,`*/`)?t.slice(n+2,r-2):t.slice(n+2,r),e)}});let d=s.context[l].call(s,c);return s.eof||s.error(),d},{SyntaxError:Oo,config:s.config})}function Fo(e){switch(this.tokenType){case 4:return this.Hash();case 18:return this.Operator();case 21:return this.Parentheses(this.readSequence,e.recognizer);case 19:return this.Brackets(this.readSequence,e.recognizer);case 5:return this.String();case 12:return this.Dimension();case 11:return this.Percentage();case 10:return this.Number();case 2:return this.cmpStr(this.tokenStart,this.tokenEnd,`url(`)?this.Url():this.Function(this.readSequence,e.recognizer);case 7:return this.Url();case 1:return this.cmpChar(this.tokenStart,117)&&this.cmpChar(this.tokenStart+1,43)?this.UnicodeRange():this.Identifier();case 9:{let e=this.charCodeAt(this.tokenStart);if(e===47||e===42||e===43||e===45)return this.Operator();e===35&&this.error(`Hex or identifier is expected`,this.tokenStart+1);break}}}const Io={getNode:Fo};function Lo(e,t){t.last!==null&&t.last.type!==`Combinator`&&e!==null&&e.type!==`Combinator`&&t.push({type:`Combinator`,loc:null,name:` `})}function Ro(){switch(this.tokenType){case 19:return this.AttributeSelector();case 4:return this.IdSelector();case 16:return this.lookupType(1)===16?this.PseudoElementSelector():this.PseudoClassSelector();case 1:return this.TypeSelector();case 10:case 11:return this.Percentage();case 12:this.charCodeAt(this.tokenStart)===46&&this.error(`Identifier is expected`,this.tokenStart+1);break;case 9:switch(this.charCodeAt(this.tokenStart)){case 43:case 62:case 126:case 47:return this.Combinator();case 46:return this.ClassSelector();case 42:case 124:return this.TypeSelector();case 35:return this.IdSelector();case 38:return this.NestingSelector()}break}}const zo={onWhiteSpace:Lo,getNode:Ro};function Bo(){return this.createSingleNodeList(this.Raw(null,!1))}function Vo(){let e=this.createList();if(this.skipSC(),e.push(this.Identifier()),this.skipSC(),this.tokenType===18){e.push(this.Operator());let t=this.tokenIndex,n=this.parseCustomProperty?this.Value(null):this.Raw(this.consumeUntilExclamationMarkOrSemicolon,!1);if(n.type===`Value`&&n.children.isEmpty){for(let e=t-this.tokenIndex;e<=0;e++)if(this.lookupType(e)===13){n.children.appendData({type:`WhiteSpace`,loc:null,value:` `});break}}e.push(n)}return e}function Ho(e){return e!==null&&e.type===`Operator`&&(e.value[e.value.length-1]===`-`||e.value[e.value.length-1]===`+`)}const Uo=Object.freeze(Object.defineProperty({__proto__:null,AtrulePrelude:Io,Selector:zo,Value:{getNode:Fo,onWhiteSpace(e,t){Ho(e)&&(e.value=` `+e.value),Ho(t.last)&&(t.last.value+=` `)},expression:Bo,var:Vo}},Symbol.toStringTag,{value:`Module`})),Wo=new Set([`none`,`and`,`not`,`or`]),Go={parse:{prelude(){let e=this.createList();if(this.tokenType===1){let t=this.substring(this.tokenStart,this.tokenEnd);Wo.has(t.toLowerCase())||e.push(this.Identifier())}return e.push(this.Condition(`container`)),e},block(e=!1){return this.Block(e)}}},Ko={parse:{prelude:null,block(){return this.Block(!0)}}};function qo(e,t){return this.parseWithFallback(()=>{try{return e.call(this)}finally{this.skipSC(),this.lookupNonWSType(0)!==22&&this.error()}},t||(()=>this.Raw(null,!0)))}const Jo={layer(){this.skipSC();let e=this.createList(),t=qo.call(this,this.Layer);return(t.type!==`Raw`||t.value!==``)&&e.push(t),e},supports(){this.skipSC();let e=this.createList(),t=qo.call(this,this.Declaration,()=>qo.call(this,()=>this.Condition(`supports`)));return(t.type!==`Raw`||t.value!==``)&&e.push(t),e}},Yo={container:Go,"font-face":Ko,import:{parse:{prelude(){let e=this.createList();switch(this.tokenType){case 5:e.push(this.String());break;case 7:case 2:e.push(this.Url());break;default:this.error(`String or url() is expected`)}return this.skipSC(),this.tokenType===1&&this.cmpStr(this.tokenStart,this.tokenEnd,`layer`)?e.push(this.Identifier()):this.tokenType===2&&this.cmpStr(this.tokenStart,this.tokenEnd,`layer(`)&&e.push(this.Function(null,Jo)),this.skipSC(),this.tokenType===2&&this.cmpStr(this.tokenStart,this.tokenEnd,`supports(`)&&e.push(this.Function(null,Jo)),(this.lookupNonWSType(0)===1||this.lookupNonWSType(0)===21)&&e.push(this.MediaQueryList()),e},block:null}},layer:{parse:{prelude(){return this.createSingleNodeList(this.LayerList())},block(){return this.Block(!1)}}},media:{parse:{prelude(){return this.createSingleNodeList(this.MediaQueryList())},block(e=!1){return this.Block(e)}}},nest:{parse:{prelude(){return this.createSingleNodeList(this.SelectorList())},block(){return this.Block(!0)}}},page:{parse:{prelude(){return this.createSingleNodeList(this.SelectorList())},block(){return this.Block(!0)}}},scope:{parse:{prelude(){return this.createSingleNodeList(this.Scope())},block(e=!1){return this.Block(e)}}},"starting-style":{parse:{prelude:null,block(e=!1){return this.Block(e)}}},supports:{parse:{prelude(){return this.createSingleNodeList(this.Condition(`supports`))},block(e=!1){return this.Block(e)}}}};function Xo(){let e=this.createList();this.skipSC();t:for(;!this.eof;){switch(this.tokenType){case 1:e.push(this.Identifier());break;case 5:e.push(this.String());break;case 18:e.push(this.Operator());break;case 22:break t;default:this.error(`Identifier, string or comma is expected`)}this.skipSC()}return e}const G={parse(){return this.createSingleNodeList(this.SelectorList())}},Zo={parse(){return this.createSingleNodeList(this.Selector())}},Qo={parse(){return this.createSingleNodeList(this.Identifier())}},$o={parse:Xo},es={parse(){return this.createSingleNodeList(this.Nth())}},ts=Po({parseContext:{default:`StyleSheet`,stylesheet:`StyleSheet`,atrule:`Atrule`,atrulePrelude(e){return this.AtrulePrelude(e.atrule?String(e.atrule):null)},mediaQueryList:`MediaQueryList`,mediaQuery:`MediaQuery`,condition(e){return this.Condition(e.kind)},rule:`Rule`,selectorList:`SelectorList`,selector:`Selector`,block(){return this.Block(!0)},declarationList:`DeclarationList`,declaration:`Declaration`,value:`Value`},features:{supports:{selector(){return this.Selector()}},container:{style(){return this.Declaration()}}},scope:Uo,atrule:Yo,pseudo:{dir:Qo,has:G,lang:$o,matches:G,is:G,"-moz-any":G,"-webkit-any":G,where:G,not:G,"nth-child":es,"nth-last-child":es,"nth-last-of-type":es,"nth-of-type":es,slotted:Zo,host:Zo,"host-context":Zo},node:Object.freeze(Object.defineProperty({__proto__:null,AnPlusB:Vt,Atrule:qt,AtrulePrelude:Zt,AttributeSelector:rn,Block:fn,Brackets:gn,CDC:bn,CDO:wn,ClassSelector:On,Combinator:Mn,Comment:In,Condition:Un,Declaration:Xn,DeclarationList:rr,Dimension:sr,Feature:dr,FeatureFunction:gr,FeatureRange:Sr,Function:Er,GeneralEnclosed:Ar,Hash:Pr,IdSelector:Hr,Identifier:Rr,Layer:Kr,LayerList:Xr,MediaQuery:ei,MediaQueryList:ii,NestingSelector:ci,Nth:fi,Number:gi,Operator:bi,Parentheses:wi,Percentage:Oi,PseudoClassSelector:Mi,PseudoElementSelector:Ii,Ratio:Vi,Raw:Ki,Rule:Qi,Scope:na,Selector:oa,SelectorList:ua,String:ma,StyleSheet:ya,SupportsDeclaration:Ca,TypeSelector:Oa,UnicodeRange:Ia,Url:Ba,Value:Wa,WhiteSpace:Ya},Symbol.toStringTag,{value:`Module`}))});let K=(e=21)=>{let t=``,n=e|0;for(;n--;)t+=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`[Math.random()*64|0];return t};const ns=K(),rs=new Set;function is(e){return!!(e&&e.type===`Function`&&e.name===`anchor`)}function q(e,t=!1){return ts(e,{parseAtrulePrelude:!1,parseCustomProperty:!0,onParseError:e=>{t&&rs.add(e)}})}function J(e){return To(e,{mode:`spec`})}function as(e){return e.type===`Declaration`}function os(e){return e.toArray().reduce((e,t)=>t.type===`Operator`&&t.value===`,`?(e.push([]),e):(t.type===`Identifier`&&e[e.length-1].push(t),e),[[]])}function ss(e){return e?e.children.map(e=>{let t;e.children.last?.type===`PseudoElementSelector`&&(e=Je(e),t=J(e.children.last),e.children.pop());let n=J(e);return{selector:n+(t??``),elementPart:n,pseudoElementPart:t}}).toArray():[]}function cs(){rs.size>0&&(console.group(`The CSS anchor positioning polyfill was not applied due to ${rs.size===1?`a CSS parse error`:`CSS parse errors`}.`),rs.forEach(e=>{console.warn(e.formattedMessage)}),console.groupEnd())}function ls(){rs.clear()}const us=[...ao,`anchor-scope`,`anchor-name`].reduce((e,t)=>(e[t]=`--${t}-${ns}`,e),{});function ds(e,t){return as(e)&&us[e.property]&&t?(t.children.appendData(c(s({},e),{property:us[e.property]})),{updated:!0}):{updated:!1}}function fs(e,t){if(!as(e)||!t||![`inset`,`inset-block`,`inset-inline`].includes(e.property))return{updated:!1};let n=(n,r)=>{r&&t.children.appendData(c(s({},e),{property:n,value:{type:`Value`,children:new qe().fromArray([r])}}))};if(e.property===`inset`){let t=e.value.children.toArray(),[r,i,a,o]=(()=>{switch(t.length){case 1:return[t[0],t[0],t[0],t[0]];case 2:return[t[0],t[1],t[0],t[1]];case 3:return[t[0],t[1],t[2],t[1]];case 4:return[t[0],t[1],t[2],t[3]];default:return[]}})();n(`top`,r),n(`right`,i),n(`bottom`,a),n(`left`,o)}else if(e.property===`inset-block`){let t=e.value.children.toArray(),[r,i]=(()=>{switch(t.length){case 1:return[t[0],t[0]];case 2:return[t[0],t[1]];default:return[]}})();n(`inset-block-start`,r),n(`inset-block-end`,i)}else if(e.property===`inset-inline`){let t=e.value.children.toArray(),[r,i]=(()=>{switch(t.length){case 1:return[t[0],t[0]];case 2:return[t[0],t[1]];default:return[]}})();n(`inset-inline-start`,r),n(`inset-inline-end`,i)}return{updated:!0}}function ps(e){for(let t of e){let e=!1,n=q(t.css,!0);W(n,{visit:`Declaration`,enter(t){let n=this.rule?.block,{updated:r}=fs(t,n),{updated:i}=ds(t,n);(i||r)&&(e=!0)}}),e&&(t.css=J(n),t.changed=!0)}return e.some(e=>e.changed===!0)}var ms=(e=>(e.All=`all`,e.None=`none`,e))(ms||{});function Y(e,t){return t=us[t]??t,(e instanceof HTMLElement?getComputedStyle(e):e.computedStyle).getPropertyValue(t).trim()}function X(e,t,n){return Y(e,t)===n}function hs(e,{selector:t,pseudoElementPart:n}){let r=getComputedStyle(e,n),i=document.createElement(`div`),a=document.createElement(`style`);i.id=`fake-pseudo-element-${K()}`;for(let e of Array.from(r)){let t=r.getPropertyValue(e);i.style.setProperty(e,t)}a.textContent+=`#${i.id}${n} { content: ${r.content}; }`,a.textContent+=`${t} { display: none !important; }`,document.head.append(a);let o=n===`::before`?`afterbegin`:`beforeend`;return e.insertAdjacentElement(o,i),{fakePseudoElement:i,sheet:a,computedStyle:r}}function gs(e){let t=e;for(;t;){if(X(t,`overflow`,`scroll`))return t;t=t.parentElement}return t}function _s(e){let t=gs(e);return t===document.documentElement&&(t=null),t??{scrollTop:0,scrollLeft:0}}function vs(e,t){let{elementPart:n,pseudoElementPart:r}=e,i=[];if(r&&!(r===`::before`||r===`::after`))return i;let a=Ss(t.roots,n);if(!r)return i.push(...a),i;for(let t of a){let{fakePseudoElement:n,sheet:r,computedStyle:a}=hs(t,e),o=n.getBoundingClientRect(),{scrollY:s,scrollX:c}=globalThis,l=_s(t);i.push({fakePseudoElement:n,computedStyle:a,removeFakePseudoElement(){n.remove(),r.remove()},contextElement:t,getBoundingClientRect(){let{scrollY:e,scrollX:t}=globalThis,{scrollTop:n,scrollLeft:r}=l;return DOMRect.fromRect({y:o.y+(s-e)+(l.scrollTop-n),x:o.x+(c-t)+(l.scrollLeft-r),width:o.width,height:o.height})}})}return i}function ys(e,t){let n=Y(e,`anchor-name`);return t?n.split(`,`).map(e=>e.trim()).includes(t):!n}function bs(e,t){let n=Y(e,`anchor-scope`);return n===t||n===`all`}const xs=e=>l(null,null,function*(){let t=yield j.getOffsetParent?.call(j,e);return(yield j.isElement?.call(j,t))||(t=(yield j.getDocumentElement?.call(j,e))||window.document.documentElement),t}),Ss=(e,t)=>e.flatMap(e=>[...e.querySelectorAll(t)]),Cs=`InvalidMimeType`;function ws(e){return!!((e.type===`text/css`||e.rel===`stylesheet`)&&e.href)}function Ts(e){let t=new URL(e.href,document.baseURI);if(ws(e)&&t.origin===location.origin)return t}function Es(e){return l(this,null,function*(){return(yield Promise.all(e.map(e=>l(null,null,function*(){var t;if(!e.url)return e;if((t=e.el)!=null&&t.disabled)return null;try{let t=yield fetch(e.url.toString()),n=t.headers.get(`content-type`);if(!(n!=null&&n.startsWith(`text/css`))){let t=Error(`Error loading ${e.url}: expected content-type "text/css", got "${n}".`);throw t.name=Cs,t}let r=yield t.text();return c(s({},e),{css:r})}catch(e){if(e instanceof Error&&e.name===Cs)return console.warn(e),null;throw e}})))).filter(e=>e!==null)})}const Ds=`[style*="anchor"]`,Os=`[style*="position-area"]`;function ks(e){let t=e?e.filter(e=>e instanceof HTMLElement&&(e.matches(Ds)||e.matches(Os))):Array.from(document.querySelectorAll([Ds,Os].join(`,`))),n=[];return t.filter(e=>e instanceof HTMLElement).forEach(e=>{let t=K(12),r=`data-has-inline-styles`;e.setAttribute(r,t);let i=`[${r}="${t}"] { ${e.getAttribute(`style`)} }`;n.push({el:e,css:i})}),n}function As(e){return l(this,null,function*(){let t=e.elements??Ss(e.roots,`link, style`),n=[];t.filter(e=>e instanceof HTMLElement).forEach(e=>{if(e.tagName.toLowerCase()===`link`){let t=Ts(e);t&&n.push({el:e,url:t})}e.tagName.toLowerCase()===`style`&&n.push({el:e,css:e.innerHTML})});let r=ks(e.excludeInlineStyles?e.elements??[]:void 0);return yield Es([...n,...r])})}let js=(e=21)=>{let t=``,n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`[n[e]&63];return t};const Ms=`--pa-cascade-property`,Ns=`data-anchor-position-wrapper`,Ps=`data-pa-wrapper-for-`,Fs=`POLYFILL-POSITION-AREA`,Is=`left.center.right.span-left.span-right.x-start.x-end.span-x-start.span-x-end.self-x-start.self-x-end.span-self-x-start.span-self-x-end.span-all.top.bottom.span-top.span-bottom.y-start.y-end.span-y-start.span-y-end.self-y-start.self-y-end.span-self-y-start.span-self-y-end.block-start.block-end.span-block-start.span-block-end.inline-start.inline-end.span-inline-start.span-inline-end.self-block-start.self-block-end.span-self-block-start.span-self-block-end.self-inline-start.self-inline-end.span-self-inline-start.span-self-inline-end.start.end.span-start.span-end.self-start.self-end.span-self-start.span-self-end`.split(`.`);function Ls(e){return Is.includes(e)}const Rs={left:[0,1,`Irrelevant`],center:[1,2,`Irrelevant`],right:[2,3,`Irrelevant`],"span-left":[0,2,`Irrelevant`],"span-right":[1,3,`Irrelevant`],"x-start":[0,1,`Physical`],"x-end":[2,3,`Physical`],"span-x-start":[0,2,`Physical`],"span-x-end":[1,3,`Physical`],"self-x-start":[0,1,`PhysicalSelf`],"self-x-end":[2,3,`PhysicalSelf`],"span-self-x-start":[0,2,`PhysicalSelf`],"span-self-x-end":[1,3,`PhysicalSelf`],"span-all":[0,3,`Irrelevant`],top:[0,1,`Irrelevant`],bottom:[2,3,`Irrelevant`],"span-top":[0,2,`Irrelevant`],"span-bottom":[1,3,`Irrelevant`],"y-start":[0,1,`Physical`],"y-end":[2,3,`Physical`],"span-y-start":[0,2,`Physical`],"span-y-end":[1,3,`Physical`],"self-y-start":[0,1,`PhysicalSelf`],"self-y-end":[2,3,`PhysicalSelf`],"span-self-y-start":[0,2,`PhysicalSelf`],"span-self-y-end":[1,3,`PhysicalSelf`],"block-start":[0,1,`Logical`],"block-end":[2,3,`Logical`],"span-block-start":[0,2,`Logical`],"span-block-end":[1,3,`Logical`],"inline-start":[0,1,`Logical`],"inline-end":[2,3,`Logical`],"span-inline-start":[0,2,`Logical`],"span-inline-end":[1,3,`Logical`],"self-block-start":[0,1,`LogicalSelf`],"self-block-end":[2,3,`LogicalSelf`],"span-self-block-start":[0,2,`LogicalSelf`],"span-self-block-end":[1,3,`LogicalSelf`],"self-inline-start":[0,1,`LogicalSelf`],"self-inline-end":[2,3,`LogicalSelf`],"span-self-inline-start":[0,2,`LogicalSelf`],"span-self-inline-end":[1,3,`LogicalSelf`],start:[0,1,`Logical`],end:[2,3,`Logical`],"span-start":[0,2,`Logical`],"span-end":[1,3,`Logical`],"self-start":[0,1,`LogicalSelf`],"self-end":[2,3,`LogicalSelf`],"span-self-start":[0,2,`LogicalSelf`],"span-self-end":[1,3,`LogicalSelf`]},zs=[`left`,`center`,`right`,`span-left`,`span-right`,`x-start`,`x-end`,`span-x-start`,`span-x-end`,`self-x-start`,`self-x-end`,`span-self-x-start`,`span-self-x-end`,`span-all`],Bs=[`top`,`center`,`bottom`,`span-top`,`span-bottom`,`y-start`,`y-end`,`span-y-start`,`span-y-end`,`self-y-start`,`self-y-end`,`span-self-y-start`,`span-self-y-end`,`span-all`],Vs=[`block-start`,`center`,`block-end`,`span-block-start`,`span-block-end`,`span-all`],Hs=[`inline-start`,`center`,`inline-end`,`span-inline-start`,`span-inline-end`,`span-all`],Us=[`self-block-start`,`center`,`self-block-end`,`span-self-block-start`,`span-self-block-end`,`span-all`],Ws=[`self-inline-start`,`center`,`self-inline-end`,`span-self-inline-start`,`span-self-inline-end`,`span-all`],Gs=[`start`,`center`,`end`,`span-start`,`span-end`,`span-all`],Ks=[`self-start`,`center`,`self-end`,`span-self-start`,`span-self-end`,`span-all`],qs=[`block`,`top`,`bottom`,`y`],Js=[`inline`,`left`,`right`,`x`];function Ys(e){let t=e.split(`-`);for(let e of t){if(qs.includes(e))return`block`;if(Js.includes(e))return`inline`}return`ambiguous`}function Xs(e,t){return t[0].includes(e[0])&&t[1].includes(e[1])||t[0].includes(e[1])&&t[1].includes(e[0])}const Zs=[[zs,Bs],[Vs,Hs],[Us,Ws],[Gs,Gs],[Ks,Ks]];function Qs(e){for(let t of Zs)if(Xs(e,t))return!0;return!1}const $s=e=>{let t=getComputedStyle(e);return{writingMode:t.writingMode,direction:t.direction}},ec=(e,t)=>l(null,null,function*(){let n=yield xs(e);switch(t){case`Logical`:case`Physical`:return $s(n);case`LogicalSelf`:case`PhysicalSelf`:return $s(e);default:return null}}),tc=e=>e.reverse().map(e=>3-e),nc=(e,t)=>e===`Irrelevant`?t:e,rc=(e,t)=>l(null,[e,t],function*({block:e,inline:t},n){let r=yield ec(n,nc(e[2],t[2])),i={block:[e[0],e[1]],inline:[t[0],t[1]]};if(r){if(r.direction===`rtl`&&(i.inline=tc(i.inline)),r.writingMode.startsWith(`vertical`)){let e=i.block;i.block=i.inline,i.inline=e}if(r.writingMode.startsWith(`sideways`)){let e=i.block;i.block=i.inline,i.inline=e,r.writingMode.endsWith(`lr`)&&(i.block=tc(i.block))}r.writingMode.endsWith(`rl`)&&(i.inline=tc(i.inline))}return i}),ic=({block:e,inline:t})=>{let n=[0,`top`,`bottom`,0],r=[0,`left`,`right`,0];return{block:[n[e[0]],n[e[1]]],inline:[r[t[0]],r[t[1]]]}};function ac([e,t]){return e===0&&t===3?`center`:e===0?`end`:t===3?`start`:`center`}function oc(e){return e.type===`Declaration`&&e.property===`position-area`}function sc(e){let t=e.value.children.toArray().map(({name:e})=>e);return t.length===1&&(Ys(t[0])===`ambiguous`?t.push(t[0]):t.push(`span-all`)),t}function cc(e){if(!oc(e))return;let t=sc(e);if(!Qs(t))return;let n={};switch(Ys(t[0])){case`block`:n.block=t[0],n.inline=t[1];break;case`inline`:n.inline=t[0],n.block=t[1];break;case`ambiguous`:Ys(t[1])==`block`?(n.block=t[1],n.inline=t[0]):(n.inline=t[1],n.block=t[0]);break}return{values:n,grid:{block:Rs[n.block],inline:Rs[n.inline]},selectorUUID:`--pa-declaration-${js(12)}`}}function lc(e,t){[`justify-self`,`align-self`].forEach(e=>{t.children.appendData({type:`Declaration`,property:e,value:{type:`Raw`,value:`var(--pa-value-${e})`},important:!1})}),t.children.appendData({type:`Declaration`,property:Ms,value:{type:`Raw`,value:e.selectorUUID},important:!1})}function uc(e,t){var n;let r;if(e.parentElement?.tagName===Fs)r=e.parentElement;else{r=document.createElement(Fs),r.style.display=`grid`,r.style.position=`absolute`;let t=getComputedStyle(e).pointerEvents;r.style.pointerEvents=`none`,e.style.pointerEvents=t,[`top`,`left`,`right`,`bottom`].forEach(e=>{r.style.setProperty(e,`var(--pa-value-${e})`)}),(n=e.parentElement)==null||n.insertBefore(r,e),r.appendChild(e)}return r.setAttribute(`${Ps}${t}`,``),r}function dc(e,t,n){return l(this,null,function*(){let r=`--pa-target-${js(12)}`,i=yield rc(t.grid,e),a=ic(i),o=nc(t.grid.block[2],t.grid.inline[2]),s=[`LogicalSelf`,`PhysicalSelf`].includes(o)?i:t.grid;return{insets:a,alignments:{block:ac([s.block[0],s.block[1]]),inline:ac([s.inline[0],s.inline[1]])},targetUUID:r,targetEl:e,anchorEl:n,wrapperEl:uc(e,r),values:t.values,grid:t.grid,selectorUUID:t.selectorUUID}})}function fc(e,t){return`
7
+ `+Do({source:t,line:r,column:i,baseLine:a,baseColumn:o},2)}})}function ko(e){let t=this.createList(),n=!1,r={recognizer:e};for(;!this.eof;){switch(this.tokenType){case 25:this.next();continue;case 13:n=!0,this.next();continue}let i=e.getNode.call(this,r);if(i===void 0)break;n&&=(e.onWhiteSpace&&e.onWhiteSpace.call(this,i,t,r),!1),t.push(i)}return n&&e.onWhiteSpace&&e.onWhiteSpace.call(this,null,t,r),t}const Ao=()=>{};function jo(e){return function(){return this[e]()}}function Mo(e){let t=/* @__PURE__ */ Object.create(null);for(let n of Object.keys(e)){let r=e[n],i=r.parse||r;i&&(t[n]=i)}return t}function No(e){let t={context:/* @__PURE__ */ Object.create(null),features:Object.assign(/* @__PURE__ */ Object.create(null),e.features),scope:Object.assign(/* @__PURE__ */ Object.create(null),e.scope),atrule:Mo(e.atrule),pseudo:Mo(e.pseudo),node:Mo(e.node)};for(let[n,r]of Object.entries(e.parseContext))switch(typeof r){case`function`:t.context[n]=r;break;case`string`:t.context[n]=jo(r)}return s(s({config:t},t),t.node)}function Po(e){let t=``,n=`<unknown>`,r=!1,i=Ao,a=!1,o=new xt,s=Object.assign(new Ct,No(e||{}),{parseAtrulePrelude:!0,parseRulePrelude:!0,parseValue:!0,parseCustomProperty:!1,readSequence:ko,consumeUntilBalanceEnd:()=>0,consumeUntilLeftCurlyBracket(e){return+(e===123)},consumeUntilLeftCurlyBracketOrSemicolon(e){return+(e===123||e===59)},consumeUntilExclamationMarkOrSemicolon(e){return+(e===33||e===59)},consumeUntilSemicolonIncluded(e){return e===59?2:0},createList(){return new qe},createSingleNodeList(e){return new qe().appendData(e)},getFirstListNode(e){return e&&e.first},getLastListNode(e){return e&&e.last},parseWithFallback(e,t){let n=this.tokenIndex;try{return e.call(this)}catch(e){if(a)throw e;this.skip(n-this.tokenIndex);let r=t.call(this);return a=!0,i(e,r),a=!1,r}},lookupNonWSType(e){let t;do if(t=this.lookupType(e++),t!==13&&t!==25)return t;while(t!==0);return 0},charCodeAt(e){return e>=0&&e<t.length?t.charCodeAt(e):0},substring(e,n){return t.substring(e,n)},substrToCursor(e){return this.source.substring(e,this.tokenStart)},cmpChar(e,n){return lt(t,e,n)},cmpStr(e,n,r){return ut(t,e,n,r)},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 n=t.substring(this.tokenStart,ht(t,this.tokenStart));return this.eat(e),n},eat(e){if(this.tokenType!==e){let t=vt[e].slice(0,-6).replace(/-/g,` `).replace(/^./,e=>e.toUpperCase()),n=`${/[[\](){}]/.test(t)?`"${t}"`:t} is expected`,r=this.tokenStart;switch(e){case 1:this.tokenType===2||this.tokenType===7?(r=this.tokenEnd-1,n=`Identifier is expected but function found`):n=`Identifier is expected`;break;case 4:this.isDelim(35)&&(this.next(),r++,n=`Name is expected`);break;case 11:this.tokenType===10&&(r=this.tokenEnd,n=`Percent sign is expected`)}this.error(n,r)}this.next()},eatIdent(e){(this.tokenType!==1||this.lookupValue(0,e)===!1)&&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){return r?o.getLocationRange(e,t,n):null},getLocationFromList(e){if(r){let t=this.getFirstListNode(e),r=this.getLastListNode(e);return o.getLocationRange(t===null?this.tokenStart:t.loc.start.offset-o.startOffset,r===null?this.tokenStart:r.loc.end.offset-o.startOffset,n)}return null},error(e,n){let r=n!==void 0&&n<t.length?o.getLocation(n):this.eof?o.getLocation(dt(t,t.length-1)):o.getLocation(this.tokenStart);throw new Oo(e||`Unexpected input`,t,r.offset,r.line,r.column,o.startLine,o.startColumn)}});return Object.assign(function(e,c){t=e,c||={},s.setSource(t,wt),o.setSource(t,c.offset,c.line,c.column),n=c.filename||`<unknown>`,r=!!c.positions,i=typeof c.onParseError==`function`?c.onParseError:Ao,a=!1,s.parseAtrulePrelude=`parseAtrulePrelude`in c?!!c.parseAtrulePrelude:!0,s.parseRulePrelude=`parseRulePrelude`in c?!!c.parseRulePrelude:!0,s.parseValue=`parseValue`in c?!!c.parseValue:!0,s.parseCustomProperty=`parseCustomProperty`in c&&!!c.parseCustomProperty;let{context:l=`default`,onComment:u}=c;if(!(l in s.context))throw Error("Unknown context `"+l+"`");typeof u==`function`&&s.forEachToken((e,n,r)=>{if(e===25){let e=s.getLocation(n,r),i=ut(t,r-2,r,`*/`)?t.slice(n+2,r-2):t.slice(n+2,r);u(i,e)}});let d=s.context[l].call(s,c);return s.eof||s.error(),d},{SyntaxError:Oo,config:s.config})}function Fo(e){switch(this.tokenType){case 4:return this.Hash();case 18:return this.Operator();case 21:return this.Parentheses(this.readSequence,e.recognizer);case 19:return this.Brackets(this.readSequence,e.recognizer);case 5:return this.String();case 12:return this.Dimension();case 11:return this.Percentage();case 10:return this.Number();case 2:return this.cmpStr(this.tokenStart,this.tokenEnd,`url(`)?this.Url():this.Function(this.readSequence,e.recognizer);case 7:return this.Url();case 1:return this.cmpChar(this.tokenStart,117)&&this.cmpChar(this.tokenStart+1,43)?this.UnicodeRange():this.Identifier();case 9:{let e=this.charCodeAt(this.tokenStart);if(e===47||e===42||e===43||e===45)return this.Operator();e===35&&this.error(`Hex or identifier is expected`,this.tokenStart+1);break}}}const Io={getNode:Fo};function Lo(e,t){t.last!==null&&t.last.type!==`Combinator`&&e!==null&&e.type!==`Combinator`&&t.push({type:`Combinator`,loc:null,name:` `})}function Ro(){switch(this.tokenType){case 19:return this.AttributeSelector();case 4:return this.IdSelector();case 16:return this.lookupType(1)===16?this.PseudoElementSelector():this.PseudoClassSelector();case 1:return this.TypeSelector();case 10:case 11:return this.Percentage();case 12:this.charCodeAt(this.tokenStart)===46&&this.error(`Identifier is expected`,this.tokenStart+1);break;case 9:switch(this.charCodeAt(this.tokenStart)){case 43:case 62:case 126:case 47:return this.Combinator();case 46:return this.ClassSelector();case 42:case 124:return this.TypeSelector();case 35:return this.IdSelector();case 38:return this.NestingSelector()}}}const zo={onWhiteSpace:Lo,getNode:Ro};function Bo(){return this.createSingleNodeList(this.Raw(null,!1))}function Vo(){let e=this.createList();if(this.skipSC(),e.push(this.Identifier()),this.skipSC(),this.tokenType===18){e.push(this.Operator());let t=this.tokenIndex,n=this.parseCustomProperty?this.Value(null):this.Raw(this.consumeUntilExclamationMarkOrSemicolon,!1);if(n.type===`Value`&&n.children.isEmpty){for(let e=t-this.tokenIndex;e<=0;e++)if(this.lookupType(e)===13){n.children.appendData({type:`WhiteSpace`,loc:null,value:` `});break}}e.push(n)}return e}function Ho(e){return e!==null&&e.type===`Operator`&&(e.value[e.value.length-1]===`-`||e.value[e.value.length-1]===`+`)}const Uo=/* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({__proto__:null,AtrulePrelude:Io,Selector:zo,Value:{getNode:Fo,onWhiteSpace(e,t){Ho(e)&&(e.value=` `+e.value),Ho(t.last)&&(t.last.value+=` `)},expression:Bo,var:Vo}},Symbol.toStringTag,{value:`Module`})),Wo=/* @__PURE__ */ new Set([`none`,`and`,`not`,`or`]),Go={parse:{prelude(){let e=this.createList();if(this.tokenType===1){let t=this.substring(this.tokenStart,this.tokenEnd);Wo.has(t.toLowerCase())||e.push(this.Identifier())}return e.push(this.Condition(`container`)),e},block(e=!1){return this.Block(e)}}},Ko={parse:{prelude:null,block(){return this.Block(!0)}}};function qo(e,t){return this.parseWithFallback(()=>{try{return e.call(this)}finally{this.skipSC(),this.lookupNonWSType(0)!==22&&this.error()}},t||(()=>this.Raw(null,!0)))}const Jo={layer(){this.skipSC();let e=this.createList(),t=qo.call(this,this.Layer);return(t.type!==`Raw`||t.value!==``)&&e.push(t),e},supports(){this.skipSC();let e=this.createList(),t=qo.call(this,this.Declaration,()=>qo.call(this,()=>this.Condition(`supports`)));return(t.type!==`Raw`||t.value!==``)&&e.push(t),e}},Yo={container:Go,"font-face":Ko,import:{parse:{prelude(){let e=this.createList();switch(this.tokenType){case 5:e.push(this.String());break;case 7:case 2:e.push(this.Url());break;default:this.error(`String or url() is expected`)}return this.skipSC(),this.tokenType===1&&this.cmpStr(this.tokenStart,this.tokenEnd,`layer`)?e.push(this.Identifier()):this.tokenType===2&&this.cmpStr(this.tokenStart,this.tokenEnd,`layer(`)&&e.push(this.Function(null,Jo)),this.skipSC(),this.tokenType===2&&this.cmpStr(this.tokenStart,this.tokenEnd,`supports(`)&&e.push(this.Function(null,Jo)),(this.lookupNonWSType(0)===1||this.lookupNonWSType(0)===21)&&e.push(this.MediaQueryList()),e},block:null}},layer:{parse:{prelude(){return this.createSingleNodeList(this.LayerList())},block(){return this.Block(!1)}}},media:{parse:{prelude(){return this.createSingleNodeList(this.MediaQueryList())},block(e=!1){return this.Block(e)}}},nest:{parse:{prelude(){return this.createSingleNodeList(this.SelectorList())},block(){return this.Block(!0)}}},page:{parse:{prelude(){return this.createSingleNodeList(this.SelectorList())},block(){return this.Block(!0)}}},scope:{parse:{prelude(){return this.createSingleNodeList(this.Scope())},block(e=!1){return this.Block(e)}}},"starting-style":{parse:{prelude:null,block(e=!1){return this.Block(e)}}},supports:{parse:{prelude(){return this.createSingleNodeList(this.Condition(`supports`))},block(e=!1){return this.Block(e)}}}};function Xo(){let e=this.createList();this.skipSC();t:for(;!this.eof;){switch(this.tokenType){case 1:e.push(this.Identifier());break;case 5:e.push(this.String());break;case 18:e.push(this.Operator());break;case 22:break t;default:this.error(`Identifier, string or comma is expected`)}this.skipSC()}return e}const G={parse(){return this.createSingleNodeList(this.SelectorList())}},Zo={parse(){return this.createSingleNodeList(this.Selector())}},Qo={parse(){return this.createSingleNodeList(this.Identifier())}},$o={parse:Xo},es={parse(){return this.createSingleNodeList(this.Nth())}},ts=Po({parseContext:{default:`StyleSheet`,stylesheet:`StyleSheet`,atrule:`Atrule`,atrulePrelude(e){return this.AtrulePrelude(e.atrule?String(e.atrule):null)},mediaQueryList:`MediaQueryList`,mediaQuery:`MediaQuery`,condition(e){return this.Condition(e.kind)},rule:`Rule`,selectorList:`SelectorList`,selector:`Selector`,block(){return this.Block(!0)},declarationList:`DeclarationList`,declaration:`Declaration`,value:`Value`},features:{supports:{selector(){return this.Selector()}},container:{style(){return this.Declaration()}}},scope:Uo,atrule:Yo,pseudo:{dir:Qo,has:G,lang:$o,matches:G,is:G,"-moz-any":G,"-webkit-any":G,where:G,not:G,"nth-child":es,"nth-last-child":es,"nth-last-of-type":es,"nth-of-type":es,slotted:Zo,host:Zo,"host-context":Zo},node:/* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({__proto__:null,AnPlusB:Vt,Atrule:qt,AtrulePrelude:Zt,AttributeSelector:rn,Block:fn,Brackets:gn,CDC:bn,CDO:wn,ClassSelector:On,Combinator:Mn,Comment:In,Condition:Un,Declaration:Xn,DeclarationList:rr,Dimension:sr,Feature:dr,FeatureFunction:gr,FeatureRange:Sr,Function:Er,GeneralEnclosed:Ar,Hash:Pr,IdSelector:Hr,Identifier:Rr,Layer:Kr,LayerList:Xr,MediaQuery:ei,MediaQueryList:ii,NestingSelector:ci,Nth:fi,Number:gi,Operator:bi,Parentheses:wi,Percentage:Oi,PseudoClassSelector:Mi,PseudoElementSelector:Ii,Ratio:Vi,Raw:Ki,Rule:Qi,Scope:na,Selector:oa,SelectorList:ua,String:ma,StyleSheet:ya,SupportsDeclaration:Ca,TypeSelector:Oa,UnicodeRange:Ia,Url:Ba,Value:Wa,WhiteSpace:Ya},Symbol.toStringTag,{value:`Module`}))});let K=(e=21)=>{let t=``,n=e|0;for(;n--;)t+=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`[Math.random()*64|0];return t};const ns=K(),rs=/* @__PURE__ */ new Set;function is(e){return!!(e&&e.type===`Function`&&e.name===`anchor`)}function q(e,t=!1){return ts(e,{parseAtrulePrelude:!1,parseCustomProperty:!0,onParseError:e=>{t&&rs.add(e)}})}function J(e){return To(e,{mode:`spec`})}function as(e){return e.type===`Declaration`}function os(e){return e.toArray().reduce((e,t)=>t.type===`Operator`&&t.value===`,`?(e.push([]),e):(t.type===`Identifier`&&e[e.length-1].push(t),e),[[]])}function ss(e){return e?e.children.map(e=>{let t;e.children.last?.type===`PseudoElementSelector`&&(e=Je(e),t=J(e.children.last),e.children.pop());let n=J(e);return{selector:n+(t??``),elementPart:n,pseudoElementPart:t}}).toArray():[]}function cs(){rs.size>0&&(console.group(`The CSS anchor positioning polyfill was not applied due to ${rs.size===1?`a CSS parse error`:`CSS parse errors`}.`),rs.forEach(e=>{console.warn(e.formattedMessage)}),console.groupEnd())}function ls(){rs.clear()}const us=[...ao,`anchor-scope`,`anchor-name`].reduce((e,t)=>(e[t]=`--${t}-${ns}`,e),{});function ds(e,t){return as(e)&&us[e.property]&&t?(t.children.appendData(c(s({},e),{property:us[e.property]})),{updated:!0}):{updated:!1}}function fs(e,t){if(!as(e)||!t||![`inset`,`inset-block`,`inset-inline`].includes(e.property))return{updated:!1};let n=(n,r)=>{r&&t.children.appendData(c(s({},e),{property:n,value:{type:`Value`,children:new qe().fromArray([r])}}))};if(e.property===`inset`){let t=e.value.children.toArray(),[r,i,a,o]=(()=>{switch(t.length){case 1:return[t[0],t[0],t[0],t[0]];case 2:return[t[0],t[1],t[0],t[1]];case 3:return[t[0],t[1],t[2],t[1]];case 4:return[t[0],t[1],t[2],t[3]];default:return[]}})();n(`top`,r),n(`right`,i),n(`bottom`,a),n(`left`,o)}else if(e.property===`inset-block`){let t=e.value.children.toArray(),[r,i]=(()=>{switch(t.length){case 1:return[t[0],t[0]];case 2:return[t[0],t[1]];default:return[]}})();n(`inset-block-start`,r),n(`inset-block-end`,i)}else if(e.property===`inset-inline`){let t=e.value.children.toArray(),[r,i]=(()=>{switch(t.length){case 1:return[t[0],t[0]];case 2:return[t[0],t[1]];default:return[]}})();n(`inset-inline-start`,r),n(`inset-inline-end`,i)}return{updated:!0}}function ps(e){for(let t of e){let e=!1,n=q(t.css,!0);W(n,{visit:`Declaration`,enter(t){let n=this.rule?.block,{updated:r}=fs(t,n),{updated:i}=ds(t,n);(i||r)&&(e=!0)}}),e&&(t.css=J(n),t.changed=!0)}return e.some(e=>e.changed===!0)}var ms=/* @__PURE__ */ (e=>(e.All=`all`,e.None=`none`,e))(ms||{});function Y(e,t){return t=us[t]??t,(e instanceof HTMLElement?getComputedStyle(e):e.computedStyle).getPropertyValue(t).trim()}function X(e,t,n){return Y(e,t)===n}function hs(e,{selector:t,pseudoElementPart:n}){let r=getComputedStyle(e,n),i=document.createElement(`div`),a=document.createElement(`style`);i.id=`fake-pseudo-element-${K()}`;for(let e of Array.from(r)){let t=r.getPropertyValue(e);i.style.setProperty(e,t)}a.textContent+=`#${i.id}${n} { content: ${r.content}; }`,a.textContent+=`${t} { display: none !important; }`,document.head.append(a);let o=n===`::before`?`afterbegin`:`beforeend`;return e.insertAdjacentElement(o,i),{fakePseudoElement:i,sheet:a,computedStyle:r}}function gs(e){let t=e;for(;t;){if(X(t,`overflow`,`scroll`))return t;t=t.parentElement}return t}function _s(e){let t=gs(e);return t===document.documentElement&&(t=null),t??{scrollTop:0,scrollLeft:0}}function vs(e,t){let{elementPart:n,pseudoElementPart:r}=e,i=[];if(r&&r!==`::before`&&r!==`::after`)return i;let a=Ss(t.roots,n);if(!r)return i.push(...a),i;for(let t of a){let{fakePseudoElement:n,sheet:r,computedStyle:a}=hs(t,e),o=n.getBoundingClientRect(),{scrollY:s,scrollX:c}=globalThis,l=_s(t);i.push({fakePseudoElement:n,computedStyle:a,removeFakePseudoElement(){n.remove(),r.remove()},contextElement:t,getBoundingClientRect(){let{scrollY:e,scrollX:t}=globalThis,{scrollTop:n,scrollLeft:r}=l;return DOMRect.fromRect({y:o.y+(s-e)+(l.scrollTop-n),x:o.x+(c-t)+(l.scrollLeft-r),width:o.width,height:o.height})}})}return i}function ys(e,t){let n=Y(e,`anchor-name`);return t?n.split(`,`).map(e=>e.trim()).includes(t):!n}function bs(e,t){let n=Y(e,`anchor-scope`);return n===t||n===`all`}const xs=e=>l(null,null,function*(){let t=yield j.getOffsetParent?.call(j,e);return(yield j.isElement?.call(j,t))||(t=(yield j.getDocumentElement?.call(j,e))||window.document.documentElement),t}),Ss=(e,t)=>e.flatMap(e=>[...e.querySelectorAll(t)]),Cs=`InvalidMimeType`;function ws(e){return!(e.type!==`text/css`&&e.rel!==`stylesheet`||!e.href)}function Ts(e){let t=new URL(e.href,document.baseURI);if(ws(e)&&t.origin===location.origin)return t}function Es(e){return l(this,null,function*(){return(yield Promise.all(e.map(e=>l(null,null,function*(){var t;if(!e.url)return e;if((t=e.el)!=null&&t.disabled)return null;try{let t=yield fetch(e.url.toString()),n=t.headers.get(`content-type`);if(!(n!=null&&n.startsWith(`text/css`))){let t=/* @__PURE__ */ Error(`Error loading ${e.url}: expected content-type "text/css", got "${n}".`);throw t.name=Cs,t}let r=yield t.text();return c(s({},e),{css:r})}catch(e){if(e instanceof Error&&e.name===Cs)return console.warn(e),null;throw e}})))).filter(e=>e!==null)})}const Ds=`[style*="anchor"]`,Os=`[style*="position-area"]`;function ks(e){let t=e?e.filter(e=>e instanceof HTMLElement&&(e.matches(Ds)||e.matches(Os))):Array.from(document.querySelectorAll([Ds,Os].join(`,`))),n=[];return t.filter(e=>e instanceof HTMLElement).forEach(e=>{let t=K(12),r=`data-has-inline-styles`;e.setAttribute(r,t);let i=`[${r}="${t}"] { ${e.getAttribute(`style`)} }`;n.push({el:e,css:i})}),n}function As(e){return l(this,null,function*(){let t=e.elements??Ss(e.roots,`link, style`),n=[];t.filter(e=>e instanceof HTMLElement).forEach(e=>{if(e.tagName.toLowerCase()===`link`){let t=Ts(e);t&&n.push({el:e,url:t})}e.tagName.toLowerCase()===`style`&&n.push({el:e,css:e.innerHTML})});let r=ks(e.excludeInlineStyles?e.elements??[]:void 0);return yield Es([...n,...r])})}let js=(e=21)=>{let t=``,n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`[n[e]&63];return t};const Ms=`--pa-cascade-property`,Ns=`data-anchor-position-wrapper`,Ps=`data-pa-wrapper-for-`,Fs=`POLYFILL-POSITION-AREA`,Is=/* @__PURE__ */ `left.center.right.span-left.span-right.x-start.x-end.span-x-start.span-x-end.self-x-start.self-x-end.span-self-x-start.span-self-x-end.span-all.top.bottom.span-top.span-bottom.y-start.y-end.span-y-start.span-y-end.self-y-start.self-y-end.span-self-y-start.span-self-y-end.block-start.block-end.span-block-start.span-block-end.inline-start.inline-end.span-inline-start.span-inline-end.self-block-start.self-block-end.span-self-block-start.span-self-block-end.self-inline-start.self-inline-end.span-self-inline-start.span-self-inline-end.start.end.span-start.span-end.self-start.self-end.span-self-start.span-self-end`.split(`.`);function Ls(e){return Is.includes(e)}const Rs={left:[0,1,`Irrelevant`],center:[1,2,`Irrelevant`],right:[2,3,`Irrelevant`],"span-left":[0,2,`Irrelevant`],"span-right":[1,3,`Irrelevant`],"x-start":[0,1,`Physical`],"x-end":[2,3,`Physical`],"span-x-start":[0,2,`Physical`],"span-x-end":[1,3,`Physical`],"self-x-start":[0,1,`PhysicalSelf`],"self-x-end":[2,3,`PhysicalSelf`],"span-self-x-start":[0,2,`PhysicalSelf`],"span-self-x-end":[1,3,`PhysicalSelf`],"span-all":[0,3,`Irrelevant`],top:[0,1,`Irrelevant`],bottom:[2,3,`Irrelevant`],"span-top":[0,2,`Irrelevant`],"span-bottom":[1,3,`Irrelevant`],"y-start":[0,1,`Physical`],"y-end":[2,3,`Physical`],"span-y-start":[0,2,`Physical`],"span-y-end":[1,3,`Physical`],"self-y-start":[0,1,`PhysicalSelf`],"self-y-end":[2,3,`PhysicalSelf`],"span-self-y-start":[0,2,`PhysicalSelf`],"span-self-y-end":[1,3,`PhysicalSelf`],"block-start":[0,1,`Logical`],"block-end":[2,3,`Logical`],"span-block-start":[0,2,`Logical`],"span-block-end":[1,3,`Logical`],"inline-start":[0,1,`Logical`],"inline-end":[2,3,`Logical`],"span-inline-start":[0,2,`Logical`],"span-inline-end":[1,3,`Logical`],"self-block-start":[0,1,`LogicalSelf`],"self-block-end":[2,3,`LogicalSelf`],"span-self-block-start":[0,2,`LogicalSelf`],"span-self-block-end":[1,3,`LogicalSelf`],"self-inline-start":[0,1,`LogicalSelf`],"self-inline-end":[2,3,`LogicalSelf`],"span-self-inline-start":[0,2,`LogicalSelf`],"span-self-inline-end":[1,3,`LogicalSelf`],start:[0,1,`Logical`],end:[2,3,`Logical`],"span-start":[0,2,`Logical`],"span-end":[1,3,`Logical`],"self-start":[0,1,`LogicalSelf`],"self-end":[2,3,`LogicalSelf`],"span-self-start":[0,2,`LogicalSelf`],"span-self-end":[1,3,`LogicalSelf`]},zs=[`left`,`center`,`right`,`span-left`,`span-right`,`x-start`,`x-end`,`span-x-start`,`span-x-end`,`self-x-start`,`self-x-end`,`span-self-x-start`,`span-self-x-end`,`span-all`],Bs=[`top`,`center`,`bottom`,`span-top`,`span-bottom`,`y-start`,`y-end`,`span-y-start`,`span-y-end`,`self-y-start`,`self-y-end`,`span-self-y-start`,`span-self-y-end`,`span-all`],Vs=[`block-start`,`center`,`block-end`,`span-block-start`,`span-block-end`,`span-all`],Hs=[`inline-start`,`center`,`inline-end`,`span-inline-start`,`span-inline-end`,`span-all`],Us=[`self-block-start`,`center`,`self-block-end`,`span-self-block-start`,`span-self-block-end`,`span-all`],Ws=[`self-inline-start`,`center`,`self-inline-end`,`span-self-inline-start`,`span-self-inline-end`,`span-all`],Gs=[`start`,`center`,`end`,`span-start`,`span-end`,`span-all`],Ks=[`self-start`,`center`,`self-end`,`span-self-start`,`span-self-end`,`span-all`],qs=[`block`,`top`,`bottom`,`y`],Js=[`inline`,`left`,`right`,`x`];function Ys(e){let t=e.split(`-`);for(let e of t){if(qs.includes(e))return`block`;if(Js.includes(e))return`inline`}return`ambiguous`}function Xs(e,t){return t[0].includes(e[0])&&t[1].includes(e[1])||t[0].includes(e[1])&&t[1].includes(e[0])}const Zs=[[zs,Bs],[Vs,Hs],[Us,Ws],[Gs,Gs],[Ks,Ks]];function Qs(e){for(let t of Zs)if(Xs(e,t))return!0;return!1}const $s=e=>{let t=getComputedStyle(e);return{writingMode:t.writingMode,direction:t.direction}},ec=(e,t)=>l(null,null,function*(){let n=yield xs(e);switch(t){case`Logical`:case`Physical`:return $s(n);case`LogicalSelf`:case`PhysicalSelf`:return $s(e);default:return null}}),tc=e=>e.reverse().map(e=>3-e),nc=(e,t)=>e===`Irrelevant`?t:e,rc=(e,t)=>l(null,[e,t],function*({block:e,inline:t},n){let r=nc(e[2],t[2]),i=yield ec(n,r),a={block:[e[0],e[1]],inline:[t[0],t[1]]};if(i){if(i.direction===`rtl`&&(a.inline=tc(a.inline)),i.writingMode.startsWith(`vertical`)){let e=a.block;a.block=a.inline,a.inline=e}if(i.writingMode.startsWith(`sideways`)){let e=a.block;a.block=a.inline,a.inline=e,i.writingMode.endsWith(`lr`)&&(a.block=tc(a.block))}i.writingMode.endsWith(`rl`)&&(a.inline=tc(a.inline))}return a}),ic=({block:e,inline:t})=>{let n=[0,`top`,`bottom`,0],r=[0,`left`,`right`,0];return{block:[n[e[0]],n[e[1]]],inline:[r[t[0]],r[t[1]]]}};function ac([e,t]){return e===0&&t===3?`center`:e===0?`end`:t===3?`start`:`center`}function oc(e){return e.type===`Declaration`&&e.property===`position-area`}function sc(e){let t=e.value.children.toArray().map(({name:e})=>e);return t.length===1&&(Ys(t[0])===`ambiguous`?t.push(t[0]):t.push(`span-all`)),t}function cc(e){if(!oc(e))return;let t=sc(e);if(!Qs(t))return;let n={};switch(Ys(t[0])){case`block`:n.block=t[0],n.inline=t[1];break;case`inline`:n.inline=t[0],n.block=t[1];break;case`ambiguous`:Ys(t[1])==`block`?(n.block=t[1],n.inline=t[0]):(n.inline=t[1],n.block=t[0])}return{values:n,grid:{block:Rs[n.block],inline:Rs[n.inline]},selectorUUID:`--pa-declaration-${js(12)}`}}function lc(e,t){[`justify-self`,`align-self`].forEach(e=>{t.children.appendData({type:`Declaration`,property:e,value:{type:`Raw`,value:`var(--pa-value-${e})`},important:!1})}),t.children.appendData({type:`Declaration`,property:Ms,value:{type:`Raw`,value:e.selectorUUID},important:!1})}function uc(e,t){var n;let r;if(e.parentElement?.tagName===Fs)r=e.parentElement;else{r=document.createElement(Fs),r.style.display=`grid`,r.style.position=`absolute`;let t=getComputedStyle(e).pointerEvents;r.style.pointerEvents=`none`,e.style.pointerEvents=t,[`top`,`left`,`right`,`bottom`].forEach(e=>{r.style.setProperty(e,`var(--pa-value-${e})`)}),(n=e.parentElement)==null||n.insertBefore(r,e),r.appendChild(e)}return r.setAttribute(`${Ps}${t}`,``),r}function dc(e,t,n){return l(this,null,function*(){let r=`--pa-target-${js(12)}`,i=yield rc(t.grid,e),a=ic(i),o=nc(t.grid.block[2],t.grid.inline[2]),s=[`LogicalSelf`,`PhysicalSelf`].includes(o)?i:t.grid;return{insets:a,alignments:{block:ac([s.block[0],s.block[1]]),inline:ac([s.inline[0],s.inline[1]])},targetUUID:r,targetEl:e,anchorEl:n,wrapperEl:uc(e,r),values:t.values,grid:t.grid,selectorUUID:t.selectorUUID}})}function fc(e,t){return`
8
8
  [${Ns}="${t}"][${Ps}${e}] {
9
9
  --pa-value-top: var(${e}-top);
10
10
  --pa-value-left: var(${e}-left);
@@ -14,4 +14,4 @@ var e=Object.defineProperty,t=Object.defineProperties,n=Object.getOwnPropertyDes
14
14
  --pa-value-align-self: var(${e}-align-self);
15
15
  }
16
16
  `.replaceAll(`
17
- `,``)}const pc=[`normal`,`most-width`,`most-height`,`most-block-size`,`most-inline-size`],mc=[`flip-block`,`flip-inline`,`flip-start`];function hc(e){return e.type===`Declaration`}function gc(e){return e.type===`Declaration`&&e.property===`position-try-fallbacks`}function _c(e){return e.type===`Declaration`&&e.property===`position-try-order`}function vc(e){return e.type===`Declaration`&&e.property===`position-try`}function yc(e){return e.type===`Atrule`&&e.name===`position-try`}function bc(e){return mc.includes(e)}function xc(e){return pc.includes(e)}function Sc(e,t){let n=document.querySelector(e);if(n){let e=wc(n);return t.forEach(t=>{e=Nc(e,t)}),e}}function Cc(e,t){let n=e.declarations;return t.forEach(e=>{n=Nc(n,e)}),n}function wc(e){let t={};return ao.forEach(n=>{let r=Y(e,`--${n}-${ns}`);r&&(t[n]=r)}),t}const Tc={"flip-block":{top:`bottom`,bottom:`top`,"inset-block-start":`inset-block-end`,"inset-block-end":`inset-block-start`,"margin-top":`margin-bottom`,"margin-bottom":`margin-top`},"flip-inline":{left:`right`,right:`left`,"inset-inline-start":`inset-inline-end`,"inset-inline-end":`inset-inline-start`,"margin-left":`margin-right`,"margin-right":`margin-left`},"flip-start":{left:`top`,right:`bottom`,top:`left`,bottom:`right`,"inset-block-start":`inset-block-end`,"inset-block-end":`inset-block-start`,"inset-inline-start":`inset-inline-end`,"inset-inline-end":`inset-inline-start`,"inset-block":`inset-inline`,"inset-inline":`inset-block`}},Ec={"flip-block":{top:`bottom`,bottom:`top`,start:`end`,end:`start`,"self-end":`self-start`,"self-start":`self-end`},"flip-inline":{left:`right`,right:`left`,start:`end`,end:`start`,"self-end":`self-start`,"self-start":`self-end`},"flip-start":{top:`left`,left:`top`,right:`bottom`,bottom:`right`}},Dc={"flip-block":{top:`bottom`,bottom:`top`,start:`end`,end:`start`},"flip-inline":{left:`right`,right:`left`,start:`end`,end:`start`},"flip-start":{}};function Oc(e,t){return Tc[t][e]||e}function kc(e,t){return Ec[t][e]||e}function Ac(e,t){if(t===`flip-start`)return e;{let n=Dc[t];return e.split(`-`).map(e=>n[e]||e).join(`-`)}}function jc(e,t,n){if(e===`margin`){let[e,r,i,a]=t.children.toArray();n===`flip-block`?a?t.children.fromArray([i,r,e,a]):i&&t.children.fromArray([i,r,e]):n===`flip-inline`&&a&&t.children.fromArray([e,a,i,r])}else if(e===`margin-block`){let[e,r]=t.children.toArray();n===`flip-block`&&r&&t.children.fromArray([r,e])}else if(e===`margin-inline`){let[e,r]=t.children.toArray();n===`flip-inline`&&r&&t.children.fromArray([r,e])}}const Mc=(e,t)=>(q(`#id{${e}: ${t};}`).children.first?.block.children.first).value;function Nc(e,t){let n={};return Object.entries(e).forEach(([e,r])=>{let i=e,a=Mc(i,r),o=Oc(i,t);o!==i&&(n[i]??(n[i]=`revert`)),W(a,{visit:`Function`,enter(e){is(e)&&e.children.forEach(e=>{nl(e)&&lo(e.name)&&(e.name=kc(e.name,t))})}}),i===`position-area`&&a.children.forEach(e=>{nl(e)&&Ls(e.name)&&(e.name=Ac(e.name,t))}),i.startsWith(`margin`)&&jc(i,a,t),n[o]=J(a)}),n}function Pc(e){let t=os(e),n=[];return t.forEach(e=>{let t={atRules:[],tactics:[],positionAreas:[]};e.forEach(e=>{bc(e.name)?t.tactics.push(e.name):e.name.startsWith(`--`)?t.atRules.push(e.name):Ls(e.name)&&t.positionAreas.push(e.name)}),t.positionAreas.length?n.push({positionArea:t.positionAreas[0],type:`position-area`}):t.atRules.length&&t.tactics.length?n.push({tactics:t.tactics,atRule:t.atRules[0],type:`at-rule-with-try-tactic`}):t.atRules.length?n.push({atRule:t.atRules[0],type:`at-rule`}):t.tactics.length&&n.push({tactics:t.tactics,type:`try-tactic`})}),n}function Fc(e){return gc(e)&&e.value.children.first?Pc(e.value.children):[]}function Ic(e){if(vc(e)&&e.value.children.first){let t=Je(e),n,r=t.value.children.first.name;r&&xc(r)&&(n=r,t.value.children.shift());let i=Pc(t.value.children);return{order:n,options:i}}return{}}function Lc(e){return _c(e)&&e.value.children.first?{order:e.value.children.first.name}:{}}function Rc(e){let{order:t,options:n}=Ic(e);if(t||n)return{order:t,options:n};let{order:r}=Lc(e),i=Fc(e);return r||i?{order:r,options:i}:{}}function zc(e){return Qa(e.property)||eo(e.property)||no(e.property)||io(e.property)||[`position-anchor`,`position-area`].includes(e.property)}function Bc(e){var t,n;if(yc(e)&&(t=e.prelude)!=null&&t.value&&(n=e.block)!=null&&n.children){let t=e.prelude.value,n=e.block.children.filter(e=>hc(e)&&zc(e));return{name:t,tryBlock:{uuid:`${t}-try-${K(12)}`,declarations:Object.fromEntries(n.map(e=>[e.property,J(e.value)]))}}}return{}}function Vc(e){let t={},n={},r={};for(let n of e)W(q(n.css),{visit:`Atrule`,enter(e){let{name:n,tryBlock:r}=Bc(e);n&&r&&(t[n]=r)}});for(let i of e){let e=!1,a=new Set,o=q(i.css);W(o,{visit:`Declaration`,enter(i){let o=ss(this.rule?.prelude);if(!o.length)return;let{order:s,options:c}=Rc(i),l={};s&&(l.order=s),o.forEach(({selector:i})=>{var o;c?.forEach(r=>{var o;let s;if(r.type===`at-rule`)s=r.atRule;else if(r.type===`try-tactic`){s=`${i}-${r.tactics.join(`-`)}`;let e=Sc(i,r.tactics);e&&(t[s]={uuid:`${i}-${r.tactics.join(`-`)}-try-${K(12)}`,declarations:e})}else if(r.type===`at-rule-with-try-tactic`){s=`${i}-${r.atRule}-${r.tactics.join(`-`)}`;let e=t[r.atRule],n=Cc(e,r.tactics);n&&(t[s]={uuid:`${i}-${r.atRule}-${r.tactics.join(`-`)}-try-${K(12)}`,declarations:n})}if(s&&t[s]){let r=`[data-anchor-polyfill="${t[s].uuid}"]`;n[r]??(n[r]=[]),n[r].push(i),a.has(s)||(l.fallbacks??=[],l.fallbacks.push(t[s]),a.add(s),(o=this.stylesheet)==null||o.children.prependData({type:`Rule`,prelude:{type:`Raw`,value:r},block:{type:`Block`,children:new qe().fromArray(Object.entries(t[s].declarations).map(([e,t])=>({type:`Declaration`,important:!0,property:e,value:{type:`Raw`,value:t}})))}}),e=!0)}}),Object.keys(l).length>0&&(r[i]?(l.order&&(r[i].order=l.order),l.fallbacks&&((o=r[i]).fallbacks??(o.fallbacks=[]),r[i].fallbacks.push(...l.fallbacks))):r[i]=l)})}}),e&&(i.css=J(o),i.changed=!0)}return{fallbackTargets:n,validPositions:r}}function Hc(e,t){return!e||e===t?!1:Uc(e)?e.document.contains(t):e.contains(t)}function Uc(e){return!!(e&&e===e.window)}function Wc(e){return X(e,`position`,`fixed`)}function Gc(e){return!!(e&&(Wc(e)||X(e,`position`,`absolute`)))}function Kc(e,t){return e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING}function qc(e){return l(this,null,function*(){return yield j.getOffsetParent(e)})}function Jc(e){return l(this,null,function*(){if(![`absolute`,`fixed`].includes(Y(e,`position`)))return yield qc(e);let t=e.parentElement;for(;t;){if(!X(t,`position`,`static`)&&X(t,`display`,`block`))return t;t=t.parentElement}return window})}function Yc(e,t,n,r){return l(this,null,function*(){let i=yield Jc(e),a=yield Jc(n);if(!(Hc(a,e)||Uc(a))||i===a&&!(!Gc(e)||Kc(e,n)))return!1;if(i!==a){let e,t=[];for(e=i;e&&e!==a&&e!==window;)t.push(e),e=yield Jc(e);let r=t[t.length-1];if(r instanceof HTMLElement&&!(!Gc(r)||Kc(r,n)))return!1}{let t=e.parentElement;for(;t;){if(X(t,`content-visibility`,`hidden`))return!1;t=t.parentElement}}return!(t&&r&&Xc(e,t,r)!==Xc(n,t,r))})}function Xc(e,t,n){for(;!(e.matches(n)&&bs(e,t));){if(!e.parentElement)return null;e=e.parentElement}return e}function Zc(e,t,n,r,i){return l(this,null,function*(){if(!(e instanceof HTMLElement&&n.length&&Gc(e)))return null;let a=n.flatMap(e=>vs(e,i)).filter(e=>ys(e,t)),o=r.map(e=>e.selector).join(`,`)||null;for(let n=a.length-1;n>=0;n--){let r=a[n],i=`fakePseudoElement`in r;if(yield Yc(i?r.fakePseudoElement:r,t,e,o))return i&&r.removeFakePseudoElement(),r}return null})}function Qc(e){return e.type===`Declaration`&&e.property===`anchor-name`}function $c(e){return e.type===`Declaration`&&e.property===`anchor-scope`}function el(e){return!!(e&&e.type===`Function`&&e.name===`anchor-size`)}function tl(e){return!!(e&&e.type===`Function`&&e.name===`var`)}function nl(e){return!!(e.type===`Identifier`&&e.name)}function rl(e){return!!(e.type===`Percentage`&&e.value)}function il(e,t){let n,r,i,a=``,o=!1,s,c=[];e.children.toArray().forEach(e=>{if(o){a=`${a}${J(e)}`;return}if(e.type===`Operator`&&e.value===`,`){o=!0;return}c.push(e)});let[l,u]=c;if(u||(u=l,l=void 0),l&&(nl(l)&&l.name.startsWith(`--`)?n=l.name:tl(l)&&l.children.first&&(s=l.children.first.name)),u)if(is(e)){if(nl(u)&&lo(u.name))r=u.name;else if(rl(u)){let e=Number(u.value);r=Number.isNaN(e)?void 0:e}}else el(e)&&nl(u)&&fo(u.name)&&(i=u.name);let d=`--anchor-${K(12)}`;return Object.assign(e,{type:`Raw`,value:`var(${d})`,children:null}),Reflect.deleteProperty(e,`name`),{anchorName:n,anchorSide:r,anchorSize:i,fallbackValue:a,customPropName:s,uuid:d}}function al(e){return e.value.children.map(({name:e})=>e)}let ol={},Z={},Q={},sl={},$={};function cl(){ol={},Z={},Q={},sl={},$={}}function ll(e,t){if((is(e)||el(e))&&t){if(t.property.startsWith(`--`)){let n=J(t.value),r=il(e);return sl[r.uuid]=n,Q[t.property]=[...Q[t.property]??[],r],{changed:!0}}if(is(e)&&Qa(t.property)||el(e)&&so(t.property)){let n=il(e);return{prop:t.property,data:n,changed:!0}}}return{}}function ul(e,t,n){return l(this,null,function*(){let r=t?.anchorName,i=t?.customPropName;if(e&&!r){let t=Y(e,`position-anchor`);t?r=t:i&&(r=Y(e,i))}let a=r&&ol[r]||[],o=r&&Z[ms.All]||[],s=r&&Z[r]||[];return yield Zc(e,r||null,a,[...o,...s],{roots:n.roots})})}function dl(e,t){return l(this,null,function*(){var n;let r={},i={};cl();let{fallbackTargets:a,validPositions:o}=Vc(e);for(let t of e){let e=!1,n=q(t.css);W(n,function(t){let n=ss(this.rule?.prelude);if(Qc(t)&&n.length)for(let e of al(t))ol[e]??(ol[e]=[]),ol[e].push(...n);if($c(t)&&n.length)for(let e of al(t))Z[e]??(Z[e]=[]),Z[e].push(...n);let{prop:a,data:o,changed:l}=ll(t,this.declaration);if(a&&o&&n.length)for(let{selector:e}of n)r[e]=c(s({},r[e]),{[a]:[...r[e]?.[a]??[],o]});let u;if(this.block&&(u=cc(t),u)){lc(u,this.block);for(let{selector:e}of n)i[e]=[...i[e]??[],u]}(l||u)&&(e=!0)}),e&&(t.css=J(n),t.changed=!0)}let l=new Set(Object.keys(Q)),u={},d=e=>{var t;let n=[],r=new Set(u[e]?.names??[]);for(;r.size>0;)for(let e of r)n.push(...Q[e]??[]),r.delete(e),(t=u[e]?.names)!=null&&t.length&&u[e].names.forEach(e=>r.add(e));return n};for(;l.size>0;){let t=[];for(let n of e){let e=!1,r=q(n.css);W(r,{visit:`Function`,enter(n){let r=this.rule?.prelude,i=this.declaration,a=i?.property;if(r?.children.isEmpty===!1&&tl(n)&&i&&a&&n.children.first&&l.has(n.children.first.name)&&a.startsWith(`--`)){let r=n.children.first,o=Q[r.name]??[],s=d(r.name);if(!(o.length||s.length))return;let c=`${r.name}-anchor-${K(12)}`,l=J(i.value);sl[c]=l,u[a]||(u[a]={names:[],uuids:[]});let f=u[a];f.names.includes(r.name)||f.names.push(r.name),f.uuids.push(c),t.push(a),r.name=c,e=!0}}}),e&&(n.css=J(r),n.changed=!0)}l.clear(),t.forEach(e=>l.add(e))}for(let t of e){let e=!1,n=q(t.css);W(n,{visit:`Function`,enter(t){var n,i,a;let o=this.rule?.prelude,l=this.declaration,f=l?.property;if(o?.children.isEmpty===!1&&tl(t)&&l&&f&&t.children.first&&(Qa(f)||no(f))){let l=t.children.first,p=Q[l.name]??[],m=d(l.name);if(!(p.length||m.length))return;let h=`${f}-${K(12)}`;if(m.length){let e=new Set([l.name]);for(;e.size>0;)for(let t of e){let r=u[t];if((n=r?.names)!=null&&n.length&&(i=r?.uuids)!=null&&i.length)for(let e of r.names)for(let t of r.uuids)$[t]=c(s({},$[t]),{[h]:`${e}-${h}`});e.delete(t),(a=r?.names)!=null&&a.length&&r.names.forEach(t=>e.add(t))}}let g=ss(o);for(let e of[...p,...m]){let t=s({},e),n=`--anchor-${K(12)}-${f}`,i=t.uuid;t.uuid=n;for(let{selector:e}of g)r[e]=c(s({},r[e]),{[f]:[...r[e]?.[f]??[],t]});$[i]=c(s({},$[i]),{[h]:n})}l.name=`${l.name}-${h}`,e=!0}}}),e&&(t.css=J(n),t.changed=!0)}if(Object.keys($).length>0)for(let t of e){let e=!1,n=q(t.css);W(n,{visit:`Function`,enter(t){var n,r;if(tl(t)&&(n=t.children.first?.name)!=null&&n.startsWith(`--`)&&(r=this.declaration?.property)!=null&&r.startsWith(`--`)&&this.block){let n=t.children.first,r=$[n.name];if(r)for(let[t,i]of Object.entries(r))this.block.children.appendData({type:`Declaration`,important:!1,property:`${this.declaration.property}-${t}`,value:{type:`Raw`,value:J(this.declaration.value).replace(`var(${n.name})`,`var(${i})`)}}),e=!0;sl[n.name]&&(this.declaration.value={type:`Raw`,value:sl[n.name]},e=!0)}}}),e&&(t.css=J(n),t.changed=!0)}let f=new Map;for(let[e,i]of Object.entries(r)){let r;r=e.startsWith(`[data-anchor-polyfill=`)&&(n=a[e])!=null&&n.length?Ss(t.roots,a[e].join(`,`)):Ss(t.roots,e);for(let[n,a]of Object.entries(i))for(let i of a)for(let a of r){let r=yield ul(a,i,{roots:t.roots}),l=`--anchor-${K(12)}`;f.set(a,c(s({},f.get(a)??{}),{[i.uuid]:l})),a.setAttribute(`style`,`${i.uuid}: var(${l}); ${a.getAttribute(`style`)??``}`),o[e]=c(s({},o[e]),{declarations:c(s({},o[e]?.declarations),{[n]:[...o[e]?.declarations?.[n]??[],c(s({},i),{anchorEl:r,targetEl:a,uuid:l})]})})}}let p={el:document.createElement(`link`),changed:!1,created:!0,css:``};e.push(p);for(let[e,n]of Object.entries(i)){let r=Ss(t.roots,e);for(let i of r){let r=yield ul(i,null,{roots:t.roots});for(let t of n){let n=yield dc(i,t,r);p.css+=fc(n.targetUUID,t.selectorUUID),p.changed=!0,o[e]=c(s({},o[e]),{declarations:c(s({},o[e]?.declarations),{"position-area":[...o[e]?.declarations?.[`position-area`]??[],n]})})}}}return{rules:o,inlineStyles:f,anchorScopes:Z}})}const fl=[`as`,`blocking`,`crossorigin`,`disabled`,`fetchpriority`,`href`,`hreflang`,`integrity`,`referrerpolicy`,`rel`,`type`];function pl(e,t,n=!1){let r=[];for(let{el:i,css:a,changed:o,created:s=!1}of e){let e={el:i,css:a,changed:!1};if(o){if(i.tagName.toLowerCase()===`style`)i.innerHTML=a;else if(i instanceof HTMLLinkElement){let t=document.createElement(`style`);t.textContent=a;for(let e of i.getAttributeNames())if(!e.startsWith(`on`)&&!fl.includes(e)){let n=i.getAttribute(e);n!==null&&t.setAttribute(e,n)}i.hasAttribute(`href`)&&t.setAttribute(`data-original-href`,i.getAttribute(`href`)),s?(t.setAttribute(`data-generated-by-polyfill`,`true`),document.head.insertAdjacentElement(`beforeend`,t)):(i.insertAdjacentElement(`beforebegin`,t),i.remove()),e.el=t}else if(i.hasAttribute(`data-has-inline-styles`)){let e=i.getAttribute(`data-has-inline-styles`);if(e){let n=`[data-has-inline-styles="${e}"]{`,r=a.slice(n.length,-1),o=t?.get(i);if(o)for(let[e,t]of Object.entries(o))r=`${e}: var(${t}); ${r}`;i.setAttribute(`style`,r)}}}n&&i.hasAttribute(`data-has-inline-styles`)&&i.removeAttribute(`data-has-inline-styles`),r.push(e)}return r}const ml=c(s({},j),{_c:new Map}),hl=(e,t)=>{let n;switch(e){case`start`:case`self-start`:n=0;break;case`end`:case`self-end`:n=100;break;default:typeof e==`number`&&!Number.isNaN(e)&&(n=e)}if(n!==void 0)return t?100-n:n},gl=(e,t)=>{let n;switch(e){case`block`:case`self-block`:n=t?`width`:`height`;break;case`inline`:case`self-inline`:n=t?`height`:`width`;break}return n},_l=e=>{switch(e){case`top`:case`bottom`:case`inset-block-start`:case`inset-block-end`:return`y`;case`left`:case`right`:case`inset-inline-start`:case`inset-inline-end`:return`x`}return null},vl=e=>{switch(e){case`x`:return`width`;case`y`:return`height`}return null},yl=e=>Y(e,`display`)===`inline`,bl=(e,t)=>(t===`x`?[`border-left-width`,`border-right-width`]:[`border-top-width`,`border-bottom-width`]).reduce((t,n)=>t+parseInt(Y(e,n),10),0)||0,xl=(e,t)=>parseInt(Y(e,`margin-${t}`),10)||0,Sl=e=>({top:xl(e,`top`),right:xl(e,`right`),bottom:xl(e,`bottom`),left:xl(e,`left`)}),Cl=e=>l(null,[e],function*({targetEl:e,targetProperty:t,anchorRect:n,anchorSide:r,anchorSize:i,fallback:a=null}){if(!((i||r!==void 0)&&e&&n))return a;if(i){if(!so(t))return a;let r;switch(i){case`width`:case`height`:r=i;break;default:{let t=!1,n=Y(e,`writing-mode`);t=n.startsWith(`vertical-`)||n.startsWith(`sideways-`),r=gl(i,t)}}return r?`${n[r]}px`:a}if(r!==void 0){let i,o,s=_l(t);if(!(Qa(t)&&s&&(!Qa(r)||s===_l(r))))return a;let c=[`top`,`left`,`inset-block-start`,`inset-inline-start`],l=[`bottom`,`right`,`inset-block-end`,`inset-inline-end`];switch(r){case`left`:case`top`:i=0;break;case`right`:case`bottom`:i=100;break;case`center`:i=50;break;case`inside`:i=c.includes(t)?0:100;break;case`outside`:i=c.includes(t)?100:0;break;default:e&&(i=hl(r,(yield j.isRTL?.call(j,e))||!1))}let u=typeof i==`number`&&!Number.isNaN(i),d=vl(s);if(u&&d){l.includes(t)&&(o=yield xs(e));let r=n[s]+n[d]*(i/100);switch(t){case`bottom`:case`inset-block-end`:{if(!o)break;let e=o.clientHeight;if(e===0&&yl(o)){let t=bl(o,s);e=o.offsetHeight-t}r=e-r;break}case`right`:case`inset-inline-end`:{if(!o)break;let e=o.clientWidth;if(e===0&&yl(o)){let t=bl(o,s);e=o.offsetWidth-t}r=e-r;break}}return`${r}px`}}return a}),wl=e=>`wrapperEl`in e,Tl=e=>`uuid`in e;function El(e,t=!1){return l(this,null,function*(){let n=document.documentElement;for(let[r,i]of Object.entries(e))for(let e of i){let i=e.anchorEl,a=e.targetEl;if(i&&a)if(wl(e)){let r=e.wrapperEl,o=(e,t,n)=>l(null,null,function*(){return e===0?`0px`:yield Cl({targetEl:r,targetProperty:t,anchorRect:n,anchorSide:e})});Ge(i,r,()=>l(null,null,function*(){let t=Y(a,Ms);r.setAttribute(Ns,t);let s=yield j.getElementRects({reference:i,floating:r,strategy:`absolute`}),c=e.insets,l=yield o(c.block[0],`top`,s.reference),u=yield o(c.block[1],`bottom`,s.reference),d=yield o(c.inline[0],`left`,s.reference),f=yield o(c.inline[1],`right`,s.reference);n.style.setProperty(`${e.targetUUID}-top`,l||null),n.style.setProperty(`${e.targetUUID}-left`,d||null),n.style.setProperty(`${e.targetUUID}-right`,f||null),n.style.setProperty(`${e.targetUUID}-bottom`,u||null),n.style.setProperty(`${e.targetUUID}-justify-self`,e.alignments.inline),n.style.setProperty(`${e.targetUUID}-align-self`,e.alignments.block)}),{animationFrame:t})}else Ge(i,a,()=>l(null,null,function*(){let t=yield Cl({targetEl:a,targetProperty:r,anchorRect:(yield j.getElementRects({reference:i,floating:a,strategy:`absolute`})).reference,anchorSide:e.anchorSide,anchorSize:e.anchorSize,fallback:e.fallbackValue});n.style.setProperty(e.uuid,t)}),{animationFrame:t});else if(Tl(e)){let t=yield Cl({targetProperty:r,anchorSide:e.anchorSide,anchorSize:e.anchorSize,fallback:e.fallbackValue});n.style.setProperty(e.uuid,t)}}})}function Dl(e,t){return l(this,null,function*(){let n=yield j.getElementRects({reference:e,floating:e,strategy:`absolute`});return yield Ke({x:e.offsetLeft,y:e.offsetTop,platform:ml,rects:n,elements:{floating:e,reference:t},strategy:`absolute`},{padding:Sl(e)})})}function Ol(e,t,n=!1){return l(this,null,function*(){if(!t.length)return;let r=document.querySelectorAll(e);for(let e of r){let r=!1,i=yield xs(e);Ge({},e,()=>l(null,null,function*(){if(r)return;r=!0,e.removeAttribute(`data-anchor-polyfill`);let n=yield Dl(e,i);if(Object.values(n).every(e=>e<=0)){e.removeAttribute(`data-anchor-polyfill-last-successful`),r=!1;return}for(let[n,{uuid:a}]of t.entries()){e.setAttribute(`data-anchor-polyfill`,a);let o=yield Dl(e,i);if(Object.values(o).every(e=>e<=0)){e.setAttribute(`data-anchor-polyfill-last-successful`,a),r=!1;break}if(n===t.length-1){let t=e.getAttribute(`data-anchor-polyfill-last-successful`);t?e.setAttribute(`data-anchor-polyfill`,t):e.removeAttribute(`data-anchor-polyfill`),r=!1;break}}}),{animationFrame:n,layoutShift:!1})}})}function kl(e,t=!1){return l(this,null,function*(){for(let n of Object.values(e))yield El(n.declarations??{},t);for(let[n,r]of Object.entries(e))yield Ol(n,r.fallbacks??[],t)})}function Al(e={}){let t=typeof e==`boolean`?{useAnimationFrame:e}:e,n=t.useAnimationFrame===void 0?!!window.UPDATE_ANCHOR_ON_ANIMATION_FRAME:t.useAnimationFrame;return Array.isArray(t.elements)||(t.elements=void 0),(!Array.isArray(t.roots)||t.roots.length===0)&&(t.roots=[document]),Object.assign(t,{useAnimationFrame:n})}function jl(e){return l(this,null,function*(){let t=Al(e??window.ANCHOR_POSITIONING_POLYFILL_OPTIONS),n=yield As(t),r={},i;ls();try{ps(n)&&(n=pl(n));let e=yield dl(n,{roots:t.roots});r=e.rules,i=e.inlineStyles}catch(e){throw cs(),e}return Object.values(r).length&&(pl(n,i,!0),yield kl(r,t.useAnimationFrame)),r})}export{jl as default};
17
+ `,``)}const pc=[`normal`,`most-width`,`most-height`,`most-block-size`,`most-inline-size`],mc=[`flip-block`,`flip-inline`,`flip-start`];function hc(e){return e.type===`Declaration`}function gc(e){return e.type===`Declaration`&&e.property===`position-try-fallbacks`}function _c(e){return e.type===`Declaration`&&e.property===`position-try-order`}function vc(e){return e.type===`Declaration`&&e.property===`position-try`}function yc(e){return e.type===`Atrule`&&e.name===`position-try`}function bc(e){return mc.includes(e)}function xc(e){return pc.includes(e)}function Sc(e,t){let n=document.querySelector(e);if(n){let e=wc(n);return t.forEach(t=>{e=Nc(e,t)}),e}}function Cc(e,t){let n=e.declarations;return t.forEach(e=>{n=Nc(n,e)}),n}function wc(e){let t={};return ao.forEach(n=>{let r=Y(e,`--${n}-${ns}`);r&&(t[n]=r)}),t}const Tc={"flip-block":{top:`bottom`,bottom:`top`,"inset-block-start":`inset-block-end`,"inset-block-end":`inset-block-start`,"margin-top":`margin-bottom`,"margin-bottom":`margin-top`},"flip-inline":{left:`right`,right:`left`,"inset-inline-start":`inset-inline-end`,"inset-inline-end":`inset-inline-start`,"margin-left":`margin-right`,"margin-right":`margin-left`},"flip-start":{left:`top`,right:`bottom`,top:`left`,bottom:`right`,"inset-block-start":`inset-block-end`,"inset-block-end":`inset-block-start`,"inset-inline-start":`inset-inline-end`,"inset-inline-end":`inset-inline-start`,"inset-block":`inset-inline`,"inset-inline":`inset-block`}},Ec={"flip-block":{top:`bottom`,bottom:`top`,start:`end`,end:`start`,"self-end":`self-start`,"self-start":`self-end`},"flip-inline":{left:`right`,right:`left`,start:`end`,end:`start`,"self-end":`self-start`,"self-start":`self-end`},"flip-start":{top:`left`,left:`top`,right:`bottom`,bottom:`right`}},Dc={"flip-block":{top:`bottom`,bottom:`top`,start:`end`,end:`start`},"flip-inline":{left:`right`,right:`left`,start:`end`,end:`start`},"flip-start":{}};function Oc(e,t){return Tc[t][e]||e}function kc(e,t){return Ec[t][e]||e}function Ac(e,t){if(t===`flip-start`)return e;{let n=Dc[t];return e.split(`-`).map(e=>n[e]||e).join(`-`)}}function jc(e,t,n){if(e===`margin`){let[e,r,i,a]=t.children.toArray();n===`flip-block`?a?t.children.fromArray([i,r,e,a]):i&&t.children.fromArray([i,r,e]):n===`flip-inline`&&a&&t.children.fromArray([e,a,i,r])}else if(e===`margin-block`){let[e,r]=t.children.toArray();n===`flip-block`&&r&&t.children.fromArray([r,e])}else if(e===`margin-inline`){let[e,r]=t.children.toArray();n===`flip-inline`&&r&&t.children.fromArray([r,e])}}const Mc=(e,t)=>(q(`#id{${e}: ${t};}`).children.first?.block.children.first).value;function Nc(e,t){let n={};return Object.entries(e).forEach(([e,r])=>{let i=e,a=Mc(i,r),o=Oc(i,t);o!==i&&(n[i]??(n[i]=`revert`)),W(a,{visit:`Function`,enter(e){is(e)&&e.children.forEach(e=>{nl(e)&&lo(e.name)&&(e.name=kc(e.name,t))})}}),i===`position-area`&&a.children.forEach(e=>{nl(e)&&Ls(e.name)&&(e.name=Ac(e.name,t))}),i.startsWith(`margin`)&&jc(i,a,t),n[o]=J(a)}),n}function Pc(e){let t=os(e),n=[];return t.forEach(e=>{let t={atRules:[],tactics:[],positionAreas:[]};e.forEach(e=>{bc(e.name)?t.tactics.push(e.name):e.name.startsWith(`--`)?t.atRules.push(e.name):Ls(e.name)&&t.positionAreas.push(e.name)}),t.positionAreas.length?n.push({positionArea:t.positionAreas[0],type:`position-area`}):t.atRules.length&&t.tactics.length?n.push({tactics:t.tactics,atRule:t.atRules[0],type:`at-rule-with-try-tactic`}):t.atRules.length?n.push({atRule:t.atRules[0],type:`at-rule`}):t.tactics.length&&n.push({tactics:t.tactics,type:`try-tactic`})}),n}function Fc(e){return gc(e)&&e.value.children.first?Pc(e.value.children):[]}function Ic(e){if(vc(e)&&e.value.children.first){let t=Je(e),n,r=t.value.children.first.name;r&&xc(r)&&(n=r,t.value.children.shift());let i=Pc(t.value.children);return{order:n,options:i}}return{}}function Lc(e){return _c(e)&&e.value.children.first?{order:e.value.children.first.name}:{}}function Rc(e){let{order:t,options:n}=Ic(e);if(t||n)return{order:t,options:n};let{order:r}=Lc(e),i=Fc(e);return r||i?{order:r,options:i}:{}}function zc(e){return Qa(e.property)||eo(e.property)||no(e.property)||io(e.property)||[`position-anchor`,`position-area`].includes(e.property)}function Bc(e){var t,n;if(yc(e)&&(t=e.prelude)!=null&&t.value&&(n=e.block)!=null&&n.children){let t=e.prelude.value,n=e.block.children.filter(e=>hc(e)&&zc(e));return{name:t,tryBlock:{uuid:`${t}-try-${K(12)}`,declarations:Object.fromEntries(n.map(e=>[e.property,J(e.value)]))}}}return{}}function Vc(e){let t={},n={},r={};for(let n of e){let e=q(n.css);W(e,{visit:`Atrule`,enter(e){let{name:n,tryBlock:r}=Bc(e);n&&r&&(t[n]=r)}})}for(let i of e){let e=!1,a=/* @__PURE__ */ new Set,o=q(i.css);W(o,{visit:`Declaration`,enter(i){let o=ss(this.rule?.prelude);if(!o.length)return;let{order:s,options:c}=Rc(i),l={};s&&(l.order=s),o.forEach(({selector:i})=>{var o;c?.forEach(r=>{var o;let s;if(r.type===`at-rule`)s=r.atRule;else if(r.type===`try-tactic`){s=`${i}-${r.tactics.join(`-`)}`;let e=Sc(i,r.tactics);e&&(t[s]={uuid:`${i}-${r.tactics.join(`-`)}-try-${K(12)}`,declarations:e})}else if(r.type===`at-rule-with-try-tactic`){s=`${i}-${r.atRule}-${r.tactics.join(`-`)}`;let e=t[r.atRule],n=Cc(e,r.tactics);n&&(t[s]={uuid:`${i}-${r.atRule}-${r.tactics.join(`-`)}-try-${K(12)}`,declarations:n})}if(s&&t[s]){let r=`[data-anchor-polyfill="${t[s].uuid}"]`;n[r]??(n[r]=[]),n[r].push(i),a.has(s)||(l.fallbacks??=[],l.fallbacks.push(t[s]),a.add(s),(o=this.stylesheet)==null||o.children.prependData({type:`Rule`,prelude:{type:`Raw`,value:r},block:{type:`Block`,children:new qe().fromArray(Object.entries(t[s].declarations).map(([e,t])=>({type:`Declaration`,important:!0,property:e,value:{type:`Raw`,value:t}})))}}),e=!0)}}),Object.keys(l).length>0&&(r[i]?(l.order&&(r[i].order=l.order),l.fallbacks&&((o=r[i]).fallbacks??(o.fallbacks=[]),r[i].fallbacks.push(...l.fallbacks))):r[i]=l)})}}),e&&(i.css=J(o),i.changed=!0)}return{fallbackTargets:n,validPositions:r}}function Hc(e,t){return!e||e===t?!1:Uc(e)?e.document.contains(t):e.contains(t)}function Uc(e){return!!(e&&e===e.window)}function Wc(e){return X(e,`position`,`fixed`)}function Gc(e){return!!(e&&(Wc(e)||X(e,`position`,`absolute`)))}function Kc(e,t){return e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING}function qc(e){return l(this,null,function*(){return yield j.getOffsetParent(e)})}function Jc(e){return l(this,null,function*(){if(![`absolute`,`fixed`].includes(Y(e,`position`)))return yield qc(e);let t=e.parentElement;for(;t;){if(!X(t,`position`,`static`)&&X(t,`display`,`block`))return t;t=t.parentElement}return window})}function Yc(e,t,n,r){return l(this,null,function*(){let i=yield Jc(e),a=yield Jc(n);if(!(Hc(a,e)||Uc(a))||i===a&&Gc(e)&&!Kc(e,n))return!1;if(i!==a){let e,t=[];for(e=i;e&&e!==a&&e!==window;)t.push(e),e=yield Jc(e);let r=t[t.length-1];if(r instanceof HTMLElement&&Gc(r)&&!Kc(r,n))return!1}{let t=e.parentElement;for(;t;){if(X(t,`content-visibility`,`hidden`))return!1;t=t.parentElement}}return!(t&&r&&Xc(e,t,r)!==Xc(n,t,r))})}function Xc(e,t,n){for(;!(e.matches(n)&&bs(e,t));){if(!e.parentElement)return null;e=e.parentElement}return e}function Zc(e,t,n,r,i){return l(this,null,function*(){if(!(e instanceof HTMLElement&&n.length&&Gc(e)))return null;let a=n.flatMap(e=>vs(e,i)).filter(e=>ys(e,t)),o=r.map(e=>e.selector).join(`,`)||null;for(let n=a.length-1;n>=0;n--){let r=a[n],i=`fakePseudoElement`in r;if(yield Yc(i?r.fakePseudoElement:r,t,e,o))return i&&r.removeFakePseudoElement(),r}return null})}function Qc(e){return e.type===`Declaration`&&e.property===`anchor-name`}function $c(e){return e.type===`Declaration`&&e.property===`anchor-scope`}function el(e){return!!(e&&e.type===`Function`&&e.name===`anchor-size`)}function tl(e){return!!(e&&e.type===`Function`&&e.name===`var`)}function nl(e){return!!(e.type===`Identifier`&&e.name)}function rl(e){return!!(e.type===`Percentage`&&e.value)}function il(e,t){let n,r,i,a=``,o=!1,s,c=[];e.children.toArray().forEach(e=>{if(o){a=`${a}${J(e)}`;return}if(e.type===`Operator`&&e.value===`,`){o=!0;return}c.push(e)});let[l,u]=c;if(u||(u=l,l=void 0),l&&(nl(l)&&l.name.startsWith(`--`)?n=l.name:tl(l)&&l.children.first&&(s=l.children.first.name)),u){if(is(e)){if(nl(u)&&lo(u.name))r=u.name;else if(rl(u)){let e=Number(u.value);r=Number.isNaN(e)?void 0:e}}else el(e)&&nl(u)&&fo(u.name)&&(i=u.name)}let d=`--anchor-${K(12)}`;return Object.assign(e,{type:`Raw`,value:`var(${d})`,children:null}),Reflect.deleteProperty(e,`name`),{anchorName:n,anchorSide:r,anchorSize:i,fallbackValue:a,customPropName:s,uuid:d}}function al(e){return e.value.children.map(({name:e})=>e)}let ol={},Z={},Q={},sl={},$={};function cl(){ol={},Z={},Q={},sl={},$={}}function ll(e,t){if((is(e)||el(e))&&t){if(t.property.startsWith(`--`)){let n=J(t.value),r=il(e);return sl[r.uuid]=n,Q[t.property]=[...Q[t.property]??[],r],{changed:!0}}if(is(e)&&Qa(t.property)||el(e)&&so(t.property)){let n=il(e);return{prop:t.property,data:n,changed:!0}}}return{}}function ul(e,t,n){return l(this,null,function*(){let r=t?.anchorName,i=t?.customPropName;if(e&&!r){let t=Y(e,`position-anchor`);t?r=t:i&&(r=Y(e,i))}let a=r&&ol[r]||[],o=r&&Z[ms.All]||[],s=r&&Z[r]||[];return yield Zc(e,r||null,a,[...o,...s],{roots:n.roots})})}function dl(e,t){return l(this,null,function*(){var n;let r={},i={};cl();let{fallbackTargets:a,validPositions:o}=Vc(e);for(let t of e){let e=!1,n=q(t.css);W(n,function(t){let n=ss(this.rule?.prelude);if(Qc(t)&&n.length)for(let e of al(t))ol[e]??(ol[e]=[]),ol[e].push(...n);if($c(t)&&n.length)for(let e of al(t))Z[e]??(Z[e]=[]),Z[e].push(...n);let{prop:a,data:o,changed:l}=ll(t,this.declaration);if(a&&o&&n.length)for(let{selector:e}of n)r[e]=c(s({},r[e]),{[a]:[...r[e]?.[a]??[],o]});let u;if(this.block&&(u=cc(t),u)){lc(u,this.block);for(let{selector:e}of n)i[e]=[...i[e]??[],u]}(l||u)&&(e=!0)}),e&&(t.css=J(n),t.changed=!0)}let l=new Set(Object.keys(Q)),u={},d=e=>{var t;let n=[],r=new Set(u[e]?.names??[]);for(;r.size>0;)for(let e of r)n.push(...Q[e]??[]),r.delete(e),(t=u[e]?.names)!=null&&t.length&&u[e].names.forEach(e=>r.add(e));return n};for(;l.size>0;){let t=[];for(let n of e){let e=!1,r=q(n.css);W(r,{visit:`Function`,enter(n){let r=this.rule?.prelude,i=this.declaration,a=i?.property;if(r?.children.isEmpty===!1&&tl(n)&&i&&a&&n.children.first&&l.has(n.children.first.name)&&a.startsWith(`--`)){let r=n.children.first,o=Q[r.name]??[],s=d(r.name);if(!(o.length||s.length))return;let c=`${r.name}-anchor-${K(12)}`,l=J(i.value);sl[c]=l,u[a]||(u[a]={names:[],uuids:[]});let f=u[a];f.names.includes(r.name)||f.names.push(r.name),f.uuids.push(c),t.push(a),r.name=c,e=!0}}}),e&&(n.css=J(r),n.changed=!0)}l.clear(),t.forEach(e=>l.add(e))}for(let t of e){let e=!1,n=q(t.css);W(n,{visit:`Function`,enter(t){var n,i,a;let o=this.rule?.prelude,l=this.declaration,f=l?.property;if(o?.children.isEmpty===!1&&tl(t)&&l&&f&&t.children.first&&(Qa(f)||no(f))){let l=t.children.first,p=Q[l.name]??[],m=d(l.name);if(!(p.length||m.length))return;let h=`${f}-${K(12)}`;if(m.length){let e=/* @__PURE__ */ new Set([l.name]);for(;e.size>0;)for(let t of e){let r=u[t];if((n=r?.names)!=null&&n.length&&(i=r?.uuids)!=null&&i.length)for(let e of r.names)for(let t of r.uuids)$[t]=c(s({},$[t]),{[h]:`${e}-${h}`});e.delete(t),(a=r?.names)!=null&&a.length&&r.names.forEach(t=>e.add(t))}}let g=ss(o);for(let e of[...p,...m]){let t=s({},e),n=`--anchor-${K(12)}-${f}`,i=t.uuid;t.uuid=n;for(let{selector:e}of g)r[e]=c(s({},r[e]),{[f]:[...r[e]?.[f]??[],t]});$[i]=c(s({},$[i]),{[h]:n})}l.name=`${l.name}-${h}`,e=!0}}}),e&&(t.css=J(n),t.changed=!0)}if(Object.keys($).length>0)for(let t of e){let e=!1,n=q(t.css);W(n,{visit:`Function`,enter(t){var n,r;if(tl(t)&&(n=t.children.first?.name)!=null&&n.startsWith(`--`)&&(r=this.declaration?.property)!=null&&r.startsWith(`--`)&&this.block){let n=t.children.first,r=$[n.name];if(r)for(let[t,i]of Object.entries(r))this.block.children.appendData({type:`Declaration`,important:!1,property:`${this.declaration.property}-${t}`,value:{type:`Raw`,value:J(this.declaration.value).replace(`var(${n.name})`,`var(${i})`)}}),e=!0;sl[n.name]&&(this.declaration.value={type:`Raw`,value:sl[n.name]},e=!0)}}}),e&&(t.css=J(n),t.changed=!0)}let f=/* @__PURE__ */ new Map;for(let[e,i]of Object.entries(r)){let r;r=e.startsWith(`[data-anchor-polyfill=`)&&(n=a[e])!=null&&n.length?Ss(t.roots,a[e].join(`,`)):Ss(t.roots,e);for(let[n,a]of Object.entries(i))for(let i of a)for(let a of r){let r=yield ul(a,i,{roots:t.roots}),l=`--anchor-${K(12)}`;f.set(a,c(s({},f.get(a)??{}),{[i.uuid]:l})),a.setAttribute(`style`,`${i.uuid}: var(${l}); ${a.getAttribute(`style`)??``}`),o[e]=c(s({},o[e]),{declarations:c(s({},o[e]?.declarations),{[n]:[...o[e]?.declarations?.[n]??[],c(s({},i),{anchorEl:r,targetEl:a,uuid:l})]})})}}let p={el:document.createElement(`link`),changed:!1,created:!0,css:``};e.push(p);for(let[e,n]of Object.entries(i)){let r=Ss(t.roots,e);for(let i of r){let r=yield ul(i,null,{roots:t.roots});for(let t of n){let n=yield dc(i,t,r);p.css+=fc(n.targetUUID,t.selectorUUID),p.changed=!0,o[e]=c(s({},o[e]),{declarations:c(s({},o[e]?.declarations),{"position-area":[...o[e]?.declarations?.[`position-area`]??[],n]})})}}}return{rules:o,inlineStyles:f,anchorScopes:Z}})}const fl=[`as`,`blocking`,`crossorigin`,`disabled`,`fetchpriority`,`href`,`hreflang`,`integrity`,`referrerpolicy`,`rel`,`type`];function pl(e,t,n=!1){let r=[];for(let{el:i,css:a,changed:o,created:s=!1}of e){let e={el:i,css:a,changed:!1};if(o){if(i.tagName.toLowerCase()===`style`)i.innerHTML=a;else if(i instanceof HTMLLinkElement){let t=document.createElement(`style`);t.textContent=a;for(let e of i.getAttributeNames())if(!e.startsWith(`on`)&&!fl.includes(e)){let n=i.getAttribute(e);n!==null&&t.setAttribute(e,n)}i.hasAttribute(`href`)&&t.setAttribute(`data-original-href`,i.getAttribute(`href`)),s?(t.setAttribute(`data-generated-by-polyfill`,`true`),document.head.insertAdjacentElement(`beforeend`,t)):(i.insertAdjacentElement(`beforebegin`,t),i.remove()),e.el=t}else if(i.hasAttribute(`data-has-inline-styles`)){let e=i.getAttribute(`data-has-inline-styles`);if(e){let n=`[data-has-inline-styles="${e}"]{`,r=a.slice(n.length,-1),o=t?.get(i);if(o)for(let[e,t]of Object.entries(o))r=`${e}: var(${t}); ${r}`;i.setAttribute(`style`,r)}}}n&&i.hasAttribute(`data-has-inline-styles`)&&i.removeAttribute(`data-has-inline-styles`),r.push(e)}return r}const ml=c(s({},j),{_c:/* @__PURE__ */ new Map}),hl=(e,t)=>{let n;switch(e){case`start`:case`self-start`:n=0;break;case`end`:case`self-end`:n=100;break;default:typeof e==`number`&&!Number.isNaN(e)&&(n=e)}if(n!==void 0)return t?100-n:n},gl=(e,t)=>{let n;switch(e){case`block`:case`self-block`:n=t?`width`:`height`;break;case`inline`:case`self-inline`:n=t?`height`:`width`}return n},_l=e=>{switch(e){case`top`:case`bottom`:case`inset-block-start`:case`inset-block-end`:return`y`;case`left`:case`right`:case`inset-inline-start`:case`inset-inline-end`:return`x`}return null},vl=e=>{switch(e){case`x`:return`width`;case`y`:return`height`}return null},yl=e=>Y(e,`display`)===`inline`,bl=(e,t)=>(t===`x`?[`border-left-width`,`border-right-width`]:[`border-top-width`,`border-bottom-width`]).reduce((t,n)=>t+parseInt(Y(e,n),10),0)||0,xl=(e,t)=>parseInt(Y(e,`margin-${t}`),10)||0,Sl=e=>({top:xl(e,`top`),right:xl(e,`right`),bottom:xl(e,`bottom`),left:xl(e,`left`)}),Cl=e=>l(null,[e],function*({targetEl:e,targetProperty:t,anchorRect:n,anchorSide:r,anchorSize:i,fallback:a=null}){if(!((i||r!==void 0)&&e&&n))return a;if(i){if(!so(t))return a;let r;switch(i){case`width`:case`height`:r=i;break;default:{let t=!1,n=Y(e,`writing-mode`);t=n.startsWith(`vertical-`)||n.startsWith(`sideways-`),r=gl(i,t)}}return r?`${n[r]}px`:a}if(r!==void 0){let i,o,s=_l(t);if(!Qa(t)||!s||Qa(r)&&s!==_l(r))return a;let c=[`top`,`left`,`inset-block-start`,`inset-inline-start`],l=[`bottom`,`right`,`inset-block-end`,`inset-inline-end`];switch(r){case`left`:case`top`:i=0;break;case`right`:case`bottom`:i=100;break;case`center`:i=50;break;case`inside`:i=c.includes(t)?0:100;break;case`outside`:i=c.includes(t)?100:0;break;default:if(e){let t=(yield j.isRTL?.call(j,e))||!1;i=hl(r,t)}}let u=typeof i==`number`&&!Number.isNaN(i),d=vl(s);if(u&&d){l.includes(t)&&(o=yield xs(e));let r=n[s]+n[d]*(i/100);switch(t){case`bottom`:case`inset-block-end`:{if(!o)break;let e=o.clientHeight;if(e===0&&yl(o)){let t=bl(o,s);e=o.offsetHeight-t}r=e-r;break}case`right`:case`inset-inline-end`:{if(!o)break;let e=o.clientWidth;if(e===0&&yl(o)){let t=bl(o,s);e=o.offsetWidth-t}r=e-r;break}}return`${r}px`}}return a}),wl=e=>`wrapperEl`in e,Tl=e=>`uuid`in e;function El(e,t=!1){return l(this,null,function*(){let n=document.documentElement;for(let[r,i]of Object.entries(e))for(let e of i){let i=e.anchorEl,a=e.targetEl;if(i&&a){if(wl(e)){let r=e.wrapperEl,o=(e,t,n)=>l(null,null,function*(){return e===0?`0px`:yield Cl({targetEl:r,targetProperty:t,anchorRect:n,anchorSide:e})});Ge(i,r,()=>l(null,null,function*(){let t=Y(a,Ms);r.setAttribute(Ns,t);let s=yield j.getElementRects({reference:i,floating:r,strategy:`absolute`}),c=e.insets,l=yield o(c.block[0],`top`,s.reference),u=yield o(c.block[1],`bottom`,s.reference),d=yield o(c.inline[0],`left`,s.reference),f=yield o(c.inline[1],`right`,s.reference);n.style.setProperty(`${e.targetUUID}-top`,l||null),n.style.setProperty(`${e.targetUUID}-left`,d||null),n.style.setProperty(`${e.targetUUID}-right`,f||null),n.style.setProperty(`${e.targetUUID}-bottom`,u||null),n.style.setProperty(`${e.targetUUID}-justify-self`,e.alignments.inline),n.style.setProperty(`${e.targetUUID}-align-self`,e.alignments.block)}),{animationFrame:t})}else Ge(i,a,()=>l(null,null,function*(){let t=yield j.getElementRects({reference:i,floating:a,strategy:`absolute`}),o=yield Cl({targetEl:a,targetProperty:r,anchorRect:t.reference,anchorSide:e.anchorSide,anchorSize:e.anchorSize,fallback:e.fallbackValue});n.style.setProperty(e.uuid,o)}),{animationFrame:t})}else if(Tl(e)){let t=yield Cl({targetProperty:r,anchorSide:e.anchorSide,anchorSize:e.anchorSize,fallback:e.fallbackValue});n.style.setProperty(e.uuid,t)}}})}function Dl(e,t){return l(this,null,function*(){let n=yield j.getElementRects({reference:e,floating:e,strategy:`absolute`});return yield Ke({x:e.offsetLeft,y:e.offsetTop,platform:ml,rects:n,elements:{floating:e,reference:t},strategy:`absolute`},{padding:Sl(e)})})}function Ol(e,t,n=!1){return l(this,null,function*(){if(!t.length)return;let r=document.querySelectorAll(e);for(let e of r){let r=!1,i=yield xs(e);Ge({},e,()=>l(null,null,function*(){if(r)return;r=!0,e.removeAttribute(`data-anchor-polyfill`);let n=yield Dl(e,i);if(Object.values(n).every(e=>e<=0)){e.removeAttribute(`data-anchor-polyfill-last-successful`),r=!1;return}for(let[n,{uuid:a}]of t.entries()){e.setAttribute(`data-anchor-polyfill`,a);let o=yield Dl(e,i);if(Object.values(o).every(e=>e<=0)){e.setAttribute(`data-anchor-polyfill-last-successful`,a),r=!1;break}if(n===t.length-1){let t=e.getAttribute(`data-anchor-polyfill-last-successful`);t?e.setAttribute(`data-anchor-polyfill`,t):e.removeAttribute(`data-anchor-polyfill`),r=!1;break}}}),{animationFrame:n,layoutShift:!1})}})}function kl(e,t=!1){return l(this,null,function*(){for(let n of Object.values(e))yield El(n.declarations??{},t);for(let[n,r]of Object.entries(e))yield Ol(n,r.fallbacks??[],t)})}function Al(e={}){let t=typeof e==`boolean`?{useAnimationFrame:e}:e,n=t.useAnimationFrame===void 0?!!window.UPDATE_ANCHOR_ON_ANIMATION_FRAME:t.useAnimationFrame;return Array.isArray(t.elements)||(t.elements=void 0),(!Array.isArray(t.roots)||t.roots.length===0)&&(t.roots=[document]),Object.assign(t,{useAnimationFrame:n})}function jl(e){return l(this,null,function*(){let t=Al(e??window.ANCHOR_POSITIONING_POLYFILL_OPTIONS),n=yield As(t),r={},i;ls();try{ps(n)&&(n=pl(n));let e=yield dl(n,{roots:t.roots});r=e.rules,i=e.inlineStyles}catch(e){throw cs(),e}return Object.values(r).length&&(pl(n,i,!0),yield kl(r,t.useAnimationFrame)),r})}export{jl as default};