@moubing/bing-ui 0.5.1 → 0.5.2

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,6 +1,6 @@
1
1
  (function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require("vue"),require("gsap")):typeof define==`function`&&define.amd?define([`exports`,`vue`,`gsap`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.BingUI={},e.Vue,e.gsap))})(this,function(e,t,n){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var r=Object.create,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,s=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty,l=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),u=(e,t)=>{let n={};for(var r in e)i(n,r,{get:e[r],enumerable:!0});return t||i(n,Symbol.toStringTag,{value:`Module`}),n},d=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var s=o(t),l=0,u=s.length,d;l<u;l++)d=s[l],!c.call(e,d)&&d!==n&&i(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(r=a(t,d))||r.enumerable});return e},f=(e,t,n)=>(n=e==null?{}:r(s(e)),d(t||!e||!e.__esModule?i(n,`default`,{value:e,enumerable:!0}):n,e)),p,m,h=typeof Symbol==`function`?Symbol():`_split`,g,_=()=>g||I.register(window.gsap),v=typeof Intl<`u`&&`Segmenter`in Intl?new Intl.Segmenter:0,y=e=>e?typeof e==`string`?y(document.querySelectorAll(e)):`length`in e?Array.from(e).reduce((e,t)=>(typeof t==`string`?e.push(...y(t)):e.push(t),e),[]):[e]:[],b=e=>y(e).filter(e=>e&&e.nodeType===1),x=[],S=function(){},C={add:e=>e()},w=/\s+/g,T=RegExp(`\\p{RI}\\p{RI}|\\p{Emoji}(\\p{EMod}|\\u{FE0F}\\u{20E3}?|[\\u{E0020}-\\u{E007E}]+\\u{E007F})?(\\u{200D}\\p{Emoji}(\\p{EMod}|\\u{FE0F}\\u{20E3}?|[\\u{E0020}-\\u{E007E}]+\\u{E007F})?)*|.`,`gu`),E={left:0,top:0,width:0,height:0},D=(e,t)=>{for(;++t<e.length&&e[t]===E;);return e[t]||E},O=({element:e,html:t,ariaL:n,ariaH:r})=>{e.innerHTML=t,n?e.setAttribute(`aria-label`,n):e.removeAttribute(`aria-label`),r?e.setAttribute(`aria-hidden`,r):e.removeAttribute(`aria-hidden`)},k=(e,t)=>{if(t){let n=new Set(e.join(``).match(t)||x),r=e.length,i,a,o,s;if(n.size)for(;--r>-1;){a=e[r];for(o of n)if(o.startsWith(a)&&o.length>a.length){for(i=0,s=a;o.startsWith(s+=e[r+ ++i])&&s.length<o.length;);if(i&&s.length===o.length){e[r]=o,e.splice(r+1,i);break}}}}return e},A=e=>window.getComputedStyle(e).display===`inline`&&(e.style.display=`inline-block`),j=(e,t,n)=>t.insertBefore(typeof e==`string`?document.createTextNode(e):e,n),M=(e,t,n)=>{let r=t[e+`sClass`]||``,{tag:i=`div`,aria:a=`auto`,propIndex:o=!1}=t,s=e===`line`?`block`:`inline-block`,c=r.indexOf(`++`)>-1,l=t=>{let l=document.createElement(i),u=n.length+1;return r&&(l.className=r+(c?` `+r+u:``)),o&&l.style.setProperty(`--`+e,u+``),a!==`none`&&l.setAttribute(`aria-hidden`,`true`),i!==`span`&&(l.style.position=`relative`,l.style.display=s),l.textContent=t,n.push(l),l};return c&&(r=r.replace(`++`,``)),l.collection=n,l},N=(e,t,n,r)=>{let i=M(`line`,n,r),a=window.getComputedStyle(e).textAlign||`left`;return(n,r)=>{let o=i(``);for(o.style.textAlign=a,e.insertBefore(o,t[n]);n<r;n++)o.appendChild(t[n]);o.normalize()}},P=(e,t,n,r,i,a,o,s,c,l)=>{var u;let d=Array.from(e.childNodes),f=0,{wordDelimiter:p,reduceWhiteSpace:m=!0,prepareText:h}=t,g=e.getBoundingClientRect(),_=g,y=!m&&window.getComputedStyle(e).whiteSpace.substring(0,3)===`pre`,b=0,S=n.collection,C,T,E,D,O,M,N,F,I,L,R,z,B,V,H,U,ee,W;for(typeof p==`object`?(E=p.delimiter||p,T=p.replaceWith||``):T=p===``?``:p||` `,C=T!==` `;f<d.length;f++)if(D=d[f],D.nodeType===3){for(H=D.textContent||``,m?H=H.replace(w,` `):y&&(H=H.replace(/\n/g,T+`
2
2
  `)),h&&(H=h(H,e)),D.textContent=H,O=T||E?H.split(E||T):H.match(s)||x,ee=O[O.length-1],F=C?ee.slice(-1)===` `:!ee,ee||O.pop(),_=g,N=C?O[0].charAt(0)===` `:!O[0],N&&j(` `,e,D),O[0]||O.shift(),k(O,c),a&&l||(D.textContent=``),I=1;I<=O.length;I++)if(U=O[I-1],!m&&y&&U.charAt(0)===`
3
- `&&((u=D.previousSibling)==null||u.remove(),j(document.createElement(`br`),e,D),U=U.slice(1)),!m&&U===``)j(T,e,D);else if(U===` `)e.insertBefore(document.createTextNode(` `),D);else{if(C&&U.charAt(0)===` `&&j(` `,e,D),b&&I===1&&!N&&S.indexOf(b.parentNode)>-1?(M=S[S.length-1],M.appendChild(document.createTextNode(r?``:U))):(M=n(r?``:U),j(M,e,D),b&&I===1&&!N&&M.insertBefore(b,M.firstChild)),r)for(R=v?k([...v.segment(U)].map(e=>e.segment),c):U.match(s)||x,W=0;W<R.length;W++)M.appendChild(R[W]===` `?document.createTextNode(` `):r(R[W]));if(a&&l){if(H=D.textContent=H.substring(U.length+1,H.length),L=M.getBoundingClientRect(),L.top>_.top&&L.left<=_.left){for(z=e.cloneNode(),B=e.childNodes[0];B&&B!==M;)V=B,B=B.nextSibling,z.appendChild(V);e.parentNode.insertBefore(z,e),i&&A(z)}_=L}(I<O.length||F)&&j(I>=O.length?` `:C&&U.slice(-1)===` `?` `+T:T,e,D)}e.removeChild(D),b=0}else D.nodeType===1&&(o&&o.indexOf(D)>-1?(S.indexOf(D.previousSibling)>-1&&S[S.length-1].appendChild(D),b=D):(P(D,t,n,r,i,a,o,s,c,!0),b=0),i&&A(D))},F=class e{constructor(e,t){this.isSplit=!1,_(),this.elements=b(e),this.chars=[],this.words=[],this.lines=[],this.masks=[],this.vars=t,this.elements.forEach(e=>{var n;t.overwrite!==!1&&((n=e[h])==null||n._data.orig.filter(({element:t})=>t===e).forEach(O)),e[h]=this}),this._split=()=>this.isSplit&&this.split(this.vars);let n=[],r,i=()=>{let e=n.length,t;for(;e--;){t=n[e];let r=t.element.offsetWidth;if(r!==t.width){t.width=r,this._split();return}}};this._data={orig:n,obs:typeof ResizeObserver<`u`&&new ResizeObserver(()=>{clearTimeout(r),r=setTimeout(i,200)})},S(this),this.split(t)}split(e){return(this._ctx||C).add(()=>{this.isSplit&&this.revert(),this.vars=e=e||this.vars||{};let{type:t=`chars,words,lines`,aria:n=`auto`,deepSlice:r=!0,smartWrap:i,onSplit:a,autoSplit:o=!1,specialChars:s,mask:c}=this.vars,l=t.indexOf(`lines`)>-1,u=t.indexOf(`chars`)>-1,d=t.indexOf(`words`)>-1,f=u&&!d&&!l,p=s&&(`push`in s?RegExp(`(?:`+s.join(`|`)+`)`,`gu`):s),h=p?RegExp(p.source+`|`+T.source,`gu`):T,g=!!e.ignore&&b(e.ignore),{orig:_,animTime:v,obs:x}=this._data,S;(u||d||l)&&(this.elements.forEach((t,a)=>{_[a]={element:t,html:t.innerHTML,ariaL:t.getAttribute(`aria-label`),ariaH:t.getAttribute(`aria-hidden`)},n===`auto`?t.setAttribute(`aria-label`,(t.textContent||``).trim()):n===`hidden`&&t.setAttribute(`aria-hidden`,`true`);let o=[],s=[],c=[],m=u?M(`char`,e,o):null,v=M(`word`,e,s),b,x,S,C;if(P(t,e,v,m,f,r&&(l||f),g,h,p,!1),l){let n=y(t.childNodes),r=N(t,n,e,c),i,a=[],o=0,s=n.map(e=>e.nodeType===1?e.getBoundingClientRect():E),l=E,u;for(b=0;b<n.length;b++)i=n[b],i.nodeType===1&&(i.nodeName===`BR`?((!b||n[b-1].nodeName!==`BR`)&&(a.push(i),r(o,b+1)),o=b+1,l=D(s,b)):(u=s[b],b&&u.top>l.top&&u.left<l.left+l.width-1&&(r(o,b),o=b),l=u));o<b&&r(o,b),a.forEach(e=>e.parentNode?.removeChild(e))}if(!d){for(b=0;b<s.length;b++)if(x=s[b],u||!x.nextSibling||x.nextSibling.nodeType!==3)if(i&&!l){for(S=document.createElement(`span`),S.style.whiteSpace=`nowrap`;x.firstChild;)S.appendChild(x.firstChild);x.replaceWith(S)}else x.replaceWith(...x.childNodes);else C=x.nextSibling,C&&C.nodeType===3&&(C.textContent=(x.textContent||``)+(C.textContent||``),x.remove());s.length=0,t.normalize()}this.lines.push(...c),this.words.push(...s),this.chars.push(...o)}),c&&this[c]&&this.masks.push(...this[c].map(e=>{let t=e.cloneNode();return e.replaceWith(t),t.appendChild(e),e.className&&(t.className=e.className.trim().split(` `).map(e=>e+`-mask`).join(` `)),t.style.overflow=`clip`,t}))),this.isSplit=!0,m&&l&&o&&m.addEventListener(`loadingdone`,this._split),(S=a&&a(this))&&S.totalTime&&(this._data.anim=v?S.totalTime(v):S),l&&o&&this.elements.forEach((e,t)=>{_[t].width=e.offsetWidth,x&&x.observe(e)})}),this}kill(){let{obs:e}=this._data;e&&e.disconnect(),m?.removeEventListener(`loadingdone`,this._split)}revert(){var e,t;if(this.isSplit){let{orig:n,anim:r}=this._data;this.kill(),n.forEach(O),this.chars.length=this.words.length=this.lines.length=n.length=this.masks.length=0,this.isSplit=!1,r&&(this._data.animTime=r.totalTime(),r.revert()),(t=(e=this.vars).onRevert)==null||t.call(e,this)}return this}static create(t,n){return new e(t,n)}static register(e){p=p||e||window.gsap,p&&(y=p.utils.toArray,S=p.core.context||S),!g&&window.innerWidth>0&&(m=document.fonts,g=!0)}};F.version=`3.15.0`;var I=F,L=(0,t.defineComponent)({__name:`BingAnimatedText`,props:{effect:{default:`none`},trigger:{default:`always`},disabled:{type:Boolean,default:!1},shineColor:{default:void 0},shineBaseColor:{default:void 0},shineSpeed:{default:3},shineDelay:{default:0},shineInterval:{default:1.6},shineDirection:{default:`left`},shineAngle:{default:120},jumpY:{default:-6},jumpStagger:{default:.035},jumpDuration:{default:.34},jumpEase:{default:`power2.out`},jumpReturnEase:{default:`back.out(2.4)`},jumpRepeatDelay:{default:1.2}},setup(e){let r=!1,i=e,a=(0,t.ref)(null),o=(0,t.ref)(null),s,c,l,u,d,f=!1,p=!1,m=(0,t.computed)(()=>i.effect!==`none`&&!i.disabled),h=(0,t.computed)(()=>m.value&&i.effect===`shine`),g=(0,t.computed)(()=>m.value&&i.effect===`jump`),_=(0,t.computed)(()=>[`bing-animated-text`,`bing-animated-text--${i.effect}`,{"is-disabled":i.disabled,"is-shine-active":h.value,[`bing-animated-text--shine-${i.trigger}`]:h.value,[`bing-animated-text--shine-direction-${i.shineDirection}`]:h.value,[`bing-animated-text--jump-${i.trigger}`]:g.value}]),v=(0,t.computed)(()=>{let e={};return g.value&&(e[`--animated-text-jump-room`]=`${Math.max(2,Math.abs(Math.min(0,i.jumpY))+2)}px`),h.value?(e[`--animated-text-shine-angle`]=`${i.shineAngle}deg`,i.shineColor&&(e[`--animated-text-shine-color`]=i.shineColor),i.shineBaseColor&&(e[`--animated-text-shine-base-color`]=i.shineBaseColor),e):e});function y(){return typeof window<`u`&&typeof document<`u`}function b(){return y()&&typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function x(){r||=(n.gsap.registerPlugin(I),!0)}function S(){f=!1,a.value?.removeAttribute(`data-jump-playing`),l?.kill(),l=void 0,s?.revert(),s=void 0,c?.revert(),c=void 0}function C(){return i.shineDirection===`left`?{start:`150% 0`,end:`-150% 0`}:{start:`-150% 0`,end:`150% 0`}}function w(){p=!1,a.value?.removeAttribute(`data-shine-playing`),u?.kill(),u=void 0,d?.kill(),d=void 0,o.value&&n.gsap.set(o.value,{clearProps:`backgroundPosition`})}function T(){i.trigger!==`always`||!h.value||b()||(d?.kill(),d=n.gsap.delayedCall(Math.max(0,i.shineInterval),()=>{d=void 0,E(0)}))}function E(e=i.shineDelay){let t=o.value;if(p||d||!t||!h.value||b())return;let r=C();p=!0,a.value?.setAttribute(`data-shine-playing`,`true`),n.gsap.set(t,{backgroundPosition:r.start}),u=n.gsap.to(t,{backgroundPosition:r.end,duration:Math.max(.1,i.shineSpeed),delay:Math.max(0,e),ease:`none`,overwrite:!0,onComplete:()=>{n.gsap.set(t,{backgroundPosition:r.start}),p=!1,u=void 0,a.value?.removeAttribute(`data-shine-playing`),T()}})}function D(){w(),!(!h.value||!o.value||b())&&(n.gsap.set(o.value,{backgroundPosition:C().start}),(i.trigger===`always`||i.trigger===`once`)&&E())}function O(){if(f||!s?.chars.length||!g.value||b())return;let e=Math.max(.1,i.jumpDuration),t=i.trigger===`always`;f=!0,a.value?.setAttribute(`data-jump-playing`,`true`),l=n.gsap.timeline({repeat:t?-1:0,repeatDelay:Math.max(0,i.jumpRepeatDelay),onComplete:()=>{f=!1,l=void 0,a.value?.removeAttribute(`data-jump-playing`)}}),l.fromTo(s.chars,{y:0},{keyframes:[{y:i.jumpY,duration:e*.45,ease:i.jumpEase},{y:0,duration:e*.55,ease:i.jumpReturnEase}],stagger:Math.max(0,i.jumpStagger),overwrite:!0})}function k(){S();let e=o.value,t=a.value;!g.value||!e||!t||b()||(x(),c=n.gsap.context(()=>{s=I.create(e,{type:`words, chars`,tag:`span`,aria:`auto`,wordsClass:`bing-animated-text__word`,charsClass:`bing-animated-text__char`}),n.gsap.set(s.chars,{display:`inline-block`,transformOrigin:`50% 100%`,willChange:`transform`}),(i.trigger===`always`||i.trigger===`once`)&&O()},t))}function A(){!y()||f||(0,t.nextTick)(()=>{k()})}function j(){y()&&(0,t.nextTick)(()=>{D()})}function M(){i.trigger===`hover`&&(h.value&&E(),g.value&&O())}return(0,t.watch)(()=>[i.effect,i.trigger,i.disabled,i.shineSpeed,i.shineDelay,i.shineInterval,i.shineDirection,i.shineAngle,i.shineColor,i.shineBaseColor],j,{flush:`post`}),(0,t.watch)(()=>[i.effect,i.trigger,i.disabled,i.jumpY,i.jumpStagger,i.jumpDuration,i.jumpEase,i.jumpReturnEase,i.jumpRepeatDelay],A,{flush:`post`}),(0,t.onMounted)(()=>{j(),A()}),(0,t.onUpdated)(A),(0,t.onUnmounted)(()=>{w(),S()}),(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{ref_key:`rootRef`,ref:a,class:(0,t.normalizeClass)(_.value),style:(0,t.normalizeStyle)(v.value),onMouseenter:M},[(0,t.createElementVNode)(`span`,{ref_key:`contentRef`,ref:o,class:`bing-animated-text__content`},[(0,t.renderSlot)(e.$slots,`default`,{},void 0,!0)],512)],38))}}),R=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},z=R(L,[[`__scopeId`,`data-v-dd82d488`]]),B=/^(auto|scroll|overlay)$/,V=[`button`,`input`,`select`,`textarea`,`video`,`audio`,`[contenteditable="true"]`,`[role="textbox"]`].join(`,`),H=Object.freeze({duration:400,stepSize:100,pulseScale:4,accelerationDelta:50,accelerationMax:3,keyboardStep:50,keyboard:!0,smoothTouchpad:!1,respectReducedMotion:!0}),U=Object.freeze({duration:280,stepSize:72,pulseScale:4,accelerationDelta:50,accelerationMax:2,keyboard:!1,smoothTouchpad:!1,respectReducedMotion:!0});function ee(e,t={},n={}){return e===!1?!1:{...t,...typeof e==`object`?e:{},...n}}function W(e,t,n){return Number.isFinite(e)?Math.max(n,e):t}function te(e){return{duration:W(e?.duration,H.duration,0),stepSize:W(e?.stepSize,H.stepSize,0),pulseScale:W(e?.pulseScale,H.pulseScale,.1),accelerationDelta:W(e?.accelerationDelta,H.accelerationDelta,0),accelerationMax:W(e?.accelerationMax,H.accelerationMax,1),keyboardStep:W(e?.keyboardStep,H.keyboardStep,0),keyboard:e?.keyboard??H.keyboard,smoothTouchpad:e?.smoothTouchpad??H.smoothTouchpad,respectReducedMotion:e?.respectReducedMotion??H.respectReducedMotion}}function ne(e,t){let n=e*t;if(n<1)return n-(1-Math.exp(-n));let r=Math.exp(-1);return r+(1-Math.exp(-(n-1)))*(1-r)}function re(e,t=H.pulseScale){if(e<=0)return 0;if(e>=1)return 1;let n=Math.max(.1,t);return ne(e,n)/ne(1,n)}function G(){return typeof window<`u`&&typeof document<`u`}function K(){return typeof performance<`u`&&typeof performance.now==`function`?performance.now():Date.now()}function q(e,t,n){return Math.min(n,Math.max(t,e))}function ie(e){return e===0?0:e>0?1:-1}function ae(e,t,n){if(n===0)return!1;if(t===`x`){let t=Math.max(0,e.scrollWidth-e.clientWidth);return t>0&&(n<0?e.scrollLeft>0:e.scrollLeft<t-.5)}let r=Math.max(0,e.scrollHeight-e.clientHeight);return r>0&&(n<0?e.scrollTop>0:e.scrollTop<r-.5)}function oe(e){let t=e.composedPath?.()[0]??e.target;return t instanceof Element?t:null}function se(e){if(e.parentElement)return e.parentElement;let t=e.getRootNode?.();return t&&`host`in t&&t.host instanceof Element?t.host:null}function ce(e,t,n,r){let i=oe(e);for(;i&&i!==t;){if(i instanceof HTMLElement){let e=n!==0&&ae(i,`x`,n),t=r!==0&&ae(i,`y`,r);if(!e&&!t){i=se(i);continue}let a=window.getComputedStyle(i),o=a.overflowX||i.style.overflowX||i.style.overflow,s=a.overflowY||i.style.overflowY||i.style.overflow,c=e&&B.test(o),l=t&&B.test(s);if(c||l)return!0}i=se(i)}return!1}function le(){return!!window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches}function ue(e,t,n){let r=e,i=e.deltaX||-Number(r.wheelDeltaX||0),a=e.deltaY||-Number(r.wheelDeltaY||0);return!i&&!a&&(a=-Number(r.wheelDelta||0)),e.deltaMode===WheelEvent.DOM_DELTA_LINE?(i*=40,a*=40):e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(i*=Math.max(1,t.clientWidth),a*=Math.max(1,t.clientHeight)),e.shiftKey&&n.horizontal&&Math.abs(a)>Math.abs(i)&&(i=a,a=0),n.horizontal||(i=0),n.vertical||(a=0),{x:i,y:a}}function de(e,t){return Math.abs(e)>1.2?t/120*e:e}function fe(e){let t=oe(e);return t instanceof HTMLElement&&!!t.closest(V)}function pe(e){let t=[],n,r=0,i=0,a=0,o=[],s=0,c=0;function l(){return te(e.getOptions?.())}function u(){return e.getAxes?.()??{horizontal:!0,vertical:!0}}function d(){return e.isEnabled?.()??!0}function f(){!G()||n===void 0||(window.cancelAnimationFrame(n),n=void 0)}function p(){f(),t=[],r=0,i=0,a=0,s=0,c=0}function m(e,t,n){if(t!==0||s!==0){let n=Math.max(0,e.scrollWidth-e.clientWidth),r=q(e.scrollLeft+t+s,0,n);e.scrollLeft=r,s=r-e.scrollLeft}if(n!==0||c!==0){let t=Math.max(0,e.scrollHeight-e.clientHeight),r=q(e.scrollTop+n+c,0,t);e.scrollTop=r,c=r-e.scrollTop}}function h(){n=void 0;let r=e.getElement();if(!r||!d()){p();return}let o=K(),l=0,u=0;if(t.forEach(e=>{let t=o-e.start,n=e.duration===0||t>=e.duration?1:re(t/e.duration,e.pulseScale),r=e.x*n,i=e.y*n;l+=r-e.lastX,u+=i-e.lastY,e.lastX=r,e.lastY=i}),t=t.filter(e=>o-e.start<e.duration),m(r,l,u),t.length>0){n=window.requestAnimationFrame(h);return}i=0,a=0,s=0,c=0}function g(){if(!(!G()||n!==void 0)){if(typeof window.requestAnimationFrame!=`function`){h();return}n=window.requestAnimationFrame(h)}}function _(n,o){let s=e.getElement();if(!s||!n&&!o)return!1;let c=l(),u=ie(n),d=ie(o);(u!==0&&i!==0&&u!==i||d!==0&&a!==0&&d!==a)&&p();let f=K(),h=r?f-r:1/0,_=1;c.accelerationDelta>0&&h<c.accelerationDelta&&(_=Math.min((1+c.accelerationDelta/Math.max(1,h))/2,c.accelerationMax));let v=n*_,y=o*_;return i=ie(v)||i,a=ie(y)||a,r=f,c.duration===0||!G()||typeof window.requestAnimationFrame!=`function`?(m(s,v,y),!0):(t.push({x:v,y,lastX:0,lastY:0,start:f,duration:c.duration,pulseScale:c.pulseScale}),g(),!0)}function v(e){return o.length===3&&o.every(t=>t%e===0)}function y(e){let t=Math.abs(e);if(!t)return!1;o.length===0&&(o=[t,t,t]),o.push(t),o.shift();let n=t>120&&v(t);return!v(120)&&!v(100)&&!n}function b(t){let n=e.getElement();if(!n)return null;let r=l(),i=ue(t,n,u()),a=Math.abs(i.y)>=Math.abs(i.x)?i.y:i.x;if(!r.smoothTouchpad&&y(a))return null;let o=de(i.x,r.stepSize),s=de(i.y,r.stepSize);return o&&!ae(n,`x`,o)&&(o=0),s&&!ae(n,`y`,s)&&(s=0),!o&&!s||ce(t,n,o,s)?null:{x:o,y:s}}function x(e){if(!G()||!d()||e.defaultPrevented||e.ctrlKey||l().respectReducedMotion&&le())return!1;let t=b(e);return t?(e.preventDefault(),_(t.x,t.y)):(e.defaultPrevented||p(),!1)}function S(t){let n=e.getElement(),r=l();if(!G()||!n||!d()||!r.keyboard||t.defaultPrevented||t.ctrlKey||t.altKey||t.metaKey||t.shiftKey&&t.key!==` `||fe(t)||r.respectReducedMotion&&le())return!1;let i=u(),a=0,o=0;switch(t.key){case`ArrowUp`:o=i.vertical?-r.keyboardStep:0;break;case`ArrowDown`:o=i.vertical?r.keyboardStep:0;break;case`ArrowLeft`:a=i.horizontal?-r.keyboardStep:0;break;case`ArrowRight`:a=i.horizontal?r.keyboardStep:0;break;case`PageUp`:o=i.vertical?-n.clientHeight*.9:0;break;case`PageDown`:case` `:o=i.vertical?n.clientHeight*(t.shiftKey?-.9:.9):0;break;case`Home`:o=i.vertical?-n.scrollTop:0,a=!i.vertical&&i.horizontal?-n.scrollLeft:0;break;case`End`:o=i.vertical?Math.max(0,n.scrollHeight-n.clientHeight-n.scrollTop):0,a=!i.vertical&&i.horizontal?Math.max(0,n.scrollWidth-n.clientWidth-n.scrollLeft):0;break;default:return!1}return a&&!ae(n,`x`,a)&&(a=0),o&&!ae(n,`y`,o)&&(o=0),!a&&!o?!1:(t.preventDefault(),_(a,o))}return{cancel:p,handleKeydown:S,handleWheel:x,isAnimating:()=>n!==void 0||t.length>0}}var me={duration:{fast:.18,normal:.32,slow:.62},ease:{smooth:`power3.out`,press:`back.out(2.2)`,glide:`expo.out`}};function he(){return typeof window<`u`}function J(){return he()&&typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}var ge=[`aria-label`],_e=[`aria-selected`,`aria-disabled`,`aria-label`,`disabled`,`tabindex`,`onClick`,`onKeydown`,`onFocus`,`onBlur`],ve={class:`bing-tabs__tab-surface`},ye={class:`bing-tabs__tab-content`},be=R((0,t.defineComponent)({__name:`BingTabs`,props:{modelValue:{default:void 0},items:{default:()=>[]},size:{default:`md`},variant:{default:`pill`},activation:{default:`auto`},disabled:{type:Boolean,default:!1},block:{type:Boolean,default:!1},loop:{type:Boolean,default:!0},animated:{type:Boolean,default:!0},respectReducedMotion:{type:Boolean,default:!0},smoothScroll:{type:[Boolean,Object],default:!0},ariaLabel:{default:`Tabs`}},emits:[`update:modelValue`,`change`,`focus`,`blur`],setup(e,{emit:r}){let i=e,a=r,o=(0,t.ref)(null),s=(0,t.ref)(null),c=(0,t.ref)([]),l=(0,t.ref)(void 0),u=(0,t.ref)(-1),d=(0,t.ref)(!1),f,p,m=0,h,g=(0,t.computed)(()=>i.modelValue!==void 0),_=(0,t.computed)(()=>i.items.filter(e=>!e.disabled)),v=(0,t.computed)(()=>_.value[0]),y=(0,t.computed)(()=>g.value?i.modelValue:l.value??v.value?.value),b=(0,t.computed)(()=>i.items.findIndex(e=>Object.is(e.value,y.value))),x=(0,t.computed)(()=>[`bing-tabs`,`bing-tabs--${i.variant}`,`bing-tabs--${i.size}`,{"is-block":i.block,"is-disabled":i.disabled,"is-indicator-ready":d.value}]),S=(0,t.computed)(()=>({"--bing-tabs-count":i.items.length})),C=(0,t.computed)(()=>ee(i.smoothScroll,U,{keyboard:!1,smoothTouchpad:!1,respectReducedMotion:!0}));function w(){return typeof window<`u`}function T(){return!i.animated||i.respectReducedMotion&&w()&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function E(e,t){let n=t===`left`?`borderLeftWidth`:`borderTopWidth`,r=Number.parseFloat(window.getComputedStyle(e)[n]);return Number.isFinite(r)?r:t===`left`?e.clientLeft:e.clientTop}function D(e){return i.disabled||!!e.disabled}function O(e,t){e instanceof HTMLButtonElement&&(c.value[t]=e)}function k(e){return e.querySelector(`.bing-tabs__tab-surface`)??e}function A(e){return D(i.items[e])?-1:u.value>=0?u.value===e?0:-1:b.value===e?0:-1}function j(e,t){let n=i.items.length;if(n===0)return-1;let r=e;for(let e=0;e<n;e+=1){if(r+=t,i.loop)r=(r+n)%n;else if(r<0||r>=n)return-1;let e=i.items[r];if(e&&!D(e))return r}return-1}function M(e){let t=(e===`first`?i.items:[...i.items].reverse()).findIndex(e=>!D(e));return t<0?-1:e===`first`?t:i.items.length-1-t}function N(e){return i.items.find(t=>Object.is(t.value,e))}function P(){return w()&&!!o.value?.contains(document.activeElement)}function F(e=!1){if(i.activation!==`auto`||b.value<0)return;let t=i.items[b.value];!t||D(t)||(u.value=b.value,e&&P()&&R(b.value))}function I(e,t){if(D(e)){t.preventDefault();return}let n=y.value;if(Object.is(n,e.value))return;g.value||(l.value=e.value);let r={value:e.value,previousValue:n,item:e,previousItem:N(n),event:t};a(`update:modelValue`,e.value),a(`change`,r)}function L(e,t,n){u.value=t,I(e,n)}function R(e){let t=c.value[e];t&&(h?.cancel(),u.value=e,t.focus())}function z(e,n){let r=i.items[e];!r||D(r)||(n.preventDefault(),R(e),i.activation===`auto`&&(I(r,n),(0,t.nextTick)().then(()=>{Object.is(y.value,r.value)||F(!0)})))}function B(e,t){if(t.key===`ArrowRight`||t.key===`ArrowDown`){z(j(e,1),t);return}if(t.key===`ArrowLeft`||t.key===`ArrowUp`){z(j(e,-1),t);return}if(t.key===`Home`){z(M(`first`),t);return}if(t.key===`End`){z(M(`last`),t);return}if(t.key===`Enter`||t.key===` `){let n=i.items[e];if(!n)return;t.preventDefault(),I(n,t)}}function V(e,t,n){h?.cancel(),u.value=t,a(`focus`,{value:e.value,item:e,event:n})}function H(e,t){o.value?.contains(t.relatedTarget)||(u.value=-1),a(`blur`,{value:e.value,item:e,event:t})}function W(e){if((h?.handleWheel(e)??!1)||e.defaultPrevented||!o.value)return;let t=e.deltaX||(e.shiftKey?e.deltaY:0),n=Math.max(0,o.value.scrollWidth-o.value.clientWidth);n>.5&&(t<0?o.value.scrollLeft>.5:t>0&&o.value.scrollLeft<n-.5)&&e.stopPropagation()}function te(e=!0){w()&&(m&&window.cancelAnimationFrame(m),m=window.requestAnimationFrame(()=>{m=0,ne(e)}))}function ne(e=!0){let t=o.value,r=s.value,i=c.value[b.value];if(!t||!r||!i||b.value<0){r&&n.gsap.set(r,{autoAlpha:0}),d.value=!1;return}let a=t.getBoundingClientRect(),l=k(i).getBoundingClientRect(),u=r.getBoundingClientRect(),p=E(t,`left`),m=E(t,`top`),h=Math.max(1,l.width),g=Math.max(1,l.height),_=l.left-a.left-p,v=l.top-a.top-m,y=d.value&&u.width>0&&u.height>0,x=y?u.left-a.left-p:_,S=y?u.top-a.top-m:v,C=y?u.width/h:1,w=y?u.height/g:1,D=e&&y&&!T();f?.kill(),n.gsap.set(r,{width:h,height:g,transformOrigin:`0 0`,willChange:`transform, opacity`}),D?f=n.gsap.fromTo(r,{x,y:S,scaleX:C,scaleY:w,autoAlpha:1},{x:_,y:v,scaleX:1,scaleY:1,autoAlpha:1,duration:.42,ease:`power3.out`,overwrite:`auto`,force3D:!0,onComplete:()=>{f=void 0}}):n.gsap.set(r,{x:_,y:v,scaleX:1,scaleY:1,autoAlpha:1,force3D:!0}),d.value=!0}return(0,t.onBeforeUpdate)(()=>{c.value=[]}),(0,t.onMounted)(()=>{h=pe({getElement:()=>o.value,getOptions:()=>{let e=C.value;return e===!1?void 0:e},getAxes:()=>({horizontal:!0,vertical:!1}),isEnabled:()=>C.value!==!1}),(0,t.nextTick)().then(()=>{ne(!1)}),typeof ResizeObserver<`u`&&o.value&&(p=new ResizeObserver(()=>{te(!1)}),p.observe(o.value))}),(0,t.onBeforeUnmount)(()=>{f?.kill(),h?.cancel(),h=void 0,m&&w()&&window.cancelAnimationFrame(m),p?.disconnect()}),(0,t.watch)(()=>i.smoothScroll,()=>{h?.cancel()},{deep:!0}),(0,t.watch)(()=>[y.value,i.items.length,i.size,i.variant,i.block],()=>{(0,t.nextTick)().then(()=>{ne(!0)})}),(0,t.watch)(b,()=>{u.value<0||!P()||(0,t.nextTick)().then(()=>{F(!0)})}),(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{ref_key:`rootRef`,ref:o,class:(0,t.normalizeClass)(x.value),style:(0,t.normalizeStyle)(S.value),role:`tablist`,"aria-orientation":`horizontal`,"aria-label":e.ariaLabel,onWheel:W},[(0,t.createElementVNode)(`span`,{ref_key:`indicatorRef`,ref:s,class:`bing-tabs__indicator`,"aria-hidden":`true`},null,512),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.items,(e,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`button`,{key:String(e.value),ref_for:!0,ref:e=>O(e,r),class:(0,t.normalizeClass)([`bing-tabs__tab`,{"is-active":Object.is(e.value,y.value),"is-disabled":D(e)}]),type:`button`,role:`tab`,"aria-selected":Object.is(e.value,y.value),"aria-disabled":D(e)||void 0,"aria-label":e.ariaLabel,disabled:D(e),tabindex:A(r),onClick:t=>L(e,r,t),onKeydown:e=>B(r,e),onFocus:t=>V(e,r,t),onBlur:t=>H(e,t)},[(0,t.createElementVNode)(`span`,ve,[(0,t.createElementVNode)(`span`,ye,[(0,t.renderSlot)(n.$slots,`item`,{item:e,active:Object.is(e.value,y.value),disabled:D(e)},()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.label),1)],!0)])])],42,_e))),128))],46,ge))}}),[[`__scopeId`,`data-v-afacbbec`]]),xe=[`aria-hidden`],Se=R((0,t.defineComponent)({__name:`BingAppSwitcherTransition`,props:{modelValue:{default:void 0},items:{default:()=>[]},disabled:{type:Boolean,default:!1},respectReducedMotion:{type:Boolean,default:!0},loop:{type:Boolean,default:!0},showTabs:{type:Boolean,default:!0},ariaLabel:{default:`App switcher transition panels`}},emits:[`update:modelValue`,`change`],setup(e,{emit:r}){let i=e,a=r,o=(0,t.ref)([]),s=(0,t.ref)(null),c=(0,t.ref)(!1),l=(0,t.ref)(void 0),u,d=0,f,p,m=(0,t.computed)(()=>i.items.filter(e=>!e.disabled)),h=(0,t.computed)(()=>m.value[0]),g=(0,t.computed)(()=>i.modelValue!==void 0),_=(0,t.computed)(()=>g.value?i.modelValue:l.value??h.value?.value),v=(0,t.computed)(()=>{let e=i.items.findIndex(e=>Object.is(e.value,_.value));return e>=0?e:0}),y=(0,t.computed)(()=>i.items.map(e=>({...e,value:e.value,label:e.label,disabled:i.disabled||e.disabled})));function b(){return typeof window<`u`}function x(){return i.disabled||i.respectReducedMotion&&J()}function S(e){let t=i.items.length;return t===0?0:i.loop?(e+t)%t:Math.min(Math.max(e,0),t-1)}function C(e,t){let n=e-t,r=i.items.length;return r===0?0:(n>r/2&&(n-=r),n<r/-2&&(n+=r),n)}function w(e,t,n=t){let r=C(e,t),i=Math.abs(r),a=e===n;return{xPercent:r*58,y:30+i*3,scale:a?.68:.6,rotation:r*-1.4,opacity:a?.98:Math.max(.46,.66-i*.1),zIndex:a?18:10-i,force3D:!0}}function T(e,t){let n=C(e,t),r=Math.abs(n);return{xPercent:n*116,y:r===0?0:22,scale:r===0?1:.78,rotation:n*-1.4,opacity:+(r===0),zIndex:r===0?24:5-r,force3D:!0}}function E(e,t){e instanceof HTMLElement&&(o.value[t]=e)}function D(e){let t=i.items[e];if(!t||i.disabled||t.disabled||Object.is(t.value,_.value))return!1;let n=_.value,r=i.items.find(e=>Object.is(e.value,n));return p=t.value,g.value||(l.value=t.value),a(`update:modelValue`,t.value),a(`change`,{value:t.value,previousValue:n,item:t,previousItem:r}),!0}function O(e=v.value,t=!1){let r=t||x()?0:.32;u?.kill(),u=n.gsap.timeline({defaults:{duration:r,ease:`power3.out`,overwrite:`auto`},onStart:()=>{c.value=!0},onComplete:()=>{c.value=!1,u=void 0},onInterrupt:()=>{c.value=!1}}),o.value.forEach((t,n)=>{u?.to(t,T(n,e),0)})}function k(e,t){let r=C(e,t)>=0?1:-1;if(x()){O(e,!0);return}u?.kill(),c.value=!0,u=n.gsap.timeline({defaults:{overwrite:`auto`},onComplete:()=>{c.value=!1,u=void 0},onInterrupt:()=>{c.value=!1}}),s.value&&u.to(s.value,{x:r*-10,scale:.996,duration:.16,ease:`power2.out`,force3D:!0},0).to(s.value,{x:0,scale:1,duration:.5,ease:`expo.out`,force3D:!0},.18),o.value.forEach((e,n)=>{u?.to(e,{...w(n,t,t),duration:.2,ease:`power3.out`},0)}),o.value.forEach((t,n)=>{u?.to(t,{...w(n,e,e),duration:.34,ease:`power3.inOut`},.1)}),o.value.forEach((t,n)=>{let r=T(n,e),i=n===e;u?.to(t,{...r,duration:i?.48:.32,ease:i?`expo.out`:`power3.out`},i?.3:.34)})}function A(e){let t=S(e),n=v.value;t===v.value||c.value||!D(t)||k(t,n)}function j(e){A(i.items.findIndex(t=>Object.is(t.value,e)))}function M(e){e.defaultPrevented||i.disabled||Math.abs(e.deltaX)<=Math.abs(e.deltaY)||(e.preventDefault(),!(c.value||!b())&&(d+=e.deltaX,f&&window.clearTimeout(f),f=window.setTimeout(()=>{let e=d>0?1:-1,t=Math.abs(d)>34;d=0,f=void 0,t&&A(v.value+e)},58)))}return(0,t.onBeforeUpdate)(()=>{o.value=[]}),(0,t.onMounted)(()=>{(0,t.nextTick)().then(()=>{o.value.forEach(e=>{n.gsap.set(e,{transformOrigin:`50% 50%`,willChange:`transform, opacity`,force3D:!0})}),O(v.value,!0)})}),(0,t.onBeforeUnmount)(()=>{u?.kill(),n.gsap.killTweensOf(o.value),s.value&&n.gsap.killTweensOf(s.value),f&&b()&&window.clearTimeout(f)}),(0,t.watch)(_,(e,n)=>{if(e===void 0)return;if(Object.is(e,p)){p=void 0;return}let r=i.items.findIndex(t=>Object.is(t.value,e));if(r<0)return;let a=i.items.findIndex(e=>Object.is(e.value,n));(0,t.nextTick)().then(()=>{if(a<0){O(r,!0);return}k(r,a)})}),(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`section`,{class:(0,t.normalizeClass)([`bing-app-switcher-transition`,{"is-disabled":e.disabled}]),onWheel:M},[(0,t.createElementVNode)(`div`,{ref_key:`stageRef`,ref:s,class:`bing-app-switcher-transition__stage`},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.items,(e,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`article`,{key:String(e.value),ref_for:!0,ref:e=>E(e,r),class:(0,t.normalizeClass)([`bing-app-switcher-transition__card`,{"is-active":Object.is(_.value,e.value)}]),"aria-hidden":!Object.is(_.value,e.value)},[(0,t.renderSlot)(n.$slots,`default`,{item:e,index:r,active:Object.is(_.value,e.value),isAnimating:c.value},()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.label),1)],!0)],10,xe))),128))],512),e.showTabs?((0,t.openBlock)(),(0,t.createBlock)(be,{key:0,items:y.value,"model-value":_.value,variant:`glass`,size:`md`,block:``,disabled:e.disabled,loop:e.loop,"respect-reduced-motion":e.respectReducedMotion,"aria-label":e.ariaLabel,"onUpdate:modelValue":j},null,8,[`items`,`model-value`,`disabled`,`loop`,`respect-reduced-motion`,`aria-label`])):(0,t.createCommentVNode)(``,!0)],34))}}),[[`__scopeId`,`data-v-1a57e0a4`]]),Ce=[`type`,`disabled`,`aria-busy`,`aria-label`],we={class:`bing-button__content`},Te={class:`bing-button__resting-content`},Ee={key:0,class:`bing-button__icon bing-button__icon--prefix`},Y={key:1,class:`bing-button__label`},De={key:2,class:`bing-button__icon bing-button__icon--suffix`},Oe=R((0,t.defineComponent)({__name:`BingButton`,props:{variant:{default:`primary`},size:{default:`md`},rounded:{default:`md`},htmlType:{default:`button`},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},block:{type:Boolean,default:!1},throttle:{type:Boolean,default:!0},throttleDelay:{default:600},textEffect:{},textEffectTrigger:{},textShine:{},shineColor:{default:void 0},shineBaseColor:{default:void 0},shineSpeed:{default:3},shineDelay:{default:0},shineInterval:{default:1.6},shineDirection:{default:`left`},shineAngle:{default:120},textJumpY:{default:-6},textJumpStagger:{default:.035},textJumpDuration:{default:.34},textJumpEase:{default:`power2.out`},textJumpReturnEase:{default:`back.out(2.4)`},textJumpRepeatDelay:{default:1.2},ariaLabel:{default:void 0}},emits:[`click`,`throttled`,`focus`,`blur`],setup(e,{emit:n}){let r=e,i=n,a=(0,t.useSlots)(),o=(0,t.ref)(0),s=(0,t.computed)(()=>r.disabled||r.loading),c=(0,t.computed)(()=>Math.max(0,r.throttleDelay)),l=(0,t.computed)(()=>!!a.default),u=(0,t.computed)(()=>!!a.prefix),d=(0,t.computed)(()=>!!a.suffix),f=(0,t.computed)(()=>r.textShine??(r.variant===`primary`?`always`:`none`)),p=(0,t.computed)(()=>r.textEffect?r.textEffect:f.value===`none`?`none`:`shine`),m=(0,t.computed)(()=>r.textEffectTrigger?r.textEffectTrigger:p.value===`jump`||f.value===`hover`?`hover`:`always`),h=(0,t.computed)(()=>p.value===`shine`),g=(0,t.computed)(()=>p.value!==`none`),_=(0,t.computed)(()=>[`bing-button`,`bing-button--${r.variant}`,`bing-button--${r.size}`,`bing-button--rounded-${r.rounded}`,{"is-block":r.block,"is-disabled":r.disabled,"is-loading":r.loading,"is-icon-only":!l.value&&(u.value||d.value),[`bing-button--text-${p.value}`]:g.value,[`bing-button--text-trigger-${m.value}`]:g.value,[`bing-button--shine-${m.value}`]:h.value,[`bing-button--shine-direction-${r.shineDirection}`]:h.value}]),v=(0,t.computed)(()=>{let e={};return h.value?(e[`--animated-text-shine-angle`]=`${r.shineAngle}deg`,r.shineColor&&(e[`--animated-text-shine-color`]=r.shineColor),r.shineBaseColor&&(e[`--animated-text-shine-base-color`]=r.shineBaseColor),e):e});function y(e){if(s.value){e.preventDefault();return}let t=Date.now(),n=c.value,a=t-o.value;if(r.throttle&&n>0&&o.value>0&&a<n){e.preventDefault(),i(`throttled`,{event:e,remaining:n-a});return}o.value=t,i(`click`,e)}function b(e){i(`focus`,e)}function x(e){i(`blur`,e)}return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`button`,{type:e.htmlType,class:(0,t.normalizeClass)(_.value),style:(0,t.normalizeStyle)(v.value),disabled:s.value,"aria-busy":e.loading||void 0,"aria-label":e.ariaLabel,onClick:y,onFocus:b,onBlur:x},[(0,t.createElementVNode)(`span`,we,[r[0]||=(0,t.createElementVNode)(`span`,{class:`bing-button__loading-indicator`,"aria-hidden":`true`},[(0,t.createElementVNode)(`span`,{class:`bing-button__spinner`})],-1),(0,t.createElementVNode)(`span`,Te,[u.value?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,Ee,[(0,t.renderSlot)(n.$slots,`prefix`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0),l.value?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,Y,[(0,t.createVNode)(z,{class:`bing-button__animated-text`,effect:p.value,trigger:m.value,disabled:s.value,"shine-speed":e.shineSpeed,"shine-delay":e.shineDelay,"shine-interval":e.shineInterval,"shine-direction":e.shineDirection,"shine-angle":e.shineAngle,"jump-y":e.textJumpY,"jump-stagger":e.textJumpStagger,"jump-duration":e.textJumpDuration,"jump-ease":e.textJumpEase,"jump-return-ease":e.textJumpReturnEase,"jump-repeat-delay":e.textJumpRepeatDelay},{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(n.$slots,`default`,{},void 0,!0)]),_:3},8,[`effect`,`trigger`,`disabled`,`shine-speed`,`shine-delay`,`shine-interval`,`shine-direction`,`shine-angle`,`jump-y`,`jump-stagger`,`jump-duration`,`jump-ease`,`jump-return-ease`,`jump-repeat-delay`])])):(0,t.createCommentVNode)(``,!0),d.value?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,De,[(0,t.renderSlot)(n.$slots,`suffix`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0)])])],46,Ce))}}),[[`__scopeId`,`data-v-713ef556`]]),X={glass:!0,glassBlur:16,glassOpacity:.85,glassSaturation:1.28};function ke(e,t,n){return Math.min(n,Math.max(t,e))}function Ae(e){if(typeof e==`number`)return`${Math.max(0,e)}px`;let t=e.trim();return/^-?\d+(\.\d+)?$/.test(t)?`${Math.max(0,Number(t))}px`:e}function je(e,t){let n=t.glass!==!1,r=n?Ae(t.glassBlur??X.glassBlur):`0px`,i=n?ke(t.glassOpacity??X.glassOpacity,0,1):.96,a=n?Math.max(0,t.glassSaturation??X.glassSaturation):1;return{[`--${e}-glass-blur`]:r,[`--${e}-glass-opacity`]:String(i),[`--${e}-glass-saturation`]:String(a)}}var Me={class:`bing-card__face bing-card__front`},Ne={key:1,class:`bing-card__media`},Pe={class:`bing-card__content`},Fe={key:0,class:`bing-card__header`},Ie={class:`bing-card__heading`},Le={key:0,class:`bing-card__title`},Re={key:1,class:`bing-card__description`},ze={key:1,class:`bing-card__body`},Be={key:2,class:`bing-card__footer`},Ve={class:`bing-card__face bing-card__back`,"aria-hidden":`true`},He=10,Ue=R((0,t.defineComponent)({__name:`BingCard`,props:{title:{default:void 0},description:{default:void 0},variant:{default:`soft`},padding:{default:`md`},rounded:{default:`md`},glass:{type:Boolean,default:!0},interactive:{type:Boolean,default:!0},tilt:{type:Boolean,default:!0},tiltMax:{default:8},tiltScale:{default:1.015},glare:{type:Boolean,default:!0},entrance:{default:`fade-up`},entranceOnce:{type:Boolean,default:!0},entranceDelay:{default:0},entranceDuration:{default:.72},flipAxis:{default:`x`},flipTurns:{default:2.5},flipEase:{default:`power4.out`},flipTrigger:{default:`press`},longPressDelay:{default:560},longPressRelease:{default:`restore`},disabled:{type:Boolean,default:!1},glassBlur:{default:X.glassBlur},glassOpacity:{default:X.glassOpacity},glassSaturation:{default:X.glassSaturation}},emits:[`enter`,`long-press`,`flip`],setup(e,{emit:r}){let i=e,a=r,o=(0,t.ref)(null),s=(0,t.ref)(null),c=(0,t.ref)(null),l=(0,t.ref)(null),u=(0,t.ref)(null),d=(0,t.ref)(!1),f=(0,t.ref)(!1),p=(0,t.ref)(!1),m,h,g,_,v,y=!1,b=!1,x=0,S=0,C=!1,w=(0,t.computed)(()=>i.flipAxis===`z`?`y`:i.flipAxis),T=(0,t.computed)(()=>i.disabled?`none`:i.flipTrigger),E=(0,t.computed)(()=>[`bing-card`,`bing-card--${i.variant}`,`bing-card--padding-${i.padding}`,`bing-card--rounded-${i.rounded}`,`bing-card--back-axis-${w.value}`,{"is-glass":i.glass,"is-interactive":i.interactive,"is-tilt":i.tilt,"is-glare":i.glare,"is-flipped":f.value,"is-pressing":p.value,"is-long-press-enabled":T.value===`press`,"is-click-flip-enabled":T.value===`click`,"is-disabled":i.disabled,"has-entered":d.value}]),D=(0,t.computed)(()=>({...je(`bing-card`,{glass:i.glass,glassBlur:i.glassBlur,glassOpacity:i.glassOpacity,glassSaturation:i.glassSaturation}),"--bing-card-tilt-max":`${i.tiltMax}deg`})),O=(0,t.computed)(()=>!!(i.title||i.description));function k(){return typeof window<`u`&&typeof document<`u`}function A(){return k()&&typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function j(e,t,n){return Math.min(n,Math.max(t,e))}function M(e){return e===`x`?`rotationX`:e===`y`?`rotationY`:`rotation`}function N(){return{rotationX:0,rotationY:0,rotation:0,[M(w.value)]:f.value?180:0}}function P(e,t){return f.value?w.value===`x`?{rotationX:180+e,rotationY:t,rotation:0}:{rotationX:e,rotationY:180+t,rotation:0}:{rotationX:e,rotationY:t,rotation:0}}function F(){return i.interactive&&i.tilt&&!i.disabled&&!A()&&!b&&!y&&s.value}function I(e){if(W(e),!F())return;let t=o.value,r=s.value;if(!t||!r)return;let a=t.getBoundingClientRect();if(a.width===0||a.height===0)return;let l=j((e.clientX-a.left)/a.width,0,1),u=j((e.clientY-a.top)/a.height,0,1),d=Math.max(0,i.tiltMax),f=(l-.5)*d*2,p=(.5-u)*d*2;n.gsap.to(r,{...P(p,f),scale:Math.max(1,i.tiltScale),transformPerspective:900,transformOrigin:`50% 50%`,duration:.34,ease:`power3.out`,overwrite:!0,force3D:!0}),i.glare&&c.value&&n.gsap.to(c.value,{"--bing-card-glare-x":`${l*100}%`,"--bing-card-glare-y":`${u*100}%`,opacity:1,duration:.24,ease:`power2.out`,overwrite:!0})}function L(){if(b)return;let e=s.value;e&&n.gsap.to(e,{...N(),scale:1,duration:.48,ease:`elastic.out(1, 0.72)`,overwrite:!0,force3D:!0}),c.value&&n.gsap.to(c.value,{opacity:0,duration:.26,ease:`power2.out`,overwrite:!0})}function R(){let e=M(i.flipAxis),t=-360*Math.max(1,i.flipTurns);return{from:{autoAlpha:0,y:34,z:i.flipAxis===`z`?0:-120,[e]:t,scale:.96,transformPerspective:900,transformOrigin:`50% 50%`},to:{autoAlpha:1,y:0,z:0,rotationX:0,rotationY:0,rotation:0,scale:1,ease:i.flipEase}}}function z(){switch(i.entrance){case`bubble`:return{from:{autoAlpha:0,y:18,scale:.78},to:{autoAlpha:1,y:0,scale:1,ease:`elastic.out(1, 0.64)`}};case`rotate-up`:return R();case`soft-pop`:return{from:{autoAlpha:0,y:10,scale:.92,filter:`blur(10px)`},to:{autoAlpha:1,y:0,scale:1,filter:`blur(0px)`,ease:`power3.out`}};default:return{from:{autoAlpha:0,y:26,scale:.98},to:{autoAlpha:1,y:0,scale:1,ease:`power3.out`}}}}function B(){g?.kill(),g=void 0,p.value=!1,l.value&&(n.gsap.killTweensOf(l.value),n.gsap.set(l.value,{"--bing-card-press-progress":0,"--bing-card-press-ring-scale":.78,autoAlpha:0})),u.value&&(n.gsap.killTweensOf(u.value),n.gsap.set(u.value,{autoAlpha:0,scale:.98}))}function V(){p.value=!1,l.value&&(n.gsap.killTweensOf(l.value),n.gsap.timeline().to(l.value,{"--bing-card-press-ring-scale":.96,autoAlpha:.82,duration:.1,ease:`power2.out`}).to(l.value,{"--bing-card-press-ring-scale":1.08,autoAlpha:0,duration:.38,ease:`power3.out`},.06)),u.value&&(n.gsap.killTweensOf(u.value),n.gsap.timeline().to(u.value,{autoAlpha:.18,scale:1,duration:.1,ease:`power2.out`}).to(u.value,{autoAlpha:0,scale:1.015,duration:.38,ease:`power3.out`},.06))}function H(e=!f.value){let t=s.value;if(!t||i.disabled||b||f.value===e)return;f.value=e;let r=n.gsap.to(t,{...N(),scale:1,transformPerspective:900,transformOrigin:`50% 50%`,duration:.68,ease:`power3.inOut`,overwrite:!0,force3D:!0,onComplete:()=>{_===r&&(y=!1)},onInterrupt:()=>{_===r&&(y=!1)}});_=r,y=!0,a(`flip`,e?`back`:`front`)}function U(e){if(!k()||T.value!==`press`||b||e.button!==0)return;B(),C=!1,x=e.clientX,S=e.clientY,p.value=!0;let t=o.value?.getBoundingClientRect(),r=t&&t.width>0?`${j((e.clientX-t.left)/t.width*100,0,100)}%`:`50%`,s=t&&t.height>0?`${j((e.clientY-t.top)/t.height*100,0,100)}%`:`50%`;try{e.currentTarget?.setPointerCapture?.(e.pointerId)}catch{}l.value&&(n.gsap.set(l.value,{"--bing-card-press-progress":0,"--bing-card-press-x":r,"--bing-card-press-y":s,"--bing-card-press-ring-scale":.78,autoAlpha:1}),g=n.gsap.to(l.value,{"--bing-card-press-progress":1,"--bing-card-press-ring-scale":.98,duration:Math.max(120,i.longPressDelay)/1e3,ease:`none`,overwrite:!0,onComplete:()=>{if(g=void 0,C=!0,a(`long-press`),V(),i.longPressRelease===`restore`){H(!0);return}H()}})),u.value&&n.gsap.fromTo(u.value,{autoAlpha:0,scale:.98},{autoAlpha:1,scale:1,duration:Math.min(.24,Math.max(120,i.longPressDelay)/2e3),ease:`power2.out`,overwrite:!0})}function ee(){T.value!==`click`||b||H()}function W(e){if(!g)return;let t=e.clientX-x,n=e.clientY-S;Math.hypot(t,n)>He&&B()}function te(){B(),C&&i.longPressRelease===`restore`&&H(!1),C=!1}function ne(){C||B(),!y&&L()}function re(){let e=o.value,t=s.value;if(!e||!t||i.disabled||d.value&&i.entranceOnce)return;if(d.value=!0,e.classList.add(`has-entered`),a(`enter`),v?.kill(),v=void 0,b=!1,m?.revert(),m=void 0,i.entrance===`none`||A()){n.gsap.set(t,{autoAlpha:1,clearProps:`transform,filter`});return}let r=z();m=n.gsap.context(()=>{let e=n.gsap.fromTo(t,r.from,{...r.to,duration:Math.max(.1,i.entranceDuration),delay:Math.max(0,i.entranceDelay),clearProps:`filter`,onComplete:()=>{v===e&&(v=void 0,b=!1)},onInterrupt:()=>{v===e&&(v=void 0,b=!1)}});v=e,b=!0},e)}function G(){if(h?.disconnect(),h=void 0,!k()){re();return}if(i.entrance===`none`||A()){re();return}if(!(`IntersectionObserver`in window)){re();return}let e=o.value;e&&(h=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&(re(),i.entranceOnce&&(h?.disconnect(),h=void 0))},{threshold:.18,rootMargin:`0px 0px -8% 0px`}),h.observe(e))}return(0,t.watch)(()=>[i.entrance,i.entranceOnce,i.entranceDelay,i.entranceDuration,i.flipAxis,i.flipTurns,i.flipEase,i.flipTrigger,i.disabled],()=>{B(),d.value=!1,(0,t.nextTick)(G)},{flush:`post`}),(0,t.onMounted)(()=>{(0,t.nextTick)(G)}),(0,t.onBeforeUnmount)(()=>{B(),v?.kill(),v=void 0,b=!1,_?.kill(),_=void 0,y=!1,h?.disconnect(),h=void 0,m?.revert(),m=void 0,n.gsap.killTweensOf([s.value,c.value,l.value,u.value].filter(Boolean))}),(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`article`,{ref_key:`rootRef`,ref:o,class:(0,t.normalizeClass)(E.value),style:(0,t.normalizeStyle)(D.value),onPointerdown:U,onPointermove:I,onPointerup:te,onPointerleave:ne,onPointercancel:te,onLostpointercapture:te,onClick:ee},[(0,t.createElementVNode)(`div`,{ref_key:`surfaceRef`,ref:s,class:`bing-card__surface`},[(0,t.createElementVNode)(`div`,Me,[e.glare?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,ref_key:`glareRef`,ref:c,class:`bing-card__glare`,"aria-hidden":`true`},null,512)):(0,t.createCommentVNode)(``,!0),n.$slots.media?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,Ne,[(0,t.renderSlot)(n.$slots,`media`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`div`,Pe,[n.$slots.header||O.value?((0,t.openBlock)(),(0,t.createElementBlock)(`header`,Fe,[(0,t.renderSlot)(n.$slots,`header`,{},()=>[(0,t.createElementVNode)(`div`,Ie,[e.title?((0,t.openBlock)(),(0,t.createElementBlock)(`h3`,Le,(0,t.toDisplayString)(e.title),1)):(0,t.createCommentVNode)(``,!0),e.description?((0,t.openBlock)(),(0,t.createElementBlock)(`p`,Re,(0,t.toDisplayString)(e.description),1)):(0,t.createCommentVNode)(``,!0)])],!0)])):(0,t.createCommentVNode)(``,!0),n.$slots.default?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,ze,[(0,t.renderSlot)(n.$slots,`default`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0),n.$slots.footer?((0,t.openBlock)(),(0,t.createElementBlock)(`footer`,Be,[(0,t.renderSlot)(n.$slots,`footer`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0)])]),(0,t.createElementVNode)(`div`,Ve,[(0,t.renderSlot)(n.$slots,`back`,{},()=>[r[0]||=(0,t.createElementVNode)(`div`,{class:`bing-card__back-mark`},`Bing UI`,-1),r[1]||=(0,t.createElementVNode)(`div`,{class:`bing-card__back-text`},`Interactive surface`,-1)],!0)]),T.value===`press`?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,ref_key:`pressAmbienceRef`,ref:u,class:`bing-card__press-ambience`,"aria-hidden":`true`},null,512)):(0,t.createCommentVNode)(``,!0),T.value===`press`?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:1,ref_key:`pressFeedbackRef`,ref:l,class:`bing-card__press-feedback`,"aria-hidden":`true`},null,512)):(0,t.createCommentVNode)(``,!0)],512)],38))}}),[[`__scopeId`,`data-v-31bf117f`]]),We=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Ge=e=>e===``,Ke=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),qe=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),Je=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),Ye=e=>{let t=Je(e);return t.charAt(0).toUpperCase()+t.slice(1)},Xe={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`},Ze=({name:e,iconNode:n,absoluteStrokeWidth:r,"absolute-stroke-width":i,strokeWidth:a,"stroke-width":o,size:s=Xe.width,color:c=Xe.stroke,...l},{slots:u})=>(0,t.h)(`svg`,{...Xe,...l,width:s,height:s,stroke:c,"stroke-width":Ge(r)||Ge(i)||r===!0||i===!0?Number(a||o||Xe[`stroke-width`])*24/Number(s):a||o||Xe[`stroke-width`],class:Ke(`lucide`,l.class,...e?[`lucide-${qe(Ye(e))}-icon`,`lucide-${qe(e)}`]:[`lucide-icon`]),...!u.default&&!We(l)&&{"aria-hidden":`true`}},[...n.map(e=>(0,t.h)(...e)),...u.default?[u.default()]:[]]),Z=(e,n)=>(r,{slots:i,attrs:a})=>(0,t.h)(Ze,{...a,...r,iconNode:n,name:e},i),Qe=Z(`arrow-down-left`,[[`path`,{d:`M17 7 7 17`,key:`15tmo1`}],[`path`,{d:`M17 17H7V7`,key:`1org7z`}]]),$e=Z(`arrow-down-right`,[[`path`,{d:`m7 7 10 10`,key:`1fmybs`}],[`path`,{d:`M17 7v10H7`,key:`6fjiku`}]]),et=Z(`arrow-down`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),tt=Z(`arrow-left-right`,[[`path`,{d:`M8 3 4 7l4 4`,key:`9rb6wj`}],[`path`,{d:`M4 7h16`,key:`6tx8e3`}],[`path`,{d:`m16 21 4-4-4-4`,key:`siv7j2`}],[`path`,{d:`M20 17H4`,key:`h6l3hr`}]]),nt=Z(`arrow-up-down`,[[`path`,{d:`m21 16-4 4-4-4`,key:`f6ql7i`}],[`path`,{d:`M17 20V4`,key:`1ejh1v`}],[`path`,{d:`m3 8 4-4 4 4`,key:`11wl7u`}],[`path`,{d:`M7 4v16`,key:`1glfcx`}]]),rt=Z(`arrow-up-left`,[[`path`,{d:`M7 17V7h10`,key:`11bw93`}],[`path`,{d:`M17 17 7 7`,key:`2786uv`}]]),it=Z(`arrow-up-right`,[[`path`,{d:`M7 7h10v10`,key:`1tivn9`}],[`path`,{d:`M7 17 17 7`,key:`1vkiza`}]]),at=Z(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),ot=Z(`calendar-days`,[[`path`,{d:`M8 2v4`,key:`1cmpym`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`4`,rx:`2`,key:`1hopcy`}],[`path`,{d:`M3 10h18`,key:`8toen8`}],[`path`,{d:`M8 14h.01`,key:`6423bh`}],[`path`,{d:`M12 14h.01`,key:`1etili`}],[`path`,{d:`M16 14h.01`,key:`1gbofw`}],[`path`,{d:`M8 18h.01`,key:`lrp35t`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}],[`path`,{d:`M16 18h.01`,key:`kzsmim`}]]),st=Z(`check-check`,[[`path`,{d:`M18 6 7 17l-5-5`,key:`116fxf`}],[`path`,{d:`m22 10-7.5 7.5L13 16`,key:`ke71qq`}]]),ct=Z(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),lt=Z(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),ut=Z(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),dt=Z(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),ft=Z(`chevrons-left`,[[`path`,{d:`m11 17-5-5 5-5`,key:`13zhaf`}],[`path`,{d:`m18 17-5-5 5-5`,key:`h8a8et`}]]),pt=Z(`chevrons-right`,[[`path`,{d:`m6 17 5-5-5-5`,key:`xnjwq`}],[`path`,{d:`m13 17 5-5-5-5`,key:`17xmmf`}]]),mt=Z(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),ht=Z(`circle-question-mark`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),gt=Z(`circle-x`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),_t=Z(`clock-3`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6h4`,key:`135r8i`}]]),vt=Z(`columns-3`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}]]),yt=Z(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),bt=Z(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]),xt=Z(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),St=Z(`eye-off`,[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),Ct=Z(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),wt=Z(`file-braces`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1`,key:`1oajmo`}],[`path`,{d:`M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1`,key:`mpwhp6`}]]),Tt=Z(`file-image`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`circle`,{cx:`10`,cy:`12`,r:`2`,key:`737tya`}],[`path`,{d:`m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22`,key:`wt3hpn`}]]),Et=Z(`file-question-mark`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}],[`path`,{d:`M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3`,key:`mhlwft`}]]),Dt=Z(`file-spreadsheet`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M8 13h2`,key:`yr2amv`}],[`path`,{d:`M14 13h2`,key:`un5t4a`}],[`path`,{d:`M8 17h2`,key:`2yhykz`}],[`path`,{d:`M14 17h2`,key:`10kma7`}]]),Ot=Z(`file-text`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]),kt=Z(`file-type`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M11 18h2`,key:`12mj7e`}],[`path`,{d:`M12 12v6`,key:`3ahymv`}],[`path`,{d:`M9 13v-.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 .5.5v.5`,key:`qbrxap`}]]),At=Z(`file`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}]]),jt=Z(`grip-vertical`,[[`circle`,{cx:`9`,cy:`12`,r:`1`,key:`1vctgf`}],[`circle`,{cx:`9`,cy:`5`,r:`1`,key:`hp0tcf`}],[`circle`,{cx:`9`,cy:`19`,r:`1`,key:`fkjjf6`}],[`circle`,{cx:`15`,cy:`12`,r:`1`,key:`1tmaij`}],[`circle`,{cx:`15`,cy:`5`,r:`1`,key:`19l28e`}],[`circle`,{cx:`15`,cy:`19`,r:`1`,key:`f4zoj3`}]]),Mt=Z(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),Nt=Z(`list-collapse`,[[`path`,{d:`M10 5h11`,key:`1hkqpe`}],[`path`,{d:`M10 12h11`,key:`6m4ad9`}],[`path`,{d:`M10 19h11`,key:`14g2nv`}],[`path`,{d:`m3 10 3-3-3-3`,key:`i7pm08`}],[`path`,{d:`m3 20 3-3-3-3`,key:`20gx1n`}]]),Pt=Z(`list-tree`,[[`path`,{d:`M8 5h13`,key:`1pao27`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`M3 10a2 2 0 0 0 2 2h3`,key:`1npucw`}],[`path`,{d:`M3 5v12a2 2 0 0 0 2 2h3`,key:`x1gjn2`}]]),Ft=Z(`list-x`,[[`path`,{d:`M16 5H3`,key:`m91uny`}],[`path`,{d:`M11 12H3`,key:`51ecnj`}],[`path`,{d:`M16 19H3`,key:`zzsher`}],[`path`,{d:`m15.5 9.5 5 5`,key:`ytk86i`}],[`path`,{d:`m20.5 9.5-5 5`,key:`17o44f`}]]),It=Z(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),Lt=Z(`pin`,[[`path`,{d:`M12 17v5`,key:`bb1du9`}],[`path`,{d:`M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z`,key:`1nkz8b`}]]),Rt=Z(`presentation`,[[`path`,{d:`M2 3h20`,key:`91anmk`}],[`path`,{d:`M21 3v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V3`,key:`2k9sn8`}],[`path`,{d:`m7 21 5-5 5 5`,key:`bip4we`}]]),zt=Z(`refresh-ccw`,[[`path`,{d:`M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`14sxne`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16`,key:`1hlbsb`}],[`path`,{d:`M16 16h5v5`,key:`ccwih5`}]]),Bt=Z(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),Vt=Z(`rotate-cw`,[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,key:`1p45f6`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}]]),Ht=Z(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),Ut=Z(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),Wt=Z(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),Gt=Z(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),Kt=Z(`zoom-in`,[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`line`,{x1:`21`,x2:`16.65`,y1:`21`,y2:`16.65`,key:`13gj7c`}],[`line`,{x1:`11`,x2:`11`,y1:`8`,y2:`14`,key:`1vmskp`}],[`line`,{x1:`8`,x2:`14`,y1:`11`,y2:`11`,key:`durymu`}]]),qt=Z(`zoom-out`,[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`line`,{x1:`21`,x2:`16.65`,y1:`21`,y2:`16.65`,key:`13gj7c`}],[`line`,{x1:`8`,x2:`14`,y1:`11`,y2:`11`,key:`durymu`}]]),Q=R((0,t.defineComponent)({__name:`BingIcon`,props:{icon:{},size:{default:`md`},tone:{default:`inherit`},strokeWidth:{default:2},decorative:{type:Boolean,default:!0},label:{default:void 0}},setup(e){let n=e,r={xs:`14px`,sm:`16px`,md:`20px`,lg:`24px`,xl:`32px`};function i(e){return typeof e==`string`&&e in r}let a=(0,t.computed)(()=>typeof n.size==`number`?`${n.size}px`:i(n.size)?r[n.size]:n.size),o=(0,t.computed)(()=>[`bing-icon`,`bing-icon--${n.tone}`]),s=(0,t.computed)(()=>n.decorative||!n.label);return(n,r)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.icon),{class:(0,t.normalizeClass)(o.value),style:(0,t.normalizeStyle)({width:a.value,height:a.value,strokeWidth:e.strokeWidth}),"aria-hidden":s.value||void 0,"aria-label":s.value?void 0:e.label,role:s.value?void 0:`img`},null,8,[`class`,`style`,`aria-hidden`,`aria-label`,`role`]))}}),[[`__scopeId`,`data-v-5351773b`]]),Jt=Symbol(`BingCheckboxGroupContext`),Yt=Symbol(`BingFormContext`),Xt=Symbol(`BingFormItemContext`);function Zt(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,[...t]]))}var Qt=[`id`,`checked`,`indeterminate`,`disabled`,`name`,`value`,`aria-label`,`aria-describedby`,`aria-invalid`],$t={class:`bing-checkbox__control`,"aria-hidden":`true`},en={key:1,class:`bing-checkbox__label`},tn=R((0,t.defineComponent)({__name:`BingCheckbox`,props:{id:{default:void 0},modelValue:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},size:{default:void 0},shape:{default:`rounded`},tone:{default:`primary`},label:{default:void 0},ariaLabel:{default:void 0},ariaDescribedby:{default:void 0},status:{default:void 0},name:{default:void 0},value:{default:void 0},decorative:{type:Boolean,default:!1}},emits:[`update:modelValue`,`change`,`focus`,`blur`],setup(e,{emit:r}){let i=e,a=r,o=(0,t.useSlots)(),s=(0,t.inject)(Jt,null),c=(0,t.inject)(Xt,null),l=(0,t.ref)(null),u=(0,t.ref)(null),d=(0,t.ref)(!1),f=null,p=(0,t.computed)(()=>!!(i.label||o.default)),m=(0,t.computed)(()=>i.size??s?.size.value??c?.size.value??`md`),h=(0,t.computed)(()=>i.disabled||s?.disabled.value||c?.disabled.value||!1),g=(0,t.computed)(()=>i.status??s?.status.value??c?.status.value??`default`),_=(0,t.computed)(()=>i.id??c?.controlId.value),v=(0,t.computed)(()=>[i.ariaDescribedby,c&&!s?c.ariaDescribedby.value:void 0].filter(Boolean).join(` `)||void 0),y=(0,t.computed)(()=>i.name??s?.name.value),b=(0,t.computed)(()=>s?s.modelValue.value.some(e=>e===i.value):i.modelValue),x=(0,t.computed)(()=>[`bing-checkbox`,typeof m.value==`string`?`bing-checkbox--${m.value}`:void 0,`bing-checkbox--${i.shape}`,`bing-checkbox--${i.tone}`,`bing-checkbox--status-${g.value}`,{"is-checked":b.value,"is-indeterminate":i.indeterminate,"is-disabled":h.value,"is-invalid":g.value===`error`,"is-decorative":i.decorative,"is-check-exiting":d.value}]),S=(0,t.computed)(()=>{if(typeof m.value==`number`)return{"--bing-checkbox-size":`${m.value}px`,"--bing-checkbox-radius":`${Math.max(5,Math.round(m.value*.34))}px`}});function C(){return typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function w(){n.gsap.killTweensOf([l.value,u.value].filter(e=>!!e))}function T(e,t,r,i){if(C()){d.value=!1;return}let a=l.value,o=u.value;if(!a||!o)return;let s=e&&!t,c=r&&!i;w(),d.value=!1,s?n.gsap.fromTo(a,{autoAlpha:0,rotation:-18,scale:.18},{autoAlpha:1,rotation:0,scale:1,duration:.28,ease:`back.out(3.4)`,clearProps:`transform,opacity,visibility`,overwrite:!0}):c&&(d.value=!0,n.gsap.fromTo(a,{autoAlpha:1,rotation:0,scale:1},{autoAlpha:0,rotation:0,scale:.32,duration:.18,ease:`power2.in`,clearProps:`transform,opacity,visibility`,overwrite:!0,onComplete:()=>{d.value=!1}})),t?n.gsap.fromTo(o,{autoAlpha:0,scaleX:.2},{autoAlpha:1,scaleX:1,duration:.2,ease:`back.out(2.4)`,clearProps:`transform,opacity,visibility`,overwrite:!0}):i&&n.gsap.fromTo(o,{autoAlpha:1,scaleX:1},{autoAlpha:0,scaleX:.2,duration:.12,ease:`power2.in`,clearProps:`transform,opacity,visibility`,overwrite:!0})}function E(e){let t=e.target.checked;if(f={checked:t,indeterminate:i.indeterminate},T(t,i.indeterminate,b.value,i.indeterminate),s&&i.value!==void 0){s.updateValue(i.value,t,e);return}a(`update:modelValue`,t),a(`change`,t,e),c?.handleControlChange()}function D(e){a(`blur`,e),s?.handleCheckboxBlur(e),s||c?.handleControlBlur()}return(0,t.watch)(()=>[b.value,i.indeterminate],([e,t],[n,r])=>{if(f?.checked===e&&f.indeterminate===t){f=null;return}f=null,T(e,t,n,r)},{flush:`post`}),(0,t.onBeforeUnmount)(w),(n,r)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.decorative?`span`:`label`),{class:(0,t.normalizeClass)(x.value),style:(0,t.normalizeStyle)(S.value),"aria-hidden":e.decorative||void 0},{default:(0,t.withCtx)(()=>[e.decorative?(0,t.createCommentVNode)(``,!0):((0,t.openBlock)(),(0,t.createElementBlock)(`input`,{key:0,class:`bing-checkbox__input`,id:_.value,type:`checkbox`,checked:b.value,indeterminate:e.indeterminate,disabled:h.value,name:y.value,value:e.value,"aria-label":e.ariaLabel||void 0,"aria-describedby":v.value,"aria-invalid":g.value===`error`||void 0,onChange:E,onFocus:r[0]||=e=>a(`focus`,e),onBlur:D},null,40,Qt)),(0,t.createElementVNode)(`span`,$t,[(0,t.createElementVNode)(`span`,{ref_key:`checkRef`,ref:l,class:`bing-checkbox__check`},[(0,t.createVNode)(Q,{icon:(0,t.unref)(ct),size:`xs`,"stroke-width":3},null,8,[`icon`])],512),(0,t.createElementVNode)(`span`,{ref_key:`mixedRef`,ref:u,class:`bing-checkbox__mixed`},null,512)]),!e.decorative&&p.value?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,en,[(0,t.renderSlot)(n.$slots,`default`,{},()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.label),1)],!0)])):(0,t.createCommentVNode)(``,!0)]),_:3},8,[`class`,`style`,`aria-hidden`]))}}),[[`__scopeId`,`data-v-60cfda9d`]]),nn=[`aria-label`],rn={class:`bing-resizable__content`},an={key:0,class:`bing-resizable__size`,"aria-hidden":`true`},on=[`aria-label`,`disabled`,`onPointerdown`,`onKeydown`],sn={class:`bing-resizable__handle-mark`,"aria-hidden":`true`},cn=R((0,t.defineComponent)({__name:`BingResizable`,props:{size:{default:void 0},defaultSize:{default:()=>({width:320,height:220})},position:{default:void 0},defaultPosition:{default:()=>({x:0,y:0})},minWidth:{default:80},minHeight:{default:80},maxWidth:{default:void 0},maxHeight:{default:void 0},mode:{default:`fixed`},snapMode:{default:`live`},directions:{default:()=>[`right`,`bottom`,`bottom-right`]},step:{default:1},disabled:{type:Boolean,default:!1},lockAspectRatio:{type:Boolean,default:!1},contain:{type:Boolean,default:!1},showSize:{type:Boolean,default:!1},handleSize:{default:12},ariaLabel:{default:void 0}},emits:[`update:size`,`update:position`,`resize-start`,`resize`,`resize-end`],setup(e,{expose:r,emit:i}){let a=[`top`,`right`,`bottom`,`left`,`top-left`,`top-right`,`bottom-left`,`bottom-right`],o={top:nt,right:tt,bottom:nt,left:tt,"top-left":rt,"top-right":it,"bottom-left":Qe,"bottom-right":$e},s=e,c=i,l=(0,t.ref)(null),u=(0,t.ref)(null),d=(0,t.ref)(null),f=(0,t.ref)(R(s.defaultSize)),p=(0,t.ref)(R(s.defaultSize)),m=(0,t.ref)(z(s.defaultPosition)),h=(0,t.ref)(z(s.defaultPosition)),g=(0,t.ref)(!1),_=(0,t.ref)(!1),v=(0,t.ref)(!1),y=(0,t.ref)(null),b,x={x:0,y:0},S=``,C=``,w=``,T=``,E=!1,D=(0,t.computed)(()=>[`bing-resizable`,`bing-resizable--${s.mode}`,{"is-disabled":s.disabled,"is-resizing":v.value,"is-contain":s.contain,"is-ratio-locked":s.lockAspectRatio}]),O=(0,t.computed)(()=>v.value?p.value:s.size?s.size:g.value?f.value:s.defaultSize),k=(0,t.computed)(()=>v.value?h.value:s.position?z(s.position):_.value?m.value:z(s.defaultPosition)),A=(0,t.computed)(()=>R(O.value)),j=(0,t.computed)(()=>{let e=k.value;return{width:I(O.value.width),height:I(O.value.height),minWidth:I(s.minWidth),minHeight:I(s.minHeight),maxWidth:I(s.maxWidth),maxHeight:I(s.maxHeight),left:`${e.x}px`,top:`${e.y}px`,"--bing-resizable-handle-size":`${Math.max(6,s.handleSize)}px`}}),M=(0,t.computed)(()=>s.directions.filter(e=>a.includes(e))),N=(0,t.computed)(()=>{let e=v.value?p.value:A.value;return`${Math.round(e.width)} x ${Math.round(e.height)}`});function P(){return typeof window<`u`&&typeof document<`u`}function F(){return P()&&typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function I(e){return typeof e==`number`?`${e}px`:e}function L(e,t){if(typeof e==`number`&&Number.isFinite(e))return e;if(typeof e==`string`){let t=Number.parseFloat(e);if(Number.isFinite(t))return t}return t}function R(e){return{width:Math.max(0,L(e?.width,320)),height:Math.max(0,L(e?.height,220))}}function z(e){return{x:L(e?.x,0),y:L(e?.y,0)}}function B(e){return Math.round(e*1e3)/1e3}function V(e,t,n){return Math.min(n,Math.max(t,e))}function H(e,t){return!Number.isFinite(t)||t<=1?e:Math.round(e/t)*t}function U(e,t){return Math.abs(e.width-t.width)<.001&&Math.abs(e.height-t.height)<.001}function ee(e,t){return Math.abs(e.x-t.x)<.001&&Math.abs(e.y-t.y)<.001}function W(){if(typeof s.step==`number`){let e=Math.max(1,s.step);return{x:e,y:e}}return{x:Math.max(1,s.step.x??1),y:Math.max(1,s.step.y??1)}}function te(e){return{top:e.includes(`top`),right:e.includes(`right`),bottom:e.includes(`bottom`),left:e.includes(`left`)}}function ne(e){return e===`top`||e===`bottom`?`ns-resize`:e===`left`||e===`right`?`ew-resize`:e===`top-left`||e===`bottom-right`?`nwse-resize`:`nesw-resize`}function re(e){return[`ew-resize`,`ns-resize`,`nwse-resize`,`nesw-resize`].includes(e)}function G(e){let t=te(e);return`${t.left?`100%`:t.right?`0%`:`50%`} ${t.top?`100%`:t.bottom?`0%`:`50%`}`}function K(e){return`Resize ${e.replace(`-`,` `)}`}function q(){let e=l.value?.getBoundingClientRect();return{width:e?.width?e.width:L(O.value.width,A.value.width),height:e?.height?e.height:L(O.value.height,A.value.height)}}function ie(){if(!s.contain)return null;let e=l.value?.parentElement,t=e?.getBoundingClientRect();if(!e||!t?.width||!t?.height)return null;let n=window.getComputedStyle(e),r=L(n.paddingLeft,0)+L(n.paddingRight,0)+L(n.borderLeftWidth,0)+L(n.borderRightWidth,0),i=L(n.paddingTop,0)+L(n.paddingBottom,0)+L(n.borderTopWidth,0)+L(n.borderBottomWidth,0);return{width:Math.max(0,t.width-r),height:Math.max(0,t.height-i)}}function ae(){return{minWidth:Math.max(0,L(s.minWidth,0)),minHeight:Math.max(0,L(s.minHeight,0)),maxWidth:Math.max(0,L(s.maxWidth,1/0)),maxHeight:Math.max(0,L(s.maxHeight,1/0))}}function oe(e,t,n){let r=ae();if(s.lockAspectRatio&&n&&n.aspectRatio>0){let i=n.aspectRatio,a=V(ce(e,t,n.direction,n)===`width`?e:t*i,Math.max(r.minWidth,r.minHeight*i),Math.min(r.maxWidth,r.maxHeight*i));return{width:a,height:a/i}}return{width:V(e,r.minWidth,r.maxWidth),height:V(t,r.minHeight,r.maxHeight)}}function se(e,t,n,r){if(!s.lockAspectRatio||r.aspectRatio<=0)return{width:e,height:t};let i=te(n),a=r.aspectRatio;return(i.left||i.right)&&!(i.top||i.bottom)?{width:e,height:e/a}:(i.top||i.bottom)&&!(i.left||i.right)?{width:t*a,height:t}:Math.abs(e-r.startSize.width)>=Math.abs(t-r.startSize.height)?{width:e,height:e/a}:{width:t*a,height:t}}function ce(e,t,n,r){let i=te(n);return(i.left||i.right)&&!(i.top||i.bottom)?`width`:(i.top||i.bottom)&&!(i.left||i.right)?`height`:Math.abs(e-r.startSize.width)>=Math.abs(t-r.startSize.height)?`width`:`height`}function le(e,t,n,r){let i=W();if(s.lockAspectRatio&&r.aspectRatio>0){if(ce(e,t,n,r)===`width`){let t=H(e,i.x);return{width:t,height:t/r.aspectRatio}}let a=H(t,i.y);return{width:a*r.aspectRatio,height:a}}return{width:H(e,i.x),height:H(t,i.y)}}function ue(e,t){let n=te(t.direction);if(t.mode===`mirror`){let n=Math.abs(e.width-t.startSize.width)>.001,r=Math.abs(e.height-t.startSize.height)>.001;return{x:n?t.startPosition.x+(t.startSize.width-e.width)/2:t.startPosition.x,y:r?t.startPosition.y+(t.startSize.height-e.height)/2:t.startPosition.y}}return{x:n.left?t.startPosition.x+t.startSize.width-e.width:t.startPosition.x,y:n.top?t.startPosition.y+t.startSize.height-e.height:t.startPosition.y}}function de(e,t,n){if(!n.parentSize)return{size:e,position:t};let r=e.width,i=e.height,a=t.x,o=t.y;return a<0&&(r+=a,a=0),o<0&&(i+=o,o=0),a+r>n.parentSize.width&&(r=n.parentSize.width-a),o+i>n.parentSize.height&&(i=n.parentSize.height-o),{size:oe(r,i),position:{x:a,y:o}}}function fe(e,t,n,r=e.snapMode===`live`){let i=te(e.direction),a=e.mode===`mirror`?2:1,o=e.startSize.width+((i.right?t:0)-(i.left?t:0))*a,s=e.startSize.height+((i.bottom?n:0)-(i.top?n:0))*a,c=se(o,s,e.direction,e);if(o=c.width,s=c.height,r){let t=le(o,s,e.direction,e);o=t.width,s=t.height}let l=oe(o,s,e),u=ue(l,e),d=de(l,u,e);return l=d.size,u=d.position,{size:{width:B(l.width),height:B(l.height)},position:{x:B(u.x),y:B(u.y)}}}function pe(e,t,n){let r=q();return{direction:e,startClientX:t,startClientY:n,startSize:r,startPosition:k.value,aspectRatio:r.height>0?r.width/r.height:1,mode:s.mode,snapMode:s.snapMode,parentSize:ie()}}function me(e,t,n){return{direction:e,size:p.value,position:h.value,delta:t,event:n}}function he(){s.size||(f.value=p.value,g.value=!0),s.position||(m.value=h.value,_.value=!0),c(`update:size`,p.value),c(`update:position`,h.value)}function J(e){if(!P()||E)return;let t=ne(e);S=re(document.documentElement.style.cursor)?``:document.documentElement.style.cursor,C=re(document.body?.style.cursor??``)?``:document.body?.style.cursor??``,w=document.documentElement.style.userSelect,T=document.body?.style.userSelect??``,document.documentElement.style.cursor=t,document.body.style.cursor=t,document.documentElement.style.userSelect=`none`,document.body.style.userSelect=`none`,E=!0}function ge(){!P()||!E||(document.documentElement.style.cursor=S,document.body.style.cursor=C,document.documentElement.style.userSelect=w,document.body.style.userSelect=T,S=``,C=``,w=``,T=``,E=!1)}function _e(){if(P()){window.addEventListener(`pointermove`,Se),window.addEventListener(`pointerup`,we),window.addEventListener(`pointercancel`,we),window.addEventListener(`pointerout`,Ee),window.addEventListener(`blur`,Te),window.addEventListener(`keydown`,De),document.addEventListener(`visibilitychange`,Y);try{window.parent&&window.parent!==window&&(window.parent.addEventListener(`pointerup`,we),window.parent.addEventListener(`pointercancel`,we),window.parent.addEventListener(`blur`,Te))}catch{}}}function ve(){if(P()){window.removeEventListener(`pointermove`,Se),window.removeEventListener(`pointerup`,we),window.removeEventListener(`pointercancel`,we),window.removeEventListener(`pointerout`,Ee),window.removeEventListener(`blur`,Te),window.removeEventListener(`keydown`,De),document.removeEventListener(`visibilitychange`,Y);try{window.parent&&window.parent!==window&&(window.parent.removeEventListener(`pointerup`,we),window.parent.removeEventListener(`pointercancel`,we),window.parent.removeEventListener(`blur`,Te))}catch{}}}function ye(e){F()||(u.value&&n.gsap.to(u.value,{scale:1.006,transformOrigin:G(e),duration:.16,ease:`power2.out`,overwrite:!0,force3D:!0}),d.value&&n.gsap.fromTo(d.value,{autoAlpha:0,scale:.985},{autoAlpha:1,scale:1,transformOrigin:G(e),duration:.18,ease:`power2.out`,overwrite:!0,force3D:!0}))}function be(e){F()||(u.value&&n.gsap.to(u.value,{scale:1,transformOrigin:G(e),duration:.42,ease:`elastic.out(1, 0.78)`,overwrite:!0,force3D:!0}),d.value&&n.gsap.to(d.value,{autoAlpha:0,scale:1.018,transformOrigin:G(e),duration:.28,ease:`power3.out`,overwrite:!0,force3D:!0}))}function xe(e,t){if(!(s.disabled||t.button!==0)){t.preventDefault(),b=pe(e,t.clientX,t.clientY),x={x:0,y:0},p.value=b.startSize,h.value=b.startPosition,y.value=e,v.value=!0,J(e),_e(),ye(e);try{t.currentTarget?.setPointerCapture?.(t.pointerId)}catch{}c(`resize-start`,me(e,x,t))}}function Se(e){if(!b)return;e.preventDefault(),x={x:e.clientX-b.startClientX,y:e.clientY-b.startClientY};let t=fe(b,x.x,x.y);U(t.size,p.value)&&ee(t.position,h.value)||(p.value=t.size,h.value=t.position,he(),c(`resize`,me(b.direction,x,e)))}function Ce(e,t=!0){let n=b;if(ve(),ge(),!n)return;let r=n.direction;if(n.snapMode===`end`){let e=fe(n,x.x,x.y,!0);p.value=e.size,h.value=e.position}he(),e&&t&&c(`resize-end`,me(r,x,e)),be(r),b=void 0,y.value=null,v.value=!1}function we(e){Ce(e)}function Te(){Ce(void 0,!1)}function Ee(e){e.relatedTarget||(e.clientX<=0||e.clientY<=0||e.clientX>=window.innerWidth||e.clientY>=window.innerHeight)&&Te()}function Y(){document.visibilityState===`hidden`&&Te()}function De(e){e.key===`Escape`&&Ce(e)}function Oe(e,t){let n=te(e),r=W(),i=t.shiftKey?4:1,a=r.x*i,o=r.y*i;return t.key===`ArrowLeft`&&(n.left||n.right)?{x:-a,y:0}:t.key===`ArrowRight`&&(n.left||n.right)?{x:a,y:0}:t.key===`ArrowUp`&&(n.top||n.bottom)?{x:0,y:-o}:t.key===`ArrowDown`&&(n.top||n.bottom)?{x:0,y:o}:null}function X(e,t){if(s.disabled)return;let n=Oe(e,t);if(!n)return;t.preventDefault();let r=fe(pe(e,0,0),n.x,n.y,!0);p.value=r.size,h.value=r.position,y.value=e,v.value=!0,c(`resize-start`,me(e,{x:0,y:0},t)),he(),c(`resize`,me(e,n,t)),c(`resize-end`,me(e,n,t)),ye(e),be(e),y.value=null,v.value=!1}function ke(){p.value=R(s.defaultSize),h.value=z(s.defaultPosition),f.value=p.value,m.value=h.value,g.value=!0,_.value=!0,c(`update:size`,p.value),c(`update:position`,h.value)}function Ae(){return v.value?p.value:R(O.value)}function je(){return k.value}return(0,t.onBeforeUnmount)(()=>{ve(),ge(),n.gsap.killTweensOf([u.value,d.value].filter(Boolean))}),r({reset:ke,getSize:Ae,getPosition:je}),(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{ref_key:`rootRef`,ref:l,class:(0,t.normalizeClass)(D.value),style:(0,t.normalizeStyle)(j.value),role:`group`,"aria-label":e.ariaLabel},[(0,t.createElementVNode)(`div`,{ref_key:`surfaceRef`,ref:u,class:`bing-resizable__surface`},[(0,t.createElementVNode)(`div`,rn,[(0,t.renderSlot)(n.$slots,`default`,{},void 0,!0)]),(0,t.createElementVNode)(`span`,{ref_key:`feedbackRef`,ref:d,class:`bing-resizable__feedback`,"aria-hidden":`true`},null,512),e.showSize?((0,t.openBlock)(),(0,t.createElementBlock)(`output`,an,(0,t.toDisplayString)(N.value),1)):(0,t.createCommentVNode)(``,!0),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(M.value,i=>((0,t.openBlock)(),(0,t.createElementBlock)(`button`,{key:i,type:`button`,class:(0,t.normalizeClass)([`bing-resizable__handle`,[`bing-resizable__handle--${i}`,{"is-active":y.value===i}]]),"aria-label":K(i),disabled:e.disabled,onPointerdown:e=>xe(i,e),onKeydown:e=>X(i,e)},[(0,t.renderSlot)(n.$slots,`handle`,{direction:i,active:y.value===i},()=>[(0,t.createElementVNode)(`span`,sn,[r[0]||=(0,t.createElementVNode)(`span`,{class:`bing-resizable__handle-line`},null,-1),(0,t.createVNode)(Q,{class:`bing-resizable__handle-icon`,icon:o[i],size:i.includes(`-`)?13:14,"stroke-width":2.35},null,8,[`icon`,`size`])])],!0)],42,on))),128))],512)],14,nn))}}),[[`__scopeId`,`data-v-1c85ed00`]]),ln=[`tabindex`,`role`,`aria-label`],un=R((0,t.defineComponent)({__name:`BingScrollbar`,props:{height:{default:void 0},maxHeight:{default:void 0},minThumbSize:{default:28},overflowTolerance:{default:1},vertical:{type:Boolean,default:!0},horizontal:{type:Boolean,default:!1},always:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},focusable:{type:Boolean,default:!0},ariaLabel:{default:void 0},smooth:{type:[Boolean,Object],default:!0}},emits:[`scroll`],setup(e,{expose:n,emit:r}){let i=e,a=r,o=(0,t.ref)(null),s=(0,t.ref)(null),c=(0,t.ref)(null),l=(0,t.ref)(null),u=(0,t.ref)(!1),d=(0,t.ref)(!1),f=(0,t.ref)(0),p=(0,t.ref)(0),m=(0,t.ref)(0),h=(0,t.ref)(0),g=(0,t.ref)(!1),_=(0,t.ref)(null),v=(0,t.ref)(!1),y,b,x,S,C,w,T=0,E=0,D=0,O=0,k=0,A=0,j=0,M=(0,t.computed)(()=>[`bing-scrollbar`,{"has-overflow":u.value||d.value,"has-vertical-overflow":u.value,"has-horizontal-overflow":d.value,"is-always-visible":i.always,"is-disabled":i.disabled,"is-dragging":!!_.value,"is-dragging-vertical":_.value===`vertical`,"is-dragging-horizontal":_.value===`horizontal`,"is-hovering":g.value,"is-scrolling":v.value,"is-smooth":!!i.smooth}]),N=(0,t.computed)(()=>({height:B(i.height),maxHeight:B(i.maxHeight)})),P=(0,t.computed)(()=>({height:`${f.value}px`,transform:`translate(-50%, ${p.value}px)`})),F=(0,t.computed)(()=>({width:`${m.value}px`,transform:`translate(${h.value}px, -50%)`})),I=(0,t.computed)(()=>Math.max(1,i.overflowTolerance)),L=(0,t.computed)(()=>(u.value||d.value)&&i.focusable&&!i.disabled),R=(0,t.computed)(()=>i.ariaLabel??(L.value?`Scrollable content`:void 0));function z(){return typeof window<`u`&&typeof document<`u`}function B(e){return typeof e==`number`?`${e}px`:e}function V(){!z()||b===void 0||(window.clearTimeout(b),b=void 0)}function H(){!z()||x===void 0||(window.cancelAnimationFrame(x),x=void 0)}function U(){!z()||S===void 0||(window.cancelAnimationFrame(S),S=void 0)}function ee(){U(),C=void 0}function W(){ee(),w?.cancel()}function te(){return typeof i.smooth==`object`?i.smooth:void 0}function ne(){return!!i.smooth&&!i.disabled}function re(){let e=o.value;if(!e)return;let t=e.clientHeight,n=e.scrollHeight,r=e.clientWidth,a=e.scrollWidth,s=Math.max(0,n-t),g=Math.max(0,a-r),_=i.vertical&&!i.disabled&&s>I.value,v=i.horizontal&&!i.disabled&&g>I.value;if(u.value=_,d.value=v,O=_?s:0,k=v?g:0,!_||!c.value)f.value=0,p.value=0,A=0;else{let r=c.value.clientHeight,a=n>0?t/n*r:r,o=Math.min(r,Math.max(Math.max(12,i.minThumbSize),a));A=Math.max(0,r-o);let l=s>0?e.scrollTop/s:0;f.value=o,p.value=A*l}if(!v||!l.value)m.value=0,h.value=0,j=0;else{let t=l.value.clientWidth,n=a>0?r/a*t:t,o=Math.min(t,Math.max(Math.max(12,i.minThumbSize),n));j=Math.max(0,t-o);let s=g>0?e.scrollLeft/g:0;m.value=o,h.value=j*s}}function G(){let e=o.value;if(e){if(u.value){let t=O>0?e.scrollTop/O:0;p.value=A*t}if(d.value){let t=k>0?e.scrollLeft/k:0;h.value=j*t}}}function K(){if(!z()||typeof window.requestAnimationFrame!=`function`){re();return}x===void 0&&(x=window.requestAnimationFrame(()=>{x=void 0,re()}))}function q(){(0,t.nextTick)(K)}function ie(){z()&&(V(),v.value=!0,b=window.setTimeout(()=>{b=void 0,v.value=!1},720))}function ae(e){let t=Math.abs(e.deltaX)>Math.abs(e.deltaY)?e.deltaX:e.deltaY;return e.deltaMode===1?t*16:e.deltaMode===2?t*(o.value?.clientWidth??1):t}function oe(){return z()&&window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches}function se(e){G(),ie(),a(`scroll`,e)}function ce(e){if(e.defaultPrevented)return!1;if(ne())return ee(),w?.handleWheel(e)??!1;if(i.disabled||!i.horizontal)return!1;if(!e.shiftKey)return ee(),!1;let t=o.value;if(!t)return!1;let n=k||Math.max(0,t.scrollWidth-t.clientWidth),r=C??t.scrollLeft,a=fe(r+ae(e),0,n);return a===r&&a===t.scrollLeft?!1:(e.preventDefault(),C=a,ge(),!0)}function le(e){ne()&&w?.handleKeydown(e)}function ue(e){let t=o.value,n=e===`vertical`?c.value:l.value;return!t||!n?null:{maxScroll:e===`vertical`?Math.max(0,t.scrollHeight-t.clientHeight):Math.max(0,t.scrollWidth-t.clientWidth),thumbTravel:e===`vertical`?Math.max(0,n.clientHeight-f.value):Math.max(0,n.clientWidth-m.value)}}function de(e){let t=o.value;if(!t)return;let n=O||Math.max(0,t.scrollHeight-t.clientHeight);t.scrollTop=Math.min(n,Math.max(0,e)),G(),ie()}function fe(e,t,n){return Math.min(n,Math.max(t,e))}function me(e){let t=o.value;if(!t)return;let n=k||Math.max(0,t.scrollWidth-t.clientWidth);t.scrollLeft=Math.min(n,Math.max(0,e)),G(),ie()}function he(){S=void 0;let e=o.value;if(!e||C===void 0){C=void 0;return}let t=C-e.scrollLeft;if(Math.abs(t)<.5){me(C),C=void 0;return}me(e.scrollLeft+t*.42),J()}function J(){!z()||S!==void 0||typeof window.requestAnimationFrame!=`function`||(S=window.requestAnimationFrame(he))}function ge(){if(C!==void 0){if(!z()||typeof window.requestAnimationFrame!=`function`||oe()){me(C),C=void 0;return}S===void 0&&he()}}function _e(e,t){if(i.disabled||(e===`vertical`?!u.value:!d.value)||t.button!==0||t.target!==t.currentTarget)return;let n=e===`vertical`?c.value:l.value,r=ue(e);if(!n||!r||r.thumbTravel<=0)return;t.preventDefault(),W();let a=n.getBoundingClientRect(),o=e===`vertical`?t.clientY-a.top-f.value/2:t.clientX-a.left-m.value/2,s=Math.min(1,Math.max(0,o/r.thumbTravel));if(e===`vertical`){de(s*r.maxScroll);return}me(s*r.maxScroll)}function ve(){z()&&(window.addEventListener(`pointermove`,xe),window.addEventListener(`pointerup`,Se),window.addEventListener(`pointercancel`,Se))}function ye(){z()&&(window.removeEventListener(`pointermove`,xe),window.removeEventListener(`pointerup`,Se),window.removeEventListener(`pointercancel`,Se))}function be(e,t){if(!(i.disabled||(e===`vertical`?!u.value:!d.value)||t.button!==0)){t.preventDefault(),t.stopPropagation(),W(),T=e===`vertical`?t.clientY:t.clientX,E=o.value?.scrollTop??0,D=o.value?.scrollLeft??0,_.value=e,ve();try{t.currentTarget?.setPointerCapture?.(t.pointerId)}catch{}}}function xe(e){let t=_.value;if(!t)return;let n=ue(t);if(!n||n.thumbTravel<=0)return;e.preventDefault();let r=((t===`vertical`?e.clientY:e.clientX)-T)*(n.maxScroll/n.thumbTravel);if(t===`vertical`){de(E+r);return}me(D+r)}function Se(){_.value&&(_.value=null,ye())}function Ce(e){let t=o.value;if(t){if(typeof e==`number`){W(),de(e);return}W(),t.scrollTo(e),K()}}function we(e){let t=o.value;if(t){if(typeof e==`number`){W(),de(t.scrollTop+e);return}W(),t.scrollBy(e),K()}}function Te(){if(y?.disconnect(),y=void 0,!z()||typeof ResizeObserver>`u`){window.addEventListener(`resize`,q),q();return}y=new ResizeObserver(q),o.value&&y.observe(o.value),s.value&&y.observe(s.value),q()}return(0,t.watch)(()=>[i.height,i.maxHeight,i.minThumbSize,i.overflowTolerance,i.disabled,i.vertical,i.horizontal],q),(0,t.watch)(()=>[i.disabled,i.smooth],()=>{ne()||w?.cancel()},{deep:!0}),(0,t.onMounted)(()=>{w=pe({getElement:()=>o.value,getOptions:te,getAxes:()=>({horizontal:i.horizontal,vertical:i.vertical}),isEnabled:ne}),Te()}),(0,t.onBeforeUnmount)(()=>{V(),H(),W(),w=void 0,ye(),y?.disconnect(),y=void 0,z()&&window.removeEventListener(`resize`,q)}),n({handleWheel:ce,scrollBy:we,scrollTo:Ce,stop:W,update:re,get viewport(){return o.value}}),(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)(M.value),style:(0,t.normalizeStyle)(N.value),onMouseenter:n[4]||=e=>g.value=!0,onMouseleave:n[5]||=e=>g.value=!1},[(0,t.createElementVNode)(`div`,{ref_key:`viewportRef`,ref:o,class:`bing-scrollbar__viewport`,tabindex:L.value?0:void 0,role:R.value?`region`:void 0,"aria-label":R.value,onScroll:se,onWheel:ce,onKeydown:le},[(0,t.createElementVNode)(`div`,{ref_key:`contentRef`,ref:s,class:`bing-scrollbar__content`},[(0,t.renderSlot)(e.$slots,`default`,{},void 0,!0)],512)],40,ln),(0,t.withDirectives)((0,t.createElementVNode)(`div`,{ref_key:`verticalRailRef`,ref:c,class:`bing-scrollbar__rail bing-scrollbar__rail--vertical`,"aria-hidden":`true`,onPointerdown:n[1]||=e=>_e(`vertical`,e)},[(0,t.createElementVNode)(`div`,{class:`bing-scrollbar__thumb bing-scrollbar__thumb--vertical`,style:(0,t.normalizeStyle)(P.value),onPointerdown:n[0]||=e=>be(`vertical`,e)},null,36)],544),[[t.vShow,u.value]]),(0,t.withDirectives)((0,t.createElementVNode)(`div`,{ref_key:`horizontalRailRef`,ref:l,class:`bing-scrollbar__rail bing-scrollbar__rail--horizontal`,"aria-hidden":`true`,onPointerdown:n[3]||=e=>_e(`horizontal`,e)},[(0,t.createElementVNode)(`div`,{class:`bing-scrollbar__thumb bing-scrollbar__thumb--horizontal`,style:(0,t.normalizeStyle)(F.value),onPointerdown:n[2]||=e=>be(`horizontal`,e)},null,36)],544),[[t.vShow,d.value]])],38))}}),[[`__scopeId`,`data-v-cadc871e`]]),dn=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function fn(e){return pn(e)}function pn(e){return Array.isArray(e)?mn(e):e instanceof RegExp?e:typeof e==`object`?hn(e):e}function mn(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=pn(e[n]);return t}function hn(e){let t={};for(let n in e)t[n]=pn(e[n]);return t}function gn(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function _n(e){let t=~e.lastIndexOf(`/`)||~e.lastIndexOf(`\\`);return t===0?e:~t===e.length-1?_n(e.substring(0,e.length-1)):e.substr(~t+1)}var vn=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,yn=class{static hasCaptures(e){return e===null?!1:(vn.lastIndex=0,vn.test(e))}static replaceCaptures(e,t,n){return e.replace(vn,(e,r,i,a)=>{let o=n[parseInt(r||i,10)];if(o){let e=t.substring(o.start,o.end);for(;e[0]===`.`;)e=e.substring(1);switch(a){case`downcase`:return e.toLowerCase();case`upcase`:return e.toUpperCase();default:return e}}else return e})}};function bn(e,t){return e<t?-1:+(e>t)}function xn(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){let n=bn(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function Sn(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function Cn(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)}var wn=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},Tn=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(An(e),t)}static createFromParsedTheme(e,t){return Nn(e,t)}_cachedMatchRoot=new wn(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>Dn(e.parent,t.parentScopes));return n?new kn(n.fontStyle,n.foreground,n.background):null}},En=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(let r of n)t=new e(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new e(n,t[r]);return n}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(` `)}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function Dn(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===`>`){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!On(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function On(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}var kn=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function An(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,i=t.length;e<i;e++){let i=t[e];if(!i.settings)continue;let a;if(typeof i.scope==`string`){let e=i.scope;e=e.replace(/^[,]+/,``),e=e.replace(/[,]+$/,``),a=e.split(`,`)}else a=Array.isArray(i.scope)?i.scope:[``];let o=-1;if(typeof i.settings.fontStyle==`string`){o=0;let e=i.settings.fontStyle.split(` `);for(let t=0,n=e.length;t<n;t++)switch(e[t]){case`italic`:o|=1;break;case`bold`:o|=2;break;case`underline`:o|=4;break;case`strikethrough`:o|=8;break}}let s=null;typeof i.settings.foreground==`string`&&Sn(i.settings.foreground)&&(s=i.settings.foreground);let c=null;typeof i.settings.background==`string`&&Sn(i.settings.background)&&(c=i.settings.background);for(let t=0,i=a.length;t<i;t++){let i=a[t].trim().split(` `),l=i[i.length-1],u=null;i.length>1&&(u=i.slice(0,i.length-1),u.reverse()),n[r++]=new jn(l,u,e,o,s,c)}}return n}var jn=class{constructor(e,t,n,r,i,a){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=a}},Mn=(e=>(e[e.NotSet=-1]=`NotSet`,e[e.None=0]=`None`,e[e.Italic=1]=`Italic`,e[e.Bold=2]=`Bold`,e[e.Underline=4]=`Underline`,e[e.Strikethrough=8]=`Strikethrough`,e))(Mn||{});function Nn(e,t){e.sort((e,t)=>{let n=bn(e.scope,t.scope);return n!==0||(n=xn(e.parentScopes,t.parentScopes),n!==0)?n:e.index-t.index});let n=0,r=`#000000`,i=`#ffffff`;for(;e.length>=1&&e[0].scope===``;){let t=e.shift();t.fontStyle!==-1&&(n=t.fontStyle),t.foreground!==null&&(r=t.foreground),t.background!==null&&(i=t.background)}let a=new Pn(t),o=new kn(n,a.getId(r),a.getId(i)),s=new Ln(new In(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];s.insert(0,n.scope,n.parentScopes,n.fontStyle,a.getId(n.foreground),a.getId(n.background))}return new Tn(a,o,s)}var Pn=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},Fn=Object.freeze([]),In=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||Fn,this.fontStyle=n,this.foreground=r,this.background=i}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e?console.log(`how did this happen?`):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),n!==0&&(this.foreground=n),r!==0&&(this.background=r)}},Ln=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,r=0;for(;e.parentScopes[n]===`>`&&n++,t.parentScopes[r]===`>`&&r++,!(n>=e.parentScopes.length||r>=t.parentScopes.length);){let i=t.parentScopes[r].length-e.parentScopes[n].length;if(i!==0)return i;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(t){if(t!==``){let e=t.indexOf(`.`),n,r;if(e===-1?(n=t,r=``):(n=t.substring(0,e),r=t.substring(e+1)),this._children.hasOwnProperty(n))return this._children[n].match(r)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,r,i,a,o){if(n===``){this._doInsertHere(t,r,i,a,o);return}let s=n.indexOf(`.`),c,l;s===-1?(c=n,l=``):(c=n.substring(0,s),l=n.substring(s+1));let u;this._children.hasOwnProperty(c)?u=this._children[c]:(u=new e(this._mainRule.clone(),In.cloneArr(this._rulesWithParentScopes)),this._children[c]=u),u.insert(t+1,l,r,i,a,o)}_doInsertHere(e,t,n,r,i){if(t===null){this._mainRule.acceptOverwrite(e,n,r,i);return}for(let a=0,o=this._rulesWithParentScopes.length;a<o;a++){let o=this._rulesWithParentScopes[a];if(xn(o.parentScopes,t)===0){o.acceptOverwrite(e,n,r,i);return}}n===-1&&(n=this._mainRule.fontStyle),r===0&&(r=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new In(e,t,n,r,i))}},Rn=class e{static toBinaryStr(e){return e.toString(2).padStart(32,`0`)}static print(t){let n=e.getLanguageId(t),r=e.getTokenType(t),i=e.getFontStyle(t),a=e.getForeground(t),o=e.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:a,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!=0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(t,n,r,i,a,o,s){let c=e.getLanguageId(t),l=e.getTokenType(t),u=+!!e.containsBalancedBrackets(t),d=e.getFontStyle(t),f=e.getForeground(t),p=e.getBackground(t);return n!==0&&(c=n),r!==8&&(l=Bn(r)),i!==null&&(u=+!!i),a!==-1&&(d=a),o!==0&&(f=o),s!==0&&(p=s),(c<<0|l<<8|u<<10|d<<11|f<<15|p<<24)>>>0}};function zn(e){return e}function Bn(e){return e}function Vn(e,t){let n=[],r=Un(e),i=r.next();for(;i!==null;){let e=0;if(i.length===2&&i.charAt(1)===`:`){switch(i.charAt(0)){case`R`:e=1;break;case`L`:e=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let t=o();if(n.push({matcher:t,priority:e}),i!==`,`)break;i=r.next()}return n;function a(){if(i===`-`){i=r.next();let e=a();return t=>!!e&&!e(t)}if(i===`(`){i=r.next();let e=s();return i===`)`&&(i=r.next()),e}if(Hn(i)){let e=[];do e.push(i),i=r.next();while(Hn(i));return n=>t(e,n)}return null}function o(){let e=[],t=a();for(;t;)e.push(t),t=a();return t=>e.every(e=>e(t))}function s(){let e=[],t=o();for(;t&&(e.push(t),i===`|`||i===`,`);){do i=r.next();while(i===`|`||i===`,`);t=o()}return t=>e.some(e=>e(t))}}function Hn(e){return!!e&&!!e.match(/[\w\.:]+/)}function Un(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;let r=n[0];return n=t.exec(e),r}}}function Wn(e){typeof e.dispose==`function`&&e.dispose()}var Gn=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},Kn=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},qn=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},Jn=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Gn(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new qn;for(let n of e)Yn(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof Gn){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};function Yn(e,t,n,r){let i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let a=n.lookup(t);e instanceof Gn?Zn({baseGrammar:a,selfGrammar:i},r):Xn(e.ruleName,{baseGrammar:a,selfGrammar:i,repository:i.repository},r);let o=n.injections(e.scopeName);if(o)for(let e of o)r.add(new Gn(e))}function Xn(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];Qn([r],t,n)}}function Zn(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Qn(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Qn(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Qn(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?gn({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&Qn(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=ir(i);switch(a.kind){case 0:Zn({...t,selfGrammar:t.baseGrammar},n);break;case 1:Zn(t,n);break;case 2:Xn(a.ruleName,{...t,repository:e},n);break;case 3:case 4:let r=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(r){let i={baseGrammar:t.baseGrammar,selfGrammar:r,repository:e};a.kind===4?Xn(a.ruleName,i,n):Zn(i,n)}else a.kind===4?n.add(new Kn(a.scopeName,a.ruleName)):n.add(new Gn(a.scopeName));break}}}var $n=class{kind=0},er=class{kind=1},tr=class{constructor(e){this.ruleName=e}kind=2},nr=class{constructor(e){this.scopeName=e}kind=3},rr=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function ir(e){if(e===`$base`)return new $n;if(e===`$self`)return new er;let t=e.indexOf(`#`);return t===-1?new nr(e):t===0?new tr(e.substring(1)):new rr(e.substring(0,t),e.substring(t+1))}var ar=/\\(\d+)/,or=/\\(\d+)/g,sr=-1,cr=-2;function lr(e){return e}function ur(e){return e}var dr=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=yn.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=yn.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${_n(this.$location.filename)}:${this.$location.line}`:`unknown`;return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:yn.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:yn.replaceCaptures(this._contentName,e,t)}},fr=class extends dr{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw Error(`Not supported!`)}compile(e,t){throw Error(`Not supported!`)}compileAG(e,t,n,r){throw Error(`Not supported!`)}},pr=class extends dr{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new vr(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new yr,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},mr=class extends dr{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new yr,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},hr=class extends dr{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,a,o,s,c,l){super(e,t,n,r),this._begin=new vr(i,this.id),this.beginCaptures=a,this._end=new vr(o||`￿`,-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=c||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new yr;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},gr=class extends dr{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,a,o,s,c){super(e,t,n,r),this._begin=new vr(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new vr(o,cr),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null),this._cachedCompiledWhilePatterns&&=(this._cachedCompiledWhilePatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new yr;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new yr,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||`￿`),this._cachedCompiledWhilePatterns}},_r=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new fr(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new pr(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(t.begin===void 0){t.repository&&(r=gn({},r,t.repository));let i=t.patterns;return i===void 0&&t.include&&(i=[{include:t.include}]),new mr(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new gr(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new hr(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let a=0;for(let e in t){if(e===`$vscodeTextmateLocation`)continue;let t=parseInt(e,10);t>a&&(a=t)}for(let e=0;e<=a;e++)i[e]=null;for(let a in t){if(a===`$vscodeTextmateLocation`)continue;let o=parseInt(a,10),s=0;t[a].patterns&&(s=e.getCompiledRuleId(t[a],n,r)),i[o]=e.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,s)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let a=0,o=t.length;a<o;a++){let o=t[a],s=-1;if(o.include){let t=ir(o.include);switch(t.kind){case 0:case 1:s=e.getCompiledRuleId(r[o.include],n,r);break;case 2:let i=r[t.ruleName];i&&(s=e.getCompiledRuleId(i,n,r));break;case 3:case 4:let a=t.scopeName,c=t.kind===4?t.ruleName:null,l=n.getExternalGrammar(a,r);if(l)if(c){let t=l.repository[c];t&&(s=e.getCompiledRuleId(t,n,l.repository))}else s=e.getCompiledRuleId(l.repository.$self,n,l.repository);break}}else s=e.getCompiledRuleId(o,n,r);if(s!==-1){let e=n.getRule(s),t=!1;if((e instanceof mr||e instanceof hr||e instanceof gr)&&e.hasMissingPatterns&&e.patterns.length===0&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},vr=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&typeof e==`string`){let t=e.length,n=0,r=[],i=!1;for(let a=0;a<t;a++)if(e.charAt(a)===`\\`&&a+1<t){let t=e.charAt(a+1);t===`z`?(r.push(e.substring(n,a)),r.push(`$(?!\\n)(?<!\\n)`),n=a+2):(t===`A`||t===`G`)&&(i=!0),a++}this.hasAnchor=i,n===0?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(``))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,typeof this.source==`string`?this.hasBackReferences=ar.test(this.source):this.hasBackReferences=!1}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let n=t.map(t=>e.substring(t.start,t.end));return or.lastIndex=0,this.source.replace(or,(e,t)=>Cn(n[parseInt(t,10)]||``))}_buildAnchorCache(){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let e=[],t=[],n=[],r=[],i,a,o,s;for(i=0,a=this.source.length;i<a;i++)o=this.source.charAt(i),e[i]=o,t[i]=o,n[i]=o,r[i]=o,o===`\\`&&i+1<a&&(s=this.source.charAt(i+1),s===`A`?(e[i+1]=`￿`,t[i+1]=`￿`,n[i+1]=`A`,r[i+1]=`A`):s===`G`?(e[i+1]=`￿`,t[i+1]=`G`,n[i+1]=`￿`,r[i+1]=`G`):(e[i+1]=s,t[i+1]=s,n[i+1]=s,r[i+1]=s),i++);return{A0_G0:e.join(``),A0_G1:t.join(``),A1_G0:n.join(``),A1_G1:r.join(``)}}resolveAnchors(e,t){return!this.hasAnchor||!this._anchorCache||typeof this.source!=`string`?this.source:e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},yr=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&=(this._cached.dispose(),null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(e=>e.source);this._cached=new br(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){return new br(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},br=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose==`function`&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(` - `+this.rules[t]+`: `+this.regExps[t]);return e.join(`
3
+ `&&((u=D.previousSibling)==null||u.remove(),j(document.createElement(`br`),e,D),U=U.slice(1)),!m&&U===``)j(T,e,D);else if(U===` `)e.insertBefore(document.createTextNode(` `),D);else{if(C&&U.charAt(0)===` `&&j(` `,e,D),b&&I===1&&!N&&S.indexOf(b.parentNode)>-1?(M=S[S.length-1],M.appendChild(document.createTextNode(r?``:U))):(M=n(r?``:U),j(M,e,D),b&&I===1&&!N&&M.insertBefore(b,M.firstChild)),r)for(R=v?k([...v.segment(U)].map(e=>e.segment),c):U.match(s)||x,W=0;W<R.length;W++)M.appendChild(R[W]===` `?document.createTextNode(` `):r(R[W]));if(a&&l){if(H=D.textContent=H.substring(U.length+1,H.length),L=M.getBoundingClientRect(),L.top>_.top&&L.left<=_.left){for(z=e.cloneNode(),B=e.childNodes[0];B&&B!==M;)V=B,B=B.nextSibling,z.appendChild(V);e.parentNode.insertBefore(z,e),i&&A(z)}_=L}(I<O.length||F)&&j(I>=O.length?` `:C&&U.slice(-1)===` `?` `+T:T,e,D)}e.removeChild(D),b=0}else D.nodeType===1&&(o&&o.indexOf(D)>-1?(S.indexOf(D.previousSibling)>-1&&S[S.length-1].appendChild(D),b=D):(P(D,t,n,r,i,a,o,s,c,!0),b=0),i&&A(D))},F=class e{constructor(e,t){this.isSplit=!1,_(),this.elements=b(e),this.chars=[],this.words=[],this.lines=[],this.masks=[],this.vars=t,this.elements.forEach(e=>{var n;t.overwrite!==!1&&((n=e[h])==null||n._data.orig.filter(({element:t})=>t===e).forEach(O)),e[h]=this}),this._split=()=>this.isSplit&&this.split(this.vars);let n=[],r,i=()=>{let e=n.length,t;for(;e--;){t=n[e];let r=t.element.offsetWidth;if(r!==t.width){t.width=r,this._split();return}}};this._data={orig:n,obs:typeof ResizeObserver<`u`&&new ResizeObserver(()=>{clearTimeout(r),r=setTimeout(i,200)})},S(this),this.split(t)}split(e){return(this._ctx||C).add(()=>{this.isSplit&&this.revert(),this.vars=e=e||this.vars||{};let{type:t=`chars,words,lines`,aria:n=`auto`,deepSlice:r=!0,smartWrap:i,onSplit:a,autoSplit:o=!1,specialChars:s,mask:c}=this.vars,l=t.indexOf(`lines`)>-1,u=t.indexOf(`chars`)>-1,d=t.indexOf(`words`)>-1,f=u&&!d&&!l,p=s&&(`push`in s?RegExp(`(?:`+s.join(`|`)+`)`,`gu`):s),h=p?RegExp(p.source+`|`+T.source,`gu`):T,g=!!e.ignore&&b(e.ignore),{orig:_,animTime:v,obs:x}=this._data,S;(u||d||l)&&(this.elements.forEach((t,a)=>{_[a]={element:t,html:t.innerHTML,ariaL:t.getAttribute(`aria-label`),ariaH:t.getAttribute(`aria-hidden`)},n===`auto`?t.setAttribute(`aria-label`,(t.textContent||``).trim()):n===`hidden`&&t.setAttribute(`aria-hidden`,`true`);let o=[],s=[],c=[],m=u?M(`char`,e,o):null,v=M(`word`,e,s),b,x,S,C;if(P(t,e,v,m,f,r&&(l||f),g,h,p,!1),l){let n=y(t.childNodes),r=N(t,n,e,c),i,a=[],o=0,s=n.map(e=>e.nodeType===1?e.getBoundingClientRect():E),l=E,u;for(b=0;b<n.length;b++)i=n[b],i.nodeType===1&&(i.nodeName===`BR`?((!b||n[b-1].nodeName!==`BR`)&&(a.push(i),r(o,b+1)),o=b+1,l=D(s,b)):(u=s[b],b&&u.top>l.top&&u.left<l.left+l.width-1&&(r(o,b),o=b),l=u));o<b&&r(o,b),a.forEach(e=>e.parentNode?.removeChild(e))}if(!d){for(b=0;b<s.length;b++)if(x=s[b],u||!x.nextSibling||x.nextSibling.nodeType!==3)if(i&&!l){for(S=document.createElement(`span`),S.style.whiteSpace=`nowrap`;x.firstChild;)S.appendChild(x.firstChild);x.replaceWith(S)}else x.replaceWith(...x.childNodes);else C=x.nextSibling,C&&C.nodeType===3&&(C.textContent=(x.textContent||``)+(C.textContent||``),x.remove());s.length=0,t.normalize()}this.lines.push(...c),this.words.push(...s),this.chars.push(...o)}),c&&this[c]&&this.masks.push(...this[c].map(e=>{let t=e.cloneNode();return e.replaceWith(t),t.appendChild(e),e.className&&(t.className=e.className.trim().split(` `).map(e=>e+`-mask`).join(` `)),t.style.overflow=`clip`,t}))),this.isSplit=!0,m&&l&&o&&m.addEventListener(`loadingdone`,this._split),(S=a&&a(this))&&S.totalTime&&(this._data.anim=v?S.totalTime(v):S),l&&o&&this.elements.forEach((e,t)=>{_[t].width=e.offsetWidth,x&&x.observe(e)})}),this}kill(){let{obs:e}=this._data;e&&e.disconnect(),m?.removeEventListener(`loadingdone`,this._split)}revert(){var e,t;if(this.isSplit){let{orig:n,anim:r}=this._data;this.kill(),n.forEach(O),this.chars.length=this.words.length=this.lines.length=n.length=this.masks.length=0,this.isSplit=!1,r&&(this._data.animTime=r.totalTime(),r.revert()),(t=(e=this.vars).onRevert)==null||t.call(e,this)}return this}static create(t,n){return new e(t,n)}static register(e){p=p||e||window.gsap,p&&(y=p.utils.toArray,S=p.core.context||S),!g&&window.innerWidth>0&&(m=document.fonts,g=!0)}};F.version=`3.15.0`;var I=F,L=(0,t.defineComponent)({__name:`BingAnimatedText`,props:{effect:{default:`none`},trigger:{default:`always`},disabled:{type:Boolean,default:!1},shineColor:{default:void 0},shineBaseColor:{default:void 0},shineSpeed:{default:3},shineDelay:{default:0},shineInterval:{default:1.6},shineDirection:{default:`left`},shineAngle:{default:120},jumpY:{default:-6},jumpStagger:{default:.035},jumpDuration:{default:.34},jumpEase:{default:`power2.out`},jumpReturnEase:{default:`back.out(2.4)`},jumpRepeatDelay:{default:1.2}},setup(e){let r=!1,i=e,a=(0,t.ref)(null),o=(0,t.ref)(null),s,c,l,u,d,f=!1,p=!1,m=(0,t.computed)(()=>i.effect!==`none`&&!i.disabled),h=(0,t.computed)(()=>m.value&&i.effect===`shine`),g=(0,t.computed)(()=>m.value&&i.effect===`jump`),_=(0,t.computed)(()=>[`bing-animated-text`,`bing-animated-text--${i.effect}`,{"is-disabled":i.disabled,"is-shine-active":h.value,[`bing-animated-text--shine-${i.trigger}`]:h.value,[`bing-animated-text--shine-direction-${i.shineDirection}`]:h.value,[`bing-animated-text--jump-${i.trigger}`]:g.value}]),v=(0,t.computed)(()=>{let e={};return g.value&&(e[`--animated-text-jump-room`]=`${Math.max(2,Math.abs(Math.min(0,i.jumpY))+2)}px`),h.value?(e[`--animated-text-shine-angle`]=`${i.shineAngle}deg`,i.shineColor&&(e[`--animated-text-shine-color`]=i.shineColor),i.shineBaseColor&&(e[`--animated-text-shine-base-color`]=i.shineBaseColor),e):e});function y(){return typeof window<`u`&&typeof document<`u`}function b(){return y()&&typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function x(){r||=(n.gsap.registerPlugin(I),!0)}function S(){f=!1,a.value?.removeAttribute(`data-jump-playing`),l?.kill(),l=void 0,s?.revert(),s=void 0,c?.revert(),c=void 0}function C(){return i.shineDirection===`left`?{start:`150% 0`,end:`-150% 0`}:{start:`-150% 0`,end:`150% 0`}}function w(){p=!1,a.value?.removeAttribute(`data-shine-playing`),u?.kill(),u=void 0,d?.kill(),d=void 0,o.value&&n.gsap.set(o.value,{clearProps:`backgroundPosition`})}function T(){i.trigger!==`always`||!h.value||b()||(d?.kill(),d=n.gsap.delayedCall(Math.max(0,i.shineInterval),()=>{d=void 0,E(0)}))}function E(e=i.shineDelay){let t=o.value;if(p||d||!t||!h.value||b())return;let r=C();p=!0,a.value?.setAttribute(`data-shine-playing`,`true`),n.gsap.set(t,{backgroundPosition:r.start}),u=n.gsap.to(t,{backgroundPosition:r.end,duration:Math.max(.1,i.shineSpeed),delay:Math.max(0,e),ease:`none`,overwrite:!0,onComplete:()=>{n.gsap.set(t,{backgroundPosition:r.start}),p=!1,u=void 0,a.value?.removeAttribute(`data-shine-playing`),T()}})}function D(){w(),!(!h.value||!o.value||b())&&(n.gsap.set(o.value,{backgroundPosition:C().start}),(i.trigger===`always`||i.trigger===`once`)&&E())}function O(){if(f||!s?.chars.length||!g.value||b())return;let e=Math.max(.1,i.jumpDuration),t=i.trigger===`always`;f=!0,a.value?.setAttribute(`data-jump-playing`,`true`),l=n.gsap.timeline({repeat:t?-1:0,repeatDelay:Math.max(0,i.jumpRepeatDelay),onComplete:()=>{f=!1,l=void 0,a.value?.removeAttribute(`data-jump-playing`)}}),l.fromTo(s.chars,{y:0},{keyframes:[{y:i.jumpY,duration:e*.45,ease:i.jumpEase},{y:0,duration:e*.55,ease:i.jumpReturnEase}],stagger:Math.max(0,i.jumpStagger),overwrite:!0})}function k(){S();let e=o.value,t=a.value;!g.value||!e||!t||b()||(x(),c=n.gsap.context(()=>{s=I.create(e,{type:`words, chars`,tag:`span`,aria:`auto`,wordsClass:`bing-animated-text__word`,charsClass:`bing-animated-text__char`}),n.gsap.set(s.chars,{display:`inline-block`,transformOrigin:`50% 100%`,willChange:`transform`}),(i.trigger===`always`||i.trigger===`once`)&&O()},t))}function A(){!y()||f||(0,t.nextTick)(()=>{k()})}function j(){y()&&(0,t.nextTick)(()=>{D()})}function M(){i.trigger===`hover`&&(h.value&&E(),g.value&&O())}return(0,t.watch)(()=>[i.effect,i.trigger,i.disabled,i.shineSpeed,i.shineDelay,i.shineInterval,i.shineDirection,i.shineAngle,i.shineColor,i.shineBaseColor],j,{flush:`post`}),(0,t.watch)(()=>[i.effect,i.trigger,i.disabled,i.jumpY,i.jumpStagger,i.jumpDuration,i.jumpEase,i.jumpReturnEase,i.jumpRepeatDelay],A,{flush:`post`}),(0,t.onMounted)(()=>{j(),A()}),(0,t.onUpdated)(A),(0,t.onUnmounted)(()=>{w(),S()}),(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{ref_key:`rootRef`,ref:a,class:(0,t.normalizeClass)(_.value),style:(0,t.normalizeStyle)(v.value),onMouseenter:M},[(0,t.createElementVNode)(`span`,{ref_key:`contentRef`,ref:o,class:`bing-animated-text__content`},[(0,t.renderSlot)(e.$slots,`default`,{},void 0,!0)],512)],38))}}),R=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},z=R(L,[[`__scopeId`,`data-v-dd82d488`]]),B=/^(auto|scroll|overlay)$/,V=[`button`,`input`,`select`,`textarea`,`video`,`audio`,`[contenteditable="true"]`,`[role="textbox"]`].join(`,`),H=Object.freeze({duration:400,stepSize:100,pulseScale:4,accelerationDelta:50,accelerationMax:3,keyboardStep:50,keyboard:!0,smoothTouchpad:!1,respectReducedMotion:!0}),U=Object.freeze({duration:280,stepSize:72,pulseScale:4,accelerationDelta:50,accelerationMax:2,keyboard:!1,smoothTouchpad:!1,respectReducedMotion:!0});function ee(e,t={},n={}){return e===!1?!1:{...t,...typeof e==`object`?e:{},...n}}function W(e,t,n){return Number.isFinite(e)?Math.max(n,e):t}function te(e){return{duration:W(e?.duration,H.duration,0),stepSize:W(e?.stepSize,H.stepSize,0),pulseScale:W(e?.pulseScale,H.pulseScale,.1),accelerationDelta:W(e?.accelerationDelta,H.accelerationDelta,0),accelerationMax:W(e?.accelerationMax,H.accelerationMax,1),keyboardStep:W(e?.keyboardStep,H.keyboardStep,0),keyboard:e?.keyboard??H.keyboard,smoothTouchpad:e?.smoothTouchpad??H.smoothTouchpad,respectReducedMotion:e?.respectReducedMotion??H.respectReducedMotion}}function ne(e,t){let n=e*t;if(n<1)return n-(1-Math.exp(-n));let r=Math.exp(-1);return r+(1-Math.exp(-(n-1)))*(1-r)}function re(e,t=H.pulseScale){if(e<=0)return 0;if(e>=1)return 1;let n=Math.max(.1,t);return ne(e,n)/ne(1,n)}function G(){return typeof window<`u`&&typeof document<`u`}function K(){return typeof performance<`u`&&typeof performance.now==`function`?performance.now():Date.now()}function q(e,t,n){return Math.min(n,Math.max(t,e))}function ie(e){return e===0?0:e>0?1:-1}function ae(e,t,n){if(n===0)return!1;if(t===`x`){let t=Math.max(0,e.scrollWidth-e.clientWidth);return t>0&&(n<0?e.scrollLeft>0:e.scrollLeft<t-.5)}let r=Math.max(0,e.scrollHeight-e.clientHeight);return r>0&&(n<0?e.scrollTop>0:e.scrollTop<r-.5)}function oe(e){let t=e.composedPath?.()[0]??e.target;return t instanceof Element?t:null}function se(e){if(e.parentElement)return e.parentElement;let t=e.getRootNode?.();return t&&`host`in t&&t.host instanceof Element?t.host:null}function ce(e,t,n,r){let i=oe(e);for(;i&&i!==t;){if(i instanceof HTMLElement){let e=n!==0&&ae(i,`x`,n),t=r!==0&&ae(i,`y`,r);if(!e&&!t){i=se(i);continue}let a=window.getComputedStyle(i),o=a.overflowX||i.style.overflowX||i.style.overflow,s=a.overflowY||i.style.overflowY||i.style.overflow,c=e&&B.test(o),l=t&&B.test(s);if(c||l)return!0}i=se(i)}return!1}function le(){return!!window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches}function ue(e,t,n){let r=e,i=e.deltaX||-Number(r.wheelDeltaX||0),a=e.deltaY||-Number(r.wheelDeltaY||0);return!i&&!a&&(a=-Number(r.wheelDelta||0)),e.deltaMode===WheelEvent.DOM_DELTA_LINE?(i*=40,a*=40):e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(i*=Math.max(1,t.clientWidth),a*=Math.max(1,t.clientHeight)),e.shiftKey&&n.horizontal&&Math.abs(a)>Math.abs(i)&&(i=a,a=0),n.horizontal||(i=0),n.vertical||(a=0),{x:i,y:a}}function de(e,t){return Math.abs(e)>1.2?t/120*e:e}function fe(e){let t=oe(e);return t instanceof HTMLElement&&!!t.closest(V)}function pe(e){let t=[],n,r=0,i=0,a=0,o=[],s=0,c=0;function l(){return te(e.getOptions?.())}function u(){return e.getAxes?.()??{horizontal:!0,vertical:!0}}function d(){return e.isEnabled?.()??!0}function f(){!G()||n===void 0||(window.cancelAnimationFrame(n),n=void 0)}function p(){f(),t=[],r=0,i=0,a=0,s=0,c=0}function m(e,t,n){if(t!==0||s!==0){let n=Math.max(0,e.scrollWidth-e.clientWidth),r=q(e.scrollLeft+t+s,0,n);e.scrollLeft=r,s=r-e.scrollLeft}if(n!==0||c!==0){let t=Math.max(0,e.scrollHeight-e.clientHeight),r=q(e.scrollTop+n+c,0,t);e.scrollTop=r,c=r-e.scrollTop}}function h(){n=void 0;let r=e.getElement();if(!r||!d()){p();return}let o=K(),l=0,u=0;if(t.forEach(e=>{let t=o-e.start,n=e.duration===0||t>=e.duration?1:re(t/e.duration,e.pulseScale),r=e.x*n,i=e.y*n;l+=r-e.lastX,u+=i-e.lastY,e.lastX=r,e.lastY=i}),t=t.filter(e=>o-e.start<e.duration),m(r,l,u),t.length>0){n=window.requestAnimationFrame(h);return}i=0,a=0,s=0,c=0}function g(){if(!(!G()||n!==void 0)){if(typeof window.requestAnimationFrame!=`function`){h();return}n=window.requestAnimationFrame(h)}}function _(n,o){let s=e.getElement();if(!s||!n&&!o)return!1;let c=l(),u=ie(n),d=ie(o);(u!==0&&i!==0&&u!==i||d!==0&&a!==0&&d!==a)&&p();let f=K(),h=r?f-r:1/0,_=1;c.accelerationDelta>0&&h<c.accelerationDelta&&(_=Math.min((1+c.accelerationDelta/Math.max(1,h))/2,c.accelerationMax));let v=n*_,y=o*_;return i=ie(v)||i,a=ie(y)||a,r=f,c.duration===0||!G()||typeof window.requestAnimationFrame!=`function`?(m(s,v,y),!0):(t.push({x:v,y,lastX:0,lastY:0,start:f,duration:c.duration,pulseScale:c.pulseScale}),g(),!0)}function v(e){return o.length===3&&o.every(t=>t%e===0)}function y(e){let t=Math.abs(e);if(!t)return!1;o.length===0&&(o=[t,t,t]),o.push(t),o.shift();let n=t>120&&v(t);return!v(120)&&!v(100)&&!n}function b(t){let n=e.getElement();if(!n)return null;let r=l(),i=ue(t,n,u()),a=Math.abs(i.y)>=Math.abs(i.x)?i.y:i.x;if(!r.smoothTouchpad&&y(a))return null;let o=de(i.x,r.stepSize),s=de(i.y,r.stepSize);return o&&!ae(n,`x`,o)&&(o=0),s&&!ae(n,`y`,s)&&(s=0),!o&&!s||ce(t,n,o,s)?null:{x:o,y:s}}function x(e){if(!G()||!d()||e.defaultPrevented||e.ctrlKey||l().respectReducedMotion&&le())return!1;let t=b(e);return t?(e.preventDefault(),_(t.x,t.y)):(e.defaultPrevented||p(),!1)}function S(t){let n=e.getElement(),r=l();if(!G()||!n||!d()||!r.keyboard||t.defaultPrevented||t.ctrlKey||t.altKey||t.metaKey||t.shiftKey&&t.key!==` `||fe(t)||r.respectReducedMotion&&le())return!1;let i=u(),a=0,o=0;switch(t.key){case`ArrowUp`:o=i.vertical?-r.keyboardStep:0;break;case`ArrowDown`:o=i.vertical?r.keyboardStep:0;break;case`ArrowLeft`:a=i.horizontal?-r.keyboardStep:0;break;case`ArrowRight`:a=i.horizontal?r.keyboardStep:0;break;case`PageUp`:o=i.vertical?-n.clientHeight*.9:0;break;case`PageDown`:case` `:o=i.vertical?n.clientHeight*(t.shiftKey?-.9:.9):0;break;case`Home`:o=i.vertical?-n.scrollTop:0,a=!i.vertical&&i.horizontal?-n.scrollLeft:0;break;case`End`:o=i.vertical?Math.max(0,n.scrollHeight-n.clientHeight-n.scrollTop):0,a=!i.vertical&&i.horizontal?Math.max(0,n.scrollWidth-n.clientWidth-n.scrollLeft):0;break;default:return!1}return a&&!ae(n,`x`,a)&&(a=0),o&&!ae(n,`y`,o)&&(o=0),!a&&!o?!1:(t.preventDefault(),_(a,o))}return{cancel:p,handleKeydown:S,handleWheel:x,isAnimating:()=>n!==void 0||t.length>0}}var me={duration:{fast:.18,normal:.32,slow:.62},ease:{smooth:`power3.out`,press:`back.out(2.2)`,glide:`expo.out`}};function he(){return typeof window<`u`}function J(){return he()&&typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}var ge=[`aria-label`],_e=[`aria-selected`,`aria-disabled`,`aria-label`,`disabled`,`tabindex`,`onClick`,`onKeydown`,`onFocus`,`onBlur`],ve={class:`bing-tabs__tab-surface`},ye={class:`bing-tabs__tab-content`},be=R((0,t.defineComponent)({__name:`BingTabs`,props:{modelValue:{default:void 0},items:{default:()=>[]},size:{default:`md`},variant:{default:`pill`},activation:{default:`auto`},disabled:{type:Boolean,default:!1},block:{type:Boolean,default:!1},loop:{type:Boolean,default:!0},animated:{type:Boolean,default:!0},respectReducedMotion:{type:Boolean,default:!0},smoothScroll:{type:[Boolean,Object],default:!0},ariaLabel:{default:`Tabs`}},emits:[`update:modelValue`,`change`,`focus`,`blur`],setup(e,{emit:r}){let i=e,a=r,o=(0,t.ref)(null),s=(0,t.ref)(null),c=(0,t.ref)([]),l=(0,t.ref)(void 0),u=(0,t.ref)(-1),d=(0,t.ref)(!1),f,p,m=0,h,g=(0,t.computed)(()=>i.modelValue!==void 0),_=(0,t.computed)(()=>i.items.filter(e=>!e.disabled)),v=(0,t.computed)(()=>_.value[0]),y=(0,t.computed)(()=>g.value?i.modelValue:l.value??v.value?.value),b=(0,t.computed)(()=>i.items.findIndex(e=>Object.is(e.value,y.value))),x=(0,t.computed)(()=>[`bing-tabs`,`bing-tabs--${i.variant}`,`bing-tabs--${i.size}`,{"is-block":i.block,"is-disabled":i.disabled,"is-indicator-ready":d.value}]),S=(0,t.computed)(()=>ee(i.smoothScroll,U,{keyboard:!1,smoothTouchpad:!1,respectReducedMotion:!0}));function C(){return typeof window<`u`}function w(){return!i.animated||i.respectReducedMotion&&C()&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function T(e,t){let n=t===`left`?`borderLeftWidth`:`borderTopWidth`,r=Number.parseFloat(window.getComputedStyle(e)[n]);return Number.isFinite(r)?r:t===`left`?e.clientLeft:e.clientTop}function E(e){return i.disabled||!!e.disabled}function D(e,t){e instanceof HTMLButtonElement&&(c.value[t]=e)}function O(e){return e.querySelector(`.bing-tabs__tab-surface`)??e}function k(e){return E(i.items[e])?-1:u.value>=0?u.value===e?0:-1:b.value===e?0:-1}function A(e,t){let n=i.items.length;if(n===0)return-1;let r=e;for(let e=0;e<n;e+=1){if(r+=t,i.loop)r=(r+n)%n;else if(r<0||r>=n)return-1;let e=i.items[r];if(e&&!E(e))return r}return-1}function j(e){let t=(e===`first`?i.items:[...i.items].reverse()).findIndex(e=>!E(e));return t<0?-1:e===`first`?t:i.items.length-1-t}function M(e){return i.items.find(t=>Object.is(t.value,e))}function N(){return C()&&!!o.value?.contains(document.activeElement)}function P(e=!1){if(i.activation!==`auto`||b.value<0)return;let t=i.items[b.value];!t||E(t)||(u.value=b.value,e&&N()&&L(b.value))}function F(e,t){if(E(e)){t.preventDefault();return}let n=y.value;if(Object.is(n,e.value))return;g.value||(l.value=e.value);let r={value:e.value,previousValue:n,item:e,previousItem:M(n),event:t};a(`update:modelValue`,e.value),a(`change`,r)}function I(e,t,n){u.value=t,F(e,n)}function L(e){let t=c.value[e];t&&(h?.cancel(),u.value=e,t.focus())}function R(e,n){let r=i.items[e];!r||E(r)||(n.preventDefault(),L(e),i.activation===`auto`&&(F(r,n),(0,t.nextTick)().then(()=>{Object.is(y.value,r.value)||P(!0)})))}function z(e,t){if(t.key===`ArrowRight`||t.key===`ArrowDown`){R(A(e,1),t);return}if(t.key===`ArrowLeft`||t.key===`ArrowUp`){R(A(e,-1),t);return}if(t.key===`Home`){R(j(`first`),t);return}if(t.key===`End`){R(j(`last`),t);return}if(t.key===`Enter`||t.key===` `){let n=i.items[e];if(!n)return;t.preventDefault(),F(n,t)}}function B(e,t,n){h?.cancel(),u.value=t,a(`focus`,{value:e.value,item:e,event:n})}function V(e,t){o.value?.contains(t.relatedTarget)||(u.value=-1),a(`blur`,{value:e.value,item:e,event:t})}function H(e){if((h?.handleWheel(e)??!1)||e.defaultPrevented||!o.value)return;let t=e.deltaX||(e.shiftKey?e.deltaY:0),n=Math.max(0,o.value.scrollWidth-o.value.clientWidth);n>.5&&(t<0?o.value.scrollLeft>.5:t>0&&o.value.scrollLeft<n-.5)&&e.stopPropagation()}function W(e=!0){C()&&(m&&window.cancelAnimationFrame(m),m=window.requestAnimationFrame(()=>{m=0,te(e)}))}function te(e=!0){let t=o.value,r=s.value,i=c.value[b.value];if(!t||!r||!i||b.value<0){r&&n.gsap.set(r,{autoAlpha:0}),d.value=!1;return}let a=t.getBoundingClientRect(),l=O(i).getBoundingClientRect(),u=r.getBoundingClientRect(),p=T(t,`left`),m=T(t,`top`),h=Math.max(1,l.width),g=Math.max(1,l.height),_=l.left-a.left-p,v=l.top-a.top-m,y=d.value&&u.width>0&&u.height>0,x=y?u.left-a.left-p:_,S=y?u.top-a.top-m:v,C=y?u.width/h:1,E=y?u.height/g:1,D=e&&y&&!w();f?.kill(),n.gsap.set(r,{width:h,height:g,transformOrigin:`0 0`,willChange:`transform, opacity`}),D?f=n.gsap.fromTo(r,{x,y:S,scaleX:C,scaleY:E,autoAlpha:1},{x:_,y:v,scaleX:1,scaleY:1,autoAlpha:1,duration:.42,ease:`power3.out`,overwrite:`auto`,force3D:!0,onComplete:()=>{f=void 0}}):n.gsap.set(r,{x:_,y:v,scaleX:1,scaleY:1,autoAlpha:1,force3D:!0}),d.value=!0}return(0,t.onBeforeUpdate)(()=>{c.value=[]}),(0,t.onMounted)(()=>{h=pe({getElement:()=>o.value,getOptions:()=>{let e=S.value;return e===!1?void 0:e},getAxes:()=>({horizontal:!0,vertical:!1}),isEnabled:()=>S.value!==!1}),(0,t.nextTick)().then(()=>{te(!1)}),typeof ResizeObserver<`u`&&o.value&&(p=new ResizeObserver(()=>{W(!1)}),p.observe(o.value))}),(0,t.onBeforeUnmount)(()=>{f?.kill(),h?.cancel(),h=void 0,m&&C()&&window.cancelAnimationFrame(m),p?.disconnect()}),(0,t.watch)(()=>i.smoothScroll,()=>{h?.cancel()},{deep:!0}),(0,t.watch)(()=>[y.value,i.items.length,i.size,i.variant,i.block],()=>{(0,t.nextTick)().then(()=>{te(!0)})}),(0,t.watch)(b,()=>{u.value<0||!N()||(0,t.nextTick)().then(()=>{P(!0)})}),(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{ref_key:`rootRef`,ref:o,class:(0,t.normalizeClass)(x.value),role:`tablist`,"aria-orientation":`horizontal`,"aria-label":e.ariaLabel,onWheel:H},[(0,t.createElementVNode)(`span`,{ref_key:`indicatorRef`,ref:s,class:`bing-tabs__indicator`,"aria-hidden":`true`},null,512),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.items,(e,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`button`,{key:String(e.value),ref_for:!0,ref:e=>D(e,r),class:(0,t.normalizeClass)([`bing-tabs__tab`,{"is-active":Object.is(e.value,y.value),"is-disabled":E(e)}]),type:`button`,role:`tab`,"aria-selected":Object.is(e.value,y.value),"aria-disabled":E(e)||void 0,"aria-label":e.ariaLabel,disabled:E(e),tabindex:k(r),onClick:t=>I(e,r,t),onKeydown:e=>z(r,e),onFocus:t=>B(e,r,t),onBlur:t=>V(e,t)},[(0,t.createElementVNode)(`span`,ve,[(0,t.createElementVNode)(`span`,ye,[(0,t.renderSlot)(n.$slots,`item`,{item:e,active:Object.is(e.value,y.value),disabled:E(e)},()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.label),1)],!0)])])],42,_e))),128))],42,ge))}}),[[`__scopeId`,`data-v-32add4b3`]]),xe=[`aria-hidden`],Se=R((0,t.defineComponent)({__name:`BingAppSwitcherTransition`,props:{modelValue:{default:void 0},items:{default:()=>[]},disabled:{type:Boolean,default:!1},respectReducedMotion:{type:Boolean,default:!0},loop:{type:Boolean,default:!0},showTabs:{type:Boolean,default:!0},ariaLabel:{default:`App switcher transition panels`}},emits:[`update:modelValue`,`change`],setup(e,{emit:r}){let i=e,a=r,o=(0,t.ref)([]),s=(0,t.ref)(null),c=(0,t.ref)(!1),l=(0,t.ref)(void 0),u,d=0,f,p,m=(0,t.computed)(()=>i.items.filter(e=>!e.disabled)),h=(0,t.computed)(()=>m.value[0]),g=(0,t.computed)(()=>i.modelValue!==void 0),_=(0,t.computed)(()=>g.value?i.modelValue:l.value??h.value?.value),v=(0,t.computed)(()=>{let e=i.items.findIndex(e=>Object.is(e.value,_.value));return e>=0?e:0}),y=(0,t.computed)(()=>i.items.map(e=>({...e,value:e.value,label:e.label,disabled:i.disabled||e.disabled})));function b(){return typeof window<`u`}function x(){return i.disabled||i.respectReducedMotion&&J()}function S(e){let t=i.items.length;return t===0?0:i.loop?(e+t)%t:Math.min(Math.max(e,0),t-1)}function C(e,t){let n=e-t,r=i.items.length;return r===0?0:(n>r/2&&(n-=r),n<r/-2&&(n+=r),n)}function w(e,t,n=t){let r=C(e,t),i=Math.abs(r),a=e===n;return{xPercent:r*58,y:30+i*3,scale:a?.68:.6,rotation:r*-1.4,opacity:a?.98:Math.max(.46,.66-i*.1),zIndex:a?18:10-i,force3D:!0}}function T(e,t){let n=C(e,t),r=Math.abs(n);return{xPercent:n*116,y:r===0?0:22,scale:r===0?1:.78,rotation:n*-1.4,opacity:+(r===0),zIndex:r===0?24:5-r,force3D:!0}}function E(e,t){e instanceof HTMLElement&&(o.value[t]=e)}function D(e){let t=i.items[e];if(!t||i.disabled||t.disabled||Object.is(t.value,_.value))return!1;let n=_.value,r=i.items.find(e=>Object.is(e.value,n));return p=t.value,g.value||(l.value=t.value),a(`update:modelValue`,t.value),a(`change`,{value:t.value,previousValue:n,item:t,previousItem:r}),!0}function O(e=v.value,t=!1){let r=t||x()?0:.32;u?.kill(),u=n.gsap.timeline({defaults:{duration:r,ease:`power3.out`,overwrite:`auto`},onStart:()=>{c.value=!0},onComplete:()=>{c.value=!1,u=void 0},onInterrupt:()=>{c.value=!1}}),o.value.forEach((t,n)=>{u?.to(t,T(n,e),0)})}function k(e,t){let r=C(e,t)>=0?1:-1;if(x()){O(e,!0);return}u?.kill(),c.value=!0,u=n.gsap.timeline({defaults:{overwrite:`auto`},onComplete:()=>{c.value=!1,u=void 0},onInterrupt:()=>{c.value=!1}}),s.value&&u.to(s.value,{x:r*-10,scale:.996,duration:.16,ease:`power2.out`,force3D:!0},0).to(s.value,{x:0,scale:1,duration:.5,ease:`expo.out`,force3D:!0},.18),o.value.forEach((e,n)=>{u?.to(e,{...w(n,t,t),duration:.2,ease:`power3.out`},0)}),o.value.forEach((t,n)=>{u?.to(t,{...w(n,e,e),duration:.34,ease:`power3.inOut`},.1)}),o.value.forEach((t,n)=>{let r=T(n,e),i=n===e;u?.to(t,{...r,duration:i?.48:.32,ease:i?`expo.out`:`power3.out`},i?.3:.34)})}function A(e){let t=S(e),n=v.value;t===v.value||c.value||!D(t)||k(t,n)}function j(e){A(i.items.findIndex(t=>Object.is(t.value,e)))}function M(e){e.defaultPrevented||i.disabled||Math.abs(e.deltaX)<=Math.abs(e.deltaY)||(e.preventDefault(),!(c.value||!b())&&(d+=e.deltaX,f&&window.clearTimeout(f),f=window.setTimeout(()=>{let e=d>0?1:-1,t=Math.abs(d)>34;d=0,f=void 0,t&&A(v.value+e)},58)))}return(0,t.onBeforeUpdate)(()=>{o.value=[]}),(0,t.onMounted)(()=>{(0,t.nextTick)().then(()=>{o.value.forEach(e=>{n.gsap.set(e,{transformOrigin:`50% 50%`,willChange:`transform, opacity`,force3D:!0})}),O(v.value,!0)})}),(0,t.onBeforeUnmount)(()=>{u?.kill(),n.gsap.killTweensOf(o.value),s.value&&n.gsap.killTweensOf(s.value),f&&b()&&window.clearTimeout(f)}),(0,t.watch)(_,(e,n)=>{if(e===void 0)return;if(Object.is(e,p)){p=void 0;return}let r=i.items.findIndex(t=>Object.is(t.value,e));if(r<0)return;let a=i.items.findIndex(e=>Object.is(e.value,n));(0,t.nextTick)().then(()=>{if(a<0){O(r,!0);return}k(r,a)})}),(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`section`,{class:(0,t.normalizeClass)([`bing-app-switcher-transition`,{"is-disabled":e.disabled}]),onWheel:M},[(0,t.createElementVNode)(`div`,{ref_key:`stageRef`,ref:s,class:`bing-app-switcher-transition__stage`},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.items,(e,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`article`,{key:String(e.value),ref_for:!0,ref:e=>E(e,r),class:(0,t.normalizeClass)([`bing-app-switcher-transition__card`,{"is-active":Object.is(_.value,e.value)}]),"aria-hidden":!Object.is(_.value,e.value)},[(0,t.renderSlot)(n.$slots,`default`,{item:e,index:r,active:Object.is(_.value,e.value),isAnimating:c.value},()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.label),1)],!0)],10,xe))),128))],512),e.showTabs?((0,t.openBlock)(),(0,t.createBlock)(be,{key:0,items:y.value,"model-value":_.value,variant:`glass`,size:`md`,block:``,disabled:e.disabled,loop:e.loop,"respect-reduced-motion":e.respectReducedMotion,"aria-label":e.ariaLabel,"onUpdate:modelValue":j},null,8,[`items`,`model-value`,`disabled`,`loop`,`respect-reduced-motion`,`aria-label`])):(0,t.createCommentVNode)(``,!0)],34))}}),[[`__scopeId`,`data-v-1a57e0a4`]]),Ce=[`type`,`disabled`,`aria-busy`,`aria-label`],we={class:`bing-button__content`},Te={class:`bing-button__resting-content`},Ee={key:0,class:`bing-button__icon bing-button__icon--prefix`},Y={key:1,class:`bing-button__label`},De={key:2,class:`bing-button__icon bing-button__icon--suffix`},Oe=R((0,t.defineComponent)({__name:`BingButton`,props:{variant:{default:`primary`},size:{default:`md`},rounded:{default:`md`},htmlType:{default:`button`},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},block:{type:Boolean,default:!1},throttle:{type:Boolean,default:!0},throttleDelay:{default:600},textEffect:{},textEffectTrigger:{},textShine:{},shineColor:{default:void 0},shineBaseColor:{default:void 0},shineSpeed:{default:3},shineDelay:{default:0},shineInterval:{default:1.6},shineDirection:{default:`left`},shineAngle:{default:120},textJumpY:{default:-6},textJumpStagger:{default:.035},textJumpDuration:{default:.34},textJumpEase:{default:`power2.out`},textJumpReturnEase:{default:`back.out(2.4)`},textJumpRepeatDelay:{default:1.2},ariaLabel:{default:void 0}},emits:[`click`,`throttled`,`focus`,`blur`],setup(e,{emit:n}){let r=e,i=n,a=(0,t.useSlots)(),o=(0,t.ref)(0),s=(0,t.computed)(()=>r.disabled||r.loading),c=(0,t.computed)(()=>Math.max(0,r.throttleDelay)),l=(0,t.computed)(()=>!!a.default),u=(0,t.computed)(()=>!!a.prefix),d=(0,t.computed)(()=>!!a.suffix),f=(0,t.computed)(()=>r.textShine??(r.variant===`primary`?`always`:`none`)),p=(0,t.computed)(()=>r.textEffect?r.textEffect:f.value===`none`?`none`:`shine`),m=(0,t.computed)(()=>r.textEffectTrigger?r.textEffectTrigger:p.value===`jump`||f.value===`hover`?`hover`:`always`),h=(0,t.computed)(()=>p.value===`shine`),g=(0,t.computed)(()=>p.value!==`none`),_=(0,t.computed)(()=>[`bing-button`,`bing-button--${r.variant}`,`bing-button--${r.size}`,`bing-button--rounded-${r.rounded}`,{"is-block":r.block,"is-disabled":r.disabled,"is-loading":r.loading,"is-icon-only":!l.value&&(u.value||d.value),[`bing-button--text-${p.value}`]:g.value,[`bing-button--text-trigger-${m.value}`]:g.value,[`bing-button--shine-${m.value}`]:h.value,[`bing-button--shine-direction-${r.shineDirection}`]:h.value}]),v=(0,t.computed)(()=>{let e={};return h.value?(e[`--animated-text-shine-angle`]=`${r.shineAngle}deg`,r.shineColor&&(e[`--animated-text-shine-color`]=r.shineColor),r.shineBaseColor&&(e[`--animated-text-shine-base-color`]=r.shineBaseColor),e):e});function y(e){if(s.value){e.preventDefault();return}let t=Date.now(),n=c.value,a=t-o.value;if(r.throttle&&n>0&&o.value>0&&a<n){e.preventDefault(),i(`throttled`,{event:e,remaining:n-a});return}o.value=t,i(`click`,e)}function b(e){i(`focus`,e)}function x(e){i(`blur`,e)}return(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`button`,{type:e.htmlType,class:(0,t.normalizeClass)(_.value),style:(0,t.normalizeStyle)(v.value),disabled:s.value,"aria-busy":e.loading||void 0,"aria-label":e.ariaLabel,onClick:y,onFocus:b,onBlur:x},[(0,t.createElementVNode)(`span`,we,[r[0]||=(0,t.createElementVNode)(`span`,{class:`bing-button__loading-indicator`,"aria-hidden":`true`},[(0,t.createElementVNode)(`span`,{class:`bing-button__spinner`})],-1),(0,t.createElementVNode)(`span`,Te,[u.value?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,Ee,[(0,t.renderSlot)(n.$slots,`prefix`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0),l.value?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,Y,[(0,t.createVNode)(z,{class:`bing-button__animated-text`,effect:p.value,trigger:m.value,disabled:s.value,"shine-speed":e.shineSpeed,"shine-delay":e.shineDelay,"shine-interval":e.shineInterval,"shine-direction":e.shineDirection,"shine-angle":e.shineAngle,"jump-y":e.textJumpY,"jump-stagger":e.textJumpStagger,"jump-duration":e.textJumpDuration,"jump-ease":e.textJumpEase,"jump-return-ease":e.textJumpReturnEase,"jump-repeat-delay":e.textJumpRepeatDelay},{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(n.$slots,`default`,{},void 0,!0)]),_:3},8,[`effect`,`trigger`,`disabled`,`shine-speed`,`shine-delay`,`shine-interval`,`shine-direction`,`shine-angle`,`jump-y`,`jump-stagger`,`jump-duration`,`jump-ease`,`jump-return-ease`,`jump-repeat-delay`])])):(0,t.createCommentVNode)(``,!0),d.value?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,De,[(0,t.renderSlot)(n.$slots,`suffix`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0)])])],46,Ce))}}),[[`__scopeId`,`data-v-713ef556`]]),X={glass:!0,glassBlur:16,glassOpacity:.85,glassSaturation:1.28};function ke(e,t,n){return Math.min(n,Math.max(t,e))}function Ae(e){if(typeof e==`number`)return`${Math.max(0,e)}px`;let t=e.trim();return/^-?\d+(\.\d+)?$/.test(t)?`${Math.max(0,Number(t))}px`:e}function je(e,t){let n=t.glass!==!1,r=n?Ae(t.glassBlur??X.glassBlur):`0px`,i=n?ke(t.glassOpacity??X.glassOpacity,0,1):.96,a=n?Math.max(0,t.glassSaturation??X.glassSaturation):1;return{[`--${e}-glass-blur`]:r,[`--${e}-glass-opacity`]:String(i),[`--${e}-glass-saturation`]:String(a)}}var Me={class:`bing-card__face bing-card__front`},Ne={key:1,class:`bing-card__media`},Pe={class:`bing-card__content`},Fe={key:0,class:`bing-card__header`},Ie={class:`bing-card__heading`},Le={key:0,class:`bing-card__title`},Re={key:1,class:`bing-card__description`},ze={key:1,class:`bing-card__body`},Be={key:2,class:`bing-card__footer`},Ve={class:`bing-card__face bing-card__back`,"aria-hidden":`true`},He=10,Ue=R((0,t.defineComponent)({__name:`BingCard`,props:{title:{default:void 0},description:{default:void 0},variant:{default:`soft`},padding:{default:`md`},rounded:{default:`md`},glass:{type:Boolean,default:!0},interactive:{type:Boolean,default:!0},tilt:{type:Boolean,default:!0},tiltMax:{default:8},tiltScale:{default:1.015},glare:{type:Boolean,default:!0},entrance:{default:`fade-up`},entranceOnce:{type:Boolean,default:!0},entranceDelay:{default:0},entranceDuration:{default:.72},flipAxis:{default:`x`},flipTurns:{default:2.5},flipEase:{default:`power4.out`},flipTrigger:{default:`press`},longPressDelay:{default:560},longPressRelease:{default:`restore`},disabled:{type:Boolean,default:!1},glassBlur:{default:X.glassBlur},glassOpacity:{default:X.glassOpacity},glassSaturation:{default:X.glassSaturation}},emits:[`enter`,`long-press`,`flip`],setup(e,{emit:r}){let i=e,a=r,o=(0,t.ref)(null),s=(0,t.ref)(null),c=(0,t.ref)(null),l=(0,t.ref)(null),u=(0,t.ref)(null),d=(0,t.ref)(!1),f=(0,t.ref)(!1),p=(0,t.ref)(!1),m,h,g,_,v,y=!1,b=!1,x=0,S=0,C=!1,w=(0,t.computed)(()=>i.flipAxis===`z`?`y`:i.flipAxis),T=(0,t.computed)(()=>i.disabled?`none`:i.flipTrigger),E=(0,t.computed)(()=>[`bing-card`,`bing-card--${i.variant}`,`bing-card--padding-${i.padding}`,`bing-card--rounded-${i.rounded}`,`bing-card--back-axis-${w.value}`,{"is-glass":i.glass,"is-interactive":i.interactive,"is-tilt":i.tilt,"is-glare":i.glare,"is-flipped":f.value,"is-pressing":p.value,"is-long-press-enabled":T.value===`press`,"is-click-flip-enabled":T.value===`click`,"is-disabled":i.disabled,"has-entered":d.value}]),D=(0,t.computed)(()=>({...je(`bing-card`,{glass:i.glass,glassBlur:i.glassBlur,glassOpacity:i.glassOpacity,glassSaturation:i.glassSaturation}),"--bing-card-tilt-max":`${i.tiltMax}deg`})),O=(0,t.computed)(()=>!!(i.title||i.description));function k(){return typeof window<`u`&&typeof document<`u`}function A(){return k()&&typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function j(e,t,n){return Math.min(n,Math.max(t,e))}function M(e){return e===`x`?`rotationX`:e===`y`?`rotationY`:`rotation`}function N(){return{rotationX:0,rotationY:0,rotation:0,[M(w.value)]:f.value?180:0}}function P(e,t){return f.value?w.value===`x`?{rotationX:180+e,rotationY:t,rotation:0}:{rotationX:e,rotationY:180+t,rotation:0}:{rotationX:e,rotationY:t,rotation:0}}function F(){return i.interactive&&i.tilt&&!i.disabled&&!A()&&!b&&!y&&s.value}function I(e){if(W(e),!F())return;let t=o.value,r=s.value;if(!t||!r)return;let a=t.getBoundingClientRect();if(a.width===0||a.height===0)return;let l=j((e.clientX-a.left)/a.width,0,1),u=j((e.clientY-a.top)/a.height,0,1),d=Math.max(0,i.tiltMax),f=(l-.5)*d*2,p=(.5-u)*d*2;n.gsap.to(r,{...P(p,f),scale:Math.max(1,i.tiltScale),transformPerspective:900,transformOrigin:`50% 50%`,duration:.34,ease:`power3.out`,overwrite:!0,force3D:!0}),i.glare&&c.value&&n.gsap.to(c.value,{"--bing-card-glare-x":`${l*100}%`,"--bing-card-glare-y":`${u*100}%`,opacity:1,duration:.24,ease:`power2.out`,overwrite:!0})}function L(){if(b)return;let e=s.value;e&&n.gsap.to(e,{...N(),scale:1,duration:.48,ease:`elastic.out(1, 0.72)`,overwrite:!0,force3D:!0}),c.value&&n.gsap.to(c.value,{opacity:0,duration:.26,ease:`power2.out`,overwrite:!0})}function R(){let e=M(i.flipAxis),t=-360*Math.max(1,i.flipTurns);return{from:{autoAlpha:0,y:34,z:i.flipAxis===`z`?0:-120,[e]:t,scale:.96,transformPerspective:900,transformOrigin:`50% 50%`},to:{autoAlpha:1,y:0,z:0,rotationX:0,rotationY:0,rotation:0,scale:1,ease:i.flipEase}}}function z(){switch(i.entrance){case`bubble`:return{from:{autoAlpha:0,y:18,scale:.78},to:{autoAlpha:1,y:0,scale:1,ease:`elastic.out(1, 0.64)`}};case`rotate-up`:return R();case`soft-pop`:return{from:{autoAlpha:0,y:10,scale:.92,filter:`blur(10px)`},to:{autoAlpha:1,y:0,scale:1,filter:`blur(0px)`,ease:`power3.out`}};default:return{from:{autoAlpha:0,y:26,scale:.98},to:{autoAlpha:1,y:0,scale:1,ease:`power3.out`}}}}function B(){g?.kill(),g=void 0,p.value=!1,l.value&&(n.gsap.killTweensOf(l.value),n.gsap.set(l.value,{"--bing-card-press-progress":0,"--bing-card-press-ring-scale":.78,autoAlpha:0})),u.value&&(n.gsap.killTweensOf(u.value),n.gsap.set(u.value,{autoAlpha:0,scale:.98}))}function V(){p.value=!1,l.value&&(n.gsap.killTweensOf(l.value),n.gsap.timeline().to(l.value,{"--bing-card-press-ring-scale":.96,autoAlpha:.82,duration:.1,ease:`power2.out`}).to(l.value,{"--bing-card-press-ring-scale":1.08,autoAlpha:0,duration:.38,ease:`power3.out`},.06)),u.value&&(n.gsap.killTweensOf(u.value),n.gsap.timeline().to(u.value,{autoAlpha:.18,scale:1,duration:.1,ease:`power2.out`}).to(u.value,{autoAlpha:0,scale:1.015,duration:.38,ease:`power3.out`},.06))}function H(e=!f.value){let t=s.value;if(!t||i.disabled||b||f.value===e)return;f.value=e;let r=n.gsap.to(t,{...N(),scale:1,transformPerspective:900,transformOrigin:`50% 50%`,duration:.68,ease:`power3.inOut`,overwrite:!0,force3D:!0,onComplete:()=>{_===r&&(y=!1)},onInterrupt:()=>{_===r&&(y=!1)}});_=r,y=!0,a(`flip`,e?`back`:`front`)}function U(e){if(!k()||T.value!==`press`||b||e.button!==0)return;B(),C=!1,x=e.clientX,S=e.clientY,p.value=!0;let t=o.value?.getBoundingClientRect(),r=t&&t.width>0?`${j((e.clientX-t.left)/t.width*100,0,100)}%`:`50%`,s=t&&t.height>0?`${j((e.clientY-t.top)/t.height*100,0,100)}%`:`50%`;try{e.currentTarget?.setPointerCapture?.(e.pointerId)}catch{}l.value&&(n.gsap.set(l.value,{"--bing-card-press-progress":0,"--bing-card-press-x":r,"--bing-card-press-y":s,"--bing-card-press-ring-scale":.78,autoAlpha:1}),g=n.gsap.to(l.value,{"--bing-card-press-progress":1,"--bing-card-press-ring-scale":.98,duration:Math.max(120,i.longPressDelay)/1e3,ease:`none`,overwrite:!0,onComplete:()=>{if(g=void 0,C=!0,a(`long-press`),V(),i.longPressRelease===`restore`){H(!0);return}H()}})),u.value&&n.gsap.fromTo(u.value,{autoAlpha:0,scale:.98},{autoAlpha:1,scale:1,duration:Math.min(.24,Math.max(120,i.longPressDelay)/2e3),ease:`power2.out`,overwrite:!0})}function ee(){T.value!==`click`||b||H()}function W(e){if(!g)return;let t=e.clientX-x,n=e.clientY-S;Math.hypot(t,n)>He&&B()}function te(){B(),C&&i.longPressRelease===`restore`&&H(!1),C=!1}function ne(){C||B(),!y&&L()}function re(){let e=o.value,t=s.value;if(!e||!t||i.disabled||d.value&&i.entranceOnce)return;if(d.value=!0,e.classList.add(`has-entered`),a(`enter`),v?.kill(),v=void 0,b=!1,m?.revert(),m=void 0,i.entrance===`none`||A()){n.gsap.set(t,{autoAlpha:1,clearProps:`transform,filter`});return}let r=z();m=n.gsap.context(()=>{let e=n.gsap.fromTo(t,r.from,{...r.to,duration:Math.max(.1,i.entranceDuration),delay:Math.max(0,i.entranceDelay),clearProps:`filter`,onComplete:()=>{v===e&&(v=void 0,b=!1)},onInterrupt:()=>{v===e&&(v=void 0,b=!1)}});v=e,b=!0},e)}function G(){if(h?.disconnect(),h=void 0,!k()){re();return}if(i.entrance===`none`||A()){re();return}if(!(`IntersectionObserver`in window)){re();return}let e=o.value;e&&(h=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&(re(),i.entranceOnce&&(h?.disconnect(),h=void 0))},{threshold:.18,rootMargin:`0px 0px -8% 0px`}),h.observe(e))}return(0,t.watch)(()=>[i.entrance,i.entranceOnce,i.entranceDelay,i.entranceDuration,i.flipAxis,i.flipTurns,i.flipEase,i.flipTrigger,i.disabled],()=>{B(),d.value=!1,(0,t.nextTick)(G)},{flush:`post`}),(0,t.onMounted)(()=>{(0,t.nextTick)(G)}),(0,t.onBeforeUnmount)(()=>{B(),v?.kill(),v=void 0,b=!1,_?.kill(),_=void 0,y=!1,h?.disconnect(),h=void 0,m?.revert(),m=void 0,n.gsap.killTweensOf([s.value,c.value,l.value,u.value].filter(Boolean))}),(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`article`,{ref_key:`rootRef`,ref:o,class:(0,t.normalizeClass)(E.value),style:(0,t.normalizeStyle)(D.value),onPointerdown:U,onPointermove:I,onPointerup:te,onPointerleave:ne,onPointercancel:te,onLostpointercapture:te,onClick:ee},[(0,t.createElementVNode)(`div`,{ref_key:`surfaceRef`,ref:s,class:`bing-card__surface`},[(0,t.createElementVNode)(`div`,Me,[e.glare?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,ref_key:`glareRef`,ref:c,class:`bing-card__glare`,"aria-hidden":`true`},null,512)):(0,t.createCommentVNode)(``,!0),n.$slots.media?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,Ne,[(0,t.renderSlot)(n.$slots,`media`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`div`,Pe,[n.$slots.header||O.value?((0,t.openBlock)(),(0,t.createElementBlock)(`header`,Fe,[(0,t.renderSlot)(n.$slots,`header`,{},()=>[(0,t.createElementVNode)(`div`,Ie,[e.title?((0,t.openBlock)(),(0,t.createElementBlock)(`h3`,Le,(0,t.toDisplayString)(e.title),1)):(0,t.createCommentVNode)(``,!0),e.description?((0,t.openBlock)(),(0,t.createElementBlock)(`p`,Re,(0,t.toDisplayString)(e.description),1)):(0,t.createCommentVNode)(``,!0)])],!0)])):(0,t.createCommentVNode)(``,!0),n.$slots.default?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,ze,[(0,t.renderSlot)(n.$slots,`default`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0),n.$slots.footer?((0,t.openBlock)(),(0,t.createElementBlock)(`footer`,Be,[(0,t.renderSlot)(n.$slots,`footer`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0)])]),(0,t.createElementVNode)(`div`,Ve,[(0,t.renderSlot)(n.$slots,`back`,{},()=>[r[0]||=(0,t.createElementVNode)(`div`,{class:`bing-card__back-mark`},`Bing UI`,-1),r[1]||=(0,t.createElementVNode)(`div`,{class:`bing-card__back-text`},`Interactive surface`,-1)],!0)]),T.value===`press`?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,ref_key:`pressAmbienceRef`,ref:u,class:`bing-card__press-ambience`,"aria-hidden":`true`},null,512)):(0,t.createCommentVNode)(``,!0),T.value===`press`?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:1,ref_key:`pressFeedbackRef`,ref:l,class:`bing-card__press-feedback`,"aria-hidden":`true`},null,512)):(0,t.createCommentVNode)(``,!0)],512)],38))}}),[[`__scopeId`,`data-v-31bf117f`]]),We=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Ge=e=>e===``,Ke=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),qe=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),Je=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),Ye=e=>{let t=Je(e);return t.charAt(0).toUpperCase()+t.slice(1)},Xe={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`},Ze=({name:e,iconNode:n,absoluteStrokeWidth:r,"absolute-stroke-width":i,strokeWidth:a,"stroke-width":o,size:s=Xe.width,color:c=Xe.stroke,...l},{slots:u})=>(0,t.h)(`svg`,{...Xe,...l,width:s,height:s,stroke:c,"stroke-width":Ge(r)||Ge(i)||r===!0||i===!0?Number(a||o||Xe[`stroke-width`])*24/Number(s):a||o||Xe[`stroke-width`],class:Ke(`lucide`,l.class,...e?[`lucide-${qe(Ye(e))}-icon`,`lucide-${qe(e)}`]:[`lucide-icon`]),...!u.default&&!We(l)&&{"aria-hidden":`true`}},[...n.map(e=>(0,t.h)(...e)),...u.default?[u.default()]:[]]),Z=(e,n)=>(r,{slots:i,attrs:a})=>(0,t.h)(Ze,{...a,...r,iconNode:n,name:e},i),Qe=Z(`arrow-down-left`,[[`path`,{d:`M17 7 7 17`,key:`15tmo1`}],[`path`,{d:`M17 17H7V7`,key:`1org7z`}]]),$e=Z(`arrow-down-right`,[[`path`,{d:`m7 7 10 10`,key:`1fmybs`}],[`path`,{d:`M17 7v10H7`,key:`6fjiku`}]]),et=Z(`arrow-down`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),tt=Z(`arrow-left-right`,[[`path`,{d:`M8 3 4 7l4 4`,key:`9rb6wj`}],[`path`,{d:`M4 7h16`,key:`6tx8e3`}],[`path`,{d:`m16 21 4-4-4-4`,key:`siv7j2`}],[`path`,{d:`M20 17H4`,key:`h6l3hr`}]]),nt=Z(`arrow-up-down`,[[`path`,{d:`m21 16-4 4-4-4`,key:`f6ql7i`}],[`path`,{d:`M17 20V4`,key:`1ejh1v`}],[`path`,{d:`m3 8 4-4 4 4`,key:`11wl7u`}],[`path`,{d:`M7 4v16`,key:`1glfcx`}]]),rt=Z(`arrow-up-left`,[[`path`,{d:`M7 17V7h10`,key:`11bw93`}],[`path`,{d:`M17 17 7 7`,key:`2786uv`}]]),it=Z(`arrow-up-right`,[[`path`,{d:`M7 7h10v10`,key:`1tivn9`}],[`path`,{d:`M7 17 17 7`,key:`1vkiza`}]]),at=Z(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),ot=Z(`calendar-days`,[[`path`,{d:`M8 2v4`,key:`1cmpym`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`4`,rx:`2`,key:`1hopcy`}],[`path`,{d:`M3 10h18`,key:`8toen8`}],[`path`,{d:`M8 14h.01`,key:`6423bh`}],[`path`,{d:`M12 14h.01`,key:`1etili`}],[`path`,{d:`M16 14h.01`,key:`1gbofw`}],[`path`,{d:`M8 18h.01`,key:`lrp35t`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}],[`path`,{d:`M16 18h.01`,key:`kzsmim`}]]),st=Z(`check-check`,[[`path`,{d:`M18 6 7 17l-5-5`,key:`116fxf`}],[`path`,{d:`m22 10-7.5 7.5L13 16`,key:`ke71qq`}]]),ct=Z(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),lt=Z(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),ut=Z(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),dt=Z(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),ft=Z(`chevrons-left`,[[`path`,{d:`m11 17-5-5 5-5`,key:`13zhaf`}],[`path`,{d:`m18 17-5-5 5-5`,key:`h8a8et`}]]),pt=Z(`chevrons-right`,[[`path`,{d:`m6 17 5-5-5-5`,key:`xnjwq`}],[`path`,{d:`m13 17 5-5-5-5`,key:`17xmmf`}]]),mt=Z(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),ht=Z(`circle-question-mark`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),gt=Z(`circle-x`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),_t=Z(`clock-3`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6h4`,key:`135r8i`}]]),vt=Z(`columns-3`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}]]),yt=Z(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),bt=Z(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]),xt=Z(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),St=Z(`eye-off`,[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),Ct=Z(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),wt=Z(`file-braces`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1`,key:`1oajmo`}],[`path`,{d:`M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1`,key:`mpwhp6`}]]),Tt=Z(`file-image`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`circle`,{cx:`10`,cy:`12`,r:`2`,key:`737tya`}],[`path`,{d:`m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22`,key:`wt3hpn`}]]),Et=Z(`file-question-mark`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}],[`path`,{d:`M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3`,key:`mhlwft`}]]),Dt=Z(`file-spreadsheet`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M8 13h2`,key:`yr2amv`}],[`path`,{d:`M14 13h2`,key:`un5t4a`}],[`path`,{d:`M8 17h2`,key:`2yhykz`}],[`path`,{d:`M14 17h2`,key:`10kma7`}]]),Ot=Z(`file-text`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]),kt=Z(`file-type`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M11 18h2`,key:`12mj7e`}],[`path`,{d:`M12 12v6`,key:`3ahymv`}],[`path`,{d:`M9 13v-.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 .5.5v.5`,key:`qbrxap`}]]),At=Z(`file`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}]]),jt=Z(`grip-vertical`,[[`circle`,{cx:`9`,cy:`12`,r:`1`,key:`1vctgf`}],[`circle`,{cx:`9`,cy:`5`,r:`1`,key:`hp0tcf`}],[`circle`,{cx:`9`,cy:`19`,r:`1`,key:`fkjjf6`}],[`circle`,{cx:`15`,cy:`12`,r:`1`,key:`1tmaij`}],[`circle`,{cx:`15`,cy:`5`,r:`1`,key:`19l28e`}],[`circle`,{cx:`15`,cy:`19`,r:`1`,key:`f4zoj3`}]]),Mt=Z(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),Nt=Z(`list-collapse`,[[`path`,{d:`M10 5h11`,key:`1hkqpe`}],[`path`,{d:`M10 12h11`,key:`6m4ad9`}],[`path`,{d:`M10 19h11`,key:`14g2nv`}],[`path`,{d:`m3 10 3-3-3-3`,key:`i7pm08`}],[`path`,{d:`m3 20 3-3-3-3`,key:`20gx1n`}]]),Pt=Z(`list-tree`,[[`path`,{d:`M8 5h13`,key:`1pao27`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`M3 10a2 2 0 0 0 2 2h3`,key:`1npucw`}],[`path`,{d:`M3 5v12a2 2 0 0 0 2 2h3`,key:`x1gjn2`}]]),Ft=Z(`list-x`,[[`path`,{d:`M16 5H3`,key:`m91uny`}],[`path`,{d:`M11 12H3`,key:`51ecnj`}],[`path`,{d:`M16 19H3`,key:`zzsher`}],[`path`,{d:`m15.5 9.5 5 5`,key:`ytk86i`}],[`path`,{d:`m20.5 9.5-5 5`,key:`17o44f`}]]),It=Z(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),Lt=Z(`pin`,[[`path`,{d:`M12 17v5`,key:`bb1du9`}],[`path`,{d:`M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z`,key:`1nkz8b`}]]),Rt=Z(`presentation`,[[`path`,{d:`M2 3h20`,key:`91anmk`}],[`path`,{d:`M21 3v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V3`,key:`2k9sn8`}],[`path`,{d:`m7 21 5-5 5 5`,key:`bip4we`}]]),zt=Z(`refresh-ccw`,[[`path`,{d:`M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`14sxne`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16`,key:`1hlbsb`}],[`path`,{d:`M16 16h5v5`,key:`ccwih5`}]]),Bt=Z(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),Vt=Z(`rotate-cw`,[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,key:`1p45f6`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}]]),Ht=Z(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),Ut=Z(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),Wt=Z(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),Gt=Z(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),Kt=Z(`zoom-in`,[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`line`,{x1:`21`,x2:`16.65`,y1:`21`,y2:`16.65`,key:`13gj7c`}],[`line`,{x1:`11`,x2:`11`,y1:`8`,y2:`14`,key:`1vmskp`}],[`line`,{x1:`8`,x2:`14`,y1:`11`,y2:`11`,key:`durymu`}]]),qt=Z(`zoom-out`,[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`line`,{x1:`21`,x2:`16.65`,y1:`21`,y2:`16.65`,key:`13gj7c`}],[`line`,{x1:`8`,x2:`14`,y1:`11`,y2:`11`,key:`durymu`}]]),Q=R((0,t.defineComponent)({__name:`BingIcon`,props:{icon:{},size:{default:`md`},tone:{default:`inherit`},strokeWidth:{default:2},decorative:{type:Boolean,default:!0},label:{default:void 0}},setup(e){let n=e,r={xs:`14px`,sm:`16px`,md:`20px`,lg:`24px`,xl:`32px`};function i(e){return typeof e==`string`&&e in r}let a=(0,t.computed)(()=>typeof n.size==`number`?`${n.size}px`:i(n.size)?r[n.size]:n.size),o=(0,t.computed)(()=>[`bing-icon`,`bing-icon--${n.tone}`]),s=(0,t.computed)(()=>n.decorative||!n.label);return(n,r)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.icon),{class:(0,t.normalizeClass)(o.value),style:(0,t.normalizeStyle)({width:a.value,height:a.value,strokeWidth:e.strokeWidth}),"aria-hidden":s.value||void 0,"aria-label":s.value?void 0:e.label,role:s.value?void 0:`img`},null,8,[`class`,`style`,`aria-hidden`,`aria-label`,`role`]))}}),[[`__scopeId`,`data-v-5351773b`]]),Jt=Symbol(`BingCheckboxGroupContext`),Yt=Symbol(`BingFormContext`),Xt=Symbol(`BingFormItemContext`);function Zt(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,[...t]]))}var Qt=[`id`,`checked`,`indeterminate`,`disabled`,`name`,`value`,`aria-label`,`aria-describedby`,`aria-invalid`],$t={class:`bing-checkbox__control`,"aria-hidden":`true`},en={key:1,class:`bing-checkbox__label`},tn=R((0,t.defineComponent)({__name:`BingCheckbox`,props:{id:{default:void 0},modelValue:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},size:{default:void 0},shape:{default:`rounded`},tone:{default:`primary`},label:{default:void 0},ariaLabel:{default:void 0},ariaDescribedby:{default:void 0},status:{default:void 0},name:{default:void 0},value:{default:void 0},decorative:{type:Boolean,default:!1}},emits:[`update:modelValue`,`change`,`focus`,`blur`],setup(e,{emit:r}){let i=e,a=r,o=(0,t.useSlots)(),s=(0,t.inject)(Jt,null),c=(0,t.inject)(Xt,null),l=(0,t.ref)(null),u=(0,t.ref)(null),d=(0,t.ref)(!1),f=null,p=(0,t.computed)(()=>!!(i.label||o.default)),m=(0,t.computed)(()=>i.size??s?.size.value??c?.size.value??`md`),h=(0,t.computed)(()=>i.disabled||s?.disabled.value||c?.disabled.value||!1),g=(0,t.computed)(()=>i.status??s?.status.value??c?.status.value??`default`),_=(0,t.computed)(()=>i.id??c?.controlId.value),v=(0,t.computed)(()=>[i.ariaDescribedby,c&&!s?c.ariaDescribedby.value:void 0].filter(Boolean).join(` `)||void 0),y=(0,t.computed)(()=>i.name??s?.name.value),b=(0,t.computed)(()=>s?s.modelValue.value.some(e=>e===i.value):i.modelValue),x=(0,t.computed)(()=>[`bing-checkbox`,typeof m.value==`string`?`bing-checkbox--${m.value}`:void 0,`bing-checkbox--${i.shape}`,`bing-checkbox--${i.tone}`,`bing-checkbox--status-${g.value}`,{"is-checked":b.value,"is-indeterminate":i.indeterminate,"is-disabled":h.value,"is-invalid":g.value===`error`,"is-decorative":i.decorative,"is-check-exiting":d.value}]),S=(0,t.computed)(()=>{if(typeof m.value==`number`)return{"--bing-checkbox-size":`${m.value}px`,"--bing-checkbox-radius":`${Math.max(5,Math.round(m.value*.34))}px`}});function C(){return typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function w(){n.gsap.killTweensOf([l.value,u.value].filter(e=>!!e))}function T(e,t,r,i){if(C()){d.value=!1;return}let a=l.value,o=u.value;if(!a||!o)return;let s=e&&!t,c=r&&!i;w(),d.value=!1,s?n.gsap.fromTo(a,{autoAlpha:0,rotation:-18,scale:.18},{autoAlpha:1,rotation:0,scale:1,duration:.28,ease:`back.out(3.4)`,clearProps:`transform,opacity,visibility`,overwrite:!0}):c&&(d.value=!0,n.gsap.fromTo(a,{autoAlpha:1,rotation:0,scale:1},{autoAlpha:0,rotation:0,scale:.32,duration:.18,ease:`power2.in`,clearProps:`transform,opacity,visibility`,overwrite:!0,onComplete:()=>{d.value=!1}})),t?n.gsap.fromTo(o,{autoAlpha:0,scaleX:.2},{autoAlpha:1,scaleX:1,duration:.2,ease:`back.out(2.4)`,clearProps:`transform,opacity,visibility`,overwrite:!0}):i&&n.gsap.fromTo(o,{autoAlpha:1,scaleX:1},{autoAlpha:0,scaleX:.2,duration:.12,ease:`power2.in`,clearProps:`transform,opacity,visibility`,overwrite:!0})}function E(e){let t=e.target.checked;if(f={checked:t,indeterminate:i.indeterminate},T(t,i.indeterminate,b.value,i.indeterminate),s&&i.value!==void 0){s.updateValue(i.value,t,e);return}a(`update:modelValue`,t),a(`change`,t,e),c?.handleControlChange()}function D(e){a(`blur`,e),s?.handleCheckboxBlur(e),s||c?.handleControlBlur()}return(0,t.watch)(()=>[b.value,i.indeterminate],([e,t],[n,r])=>{if(f?.checked===e&&f.indeterminate===t){f=null;return}f=null,T(e,t,n,r)},{flush:`post`}),(0,t.onBeforeUnmount)(w),(n,r)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.decorative?`span`:`label`),{class:(0,t.normalizeClass)(x.value),style:(0,t.normalizeStyle)(S.value),"aria-hidden":e.decorative||void 0},{default:(0,t.withCtx)(()=>[e.decorative?(0,t.createCommentVNode)(``,!0):((0,t.openBlock)(),(0,t.createElementBlock)(`input`,{key:0,class:`bing-checkbox__input`,id:_.value,type:`checkbox`,checked:b.value,indeterminate:e.indeterminate,disabled:h.value,name:y.value,value:e.value,"aria-label":e.ariaLabel||void 0,"aria-describedby":v.value,"aria-invalid":g.value===`error`||void 0,onChange:E,onFocus:r[0]||=e=>a(`focus`,e),onBlur:D},null,40,Qt)),(0,t.createElementVNode)(`span`,$t,[(0,t.createElementVNode)(`span`,{ref_key:`checkRef`,ref:l,class:`bing-checkbox__check`},[(0,t.createVNode)(Q,{icon:(0,t.unref)(ct),size:`xs`,"stroke-width":3},null,8,[`icon`])],512),(0,t.createElementVNode)(`span`,{ref_key:`mixedRef`,ref:u,class:`bing-checkbox__mixed`},null,512)]),!e.decorative&&p.value?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,en,[(0,t.renderSlot)(n.$slots,`default`,{},()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.label),1)],!0)])):(0,t.createCommentVNode)(``,!0)]),_:3},8,[`class`,`style`,`aria-hidden`]))}}),[[`__scopeId`,`data-v-60cfda9d`]]),nn=[`aria-label`],rn={class:`bing-resizable__content`},an={key:0,class:`bing-resizable__size`,"aria-hidden":`true`},on=[`aria-label`,`disabled`,`onPointerdown`,`onKeydown`],sn={class:`bing-resizable__handle-mark`,"aria-hidden":`true`},cn=R((0,t.defineComponent)({__name:`BingResizable`,props:{size:{default:void 0},defaultSize:{default:()=>({width:320,height:220})},position:{default:void 0},defaultPosition:{default:()=>({x:0,y:0})},minWidth:{default:80},minHeight:{default:80},maxWidth:{default:void 0},maxHeight:{default:void 0},mode:{default:`fixed`},snapMode:{default:`live`},directions:{default:()=>[`right`,`bottom`,`bottom-right`]},step:{default:1},disabled:{type:Boolean,default:!1},lockAspectRatio:{type:Boolean,default:!1},contain:{type:Boolean,default:!1},showSize:{type:Boolean,default:!1},handleSize:{default:12},ariaLabel:{default:void 0}},emits:[`update:size`,`update:position`,`resize-start`,`resize`,`resize-end`],setup(e,{expose:r,emit:i}){let a=[`top`,`right`,`bottom`,`left`,`top-left`,`top-right`,`bottom-left`,`bottom-right`],o={top:nt,right:tt,bottom:nt,left:tt,"top-left":rt,"top-right":it,"bottom-left":Qe,"bottom-right":$e},s=e,c=i,l=(0,t.ref)(null),u=(0,t.ref)(null),d=(0,t.ref)(null),f=(0,t.ref)(R(s.defaultSize)),p=(0,t.ref)(R(s.defaultSize)),m=(0,t.ref)(z(s.defaultPosition)),h=(0,t.ref)(z(s.defaultPosition)),g=(0,t.ref)(!1),_=(0,t.ref)(!1),v=(0,t.ref)(!1),y=(0,t.ref)(null),b,x={x:0,y:0},S=``,C=``,w=``,T=``,E=!1,D=(0,t.computed)(()=>[`bing-resizable`,`bing-resizable--${s.mode}`,{"is-disabled":s.disabled,"is-resizing":v.value,"is-contain":s.contain,"is-ratio-locked":s.lockAspectRatio}]),O=(0,t.computed)(()=>v.value?p.value:s.size?s.size:g.value?f.value:s.defaultSize),k=(0,t.computed)(()=>v.value?h.value:s.position?z(s.position):_.value?m.value:z(s.defaultPosition)),A=(0,t.computed)(()=>R(O.value)),j=(0,t.computed)(()=>{let e=k.value;return{width:I(O.value.width),height:I(O.value.height),minWidth:I(s.minWidth),minHeight:I(s.minHeight),maxWidth:I(s.maxWidth),maxHeight:I(s.maxHeight),left:`${e.x}px`,top:`${e.y}px`,"--bing-resizable-handle-size":`${Math.max(6,s.handleSize)}px`}}),M=(0,t.computed)(()=>s.directions.filter(e=>a.includes(e))),N=(0,t.computed)(()=>{let e=v.value?p.value:A.value;return`${Math.round(e.width)} x ${Math.round(e.height)}`});function P(){return typeof window<`u`&&typeof document<`u`}function F(){return P()&&typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function I(e){return typeof e==`number`?`${e}px`:e}function L(e,t){if(typeof e==`number`&&Number.isFinite(e))return e;if(typeof e==`string`){let t=Number.parseFloat(e);if(Number.isFinite(t))return t}return t}function R(e){return{width:Math.max(0,L(e?.width,320)),height:Math.max(0,L(e?.height,220))}}function z(e){return{x:L(e?.x,0),y:L(e?.y,0)}}function B(e){return Math.round(e*1e3)/1e3}function V(e,t,n){return Math.min(n,Math.max(t,e))}function H(e,t){return!Number.isFinite(t)||t<=1?e:Math.round(e/t)*t}function U(e,t){return Math.abs(e.width-t.width)<.001&&Math.abs(e.height-t.height)<.001}function ee(e,t){return Math.abs(e.x-t.x)<.001&&Math.abs(e.y-t.y)<.001}function W(){if(typeof s.step==`number`){let e=Math.max(1,s.step);return{x:e,y:e}}return{x:Math.max(1,s.step.x??1),y:Math.max(1,s.step.y??1)}}function te(e){return{top:e.includes(`top`),right:e.includes(`right`),bottom:e.includes(`bottom`),left:e.includes(`left`)}}function ne(e){return e===`top`||e===`bottom`?`ns-resize`:e===`left`||e===`right`?`ew-resize`:e===`top-left`||e===`bottom-right`?`nwse-resize`:`nesw-resize`}function re(e){return[`ew-resize`,`ns-resize`,`nwse-resize`,`nesw-resize`].includes(e)}function G(e){let t=te(e);return`${t.left?`100%`:t.right?`0%`:`50%`} ${t.top?`100%`:t.bottom?`0%`:`50%`}`}function K(e){return`Resize ${e.replace(`-`,` `)}`}function q(){let e=l.value?.getBoundingClientRect();return{width:e?.width?e.width:L(O.value.width,A.value.width),height:e?.height?e.height:L(O.value.height,A.value.height)}}function ie(){if(!s.contain)return null;let e=l.value?.parentElement,t=e?.getBoundingClientRect();if(!e||!t?.width||!t?.height)return null;let n=window.getComputedStyle(e),r=L(n.paddingLeft,0)+L(n.paddingRight,0)+L(n.borderLeftWidth,0)+L(n.borderRightWidth,0),i=L(n.paddingTop,0)+L(n.paddingBottom,0)+L(n.borderTopWidth,0)+L(n.borderBottomWidth,0);return{width:Math.max(0,t.width-r),height:Math.max(0,t.height-i)}}function ae(){return{minWidth:Math.max(0,L(s.minWidth,0)),minHeight:Math.max(0,L(s.minHeight,0)),maxWidth:Math.max(0,L(s.maxWidth,1/0)),maxHeight:Math.max(0,L(s.maxHeight,1/0))}}function oe(e,t,n){let r=ae();if(s.lockAspectRatio&&n&&n.aspectRatio>0){let i=n.aspectRatio,a=V(ce(e,t,n.direction,n)===`width`?e:t*i,Math.max(r.minWidth,r.minHeight*i),Math.min(r.maxWidth,r.maxHeight*i));return{width:a,height:a/i}}return{width:V(e,r.minWidth,r.maxWidth),height:V(t,r.minHeight,r.maxHeight)}}function se(e,t,n,r){if(!s.lockAspectRatio||r.aspectRatio<=0)return{width:e,height:t};let i=te(n),a=r.aspectRatio;return(i.left||i.right)&&!(i.top||i.bottom)?{width:e,height:e/a}:(i.top||i.bottom)&&!(i.left||i.right)?{width:t*a,height:t}:Math.abs(e-r.startSize.width)>=Math.abs(t-r.startSize.height)?{width:e,height:e/a}:{width:t*a,height:t}}function ce(e,t,n,r){let i=te(n);return(i.left||i.right)&&!(i.top||i.bottom)?`width`:(i.top||i.bottom)&&!(i.left||i.right)?`height`:Math.abs(e-r.startSize.width)>=Math.abs(t-r.startSize.height)?`width`:`height`}function le(e,t,n,r){let i=W();if(s.lockAspectRatio&&r.aspectRatio>0){if(ce(e,t,n,r)===`width`){let t=H(e,i.x);return{width:t,height:t/r.aspectRatio}}let a=H(t,i.y);return{width:a*r.aspectRatio,height:a}}return{width:H(e,i.x),height:H(t,i.y)}}function ue(e,t){let n=te(t.direction);if(t.mode===`mirror`){let n=Math.abs(e.width-t.startSize.width)>.001,r=Math.abs(e.height-t.startSize.height)>.001;return{x:n?t.startPosition.x+(t.startSize.width-e.width)/2:t.startPosition.x,y:r?t.startPosition.y+(t.startSize.height-e.height)/2:t.startPosition.y}}return{x:n.left?t.startPosition.x+t.startSize.width-e.width:t.startPosition.x,y:n.top?t.startPosition.y+t.startSize.height-e.height:t.startPosition.y}}function de(e,t,n){if(!n.parentSize)return{size:e,position:t};let r=e.width,i=e.height,a=t.x,o=t.y;return a<0&&(r+=a,a=0),o<0&&(i+=o,o=0),a+r>n.parentSize.width&&(r=n.parentSize.width-a),o+i>n.parentSize.height&&(i=n.parentSize.height-o),{size:oe(r,i),position:{x:a,y:o}}}function fe(e,t,n,r=e.snapMode===`live`){let i=te(e.direction),a=e.mode===`mirror`?2:1,o=e.startSize.width+((i.right?t:0)-(i.left?t:0))*a,s=e.startSize.height+((i.bottom?n:0)-(i.top?n:0))*a,c=se(o,s,e.direction,e);if(o=c.width,s=c.height,r){let t=le(o,s,e.direction,e);o=t.width,s=t.height}let l=oe(o,s,e),u=ue(l,e),d=de(l,u,e);return l=d.size,u=d.position,{size:{width:B(l.width),height:B(l.height)},position:{x:B(u.x),y:B(u.y)}}}function pe(e,t,n){let r=q();return{direction:e,startClientX:t,startClientY:n,startSize:r,startPosition:k.value,aspectRatio:r.height>0?r.width/r.height:1,mode:s.mode,snapMode:s.snapMode,parentSize:ie()}}function me(e,t,n){return{direction:e,size:p.value,position:h.value,delta:t,event:n}}function he(){s.size||(f.value=p.value,g.value=!0),s.position||(m.value=h.value,_.value=!0),c(`update:size`,p.value),c(`update:position`,h.value)}function J(e){if(!P()||E)return;let t=ne(e);S=re(document.documentElement.style.cursor)?``:document.documentElement.style.cursor,C=re(document.body?.style.cursor??``)?``:document.body?.style.cursor??``,w=document.documentElement.style.userSelect,T=document.body?.style.userSelect??``,document.documentElement.style.cursor=t,document.body.style.cursor=t,document.documentElement.style.userSelect=`none`,document.body.style.userSelect=`none`,E=!0}function ge(){!P()||!E||(document.documentElement.style.cursor=S,document.body.style.cursor=C,document.documentElement.style.userSelect=w,document.body.style.userSelect=T,S=``,C=``,w=``,T=``,E=!1)}function _e(){if(P()){window.addEventListener(`pointermove`,Se),window.addEventListener(`pointerup`,we),window.addEventListener(`pointercancel`,we),window.addEventListener(`pointerout`,Ee),window.addEventListener(`blur`,Te),window.addEventListener(`keydown`,De),document.addEventListener(`visibilitychange`,Y);try{window.parent&&window.parent!==window&&(window.parent.addEventListener(`pointerup`,we),window.parent.addEventListener(`pointercancel`,we),window.parent.addEventListener(`blur`,Te))}catch{}}}function ve(){if(P()){window.removeEventListener(`pointermove`,Se),window.removeEventListener(`pointerup`,we),window.removeEventListener(`pointercancel`,we),window.removeEventListener(`pointerout`,Ee),window.removeEventListener(`blur`,Te),window.removeEventListener(`keydown`,De),document.removeEventListener(`visibilitychange`,Y);try{window.parent&&window.parent!==window&&(window.parent.removeEventListener(`pointerup`,we),window.parent.removeEventListener(`pointercancel`,we),window.parent.removeEventListener(`blur`,Te))}catch{}}}function ye(e){F()||(u.value&&n.gsap.to(u.value,{scale:1.006,transformOrigin:G(e),duration:.16,ease:`power2.out`,overwrite:!0,force3D:!0}),d.value&&n.gsap.fromTo(d.value,{autoAlpha:0,scale:.985},{autoAlpha:1,scale:1,transformOrigin:G(e),duration:.18,ease:`power2.out`,overwrite:!0,force3D:!0}))}function be(e){F()||(u.value&&n.gsap.to(u.value,{scale:1,transformOrigin:G(e),duration:.42,ease:`elastic.out(1, 0.78)`,overwrite:!0,force3D:!0}),d.value&&n.gsap.to(d.value,{autoAlpha:0,scale:1.018,transformOrigin:G(e),duration:.28,ease:`power3.out`,overwrite:!0,force3D:!0}))}function xe(e,t){if(!(s.disabled||t.button!==0)){t.preventDefault(),b=pe(e,t.clientX,t.clientY),x={x:0,y:0},p.value=b.startSize,h.value=b.startPosition,y.value=e,v.value=!0,J(e),_e(),ye(e);try{t.currentTarget?.setPointerCapture?.(t.pointerId)}catch{}c(`resize-start`,me(e,x,t))}}function Se(e){if(!b)return;e.preventDefault(),x={x:e.clientX-b.startClientX,y:e.clientY-b.startClientY};let t=fe(b,x.x,x.y);U(t.size,p.value)&&ee(t.position,h.value)||(p.value=t.size,h.value=t.position,he(),c(`resize`,me(b.direction,x,e)))}function Ce(e,t=!0){let n=b;if(ve(),ge(),!n)return;let r=n.direction;if(n.snapMode===`end`){let e=fe(n,x.x,x.y,!0);p.value=e.size,h.value=e.position}he(),e&&t&&c(`resize-end`,me(r,x,e)),be(r),b=void 0,y.value=null,v.value=!1}function we(e){Ce(e)}function Te(){Ce(void 0,!1)}function Ee(e){e.relatedTarget||(e.clientX<=0||e.clientY<=0||e.clientX>=window.innerWidth||e.clientY>=window.innerHeight)&&Te()}function Y(){document.visibilityState===`hidden`&&Te()}function De(e){e.key===`Escape`&&Ce(e)}function Oe(e,t){let n=te(e),r=W(),i=t.shiftKey?4:1,a=r.x*i,o=r.y*i;return t.key===`ArrowLeft`&&(n.left||n.right)?{x:-a,y:0}:t.key===`ArrowRight`&&(n.left||n.right)?{x:a,y:0}:t.key===`ArrowUp`&&(n.top||n.bottom)?{x:0,y:-o}:t.key===`ArrowDown`&&(n.top||n.bottom)?{x:0,y:o}:null}function X(e,t){if(s.disabled)return;let n=Oe(e,t);if(!n)return;t.preventDefault();let r=fe(pe(e,0,0),n.x,n.y,!0);p.value=r.size,h.value=r.position,y.value=e,v.value=!0,c(`resize-start`,me(e,{x:0,y:0},t)),he(),c(`resize`,me(e,n,t)),c(`resize-end`,me(e,n,t)),ye(e),be(e),y.value=null,v.value=!1}function ke(){p.value=R(s.defaultSize),h.value=z(s.defaultPosition),f.value=p.value,m.value=h.value,g.value=!0,_.value=!0,c(`update:size`,p.value),c(`update:position`,h.value)}function Ae(){return v.value?p.value:R(O.value)}function je(){return k.value}return(0,t.onBeforeUnmount)(()=>{ve(),ge(),n.gsap.killTweensOf([u.value,d.value].filter(Boolean))}),r({reset:ke,getSize:Ae,getPosition:je}),(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{ref_key:`rootRef`,ref:l,class:(0,t.normalizeClass)(D.value),style:(0,t.normalizeStyle)(j.value),role:`group`,"aria-label":e.ariaLabel},[(0,t.createElementVNode)(`div`,{ref_key:`surfaceRef`,ref:u,class:`bing-resizable__surface`},[(0,t.createElementVNode)(`div`,rn,[(0,t.renderSlot)(n.$slots,`default`,{},void 0,!0)]),(0,t.createElementVNode)(`span`,{ref_key:`feedbackRef`,ref:d,class:`bing-resizable__feedback`,"aria-hidden":`true`},null,512),e.showSize?((0,t.openBlock)(),(0,t.createElementBlock)(`output`,an,(0,t.toDisplayString)(N.value),1)):(0,t.createCommentVNode)(``,!0),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(M.value,i=>((0,t.openBlock)(),(0,t.createElementBlock)(`button`,{key:i,type:`button`,class:(0,t.normalizeClass)([`bing-resizable__handle`,[`bing-resizable__handle--${i}`,{"is-active":y.value===i}]]),"aria-label":K(i),disabled:e.disabled,onPointerdown:e=>xe(i,e),onKeydown:e=>X(i,e)},[(0,t.renderSlot)(n.$slots,`handle`,{direction:i,active:y.value===i},()=>[(0,t.createElementVNode)(`span`,sn,[r[0]||=(0,t.createElementVNode)(`span`,{class:`bing-resizable__handle-line`},null,-1),(0,t.createVNode)(Q,{class:`bing-resizable__handle-icon`,icon:o[i],size:i.includes(`-`)?13:14,"stroke-width":2.35},null,8,[`icon`,`size`])])],!0)],42,on))),128))],512)],14,nn))}}),[[`__scopeId`,`data-v-1c85ed00`]]),ln=[`tabindex`,`role`,`aria-label`],un=R((0,t.defineComponent)({__name:`BingScrollbar`,props:{height:{default:void 0},maxHeight:{default:void 0},minThumbSize:{default:28},overflowTolerance:{default:1},vertical:{type:Boolean,default:!0},horizontal:{type:Boolean,default:!1},always:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},focusable:{type:Boolean,default:!0},ariaLabel:{default:void 0},smooth:{type:[Boolean,Object],default:!0}},emits:[`scroll`],setup(e,{expose:n,emit:r}){let i=e,a=r,o=(0,t.ref)(null),s=(0,t.ref)(null),c=(0,t.ref)(null),l=(0,t.ref)(null),u=(0,t.ref)(!1),d=(0,t.ref)(!1),f=(0,t.ref)(0),p=(0,t.ref)(0),m=(0,t.ref)(0),h=(0,t.ref)(0),g=(0,t.ref)(!1),_=(0,t.ref)(null),v=(0,t.ref)(!1),y,b,x,S,C,w,T=0,E=0,D=0,O=0,k=0,A=0,j=0,M=(0,t.computed)(()=>[`bing-scrollbar`,{"has-overflow":u.value||d.value,"has-vertical-overflow":u.value,"has-horizontal-overflow":d.value,"is-always-visible":i.always,"is-disabled":i.disabled,"is-dragging":!!_.value,"is-dragging-vertical":_.value===`vertical`,"is-dragging-horizontal":_.value===`horizontal`,"is-hovering":g.value,"is-scrolling":v.value,"is-smooth":!!i.smooth}]),N=(0,t.computed)(()=>({height:B(i.height),maxHeight:B(i.maxHeight)})),P=(0,t.computed)(()=>({height:`${f.value}px`,transform:`translate(-50%, ${p.value}px)`})),F=(0,t.computed)(()=>({width:`${m.value}px`,transform:`translate(${h.value}px, -50%)`})),I=(0,t.computed)(()=>Math.max(1,i.overflowTolerance)),L=(0,t.computed)(()=>(u.value||d.value)&&i.focusable&&!i.disabled),R=(0,t.computed)(()=>i.ariaLabel??(L.value?`Scrollable content`:void 0));function z(){return typeof window<`u`&&typeof document<`u`}function B(e){return typeof e==`number`?`${e}px`:e}function V(){!z()||b===void 0||(window.clearTimeout(b),b=void 0)}function H(){!z()||x===void 0||(window.cancelAnimationFrame(x),x=void 0)}function U(){!z()||S===void 0||(window.cancelAnimationFrame(S),S=void 0)}function ee(){U(),C=void 0}function W(){ee(),w?.cancel()}function te(){return typeof i.smooth==`object`?i.smooth:void 0}function ne(){return!!i.smooth&&!i.disabled}function re(){let e=o.value;if(!e)return;let t=e.clientHeight,n=e.scrollHeight,r=e.clientWidth,a=e.scrollWidth,s=Math.max(0,n-t),g=Math.max(0,a-r),_=i.vertical&&!i.disabled&&s>I.value,v=i.horizontal&&!i.disabled&&g>I.value;if(u.value=_,d.value=v,O=_?s:0,k=v?g:0,!_||!c.value)f.value=0,p.value=0,A=0;else{let r=c.value.clientHeight,a=n>0?t/n*r:r,o=Math.min(r,Math.max(Math.max(12,i.minThumbSize),a));A=Math.max(0,r-o);let l=s>0?e.scrollTop/s:0;f.value=o,p.value=A*l}if(!v||!l.value)m.value=0,h.value=0,j=0;else{let t=l.value.clientWidth,n=a>0?r/a*t:t,o=Math.min(t,Math.max(Math.max(12,i.minThumbSize),n));j=Math.max(0,t-o);let s=g>0?e.scrollLeft/g:0;m.value=o,h.value=j*s}}function G(){let e=o.value;if(e){if(u.value){let t=O>0?e.scrollTop/O:0;p.value=A*t}if(d.value){let t=k>0?e.scrollLeft/k:0;h.value=j*t}}}function K(){if(!z()||typeof window.requestAnimationFrame!=`function`){re();return}x===void 0&&(x=window.requestAnimationFrame(()=>{x=void 0,re()}))}function q(){(0,t.nextTick)(K)}function ie(){z()&&(V(),v.value=!0,b=window.setTimeout(()=>{b=void 0,v.value=!1},720))}function ae(e){let t=Math.abs(e.deltaX)>Math.abs(e.deltaY)?e.deltaX:e.deltaY;return e.deltaMode===1?t*16:e.deltaMode===2?t*(o.value?.clientWidth??1):t}function oe(){return z()&&window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches}function se(e){G(),ie(),a(`scroll`,e)}function ce(e){if(e.defaultPrevented)return!1;if(ne())return ee(),w?.handleWheel(e)??!1;if(i.disabled||!i.horizontal)return!1;if(!e.shiftKey)return ee(),!1;let t=o.value;if(!t)return!1;let n=k||Math.max(0,t.scrollWidth-t.clientWidth),r=C??t.scrollLeft,a=fe(r+ae(e),0,n);return a===r&&a===t.scrollLeft?!1:(e.preventDefault(),C=a,ge(),!0)}function le(e){ne()&&w?.handleKeydown(e)}function ue(e){let t=o.value,n=e===`vertical`?c.value:l.value;return!t||!n?null:{maxScroll:e===`vertical`?Math.max(0,t.scrollHeight-t.clientHeight):Math.max(0,t.scrollWidth-t.clientWidth),thumbTravel:e===`vertical`?Math.max(0,n.clientHeight-f.value):Math.max(0,n.clientWidth-m.value)}}function de(e){let t=o.value;if(!t)return;let n=O||Math.max(0,t.scrollHeight-t.clientHeight);t.scrollTop=Math.min(n,Math.max(0,e)),G(),ie()}function fe(e,t,n){return Math.min(n,Math.max(t,e))}function me(e){let t=o.value;if(!t)return;let n=k||Math.max(0,t.scrollWidth-t.clientWidth);t.scrollLeft=Math.min(n,Math.max(0,e)),G(),ie()}function he(){S=void 0;let e=o.value;if(!e||C===void 0){C=void 0;return}let t=C-e.scrollLeft;if(Math.abs(t)<.5){me(C),C=void 0;return}me(e.scrollLeft+t*.42),J()}function J(){!z()||S!==void 0||typeof window.requestAnimationFrame!=`function`||(S=window.requestAnimationFrame(he))}function ge(){if(C!==void 0){if(!z()||typeof window.requestAnimationFrame!=`function`||oe()){me(C),C=void 0;return}S===void 0&&he()}}function _e(e,t){if(i.disabled||(e===`vertical`?!u.value:!d.value)||t.button!==0||t.target!==t.currentTarget)return;let n=e===`vertical`?c.value:l.value,r=ue(e);if(!n||!r||r.thumbTravel<=0)return;t.preventDefault(),W();let a=n.getBoundingClientRect(),o=e===`vertical`?t.clientY-a.top-f.value/2:t.clientX-a.left-m.value/2,s=Math.min(1,Math.max(0,o/r.thumbTravel));if(e===`vertical`){de(s*r.maxScroll);return}me(s*r.maxScroll)}function ve(){z()&&(window.addEventListener(`pointermove`,xe),window.addEventListener(`pointerup`,Se),window.addEventListener(`pointercancel`,Se))}function ye(){z()&&(window.removeEventListener(`pointermove`,xe),window.removeEventListener(`pointerup`,Se),window.removeEventListener(`pointercancel`,Se))}function be(e,t){if(!(i.disabled||(e===`vertical`?!u.value:!d.value)||t.button!==0)){t.preventDefault(),t.stopPropagation(),W(),T=e===`vertical`?t.clientY:t.clientX,E=o.value?.scrollTop??0,D=o.value?.scrollLeft??0,_.value=e,ve();try{t.currentTarget?.setPointerCapture?.(t.pointerId)}catch{}}}function xe(e){let t=_.value;if(!t)return;let n=ue(t);if(!n||n.thumbTravel<=0)return;e.preventDefault();let r=((t===`vertical`?e.clientY:e.clientX)-T)*(n.maxScroll/n.thumbTravel);if(t===`vertical`){de(E+r);return}me(D+r)}function Se(){_.value&&(_.value=null,ye())}function Ce(e){let t=o.value;if(t){if(typeof e==`number`){W(),de(e);return}W(),t.scrollTo(e),K()}}function we(e){let t=o.value;if(t){if(typeof e==`number`){W(),de(t.scrollTop+e);return}W(),t.scrollBy(e),K()}}function Te(){if(y?.disconnect(),y=void 0,!z()||typeof ResizeObserver>`u`){window.addEventListener(`resize`,q),q();return}y=new ResizeObserver(q),o.value&&y.observe(o.value),s.value&&y.observe(s.value),q()}return(0,t.watch)(()=>[i.height,i.maxHeight,i.minThumbSize,i.overflowTolerance,i.disabled,i.vertical,i.horizontal],q),(0,t.watch)(()=>[i.disabled,i.smooth],()=>{ne()||w?.cancel()},{deep:!0}),(0,t.onMounted)(()=>{w=pe({getElement:()=>o.value,getOptions:te,getAxes:()=>({horizontal:i.horizontal,vertical:i.vertical}),isEnabled:ne}),Te()}),(0,t.onBeforeUnmount)(()=>{V(),H(),W(),w=void 0,ye(),y?.disconnect(),y=void 0,z()&&window.removeEventListener(`resize`,q)}),n({handleWheel:ce,scrollBy:we,scrollTo:Ce,stop:W,update:re,get viewport(){return o.value}}),(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)(M.value),style:(0,t.normalizeStyle)(N.value),onMouseenter:n[4]||=e=>g.value=!0,onMouseleave:n[5]||=e=>g.value=!1},[(0,t.createElementVNode)(`div`,{ref_key:`viewportRef`,ref:o,class:`bing-scrollbar__viewport`,tabindex:L.value?0:void 0,role:R.value?`region`:void 0,"aria-label":R.value,onScroll:se,onWheel:ce,onKeydown:le},[(0,t.createElementVNode)(`div`,{ref_key:`contentRef`,ref:s,class:`bing-scrollbar__content`},[(0,t.renderSlot)(e.$slots,`default`,{},void 0,!0)],512)],40,ln),(0,t.withDirectives)((0,t.createElementVNode)(`div`,{ref_key:`verticalRailRef`,ref:c,class:`bing-scrollbar__rail bing-scrollbar__rail--vertical`,"aria-hidden":`true`,onPointerdown:n[1]||=e=>_e(`vertical`,e)},[(0,t.createElementVNode)(`div`,{class:`bing-scrollbar__thumb bing-scrollbar__thumb--vertical`,style:(0,t.normalizeStyle)(P.value),onPointerdown:n[0]||=e=>be(`vertical`,e)},null,36)],544),[[t.vShow,u.value]]),(0,t.withDirectives)((0,t.createElementVNode)(`div`,{ref_key:`horizontalRailRef`,ref:l,class:`bing-scrollbar__rail bing-scrollbar__rail--horizontal`,"aria-hidden":`true`,onPointerdown:n[3]||=e=>_e(`horizontal`,e)},[(0,t.createElementVNode)(`div`,{class:`bing-scrollbar__thumb bing-scrollbar__thumb--horizontal`,style:(0,t.normalizeStyle)(F.value),onPointerdown:n[2]||=e=>be(`horizontal`,e)},null,36)],544),[[t.vShow,d.value]])],38))}}),[[`__scopeId`,`data-v-cadc871e`]]),dn=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function fn(e){return pn(e)}function pn(e){return Array.isArray(e)?mn(e):e instanceof RegExp?e:typeof e==`object`?hn(e):e}function mn(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=pn(e[n]);return t}function hn(e){let t={};for(let n in e)t[n]=pn(e[n]);return t}function gn(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function _n(e){let t=~e.lastIndexOf(`/`)||~e.lastIndexOf(`\\`);return t===0?e:~t===e.length-1?_n(e.substring(0,e.length-1)):e.substr(~t+1)}var vn=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,yn=class{static hasCaptures(e){return e===null?!1:(vn.lastIndex=0,vn.test(e))}static replaceCaptures(e,t,n){return e.replace(vn,(e,r,i,a)=>{let o=n[parseInt(r||i,10)];if(o){let e=t.substring(o.start,o.end);for(;e[0]===`.`;)e=e.substring(1);switch(a){case`downcase`:return e.toLowerCase();case`upcase`:return e.toUpperCase();default:return e}}else return e})}};function bn(e,t){return e<t?-1:+(e>t)}function xn(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){let n=bn(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function Sn(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function Cn(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)}var wn=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},Tn=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(An(e),t)}static createFromParsedTheme(e,t){return Nn(e,t)}_cachedMatchRoot=new wn(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>Dn(e.parent,t.parentScopes));return n?new kn(n.fontStyle,n.foreground,n.background):null}},En=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(let r of n)t=new e(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new e(n,t[r]);return n}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(` `)}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function Dn(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===`>`){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!On(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function On(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}var kn=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function An(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,i=t.length;e<i;e++){let i=t[e];if(!i.settings)continue;let a;if(typeof i.scope==`string`){let e=i.scope;e=e.replace(/^[,]+/,``),e=e.replace(/[,]+$/,``),a=e.split(`,`)}else a=Array.isArray(i.scope)?i.scope:[``];let o=-1;if(typeof i.settings.fontStyle==`string`){o=0;let e=i.settings.fontStyle.split(` `);for(let t=0,n=e.length;t<n;t++)switch(e[t]){case`italic`:o|=1;break;case`bold`:o|=2;break;case`underline`:o|=4;break;case`strikethrough`:o|=8;break}}let s=null;typeof i.settings.foreground==`string`&&Sn(i.settings.foreground)&&(s=i.settings.foreground);let c=null;typeof i.settings.background==`string`&&Sn(i.settings.background)&&(c=i.settings.background);for(let t=0,i=a.length;t<i;t++){let i=a[t].trim().split(` `),l=i[i.length-1],u=null;i.length>1&&(u=i.slice(0,i.length-1),u.reverse()),n[r++]=new jn(l,u,e,o,s,c)}}return n}var jn=class{constructor(e,t,n,r,i,a){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=a}},Mn=(e=>(e[e.NotSet=-1]=`NotSet`,e[e.None=0]=`None`,e[e.Italic=1]=`Italic`,e[e.Bold=2]=`Bold`,e[e.Underline=4]=`Underline`,e[e.Strikethrough=8]=`Strikethrough`,e))(Mn||{});function Nn(e,t){e.sort((e,t)=>{let n=bn(e.scope,t.scope);return n!==0||(n=xn(e.parentScopes,t.parentScopes),n!==0)?n:e.index-t.index});let n=0,r=`#000000`,i=`#ffffff`;for(;e.length>=1&&e[0].scope===``;){let t=e.shift();t.fontStyle!==-1&&(n=t.fontStyle),t.foreground!==null&&(r=t.foreground),t.background!==null&&(i=t.background)}let a=new Pn(t),o=new kn(n,a.getId(r),a.getId(i)),s=new Ln(new In(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];s.insert(0,n.scope,n.parentScopes,n.fontStyle,a.getId(n.foreground),a.getId(n.background))}return new Tn(a,o,s)}var Pn=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},Fn=Object.freeze([]),In=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||Fn,this.fontStyle=n,this.foreground=r,this.background=i}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e?console.log(`how did this happen?`):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),n!==0&&(this.foreground=n),r!==0&&(this.background=r)}},Ln=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,r=0;for(;e.parentScopes[n]===`>`&&n++,t.parentScopes[r]===`>`&&r++,!(n>=e.parentScopes.length||r>=t.parentScopes.length);){let i=t.parentScopes[r].length-e.parentScopes[n].length;if(i!==0)return i;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(t){if(t!==``){let e=t.indexOf(`.`),n,r;if(e===-1?(n=t,r=``):(n=t.substring(0,e),r=t.substring(e+1)),this._children.hasOwnProperty(n))return this._children[n].match(r)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,r,i,a,o){if(n===``){this._doInsertHere(t,r,i,a,o);return}let s=n.indexOf(`.`),c,l;s===-1?(c=n,l=``):(c=n.substring(0,s),l=n.substring(s+1));let u;this._children.hasOwnProperty(c)?u=this._children[c]:(u=new e(this._mainRule.clone(),In.cloneArr(this._rulesWithParentScopes)),this._children[c]=u),u.insert(t+1,l,r,i,a,o)}_doInsertHere(e,t,n,r,i){if(t===null){this._mainRule.acceptOverwrite(e,n,r,i);return}for(let a=0,o=this._rulesWithParentScopes.length;a<o;a++){let o=this._rulesWithParentScopes[a];if(xn(o.parentScopes,t)===0){o.acceptOverwrite(e,n,r,i);return}}n===-1&&(n=this._mainRule.fontStyle),r===0&&(r=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new In(e,t,n,r,i))}},Rn=class e{static toBinaryStr(e){return e.toString(2).padStart(32,`0`)}static print(t){let n=e.getLanguageId(t),r=e.getTokenType(t),i=e.getFontStyle(t),a=e.getForeground(t),o=e.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:a,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!=0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(t,n,r,i,a,o,s){let c=e.getLanguageId(t),l=e.getTokenType(t),u=+!!e.containsBalancedBrackets(t),d=e.getFontStyle(t),f=e.getForeground(t),p=e.getBackground(t);return n!==0&&(c=n),r!==8&&(l=Bn(r)),i!==null&&(u=+!!i),a!==-1&&(d=a),o!==0&&(f=o),s!==0&&(p=s),(c<<0|l<<8|u<<10|d<<11|f<<15|p<<24)>>>0}};function zn(e){return e}function Bn(e){return e}function Vn(e,t){let n=[],r=Un(e),i=r.next();for(;i!==null;){let e=0;if(i.length===2&&i.charAt(1)===`:`){switch(i.charAt(0)){case`R`:e=1;break;case`L`:e=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let t=o();if(n.push({matcher:t,priority:e}),i!==`,`)break;i=r.next()}return n;function a(){if(i===`-`){i=r.next();let e=a();return t=>!!e&&!e(t)}if(i===`(`){i=r.next();let e=s();return i===`)`&&(i=r.next()),e}if(Hn(i)){let e=[];do e.push(i),i=r.next();while(Hn(i));return n=>t(e,n)}return null}function o(){let e=[],t=a();for(;t;)e.push(t),t=a();return t=>e.every(e=>e(t))}function s(){let e=[],t=o();for(;t&&(e.push(t),i===`|`||i===`,`);){do i=r.next();while(i===`|`||i===`,`);t=o()}return t=>e.some(e=>e(t))}}function Hn(e){return!!e&&!!e.match(/[\w\.:]+/)}function Un(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;let r=n[0];return n=t.exec(e),r}}}function Wn(e){typeof e.dispose==`function`&&e.dispose()}var Gn=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},Kn=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},qn=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},Jn=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Gn(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new qn;for(let n of e)Yn(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof Gn){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};function Yn(e,t,n,r){let i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let a=n.lookup(t);e instanceof Gn?Zn({baseGrammar:a,selfGrammar:i},r):Xn(e.ruleName,{baseGrammar:a,selfGrammar:i,repository:i.repository},r);let o=n.injections(e.scopeName);if(o)for(let e of o)r.add(new Gn(e))}function Xn(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];Qn([r],t,n)}}function Zn(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Qn(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Qn(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Qn(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?gn({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&Qn(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=ir(i);switch(a.kind){case 0:Zn({...t,selfGrammar:t.baseGrammar},n);break;case 1:Zn(t,n);break;case 2:Xn(a.ruleName,{...t,repository:e},n);break;case 3:case 4:let r=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(r){let i={baseGrammar:t.baseGrammar,selfGrammar:r,repository:e};a.kind===4?Xn(a.ruleName,i,n):Zn(i,n)}else a.kind===4?n.add(new Kn(a.scopeName,a.ruleName)):n.add(new Gn(a.scopeName));break}}}var $n=class{kind=0},er=class{kind=1},tr=class{constructor(e){this.ruleName=e}kind=2},nr=class{constructor(e){this.scopeName=e}kind=3},rr=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function ir(e){if(e===`$base`)return new $n;if(e===`$self`)return new er;let t=e.indexOf(`#`);return t===-1?new nr(e):t===0?new tr(e.substring(1)):new rr(e.substring(0,t),e.substring(t+1))}var ar=/\\(\d+)/,or=/\\(\d+)/g,sr=-1,cr=-2;function lr(e){return e}function ur(e){return e}var dr=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=yn.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=yn.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${_n(this.$location.filename)}:${this.$location.line}`:`unknown`;return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:yn.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:yn.replaceCaptures(this._contentName,e,t)}},fr=class extends dr{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw Error(`Not supported!`)}compile(e,t){throw Error(`Not supported!`)}compileAG(e,t,n,r){throw Error(`Not supported!`)}},pr=class extends dr{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new vr(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new yr,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},mr=class extends dr{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new yr,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},hr=class extends dr{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,a,o,s,c,l){super(e,t,n,r),this._begin=new vr(i,this.id),this.beginCaptures=a,this._end=new vr(o||`￿`,-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=c||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new yr;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},gr=class extends dr{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,a,o,s,c){super(e,t,n,r),this._begin=new vr(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new vr(o,cr),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null),this._cachedCompiledWhilePatterns&&=(this._cachedCompiledWhilePatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new yr;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new yr,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||`￿`),this._cachedCompiledWhilePatterns}},_r=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new fr(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new pr(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(t.begin===void 0){t.repository&&(r=gn({},r,t.repository));let i=t.patterns;return i===void 0&&t.include&&(i=[{include:t.include}]),new mr(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new gr(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new hr(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let a=0;for(let e in t){if(e===`$vscodeTextmateLocation`)continue;let t=parseInt(e,10);t>a&&(a=t)}for(let e=0;e<=a;e++)i[e]=null;for(let a in t){if(a===`$vscodeTextmateLocation`)continue;let o=parseInt(a,10),s=0;t[a].patterns&&(s=e.getCompiledRuleId(t[a],n,r)),i[o]=e.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,s)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let a=0,o=t.length;a<o;a++){let o=t[a],s=-1;if(o.include){let t=ir(o.include);switch(t.kind){case 0:case 1:s=e.getCompiledRuleId(r[o.include],n,r);break;case 2:let i=r[t.ruleName];i&&(s=e.getCompiledRuleId(i,n,r));break;case 3:case 4:let a=t.scopeName,c=t.kind===4?t.ruleName:null,l=n.getExternalGrammar(a,r);if(l)if(c){let t=l.repository[c];t&&(s=e.getCompiledRuleId(t,n,l.repository))}else s=e.getCompiledRuleId(l.repository.$self,n,l.repository);break}}else s=e.getCompiledRuleId(o,n,r);if(s!==-1){let e=n.getRule(s),t=!1;if((e instanceof mr||e instanceof hr||e instanceof gr)&&e.hasMissingPatterns&&e.patterns.length===0&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},vr=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&typeof e==`string`){let t=e.length,n=0,r=[],i=!1;for(let a=0;a<t;a++)if(e.charAt(a)===`\\`&&a+1<t){let t=e.charAt(a+1);t===`z`?(r.push(e.substring(n,a)),r.push(`$(?!\\n)(?<!\\n)`),n=a+2):(t===`A`||t===`G`)&&(i=!0),a++}this.hasAnchor=i,n===0?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(``))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,typeof this.source==`string`?this.hasBackReferences=ar.test(this.source):this.hasBackReferences=!1}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let n=t.map(t=>e.substring(t.start,t.end));return or.lastIndex=0,this.source.replace(or,(e,t)=>Cn(n[parseInt(t,10)]||``))}_buildAnchorCache(){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let e=[],t=[],n=[],r=[],i,a,o,s;for(i=0,a=this.source.length;i<a;i++)o=this.source.charAt(i),e[i]=o,t[i]=o,n[i]=o,r[i]=o,o===`\\`&&i+1<a&&(s=this.source.charAt(i+1),s===`A`?(e[i+1]=`￿`,t[i+1]=`￿`,n[i+1]=`A`,r[i+1]=`A`):s===`G`?(e[i+1]=`￿`,t[i+1]=`G`,n[i+1]=`￿`,r[i+1]=`G`):(e[i+1]=s,t[i+1]=s,n[i+1]=s,r[i+1]=s),i++);return{A0_G0:e.join(``),A0_G1:t.join(``),A1_G0:n.join(``),A1_G1:r.join(``)}}resolveAnchors(e,t){return!this.hasAnchor||!this._anchorCache||typeof this.source!=`string`?this.source:e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},yr=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&=(this._cached.dispose(),null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(e=>e.source);this._cached=new br(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){return new br(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},br=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose==`function`&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(` - `+this.rules[t]+`: `+this.regExps[t]);return e.join(`
4
4
  `)}findNextMatchSync(e,t,n){let r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},xr=class{constructor(e,t){this.languageId=e,this.tokenType=t}},Sr=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new xr(e,8),this._embeddedLanguagesMatcher=new Cr(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?e._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new xr(0,0);_getBasicScopeAttributes=new wn(e=>new xr(this._scopeToLanguage(e),this._toStandardTokenType(e)));_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(t){let n=t.match(e.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case`comment`:return 1;case`string`:return 2;case`regex`:return 3;case`meta.embedded`:return 0}throw Error(`Unexpected match for standard token type!`)}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},Cr=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);let t=e.map(([e,t])=>Cn(e));t.sort(),t.reverse(),this.scopesRegExp=RegExp(`^((${t.join(`)|(`)}))($|\\.)`,``)}}match(e){if(!this.scopesRegExp)return;let t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}};typeof process<`u`&&process.env.VSCODE_TEXTMATE_DEBUG;var wr=!1,Tr=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function Er(e,t,n,r,i,a,o,s){let c=t.content.length,l=!1,u=-1;if(o){let o=Dr(e,t,n,r,i,a);i=o.stack,r=o.linePos,n=o.isFirstLine,u=o.anchorPosition}let d=Date.now();for(;!l;){if(s!==0&&Date.now()-d>s)return new Tr(i,!0);f()}return new Tr(i,!1);function f(){let o=Or(e,t,n,r,i,u);if(!o){a.produce(i,c),l=!0;return}let s=o.captureIndices,d=o.matchedRuleId,f=s&&s.length>0?s[0].end>r:!1;if(d===sr){let o=i.getRule(e);a.produce(i,s[0].start),i=i.withContentNameScopesList(i.nameScopesList),Pr(e,t,n,i,a,o.endCaptures,s),a.produce(i,s[0].end);let d=i;if(i=i.parent,u=d.getAnchorPos(),!f&&d.getEnterPos()===r){i=d,a.produce(i,c),l=!0;return}}else{let o=e.getRule(d);a.produce(i,s[0].start);let p=i,m=o.getName(t.content,s),h=i.contentNameScopesList.pushAttributed(m,e);if(i=i.push(d,r,u,s[0].end===c,null,h,h),o instanceof hr){let r=o;Pr(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.endHasBackReferences&&(i=i.withEndRule(r.getEndWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(o instanceof gr){let r=o;Pr(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.whileHasBackReferences&&(i=i.withEndRule(r.getWhileWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(Pr(e,t,n,i,a,o.captures,s),a.produce(i,s[0].end),i=i.pop(),!f){i=i.safePop(),a.produce(i,c),l=!0;return}}s[0].end>r&&(r=s[0].end,n=!1)}}function Dr(e,t,n,r,i,a){let o=i.beginRuleCapturedEOL?0:-1,s=[];for(let t=i;t;t=t.pop()){let n=t.getRule(e);n instanceof gr&&s.push({rule:n,stack:t})}for(let c=s.pop();c;c=s.pop()){let{ruleScanner:s,findOptions:l}=Mr(c.rule,e,c.stack.endRule,n,r===o),u=s.findNextMatchSync(t,r,l);if(u){if(u.ruleId!==cr){i=c.stack.pop();break}u.captureIndices&&u.captureIndices.length&&(a.produce(c.stack,u.captureIndices[0].start),Pr(e,t,n,c.stack,a,c.rule.whileCaptures,u.captureIndices),a.produce(c.stack,u.captureIndices[0].end),o=u.captureIndices[0].end,u.captureIndices[0].end>r&&(r=u.captureIndices[0].end,n=!1))}else{i=c.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:o,isFirstLine:n}}function Or(e,t,n,r,i,a){let o=kr(e,t,n,r,i,a),s=e.getInjections();if(s.length===0)return o;let c=Ar(s,e,t,n,r,i,a);if(!c)return o;if(!o)return c;let l=o.captureIndices[0].start,u=c.captureIndices[0].start;return u<l||c.priorityMatch&&u===l?c:o}function kr(e,t,n,r,i,a){let{ruleScanner:o,findOptions:s}=jr(i.getRule(e),e,i.endRule,n,r===a),c=o.findNextMatchSync(t,r,s);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function Ar(e,t,n,r,i,a,o){let s=Number.MAX_VALUE,c=null,l,u=0,d=a.contentNameScopesList.getScopeNames();for(let a=0,f=e.length;a<f;a++){let f=e[a];if(!f.matcher(d))continue;let{ruleScanner:p,findOptions:m}=jr(t.getRule(f.ruleId),t,null,r,i===o),h=p.findNextMatchSync(n,i,m);if(!h)continue;let g=h.captureIndices[0].start;if(!(g>=s)&&(s=g,c=h.captureIndices,l=h.ruleId,u=f.priority,s===i))break}return c?{priorityMatch:u===-1,captureIndices:c,matchedRuleId:l}:null}function jr(e,t,n,r,i){return wr?{ruleScanner:e.compile(t,n),findOptions:Nr(r,i)}:{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function Mr(e,t,n,r,i){return wr?{ruleScanner:e.compileWhile(t,n),findOptions:Nr(r,i)}:{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function Nr(e,t){let n=0;return e||(n|=1),t||(n|=4),n}function Pr(e,t,n,r,i,a,o){if(a.length===0)return;let s=t.content,c=Math.min(a.length,o.length),l=[],u=o[0].end;for(let t=0;t<c;t++){let c=a[t];if(c===null)continue;let d=o[t];if(d.length===0)continue;if(d.start>u)break;for(;l.length>0&&l[l.length-1].endPos<=d.start;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop();if(l.length>0?i.produceFromScopes(l[l.length-1].scopes,d.start):i.produce(r,d.start),c.retokenizeCapturedWithRuleId){let t=c.getName(s,o),a=r.contentNameScopesList.pushAttributed(t,e),l=c.getContentName(s,o),u=a.pushAttributed(l,e),f=r.push(c.retokenizeCapturedWithRuleId,d.start,-1,!1,null,a,u),p=e.createOnigString(s.substring(0,d.end));Er(e,p,n&&d.start===0,d.start,f,i,!1,0),Wn(p);continue}let f=c.getName(s,o);if(f!==null){let t=(l.length>0?l[l.length-1].scopes:r.contentNameScopesList).pushAttributed(f,e);l.push(new Fr(t,d.end))}}for(;l.length>0;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var Fr=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function Ir(e,t,n,r,i,a,o,s){return new Br(e,t,n,r,i,a,o,s)}function Lr(e,t,n,r,i){let a=Vn(t,Rr),o=_r.getCompiledRuleId(n,r,i.repository);for(let n of a)e.push({debugSelector:t,matcher:n.matcher,ruleId:o,grammar:i,priority:n.priority})}function Rr(e,t){if(t.length<e.length)return!1;let n=0;return e.every(e=>{for(let r=n;r<t.length;r++)if(zr(t[r],e))return n=r+1,!0;return!1})}function zr(e,t){if(!e)return!1;if(e===t)return!0;let n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]===`.`}var Br=class{constructor(e,t,n,r,i,a,o,s){if(this._rootScopeName=e,this.balancedBracketSelectors=a,this._onigLib=s,this._basicScopeAttributesProvider=new Sr(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=Vr(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(let e of Object.keys(i)){let t=Vn(e,Rr);for(let n of t)this._tokenTypeMatchers.push({matcher:n.matcher,type:i[e]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(let e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){let e={lookup:e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e),injections:e=>this._grammarRepository.injections(e)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){let e=r.injections;if(e)for(let n in e)Lr(t,n,e[n],this,r);let i=this._grammarRepository.injections(n);i&&i.forEach(e=>{let n=this.getExternalGrammar(e);if(n){let e=n.injectionSelector;e&&Lr(t,e,n,this,n)}})}return t.sort((e,t)=>e.priority-t.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){let t=++this._lastRuleId,n=e(lr(t));return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[ur(e)]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){let n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=Vr(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){let r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){let r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=_r.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===Ur.NULL){i=!0;let e=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),r=Rn.set(0,e.languageId,e.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),a=this.getRule(this._rootId).getName(null,null),o;o=a?Hr.createRootAndLookUpScopeName(a,r,this):Hr.createRoot(`unknown`,r),t=new Ur(null,this._rootId,-1,-1,!1,null,o,o)}else i=!1,t.reset();e+=`
5
5
  `;let a=this.createOnigString(e),o=a.content.length,s=new Gr(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=Er(this,a,i,0,t,s,!0,r);return Wn(a),{lineLength:o,lineTokens:s,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function Vr(e,t){return e=fn(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var Hr=class e{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static fromExtension(t,n){let r=t,i=t?.scopePath??null;for(let t of n)i=En.push(i,t.scopeNames),r=new e(r,i,t.encodedTokenAttributes);return r}static createRoot(t,n){return new e(null,new En(null,t),n)}static createRootAndLookUpScopeName(t,n,r){let i=r.getMetadataForScope(t),a=new En(null,t),o=r.themeProvider.themeMatch(a);return new e(null,a,e.mergeAttributes(n,i,o))}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(` `)}equals(t){return e.equals(this,t)}static equals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}while(!0)}static mergeAttributes(e,t,n){let r=-1,i=0,a=0;return n!==null&&(r=n.fontStyle,i=n.foregroundId,a=n.backgroundId),Rn.set(e,t.languageId,t.tokenType,null,r,i,a)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(` `)===-1)return e._pushAttributed(this,t,n);let r=t.split(/ /g),i=this;for(let t of r)i=e._pushAttributed(i,t,n);return i}static _pushAttributed(t,n,r){let i=r.getMetadataForScope(n),a=t.scopePath.push(n),o=r.themeProvider.themeMatch(a);return new e(t,a,e.mergeAttributes(t.tokenAttributes,i,o))}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===e?t.reverse():void 0}},Ur=class e{constructor(e,t,n,r,i,a,o,s){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=i,this.endRule=a,this.nameScopesList=o,this.contentNameScopesList=s,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=r}_stackElementBrand=void 0;static NULL=new e(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t===null?!1:e._equals(this,t)}static _equals(e,t){return e===t?!0:this._structuralEquals(e,t)?Hr.equals(e.contentNameScopesList,t.contentNameScopesList):!1}static _structuralEquals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}while(!0)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){e._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,a,o,s){return new e(this,t,n,r,i,a,o,s)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){let e=[];return this._writeString(e,0),`[`+e.join(`,`)+`]`}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(t){return this.endRule===t?this:new e(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:ur(this.ruleId),beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){let r=Hr.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,lr(n.ruleId),n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,Hr.fromExtension(r,n.contentNameScopesList))}},Wr=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>e===`*`?(this.allowAny=!0,[]):Vn(e,Rr).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>Vn(e,Rr).map(e=>e.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(let t of this.unbalancedBracketScopes)if(t(e))return!1;for(let t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},Gr=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e?.tokenAttributes??0,r=!1;if(this.balancedBracketSelectors?.matchesAlways&&(r=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let t=e?.getScopeNames()??[];for(let e of this._tokenTypeOverrides)e.matcher(t)&&(n=Rn.set(n,0,zn(e.type),null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(t))}if(r&&(n=Rn.set(n,0,8,r,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),this._lastTokenEndIndex=t;return}let n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);let n=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e<t;e++)n[e]=this._binaryTokens[e];return n}},Kr=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(let e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,i){if(!this._grammars.has(e)){let a=this._rawGrammars.get(e);if(!a)return null;this._grammars.set(e,Ir(e,a,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},qr=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new Kr(Tn.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(Tn.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new Wr(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,i){let a=new Jn(this._syncRegistry,e);for(;a.Q.length>0;)a.Q.map(e=>this._loadSingleGrammar(e.scopeName)),a.processQueue();return this._grammarForScopeName(e,t,n,r,i)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){let t=this._options.loadGrammar(e);if(t){let n=typeof this._options.getInjections==`function`?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}addGrammar(e,t=[],n=0,r=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,n,r)}_grammarForScopeName(e,t=0,n=null,r=null,i=null){return this._syncRegistry.grammarForScopeName(e,t,n,r,i)}},Jr=Ur.NULL;function Yr(e,t){let n=typeof e==`string`?{}:{...e.colorReplacements},r=typeof e==`string`?e:e.name;for(let[e,i]of Object.entries(t?.colorReplacements||{}))typeof i==`string`?n[e]=i:e===r&&Object.assign(n,i);return n}function Xr(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function Zr(e){return Array.isArray(e)?e:[e]}async function Qr(e){return Promise.resolve(typeof e==`function`?e():e).then(e=>e.default||e)}function $r(e){return!e||[`plaintext`,`txt`,`text`,`plain`].includes(e)}function ei(e){return e===`ansi`||$r(e)}function ti(e){return e===`none`}function ni(e){return ti(e)}var ri=/(\r?\n)/g;function ii(e,t=!1){if(e.length===0)return[[``,0]];let n=e.split(ri),r=0,i=[];for(let e=0;e<n.length;e+=2){let a=t?n[e]+(n[e+1]||``):n[e];i.push([a,r]),r+=n[e].length,r+=n[e+1]?.length||0}return i}var ai={light:`#333333`,dark:`#bbbbbb`},oi={light:`#fffffe`,dark:`#1e1e1e`},si=`__shiki_resolved`;function ci(e){if(e?.[si])return e;let t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||=`dark`,t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){let e=t.settings?t.settings.find(e=>!e.name&&!e.scope):void 0;e?.settings?.foreground&&(r=e.settings.foreground),e?.settings?.background&&(n=e.settings.background),!r&&t?.colors?.[`editor.foreground`]&&(r=t.colors[`editor.foreground`]),!n&&t?.colors?.[`editor.background`]&&(n=t.colors[`editor.background`]),r||=t.type===`light`?ai.light:ai.dark,n||=t.type===`light`?oi.light:oi.dark,t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0,a=new Map;function o(e){if(a.has(e))return a.get(e);i+=1;let n=`#${i.toString(16).padStart(8,`0`).toLowerCase()}`;return t.colorReplacements?.[`#${n}`]?o(e):(a.set(e,n),n)}t.settings=t.settings.map(e=>{let n=e.settings?.foreground&&!e.settings.foreground.startsWith(`#`),r=e.settings?.background&&!e.settings.background.startsWith(`#`);if(!n&&!r)return e;let i={...e,settings:{...e.settings}};if(n){let n=o(e.settings.foreground);t.colorReplacements[n]=e.settings.foreground,i.settings.foreground=n}if(r){let n=o(e.settings.background);t.colorReplacements[n]=e.settings.background,i.settings.background=n}return i});for(let e of Object.keys(t.colors||{}))if((e===`editor.foreground`||e===`editor.background`||e.startsWith(`terminal.ansi`))&&!t.colors[e]?.startsWith(`#`)){let n=o(t.colors[e]);t.colorReplacements[n]=t.colors[e],t.colors[e]=n}return Object.defineProperty(t,si,{enumerable:!1,writable:!1,value:!0}),t}async function li(e){return[...new Set((await Promise.all(e.filter(e=>!ei(e)).map(async e=>await Qr(e).then(e=>Array.isArray(e)?e:[e])))).flat())]}async function ui(e){return(await Promise.all(e.map(async e=>ni(e)?null:ci(await Qr(e))))).filter(e=>!!e)}function di(e,t){if(!t)return e;if(t[e]){let n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new dn(`Circular alias \`${[...n].join(` -> `)} -> ${e}\``);n.add(e)}}return e}var fi=class extends qr{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(e=>this.loadTheme(e)),this.loadLanguages(this._langs)}getTheme(e){return typeof e==`string`?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){let t=ci(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||=[...this._resolvedThemes.keys()],this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=Tn.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=di(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;let t=new Set([...this._langMap.values()].filter(t=>t.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);let n={balancedBracketSelectors:e.balancedBracketSelectors||[`*`],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);let r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(t=>{this._alias[t]=e.name}),this._loadedLanguagesCache=null,t.size)for(let e of t)this._resolvedGrammars.delete(e.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(e.scopeName),this._syncRegistry?._grammars?.delete(e.scopeName),this.loadLanguage(this._langMap.get(e.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(let t of e)this.resolveEmbeddedLanguages(t);let t=[...this._langGraph.entries()],n=t.filter(([e,t])=>!t);if(n.length){let e=t.filter(([e,t])=>t?(t.embeddedLanguages||t.embeddedLangs)?.some(e=>n.map(([e])=>e).includes(e)):!1).filter(e=>!n.includes(e));throw new dn(`Missing languages ${n.map(([e])=>`\`${e}\``).join(`, `)}, required by ${e.map(([e])=>`\`${e}\``).join(`, `)}`)}for(let[e,n]of t)this._resolver.addLanguage(n);for(let[e,n]of t)this.loadLanguage(n)}getLoadedLanguages(){return this._loadedLanguagesCache||=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])],this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);let t=e.embeddedLanguages??e.embeddedLangs;if(t)for(let e of t)this._langGraph.set(e,this._langMap.get(e))}},pi=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:t=>e.createScanner(t),createOnigString:t=>e.createString(t)},t.forEach(e=>this.addLanguage(e))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){let t=e.split(`.`),n=[];for(let e=1;e<=t.length;e++){let r=t.slice(0,e).join(`.`);n=[...n,...this._injections.get(r)||[]]}return n}},mi=0;function hi(e){mi+=1,e.warnings!==!1&&mi>=10&&mi%10==0&&console.warn(`[Shiki] ${mi} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new dn("`engine` option is required for synchronous mode");let n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(ci),i=new fi(new pi(e.engine,n),r,n,e.langAlias),a;function o(t){return di(t,e.langAlias)}function s(e){g();let t=i.getGrammar(typeof e==`string`?e:e.name);if(!t)throw new dn(`Language \`${e}\` not found, you may need to load it first`);return t}function c(e){if(e===`none`)return{bg:``,fg:``,name:`none`,settings:[],type:`dark`};g();let t=i.getTheme(e);if(!t)throw new dn(`Theme \`${e}\` not found, you may need to load it first`);return t}function l(e){g();let t=c(e);return a!==e&&(i.setTheme(t),a=e),{theme:t,colorMap:i.getColorMap()}}function u(){return g(),i.getLoadedThemes()}function d(){return g(),i.getLoadedLanguages()}function f(...e){g(),i.loadLanguages(e.flat(1))}async function p(...e){return f(await li(e))}function m(...e){g();for(let t of e.flat(1))i.loadTheme(t)}async function h(...e){return g(),m(await ui(e))}function g(){if(t)throw new dn(`Shiki instance has been disposed`)}function _(){t||(t=!0,i.dispose(),--mi)}return{setTheme:l,getTheme:c,getLanguage:s,getLoadedThemes:u,getLoadedLanguages:d,resolveLangAlias:o,loadLanguage:p,loadLanguageSync:f,loadTheme:h,loadThemeSync:m,dispose:_,[Symbol.dispose]:_}}async function gi(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([ui(e.themes||[]),li(e.langs||[]),e.engine]);return hi({...e,themes:t,langs:n,engine:r})}var _i=new WeakMap;function vi(e,t){_i.set(e,t)}function yi(e){return _i.get(e)}var bi=class e{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new e(Object.fromEntries(Zr(n).map(e=>[e,Jr])),t)}constructor(...e){if(e.length===2){let[t,n]=e;this.lang=n,this._stacks=t}else{let[t,n,r]=e;this.lang=n,this._stacks={[r]:t}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return xi(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function xi(e){let t=[],n=new Set;function r(e){if(n.has(e))return;n.add(e);let i=e?.nameScopesList?.scopeName;i&&t.push(i),e.parent&&r(e.parent)}return r(e),t}function Si(e,t){if(!(e instanceof bi))throw new dn(`Invalid grammar state`);return e.getInternalStack(t)}var Ci=/,/,wi=/ /;function Ti(e,t,n={}){let{theme:r=e.getLoadedThemes()[0]}=n;if($r(e.resolveLangAlias(n.lang||`text`))||ti(r))return ii(t).map(e=>[{content:e[0],offset:e[1]}]);let{theme:i,colorMap:a}=e.setTheme(r),o=e.getLanguage(n.lang||`text`);if(n.grammarState){if(n.grammarState.lang!==o.name)throw new dn(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${o.name}"`);if(!n.grammarState.themes.includes(i.name))throw new dn(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return Di(t,o,i,a,n)}function Ei(...e){if(e.length===2)return yi(e[1]);let[t,n,r={}]=e,{lang:i=`text`,theme:a=t.getLoadedThemes()[0]}=r;if($r(i)||ti(a))throw new dn(`Plain language does not have grammar state`);if(i===`ansi`)throw new dn(`ANSI language does not have grammar state`);let{theme:o,colorMap:s}=t.setTheme(a),c=t.getLanguage(i);return new bi(Oi(n,c,o,s,r).stateStack,c.name,o.name)}function Di(e,t,n,r,i){let a=Oi(e,t,n,r,i),o=new bi(a.stateStack,t.name,n.name);return vi(a.tokens,o),a.tokens}function Oi(e,t,n,r,i){let a=Yr(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:s=500}=i,c=ii(e),l=i.grammarState?Si(i.grammarState,n.name)??Jr:i.grammarContextCode==null?Jr:Oi(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack,u=[],d=[];for(let e=0,f=c.length;e<f;e++){let[f,p]=c[e];if(f===``){u=[],d.push([]);continue}if(o>0&&f.length>=o){u=[],d.push([{content:f,offset:p,color:``,fontStyle:0}]);continue}let m,h,g;i.includeExplanation&&(m=t.tokenizeLine(f,l,s),h=m.tokens,g=0);let _=t.tokenizeLine2(f,l,s),v=_.tokens.length/2;for(let e=0;e<v;e++){let t=_.tokens[2*e],o=e+1<v?_.tokens[2*e+2]:f.length;if(t===o)continue;let s=_.tokens[2*e+1],c=Xr(r[Rn.getForeground(s)],a),l=Rn.getFontStyle(s),d={content:f.substring(t,o),offset:p+t,color:c,fontStyle:l};if(i.includeExplanation){let e=[];if(i.includeExplanation!==`scopeName`)for(let t of n.settings){let n;switch(typeof t.scope){case`string`:n=t.scope.split(Ci).map(e=>e.trim());break;case`object`:n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(wi))})}d.explanation=[];let r=0;for(;t+r<o;){let t=h[g],n=f.substring(t.startIndex,t.endIndex);r+=n.length,d.explanation.push({content:n,scopes:i.includeExplanation===`scopeName`?ki(t.scopes):Ai(e,t.scopes)}),g+=1}}u.push(d)}d.push(u),u=[],l=_.ruleStack}return{tokens:d,stateStack:l}}function ki(e){return e.map(e=>({scopeName:e}))}function Ai(e,t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];n[r]={scopeName:i,themeMatches:Ni(e,i,t.slice(0,r))}}return n}function ji(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]===`.`}function Mi(e,t,n){if(!ji(e.at(-1),t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)ji(e[r],n[i])&&--r,--i;return r===-1}function Ni(e,t,n){let r=[];for(let{selectors:i,settings:a}of e)for(let e of i)if(Mi(e,t,n)){r.push(a);break}return r}function Pi(e,t,n,r=Ti){let i=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),a=i.map(i=>{let a=r(e,t,{...n,theme:i.theme});return{tokens:a,state:yi(a),theme:typeof i.theme==`string`?i.theme:i.theme.name}}),o=Fi(...a.map(e=>e.tokens)),s=o[0].map((e,t)=>e.map((e,r)=>{let a={content:e.content,variants:{},offset:e.offset};return`includeExplanation`in n&&n.includeExplanation&&(a.explanation=e.explanation),o.forEach((e,n)=>{let{content:o,explanation:s,offset:c,...l}=e[t][r];a.variants[i[n].color]=l}),a})),c=a[0].state?new bi(Object.fromEntries(a.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),a[0].state.lang):void 0;return c&&vi(s,c),s}function Fi(...e){let t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){let i=e.map(e=>e[r]),a=t.map(()=>[]);t.forEach((e,t)=>e.push(a[t]));let o=i.map(()=>0),s=i.map(e=>e[0]);for(;s.every(e=>e);){let e=Math.min(...s.map(e=>e.content.length));for(let t=0;t<n;t++){let n=s[t];n.content.length===e?(a[t].push(n),o[t]+=1,s[t]=i[t][o[t]]):(a[t].push({...n,content:n.content.slice(0,e)}),s[t]={...n,content:n.content.slice(e),offset:n.offset+e})}}}return t}var Ii=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`],Li=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};Li.prototype.normal={},Li.prototype.property={},Li.prototype.space=void 0;function Ri(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new Li(n,r,t)}function zi(e){return e.toLowerCase()}var Bi=class{constructor(e,t){this.attribute=t,this.property=e}};Bi.prototype.attribute=``,Bi.prototype.booleanish=!1,Bi.prototype.boolean=!1,Bi.prototype.commaOrSpaceSeparated=!1,Bi.prototype.commaSeparated=!1,Bi.prototype.defined=!1,Bi.prototype.mustUseProperty=!1,Bi.prototype.number=!1,Bi.prototype.overloadedBoolean=!1,Bi.prototype.property=``,Bi.prototype.spaceSeparated=!1,Bi.prototype.space=void 0;var Vi=u({boolean:()=>Ui,booleanish:()=>Wi,commaOrSpaceSeparated:()=>Ji,commaSeparated:()=>qi,number:()=>$,overloadedBoolean:()=>Gi,spaceSeparated:()=>Ki}),Hi=0,Ui=Yi(),Wi=Yi(),Gi=Yi(),$=Yi(),Ki=Yi(),qi=Yi(),Ji=Yi();function Yi(){return 2**++Hi}var Xi=Object.keys(Vi),Zi=class extends Bi{constructor(e,t,n,r){let i=-1;if(super(e,t),Qi(this,`space`,r),typeof n==`number`)for(;++i<Xi.length;){let e=Xi[i];Qi(this,Xi[i],(n&Vi[e])===Vi[e])}}};Zi.prototype.defined=!0;function Qi(e,t,n){n&&(e[t]=n)}function $i(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new Zi(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[zi(r)]=r,n[zi(a.attribute)]=r}return new Li(t,n,e.space)}var ea=$i({properties:{ariaActiveDescendant:null,ariaAtomic:Wi,ariaAutoComplete:null,ariaBusy:Wi,ariaChecked:Wi,ariaColCount:$,ariaColIndex:$,ariaColSpan:$,ariaControls:Ki,ariaCurrent:null,ariaDescribedBy:Ki,ariaDetails:null,ariaDisabled:Wi,ariaDropEffect:Ki,ariaErrorMessage:null,ariaExpanded:Wi,ariaFlowTo:Ki,ariaGrabbed:Wi,ariaHasPopup:null,ariaHidden:Wi,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ki,ariaLevel:$,ariaLive:null,ariaModal:Wi,ariaMultiLine:Wi,ariaMultiSelectable:Wi,ariaOrientation:null,ariaOwns:Ki,ariaPlaceholder:null,ariaPosInSet:$,ariaPressed:Wi,ariaReadOnly:Wi,ariaRelevant:null,ariaRequired:Wi,ariaRoleDescription:Ki,ariaRowCount:$,ariaRowIndex:$,ariaRowSpan:$,ariaSelected:Wi,ariaSetSize:$,ariaSort:null,ariaValueMax:$,ariaValueMin:$,ariaValueNow:$,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function ta(e,t){return t in e?e[t]:t}function na(e,t){return ta(e,t.toLowerCase())}var ra=$i({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:qi,acceptCharset:Ki,accessKey:Ki,action:null,allow:null,allowFullScreen:Ui,allowPaymentRequest:Ui,allowUserMedia:Ui,alpha:Ui,alt:null,as:null,async:Ui,autoCapitalize:null,autoComplete:Ki,autoFocus:Ui,autoPlay:Ui,blocking:Ki,capture:null,charSet:null,checked:Ui,cite:null,className:Ki,closedBy:null,colorSpace:null,cols:$,colSpan:$,command:null,commandFor:null,content:null,contentEditable:Wi,controls:Ui,controlsList:Ki,coords:$|qi,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ui,defer:Ui,dir:null,dirName:null,disabled:Ui,download:Gi,draggable:Wi,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ui,formTarget:null,headers:Ki,height:$,hidden:Gi,high:$,href:null,hrefLang:null,htmlFor:Ki,httpEquiv:Ki,id:null,imageSizes:null,imageSrcSet:null,inert:Ui,inputMode:null,integrity:null,is:null,isMap:Ui,itemId:null,itemProp:Ki,itemRef:Ki,itemScope:Ui,itemType:Ki,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ui,low:$,manifest:null,max:null,maxLength:$,media:null,method:null,min:null,minLength:$,multiple:Ui,muted:Ui,name:null,nonce:null,noModule:Ui,noValidate:Ui,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ui,optimum:$,pattern:null,ping:Ki,placeholder:null,playsInline:Ui,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ui,referrerPolicy:null,rel:Ki,required:Ui,reversed:Ui,rows:$,rowSpan:$,sandbox:Ki,scope:null,scoped:Ui,seamless:Ui,selected:Ui,shadowRootClonable:Ui,shadowRootCustomElementRegistry:Ui,shadowRootDelegatesFocus:Ui,shadowRootMode:null,shadowRootSerializable:Ui,shape:null,size:$,sizes:null,slot:null,span:$,spellCheck:Wi,src:null,srcDoc:null,srcLang:null,srcSet:null,start:$,step:null,style:null,tabIndex:$,target:null,title:null,translate:null,type:null,typeMustMatch:Ui,useMap:null,value:Wi,width:$,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ki,axis:null,background:null,bgColor:null,border:$,borderColor:null,bottomMargin:$,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ui,declare:Ui,event:null,face:null,frame:null,frameBorder:null,hSpace:$,leftMargin:$,link:null,longDesc:null,lowSrc:null,marginHeight:$,marginWidth:$,noResize:Ui,noHref:Ui,noShade:Ui,noWrap:Ui,object:null,profile:null,prompt:null,rev:null,rightMargin:$,rules:null,scheme:null,scrolling:Wi,standby:null,summary:null,text:null,topMargin:$,valueType:null,version:null,vAlign:null,vLink:null,vSpace:$,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Ui,disablePictureInPicture:Ui,disableRemotePlayback:Ui,exportParts:qi,part:Ki,prefix:null,property:null,results:$,security:null,unselectable:null},space:`html`,transform:na}),ia=$i({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,maskType:`mask-type`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:Ji,accentHeight:$,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:$,amplitude:$,arabicForm:null,ascent:$,attributeName:null,attributeType:null,azimuth:$,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:$,by:null,calcMode:null,capHeight:$,className:Ki,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:$,diffuseConstant:$,direction:null,display:null,dur:null,divisor:$,dominantBaseline:null,download:Ui,dx:null,dy:null,edgeMode:null,editable:null,elevation:$,enableBackground:null,end:null,event:null,exponent:$,externalResourcesRequired:null,fill:null,fillOpacity:$,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:qi,g2:qi,glyphName:qi,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:$,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:$,horizOriginX:$,horizOriginY:$,id:null,ideographic:$,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:$,k:$,k1:$,k2:$,k3:$,k4:$,kernelMatrix:Ji,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:$,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:$,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:$,overlineThickness:$,paintOrder:null,panose1:null,path:null,pathLength:$,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ki,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:$,pointsAtY:$,pointsAtZ:$,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ji,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ji,rev:Ji,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ji,requiredFeatures:Ji,requiredFonts:Ji,requiredFormats:Ji,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:$,specularExponent:$,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:$,strikethroughThickness:$,string:null,stroke:null,strokeDashArray:Ji,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:$,strokeOpacity:$,strokeWidth:null,style:null,surfaceScale:$,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ji,tabIndex:$,tableValues:null,target:null,targetX:$,targetY:$,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ji,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:$,underlineThickness:$,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:$,values:null,vAlphabetic:$,vMathematical:$,vectorEffect:null,vHanging:$,vIdeographic:$,version:null,vertAdvY:$,vertOriginX:$,vertOriginY:$,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:$,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:ta}),aa=$i({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),oa=$i({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:na}),sa=$i({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),ca=/[A-Z]/g,la=/-[a-z]/g,ua=/^data[-\w.:]+$/i;function da(e,t){let n=zi(t),r=t,i=Bi;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&ua.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(la,pa);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!la.test(e)){let n=e.replace(ca,fa);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=Zi}return new i(r,t)}function fa(e){return`-`+e.toLowerCase()}function pa(e){return e.charAt(1).toUpperCase()}var ma=Ri([ea,ra,aa,oa,sa],`html`),ha=Ri([ea,ia,aa,oa,sa],`svg`),ga={}.hasOwnProperty;function _a(e,t){let n=t||{};function r(t,...n){let i=r.invalid,a=r.handlers;if(t&&ga.call(t,e)){let n=String(t[e]);i=ga.call(a,n)?a[n]:r.unknown}if(i)return i.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var va=/["&'<>`]/g,ya=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,ba=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,xa=/[|\\{}()[\]^$+*?.]/g,Sa=new WeakMap;function Ca(e,t){if(e=e.replace(t.subset?wa(t.subset):va,r),t.subset||t.escapeOnly)return e;return e.replace(ya,n).replace(ba,r);function n(e,n,r){return t.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}function r(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}function wa(e){let t=Sa.get(e);return t||(t=Ta(e),Sa.set(e,t)),t}function Ta(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(xa,`\\$&`));return RegExp(`(?:`+t.join(`|`)+`)`,`g`)}var Ea=/[\dA-Fa-f]/;function Da(e,t,n){let r=`&#x`+e.toString(16).toUpperCase();return n&&t&&!Ea.test(String.fromCharCode(t))?r:r+`;`}var Oa=/\d/;function ka(e,t,n){let r=`&#`+String(e);return n&&t&&!Oa.test(String.fromCharCode(t))?r:r+`;`}var Aa=`AElig.AMP.Aacute.Acirc.Agrave.Aring.Atilde.Auml.COPY.Ccedil.ETH.Eacute.Ecirc.Egrave.Euml.GT.Iacute.Icirc.Igrave.Iuml.LT.Ntilde.Oacute.Ocirc.Ograve.Oslash.Otilde.Ouml.QUOT.REG.THORN.Uacute.Ucirc.Ugrave.Uuml.Yacute.aacute.acirc.acute.aelig.agrave.amp.aring.atilde.auml.brvbar.ccedil.cedil.cent.copy.curren.deg.divide.eacute.ecirc.egrave.eth.euml.frac12.frac14.frac34.gt.iacute.icirc.iexcl.igrave.iquest.iuml.laquo.lt.macr.micro.middot.nbsp.not.ntilde.oacute.ocirc.ograve.ordf.ordm.oslash.otilde.ouml.para.plusmn.pound.quot.raquo.reg.sect.shy.sup1.sup2.sup3.szlig.thorn.times.uacute.ucirc.ugrave.uml.uuml.yacute.yen.yuml`.split(`.`),ja={nbsp:`\xA0`,iexcl:`¡`,cent:`¢`,pound:`£`,curren:`¤`,yen:`¥`,brvbar:`¦`,sect:`§`,uml:`¨`,copy:`©`,ordf:`ª`,laquo:`«`,not:`¬`,shy:`­`,reg:`®`,macr:`¯`,deg:`°`,plusmn:`±`,sup2:`²`,sup3:`³`,acute:`´`,micro:`µ`,para:`¶`,middot:`·`,cedil:`¸`,sup1:`¹`,ordm:`º`,raquo:`»`,frac14:`¼`,frac12:`½`,frac34:`¾`,iquest:`¿`,Agrave:`À`,Aacute:`Á`,Acirc:`Â`,Atilde:`Ã`,Auml:`Ä`,Aring:`Å`,AElig:`Æ`,Ccedil:`Ç`,Egrave:`È`,Eacute:`É`,Ecirc:`Ê`,Euml:`Ë`,Igrave:`Ì`,Iacute:`Í`,Icirc:`Î`,Iuml:`Ï`,ETH:`Ð`,Ntilde:`Ñ`,Ograve:`Ò`,Oacute:`Ó`,Ocirc:`Ô`,Otilde:`Õ`,Ouml:`Ö`,times:`×`,Oslash:`Ø`,Ugrave:`Ù`,Uacute:`Ú`,Ucirc:`Û`,Uuml:`Ü`,Yacute:`Ý`,THORN:`Þ`,szlig:`ß`,agrave:`à`,aacute:`á`,acirc:`â`,atilde:`ã`,auml:`ä`,aring:`å`,aelig:`æ`,ccedil:`ç`,egrave:`è`,eacute:`é`,ecirc:`ê`,euml:`ë`,igrave:`ì`,iacute:`í`,icirc:`î`,iuml:`ï`,eth:`ð`,ntilde:`ñ`,ograve:`ò`,oacute:`ó`,ocirc:`ô`,otilde:`õ`,ouml:`ö`,divide:`÷`,oslash:`ø`,ugrave:`ù`,uacute:`ú`,ucirc:`û`,uuml:`ü`,yacute:`ý`,thorn:`þ`,yuml:`ÿ`,fnof:`ƒ`,Alpha:`Α`,Beta:`Β`,Gamma:`Γ`,Delta:`Δ`,Epsilon:`Ε`,Zeta:`Ζ`,Eta:`Η`,Theta:`Θ`,Iota:`Ι`,Kappa:`Κ`,Lambda:`Λ`,Mu:`Μ`,Nu:`Ν`,Xi:`Ξ`,Omicron:`Ο`,Pi:`Π`,Rho:`Ρ`,Sigma:`Σ`,Tau:`Τ`,Upsilon:`Υ`,Phi:`Φ`,Chi:`Χ`,Psi:`Ψ`,Omega:`Ω`,alpha:`α`,beta:`β`,gamma:`γ`,delta:`δ`,epsilon:`ε`,zeta:`ζ`,eta:`η`,theta:`θ`,iota:`ι`,kappa:`κ`,lambda:`λ`,mu:`μ`,nu:`ν`,xi:`ξ`,omicron:`ο`,pi:`π`,rho:`ρ`,sigmaf:`ς`,sigma:`σ`,tau:`τ`,upsilon:`υ`,phi:`φ`,chi:`χ`,psi:`ψ`,omega:`ω`,thetasym:`ϑ`,upsih:`ϒ`,piv:`ϖ`,bull:`•`,hellip:`…`,prime:`′`,Prime:`″`,oline:`‾`,frasl:`⁄`,weierp:`℘`,image:`ℑ`,real:`ℜ`,trade:`™`,alefsym:`ℵ`,larr:`←`,uarr:`↑`,rarr:`→`,darr:`↓`,harr:`↔`,crarr:`↵`,lArr:`⇐`,uArr:`⇑`,rArr:`⇒`,dArr:`⇓`,hArr:`⇔`,forall:`∀`,part:`∂`,exist:`∃`,empty:`∅`,nabla:`∇`,isin:`∈`,notin:`∉`,ni:`∋`,prod:`∏`,sum:`∑`,minus:`−`,lowast:`∗`,radic:`√`,prop:`∝`,infin:`∞`,ang:`∠`,and:`∧`,or:`∨`,cap:`∩`,cup:`∪`,int:`∫`,there4:`∴`,sim:`∼`,cong:`≅`,asymp:`≈`,ne:`≠`,equiv:`≡`,le:`≤`,ge:`≥`,sub:`⊂`,sup:`⊃`,nsub:`⊄`,sube:`⊆`,supe:`⊇`,oplus:`⊕`,otimes:`⊗`,perp:`⊥`,sdot:`⋅`,lceil:`⌈`,rceil:`⌉`,lfloor:`⌊`,rfloor:`⌋`,lang:`〈`,rang:`〉`,loz:`◊`,spades:`♠`,clubs:`♣`,hearts:`♥`,diams:`♦`,quot:`"`,amp:`&`,lt:`<`,gt:`>`,OElig:`Œ`,oelig:`œ`,Scaron:`Š`,scaron:`š`,Yuml:`Ÿ`,circ:`ˆ`,tilde:`˜`,ensp:` `,emsp:` `,thinsp:` `,zwnj:`‌`,zwj:`‍`,lrm:`‎`,rlm:`‏`,ndash:`–`,mdash:`—`,lsquo:`‘`,rsquo:`’`,sbquo:`‚`,ldquo:`“`,rdquo:`”`,bdquo:`„`,dagger:`†`,Dagger:`‡`,permil:`‰`,lsaquo:`‹`,rsaquo:`›`,euro:`€`},Ma=[`cent`,`copy`,`divide`,`gt`,`lt`,`not`,`para`,`times`],Na={}.hasOwnProperty,Pa={},Fa;for(Fa in ja)Na.call(ja,Fa)&&(Pa[ja[Fa]]=Fa);var Ia=/[^\dA-Za-z]/;function La(e,t,n,r){let i=String.fromCharCode(e);if(Na.call(Pa,i)){let e=Pa[i],a=`&`+e;return n&&Aa.includes(e)&&!Ma.includes(e)&&(!r||t&&t!==61&&Ia.test(String.fromCharCode(t)))?a:a+`;`}return``}function Ra(e,t,n){let r=Da(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=La(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){let i=ka(e,t,n.omitOptionalSemicolons);i.length<r.length&&(r=i)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function za(e,t){return Ca(e,Object.assign({format:Ra},t))}var Ba=/^>|^->|<!--|-->|--!>|<!-$/g,Va=[`>`],Ha=[`<`,`>`];function Ua(e,t,n,r){return r.settings.bogusComments?`<?`+za(e.value,Object.assign({},r.settings.characterReferences,{subset:Va}))+`>`:`<!--`+e.value.replace(Ba,i)+`-->`;function i(e){return za(e,Object.assign({},r.settings.characterReferences,{subset:Ha}))}}function Wa(e,t,n,r){return`<!`+(r.settings.upperDoctype?`DOCTYPE`:`doctype`)+(r.settings.tightDoctype?``:` `)+`html>`}function Ga(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function Ka(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}function qa(e){return e.join(` `).trim()}var Ja=/[ \t\n\f\r]/g;function Ya(e){return typeof e==`object`?e.type===`text`?Xa(e.value):!1:Xa(e)}function Xa(e){return e.replace(Ja,``)===``}var Za=eo(1),Qa=eo(-1),$a=[];function eo(e){return t;function t(t,n,r){let i=t?t.children:$a,a=(n||0)+e,o=i[a];if(!r)for(;o&&Ya(o);)a+=e,o=i[a];return o}}var to={}.hasOwnProperty;function no(e){return t;function t(t,n,r){return to.call(e,t.tagName)&&e[t.tagName](t,n,r)}}var ro=no({body:oo,caption:io,colgroup:io,dd:uo,dt:lo,head:io,html:ao,li:co,optgroup:po,option:mo,p:so,rp:fo,rt:fo,tbody:go,td:yo,tfoot:_o,th:yo,thead:ho,tr:vo});function io(e,t,n){let r=Za(n,t,!0);return!r||r.type!==`comment`&&!(r.type===`text`&&Ya(r.value.charAt(0)))}function ao(e,t,n){let r=Za(n,t);return!r||r.type!==`comment`}function oo(e,t,n){let r=Za(n,t);return!r||r.type!==`comment`}function so(e,t,n){let r=Za(n,t);return r?r.type===`element`&&(r.tagName===`address`||r.tagName===`article`||r.tagName===`aside`||r.tagName===`blockquote`||r.tagName===`details`||r.tagName===`div`||r.tagName===`dl`||r.tagName===`fieldset`||r.tagName===`figcaption`||r.tagName===`figure`||r.tagName===`footer`||r.tagName===`form`||r.tagName===`h1`||r.tagName===`h2`||r.tagName===`h3`||r.tagName===`h4`||r.tagName===`h5`||r.tagName===`h6`||r.tagName===`header`||r.tagName===`hgroup`||r.tagName===`hr`||r.tagName===`main`||r.tagName===`menu`||r.tagName===`nav`||r.tagName===`ol`||r.tagName===`p`||r.tagName===`pre`||r.tagName===`section`||r.tagName===`table`||r.tagName===`ul`):!n||!(n.type===`element`&&(n.tagName===`a`||n.tagName===`audio`||n.tagName===`del`||n.tagName===`ins`||n.tagName===`map`||n.tagName===`noscript`||n.tagName===`video`))}function co(e,t,n){let r=Za(n,t);return!r||r.type===`element`&&r.tagName===`li`}function lo(e,t,n){let r=Za(n,t);return!!(r&&r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`))}function uo(e,t,n){let r=Za(n,t);return!r||r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`)}function fo(e,t,n){let r=Za(n,t);return!r||r.type===`element`&&(r.tagName===`rp`||r.tagName===`rt`)}function po(e,t,n){let r=Za(n,t);return!r||r.type===`element`&&r.tagName===`optgroup`}function mo(e,t,n){let r=Za(n,t);return!r||r.type===`element`&&(r.tagName===`option`||r.tagName===`optgroup`)}function ho(e,t,n){let r=Za(n,t);return!!(r&&r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`))}function go(e,t,n){let r=Za(n,t);return!r||r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`)}function _o(e,t,n){return!Za(n,t)}function vo(e,t,n){let r=Za(n,t);return!r||r.type===`element`&&r.tagName===`tr`}function yo(e,t,n){let r=Za(n,t);return!r||r.type===`element`&&(r.tagName===`td`||r.tagName===`th`)}var bo=no({body:Co,colgroup:wo,head:So,html:xo,tbody:To});function xo(e){let t=Za(e,-1);return!t||t.type!==`comment`}function So(e){let t=new Set;for(let n of e.children)if(n.type===`element`&&(n.tagName===`base`||n.tagName===`title`)){if(t.has(n.tagName))return!1;t.add(n.tagName)}let n=e.children[0];return!n||n.type===`element`}function Co(e){let t=Za(e,-1,!0);return!t||t.type!==`comment`&&!(t.type===`text`&&Ya(t.value.charAt(0)))&&!(t.type===`element`&&(t.tagName===`meta`||t.tagName===`link`||t.tagName===`script`||t.tagName===`style`||t.tagName===`template`))}function wo(e,t,n){let r=Qa(n,t),i=Za(e,-1,!0);return n&&r&&r.type===`element`&&r.tagName===`colgroup`&&ro(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`col`)}function To(e,t,n){let r=Qa(n,t),i=Za(e,-1);return n&&r&&r.type===`element`&&(r.tagName===`thead`||r.tagName===`tbody`)&&ro(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`tr`)}var Eo={name:[[`
6
6
  \f\r &/=>`.split(``),`