@moubing/bing-ui 0.8.0 → 0.8.1

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,W,G;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,W=O[O.length-1],F=C?W.slice(-1)===` `:!W,W||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,G=0;G<R.length;G++)M.appendChild(R[G]===` `?document.createTextNode(` `):r(R[G]));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=(0,t.ref)(null),c,l,u,d,f,p=!1,m=!1,h=!1,g=``,_,v=(0,t.computed)(()=>i.effect!==`none`&&!i.disabled),y=(0,t.computed)(()=>v.value&&i.effect===`shine`),b=(0,t.computed)(()=>v.value&&i.effect===`jump`),x=(0,t.computed)(()=>[`bing-animated-text`,`bing-animated-text--${i.effect}`,{"is-disabled":i.disabled,"is-shine-active":y.value,[`bing-animated-text--shine-${i.trigger}`]:y.value,[`bing-animated-text--shine-direction-${i.shineDirection}`]:y.value,[`bing-animated-text--jump-${i.trigger}`]:b.value}]),S=(0,t.computed)(()=>{let e={};return b.value&&(e[`--animated-text-jump-room`]=`${Math.max(2,Math.abs(Math.min(0,i.jumpY))+2)}px`),y.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 C(){return typeof window<`u`&&typeof document<`u`}function w(){return C()&&typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function T(){r||=(n.gsap.registerPlugin(I),!0)}function E(){p=!1,a.value?.removeAttribute(`data-jump-playing`),a.value?.removeAttribute(`data-jump-ready`),u?.kill(),u=void 0,c?.revert(),c=void 0,l?.revert(),l=void 0,s.value?.replaceChildren()}function D(){return i.shineDirection===`left`?{start:`150% 0`,end:`-150% 0`}:{start:`-150% 0`,end:`150% 0`}}function O(){m=!1,a.value?.removeAttribute(`data-shine-playing`),d?.kill(),d=void 0,f?.kill(),f=void 0,o.value&&n.gsap.set(o.value,{clearProps:`backgroundPosition`})}function k(){i.trigger!==`always`||!y.value||w()||(f?.kill(),f=n.gsap.delayedCall(Math.max(0,i.shineInterval),()=>{f=void 0,A(0)}))}function A(e=i.shineDelay){let t=o.value;if(m||f||!t||!y.value||w())return;let r=D();m=!0,a.value?.setAttribute(`data-shine-playing`,`true`),n.gsap.set(t,{backgroundPosition:r.start}),d=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}),m=!1,d=void 0,a.value?.removeAttribute(`data-shine-playing`),k()}})}function j(){O(),!(!y.value||!o.value||w())&&(n.gsap.set(o.value,{backgroundPosition:D().start}),(i.trigger===`always`||i.trigger===`once`)&&A())}function M(){if(p||!c?.chars.length||!b.value||w())return;let e=Math.max(.1,i.jumpDuration),t=i.trigger===`always`;p=!0,a.value?.setAttribute(`data-jump-playing`,`true`),u=n.gsap.timeline({repeat:t?-1:0,repeatDelay:Math.max(0,i.jumpRepeatDelay),onComplete:()=>{p=!1,u=void 0,a.value?.removeAttribute(`data-jump-playing`)}}),u.fromTo(c.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 N(){E();let e=o.value,t=s.value,r=a.value;g=e?.innerHTML??``,!(!b.value||!e||!t||!r||w())&&(T(),t.innerHTML=g,t.querySelectorAll(`[id]`).forEach(e=>e.removeAttribute(`id`)),l=n.gsap.context(()=>{c=I.create(t,{type:`words, chars`,tag:`span`,aria:`hidden`,wordsClass:`bing-animated-text__word`,charsClass:`bing-animated-text__char`}),c.words.forEach(e=>{/[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}]/u.test(e.textContent??``)&&e.classList.add(`bing-animated-text__word--breakable`)}),n.gsap.set(c.chars,{display:`inline-block`,transformOrigin:`50% 100%`,willChange:`transform`}),r.setAttribute(`data-jump-ready`,`true`),(i.trigger===`always`||i.trigger===`once`)&&M()},r))}function P(){!C()||h||(h=!0,(0,t.nextTick)(()=>{h=!1,a.value&&N()}))}function F(){C()&&(0,t.nextTick)(()=>{j()})}function L(){i.trigger===`hover`&&(y.value&&A(),b.value&&M())}(0,t.watch)(()=>[i.effect,i.trigger,i.disabled,i.shineSpeed,i.shineDelay,i.shineInterval,i.shineDirection,i.shineAngle,i.shineColor,i.shineBaseColor],F,{flush:`post`}),(0,t.watch)(()=>[i.effect,i.trigger,i.disabled,i.jumpY,i.jumpStagger,i.jumpDuration,i.jumpEase,i.jumpReturnEase,i.jumpRepeatDelay],P,{flush:`post`}),(0,t.onMounted)(()=>{_=window.matchMedia?.(`(prefers-reduced-motion: reduce)`),_?.addEventListener(`change`,R),F(),P()}),(0,t.onUpdated)(()=>{o.value?.innerHTML!==g&&P()}),(0,t.onUnmounted)(()=>{_?.removeEventListener(`change`,R),O(),E()});function R(){F(),P()}return(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{ref_key:`rootRef`,ref:a,class:(0,t.normalizeClass)(x.value),style:(0,t.normalizeStyle)(S.value),onMouseenter:L},[(0,t.createElementVNode)(`span`,{ref_key:`contentRef`,ref:o,class:`bing-animated-text__content`},[(0,t.renderSlot)(e.$slots,`default`,{},void 0,!0)],512),(0,t.createElementVNode)(`span`,{ref_key:`jumpContentRef`,ref:s,class:`bing-animated-text__jump-layer`,"aria-hidden":`true`,inert:``},null,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-f9925891`]]),B=12,V=3;function H(){let e=new Set;function t(){for(let t of e)t()}function r(t,r){let i=t.ownerDocument,a=i.defaultView;if(!a||!t.isConnected)return;let o=a.matchMedia?.(`(prefers-reduced-motion: reduce)`);if(o?.matches)return;let s=t.getBoundingClientRect();if(!s.width||!s.height)return;let c=a.getComputedStyle(t),l=c.getPropertyValue(`--bing-click-particle-color`).trim(),u=!l||l.toLowerCase()===`currentcolor`?c.color:l,d=r,f=Number.isFinite(d.clientX)&&(d.detail>0||!!d.pointerType),p=f?Math.max(s.left,Math.min(s.right,d.clientX)):s.left+s.width/2,m=f?Math.max(s.top,Math.min(s.bottom,d.clientY)):s.top+s.height/2;e.size>=V&&e.values().next().value?.();let h=i.createElement(`span`);h.className=`bing-click-particles`,h.setAttribute(`aria-hidden`,`true`),h.inert=!0,h.style.color=u;let g=Array.from({length:B},(e,t)=>{let n=i.createElement(`span`);return n.className=`bing-click-particles__shard`,n.style.left=`${p}px`,n.style.top=`${m}px`,n.style.width=`${3+t%3}px`,n.style.height=`${t%3==0?6:3}px`,h.append(n),n});i.body.append(h);let _,v=()=>{_?.kill(),h.remove(),e.delete(v),i.removeEventListener(`scroll`,v,!0),a.removeEventListener(`resize`,v),a.removeEventListener(`pagehide`,v),i.removeEventListener(`visibilitychange`,v),o?.removeEventListener(`change`,v)};e.add(v),i.addEventListener(`scroll`,v,{capture:!0,passive:!0}),a.addEventListener(`resize`,v,{passive:!0}),a.addEventListener(`pagehide`,v),i.addEventListener(`visibilitychange`,v),o?.addEventListener(`change`,v);let y=g.map((e,t)=>{let n=(t+(Math.random()-.5)*.45)/B*Math.PI*2,r=28+Math.random()*30;return{x:Math.cos(n)*r,y:Math.sin(n)*r,rotation:(Math.random()-.5)*240}});n.gsap.set(g,{xPercent:-50,yPercent:-50,rotation:e=>e*37,autoAlpha:.95}),_=n.gsap.timeline({defaults:{ease:`power3.out`},onComplete:v}).to(g,{x:e=>y[e].x,y:e=>y[e].y,rotation:e=>y[e].rotation,duration:.54},0).to(g,{autoAlpha:0,scale:.35,duration:.3,ease:`power2.in`},.2)}return{play:r,clear:t}}var U=new WeakMap,W=new WeakSet;function G(){let e=(0,t.getCurrentInstance)().appContext.app,n=U.get(e);if(!n){n=new Map,U.set(e,n);let t=n;e.onUnmount(()=>{for(let e of t.values())e.clear();t.clear(),U.delete(e)})}function r(e,t=e.currentTarget){if(!t?.isConnected||W.has(e)||t.matches(`:disabled, [aria-disabled="true"]`)||t.closest(`[inert]`)||e.target instanceof Element&&e.target.closest(`.bing-checkbox:not(.is-decorative), .bing-radio`)&&!t.matches(`.bing-checkbox__control, .bing-radio__control`))return;W.add(e);let r=t.ownerDocument,i=n.get(r);i||(i=H(),n.set(r,i)),i.play(t,e)}let i=new WeakMap;return{playClickFeedback:r,vClickFeedback:{mounted(e,t){let n={enabled:t.value!==!1,click(t){n.enabled&&!t.defaultPrevented&&t.button===0&&r(t,e)}};i.set(e,n),e.addEventListener(`click`,n.click)},updated(e,t){let n=i.get(e);n&&(n.enabled=t.value!==!1)},beforeUnmount(e){let t=i.get(e);t&&e.removeEventListener(`click`,t.click),i.delete(e)}}}}var K=Symbol(`BingFormContext`),ee=Symbol(`BingFormItemContext`);function te(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,[...t]]))}function ne(e,n={}){let r=(0,t.inject)(ee,null),i=(0,t.inject)(K,null),a=`bing-control-${(0,t.useId)()}`,o=n.register===!1?void 0:r?.nextControlId?.(a)??r?.controlId.value,s=(0,t.computed)(()=>e.id??o??a),c=(0,t.computed)(()=>e.size??r?.size.value??i?.size.value??`md`),l=(0,t.computed)(()=>e.disabled??r?.disabled.value??i?.disabled.value??!1),u=(0,t.computed)(()=>e.status??r?.status.value??`default`),d=(0,t.computed)(()=>[...new Set([e.ariaDescribedby,r?.ariaDescribedby.value].filter(Boolean))].join(` `)||void 0),f=(0,t.computed)(()=>n.group?r?.labelId?.value:void 0);return n.register!==!1&&r?.registerControl&&(0,t.onBeforeUnmount)(r.registerControl({id:s,group:n.group??!1})),{formItem:r,resolvedId:s,resolvedSize:c,resolvedDisabled:l,resolvedStatus:u,resolvedAriaDescribedby:d,resolvedAriaLabelledby:f}}function re(){(0,t.provide)(ee,null),(0,t.provide)(K,null)}var q=`transform,opacity,visibility,willChange`;function ie(e){return n.gsap.killTweensOf(e),e.style.willChange=`transform, opacity`,n.gsap.fromTo(e,{autoAlpha:0,scale:.08},{autoAlpha:1,scale:1,duration:.38,ease:`expo.out`,overwrite:!0})}function ae(e){return n.gsap.to(e,{autoAlpha:0,scale:1.04,duration:.2,ease:`power2.out`,overwrite:!0,clearProps:q})}function oe(e){n.gsap.killTweensOf(e),n.gsap.set(e,{clearProps:q})}function se(e,t,n){let r=e.getBoundingClientRect();if(!r.width||!r.height)return;let i=Math.max(0,Math.min(e.clientWidth,(n.clientX-r.left)*e.offsetWidth/r.width-e.clientLeft)),a=Math.max(0,Math.min(e.clientHeight,(n.clientY-r.top)*e.offsetHeight/r.height-e.clientTop));t.style.setProperty(`--bing-liquid-x`,`${i}px`),t.style.setProperty(`--bing-liquid-y`,`${a}px`),t.style.transformOrigin=`${i}px ${a}px`}var ce=[`type`,`disabled`,`aria-busy`,`aria-label`],le={class:`bing-button__content`},ue={key:0,class:`bing-button__loading-indicator`,"aria-hidden":`true`},J={class:`bing-button__resting-content`},de={key:0,class:`bing-button__icon bing-button__icon--prefix`},fe={key:1,class:`bing-button__label`},pe={key:2,class:`bing-button__icon bing-button__icon--suffix`},Y=R((0,t.defineComponent)({__name:`BingButton`,props:{variant:{default:`primary`},size:{default:void 0},rounded:{default:`md`},htmlType:{default:`button`},disabled:{type:Boolean,default:void 0},loading:{type:Boolean,default:!1},block:{type:Boolean,default:!1},throttle:{type:Boolean,default:!1},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,{resolvedSize:a,resolvedDisabled:o}=ne(r,{register:!1}),s=(0,t.useSlots)(),c=(0,t.ref)(0),l=(0,t.ref)(null),u=!1,{playClickFeedback:d}=G(),f=(0,t.computed)(()=>o.value||r.loading),p=(0,t.computed)(()=>Math.max(0,r.throttleDelay)),m=(0,t.computed)(()=>!!s.default),h=(0,t.computed)(()=>!!s.prefix),g=(0,t.computed)(()=>!!s.suffix),_=(0,t.computed)(()=>r.textShine??(r.variant===`primary`?`always`:`none`)),v=(0,t.computed)(()=>r.loading&&m.value?`jump`:r.textEffect?r.textEffect:_.value===`none`?`none`:`shine`),y=(0,t.computed)(()=>r.loading&&m.value?`always`:r.textEffectTrigger?r.textEffectTrigger:v.value===`jump`||_.value===`hover`?`hover`:`always`),b=(0,t.computed)(()=>v.value===`shine`),x=(0,t.computed)(()=>v.value!==`none`),S=(0,t.computed)(()=>[`bing-button`,`bing-button--${r.variant}`,`bing-button--${a.value}`,`bing-button--rounded-${r.rounded}`,{"is-block":r.block,"is-disabled":o.value,"is-loading":r.loading,"is-icon-only":!m.value&&(h.value||g.value),[`bing-button--text-${v.value}`]:x.value,[`bing-button--text-trigger-${y.value}`]:x.value,[`bing-button--shine-${y.value}`]:b.value,[`bing-button--shine-direction-${r.shineDirection}`]:b.value}]),C=(0,t.computed)(()=>{let e={};return b.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 w(e){if(e.defaultPrevented)return;if(f.value){e.preventDefault();return}let t=Date.now(),n=p.value,a=t-c.value;if(r.throttle&&n>0&&c.value>0&&a<n){e.preventDefault(),i(`throttled`,{event:e,remaining:n-a});return}c.value=t,d(e),i(`click`,e)}function T(e){i(`focus`,e)}function E(e){i(`blur`,e)}function D(){u=!1,l.value&&oe(l.value)}function O(){return window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches??!1}function k(e){let t=l.value;if(!t||f.value||e.pointerType===`touch`)return;if(O()){D();return}let n=e.currentTarget,r=n.getBoundingClientRect();if(!r.width||!r.height)return;let i=(e.clientX-r.left)*(n.offsetWidth/r.width)-n.clientLeft,a=(e.clientY-r.top)*(n.offsetHeight/r.height)-n.clientTop,o=Math.max(0,Math.min(n.clientWidth,i)),s=Math.max(0,Math.min(n.clientHeight,a));t.style.setProperty(`--button-liquid-x`,`${o}px`),t.style.setProperty(`--button-liquid-y`,`${s}px`),t.style.transformOrigin=`${o}px ${s}px`,u||(u=!0,ie(t))}function A(){!u||!l.value||(u=!1,O()?D():ae(l.value))}return(0,t.watch)([f,()=>r.variant],([e,t])=>{(e||t===`primary`)&&D()}),(0,t.onBeforeUnmount)(()=>{D()}),(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`button`,{type:e.htmlType,class:(0,t.normalizeClass)(S.value),style:(0,t.normalizeStyle)(C.value),disabled:f.value,"aria-busy":e.loading||void 0,"aria-label":e.ariaLabel,onClick:w,onFocus:T,onBlur:E,onPointerenter:k,onPointermove:k,onPointerleave:A,onPointercancel:D},[e.variant===`primary`?(0,t.createCommentVNode)(``,!0):((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,ref_key:`liquidRef`,ref:l,class:`bing-button__liquid`,"aria-hidden":`true`},null,512)),(0,t.createElementVNode)(`span`,le,[m.value?(0,t.createCommentVNode)(``,!0):((0,t.openBlock)(),(0,t.createElementBlock)(`span`,ue,[...r[0]||=[(0,t.createElementVNode)(`span`,{class:`bing-button__spinner`},null,-1)]])),(0,t.createElementVNode)(`span`,J,[h.value?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,de,[(0,t.renderSlot)(n.$slots,`prefix`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0),m.value?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,fe,[(0,t.createVNode)(z,{class:`bing-button__animated-text`,effect:v.value,trigger:y.value,disabled:(0,t.unref)(o),"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),g.value?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,pe,[(0,t.renderSlot)(n.$slots,`suffix`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0)])])],46,ce))}}),[[`__scopeId`,`data-v-845f9077`]]),me=new Set([`role`,`readonly`,`required`,`form`,`maxlength`,`minlength`,`pattern`,`inputmode`,`autofocus`,`enterkeyhint`,`tabindex`,`list`,`autocapitalize`,`autocorrect`,`dirname`,`wrap`,`cols`,`onChange`,`onBeforeinput`,`onCompositionstart`,`onCompositionupdate`,`onCompositionend`,`onSelect`,`onInvalid`]);function he(){let e=(0,t.useAttrs)(),n=e=>me.has(e)||e.startsWith(`aria-`);return{rootAttrs:()=>Object.fromEntries(Object.entries(e).filter(([e])=>!n(e))),controlAttrs:()=>Object.fromEntries(Object.entries(e).filter(([e])=>n(e)))}}var ge=`(prefers-reduced-motion: reduce), (forced-colors: active), (pointer: coarse)`,_e=new Set([`text`,`search`,`tel`,`url`]),ve=/[\u0590-\u08ff\u200e\u200f\u202a-\u202e\u2066-\u2069\ufb1d-\ufdff\ufe70-\ufeff]/u,ye=[`fontFamily`,`fontSize`,`fontWeight`,`fontStyle`,`fontStretch`,`fontVariant`,`fontKerning`,`fontFeatureSettings`,`fontVariationSettings`,`letterSpacing`,`wordSpacing`,`textTransform`];function be(e,r,i,a){let o=()=>{},s=()=>{};(0,t.onUpdated)(()=>o()),(0,t.onBeforeUnmount)(()=>s()),(0,t.onMounted)(()=>{let t=e.value,c=r.value,l=i.value;if(!t||!c||!l)return;let u=t.ownerDocument,d=u.defaultView,f=d.matchMedia(ge),p=!1,m=!1,h=!1,g=!1,_=!1,v=!1,y=0,b=!1,x=!1,S,C,w,T=``,E=NaN,D=0,O=0,k,A,j=u.createRange();function M(){v&&(t.removeAttribute(`data-smooth-caret`),l.removeAttribute(`data-active`)),v=!1,l.classList.contains(`is-idle`)&&l.classList.remove(`is-idle`),clearTimeout(S),A?.tween.pause()}function N(){clearTimeout(S),l.classList.remove(`is-idle`),S=setTimeout(()=>{v&&!_&&l.classList.add(`is-idle`)},600)}function P(){y=0;let e=b,r=x;if(b=x=!1,_)return;let i=t.selectionStart;if(!p||!a()||t.disabled||t.readOnly||m||h||g||f.matches||u.hidden||!u.hasFocus()||u.activeElement!==t||!_e.has(t.type)||i===null||i!==t.selectionEnd||ve.test(t.value)){M(),w&&!_e.has(t.type)&&(w.data=``);return}let o=d.getComputedStyle(t);if(o.direction!==`ltr`||o.writingMode!==`horizontal-tb`||![`start`,`left`].includes(o.textAlign)||parseFloat(o.textIndent)!==0||!t.clientWidth){M();return}C||(C=u.createElement(`span`),C.setAttribute(`aria-hidden`,`true`),C.style.cssText=`position:absolute;left:0;top:0;visibility:hidden;white-space:pre;width:max-content;pointer-events:none;`,w=u.createTextNode(``),C.append(w),c.append(C));let s=ye.map(e=>o[e]).join(`|`);T!==s&&(ye.forEach(e=>{C.style[e]=o[e]}),T=s);let S=t.value||`​`;w.data!==S&&(w.data=S),j.setStart(w,i),j.collapse(!0);let P=j.getClientRects();if(!P.length){M();return}let F=C.getBoundingClientRect(),I=c.getBoundingClientRect().width/c.clientWidth||1,L=parseFloat(o.paddingLeft)||0,R=t.offsetLeft+L+(P[0].left-F.left)/I-t.scrollLeft;if(R<t.offsetLeft-1||R>t.offsetLeft+t.clientWidth+1){M();return}let z=Math.max(t.offsetLeft,Math.min(t.offsetLeft+t.clientWidth-2,R)),B=Math.min(t.clientHeight,parseFloat(o.fontSize)*1.2),V=t.offsetTop+(t.clientHeight-B)/2,H=!v||Math.abs(E-z)>.1,U=D!==t.scrollLeft||O!==t.clientWidth;A||(k=n.gsap.context(()=>{A=n.gsap.quickTo(l,`x`,{duration:.09,ease:`power2.out`})},c)),!v||e||U?(A(z,z),A.tween.progress(1).pause()):H&&A(z),l.style.height!==`${B}px`&&(l.style.height=`${B}px`),l.style.top!==`${V}px`&&(l.style.top=`${V}px`),l.style.color!==o.color&&(l.style.color=o.color),v||(l.setAttribute(`data-active`,``),t.setAttribute(`data-smooth-caret`,``)),v=!0,E=z,D=t.scrollLeft,O=t.clientWidth,(H||r)&&N()}function F(e=!1,t=!1){_||!p||(b||=e,x||=t,y||=d.requestAnimationFrame(P))}let I=()=>F(),L=()=>F(!0),R=()=>F(!1,!0),z=()=>M(),B=()=>u.hidden?M():F(!0),V=()=>{h=!1,F(!0,!0)},H=new ResizeObserver(L);function U(){p||(p=!0,u.addEventListener(`selectionchange`,I),u.addEventListener(`pointerup`,V),u.addEventListener(`pointercancel`,V),u.addEventListener(`visibilitychange`,B),d.addEventListener(`blur`,z),d.addEventListener(`focus`,L),d.addEventListener(`resize`,L),f.addEventListener(`change`,L),u.fonts?.addEventListener(`loadingdone`,L),H.observe(t),F(!0,!0))}function W(){p=m=h=g=!1,M(),d.cancelAnimationFrame(y),y=0,b=x=!1,u.removeEventListener(`selectionchange`,I),u.removeEventListener(`pointerup`,V),u.removeEventListener(`pointercancel`,V),u.removeEventListener(`visibilitychange`,B),d.removeEventListener(`blur`,z),d.removeEventListener(`focus`,L),d.removeEventListener(`resize`,L),f.removeEventListener(`change`,L),u.fonts?.removeEventListener(`loadingdone`,L),H.disconnect(),k?.revert(),k=A=void 0,C?.remove(),C=w=void 0,T=``}let G={focus:U,blur:W,input:R,keydown:R,keyup:I,select:I,scroll:L,pointerdown:e=>{h=!0,g||=e.pointerType===`touch`,M()},compositionstart:()=>{m=!0,M()},compositionend:()=>{m=!1,F(!0,!0)}};for(let[e,n]of Object.entries(G))t.addEventListener(e,n);o=()=>F(),s=()=>{_=!0,W();for(let[e,n]of Object.entries(G))t.removeEventListener(e,n);o=()=>{}},u.activeElement===t&&U()})}var X=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},xe=e=>e===``,Se=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Ce=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),we=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),Te=e=>{let t=we(e);return t.charAt(0).toUpperCase()+t.slice(1)},Ee={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`},De=({name:e,iconNode:n,absoluteStrokeWidth:r,"absolute-stroke-width":i,strokeWidth:a,"stroke-width":o,size:s=Ee.width,color:c=Ee.stroke,...l},{slots:u})=>(0,t.h)(`svg`,{...Ee,...l,width:s,height:s,stroke:c,"stroke-width":xe(r)||xe(i)||r===!0||i===!0?Number(a||o||Ee[`stroke-width`])*24/Number(s):a||o||Ee[`stroke-width`],class:Se(`lucide`,l.class,...e?[`lucide-${Ce(Te(e))}-icon`,`lucide-${Ce(e)}`]:[`lucide-icon`]),...!u.default&&!X(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)(De,{...a,...r,iconNode:n,name:e},i),Oe=Z(`arrow-down-left`,[[`path`,{d:`M17 7 7 17`,key:`15tmo1`}],[`path`,{d:`M17 17H7V7`,key:`1org7z`}]]),ke=Z(`arrow-down-right`,[[`path`,{d:`m7 7 10 10`,key:`1fmybs`}],[`path`,{d:`M17 7v10H7`,key:`6fjiku`}]]),Ae=Z(`arrow-down`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),je=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`}]]),Me=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`}]]),Ne=Z(`arrow-up-left`,[[`path`,{d:`M7 17V7h10`,key:`11bw93`}],[`path`,{d:`M17 17 7 7`,key:`2786uv`}]]),Pe=Z(`arrow-up-right`,[[`path`,{d:`M7 7h10v10`,key:`1tivn9`}],[`path`,{d:`M7 17 17 7`,key:`1vkiza`}]]),Fe=Z(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),Ie=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`}]]),Le=Z(`check-check`,[[`path`,{d:`M18 6 7 17l-5-5`,key:`116fxf`}],[`path`,{d:`m22 10-7.5 7.5L13 16`,key:`ke71qq`}]]),Re=Z(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),ze=Z(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),Be=Z(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),Ve=Z(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),He=Z(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),Ue=Z(`chevrons-left`,[[`path`,{d:`m11 17-5-5 5-5`,key:`13zhaf`}],[`path`,{d:`m18 17-5-5 5-5`,key:`h8a8et`}]]),We=Z(`chevrons-right`,[[`path`,{d:`m6 17 5-5-5-5`,key:`xnjwq`}],[`path`,{d:`m13 17 5-5-5-5`,key:`17xmmf`}]]),Ge=Z(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),Ke=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`}]]),qe=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`}]]),Je=Z(`clock-3`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6h4`,key:`135r8i`}]]),Ye=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`}]]),Xe=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`}]]),Ze=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`}]]),Qe=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`}]]),$e=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`}]]),et=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`}]]),tt=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`}]]),nt=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`}]]),rt=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`}]]),it=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`}]]),at=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`}]]),ot=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`}]]),st=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`}]]),ct=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`}]]),lt=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`}]]),ut=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`}]]),dt=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`}]]),pt=Z(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),mt=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`}]]),ht=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`}]]),gt=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`}]]),_t=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`}]]),yt=Z(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),bt=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`}]]),xt=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`}]]),St=Z(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),Ct=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`}]]),wt=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:1.75},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-43788c95`]]),Tt={key:0,class:`bing-input__icon`},Et={class:`bing-input__content`},Dt=[`id`,`value`,`type`,`min`,`max`,`step`,`placeholder`,`disabled`,`readonly`,`name`,`autocomplete`,`spellcheck`,`aria-label`,`aria-describedby`,`aria-invalid`],Ot={key:1,class:`bing-input__actions`},kt={key:0,class:`bing-input__stepper`},At=[`disabled`],jt=[`disabled`],Mt=R((0,t.defineComponent)({inheritAttrs:!1,__name:`BingInput`,props:{id:{default:void 0},modelValue:{default:``},type:{default:`text`},min:{},max:{},step:{},placeholder:{default:void 0},disabled:{type:Boolean,default:void 0},readonly:{type:Boolean,default:!1},clearable:{type:Boolean,default:void 0},smoothCaret:{type:Boolean,default:!0},icon:{default:void 0},iconLabel:{default:void 0},size:{default:void 0},block:{type:Boolean,default:!1},debounceDelay:{default:180},clearAriaLabel:{default:`清空输入`},ariaLabel:{default:void 0},ariaDescribedby:{default:void 0},status:{default:void 0},name:{default:void 0},autocomplete:{default:`off`},spellcheck:{type:[Boolean,String],default:void 0}},emits:[`update:modelValue`,`input`,`debounced-input`,`clear`,`focus`,`blur`,`keydown`],setup(e,{expose:n,emit:r}){let i=e,a=r,{playClickFeedback:o}=G(),{rootAttrs:s,controlAttrs:c}=he(),{formItem:l,resolvedId:u,resolvedSize:d,resolvedDisabled:f,resolvedStatus:p,resolvedAriaDescribedby:m}=ne(i),h=(0,t.useSlots)(),g=(0,t.ref)(null),_=(0,t.ref)(null),v=(0,t.ref)(null),y=(0,t.ref)(null);be(_,v,y,()=>i.smoothCaret);let b=0,x,S,C,w=(0,t.computed)(()=>Math.max(0,Math.floor(i.debounceDelay))),T=(0,t.computed)(()=>!!(i.icon||h.icon)),E=(0,t.computed)(()=>i.modelValue!==null&&String(i.modelValue).length>0),D=(0,t.computed)(()=>(i.clearable??i.type===`search`)&&!i.readonly&&!f.value&&E.value),O=(0,t.computed)(()=>i.type===`number`),k=(0,t.computed)(()=>[`bing-input`,`bing-input--${d.value}`,`bing-input--status-${p.value}`,{"is-block":i.block,"is-disabled":f.value,"is-invalid":p.value===`error`,"has-icon":T.value,"has-value":E.value,"can-clear":D.value,"has-actions":D.value||O.value}]);function A(){x!==void 0&&(clearTimeout(x),x=void 0)}function j(e){if(A(),w.value===0){a(`debounced-input`,e);return}x=setTimeout(()=>{x=void 0,a(`debounced-input`,e)},w.value)}function M(e,t){let n=e===``?NaN:Number(e);a(`update:modelValue`,i.type===`number`&&Number.isFinite(n)?n:e),a(`input`,e,t),j(e),l?.handleControlChange()}function N(e){let t=e.target.value;M(t,e)}function P(e){a(`keydown`,e)}function F(e){let t=_.value;if(!t||!O.value||i.readonly||f.value)return!1;let n=t.value;if(t.step.toLowerCase()===`any`){let n=t.valueAsNumber,r=t.min.trim()===``||!Number.isFinite(Number(t.min))?-1/0:Number(t.min),i=t.max.trim()===``||!Number.isFinite(Number(t.max))?1/0:Number(t.max),a=Math.min(i,Math.max(r,(Number.isFinite(n)?n:0)+e));r<=i&&Number.isFinite(a)&&(!Number.isFinite(n)||(a-n)*e>0)&&(t.valueAsNumber=a)}else t.stepUp(e);return t.value===n?!1:(t.dispatchEvent(new Event(`input`,{bubbles:!0})),t.dispatchEvent(new Event(`change`,{bubbles:!0})),!0)}function I(){clearTimeout(S),clearInterval(C),S=void 0,C=void 0,typeof window<`u`&&(window.removeEventListener(`pointerup`,I),window.removeEventListener(`pointercancel`,I),window.removeEventListener(`blur`,I))}function L(e,t){t.button!==0||i.readonly||f.value||(t.preventDefault(),I(),_.value?.focus(),F(e)&&(o(t),window.addEventListener(`pointerup`,I),window.addEventListener(`pointercancel`,I),window.addEventListener(`blur`,I),S=setTimeout(()=>{C=setInterval(()=>{F(e)||I()},80)},400)))}function R(e,t){t.detail===0&&!t.pointerType&&(_.value?.focus(),F(e)&&o(t))}function z(){D.value&&(A(),a(`update:modelValue`,``),a(`clear`),a(`debounced-input`,``),l?.handleControlChange(),_.value?.focus())}function B(e){a(`focus`,e)}function V(e){a(`blur`,e)}function H(){b+=1}async function U(e){let n=g.value;if(!n||e.relatedTarget instanceof Node&&n.contains(e.relatedTarget))return;let r=++b;await(0,t.nextTick)(),!(r!==b||g.value!==n||n.contains(n.ownerDocument.activeElement))&&l?.handleControlBlur()}function W(){_.value?.focus()}function K(){_.value?.blur()}function ee(){_.value?.select()}return(0,t.onBeforeUnmount)(()=>{b+=1,A(),I()}),(0,t.watch)([f,()=>i.readonly,()=>i.type],I),n({get input(){return _.value},focus:W,blur:K,select:ee}),(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,(0,t.mergeProps)((0,t.unref)(s)(),{ref_key:`rootRef`,ref:g,class:k.value,onClick:W,onFocusin:H,onFocusout:U}),[T.value?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,Tt,[(0,t.renderSlot)(e.$slots,`icon`,{},()=>[i.icon?((0,t.openBlock)(),(0,t.createBlock)(Q,{key:0,icon:i.icon,size:`sm`,"stroke-width":1.75,decorative:!i.iconLabel,label:i.iconLabel},null,8,[`icon`,`decorative`,`label`])):(0,t.createCommentVNode)(``,!0)],!0)])):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`span`,Et,[(0,t.createElementVNode)(`input`,(0,t.mergeProps)((0,t.unref)(c)(),{ref_key:`inputRef`,ref:_,class:`bing-input__field`,id:(0,t.unref)(u),value:i.modelValue,type:i.type,min:i.min,max:i.max,step:i.step,placeholder:i.placeholder,disabled:(0,t.unref)(f),readonly:i.readonly,name:i.name,autocomplete:i.autocomplete,spellcheck:i.spellcheck,"aria-label":i.ariaLabel||void 0,"aria-describedby":(0,t.unref)(m),"aria-invalid":(0,t.unref)(p)===`error`||void 0,onInput:N,onFocus:B,onBlur:V,onKeydown:P}),null,16,Dt),(0,t.createElementVNode)(`span`,{ref_key:`caretLayerRef`,ref:v,class:`bing-input__caret-layer`,"aria-hidden":`true`},[(0,t.createElementVNode)(`span`,{ref_key:`caretRef`,ref:y,class:`bing-input__caret`},null,512)],512)]),D.value||O.value?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,Ot,[O.value?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,kt,[(0,t.createElementVNode)(`button`,{type:`button`,class:`bing-input__step`,tabindex:`-1`,"aria-label":`增加数值`,disabled:(0,t.unref)(f)||i.readonly,onPointerdown:n[0]||=e=>L(1,e),onPointerleave:I,onClick:n[1]||=(0,t.withModifiers)(e=>R(1,e),[`stop`])},[(0,t.createVNode)(Q,{icon:(0,t.unref)(He),size:`xs`,"stroke-width":1.75},null,8,[`icon`])],40,At),(0,t.createElementVNode)(`button`,{type:`button`,class:`bing-input__step`,tabindex:`-1`,"aria-label":`减少数值`,disabled:(0,t.unref)(f)||i.readonly,onPointerdown:n[2]||=e=>L(-1,e),onPointerleave:I,onClick:n[3]||=(0,t.withModifiers)(e=>R(-1,e),[`stop`])},[(0,t.createVNode)(Q,{icon:(0,t.unref)(ze),size:`xs`,"stroke-width":1.75},null,8,[`icon`])],40,jt)])):(0,t.createCommentVNode)(``,!0),D.value?((0,t.openBlock)(),(0,t.createBlock)(Y,{key:1,variant:`ghost`,size:`xs`,rounded:`sm`,throttle:!1,class:`bing-input__clear`,"aria-label":i.clearAriaLabel,onMousedown:n[4]||=(0,t.withModifiers)(()=>{},[`prevent`]),onClick:(0,t.withModifiers)(z,[`stop`])},{prefix:(0,t.withCtx)(()=>[(0,t.createVNode)(Q,{icon:(0,t.unref)(St),size:`xs`,"stroke-width":1.75},null,8,[`icon`])]),_:1},8,[`aria-label`])):(0,t.createCommentVNode)(``,!0)])):(0,t.createCommentVNode)(``,!0)],16))}}),[[`__scopeId`,`data-v-43ce9e6c`]]),Nt=/^(auto|scroll|overlay)$/,Pt=[`button`,`input`,`select`,`textarea`,`video`,`audio`,`[contenteditable="true"]`,`[role="textbox"]`].join(`,`),Ft=Object.freeze({duration:400,stepSize:100,pulseScale:4,accelerationDelta:50,accelerationMax:3,keyboardStep:50,keyboard:!0,smoothTouchpad:!1,respectReducedMotion:!0}),It=Object.freeze({duration:280,stepSize:72,pulseScale:4,accelerationDelta:50,accelerationMax:2,keyboard:!1,smoothTouchpad:!1,respectReducedMotion:!0});function Lt(e,t={},n={}){return e===!1?!1:{...t,...typeof e==`object`?e:{},...n}}function Rt(e,t,n){return Number.isFinite(e)?Math.max(n,e):t}function zt(e){return{duration:Rt(e?.duration,Ft.duration,0),stepSize:Rt(e?.stepSize,Ft.stepSize,0),pulseScale:Rt(e?.pulseScale,Ft.pulseScale,.1),accelerationDelta:Rt(e?.accelerationDelta,Ft.accelerationDelta,0),accelerationMax:Rt(e?.accelerationMax,Ft.accelerationMax,1),keyboardStep:Rt(e?.keyboardStep,Ft.keyboardStep,0),keyboard:e?.keyboard??Ft.keyboard,smoothTouchpad:e?.smoothTouchpad??Ft.smoothTouchpad,respectReducedMotion:e?.respectReducedMotion??Ft.respectReducedMotion}}function Bt(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 Vt(e,t=Ft.pulseScale){if(e<=0)return 0;if(e>=1)return 1;let n=Math.max(.1,t);return Bt(e,n)/Bt(1,n)}function Ht(){return typeof window<`u`&&typeof document<`u`}function Ut(){return typeof performance<`u`&&typeof performance.now==`function`?performance.now():Date.now()}function Wt(e,t,n){return Math.min(n,Math.max(t,e))}function Gt(e){return e===0?0:e>0?1:-1}function Kt(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 qt(e){let t=e.composedPath?.()[0]??e.target;return t instanceof Element?t:null}function Jt(e){if(e.parentElement)return e.parentElement;let t=e.getRootNode?.();return t&&`host`in t&&t.host instanceof Element?t.host:null}function Yt(e,t,n,r){let i=qt(e);for(;i&&i!==t;){if(i instanceof HTMLElement){let e=n!==0&&Kt(i,`x`,n),t=r!==0&&Kt(i,`y`,r);if(!e&&!t){i=Jt(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&&Nt.test(o),l=t&&Nt.test(s);if(c||l)return!0}i=Jt(i)}return!1}function Xt(){return!!window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches}function Zt(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 Qt(e,t){return Math.abs(e)>1.2?t/120*e:e}function $t(e){let t=qt(e);return t instanceof HTMLElement&&!!t.closest(Pt)}function en(e){let t=[],n,r=0,i=0,a=0,o=[],s=0,c=0;function l(){return zt(e.getOptions?.())}function u(){return e.getAxes?.()??{horizontal:!0,vertical:!0}}function d(){return e.isEnabled?.()??!0}function f(){!Ht()||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=Wt(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=Wt(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=Ut(),l=0,u=0;if(t.forEach(e=>{let t=o-e.start,n=e.duration===0||t>=e.duration?1:Vt(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(!(!Ht()||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=Gt(n),d=Gt(o);(u!==0&&i!==0&&u!==i||d!==0&&a!==0&&d!==a)&&p();let f=Ut(),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=Gt(v)||i,a=Gt(y)||a,r=f,c.duration===0||!Ht()||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,t){if(e.deltaMode!==WheelEvent.DOM_DELTA_PIXEL)return!1;let n=e,r=n.wheelDeltaX||0,i=n.wheelDeltaY||0,a=Math.abs((Math.abs(i)>=Math.abs(r)?i:r)||n.wheelDelta||t);if(!a)return!1;o.length===0&&(o=[a,a,a]),o.push(a),o.shift();let s=a>120&&v(a);return!v(120)&&!v(100)&&!s}function b(t){let n=e.getElement();if(!n)return null;let r=l(),i=Zt(t,n,u()),a=Math.abs(i.y)>=Math.abs(i.x)?i.y:i.x;if(!r.smoothTouchpad&&y(t,a))return null;let o=Qt(i.x,r.stepSize),s=Qt(i.y,r.stepSize);return o&&!Kt(n,`x`,o)&&(o=0),s&&!Kt(n,`y`,s)&&(s=0),!o&&!s||Yt(t,n,o,s)?null:{x:o,y:s}}function x(e){if(!Ht()||!d()||e.defaultPrevented||e.ctrlKey||l().respectReducedMotion&&Xt())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(!Ht()||!n||!d()||!r.keyboard||t.defaultPrevented||t.ctrlKey||t.altKey||t.metaKey||t.shiftKey&&t.key!==` `||$t(t)||r.respectReducedMotion&&Xt())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&&!Kt(n,`x`,a)&&(a=0),o&&!Kt(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 tn=[`tabindex`,`role`,`aria-label`],nn=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.useSlots)(),s=(0,t.ref)(null),c=(0,t.ref)(null),l=(0,t.ref)(null),u=(0,t.ref)(null),d=(0,t.ref)(null),f=(0,t.ref)(null),p=(0,t.ref)(!1),m=(0,t.ref)(!1),h=(0,t.ref)(0),g=(0,t.ref)(0),_=(0,t.ref)(!1),v=(0,t.ref)(null),y=(0,t.ref)(!1),b,x,S,C,w,T,E,D=0,O=0,k=0,A=0,j=0,M=0,N=0,P=0,F=0,I=(0,t.computed)(()=>[`bing-scrollbar`,{"has-overflow":p.value||m.value,"has-vertical-overflow":p.value,"has-horizontal-overflow":m.value,"is-vertical":i.vertical,"is-horizontal":i.horizontal,"is-always-visible":i.always,"is-disabled":i.disabled,"is-dragging":!!v.value,"is-dragging-vertical":v.value===`vertical`,"is-dragging-horizontal":v.value===`horizontal`,"is-hovering":_.value,"is-scrolling":y.value,"is-smooth":!!i.smooth}]),L=(0,t.computed)(()=>({height:K(i.height),maxHeight:K(i.maxHeight)}));function R(){return{height:`${h.value}px`,transform:`translate(-50%, ${P}px)`}}function z(){return{width:`${g.value}px`,transform:`translate(${F}px, -50%)`}}let B=(0,t.computed)(()=>Math.max(1,i.overflowTolerance)),V=(0,t.computed)(()=>(p.value||m.value)&&i.focusable&&!i.disabled),H=(0,t.computed)(()=>i.ariaLabel??(V.value?`可滚动内容`:void 0));function U(e){s.value=e instanceof HTMLElement?e:null}let W={class:`bing-scrollbar__custom-viewport`,onScroll:Y,onWheel:me,onKeydown:he,onInput:J};function G(){return typeof window<`u`&&typeof document<`u`}function K(e){return typeof e==`number`?`${e}px`:e}function ee(){!G()||S===void 0||(window.clearTimeout(S),S=void 0)}function te(){!G()||C===void 0||(window.cancelAnimationFrame(C),C=void 0)}function ne(){!G()||w===void 0||(window.cancelAnimationFrame(w),w=void 0)}function re(){ne(),T=void 0}function q(){re(),E?.cancel()}function ie(){return typeof i.smooth==`object`?i.smooth:void 0}function ae(){return!!i.smooth&&!i.disabled}function oe(){let e=s.value;if(!e)return;let t=e.clientHeight,n=e.scrollHeight,r=e.clientWidth,a=e.scrollWidth,o=Math.max(0,n-t),c=Math.max(0,a-r),d=i.vertical&&!i.disabled&&o>B.value,f=i.horizontal&&!i.disabled&&c>B.value;if(p.value=d,m.value=f,A=d?o:0,j=f?c:0,!d||!l.value)h.value=0,se(0),M=0;else{let r=l.value.clientHeight,a=n>0?t/n*r:r,s=Math.min(r,Math.max(Math.max(12,i.minThumbSize),a));M=Math.max(0,r-s);let c=o>0?e.scrollTop/o:0;h.value=s,se(M*c)}if(!f||!u.value)g.value=0,ce(0),N=0;else{let t=u.value.clientWidth,n=a>0?r/a*t:t,o=Math.min(t,Math.max(Math.max(12,i.minThumbSize),n));N=Math.max(0,t-o);let s=c>0?e.scrollLeft/c:0;g.value=o,ce(N*s)}}function se(e){P=e,d.value&&(d.value.style.transform=`translate(-50%, ${e}px)`)}function ce(e){F=e,f.value&&(f.value.style.transform=`translate(${e}px, -50%)`)}function le(){let e=s.value;if(e){if(p.value){let t=A>0?e.scrollTop/A:0;se(M*t)}if(m.value){let t=j>0?e.scrollLeft/j:0;ce(N*t)}}}function ue(){if(!G()||typeof window.requestAnimationFrame!=`function`){oe();return}C===void 0&&(C=window.requestAnimationFrame(()=>{C=void 0,oe()}))}function J(){(0,t.nextTick)(ue)}function de(){G()&&(ee(),y.value=!0,S=window.setTimeout(()=>{S=void 0,y.value=!1},720))}function fe(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*(s.value?.clientWidth??1):t}function pe(){return G()&&window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches}function Y(e){le(),de(),a(`scroll`,e)}function me(e){if(e.defaultPrevented)return!1;if(ae())return re(),E?.handleWheel(e)??!1;if(i.disabled||!i.horizontal)return!1;if(!e.shiftKey)return re(),!1;let t=s.value;if(!t)return!1;let n=j||Math.max(0,t.scrollWidth-t.clientWidth),r=T??t.scrollLeft,a=ve(r+fe(e),0,n);return a===r&&a===t.scrollLeft?!1:(e.preventDefault(),T=a,xe(),!0)}function he(e){ae()&&E?.handleKeydown(e)}function ge(e){let t=s.value,n=e===`vertical`?l.value:u.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-h.value):Math.max(0,n.clientWidth-g.value)}}function _e(e){let t=s.value;if(!t)return;let n=A||Math.max(0,t.scrollHeight-t.clientHeight);t.scrollTop=Math.min(n,Math.max(0,e)),le(),de()}function ve(e,t,n){return Math.min(n,Math.max(t,e))}function ye(e){let t=s.value;if(!t)return;let n=j||Math.max(0,t.scrollWidth-t.clientWidth);t.scrollLeft=Math.min(n,Math.max(0,e)),le(),de()}function be(){w=void 0;let e=s.value;if(!e||T===void 0){T=void 0;return}let t=T-e.scrollLeft;if(Math.abs(t)<.5){ye(T),T=void 0;return}ye(e.scrollLeft+t*.42),X()}function X(){!G()||w!==void 0||typeof window.requestAnimationFrame!=`function`||(w=window.requestAnimationFrame(be))}function xe(){if(T!==void 0){if(!G()||typeof window.requestAnimationFrame!=`function`||pe()){ye(T),T=void 0;return}w===void 0&&be()}}function Se(e,t){if(i.disabled||(e===`vertical`?!p.value:!m.value)||t.button!==0||t.target!==t.currentTarget)return;let n=e===`vertical`?l.value:u.value,r=ge(e);if(!n||!r||r.thumbTravel<=0)return;t.preventDefault(),q();let a=n.getBoundingClientRect(),o=e===`vertical`?t.clientY-a.top-h.value/2:t.clientX-a.left-g.value/2,s=Math.min(1,Math.max(0,o/r.thumbTravel));if(e===`vertical`){_e(s*r.maxScroll);return}ye(s*r.maxScroll)}function Ce(){G()&&(window.addEventListener(`pointermove`,Ee),window.addEventListener(`pointerup`,De),window.addEventListener(`pointercancel`,De))}function we(){G()&&(window.removeEventListener(`pointermove`,Ee),window.removeEventListener(`pointerup`,De),window.removeEventListener(`pointercancel`,De))}function Te(e,t){if(!(i.disabled||(e===`vertical`?!p.value:!m.value)||t.button!==0)){t.preventDefault(),t.stopPropagation(),q(),D=e===`vertical`?t.clientY:t.clientX,O=s.value?.scrollTop??0,k=s.value?.scrollLeft??0,v.value=e,Ce();try{t.currentTarget?.setPointerCapture?.(t.pointerId)}catch{}}}function Ee(e){let t=v.value;if(!t)return;let n=ge(t);if(!n||n.thumbTravel<=0)return;e.preventDefault();let r=((t===`vertical`?e.clientY:e.clientX)-D)*(n.maxScroll/n.thumbTravel);if(t===`vertical`){_e(O+r);return}ye(k+r)}function De(){v.value&&(v.value=null,we())}function Z(e){let t=s.value;if(t){if(typeof e==`number`){q(),_e(e);return}q(),t.scrollTo(e),ue()}}function Oe(e){let t=s.value;if(t){if(typeof e==`number`){q(),_e(t.scrollTop+e);return}q(),t.scrollBy(e),ue()}}function ke(){if(b?.disconnect(),b=void 0,x?.disconnect(),x=void 0,G()){if(o.viewport&&s.value&&typeof MutationObserver<`u`&&(x=new MutationObserver(J),x.observe(s.value,{childList:!0,subtree:!0,characterData:!0})),typeof ResizeObserver>`u`){window.addEventListener(`resize`,J),J();return}b=new ResizeObserver(J),s.value&&b.observe(s.value),c.value&&b.observe(c.value),l.value&&b.observe(l.value),u.value&&b.observe(u.value),J()}}return(0,t.watch)(s,()=>{q(),we(),ke()},{flush:`post`}),(0,t.watch)(()=>[i.height,i.maxHeight,i.minThumbSize,i.overflowTolerance,i.disabled,i.vertical,i.horizontal],J),(0,t.watch)(()=>[i.disabled,i.smooth],()=>{ae()||E?.cancel()},{deep:!0}),(0,t.onMounted)(()=>{E=en({getElement:()=>s.value,getOptions:ie,getAxes:()=>({horizontal:i.horizontal,vertical:i.vertical}),isEnabled:ae}),ke()}),(0,t.onBeforeUnmount)(()=>{ee(),te(),q(),E=void 0,we(),b?.disconnect(),b=void 0,x?.disconnect(),x=void 0,G()&&window.removeEventListener(`resize`,J)}),n({handleWheel:me,scrollBy:Oe,scrollTo:Z,stop:q,update:oe,get viewport(){return s.value}}),(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)(I.value),style:(0,t.normalizeStyle)(L.value),onMouseenter:n[4]||=e=>_.value=!0,onMouseleave:n[5]||=e=>_.value=!1},[(0,t.renderSlot)(e.$slots,`viewport`,{viewportRef:U,viewportAttrs:W},()=>[(0,t.createElementVNode)(`div`,{ref_key:`viewportRef`,ref:s,class:`bing-scrollbar__viewport`,tabindex:V.value?0:void 0,role:H.value?`region`:void 0,"aria-label":H.value,onScroll:Y,onWheel:me,onKeydown:he},[(0,t.createElementVNode)(`div`,{ref_key:`contentRef`,ref:c,class:`bing-scrollbar__content`},[(0,t.renderSlot)(e.$slots,`default`,{},void 0,!0)],512)],40,tn)],!0),(0,t.withDirectives)((0,t.createElementVNode)(`div`,{ref_key:`verticalRailRef`,ref:l,class:`bing-scrollbar__rail bing-scrollbar__rail--vertical`,"aria-hidden":`true`,onPointerdown:n[1]||=e=>Se(`vertical`,e)},[(0,t.createElementVNode)(`div`,{ref_key:`verticalThumbRef`,ref:d,class:`bing-scrollbar__thumb bing-scrollbar__thumb--vertical`,style:(0,t.normalizeStyle)(R()),onPointerdown:n[0]||=e=>Te(`vertical`,e)},null,36)],544),[[t.vShow,p.value]]),(0,t.withDirectives)((0,t.createElementVNode)(`div`,{ref_key:`horizontalRailRef`,ref:u,class:`bing-scrollbar__rail bing-scrollbar__rail--horizontal`,"aria-hidden":`true`,onPointerdown:n[3]||=e=>Se(`horizontal`,e)},[(0,t.createElementVNode)(`div`,{ref_key:`horizontalThumbRef`,ref:f,class:`bing-scrollbar__thumb bing-scrollbar__thumb--horizontal`,style:(0,t.normalizeStyle)(z()),onPointerdown:n[2]||=e=>Te(`horizontal`,e)},null,36)],544),[[t.vShow,m.value]])],38))}}),[[`__scopeId`,`data-v-7a3e643e`]]),rn=Symbol(`BingOverlay`),an=new WeakMap,on=new WeakMap;function sn(e,t){let n=on.get(e);return n||(n=new Set,on.set(e,n)),n.add(t),()=>{n.delete(t),n.size||on.delete(e)}}var cn=`a[href],button,input,select,textarea,[tabindex],[contenteditable="true"]`;function ln(e,t){return e===t||!!(e.parent&&ln(e.parent,t))}function un(e){let n=[],r=new WeakMap,i=()=>n.at(-1),a=()=>[...n].reverse().find(e=>e.modal),o=(e,t)=>!!t&&n.some(n=>ln(n,e)&&n.elements().some(e=>e?.contains(t)));function s(){let e=0;for(let t of n)t.zIndex.value=Math.max(t.minimumZIndex(),e+2),e=t.zIndex.value}function c(t){let r=n.filter(e=>ln(e,t)).flatMap(e=>e.elements());return[...new Set(r.flatMap(e=>e?[e,...e.querySelectorAll(cn)]:[]))].filter(t=>t.matches(cn)&&t.tabIndex>=0&&!t.matches(`:disabled`)&&!t.closest(`[inert]`)&&t.getClientRects().length>0&&e.defaultView?.getComputedStyle(t).visibility!==`hidden`)}function l(e){(c(e)[0]??e.elements().find(Boolean))?.focus({preventScroll:!0})}function u(t){r.set(t,i());let n=a();if(t.key!==`Tab`||!n)return;let o=c(n),s=o.indexOf(e.activeElement);(!o.length||s<0||(t.shiftKey?s===0:s===o.length-1))&&(t.preventDefault(),o.length?o[t.shiftKey?o.length-1:0]?.focus():l(n))}function d(e){let t=r.get(e);e.key===`Escape`&&!e.defaultPrevented&&t?.closeOnEscape()&&(e.preventDefault(),r.set(e,void 0),t.onEscape?.(e))}function f(e){let t=a();t&&!o(t,e.target)&&l(t)}return{contains:o,allowsFocus:e=>!i()||o(i(),e),isTop:(e,t)=>(t&&r.has(t)?r.get(t):i())===e,add(r){if(n.includes(r)){s();return}r.previousFocus=e.activeElement,n.push(r),s(),on.get(e)?.forEach(e=>e()),n.length===1&&(e.defaultView?.addEventListener(`keydown`,u,!0),e.defaultView?.addEventListener(`keydown`,d),e.addEventListener(`focusin`,f)),r.modal&&(0,t.nextTick)(()=>{a()===r&&!o(r,e.activeElement)&&l(r)})},remove(r){let i=n.indexOf(r);if(i<0)return;let s=a()===r;n.splice(i,1),s&&(0,t.nextTick)(()=>{let e=a(),t=r.previousFocus;t?.isConnected&&(!e||o(e,t))?t.focus({preventScroll:!0}):e&&l(e)}),n.length||(e.defaultView?.removeEventListener(`keydown`,u,!0),e.defaultView?.removeEventListener(`keydown`,d),e.removeEventListener(`focusin`,f),an.delete(e)),on.get(e)?.forEach(e=>e())}}}function dn(e){return an.get(e.ownerDocument)?.allowsFocus(e)??!0}function fn(e){let n={parent:(0,t.inject)(rn,null),elements:e.elements,modal:e.modal??!1,minimumZIndex:e.zIndex,zIndex:(0,t.ref)(e.zIndex()),closeOnEscape:e.closeOnEscape??(()=>!0),onEscape:e.onEscape,previousFocus:null};(0,t.provide)(rn,n);let r;return(0,t.watch)([e.open,e.zIndex],([e])=>{typeof document>`u`||(e?(r=an.get(document),r||(r=un(document),an.set(document,r)),r.add(n)):r?.remove(n))},{immediate:!0,flush:`post`}),(0,t.onBeforeUnmount)(()=>r?.remove(n)),{zIndex:(0,t.computed)(()=>Math.max(e.zIndex(),n.zIndex.value)),isTop:e=>r?.isTop(n,e)??!1,contains:e=>r?.contains(n,e)??!1}}function pn(){let e=(0,t.ref)(!1);return(0,t.onMounted)(()=>{e.value=!0}),e}var mn={key:0,class:`bing-autocomplete__header`},hn=[`aria-label`,`aria-busy`],gn=[`id`,`aria-selected`,`aria-disabled`,`aria-label`,`onPointermove`,`onClick`],_n={key:1,class:`bing-autocomplete__state`,role:`status`},vn={key:2,class:`bing-autocomplete__state`,role:`alert`},yn={key:3,class:`bing-autocomplete__state`,role:`status`},bn={key:4,class:`bing-autocomplete__detail is-inline`},xn={key:0},Sn={key:1},Cn={key:5,class:`bing-autocomplete__footer`},wn={key:0},Tn={key:1},En=R((0,t.defineComponent)({inheritAttrs:!1,__name:`BingAutocomplete`,props:{id:{},modelValue:{default:``},options:{default:()=>[]},filter:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},error:{default:``},disabled:{type:Boolean,default:void 0},clearable:{type:Boolean,default:!0},placeholder:{},emptyText:{default:`没有匹配的候选`},ariaLabel:{},ariaDescribedby:{},size:{},status:{},icon:{},block:{type:Boolean,default:!1},panelWidth:{},panelMaxHeight:{default:360},completeOnSelect:{type:Boolean,default:!0},closeOnSelect:{type:Boolean,default:!0}},emits:[`update:modelValue`,`select`,`open`,`close`,`clear`],setup(e,{expose:n,emit:r}){let i=e,a=r,o=(0,t.useSlots)(),{rootAttrs:s,controlAttrs:c}=he(),{formItem:l,resolvedId:u,resolvedSize:d,resolvedDisabled:f,resolvedStatus:p,resolvedAriaDescribedby:m}=ne(i);re();let h=pn(),g=`bing-autocomplete-${(0,t.useId)()}`,_=(0,t.ref)(null),v=(0,t.ref)(null),y=(0,t.ref)(null),b=(0,t.ref)(null),x=(0,t.ref)(null),S=(0,t.ref)(!1),C=(0,t.ref)(!1),w=(0,t.ref)(-1),T=(0,t.ref)({left:0,top:0,width:320,height:360,detailLeft:0,inline:!0}),E=0,D,O=!1,k=(0,t.computed)(()=>{if(!i.filter)return i.options;let e=i.modelValue.trim().toLocaleLowerCase();return i.options.filter(t=>t.label.toLocaleLowerCase().includes(e))}),A=(0,t.computed)(()=>!i.loading&&!i.error),j=(0,t.computed)(()=>A.value?k.value[w.value]:void 0),M=(0,t.computed)(()=>!!(j.value&&(o[`option-detail`]||j.value.detail||j.value.description||j.value.meta))),N=fn({open:()=>S.value,elements:()=>[_.value,v.value,y.value],zIndex:()=>3e3,closeOnEscape:()=>!C.value,onEscape:()=>{z(),O=!0,b.value?.input?.focus({preventScroll:!0}),O=!1}}),P=(0,t.computed)(()=>({position:`fixed`,left:`${T.value.left}px`,top:`${T.value.top}px`,width:`${T.value.width}px`,zIndex:N.zIndex.value})),F=(0,t.computed)(()=>T.value.inline?{}:{position:`fixed`,left:`${T.value.detailLeft}px`,top:`${T.value.top}px`,width:`248px`,zIndex:N.zIndex.value+1});function I(){if(E=0,!S.value||!_.value)return;let e=_.value.getBoundingClientRect(),t=window.visualViewport,n=(t?.offsetLeft??0)+8,r=(t?.offsetTop??0)+8,a=n+(t?.width??window.innerWidth)-16,o=r+(t?.height??window.innerHeight)-16,s=Math.min(Math.max(e.width,i.panelWidth??320),a-n),c=Math.max(n,Math.min(e.left,a-s)),l=o-e.bottom-6,u=e.top-r-6,d=l>=Math.min(i.panelMaxHeight,200)||l>=u,f=Math.max(0,Math.min(i.panelMaxHeight,(d?l:u)-10)),p=Math.min(v.value?.offsetHeight??f+10,f+10),m=d?Math.min(o,e.bottom+6):Math.max(r,e.top-6-p),h=c+s+8+248<=a?c+s+8:c-256;T.value={left:c,top:m,width:s,height:f,detailLeft:h,inline:h<n}}function L(){S.value&&!E&&(E=requestAnimationFrame(I))}function R(){f.value||S.value||O||(S.value=!0,w.value=k.value.findIndex(e=>!e.disabled),I(),a(`open`),(0,t.nextTick)(()=>{I(),v.value&&D?.observe(v.value)}))}function z(){S.value&&(S.value=!1,v.value&&D?.unobserve(v.value),a(`close`))}function B(){b.value?.focus(),R()}function V(e){a(`update:modelValue`,String(e)),l?.handleControlChange(),R()}function H(e){!A.value||e.disabled||f.value||C.value||(i.completeOnSelect&&V(e.label),a(`select`,e),i.closeOnSelect&&z())}function U(){(0,t.nextTick)(()=>{let e=x.value?.viewport,t=document.getElementById(`${g}-${w.value}`);if(!e||!t)return;let n=e.getBoundingClientRect(),r=t.getBoundingClientRect();r.top<n.top?e.scrollTop+=r.top-n.top:r.bottom>n.bottom&&(e.scrollTop+=r.bottom-n.bottom)})}function W(e){if(!(e.isComposing||C.value||e.keyCode===229||f.value))if(e.key===`Escape`&&S.value)e.preventDefault(),e.stopPropagation(),z();else if(e.key===`ArrowDown`||e.key===`ArrowUp`){if(e.preventDefault(),!S.value){R();return}if(!A.value)return;let t=e.key===`ArrowDown`?1:-1;for(let e=1;e<=k.value.length;e++){let n=(w.value+t*e+k.value.length)%k.value.length;if(!k.value[n]?.disabled){w.value=n,U();break}}}else e.key===`Enter`&&S.value&&j.value&&(e.preventDefault(),H(j.value))}function G(e){return!!(e&&([_.value,v.value,y.value].some(t=>t?.contains(e))||N.contains(e)))}function K(e){S.value&&e.target instanceof Node&&!G(e.target)&&z()}async function ee(){await(0,t.nextTick)(),S.value&&!G(document.activeElement)&&(z(),l?.handleControlBlur())}return(0,t.watch)([k,A],()=>{w.value=k.value.findIndex(e=>!e.disabled),S.value&&(L(),U())}),(0,t.watch)(f,e=>{e&&z()}),(0,t.watch)([()=>i.panelWidth,()=>i.panelMaxHeight,M],L),(0,t.onMounted)(()=>{D=new ResizeObserver(L),_.value&&D.observe(_.value),window.addEventListener(`resize`,L),window.addEventListener(`scroll`,L,!0),window.visualViewport?.addEventListener(`resize`,L),window.visualViewport?.addEventListener(`scroll`,L),document.addEventListener(`pointerdown`,K,!0),document.addEventListener(`focusin`,K)}),(0,t.onBeforeUnmount)(()=>{cancelAnimationFrame(E),D?.disconnect(),window.removeEventListener(`resize`,L),window.removeEventListener(`scroll`,L,!0),window.visualViewport?.removeEventListener(`resize`,L),window.visualViewport?.removeEventListener(`scroll`,L),document.removeEventListener(`pointerdown`,K,!0),document.removeEventListener(`focusin`,K)}),n({focus:B,close:z,get input(){return b.value?.input??null}}),(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,(0,t.mergeProps)((0,t.unref)(s)(),{ref_key:`root`,ref:_,class:[`bing-autocomplete`,{"is-block":e.block}],onFocusout:ee}),[(0,t.createVNode)(Mt,(0,t.mergeProps)((0,t.unref)(c)(),{id:(0,t.unref)(u),ref_key:`input`,ref:b,"model-value":e.modelValue,disabled:(0,t.unref)(f),size:(0,t.unref)(d),status:(0,t.unref)(p),placeholder:e.placeholder,clearable:e.clearable,icon:e.icon,block:``,"aria-label":e.ariaLabel,"aria-describedby":(0,t.unref)(m),role:`combobox`,"aria-autocomplete":`list`,"aria-expanded":S.value,"aria-controls":S.value?g:void 0,"aria-activedescendant":S.value&&j.value?`${g}-${w.value}`:void 0,spellcheck:!1,"onUpdate:modelValue":V,onFocus:R,onClick:R,onKeydown:W,onCompositionstart:r[0]||=e=>C.value=!0,onCompositionend:r[1]||=e=>C.value=!1,onClear:r[2]||=e=>a(`clear`)}),(0,t.createSlots)({_:2},[o.icon?{name:`icon`,fn:(0,t.withCtx)(()=>[(0,t.renderSlot)(n.$slots,`icon`,{},void 0,!0)]),key:`0`}:void 0]),1040,[`id`,`model-value`,`disabled`,`size`,`status`,`placeholder`,`clearable`,`icon`,`aria-label`,`aria-describedby`,`aria-expanded`,`aria-controls`,`aria-activedescendant`]),(0,t.unref)(h)?((0,t.openBlock)(),(0,t.createBlock)(t.Teleport,{key:0,to:`body`},[S.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,ref_key:`panel`,ref:v,class:`bing-autocomplete__panel`,style:(0,t.normalizeStyle)(P.value),onFocusout:ee},[(0,t.createVNode)(nn,{ref_key:`scrollbar`,ref:x,"max-height":T.value.height,focusable:!1},{default:(0,t.withCtx)(()=>[o.header?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,mn,[(0,t.renderSlot)(n.$slots,`header`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`div`,{id:g,role:`listbox`,"aria-label":e.ariaLabel||`搜索候选`,"aria-busy":e.loading},[A.value?((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,{key:0},(0,t.renderList)(k.value,(e,i)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{id:`${g}-${i}`,key:e.value,role:`option`,class:(0,t.normalizeClass)([`bing-autocomplete__option`,{"is-active":w.value===i,"is-disabled":e.disabled}]),"aria-selected":w.value===i,"aria-disabled":e.disabled||void 0,"aria-label":e.label,onMousedown:r[3]||=(0,t.withModifiers)(()=>{},[`prevent`]),onPointermove:t=>!e.disabled&&(w.value=i),onClick:t=>H(e)},[(0,t.renderSlot)(n.$slots,`option`,{option:e,active:w.value===i},()=>[(0,t.createElementVNode)(`span`,null,(0,t.toDisplayString)(e.label),1)],!0)],42,gn))),128)):(0,t.createCommentVNode)(``,!0)],8,hn),e.loading?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,_n,[(0,t.renderSlot)(n.$slots,`loading`,{},()=>[r[4]||=(0,t.createTextVNode)(`正在加载…`,-1)],!0)])):e.error?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,vn,[(0,t.renderSlot)(n.$slots,`error`,{error:e.error},()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.error),1)],!0)])):k.value.length?(0,t.createCommentVNode)(``,!0):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,yn,[(0,t.renderSlot)(n.$slots,`empty`,{},()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.emptyText),1)],!0)])),T.value.inline&&M.value&&j.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,bn,[(0,t.renderSlot)(n.$slots,`option-detail`,{option:j.value},()=>[(0,t.createElementVNode)(`strong`,null,(0,t.toDisplayString)(j.value.label),1),j.value.detail||j.value.description?((0,t.openBlock)(),(0,t.createElementBlock)(`p`,xn,(0,t.toDisplayString)(j.value.detail||j.value.description),1)):(0,t.createCommentVNode)(``,!0),j.value.meta?((0,t.openBlock)(),(0,t.createElementBlock)(`dl`,Sn,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(j.value.meta,(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:n},[(0,t.createElementVNode)(`dt`,null,(0,t.toDisplayString)(n),1),(0,t.createElementVNode)(`dd`,null,(0,t.toDisplayString)(e),1)]))),128))])):(0,t.createCommentVNode)(``,!0)],!0)])):(0,t.createCommentVNode)(``,!0),o.footer?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,Cn,[(0,t.renderSlot)(n.$slots,`footer`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0)]),_:3},8,[`max-height`])],36)):(0,t.createCommentVNode)(``,!0),S.value&&!T.value.inline&&M.value&&j.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:1,ref_key:`detail`,ref:y,class:`bing-autocomplete__detail`,style:(0,t.normalizeStyle)(F.value)},[(0,t.createVNode)(nn,{"max-height":Math.max(0,T.value.height-16),focusable:!1},{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(n.$slots,`option-detail`,{option:j.value},()=>[(0,t.createElementVNode)(`strong`,null,(0,t.toDisplayString)(j.value.label),1),j.value.detail||j.value.description?((0,t.openBlock)(),(0,t.createElementBlock)(`p`,wn,(0,t.toDisplayString)(j.value.detail||j.value.description),1)):(0,t.createCommentVNode)(``,!0),j.value.meta?((0,t.openBlock)(),(0,t.createElementBlock)(`dl`,Tn,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(j.value.meta,(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:n},[(0,t.createElementVNode)(`dt`,null,(0,t.toDisplayString)(n),1),(0,t.createElementVNode)(`dd`,null,(0,t.toDisplayString)(e),1)]))),128))])):(0,t.createCommentVNode)(``,!0)],!0)]),_:3},8,[`max-height`])],4)):(0,t.createCommentVNode)(``,!0)])):(0,t.createCommentVNode)(``,!0)],16))}}),[[`__scopeId`,`data-v-e06998c8`]]),Dn={duration:{fast:.18,normal:.32,slow:.62},ease:{smooth:`power3.out`,press:`back.out(2.2)`,glide:`expo.out`}};function On(){return typeof window<`u`}function kn(){return On()&&typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}var An=[`aria-label`],jn=[`aria-selected`,`aria-disabled`,`aria-label`,`disabled`,`tabindex`,`onClick`,`onKeydown`,`onFocus`,`onBlur`],Mn={class:`bing-tabs__tab-surface`},Nn={class:`bing-tabs__tab-content`},Pn=R((0,t.defineComponent)({inheritAttrs:!1,__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:`标签页`}},emits:[`update:modelValue`,`change`,`focus`,`blur`],setup(e,{emit:r}){let{playClickFeedback:i}=G(),a=e,o=r,s=(0,t.ref)(null),c=(0,t.ref)(null),l=(0,t.ref)(null),u=(0,t.ref)([]),d=(0,t.ref)(void 0),f=(0,t.ref)(-1),p=(0,t.ref)(!1),m,h,g=0,_=(0,t.computed)(()=>a.modelValue!==void 0),v=(0,t.computed)(()=>a.items.filter(e=>!e.disabled)),y=(0,t.computed)(()=>v.value[0]),b=(0,t.computed)(()=>_.value?a.modelValue:d.value??y.value?.value),x=(0,t.computed)(()=>a.items.findIndex(e=>Object.is(e.value,b.value))),S=(0,t.computed)(()=>[`bing-tabs`,`bing-tabs--${a.variant}`,`bing-tabs--${a.size}`,{"is-block":a.block,"is-disabled":a.disabled,"is-indicator-ready":p.value}]),C=(0,t.computed)(()=>Lt(a.smoothScroll,It,{keyboard:!1,smoothTouchpad:!1,respectReducedMotion:!0}));function w(){return typeof window<`u`}function T(){return!a.animated||a.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 a.disabled||!!e.disabled}function O(e,t){e instanceof HTMLButtonElement&&(u.value[t]=e)}function k(e){return e.querySelector(`.bing-tabs__tab-surface`)??e}function A(e){return D(a.items[e])?-1:f.value>=0?f.value===e?0:-1:x.value===e?0:-1}function j(e,t){let n=a.items.length;if(n===0)return-1;let r=e;for(let e=0;e<n;e+=1){if(r+=t,a.loop)r=(r+n)%n;else if(r<0||r>=n)return-1;let e=a.items[r];if(e&&!D(e))return r}return-1}function M(e){let t=(e===`first`?a.items:[...a.items].reverse()).findIndex(e=>!D(e));return t<0?-1:e===`first`?t:a.items.length-1-t}function N(e){return a.items.find(t=>Object.is(t.value,e))}function P(){return w()&&!!s.value?.contains(document.activeElement)}function F(e=!1){if(a.activation!==`auto`||x.value<0)return;let t=a.items[x.value];!t||D(t)||(f.value=x.value,e&&P()&&R(x.value))}function I(e,t){if(D(e)){t.preventDefault();return}i(t,u.value[a.items.indexOf(e)]);let n=b.value;if(Object.is(n,e.value))return;_.value||(d.value=e.value);let r={value:e.value,previousValue:n,item:e,previousItem:N(n),event:t};o(`update:modelValue`,e.value),o(`change`,r)}function L(e,t,n){n.defaultPrevented||(f.value=t,I(e,n))}function R(e){let t=u.value[e];t&&(c.value?.stop(),f.value=e,t.focus())}function z(e,n){let r=a.items[e];!r||D(r)||(n.preventDefault(),R(e),a.activation===`auto`&&(I(r,n),(0,t.nextTick)().then(()=>{Object.is(b.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=a.items[e];if(!n)return;t.preventDefault(),I(n,t)}}function V(e,t,n){c.value?.stop(),f.value=t,o(`focus`,{value:e.value,item:e,event:n})}function H(e,t){s.value?.contains(t.relatedTarget)||(f.value=-1),o(`blur`,{value:e.value,item:e,event:t})}function U(e){if(C.value!==!1&&(c.value?.handleWheel(e)??!1)||e.defaultPrevented||!s.value)return;let t=e.deltaX||(e.shiftKey?e.deltaY:0),n=Math.max(0,s.value.scrollWidth-s.value.clientWidth);n>.5&&(t<0?s.value.scrollLeft>.5:t>0&&s.value.scrollLeft<n-.5)&&e.stopPropagation()}function W(e=!0){w()&&(g&&window.cancelAnimationFrame(g),g=window.requestAnimationFrame(()=>{g=0,K(e)}))}function K(e=!0){let t=s.value,r=l.value,i=u.value[x.value];if(!t||!r||!i||x.value<0){r&&n.gsap.set(r,{autoAlpha:0}),p.value=!1;return}let a=t.getBoundingClientRect(),o=k(i).getBoundingClientRect(),c=r.getBoundingClientRect(),d=E(t,`left`),f=E(t,`top`),h=Math.max(1,o.width),g=Math.max(1,o.height),_=o.left-a.left-d+t.scrollLeft,v=o.top-a.top-f,y=p.value&&c.width>0&&c.height>0,b=y?c.left-a.left-d+t.scrollLeft:_,S=y?c.top-a.top-f:v,C=y?c.width/h:1,w=y?c.height/g:1,D=e&&y&&!T();m?.kill(),n.gsap.set(r,{width:h,height:g,transformOrigin:`0 0`,willChange:`transform, opacity`}),D?m=n.gsap.fromTo(r,{x:b,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:()=>{m=void 0}}):n.gsap.set(r,{x:_,y:v,scaleX:1,scaleY:1,autoAlpha:1,force3D:!0}),p.value=!0}return(0,t.onBeforeUpdate)(()=>{u.value=[]}),(0,t.onMounted)(()=>{(0,t.nextTick)().then(()=>{K(!1)}),typeof ResizeObserver<`u`&&s.value&&(h=new ResizeObserver(()=>{W(!1)}),h.observe(s.value))}),(0,t.onBeforeUnmount)(()=>{m?.kill(),c.value?.stop(),g&&w()&&window.cancelAnimationFrame(g),h?.disconnect()}),(0,t.watch)(()=>a.smoothScroll,()=>c.value?.stop(),{deep:!0}),(0,t.watch)(()=>[b.value,a.items.length,a.size,a.variant,a.block],()=>{(0,t.nextTick)().then(()=>{K(!0)})}),(0,t.watch)(x,()=>{f.value<0||!P()||(0,t.nextTick)().then(()=>{F(!0)})}),(n,r)=>((0,t.openBlock)(),(0,t.createBlock)(nn,{ref_key:`scrollbarRef`,ref:c,class:(0,t.normalizeClass)([`bing-tabs__scroll`,{"is-block":e.block}]),vertical:!1,horizontal:``,focusable:!1,smooth:C.value},{viewport:(0,t.withCtx)(({viewportRef:r,viewportAttrs:i})=>[(0,t.createElementVNode)(`div`,(0,t.mergeProps)((0,t.mergeProps)(n.$attrs,{...i,onWheel:U}),{ref:e=>{s.value=e,r(e)},class:S.value,role:`tablist`,"aria-orientation":`horizontal`,"aria-label":e.ariaLabel}),[(0,t.createElementVNode)(`span`,{ref_key:`indicatorRef`,ref:l,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,b.value),"is-disabled":D(e)}]),type:`button`,role:`tab`,"aria-selected":Object.is(e.value,b.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`,Mn,[(0,t.createElementVNode)(`span`,Nn,[(0,t.renderSlot)(n.$slots,`item`,{item:e,active:Object.is(e.value,b.value),disabled:D(e)},()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.label),1)],!0)])])],42,jn))),128))],16,An)]),_:3},8,[`class`,`smooth`]))}}),[[`__scopeId`,`data-v-e740be89`]]),Fn=[`aria-hidden`],In=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:`应用切换面板`}},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&&kn()}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,Fn))),128))],512),e.showTabs?((0,t.openBlock)(),(0,t.createBlock)(Pn,{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-bacda41f`]]),Ln={glass:!0,glassBlur:16,glassOpacity:.85,glassSaturation:1.28};function Rn(e,t,n){return Math.min(n,Math.max(t,e))}function zn(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 Bn(e,t){let n=t.glass!==!1,r=n?t.glassBlur===void 0?`var(--bing-glass-blur, 16px)`:zn(t.glassBlur):`0px`,i=n?t.glassOpacity===void 0?`var(--bing-glass-opacity, 0.85)`:Rn(t.glassOpacity,0,1):1,a=n?t.glassSaturation===void 0?`var(--bing-glass-saturation, 1.05)`:Math.max(0,t.glassSaturation):1;return{[`--${e}-glass-blur`]:r,[`--${e}-glass-opacity`]:String(i),[`--${e}-glass-saturation`]:String(a)}}var Vn={class:`bing-card__face bing-card__front`},Hn={key:1,class:`bing-card__media`},Un={class:`bing-card__content`},Wn={key:0,class:`bing-card__header`},Gn={class:`bing-card__heading`},Kn={key:0,class:`bing-card__title`},qn={key:1,class:`bing-card__description`},Jn={key:1,class:`bing-card__body`},Yn={key:2,class:`bing-card__footer`},Xn={class:`bing-card__face bing-card__back`,"aria-hidden":`true`},Zn=10,Qn=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:void 0},glassOpacity:{default:void 0},glassSaturation:{default:void 0}},emits:[`enter`,`long-press`,`flip`],setup(e,{emit:r}){let{playClickFeedback:i}=G(),a=e,o=r,s=(0,t.ref)(null),c=(0,t.ref)(null),l=(0,t.ref)(null),u=(0,t.ref)(null),d=(0,t.ref)(null),f=(0,t.ref)(!1),p=(0,t.ref)(!1),m=(0,t.ref)(!1),h,g,_,v,y,b=!1,x=!1,S=0,C=0,w=!1,T=(0,t.computed)(()=>a.flipAxis===`z`?`y`:a.flipAxis),E=(0,t.computed)(()=>a.disabled?`none`:a.flipTrigger),D=(0,t.computed)(()=>[`bing-card`,`bing-card--${a.variant}`,`bing-card--padding-${a.padding}`,`bing-card--rounded-${a.rounded}`,`bing-card--back-axis-${T.value}`,{"is-glass":a.glass,"is-interactive":a.interactive,"is-tilt":a.tilt,"is-glare":a.glare,"is-flipped":p.value,"is-pressing":m.value,"is-long-press-enabled":E.value===`press`,"is-click-flip-enabled":E.value===`click`,"is-disabled":a.disabled,"has-entered":f.value}]),O=(0,t.computed)(()=>({...Bn(`bing-card`,{glass:a.glass,glassBlur:a.glassBlur,glassOpacity:a.glassOpacity,glassSaturation:a.glassSaturation}),"--bing-card-tilt-max":`${a.tiltMax}deg`})),k=(0,t.computed)(()=>!!(a.title||a.description));function A(){return typeof window<`u`&&typeof document<`u`}function j(){return A()&&typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function M(e,t,n){return Math.min(n,Math.max(t,e))}function N(e){return e===`x`?`rotationX`:e===`y`?`rotationY`:`rotation`}function P(){return{rotationX:0,rotationY:0,rotation:0,[N(T.value)]:p.value?180:0}}function F(e,t){return p.value?T.value===`x`?{rotationX:180+e,rotationY:t,rotation:0}:{rotationX:e,rotationY:180+t,rotation:0}:{rotationX:e,rotationY:t,rotation:0}}function I(){return a.interactive&&a.tilt&&!a.disabled&&!j()&&!x&&!b&&c.value}function L(e){if(ee(e),!I())return;let t=s.value,r=c.value;if(!t||!r)return;let i=t.getBoundingClientRect();if(i.width===0||i.height===0)return;let o=M((e.clientX-i.left)/i.width,0,1),u=M((e.clientY-i.top)/i.height,0,1),d=Math.max(0,a.tiltMax),f=(o-.5)*d*2,p=(.5-u)*d*2;n.gsap.to(r,{...F(p,f),scale:Math.max(1,a.tiltScale),transformPerspective:900,transformOrigin:`50% 50%`,duration:.34,ease:`power3.out`,overwrite:!0,force3D:!0}),a.glare&&l.value&&n.gsap.to(l.value,{"--bing-card-glare-x":`${o*100}%`,"--bing-card-glare-y":`${u*100}%`,opacity:1,duration:.24,ease:`power2.out`,overwrite:!0})}function R(){if(x)return;let e=c.value;e&&n.gsap.to(e,{...P(),scale:1,duration:.48,ease:`elastic.out(1, 0.72)`,overwrite:!0,force3D:!0}),l.value&&n.gsap.to(l.value,{opacity:0,duration:.26,ease:`power2.out`,overwrite:!0})}function z(){let e=N(a.flipAxis),t=-360*Math.max(1,a.flipTurns);return{from:{autoAlpha:0,y:34,z:a.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:a.flipEase}}}function B(){switch(a.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 z();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 V(){_?.kill(),_=void 0,m.value=!1,u.value&&(n.gsap.killTweensOf(u.value),n.gsap.set(u.value,{"--bing-card-press-progress":0,"--bing-card-press-ring-scale":.78,autoAlpha:0})),d.value&&(n.gsap.killTweensOf(d.value),n.gsap.set(d.value,{autoAlpha:0,scale:.98}))}function H(){m.value=!1,u.value&&(n.gsap.killTweensOf(u.value),n.gsap.timeline().to(u.value,{"--bing-card-press-ring-scale":.96,autoAlpha:.82,duration:.1,ease:`power2.out`}).to(u.value,{"--bing-card-press-ring-scale":1.08,autoAlpha:0,duration:.38,ease:`power3.out`},.06)),d.value&&(n.gsap.killTweensOf(d.value),n.gsap.timeline().to(d.value,{autoAlpha:.18,scale:1,duration:.1,ease:`power2.out`}).to(d.value,{autoAlpha:0,scale:1.015,duration:.38,ease:`power3.out`},.06))}function U(e=!p.value){let t=c.value;if(!t||a.disabled||x||p.value===e)return;p.value=e;let r=n.gsap.to(t,{...P(),scale:1,transformPerspective:900,transformOrigin:`50% 50%`,duration:.68,ease:`power3.inOut`,overwrite:!0,force3D:!0,onComplete:()=>{v===r&&(b=!1)},onInterrupt:()=>{v===r&&(b=!1)}});v=r,b=!0,o(`flip`,e?`back`:`front`)}function W(e){if(!A()||E.value!==`press`||x||e.button!==0)return;V(),w=!1,S=e.clientX,C=e.clientY,m.value=!0;let t=s.value?.getBoundingClientRect(),r=t&&t.width>0?`${M((e.clientX-t.left)/t.width*100,0,100)}%`:`50%`,i=t&&t.height>0?`${M((e.clientY-t.top)/t.height*100,0,100)}%`:`50%`;try{e.currentTarget?.setPointerCapture?.(e.pointerId)}catch{}u.value&&(n.gsap.set(u.value,{"--bing-card-press-progress":0,"--bing-card-press-x":r,"--bing-card-press-y":i,"--bing-card-press-ring-scale":.78,autoAlpha:1}),_=n.gsap.to(u.value,{"--bing-card-press-progress":1,"--bing-card-press-ring-scale":.98,duration:Math.max(120,a.longPressDelay)/1e3,ease:`none`,overwrite:!0,onComplete:()=>{if(_=void 0,w=!0,o(`long-press`),H(),a.longPressRelease===`restore`){U(!0);return}U()}})),d.value&&n.gsap.fromTo(d.value,{autoAlpha:0,scale:.98},{autoAlpha:1,scale:1,duration:Math.min(.24,Math.max(120,a.longPressDelay)/2e3),ease:`power2.out`,overwrite:!0})}function K(e){e.defaultPrevented||a.disabled||E.value!==`click`||x||e.target instanceof Element&&e.target.closest(`button,a[href],input,label,select,textarea,[role="button"],[role="tab"],[contenteditable]:not([contenteditable="false"])`)||(i(e),U())}function ee(e){if(!_)return;let t=e.clientX-S,n=e.clientY-C;Math.hypot(t,n)>Zn&&V()}function te(){V(),w&&a.longPressRelease===`restore`&&U(!1),w=!1}function ne(){w||V(),!b&&R()}function re(){let e=s.value,t=c.value;if(!e||!t||a.disabled||f.value&&a.entranceOnce)return;if(f.value=!0,e.classList.add(`has-entered`),o(`enter`),y?.kill(),y=void 0,x=!1,h?.revert(),h=void 0,a.entrance===`none`||j()){n.gsap.set(t,{autoAlpha:1,clearProps:`transform,filter`});return}let r=B();h=n.gsap.context(()=>{let e=n.gsap.fromTo(t,r.from,{...r.to,duration:Math.max(.1,a.entranceDuration),delay:Math.max(0,a.entranceDelay),clearProps:`filter`,onComplete:()=>{y===e&&(y=void 0,x=!1)},onInterrupt:()=>{y===e&&(y=void 0,x=!1)}});y=e,x=!0},e)}function q(){if(g?.disconnect(),g=void 0,!A()){re();return}if(a.entrance===`none`||j()){re();return}if(!(`IntersectionObserver`in window)){re();return}let e=s.value;e&&(g=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&(re(),a.entranceOnce&&(g?.disconnect(),g=void 0))},{threshold:.18,rootMargin:`0px 0px -8% 0px`}),g.observe(e))}return(0,t.watch)(()=>[a.entrance,a.entranceOnce,a.entranceDelay,a.entranceDuration,a.flipAxis,a.flipTurns,a.flipEase,a.flipTrigger,a.disabled],()=>{V(),f.value=!1,(0,t.nextTick)(q)},{flush:`post`}),(0,t.onMounted)(()=>{(0,t.nextTick)(q)}),(0,t.onBeforeUnmount)(()=>{V(),y?.kill(),y=void 0,x=!1,v?.kill(),v=void 0,b=!1,g?.disconnect(),g=void 0,h?.revert(),h=void 0,n.gsap.killTweensOf([c.value,l.value,u.value,d.value].filter(Boolean))}),(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`article`,{ref_key:`rootRef`,ref:s,class:(0,t.normalizeClass)(D.value),style:(0,t.normalizeStyle)(O.value),onPointerdown:W,onPointermove:L,onPointerup:te,onPointerleave:ne,onPointercancel:te,onLostpointercapture:te,onClick:K},[(0,t.createElementVNode)(`div`,{ref_key:`surfaceRef`,ref:c,class:`bing-card__surface`},[(0,t.createElementVNode)(`div`,Vn,[e.glare?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,ref_key:`glareRef`,ref:l,class:`bing-card__glare`,"aria-hidden":`true`},null,512)):(0,t.createCommentVNode)(``,!0),n.$slots.media?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,Hn,[(0,t.renderSlot)(n.$slots,`media`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`div`,Un,[n.$slots.header||k.value?((0,t.openBlock)(),(0,t.createElementBlock)(`header`,Wn,[(0,t.renderSlot)(n.$slots,`header`,{},()=>[(0,t.createElementVNode)(`div`,Gn,[e.title?((0,t.openBlock)(),(0,t.createElementBlock)(`h3`,Kn,(0,t.toDisplayString)(e.title),1)):(0,t.createCommentVNode)(``,!0),e.description?((0,t.openBlock)(),(0,t.createElementBlock)(`p`,qn,(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`,Jn,[(0,t.renderSlot)(n.$slots,`default`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0),n.$slots.footer?((0,t.openBlock)(),(0,t.createElementBlock)(`footer`,Yn,[(0,t.renderSlot)(n.$slots,`footer`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0)])]),(0,t.createElementVNode)(`div`,Xn,[(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`},`交互卡片`,-1)],!0)]),E.value===`press`?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,ref_key:`pressAmbienceRef`,ref:d,class:`bing-card__press-ambience`,"aria-hidden":`true`},null,512)):(0,t.createCommentVNode)(``,!0),E.value===`press`?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:1,ref_key:`pressFeedbackRef`,ref:u,class:`bing-card__press-feedback`,"aria-hidden":`true`},null,512)):(0,t.createCommentVNode)(``,!0)],512)],38))}}),[[`__scopeId`,`data-v-42286b35`]]),$n=Symbol(`BingCheckboxGroupContext`),er=[`id`,`checked`,`indeterminate`,`disabled`,`name`,`value`,`aria-label`,`aria-describedby`,`aria-invalid`],tr={class:`bing-checkbox__control`,"aria-hidden":`true`},nr={key:1,class:`bing-checkbox__label`},rr=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:void 0},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,{playClickFeedback:o}=G(),s=(0,t.useSlots)(),c=(0,t.inject)($n,null),{formItem:l,resolvedSize:u,resolvedDisabled:d,resolvedStatus:f,resolvedId:p,resolvedAriaDescribedby:m}=ne({get id(){return i.id},get size(){return i.size??c?.size.value},get disabled(){return c?.disabled.value||i.disabled},get status(){return i.status??c?.status.value},get ariaDescribedby(){return i.ariaDescribedby}},{register:!c}),h=(0,t.ref)(null),g=(0,t.ref)(null),_=(0,t.ref)(!1),v=null,y=(0,t.computed)(()=>!!(i.label||s.default)),b=(0,t.computed)(()=>i.name??c?.name.value),x=(0,t.computed)(()=>c?c.modelValue.value.some(e=>e===i.value):i.modelValue),S=(0,t.computed)(()=>[`bing-checkbox`,typeof u.value==`string`?`bing-checkbox--${u.value}`:void 0,`bing-checkbox--${i.shape}`,`bing-checkbox--${i.tone}`,`bing-checkbox--status-${f.value}`,{"is-checked":x.value,"is-indeterminate":i.indeterminate,"is-disabled":d.value,"is-invalid":f.value===`error`,"is-decorative":i.decorative,"is-check-exiting":_.value,"has-label":y.value&&!i.decorative}]),C=(0,t.computed)(()=>{if(typeof u.value==`number`)return{"--bing-checkbox-size":`${u.value}px`,"--bing-checkbox-radius":i.shape===`circle`?`50%`:`${Math.max(2,Math.round(u.value*.22))}px`}});function w(){return typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function T(){n.gsap.killTweensOf([h.value,g.value].filter(e=>!!e))}function E(e,t,r,i){if(w()){_.value=!1;return}let a=h.value,o=g.value;if(!a||!o)return;let s=e&&!t,c=r&&!i;T(),_.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&&(_.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:()=>{_.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 D(e){if(e.defaultPrevented||d.value||i.decorative)return;let t=e.currentTarget.parentElement?.querySelector(`.bing-checkbox__control`);o(e,t)}function O(e){let t=e.target.checked;if(v={checked:t,indeterminate:i.indeterminate},E(t,i.indeterminate,x.value,i.indeterminate),c&&i.value!==void 0){c.updateValue(i.value,t,e);return}a(`update:modelValue`,t),a(`change`,t,e),l?.handleControlChange()}function k(e){a(`blur`,e),c?.handleCheckboxBlur(e),c||l?.handleControlBlur()}return(0,t.watch)(()=>[x.value,i.indeterminate],([e,t],[n,r])=>{if(v?.checked===e&&v.indeterminate===t){v=null;return}v=null,E(e,t,n,r)},{flush:`post`}),(0,t.onBeforeUnmount)(T),(n,r)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.decorative?`span`:`label`),{class:(0,t.normalizeClass)(S.value),style:(0,t.normalizeStyle)(C.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:(0,t.unref)(p),type:`checkbox`,checked:x.value,indeterminate:e.indeterminate,disabled:(0,t.unref)(d),name:b.value,value:e.value,"aria-label":e.ariaLabel||void 0,"aria-describedby":(0,t.unref)(m),"aria-invalid":(0,t.unref)(f)===`error`||void 0,onChange:O,onClick:D,onFocus:r[0]||=e=>a(`focus`,e),onBlur:k},null,40,er)),(0,t.createElementVNode)(`span`,tr,[(0,t.createElementVNode)(`span`,{ref_key:`checkRef`,ref:h,class:`bing-checkbox__check`},[(0,t.createVNode)(Q,{icon:(0,t.unref)(Re),size:`xs`,"stroke-width":2.25},null,8,[`icon`])],512),(0,t.createElementVNode)(`span`,{ref_key:`mixedRef`,ref:g,class:`bing-checkbox__mixed`},null,512)]),!e.decorative&&y.value?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,nr,[(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-7d6ea319`]]),ir=[`aria-label`],ar={class:`bing-resizable__content`},or={key:0,class:`bing-resizable__size`,"aria-hidden":`true`},sr=[`aria-label`,`disabled`,`onPointerdown`,`onKeydown`],cr={class:`bing-resizable__handle-mark`,"aria-hidden":`true`},lr=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:Me,right:je,bottom:Me,left:je,"top-left":Ne,"top-right":Pe,"bottom-left":Oe,"bottom-right":ke},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)} × ${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 W(e,t){return Math.abs(e.x-t.x)<.001&&Math.abs(e.y-t.y)<.001}function G(){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 K(e){return{top:e.includes(`top`),right:e.includes(`right`),bottom:e.includes(`bottom`),left:e.includes(`left`)}}function ee(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 te(e){return[`ew-resize`,`ns-resize`,`nwse-resize`,`nesw-resize`].includes(e)}function ne(e){let t=K(e);return`${t.left?`100%`:t.right?`0%`:`50%`} ${t.top?`100%`:t.bottom?`0%`:`50%`}`}function re(e){return`调整${{top:`上边`,right:`右边`,bottom:`下边`,left:`左边`,"top-left":`左上角`,"top-right":`右上角`,"bottom-left":`左下角`,"bottom-right":`右下角`}[e]}尺寸`}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=K(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=K(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=G();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=K(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 J(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 de(e,t,n,r=e.snapMode===`live`){let i=K(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=J(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 fe(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 pe(e,t,n){return{direction:e,size:p.value,position:h.value,delta:t,event:n}}function Y(){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 me(e){if(!P()||E)return;let t=ee(e);S=te(document.documentElement.style.cursor)?``:document.documentElement.style.cursor,C=te(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 he(){!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 ge(){if(P()){window.addEventListener(`pointermove`,X),window.addEventListener(`pointerup`,Se),window.addEventListener(`pointercancel`,Se),window.addEventListener(`pointerout`,we),window.addEventListener(`blur`,Ce),window.addEventListener(`keydown`,Ee),document.addEventListener(`visibilitychange`,Te);try{window.parent&&window.parent!==window&&(window.parent.addEventListener(`pointerup`,Se),window.parent.addEventListener(`pointercancel`,Se),window.parent.addEventListener(`blur`,Ce))}catch{}}}function _e(){if(P()){window.removeEventListener(`pointermove`,X),window.removeEventListener(`pointerup`,Se),window.removeEventListener(`pointercancel`,Se),window.removeEventListener(`pointerout`,we),window.removeEventListener(`blur`,Ce),window.removeEventListener(`keydown`,Ee),document.removeEventListener(`visibilitychange`,Te);try{window.parent&&window.parent!==window&&(window.parent.removeEventListener(`pointerup`,Se),window.parent.removeEventListener(`pointercancel`,Se),window.parent.removeEventListener(`blur`,Ce))}catch{}}}function ve(e){F()||(u.value&&n.gsap.to(u.value,{scale:1.006,transformOrigin:ne(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:ne(e),duration:.18,ease:`power2.out`,overwrite:!0,force3D:!0}))}function ye(e){F()||(u.value&&n.gsap.to(u.value,{scale:1,transformOrigin:ne(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:ne(e),duration:.28,ease:`power3.out`,overwrite:!0,force3D:!0}))}function be(e,t){if(!(s.disabled||t.button!==0)){t.preventDefault(),b=fe(e,t.clientX,t.clientY),x={x:0,y:0},p.value=b.startSize,h.value=b.startPosition,y.value=e,v.value=!0,me(e),ge(),ve(e);try{t.currentTarget?.setPointerCapture?.(t.pointerId)}catch{}c(`resize-start`,pe(e,x,t))}}function X(e){if(!b)return;e.preventDefault(),x={x:e.clientX-b.startClientX,y:e.clientY-b.startClientY};let t=de(b,x.x,x.y);U(t.size,p.value)&&W(t.position,h.value)||(p.value=t.size,h.value=t.position,Y(),c(`resize`,pe(b.direction,x,e)))}function xe(e,t=!0){let n=b;if(_e(),he(),!n)return;let r=n.direction;if(n.snapMode===`end`){let e=de(n,x.x,x.y,!0);p.value=e.size,h.value=e.position}Y(),e&&t&&c(`resize-end`,pe(r,x,e)),ye(r),b=void 0,y.value=null,v.value=!1}function Se(e){xe(e)}function Ce(){xe(void 0,!1)}function we(e){e.relatedTarget||(e.clientX<=0||e.clientY<=0||e.clientX>=window.innerWidth||e.clientY>=window.innerHeight)&&Ce()}function Te(){document.visibilityState===`hidden`&&Ce()}function Ee(e){e.key===`Escape`&&xe(e)}function De(e,t){let n=K(e),r=G(),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 Z(e,t){if(s.disabled)return;let n=De(e,t);if(!n)return;t.preventDefault();let r=de(fe(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`,pe(e,{x:0,y:0},t)),Y(),c(`resize`,pe(e,n,t)),c(`resize-end`,pe(e,n,t)),ve(e),ye(e),y.value=null,v.value=!1}function Ae(){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 Fe(){return v.value?p.value:R(O.value)}function Ie(){return k.value}return(0,t.onBeforeUnmount)(()=>{_e(),he(),n.gsap.killTweensOf([u.value,d.value].filter(Boolean))}),r({reset:Ae,getSize:Fe,getPosition:Ie}),(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`,ar,[(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`,or,(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":re(i),disabled:e.disabled,onPointerdown:e=>be(i,e),onKeydown:e=>Z(i,e)},[(0,t.renderSlot)(n.$slots,`handle`,{direction:i,active:y.value===i},()=>[(0,t.createElementVNode)(`span`,cr,[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":1.75},null,8,[`icon`,`size`])])],!0)],42,sr))),128))],512)],14,ir))}}),[[`__scopeId`,`data-v-0cb888b5`]]),ur=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function dr(e){return fr(e)}function fr(e){return Array.isArray(e)?pr(e):e instanceof RegExp?e:typeof e==`object`?mr(e):e}function pr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=fr(e[n]);return t}function mr(e){let t={};for(let n in e)t[n]=fr(e[n]);return t}function hr(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function gr(e){let t=~e.lastIndexOf(`/`)||~e.lastIndexOf(`\\`);return t===0?e:~t===e.length-1?gr(e.substring(0,e.length-1)):e.substr(~t+1)}var _r=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,vr=class{static hasCaptures(e){return e===null?!1:(_r.lastIndex=0,_r.test(e))}static replaceCaptures(e,t,n){return e.replace(_r,(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 yr(e,t){return e<t?-1:+(e>t)}function br(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=yr(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function xr(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 Sr(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)}var Cr=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}},wr=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(kr(e),t)}static createFromParsedTheme(e,t){return Mr(e,t)}_cachedMatchRoot=new Cr(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=>Er(e.parent,t.parentScopes));return n?new Or(n.fontStyle,n.foreground,n.background):null}},Tr=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 Er(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&&!Dr(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function Dr(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}var Or=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function kr(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`&&xr(i.settings.foreground)&&(s=i.settings.foreground);let c=null;typeof i.settings.background==`string`&&xr(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 Ar(l,u,e,o,s,c)}}return n}var Ar=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}},jr=(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))(jr||{});function Mr(e,t){e.sort((e,t)=>{let n=yr(e.scope,t.scope);return n!==0||(n=br(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 Nr(t),o=new Or(n,a.getId(r),a.getId(i)),s=new Ir(new Fr(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 wr(a,o,s)}var Nr=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)}},Pr=Object.freeze([]),Fr=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||Pr,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)}},Ir=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(),Fr.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(br(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 Fr(e,t,n,r,i))}},Lr=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=zr(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 Rr(e){return e}function zr(e){return e}function Br(e,t){let n=[],r=Hr(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(Vr(i)){let e=[];do e.push(i),i=r.next();while(Vr(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 Vr(e){return!!e&&!!e.match(/[\w\.:]+/)}function Hr(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 Ur(e){typeof e.dispose==`function`&&e.dispose()}var Wr=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},Gr=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},Kr=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))}},qr=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Wr(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new Kr;for(let n of e)Jr(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof Wr){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 Jr(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 Wr?Xr({baseGrammar:a,selfGrammar:i},r):Yr(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 Wr(e))}function Yr(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];Zr([r],t,n)}}function Xr(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Zr(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Zr(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Zr(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?hr({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&Zr(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=ri(i);switch(a.kind){case 0:Xr({...t,selfGrammar:t.baseGrammar},n);break;case 1:Xr(t,n);break;case 2:Yr(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?Yr(a.ruleName,i,n):Xr(i,n)}else a.kind===4?n.add(new Gr(a.scopeName,a.ruleName)):n.add(new Wr(a.scopeName));break}}}var Qr=class{kind=0},$r=class{kind=1},ei=class{constructor(e){this.ruleName=e}kind=2},ti=class{constructor(e){this.scopeName=e}kind=3},ni=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function ri(e){if(e===`$base`)return new Qr;if(e===`$self`)return new $r;let t=e.indexOf(`#`);return t===-1?new ti(e):t===0?new ei(e.substring(1)):new ni(e.substring(0,t),e.substring(t+1))}var ii=/\\(\d+)/,ai=/\\(\d+)/g,oi=-1,si=-2;function ci(e){return e}function li(e){return e}var ui=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=vr.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=vr.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${gr(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:vr.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:vr.replaceCaptures(this._contentName,e,t)}},di=class extends ui{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!`)}},fi=class extends ui{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new _i(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 vi,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},pi=class extends ui{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 vi,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},mi=class extends ui{_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 _i(i,this.id),this.beginCaptures=a,this._end=new _i(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 vi;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}},hi=class extends ui{_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 _i(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new _i(o,si),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 vi;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 vi,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||`￿`),this._cachedCompiledWhilePatterns}},gi=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new di(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new fi(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(t.begin===void 0){t.repository&&(r=hr({},r,t.repository));let i=t.patterns;return i===void 0&&t.include&&(i=[{include:t.include}]),new pi(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new hi(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 mi(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=ri(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 pi||e instanceof mi||e instanceof hi)&&e.hasMissingPatterns&&e.patterns.length===0&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},_i=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=ii.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 ai.lastIndex=0,this.source.replace(ai,(e,t)=>Sr(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}},vi=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 yi(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 yi(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},yi=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,G=0;G<R.length;G++)M.appendChild(R[G]===` `?document.createTextNode(` `):r(R[G]));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=(0,t.ref)(null),c,l,u,d,f,p=!1,m=!1,h=!1,g=``,_,v=(0,t.computed)(()=>i.effect!==`none`&&!i.disabled),y=(0,t.computed)(()=>v.value&&i.effect===`shine`),b=(0,t.computed)(()=>v.value&&i.effect===`jump`),x=(0,t.computed)(()=>[`bing-animated-text`,`bing-animated-text--${i.effect}`,{"is-disabled":i.disabled,"is-shine-active":y.value,[`bing-animated-text--shine-${i.trigger}`]:y.value,[`bing-animated-text--shine-direction-${i.shineDirection}`]:y.value,[`bing-animated-text--jump-${i.trigger}`]:b.value}]),S=(0,t.computed)(()=>{let e={};return b.value&&(e[`--animated-text-jump-room`]=`${Math.max(2,Math.abs(Math.min(0,i.jumpY))+2)}px`),y.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 C(){return typeof window<`u`&&typeof document<`u`}function w(){return C()&&typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function T(){r||=(n.gsap.registerPlugin(I),!0)}function E(){p=!1,a.value?.removeAttribute(`data-jump-playing`),a.value?.removeAttribute(`data-jump-ready`),u?.kill(),u=void 0,c?.revert(),c=void 0,l?.revert(),l=void 0,s.value?.replaceChildren()}function D(){return i.shineDirection===`left`?{start:`150% 0`,end:`-150% 0`}:{start:`-150% 0`,end:`150% 0`}}function O(){m=!1,a.value?.removeAttribute(`data-shine-playing`),d?.kill(),d=void 0,f?.kill(),f=void 0,o.value&&n.gsap.set(o.value,{clearProps:`backgroundPosition`})}function k(){i.trigger!==`always`||!y.value||w()||(f?.kill(),f=n.gsap.delayedCall(Math.max(0,i.shineInterval),()=>{f=void 0,A(0)}))}function A(e=i.shineDelay){let t=o.value;if(m||f||!t||!y.value||w())return;let r=D();m=!0,a.value?.setAttribute(`data-shine-playing`,`true`),n.gsap.set(t,{backgroundPosition:r.start}),d=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}),m=!1,d=void 0,a.value?.removeAttribute(`data-shine-playing`),k()}})}function j(){O(),!(!y.value||!o.value||w())&&(n.gsap.set(o.value,{backgroundPosition:D().start}),(i.trigger===`always`||i.trigger===`once`)&&A())}function M(){if(p||!c?.chars.length||!b.value||w())return;let e=Math.max(.1,i.jumpDuration),t=i.trigger===`always`;p=!0,a.value?.setAttribute(`data-jump-playing`,`true`),u=n.gsap.timeline({repeat:t?-1:0,repeatDelay:Math.max(0,i.jumpRepeatDelay),onComplete:()=>{p=!1,u=void 0,a.value?.removeAttribute(`data-jump-playing`)}}),u.fromTo(c.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 N(){E();let e=o.value,t=s.value,r=a.value;g=e?.innerHTML??``,!(!b.value||!e||!t||!r||w())&&(T(),t.innerHTML=g,t.querySelectorAll(`[id]`).forEach(e=>e.removeAttribute(`id`)),l=n.gsap.context(()=>{c=I.create(t,{type:`words, chars`,tag:`span`,aria:`hidden`,wordsClass:`bing-animated-text__word`,charsClass:`bing-animated-text__char`}),c.words.forEach(e=>{/[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}]/u.test(e.textContent??``)&&e.classList.add(`bing-animated-text__word--breakable`)}),n.gsap.set(c.chars,{display:`inline-block`,transformOrigin:`50% 100%`,willChange:`transform`}),r.setAttribute(`data-jump-ready`,`true`),(i.trigger===`always`||i.trigger===`once`)&&M()},r))}function P(){!C()||h||(h=!0,(0,t.nextTick)(()=>{h=!1,a.value&&N()}))}function F(){C()&&(0,t.nextTick)(()=>{j()})}function L(){i.trigger===`hover`&&(y.value&&A(),b.value&&M())}(0,t.watch)(()=>[i.effect,i.trigger,i.disabled,i.shineSpeed,i.shineDelay,i.shineInterval,i.shineDirection,i.shineAngle,i.shineColor,i.shineBaseColor],F,{flush:`post`}),(0,t.watch)(()=>[i.effect,i.trigger,i.disabled,i.jumpY,i.jumpStagger,i.jumpDuration,i.jumpEase,i.jumpReturnEase,i.jumpRepeatDelay],P,{flush:`post`}),(0,t.onMounted)(()=>{_=window.matchMedia?.(`(prefers-reduced-motion: reduce)`),_?.addEventListener(`change`,R),F(),P()}),(0,t.onUpdated)(()=>{o.value?.innerHTML!==g&&P()}),(0,t.onUnmounted)(()=>{_?.removeEventListener(`change`,R),O(),E()});function R(){F(),P()}return(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{ref_key:`rootRef`,ref:a,class:(0,t.normalizeClass)(x.value),style:(0,t.normalizeStyle)(S.value),onMouseenter:L},[(0,t.createElementVNode)(`span`,{ref_key:`contentRef`,ref:o,class:`bing-animated-text__content`},[(0,t.renderSlot)(e.$slots,`default`,{},void 0,!0)],512),(0,t.createElementVNode)(`span`,{ref_key:`jumpContentRef`,ref:s,class:`bing-animated-text__jump-layer`,"aria-hidden":`true`,inert:``},null,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-f9925891`]]),B=12,V=3;function H(){let e=new Set;function t(){for(let t of e)t()}function r(t,r){let i=t.ownerDocument,a=i.defaultView;if(!a||!t.isConnected)return;let o=a.matchMedia?.(`(prefers-reduced-motion: reduce)`);if(o?.matches)return;let s=t.getBoundingClientRect();if(!s.width||!s.height)return;let c=a.getComputedStyle(t),l=c.getPropertyValue(`--bing-click-particle-color`).trim(),u=!l||l.toLowerCase()===`currentcolor`?c.color:l,d=r,f=Number.isFinite(d.clientX)&&(d.detail>0||!!d.pointerType),p=f?Math.max(s.left,Math.min(s.right,d.clientX)):s.left+s.width/2,m=f?Math.max(s.top,Math.min(s.bottom,d.clientY)):s.top+s.height/2;e.size>=V&&e.values().next().value?.();let h=i.createElement(`span`);h.className=`bing-click-particles`,h.setAttribute(`aria-hidden`,`true`),h.inert=!0,h.style.color=u;let g=Array.from({length:B},(e,t)=>{let n=i.createElement(`span`);return n.className=`bing-click-particles__shard`,n.style.left=`${p}px`,n.style.top=`${m}px`,n.style.width=`${3+t%3}px`,n.style.height=`${t%3==0?6:3}px`,h.append(n),n});i.body.append(h);let _,v=()=>{_?.kill(),h.remove(),e.delete(v),i.removeEventListener(`scroll`,v,!0),a.removeEventListener(`resize`,v),a.removeEventListener(`pagehide`,v),i.removeEventListener(`visibilitychange`,v),o?.removeEventListener(`change`,v)};e.add(v),i.addEventListener(`scroll`,v,{capture:!0,passive:!0}),a.addEventListener(`resize`,v,{passive:!0}),a.addEventListener(`pagehide`,v),i.addEventListener(`visibilitychange`,v),o?.addEventListener(`change`,v);let y=g.map((e,t)=>{let n=(t+(Math.random()-.5)*.45)/B*Math.PI*2,r=28+Math.random()*30;return{x:Math.cos(n)*r,y:Math.sin(n)*r,rotation:(Math.random()-.5)*240}});n.gsap.set(g,{xPercent:-50,yPercent:-50,rotation:e=>e*37,autoAlpha:.95}),_=n.gsap.timeline({defaults:{ease:`power3.out`},onComplete:v}).to(g,{x:e=>y[e].x,y:e=>y[e].y,rotation:e=>y[e].rotation,duration:.54},0).to(g,{autoAlpha:0,scale:.35,duration:.3,ease:`power2.in`},.2)}return{play:r,clear:t}}var U=new WeakMap,W=new WeakSet;function G(){let e=(0,t.getCurrentInstance)().appContext.app,n=U.get(e);if(!n){n=new Map,U.set(e,n);let t=n;e.onUnmount(()=>{for(let e of t.values())e.clear();t.clear(),U.delete(e)})}function r(e,t=e.currentTarget){if(!t?.isConnected||W.has(e)||t.matches(`:disabled, [aria-disabled="true"]`)||t.closest(`[inert]`)||e.target instanceof Element&&e.target.closest(`.bing-checkbox:not(.is-decorative), .bing-radio`)&&!t.matches(`.bing-checkbox__control, .bing-radio__control`))return;W.add(e);let r=t.ownerDocument,i=n.get(r);i||(i=H(),n.set(r,i)),i.play(t,e)}let i=new WeakMap;return{playClickFeedback:r,vClickFeedback:{mounted(e,t){let n={enabled:t.value!==!1,click(t){n.enabled&&!t.defaultPrevented&&t.button===0&&r(t,e)}};i.set(e,n),e.addEventListener(`click`,n.click)},updated(e,t){let n=i.get(e);n&&(n.enabled=t.value!==!1)},beforeUnmount(e){let t=i.get(e);t&&e.removeEventListener(`click`,t.click),i.delete(e)}}}}var K=Symbol(`BingFormContext`),ee=Symbol(`BingFormItemContext`);function te(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,[...t]]))}function ne(e,n={}){let r=(0,t.inject)(ee,null),i=(0,t.inject)(K,null),a=`bing-control-${(0,t.useId)()}`,o=n.register===!1?void 0:r?.nextControlId?.(a)??r?.controlId.value,s=(0,t.computed)(()=>e.id??o??a),c=(0,t.computed)(()=>e.size??r?.size.value??i?.size.value??`md`),l=(0,t.computed)(()=>e.disabled??r?.disabled.value??i?.disabled.value??!1),u=(0,t.computed)(()=>e.status??r?.status.value??`default`),d=(0,t.computed)(()=>[...new Set([e.ariaDescribedby,r?.ariaDescribedby.value].filter(Boolean))].join(` `)||void 0),f=(0,t.computed)(()=>n.group?r?.labelId?.value:void 0);return n.register!==!1&&r?.registerControl&&(0,t.onBeforeUnmount)(r.registerControl({id:s,group:n.group??!1})),{formItem:r,resolvedId:s,resolvedSize:c,resolvedDisabled:l,resolvedStatus:u,resolvedAriaDescribedby:d,resolvedAriaLabelledby:f}}function re(){(0,t.provide)(ee,null),(0,t.provide)(K,null)}var q=`transform,opacity,visibility,willChange`;function ie(e){return n.gsap.killTweensOf(e),e.style.willChange=`transform, opacity`,n.gsap.fromTo(e,{autoAlpha:0,scale:.08},{autoAlpha:1,scale:1,duration:.38,ease:`expo.out`,overwrite:!0})}function ae(e){return n.gsap.to(e,{autoAlpha:0,scale:1.04,duration:.2,ease:`power2.out`,overwrite:!0,clearProps:q})}function oe(e){n.gsap.killTweensOf(e),n.gsap.set(e,{clearProps:q})}function se(e,t,n){let r=e.getBoundingClientRect();if(!r.width||!r.height)return;let i=Math.max(0,Math.min(e.clientWidth,(n.clientX-r.left)*e.offsetWidth/r.width-e.clientLeft)),a=Math.max(0,Math.min(e.clientHeight,(n.clientY-r.top)*e.offsetHeight/r.height-e.clientTop));t.style.setProperty(`--bing-liquid-x`,`${i}px`),t.style.setProperty(`--bing-liquid-y`,`${a}px`),t.style.transformOrigin=`${i}px ${a}px`}var ce=[`type`,`disabled`,`aria-busy`,`aria-label`],le={class:`bing-button__content`},ue={key:0,class:`bing-button__loading-indicator`,"aria-hidden":`true`},J={class:`bing-button__resting-content`},de={key:0,class:`bing-button__icon bing-button__icon--prefix`},fe={key:1,class:`bing-button__label`},pe={key:2,class:`bing-button__icon bing-button__icon--suffix`},Y=R((0,t.defineComponent)({__name:`BingButton`,props:{variant:{default:`primary`},size:{default:void 0},rounded:{default:`md`},htmlType:{default:`button`},disabled:{type:Boolean,default:void 0},loading:{type:Boolean,default:!1},block:{type:Boolean,default:!1},throttle:{type:Boolean,default:!1},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,{resolvedSize:a,resolvedDisabled:o}=ne(r,{register:!1}),s=(0,t.useSlots)(),c=(0,t.ref)(0),l=(0,t.ref)(null),u=!1,{playClickFeedback:d}=G(),f=(0,t.computed)(()=>o.value||r.loading),p=(0,t.computed)(()=>Math.max(0,r.throttleDelay)),m=(0,t.computed)(()=>!!s.default),h=(0,t.computed)(()=>!!s.prefix),g=(0,t.computed)(()=>!!s.suffix),_=(0,t.computed)(()=>r.textShine??(r.variant===`primary`?`always`:`none`)),v=(0,t.computed)(()=>r.loading&&m.value?`jump`:r.textEffect?r.textEffect:_.value===`none`?`none`:`shine`),y=(0,t.computed)(()=>r.loading&&m.value?`always`:r.textEffectTrigger?r.textEffectTrigger:v.value===`jump`||_.value===`hover`?`hover`:`always`),b=(0,t.computed)(()=>v.value===`shine`),x=(0,t.computed)(()=>v.value!==`none`),S=(0,t.computed)(()=>[`bing-button`,`bing-button--${r.variant}`,`bing-button--${a.value}`,`bing-button--rounded-${r.rounded}`,{"is-block":r.block,"is-disabled":o.value,"is-loading":r.loading,"is-icon-only":!m.value&&(h.value||g.value),[`bing-button--text-${v.value}`]:x.value,[`bing-button--text-trigger-${y.value}`]:x.value,[`bing-button--shine-${y.value}`]:b.value,[`bing-button--shine-direction-${r.shineDirection}`]:b.value}]),C=(0,t.computed)(()=>{let e={};return b.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 w(e){if(e.defaultPrevented)return;if(f.value){e.preventDefault();return}let t=Date.now(),n=p.value,a=t-c.value;if(r.throttle&&n>0&&c.value>0&&a<n){e.preventDefault(),i(`throttled`,{event:e,remaining:n-a});return}c.value=t,d(e),i(`click`,e)}function T(e){i(`focus`,e)}function E(e){i(`blur`,e)}function D(){u=!1,l.value&&oe(l.value)}function O(){return window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches??!1}function k(e){let t=l.value;if(!t||f.value||e.pointerType===`touch`)return;if(O()){D();return}let n=e.currentTarget,r=n.getBoundingClientRect();if(!r.width||!r.height)return;let i=(e.clientX-r.left)*(n.offsetWidth/r.width)-n.clientLeft,a=(e.clientY-r.top)*(n.offsetHeight/r.height)-n.clientTop,o=Math.max(0,Math.min(n.clientWidth,i)),s=Math.max(0,Math.min(n.clientHeight,a));t.style.setProperty(`--button-liquid-x`,`${o}px`),t.style.setProperty(`--button-liquid-y`,`${s}px`),t.style.transformOrigin=`${o}px ${s}px`,u||(u=!0,ie(t))}function A(){!u||!l.value||(u=!1,O()?D():ae(l.value))}return(0,t.watch)([f,()=>r.variant],([e,t])=>{(e||t===`primary`)&&D()}),(0,t.onBeforeUnmount)(()=>{D()}),(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`button`,{type:e.htmlType,class:(0,t.normalizeClass)(S.value),style:(0,t.normalizeStyle)(C.value),disabled:f.value,"aria-busy":e.loading||void 0,"aria-label":e.ariaLabel,onClick:w,onFocus:T,onBlur:E,onPointerenter:k,onPointermove:k,onPointerleave:A,onPointercancel:D},[e.variant===`primary`?(0,t.createCommentVNode)(``,!0):((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,ref_key:`liquidRef`,ref:l,class:`bing-button__liquid`,"aria-hidden":`true`},null,512)),(0,t.createElementVNode)(`span`,le,[m.value?(0,t.createCommentVNode)(``,!0):((0,t.openBlock)(),(0,t.createElementBlock)(`span`,ue,[...r[0]||=[(0,t.createElementVNode)(`span`,{class:`bing-button__spinner`},null,-1)]])),(0,t.createElementVNode)(`span`,J,[h.value?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,de,[(0,t.renderSlot)(n.$slots,`prefix`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0),m.value?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,fe,[(0,t.createVNode)(z,{class:`bing-button__animated-text`,effect:v.value,trigger:y.value,disabled:(0,t.unref)(o),"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),g.value?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,pe,[(0,t.renderSlot)(n.$slots,`suffix`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0)])])],46,ce))}}),[[`__scopeId`,`data-v-845f9077`]]),me=new Set([`role`,`readonly`,`required`,`form`,`maxlength`,`minlength`,`pattern`,`inputmode`,`autofocus`,`enterkeyhint`,`tabindex`,`list`,`autocapitalize`,`autocorrect`,`dirname`,`wrap`,`cols`,`onChange`,`onBeforeinput`,`onCompositionstart`,`onCompositionupdate`,`onCompositionend`,`onSelect`,`onInvalid`]);function he(){let e=(0,t.useAttrs)(),n=e=>me.has(e)||e.startsWith(`aria-`);return{rootAttrs:()=>Object.fromEntries(Object.entries(e).filter(([e])=>!n(e))),controlAttrs:()=>Object.fromEntries(Object.entries(e).filter(([e])=>n(e)))}}var ge=`(prefers-reduced-motion: reduce), (forced-colors: active), (pointer: coarse)`,_e=new Set([`text`,`search`,`tel`,`url`]),ve=/[\u0590-\u08ff\u200e\u200f\u202a-\u202e\u2066-\u2069\ufb1d-\ufdff\ufe70-\ufeff]/u,ye=[`fontFamily`,`fontSize`,`fontWeight`,`fontStyle`,`fontStretch`,`fontVariant`,`fontKerning`,`fontFeatureSettings`,`fontVariationSettings`,`letterSpacing`,`wordSpacing`,`textTransform`];function be(e,r,i,a){let o=()=>{},s=()=>{};(0,t.onUpdated)(()=>o()),(0,t.onBeforeUnmount)(()=>s()),(0,t.onMounted)(()=>{let t=e.value,c=r.value,l=i.value;if(!t||!c||!l)return;let u=t.ownerDocument,d=u.defaultView,f=d.matchMedia(ge),p=!1,m=!1,h=!1,g=!1,_=!1,v=!1,y=0,b=!1,x=!1,S,C,w,T=``,E=NaN,D=0,O=0,k,A,j=u.createRange();function M(){v&&(t.removeAttribute(`data-smooth-caret`),l.removeAttribute(`data-active`)),v=!1,l.classList.contains(`is-idle`)&&l.classList.remove(`is-idle`),clearTimeout(S),A?.tween.pause()}function N(){clearTimeout(S),l.classList.remove(`is-idle`),S=setTimeout(()=>{v&&!_&&l.classList.add(`is-idle`)},600)}function P(){y=0;let e=b,r=x;if(b=x=!1,_)return;let i=t.selectionStart;if(!p||!a()||t.disabled||t.readOnly||m||h||g||f.matches||u.hidden||!u.hasFocus()||u.activeElement!==t||!_e.has(t.type)||i===null||i!==t.selectionEnd||ve.test(t.value)){M(),w&&!_e.has(t.type)&&(w.data=``);return}let o=d.getComputedStyle(t);if(o.direction!==`ltr`||o.writingMode!==`horizontal-tb`||![`start`,`left`].includes(o.textAlign)||parseFloat(o.textIndent)!==0||!t.clientWidth){M();return}C||(C=u.createElement(`span`),C.setAttribute(`aria-hidden`,`true`),C.style.cssText=`position:absolute;left:0;top:0;visibility:hidden;white-space:pre;width:max-content;pointer-events:none;`,w=u.createTextNode(``),C.append(w),c.append(C));let s=ye.map(e=>o[e]).join(`|`);T!==s&&(ye.forEach(e=>{C.style[e]=o[e]}),T=s);let S=t.value||`​`;w.data!==S&&(w.data=S),j.setStart(w,i),j.collapse(!0);let P=j.getClientRects();if(!P.length){M();return}let F=C.getBoundingClientRect(),I=c.getBoundingClientRect().width/c.clientWidth||1,L=parseFloat(o.paddingLeft)||0,R=t.offsetLeft+L+(P[0].left-F.left)/I-t.scrollLeft;if(R<t.offsetLeft-1||R>t.offsetLeft+t.clientWidth+1){M();return}let z=Math.max(t.offsetLeft,Math.min(t.offsetLeft+t.clientWidth-2,R)),B=Math.min(t.clientHeight,parseFloat(o.fontSize)*1.2),V=t.offsetTop+(t.clientHeight-B)/2,H=!v||Math.abs(E-z)>.1,U=D!==t.scrollLeft||O!==t.clientWidth;A||(k=n.gsap.context(()=>{A=n.gsap.quickTo(l,`x`,{duration:.09,ease:`power2.out`})},c)),!v||e||U?(A(z,z),A.tween.progress(1).pause()):H&&A(z),l.style.height!==`${B}px`&&(l.style.height=`${B}px`),l.style.top!==`${V}px`&&(l.style.top=`${V}px`),l.style.color!==o.color&&(l.style.color=o.color),v||(l.setAttribute(`data-active`,``),t.setAttribute(`data-smooth-caret`,``)),v=!0,E=z,D=t.scrollLeft,O=t.clientWidth,(H||r)&&N()}function F(e=!1,t=!1){_||!p||(b||=e,x||=t,y||=d.requestAnimationFrame(P))}let I=()=>F(),L=()=>F(!0),R=()=>F(!1,!0),z=()=>M(),B=()=>u.hidden?M():F(!0),V=()=>{h=!1,F(!0,!0)},H=new ResizeObserver(L);function U(){p||(p=!0,u.addEventListener(`selectionchange`,I),u.addEventListener(`pointerup`,V),u.addEventListener(`pointercancel`,V),u.addEventListener(`visibilitychange`,B),d.addEventListener(`blur`,z),d.addEventListener(`focus`,L),d.addEventListener(`resize`,L),f.addEventListener(`change`,L),u.fonts?.addEventListener(`loadingdone`,L),H.observe(t),F(!0,!0))}function W(){p=m=h=g=!1,M(),d.cancelAnimationFrame(y),y=0,b=x=!1,u.removeEventListener(`selectionchange`,I),u.removeEventListener(`pointerup`,V),u.removeEventListener(`pointercancel`,V),u.removeEventListener(`visibilitychange`,B),d.removeEventListener(`blur`,z),d.removeEventListener(`focus`,L),d.removeEventListener(`resize`,L),f.removeEventListener(`change`,L),u.fonts?.removeEventListener(`loadingdone`,L),H.disconnect(),k?.revert(),k=A=void 0,C?.remove(),C=w=void 0,T=``}let G={focus:U,blur:W,input:R,keydown:R,keyup:I,select:I,scroll:L,pointerdown:e=>{h=!0,g||=e.pointerType===`touch`,M()},compositionstart:()=>{m=!0,M()},compositionend:()=>{m=!1,F(!0,!0)}};for(let[e,n]of Object.entries(G))t.addEventListener(e,n);o=()=>F(),s=()=>{_=!0,W();for(let[e,n]of Object.entries(G))t.removeEventListener(e,n);o=()=>{}},u.activeElement===t&&U()})}var X=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},xe=e=>e===``,Se=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Ce=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),we=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),Te=e=>{let t=we(e);return t.charAt(0).toUpperCase()+t.slice(1)},Ee={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`},De=({name:e,iconNode:n,absoluteStrokeWidth:r,"absolute-stroke-width":i,strokeWidth:a,"stroke-width":o,size:s=Ee.width,color:c=Ee.stroke,...l},{slots:u})=>(0,t.h)(`svg`,{...Ee,...l,width:s,height:s,stroke:c,"stroke-width":xe(r)||xe(i)||r===!0||i===!0?Number(a||o||Ee[`stroke-width`])*24/Number(s):a||o||Ee[`stroke-width`],class:Se(`lucide`,l.class,...e?[`lucide-${Ce(Te(e))}-icon`,`lucide-${Ce(e)}`]:[`lucide-icon`]),...!u.default&&!X(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)(De,{...a,...r,iconNode:n,name:e},i),Oe=Z(`arrow-down-left`,[[`path`,{d:`M17 7 7 17`,key:`15tmo1`}],[`path`,{d:`M17 17H7V7`,key:`1org7z`}]]),ke=Z(`arrow-down-right`,[[`path`,{d:`m7 7 10 10`,key:`1fmybs`}],[`path`,{d:`M17 7v10H7`,key:`6fjiku`}]]),Ae=Z(`arrow-down`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),je=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`}]]),Me=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`}]]),Ne=Z(`arrow-up-left`,[[`path`,{d:`M7 17V7h10`,key:`11bw93`}],[`path`,{d:`M17 17 7 7`,key:`2786uv`}]]),Pe=Z(`arrow-up-right`,[[`path`,{d:`M7 7h10v10`,key:`1tivn9`}],[`path`,{d:`M7 17 17 7`,key:`1vkiza`}]]),Fe=Z(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),Ie=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`}]]),Le=Z(`check-check`,[[`path`,{d:`M18 6 7 17l-5-5`,key:`116fxf`}],[`path`,{d:`m22 10-7.5 7.5L13 16`,key:`ke71qq`}]]),Re=Z(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),ze=Z(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),Be=Z(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),Ve=Z(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),He=Z(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),Ue=Z(`chevrons-left`,[[`path`,{d:`m11 17-5-5 5-5`,key:`13zhaf`}],[`path`,{d:`m18 17-5-5 5-5`,key:`h8a8et`}]]),We=Z(`chevrons-right`,[[`path`,{d:`m6 17 5-5-5-5`,key:`xnjwq`}],[`path`,{d:`m13 17 5-5-5-5`,key:`17xmmf`}]]),Ge=Z(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),Ke=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`}]]),qe=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`}]]),Je=Z(`clock-3`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6h4`,key:`135r8i`}]]),Ye=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`}]]),Xe=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`}]]),Ze=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`}]]),Qe=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`}]]),$e=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`}]]),et=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`}]]),tt=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`}]]),nt=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`}]]),rt=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`}]]),it=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`}]]),at=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`}]]),ot=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`}]]),st=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`}]]),ct=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`}]]),lt=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`}]]),ut=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`}]]),dt=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`}]]),pt=Z(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),mt=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`}]]),ht=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`}]]),gt=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`}]]),_t=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`}]]),yt=Z(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),bt=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`}]]),xt=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`}]]),St=Z(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),Ct=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`}]]),wt=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:1.75},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-43788c95`]]),Tt={key:0,class:`bing-input__icon`},Et={class:`bing-input__content`},Dt=[`id`,`value`,`type`,`min`,`max`,`step`,`placeholder`,`disabled`,`readonly`,`name`,`autocomplete`,`spellcheck`,`aria-label`,`aria-describedby`,`aria-invalid`],Ot={key:1,class:`bing-input__actions`},kt={key:0,class:`bing-input__stepper`},At=[`disabled`],jt=[`disabled`],Mt=R((0,t.defineComponent)({inheritAttrs:!1,__name:`BingInput`,props:{id:{default:void 0},modelValue:{default:``},type:{default:`text`},min:{},max:{},step:{},placeholder:{default:void 0},disabled:{type:Boolean,default:void 0},readonly:{type:Boolean,default:!1},clearable:{type:Boolean,default:void 0},smoothCaret:{type:Boolean,default:!0},icon:{default:void 0},iconLabel:{default:void 0},size:{default:void 0},block:{type:Boolean,default:!1},debounceDelay:{default:180},clearAriaLabel:{default:`清空输入`},ariaLabel:{default:void 0},ariaDescribedby:{default:void 0},status:{default:void 0},name:{default:void 0},autocomplete:{default:`off`},spellcheck:{type:[Boolean,String],default:void 0}},emits:[`update:modelValue`,`input`,`debounced-input`,`clear`,`focus`,`blur`,`keydown`],setup(e,{expose:n,emit:r}){let i=e,a=r,{playClickFeedback:o}=G(),{rootAttrs:s,controlAttrs:c}=he(),{formItem:l,resolvedId:u,resolvedSize:d,resolvedDisabled:f,resolvedStatus:p,resolvedAriaDescribedby:m}=ne(i),h=(0,t.useSlots)(),g=(0,t.ref)(null),_=(0,t.ref)(null),v=(0,t.ref)(null),y=(0,t.ref)(null);be(_,v,y,()=>i.smoothCaret);let b=0,x,S,C,w=(0,t.computed)(()=>Math.max(0,Math.floor(i.debounceDelay))),T=(0,t.computed)(()=>!!(i.icon||h.icon)),E=(0,t.computed)(()=>i.modelValue!==null&&String(i.modelValue).length>0),D=(0,t.computed)(()=>(i.clearable??i.type===`search`)&&!i.readonly&&!f.value&&E.value),O=(0,t.computed)(()=>i.type===`number`),k=(0,t.computed)(()=>[`bing-input`,`bing-input--${d.value}`,`bing-input--status-${p.value}`,{"is-block":i.block,"is-disabled":f.value,"is-invalid":p.value===`error`,"has-icon":T.value,"has-value":E.value,"can-clear":D.value,"has-actions":D.value||O.value}]);function A(){x!==void 0&&(clearTimeout(x),x=void 0)}function j(e){if(A(),w.value===0){a(`debounced-input`,e);return}x=setTimeout(()=>{x=void 0,a(`debounced-input`,e)},w.value)}function M(e,t){let n=e===``?NaN:Number(e);a(`update:modelValue`,i.type===`number`&&Number.isFinite(n)?n:e),a(`input`,e,t),j(e),l?.handleControlChange()}function N(e){let t=e.target.value;M(t,e)}function P(e){a(`keydown`,e)}function F(e){let t=_.value;if(!t||!O.value||i.readonly||f.value)return!1;let n=t.value;if(t.step.toLowerCase()===`any`){let n=t.valueAsNumber,r=t.min.trim()===``||!Number.isFinite(Number(t.min))?-1/0:Number(t.min),i=t.max.trim()===``||!Number.isFinite(Number(t.max))?1/0:Number(t.max),a=Math.min(i,Math.max(r,(Number.isFinite(n)?n:0)+e));r<=i&&Number.isFinite(a)&&(!Number.isFinite(n)||(a-n)*e>0)&&(t.valueAsNumber=a)}else t.stepUp(e);return t.value===n?!1:(t.dispatchEvent(new Event(`input`,{bubbles:!0})),t.dispatchEvent(new Event(`change`,{bubbles:!0})),!0)}function I(){clearTimeout(S),clearInterval(C),S=void 0,C=void 0,typeof window<`u`&&(window.removeEventListener(`pointerup`,I),window.removeEventListener(`pointercancel`,I),window.removeEventListener(`blur`,I))}function L(e,t){t.button!==0||i.readonly||f.value||(t.preventDefault(),I(),_.value?.focus(),F(e)&&(o(t),window.addEventListener(`pointerup`,I),window.addEventListener(`pointercancel`,I),window.addEventListener(`blur`,I),S=setTimeout(()=>{C=setInterval(()=>{F(e)||I()},80)},400)))}function R(e,t){t.detail===0&&!t.pointerType&&(_.value?.focus(),F(e)&&o(t))}function z(){D.value&&(A(),a(`update:modelValue`,``),a(`clear`),a(`debounced-input`,``),l?.handleControlChange(),_.value?.focus())}function B(e){a(`focus`,e)}function V(e){a(`blur`,e)}function H(){b+=1}async function U(e){let n=g.value;if(!n||e.relatedTarget instanceof Node&&n.contains(e.relatedTarget))return;let r=++b;await(0,t.nextTick)(),!(r!==b||g.value!==n||n.contains(n.ownerDocument.activeElement))&&l?.handleControlBlur()}function W(){_.value?.focus()}function K(){_.value?.blur()}function ee(){_.value?.select()}return(0,t.onBeforeUnmount)(()=>{b+=1,A(),I()}),(0,t.watch)([f,()=>i.readonly,()=>i.type],I),n({get input(){return _.value},focus:W,blur:K,select:ee}),(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,(0,t.mergeProps)((0,t.unref)(s)(),{ref_key:`rootRef`,ref:g,class:k.value,onClick:W,onFocusin:H,onFocusout:U}),[T.value?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,Tt,[(0,t.renderSlot)(e.$slots,`icon`,{},()=>[i.icon?((0,t.openBlock)(),(0,t.createBlock)(Q,{key:0,icon:i.icon,size:`sm`,"stroke-width":1.75,decorative:!i.iconLabel,label:i.iconLabel},null,8,[`icon`,`decorative`,`label`])):(0,t.createCommentVNode)(``,!0)],!0)])):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`span`,Et,[(0,t.createElementVNode)(`input`,(0,t.mergeProps)((0,t.unref)(c)(),{ref_key:`inputRef`,ref:_,class:`bing-input__field`,id:(0,t.unref)(u),value:i.modelValue,type:i.type,min:i.min,max:i.max,step:i.step,placeholder:i.placeholder,disabled:(0,t.unref)(f),readonly:i.readonly,name:i.name,autocomplete:i.autocomplete,spellcheck:i.spellcheck,"aria-label":i.ariaLabel||void 0,"aria-describedby":(0,t.unref)(m),"aria-invalid":(0,t.unref)(p)===`error`||void 0,onInput:N,onFocus:B,onBlur:V,onKeydown:P}),null,16,Dt),(0,t.createElementVNode)(`span`,{ref_key:`caretLayerRef`,ref:v,class:`bing-input__caret-layer`,"aria-hidden":`true`},[(0,t.createElementVNode)(`span`,{ref_key:`caretRef`,ref:y,class:`bing-input__caret`},null,512)],512)]),D.value||O.value?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,Ot,[O.value?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,kt,[(0,t.createElementVNode)(`button`,{type:`button`,class:`bing-input__step`,tabindex:`-1`,"aria-label":`增加数值`,disabled:(0,t.unref)(f)||i.readonly,onPointerdown:n[0]||=e=>L(1,e),onPointerleave:I,onClick:n[1]||=(0,t.withModifiers)(e=>R(1,e),[`stop`])},[(0,t.createVNode)(Q,{icon:(0,t.unref)(He),size:`xs`,"stroke-width":1.75},null,8,[`icon`])],40,At),(0,t.createElementVNode)(`button`,{type:`button`,class:`bing-input__step`,tabindex:`-1`,"aria-label":`减少数值`,disabled:(0,t.unref)(f)||i.readonly,onPointerdown:n[2]||=e=>L(-1,e),onPointerleave:I,onClick:n[3]||=(0,t.withModifiers)(e=>R(-1,e),[`stop`])},[(0,t.createVNode)(Q,{icon:(0,t.unref)(ze),size:`xs`,"stroke-width":1.75},null,8,[`icon`])],40,jt)])):(0,t.createCommentVNode)(``,!0),D.value?((0,t.openBlock)(),(0,t.createBlock)(Y,{key:1,variant:`ghost`,size:`xs`,rounded:`sm`,throttle:!1,class:`bing-input__clear`,"aria-label":i.clearAriaLabel,onMousedown:n[4]||=(0,t.withModifiers)(()=>{},[`prevent`]),onClick:(0,t.withModifiers)(z,[`stop`])},{prefix:(0,t.withCtx)(()=>[(0,t.createVNode)(Q,{icon:(0,t.unref)(St),size:`xs`,"stroke-width":1.75},null,8,[`icon`])]),_:1},8,[`aria-label`])):(0,t.createCommentVNode)(``,!0)])):(0,t.createCommentVNode)(``,!0)],16))}}),[[`__scopeId`,`data-v-43ce9e6c`]]),Nt=/^(auto|scroll|overlay)$/,Pt=[`button`,`input`,`select`,`textarea`,`video`,`audio`,`[contenteditable="true"]`,`[role="textbox"]`].join(`,`),Ft=Object.freeze({duration:400,stepSize:100,pulseScale:4,accelerationDelta:50,accelerationMax:3,keyboardStep:50,keyboard:!0,smoothTouchpad:!1,respectReducedMotion:!0}),It=Object.freeze({duration:280,stepSize:72,pulseScale:4,accelerationDelta:50,accelerationMax:2,keyboard:!1,smoothTouchpad:!1,respectReducedMotion:!0});function Lt(e,t={},n={}){return e===!1?!1:{...t,...typeof e==`object`?e:{},...n}}function Rt(e,t,n){return Number.isFinite(e)?Math.max(n,e):t}function zt(e){return{duration:Rt(e?.duration,Ft.duration,0),stepSize:Rt(e?.stepSize,Ft.stepSize,0),pulseScale:Rt(e?.pulseScale,Ft.pulseScale,.1),accelerationDelta:Rt(e?.accelerationDelta,Ft.accelerationDelta,0),accelerationMax:Rt(e?.accelerationMax,Ft.accelerationMax,1),keyboardStep:Rt(e?.keyboardStep,Ft.keyboardStep,0),keyboard:e?.keyboard??Ft.keyboard,smoothTouchpad:e?.smoothTouchpad??Ft.smoothTouchpad,respectReducedMotion:e?.respectReducedMotion??Ft.respectReducedMotion}}function Bt(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 Vt(e,t=Ft.pulseScale){if(e<=0)return 0;if(e>=1)return 1;let n=Math.max(.1,t);return Bt(e,n)/Bt(1,n)}function Ht(){return typeof window<`u`&&typeof document<`u`}function Ut(){return typeof performance<`u`&&typeof performance.now==`function`?performance.now():Date.now()}function Wt(e,t,n){return Math.min(n,Math.max(t,e))}function Gt(e){return e===0?0:e>0?1:-1}function Kt(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 qt(e){let t=e.composedPath?.()[0]??e.target;return t instanceof Element?t:null}function Jt(e){if(e.parentElement)return e.parentElement;let t=e.getRootNode?.();return t&&`host`in t&&t.host instanceof Element?t.host:null}function Yt(e,t,n,r){let i=qt(e);for(;i&&i!==t;){if(i instanceof HTMLElement){let e=n!==0&&Kt(i,`x`,n),t=r!==0&&Kt(i,`y`,r);if(!e&&!t){i=Jt(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&&Nt.test(o),l=t&&Nt.test(s);if(c||l)return!0}i=Jt(i)}return!1}function Xt(){return!!window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches}function Zt(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 Qt(e,t){return Math.abs(e)>1.2?t/120*e:e}function $t(e){let t=qt(e);return t instanceof HTMLElement&&!!t.closest(Pt)}function en(e){let t=[],n,r=0,i=0,a=0,o=[],s=0,c=0;function l(){return zt(e.getOptions?.())}function u(){return e.getAxes?.()??{horizontal:!0,vertical:!0}}function d(){return e.isEnabled?.()??!0}function f(){!Ht()||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=Wt(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=Wt(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=Ut(),l=0,u=0;if(t.forEach(e=>{let t=o-e.start,n=e.duration===0||t>=e.duration?1:Vt(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(!(!Ht()||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=Gt(n),d=Gt(o);(u!==0&&i!==0&&u!==i||d!==0&&a!==0&&d!==a)&&p();let f=Ut(),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=Gt(v)||i,a=Gt(y)||a,r=f,c.duration===0||!Ht()||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,t){if(e.deltaMode!==WheelEvent.DOM_DELTA_PIXEL)return!1;let n=e,r=n.wheelDeltaX||0,i=n.wheelDeltaY||0,a=Math.abs((Math.abs(i)>=Math.abs(r)?i:r)||n.wheelDelta||t);if(!a)return!1;o.length===0&&(o=[a,a,a]),o.push(a),o.shift();let s=a>120&&v(a);return!v(120)&&!v(100)&&!s}function b(t){let n=e.getElement();if(!n)return null;let r=l(),i=Zt(t,n,u()),a=Math.abs(i.y)>=Math.abs(i.x)?i.y:i.x;if(!r.smoothTouchpad&&y(t,a))return null;let o=Qt(i.x,r.stepSize),s=Qt(i.y,r.stepSize);return o&&!Kt(n,`x`,o)&&(o=0),s&&!Kt(n,`y`,s)&&(s=0),!o&&!s||Yt(t,n,o,s)?null:{x:o,y:s}}function x(e){if(!Ht()||!d()||e.defaultPrevented||e.ctrlKey||l().respectReducedMotion&&Xt())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(!Ht()||!n||!d()||!r.keyboard||t.defaultPrevented||t.ctrlKey||t.altKey||t.metaKey||t.shiftKey&&t.key!==` `||$t(t)||r.respectReducedMotion&&Xt())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&&!Kt(n,`x`,a)&&(a=0),o&&!Kt(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 tn=[`tabindex`,`role`,`aria-label`],nn=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.useSlots)(),s=(0,t.ref)(null),c=(0,t.ref)(null),l=(0,t.ref)(null),u=(0,t.ref)(null),d=(0,t.ref)(null),f=(0,t.ref)(null),p=(0,t.ref)(!1),m=(0,t.ref)(!1),h=(0,t.ref)(0),g=(0,t.ref)(0),_=(0,t.ref)(!1),v=(0,t.ref)(null),y=(0,t.ref)(!1),b,x,S,C,w,T,E,D=0,O=0,k=0,A=0,j=0,M=0,N=0,P=0,F=0,I=(0,t.computed)(()=>[`bing-scrollbar`,{"has-overflow":p.value||m.value,"has-vertical-overflow":p.value,"has-horizontal-overflow":m.value,"is-vertical":i.vertical,"is-horizontal":i.horizontal,"is-always-visible":i.always,"is-disabled":i.disabled,"is-dragging":!!v.value,"is-dragging-vertical":v.value===`vertical`,"is-dragging-horizontal":v.value===`horizontal`,"is-hovering":_.value,"is-scrolling":y.value,"is-smooth":!!i.smooth}]),L=(0,t.computed)(()=>({height:K(i.height),maxHeight:K(i.maxHeight)}));function R(){return{height:`${h.value}px`,transform:`translate(-50%, ${P}px)`}}function z(){return{width:`${g.value}px`,transform:`translate(${F}px, -50%)`}}let B=(0,t.computed)(()=>Math.max(1,i.overflowTolerance)),V=(0,t.computed)(()=>(p.value||m.value)&&i.focusable&&!i.disabled),H=(0,t.computed)(()=>i.ariaLabel??(V.value?`可滚动内容`:void 0));function U(e){s.value=e instanceof HTMLElement?e:null}let W={class:`bing-scrollbar__custom-viewport`,onScroll:Y,onWheel:me,onKeydown:he,onInput:J};function G(){return typeof window<`u`&&typeof document<`u`}function K(e){return typeof e==`number`?`${e}px`:e}function ee(){!G()||S===void 0||(window.clearTimeout(S),S=void 0)}function te(){!G()||C===void 0||(window.cancelAnimationFrame(C),C=void 0)}function ne(){!G()||w===void 0||(window.cancelAnimationFrame(w),w=void 0)}function re(){ne(),T=void 0}function q(){re(),E?.cancel()}function ie(){return typeof i.smooth==`object`?i.smooth:void 0}function ae(){return!!i.smooth&&!i.disabled}function oe(){let e=s.value;if(!e)return;let t=e.clientHeight,n=e.scrollHeight,r=e.clientWidth,a=e.scrollWidth,o=Math.max(0,n-t),c=Math.max(0,a-r),d=i.vertical&&!i.disabled&&o>B.value,f=i.horizontal&&!i.disabled&&c>B.value;if(p.value=d,m.value=f,A=d?o:0,j=f?c:0,!d||!l.value)h.value=0,se(0),M=0;else{let r=l.value.clientHeight,a=n>0?t/n*r:r,s=Math.min(r,Math.max(Math.max(12,i.minThumbSize),a));M=Math.max(0,r-s);let c=o>0?e.scrollTop/o:0;h.value=s,se(M*c)}if(!f||!u.value)g.value=0,ce(0),N=0;else{let t=u.value.clientWidth,n=a>0?r/a*t:t,o=Math.min(t,Math.max(Math.max(12,i.minThumbSize),n));N=Math.max(0,t-o);let s=c>0?e.scrollLeft/c:0;g.value=o,ce(N*s)}}function se(e){P=e,d.value&&(d.value.style.transform=`translate(-50%, ${e}px)`)}function ce(e){F=e,f.value&&(f.value.style.transform=`translate(${e}px, -50%)`)}function le(){let e=s.value;if(e){if(p.value){let t=A>0?e.scrollTop/A:0;se(M*t)}if(m.value){let t=j>0?e.scrollLeft/j:0;ce(N*t)}}}function ue(){if(!G()||typeof window.requestAnimationFrame!=`function`){oe();return}C===void 0&&(C=window.requestAnimationFrame(()=>{C=void 0,oe()}))}function J(){(0,t.nextTick)(ue)}function de(){G()&&(ee(),y.value=!0,S=window.setTimeout(()=>{S=void 0,y.value=!1},720))}function fe(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*(s.value?.clientWidth??1):t}function pe(){return G()&&window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches}function Y(e){le(),de(),a(`scroll`,e)}function me(e){if(e.defaultPrevented)return!1;if(ae())return re(),E?.handleWheel(e)??!1;if(i.disabled||!i.horizontal)return!1;if(!e.shiftKey)return re(),!1;let t=s.value;if(!t)return!1;let n=j||Math.max(0,t.scrollWidth-t.clientWidth),r=T??t.scrollLeft,a=ve(r+fe(e),0,n);return a===r&&a===t.scrollLeft?!1:(e.preventDefault(),T=a,xe(),!0)}function he(e){ae()&&E?.handleKeydown(e)}function ge(e){let t=s.value,n=e===`vertical`?l.value:u.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-h.value):Math.max(0,n.clientWidth-g.value)}}function _e(e){let t=s.value;if(!t)return;let n=A||Math.max(0,t.scrollHeight-t.clientHeight);t.scrollTop=Math.min(n,Math.max(0,e)),le(),de()}function ve(e,t,n){return Math.min(n,Math.max(t,e))}function ye(e){let t=s.value;if(!t)return;let n=j||Math.max(0,t.scrollWidth-t.clientWidth);t.scrollLeft=Math.min(n,Math.max(0,e)),le(),de()}function be(){w=void 0;let e=s.value;if(!e||T===void 0){T=void 0;return}let t=T-e.scrollLeft;if(Math.abs(t)<.5){ye(T),T=void 0;return}ye(e.scrollLeft+t*.42),X()}function X(){!G()||w!==void 0||typeof window.requestAnimationFrame!=`function`||(w=window.requestAnimationFrame(be))}function xe(){if(T!==void 0){if(!G()||typeof window.requestAnimationFrame!=`function`||pe()){ye(T),T=void 0;return}w===void 0&&be()}}function Se(e,t){if(i.disabled||(e===`vertical`?!p.value:!m.value)||t.button!==0||t.target!==t.currentTarget)return;let n=e===`vertical`?l.value:u.value,r=ge(e);if(!n||!r||r.thumbTravel<=0)return;t.preventDefault(),q();let a=n.getBoundingClientRect(),o=e===`vertical`?t.clientY-a.top-h.value/2:t.clientX-a.left-g.value/2,s=Math.min(1,Math.max(0,o/r.thumbTravel));if(e===`vertical`){_e(s*r.maxScroll);return}ye(s*r.maxScroll)}function Ce(){G()&&(window.addEventListener(`pointermove`,Ee),window.addEventListener(`pointerup`,De),window.addEventListener(`pointercancel`,De))}function we(){G()&&(window.removeEventListener(`pointermove`,Ee),window.removeEventListener(`pointerup`,De),window.removeEventListener(`pointercancel`,De))}function Te(e,t){if(!(i.disabled||(e===`vertical`?!p.value:!m.value)||t.button!==0)){t.preventDefault(),t.stopPropagation(),q(),D=e===`vertical`?t.clientY:t.clientX,O=s.value?.scrollTop??0,k=s.value?.scrollLeft??0,v.value=e,Ce();try{t.currentTarget?.setPointerCapture?.(t.pointerId)}catch{}}}function Ee(e){let t=v.value;if(!t)return;let n=ge(t);if(!n||n.thumbTravel<=0)return;e.preventDefault();let r=((t===`vertical`?e.clientY:e.clientX)-D)*(n.maxScroll/n.thumbTravel);if(t===`vertical`){_e(O+r);return}ye(k+r)}function De(){v.value&&(v.value=null,we())}function Z(e){let t=s.value;if(t){if(typeof e==`number`){q(),_e(e);return}q(),t.scrollTo(e),ue()}}function Oe(e){let t=s.value;if(t){if(typeof e==`number`){q(),_e(t.scrollTop+e);return}q(),t.scrollBy(e),ue()}}function ke(){if(b?.disconnect(),b=void 0,x?.disconnect(),x=void 0,G()){if(o.viewport&&s.value&&typeof MutationObserver<`u`&&(x=new MutationObserver(J),x.observe(s.value,{childList:!0,subtree:!0,characterData:!0})),typeof ResizeObserver>`u`){window.addEventListener(`resize`,J),J();return}b=new ResizeObserver(J),s.value&&b.observe(s.value),c.value&&b.observe(c.value),l.value&&b.observe(l.value),u.value&&b.observe(u.value),J()}}return(0,t.watch)(s,()=>{q(),we(),ke()},{flush:`post`}),(0,t.watch)(()=>[i.height,i.maxHeight,i.minThumbSize,i.overflowTolerance,i.disabled,i.vertical,i.horizontal],J),(0,t.watch)(()=>[i.disabled,i.smooth],()=>{ae()||E?.cancel()},{deep:!0}),(0,t.onMounted)(()=>{E=en({getElement:()=>s.value,getOptions:ie,getAxes:()=>({horizontal:i.horizontal,vertical:i.vertical}),isEnabled:ae}),ke()}),(0,t.onBeforeUnmount)(()=>{ee(),te(),q(),E=void 0,we(),b?.disconnect(),b=void 0,x?.disconnect(),x=void 0,G()&&window.removeEventListener(`resize`,J)}),n({handleWheel:me,scrollBy:Oe,scrollTo:Z,stop:q,update:oe,get viewport(){return s.value}}),(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)(I.value),style:(0,t.normalizeStyle)(L.value),onMouseenter:n[4]||=e=>_.value=!0,onMouseleave:n[5]||=e=>_.value=!1},[(0,t.renderSlot)(e.$slots,`viewport`,{viewportRef:U,viewportAttrs:W},()=>[(0,t.createElementVNode)(`div`,{ref_key:`viewportRef`,ref:s,class:`bing-scrollbar__viewport`,tabindex:V.value?0:void 0,role:H.value?`region`:void 0,"aria-label":H.value,onScroll:Y,onWheel:me,onKeydown:he},[(0,t.createElementVNode)(`div`,{ref_key:`contentRef`,ref:c,class:`bing-scrollbar__content`},[(0,t.renderSlot)(e.$slots,`default`,{},void 0,!0)],512)],40,tn)],!0),(0,t.withDirectives)((0,t.createElementVNode)(`div`,{ref_key:`verticalRailRef`,ref:l,class:`bing-scrollbar__rail bing-scrollbar__rail--vertical`,"aria-hidden":`true`,onPointerdown:n[1]||=e=>Se(`vertical`,e)},[(0,t.createElementVNode)(`div`,{ref_key:`verticalThumbRef`,ref:d,class:`bing-scrollbar__thumb bing-scrollbar__thumb--vertical`,style:(0,t.normalizeStyle)(R()),onPointerdown:n[0]||=e=>Te(`vertical`,e)},null,36)],544),[[t.vShow,p.value]]),(0,t.withDirectives)((0,t.createElementVNode)(`div`,{ref_key:`horizontalRailRef`,ref:u,class:`bing-scrollbar__rail bing-scrollbar__rail--horizontal`,"aria-hidden":`true`,onPointerdown:n[3]||=e=>Se(`horizontal`,e)},[(0,t.createElementVNode)(`div`,{ref_key:`horizontalThumbRef`,ref:f,class:`bing-scrollbar__thumb bing-scrollbar__thumb--horizontal`,style:(0,t.normalizeStyle)(z()),onPointerdown:n[2]||=e=>Te(`horizontal`,e)},null,36)],544),[[t.vShow,m.value]])],38))}}),[[`__scopeId`,`data-v-7a3e643e`]]),rn=Symbol(`BingOverlay`),an=new WeakMap,on=new WeakMap;function sn(e,t){let n=on.get(e);return n||(n=new Set,on.set(e,n)),n.add(t),()=>{n.delete(t),n.size||on.delete(e)}}var cn=`a[href],button,input,select,textarea,[tabindex],[contenteditable="true"]`;function ln(e,t){return e===t||!!(e.parent&&ln(e.parent,t))}function un(e){let n=[],r=new WeakMap,i=()=>n.at(-1),a=()=>[...n].reverse().find(e=>e.modal),o=(e,t)=>!!t&&n.some(n=>ln(n,e)&&n.elements().some(e=>e?.contains(t)));function s(){let e=0;for(let t of n)t.zIndex.value=Math.max(t.minimumZIndex(),e+2),e=t.zIndex.value}function c(t){let r=n.filter(e=>ln(e,t)).flatMap(e=>e.elements());return[...new Set(r.flatMap(e=>e?[e,...e.querySelectorAll(cn)]:[]))].filter(t=>t.matches(cn)&&t.tabIndex>=0&&!t.matches(`:disabled`)&&!t.closest(`[inert]`)&&t.getClientRects().length>0&&e.defaultView?.getComputedStyle(t).visibility!==`hidden`)}function l(e){(c(e)[0]??e.elements().find(Boolean))?.focus({preventScroll:!0})}function u(t){r.set(t,i());let n=a();if(t.key!==`Tab`||!n)return;let o=c(n),s=o.indexOf(e.activeElement);(!o.length||s<0||(t.shiftKey?s===0:s===o.length-1))&&(t.preventDefault(),o.length?o[t.shiftKey?o.length-1:0]?.focus():l(n))}function d(e){let t=r.get(e);e.key===`Escape`&&!e.defaultPrevented&&t?.closeOnEscape()&&(e.preventDefault(),r.set(e,void 0),t.onEscape?.(e))}function f(e){let t=a();t&&!o(t,e.target)&&l(t)}return{contains:o,allowsFocus:e=>!i()||o(i(),e),isTop:(e,t)=>(t&&r.has(t)?r.get(t):i())===e,add(r){if(n.includes(r)){s();return}r.previousFocus=e.activeElement,n.push(r),s(),on.get(e)?.forEach(e=>e()),n.length===1&&(e.defaultView?.addEventListener(`keydown`,u,!0),e.defaultView?.addEventListener(`keydown`,d),e.addEventListener(`focusin`,f)),r.modal&&(0,t.nextTick)(()=>{a()===r&&!o(r,e.activeElement)&&l(r)})},remove(r){let i=n.indexOf(r);if(i<0)return;let s=a()===r;n.splice(i,1),s&&(0,t.nextTick)(()=>{let e=a(),t=r.previousFocus;t?.isConnected&&(!e||o(e,t))?t.focus({preventScroll:!0}):e&&l(e)}),n.length||(e.defaultView?.removeEventListener(`keydown`,u,!0),e.defaultView?.removeEventListener(`keydown`,d),e.removeEventListener(`focusin`,f),an.delete(e)),on.get(e)?.forEach(e=>e())}}}function dn(e){return an.get(e.ownerDocument)?.allowsFocus(e)??!0}function fn(e){let n={parent:(0,t.inject)(rn,null),elements:e.elements,modal:e.modal??!1,minimumZIndex:e.zIndex,zIndex:(0,t.ref)(e.zIndex()),closeOnEscape:e.closeOnEscape??(()=>!0),onEscape:e.onEscape,previousFocus:null};(0,t.provide)(rn,n);let r;return(0,t.watch)([e.open,e.zIndex],([e])=>{typeof document>`u`||(e?(r=an.get(document),r||(r=un(document),an.set(document,r)),r.add(n)):r?.remove(n))},{immediate:!0,flush:`post`}),(0,t.onBeforeUnmount)(()=>r?.remove(n)),{zIndex:(0,t.computed)(()=>Math.max(e.zIndex(),n.zIndex.value)),isTop:e=>r?.isTop(n,e)??!1,contains:e=>r?.contains(n,e)??!1}}function pn(){let e=(0,t.ref)(!1);return(0,t.onMounted)(()=>{e.value=!0}),e}var mn={key:0,class:`bing-autocomplete__header`},hn=[`aria-label`,`aria-busy`],gn=[`id`,`aria-selected`,`aria-disabled`,`aria-label`,`onPointermove`,`onClick`],_n={key:1,class:`bing-autocomplete__state`,role:`status`},vn={key:2,class:`bing-autocomplete__state`,role:`alert`},yn={key:3,class:`bing-autocomplete__state`,role:`status`},bn={key:4,class:`bing-autocomplete__detail is-inline`},xn={key:0},Sn={key:1},Cn={key:5,class:`bing-autocomplete__footer`},wn={key:0},Tn={key:1},En=R((0,t.defineComponent)({inheritAttrs:!1,__name:`BingAutocomplete`,props:{id:{},modelValue:{default:``},options:{default:()=>[]},filter:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},error:{default:``},disabled:{type:Boolean,default:void 0},clearable:{type:Boolean,default:!0},placeholder:{},emptyText:{default:`没有匹配的候选`},ariaLabel:{},ariaDescribedby:{},size:{},status:{},icon:{},block:{type:Boolean,default:!1},panelWidth:{},panelMaxHeight:{default:360},completeOnSelect:{type:Boolean,default:!0},closeOnSelect:{type:Boolean,default:!0}},emits:[`update:modelValue`,`select`,`open`,`close`,`clear`],setup(e,{expose:n,emit:r}){let i=e,a=r,o=(0,t.useSlots)(),{rootAttrs:s,controlAttrs:c}=he(),{formItem:l,resolvedId:u,resolvedSize:d,resolvedDisabled:f,resolvedStatus:p,resolvedAriaDescribedby:m}=ne(i);re();let h=pn(),g=`bing-autocomplete-${(0,t.useId)()}`,_=(0,t.ref)(null),v=(0,t.ref)(null),y=(0,t.ref)(null),b=(0,t.ref)(null),x=(0,t.ref)(null),S=(0,t.ref)(!1),C=(0,t.ref)(!1),w=(0,t.ref)(-1),T=(0,t.ref)({left:0,top:0,width:320,height:360,detailLeft:0,inline:!0}),E=0,D=0,O,k=!1,A=(0,t.computed)(()=>{if(!i.filter)return i.options;let e=i.modelValue.trim().toLocaleLowerCase();return i.options.filter(t=>t.label.toLocaleLowerCase().includes(e))}),j=(0,t.computed)(()=>!i.loading&&!i.error),M=(0,t.computed)(()=>j.value?A.value[w.value]:void 0),N=(0,t.computed)(()=>!!(M.value&&(o[`option-detail`]||M.value.detail||M.value.description||M.value.meta))),P=fn({open:()=>S.value,elements:()=>[_.value,v.value,y.value],zIndex:()=>3e3,closeOnEscape:()=>!C.value,onEscape:()=>{B(),k=!0,b.value?.input?.focus({preventScroll:!0}),k=!1}}),F=(0,t.computed)(()=>({position:`fixed`,left:`${T.value.left}px`,top:`${T.value.top}px`,width:`${T.value.width}px`,zIndex:P.zIndex.value})),I=(0,t.computed)(()=>T.value.inline?{}:{position:`fixed`,left:`${T.value.detailLeft}px`,top:`${T.value.top}px`,width:`248px`,zIndex:P.zIndex.value+1});function L(){if(E=0,!S.value||!_.value)return;let e=_.value.getBoundingClientRect(),t=window.visualViewport,n=(t?.offsetLeft??0)+8,r=(t?.offsetTop??0)+8,a=n+(t?.width??window.innerWidth)-16,o=r+(t?.height??window.innerHeight)-16,s=Math.min(Math.max(e.width,i.panelWidth??320),a-n),c=Math.max(n,Math.min(e.left,a-s)),l=o-e.bottom-6,u=e.top-r-6,d=l>=Math.min(i.panelMaxHeight,200)||l>=u,f=Math.max(0,Math.min(i.panelMaxHeight,(d?l:u)-10)),p=Math.min(v.value?.offsetHeight??f+10,f+10),m=d?Math.min(o,e.bottom+6):Math.max(r,e.top-6-p),h=c+s+8+248<=a?c+s+8:c-256;T.value={left:c,top:m,width:s,height:f,detailLeft:h,inline:h<n}}function R(){S.value&&!E&&(E=requestAnimationFrame(L))}function z(){f.value||S.value||k||(S.value=!0,w.value=A.value.findIndex(e=>!e.disabled),L(),a(`open`),(0,t.nextTick)(()=>{L(),v.value&&O?.observe(v.value)}))}function B(){S.value&&(S.value=!1,v.value&&O?.unobserve(v.value),a(`close`))}function V(){b.value?.focus(),z()}function H(e){a(`update:modelValue`,String(e)),l?.handleControlChange(),z()}function U(e){!j.value||e.disabled||f.value||C.value||(i.completeOnSelect&&H(e.label),a(`select`,e),i.closeOnSelect&&B())}function W(){(0,t.nextTick)(()=>{let e=x.value?.viewport,t=document.getElementById(`${g}-${w.value}`);if(!e||!t)return;let n=e.getBoundingClientRect(),r=t.getBoundingClientRect();r.top<n.top?e.scrollTop+=r.top-n.top:r.bottom>n.bottom&&(e.scrollTop+=r.bottom-n.bottom)})}function G(e){if(!(e.isComposing||C.value||e.keyCode===229||f.value))if(e.key===`Escape`&&S.value)e.preventDefault(),e.stopPropagation(),B();else if(e.key===`ArrowDown`||e.key===`ArrowUp`){if(e.preventDefault(),!S.value){z();return}if(!j.value)return;let t=e.key===`ArrowDown`?1:-1;for(let e=1;e<=A.value.length;e++){let n=(w.value+t*e+A.value.length)%A.value.length;if(!A.value[n]?.disabled){w.value=n,W();break}}}else e.key===`Enter`&&S.value&&M.value&&(e.preventDefault(),U(M.value))}function K(e){return!!(e&&([_.value,v.value,y.value].some(t=>t?.contains(e))||P.contains(e)))}function ee(e){S.value&&e.target instanceof Node&&!K(e.target)&&B()}function te(e){let t=e.relatedTarget instanceof Node&&K(e.relatedTarget);cancelAnimationFrame(D),D=requestAnimationFrame(()=>{D=0;let n=!e.relatedTarget&&e.target instanceof Node&&!e.target.isConnected||t&&e.relatedTarget instanceof Node&&!e.relatedTarget.isConnected;if(S.value&&n&&document.activeElement===document.body){b.value?.input?.focus({preventScroll:!0});return}K(document.activeElement)||(B(),l?.handleControlBlur())})}return(0,t.watch)([A,j],()=>{let e=typeof document>`u`?null:document.activeElement,n=K(e);w.value=A.value.findIndex(e=>!e.disabled),S.value&&(R(),W()),(0,t.nextTick)(()=>{S.value&&n&&e&&!e.isConnected&&document.activeElement===document.body&&b.value?.input?.focus({preventScroll:!0})})}),(0,t.watch)(f,e=>{e&&B()}),(0,t.watch)([()=>i.panelWidth,()=>i.panelMaxHeight,N],R),(0,t.onMounted)(()=>{O=new ResizeObserver(R),_.value&&O.observe(_.value),window.addEventListener(`resize`,R),window.addEventListener(`scroll`,R,!0),window.visualViewport?.addEventListener(`resize`,R),window.visualViewport?.addEventListener(`scroll`,R),document.addEventListener(`pointerdown`,ee,!0),document.addEventListener(`focusin`,ee)}),(0,t.onBeforeUnmount)(()=>{cancelAnimationFrame(E),cancelAnimationFrame(D),O?.disconnect(),window.removeEventListener(`resize`,R),window.removeEventListener(`scroll`,R,!0),window.visualViewport?.removeEventListener(`resize`,R),window.visualViewport?.removeEventListener(`scroll`,R),document.removeEventListener(`pointerdown`,ee,!0),document.removeEventListener(`focusin`,ee)}),n({focus:V,close:B,get input(){return b.value?.input??null}}),(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,(0,t.mergeProps)((0,t.unref)(s)(),{ref_key:`root`,ref:_,class:[`bing-autocomplete`,{"is-block":e.block}],onFocusout:te}),[(0,t.createVNode)(Mt,(0,t.mergeProps)((0,t.unref)(c)(),{id:(0,t.unref)(u),ref_key:`input`,ref:b,"model-value":e.modelValue,disabled:(0,t.unref)(f),size:(0,t.unref)(d),status:(0,t.unref)(p),placeholder:e.placeholder,clearable:e.clearable,icon:e.icon,block:``,"aria-label":e.ariaLabel,"aria-describedby":(0,t.unref)(m),role:`combobox`,"aria-autocomplete":`list`,"aria-expanded":S.value,"aria-controls":S.value?g:void 0,"aria-activedescendant":S.value&&M.value?`${g}-${w.value}`:void 0,spellcheck:!1,"onUpdate:modelValue":H,onFocus:z,onClick:z,onKeydown:G,onCompositionstart:r[0]||=e=>C.value=!0,onCompositionend:r[1]||=e=>C.value=!1,onClear:r[2]||=e=>a(`clear`)}),(0,t.createSlots)({_:2},[o.icon?{name:`icon`,fn:(0,t.withCtx)(()=>[(0,t.renderSlot)(n.$slots,`icon`,{},void 0,!0)]),key:`0`}:void 0]),1040,[`id`,`model-value`,`disabled`,`size`,`status`,`placeholder`,`clearable`,`icon`,`aria-label`,`aria-describedby`,`aria-expanded`,`aria-controls`,`aria-activedescendant`]),(0,t.unref)(h)?((0,t.openBlock)(),(0,t.createBlock)(t.Teleport,{key:0,to:`body`},[S.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,ref_key:`panel`,ref:v,class:`bing-autocomplete__panel`,style:(0,t.normalizeStyle)(F.value),onFocusout:te},[(0,t.createVNode)(nn,{ref_key:`scrollbar`,ref:x,"max-height":T.value.height,focusable:!1},{default:(0,t.withCtx)(()=>[o.header?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,mn,[(0,t.renderSlot)(n.$slots,`header`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`div`,{id:g,role:`listbox`,"aria-label":e.ariaLabel||`搜索候选`,"aria-busy":e.loading},[j.value?((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,{key:0},(0,t.renderList)(A.value,(e,i)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{id:`${g}-${i}`,key:e.value,role:`option`,class:(0,t.normalizeClass)([`bing-autocomplete__option`,{"is-active":w.value===i,"is-disabled":e.disabled}]),"aria-selected":w.value===i,"aria-disabled":e.disabled||void 0,"aria-label":e.label,onMousedown:r[3]||=(0,t.withModifiers)(()=>{},[`prevent`]),onPointermove:t=>!e.disabled&&(w.value=i),onClick:t=>U(e)},[(0,t.renderSlot)(n.$slots,`option`,{option:e,active:w.value===i},()=>[(0,t.createElementVNode)(`span`,null,(0,t.toDisplayString)(e.label),1)],!0)],42,gn))),128)):(0,t.createCommentVNode)(``,!0)],8,hn),e.loading?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,_n,[(0,t.renderSlot)(n.$slots,`loading`,{},()=>[r[4]||=(0,t.createTextVNode)(`正在加载…`,-1)],!0)])):e.error?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,vn,[(0,t.renderSlot)(n.$slots,`error`,{error:e.error},()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.error),1)],!0)])):A.value.length?(0,t.createCommentVNode)(``,!0):((0,t.openBlock)(),(0,t.createElementBlock)(`div`,yn,[(0,t.renderSlot)(n.$slots,`empty`,{},()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.emptyText),1)],!0)])),T.value.inline&&N.value&&M.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,bn,[(0,t.renderSlot)(n.$slots,`option-detail`,{option:M.value},()=>[(0,t.createElementVNode)(`strong`,null,(0,t.toDisplayString)(M.value.label),1),M.value.detail||M.value.description?((0,t.openBlock)(),(0,t.createElementBlock)(`p`,xn,(0,t.toDisplayString)(M.value.detail||M.value.description),1)):(0,t.createCommentVNode)(``,!0),M.value.meta?((0,t.openBlock)(),(0,t.createElementBlock)(`dl`,Sn,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(M.value.meta,(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:n},[(0,t.createElementVNode)(`dt`,null,(0,t.toDisplayString)(n),1),(0,t.createElementVNode)(`dd`,null,(0,t.toDisplayString)(e),1)]))),128))])):(0,t.createCommentVNode)(``,!0)],!0)])):(0,t.createCommentVNode)(``,!0),o.footer?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,Cn,[(0,t.renderSlot)(n.$slots,`footer`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0)]),_:3},8,[`max-height`])],36)):(0,t.createCommentVNode)(``,!0),S.value&&!T.value.inline&&N.value&&M.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:1,ref_key:`detail`,ref:y,class:`bing-autocomplete__detail`,style:(0,t.normalizeStyle)(I.value)},[(0,t.createVNode)(nn,{"max-height":Math.max(0,T.value.height-16),focusable:!1},{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(n.$slots,`option-detail`,{option:M.value},()=>[(0,t.createElementVNode)(`strong`,null,(0,t.toDisplayString)(M.value.label),1),M.value.detail||M.value.description?((0,t.openBlock)(),(0,t.createElementBlock)(`p`,wn,(0,t.toDisplayString)(M.value.detail||M.value.description),1)):(0,t.createCommentVNode)(``,!0),M.value.meta?((0,t.openBlock)(),(0,t.createElementBlock)(`dl`,Tn,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(M.value.meta,(e,n)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:n},[(0,t.createElementVNode)(`dt`,null,(0,t.toDisplayString)(n),1),(0,t.createElementVNode)(`dd`,null,(0,t.toDisplayString)(e),1)]))),128))])):(0,t.createCommentVNode)(``,!0)],!0)]),_:3},8,[`max-height`])],4)):(0,t.createCommentVNode)(``,!0)])):(0,t.createCommentVNode)(``,!0)],16))}}),[[`__scopeId`,`data-v-ade73e77`]]),Dn={duration:{fast:.18,normal:.32,slow:.62},ease:{smooth:`power3.out`,press:`back.out(2.2)`,glide:`expo.out`}};function On(){return typeof window<`u`}function kn(){return On()&&typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}var An=[`aria-label`],jn=[`aria-selected`,`aria-disabled`,`aria-label`,`disabled`,`tabindex`,`onClick`,`onKeydown`,`onFocus`,`onBlur`],Mn={class:`bing-tabs__tab-surface`},Nn={class:`bing-tabs__tab-content`},Pn=R((0,t.defineComponent)({inheritAttrs:!1,__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:`标签页`}},emits:[`update:modelValue`,`change`,`focus`,`blur`],setup(e,{emit:r}){let{playClickFeedback:i}=G(),a=e,o=r,s=(0,t.ref)(null),c=(0,t.ref)(null),l=(0,t.ref)(null),u=(0,t.ref)([]),d=(0,t.ref)(void 0),f=(0,t.ref)(-1),p=(0,t.ref)(!1),m,h,g=0,_=(0,t.computed)(()=>a.modelValue!==void 0),v=(0,t.computed)(()=>a.items.filter(e=>!e.disabled)),y=(0,t.computed)(()=>v.value[0]),b=(0,t.computed)(()=>_.value?a.modelValue:d.value??y.value?.value),x=(0,t.computed)(()=>a.items.findIndex(e=>Object.is(e.value,b.value))),S=(0,t.computed)(()=>[`bing-tabs`,`bing-tabs--${a.variant}`,`bing-tabs--${a.size}`,{"is-block":a.block,"is-disabled":a.disabled,"is-indicator-ready":p.value}]),C=(0,t.computed)(()=>Lt(a.smoothScroll,It,{keyboard:!1,smoothTouchpad:!1,respectReducedMotion:!0}));function w(){return typeof window<`u`}function T(){return!a.animated||a.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 a.disabled||!!e.disabled}function O(e,t){e instanceof HTMLButtonElement&&(u.value[t]=e)}function k(e){return e.querySelector(`.bing-tabs__tab-surface`)??e}function A(e){return D(a.items[e])?-1:f.value>=0?f.value===e?0:-1:x.value===e?0:-1}function j(e,t){let n=a.items.length;if(n===0)return-1;let r=e;for(let e=0;e<n;e+=1){if(r+=t,a.loop)r=(r+n)%n;else if(r<0||r>=n)return-1;let e=a.items[r];if(e&&!D(e))return r}return-1}function M(e){let t=(e===`first`?a.items:[...a.items].reverse()).findIndex(e=>!D(e));return t<0?-1:e===`first`?t:a.items.length-1-t}function N(e){return a.items.find(t=>Object.is(t.value,e))}function P(){return w()&&!!s.value?.contains(document.activeElement)}function F(e=!1){if(a.activation!==`auto`||x.value<0)return;let t=a.items[x.value];!t||D(t)||(f.value=x.value,e&&P()&&R(x.value))}function I(e,t){if(D(e)){t.preventDefault();return}i(t,u.value[a.items.indexOf(e)]);let n=b.value;if(Object.is(n,e.value))return;_.value||(d.value=e.value);let r={value:e.value,previousValue:n,item:e,previousItem:N(n),event:t};o(`update:modelValue`,e.value),o(`change`,r)}function L(e,t,n){n.defaultPrevented||(f.value=t,I(e,n))}function R(e){let t=u.value[e];t&&(c.value?.stop(),f.value=e,t.focus())}function z(e,n){let r=a.items[e];!r||D(r)||(n.preventDefault(),R(e),a.activation===`auto`&&(I(r,n),(0,t.nextTick)().then(()=>{Object.is(b.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=a.items[e];if(!n)return;t.preventDefault(),I(n,t)}}function V(e,t,n){c.value?.stop(),f.value=t,o(`focus`,{value:e.value,item:e,event:n})}function H(e,t){s.value?.contains(t.relatedTarget)||(f.value=-1),o(`blur`,{value:e.value,item:e,event:t})}function U(e){if(C.value!==!1&&(c.value?.handleWheel(e)??!1)||e.defaultPrevented||!s.value)return;let t=e.deltaX||(e.shiftKey?e.deltaY:0),n=Math.max(0,s.value.scrollWidth-s.value.clientWidth);n>.5&&(t<0?s.value.scrollLeft>.5:t>0&&s.value.scrollLeft<n-.5)&&e.stopPropagation()}function W(e=!0){w()&&(g&&window.cancelAnimationFrame(g),g=window.requestAnimationFrame(()=>{g=0,K(e)}))}function K(e=!0){let t=s.value,r=l.value,i=u.value[x.value];if(!t||!r||!i||x.value<0){r&&n.gsap.set(r,{autoAlpha:0}),p.value=!1;return}let a=t.getBoundingClientRect(),o=k(i).getBoundingClientRect(),c=r.getBoundingClientRect(),d=E(t,`left`),f=E(t,`top`),h=Math.max(1,o.width),g=Math.max(1,o.height),_=o.left-a.left-d+t.scrollLeft,v=o.top-a.top-f,y=p.value&&c.width>0&&c.height>0,b=y?c.left-a.left-d+t.scrollLeft:_,S=y?c.top-a.top-f:v,C=y?c.width/h:1,w=y?c.height/g:1,D=e&&y&&!T();m?.kill(),n.gsap.set(r,{width:h,height:g,transformOrigin:`0 0`,willChange:`transform, opacity`}),D?m=n.gsap.fromTo(r,{x:b,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:()=>{m=void 0}}):n.gsap.set(r,{x:_,y:v,scaleX:1,scaleY:1,autoAlpha:1,force3D:!0}),p.value=!0}return(0,t.onBeforeUpdate)(()=>{u.value=[]}),(0,t.onMounted)(()=>{(0,t.nextTick)().then(()=>{K(!1)}),typeof ResizeObserver<`u`&&s.value&&(h=new ResizeObserver(()=>{W(!1)}),h.observe(s.value))}),(0,t.onBeforeUnmount)(()=>{m?.kill(),c.value?.stop(),g&&w()&&window.cancelAnimationFrame(g),h?.disconnect()}),(0,t.watch)(()=>a.smoothScroll,()=>c.value?.stop(),{deep:!0}),(0,t.watch)(()=>[b.value,a.items.length,a.size,a.variant,a.block],()=>{(0,t.nextTick)().then(()=>{K(!0)})}),(0,t.watch)(x,()=>{f.value<0||!P()||(0,t.nextTick)().then(()=>{F(!0)})}),(n,r)=>((0,t.openBlock)(),(0,t.createBlock)(nn,{ref_key:`scrollbarRef`,ref:c,class:(0,t.normalizeClass)([`bing-tabs__scroll`,{"is-block":e.block}]),vertical:!1,horizontal:``,focusable:!1,smooth:C.value},{viewport:(0,t.withCtx)(({viewportRef:r,viewportAttrs:i})=>[(0,t.createElementVNode)(`div`,(0,t.mergeProps)((0,t.mergeProps)(n.$attrs,{...i,onWheel:U}),{ref:e=>{s.value=e,r(e)},class:S.value,role:`tablist`,"aria-orientation":`horizontal`,"aria-label":e.ariaLabel}),[(0,t.createElementVNode)(`span`,{ref_key:`indicatorRef`,ref:l,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,b.value),"is-disabled":D(e)}]),type:`button`,role:`tab`,"aria-selected":Object.is(e.value,b.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`,Mn,[(0,t.createElementVNode)(`span`,Nn,[(0,t.renderSlot)(n.$slots,`item`,{item:e,active:Object.is(e.value,b.value),disabled:D(e)},()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.label),1)],!0)])])],42,jn))),128))],16,An)]),_:3},8,[`class`,`smooth`]))}}),[[`__scopeId`,`data-v-e740be89`]]),Fn=[`aria-hidden`],In=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:`应用切换面板`}},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&&kn()}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,Fn))),128))],512),e.showTabs?((0,t.openBlock)(),(0,t.createBlock)(Pn,{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-bacda41f`]]),Ln={glass:!0,glassBlur:16,glassOpacity:.85,glassSaturation:1.28};function Rn(e,t,n){return Math.min(n,Math.max(t,e))}function zn(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 Bn(e,t){let n=t.glass!==!1,r=n?t.glassBlur===void 0?`var(--bing-glass-blur, 16px)`:zn(t.glassBlur):`0px`,i=n?t.glassOpacity===void 0?`var(--bing-glass-opacity, 0.85)`:Rn(t.glassOpacity,0,1):1,a=n?t.glassSaturation===void 0?`var(--bing-glass-saturation, 1.05)`:Math.max(0,t.glassSaturation):1;return{[`--${e}-glass-blur`]:r,[`--${e}-glass-opacity`]:String(i),[`--${e}-glass-saturation`]:String(a)}}var Vn={class:`bing-card__face bing-card__front`},Hn={key:1,class:`bing-card__media`},Un={class:`bing-card__content`},Wn={key:0,class:`bing-card__header`},Gn={class:`bing-card__heading`},Kn={key:0,class:`bing-card__title`},qn={key:1,class:`bing-card__description`},Jn={key:1,class:`bing-card__body`},Yn={key:2,class:`bing-card__footer`},Xn={class:`bing-card__face bing-card__back`,"aria-hidden":`true`},Zn=10,Qn=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:void 0},glassOpacity:{default:void 0},glassSaturation:{default:void 0}},emits:[`enter`,`long-press`,`flip`],setup(e,{emit:r}){let{playClickFeedback:i}=G(),a=e,o=r,s=(0,t.ref)(null),c=(0,t.ref)(null),l=(0,t.ref)(null),u=(0,t.ref)(null),d=(0,t.ref)(null),f=(0,t.ref)(!1),p=(0,t.ref)(!1),m=(0,t.ref)(!1),h,g,_,v,y,b=!1,x=!1,S=0,C=0,w=!1,T=(0,t.computed)(()=>a.flipAxis===`z`?`y`:a.flipAxis),E=(0,t.computed)(()=>a.disabled?`none`:a.flipTrigger),D=(0,t.computed)(()=>[`bing-card`,`bing-card--${a.variant}`,`bing-card--padding-${a.padding}`,`bing-card--rounded-${a.rounded}`,`bing-card--back-axis-${T.value}`,{"is-glass":a.glass,"is-interactive":a.interactive,"is-tilt":a.tilt,"is-glare":a.glare,"is-flipped":p.value,"is-pressing":m.value,"is-long-press-enabled":E.value===`press`,"is-click-flip-enabled":E.value===`click`,"is-disabled":a.disabled,"has-entered":f.value}]),O=(0,t.computed)(()=>({...Bn(`bing-card`,{glass:a.glass,glassBlur:a.glassBlur,glassOpacity:a.glassOpacity,glassSaturation:a.glassSaturation}),"--bing-card-tilt-max":`${a.tiltMax}deg`})),k=(0,t.computed)(()=>!!(a.title||a.description));function A(){return typeof window<`u`&&typeof document<`u`}function j(){return A()&&typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function M(e,t,n){return Math.min(n,Math.max(t,e))}function N(e){return e===`x`?`rotationX`:e===`y`?`rotationY`:`rotation`}function P(){return{rotationX:0,rotationY:0,rotation:0,[N(T.value)]:p.value?180:0}}function F(e,t){return p.value?T.value===`x`?{rotationX:180+e,rotationY:t,rotation:0}:{rotationX:e,rotationY:180+t,rotation:0}:{rotationX:e,rotationY:t,rotation:0}}function I(){return a.interactive&&a.tilt&&!a.disabled&&!j()&&!x&&!b&&c.value}function L(e){if(ee(e),!I())return;let t=s.value,r=c.value;if(!t||!r)return;let i=t.getBoundingClientRect();if(i.width===0||i.height===0)return;let o=M((e.clientX-i.left)/i.width,0,1),u=M((e.clientY-i.top)/i.height,0,1),d=Math.max(0,a.tiltMax),f=(o-.5)*d*2,p=(.5-u)*d*2;n.gsap.to(r,{...F(p,f),scale:Math.max(1,a.tiltScale),transformPerspective:900,transformOrigin:`50% 50%`,duration:.34,ease:`power3.out`,overwrite:!0,force3D:!0}),a.glare&&l.value&&n.gsap.to(l.value,{"--bing-card-glare-x":`${o*100}%`,"--bing-card-glare-y":`${u*100}%`,opacity:1,duration:.24,ease:`power2.out`,overwrite:!0})}function R(){if(x)return;let e=c.value;e&&n.gsap.to(e,{...P(),scale:1,duration:.48,ease:`elastic.out(1, 0.72)`,overwrite:!0,force3D:!0}),l.value&&n.gsap.to(l.value,{opacity:0,duration:.26,ease:`power2.out`,overwrite:!0})}function z(){let e=N(a.flipAxis),t=-360*Math.max(1,a.flipTurns);return{from:{autoAlpha:0,y:34,z:a.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:a.flipEase}}}function B(){switch(a.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 z();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 V(){_?.kill(),_=void 0,m.value=!1,u.value&&(n.gsap.killTweensOf(u.value),n.gsap.set(u.value,{"--bing-card-press-progress":0,"--bing-card-press-ring-scale":.78,autoAlpha:0})),d.value&&(n.gsap.killTweensOf(d.value),n.gsap.set(d.value,{autoAlpha:0,scale:.98}))}function H(){m.value=!1,u.value&&(n.gsap.killTweensOf(u.value),n.gsap.timeline().to(u.value,{"--bing-card-press-ring-scale":.96,autoAlpha:.82,duration:.1,ease:`power2.out`}).to(u.value,{"--bing-card-press-ring-scale":1.08,autoAlpha:0,duration:.38,ease:`power3.out`},.06)),d.value&&(n.gsap.killTweensOf(d.value),n.gsap.timeline().to(d.value,{autoAlpha:.18,scale:1,duration:.1,ease:`power2.out`}).to(d.value,{autoAlpha:0,scale:1.015,duration:.38,ease:`power3.out`},.06))}function U(e=!p.value){let t=c.value;if(!t||a.disabled||x||p.value===e)return;p.value=e;let r=n.gsap.to(t,{...P(),scale:1,transformPerspective:900,transformOrigin:`50% 50%`,duration:.68,ease:`power3.inOut`,overwrite:!0,force3D:!0,onComplete:()=>{v===r&&(b=!1)},onInterrupt:()=>{v===r&&(b=!1)}});v=r,b=!0,o(`flip`,e?`back`:`front`)}function W(e){if(!A()||E.value!==`press`||x||e.button!==0)return;V(),w=!1,S=e.clientX,C=e.clientY,m.value=!0;let t=s.value?.getBoundingClientRect(),r=t&&t.width>0?`${M((e.clientX-t.left)/t.width*100,0,100)}%`:`50%`,i=t&&t.height>0?`${M((e.clientY-t.top)/t.height*100,0,100)}%`:`50%`;try{e.currentTarget?.setPointerCapture?.(e.pointerId)}catch{}u.value&&(n.gsap.set(u.value,{"--bing-card-press-progress":0,"--bing-card-press-x":r,"--bing-card-press-y":i,"--bing-card-press-ring-scale":.78,autoAlpha:1}),_=n.gsap.to(u.value,{"--bing-card-press-progress":1,"--bing-card-press-ring-scale":.98,duration:Math.max(120,a.longPressDelay)/1e3,ease:`none`,overwrite:!0,onComplete:()=>{if(_=void 0,w=!0,o(`long-press`),H(),a.longPressRelease===`restore`){U(!0);return}U()}})),d.value&&n.gsap.fromTo(d.value,{autoAlpha:0,scale:.98},{autoAlpha:1,scale:1,duration:Math.min(.24,Math.max(120,a.longPressDelay)/2e3),ease:`power2.out`,overwrite:!0})}function K(e){e.defaultPrevented||a.disabled||E.value!==`click`||x||e.target instanceof Element&&e.target.closest(`button,a[href],input,label,select,textarea,[role="button"],[role="tab"],[contenteditable]:not([contenteditable="false"])`)||(i(e),U())}function ee(e){if(!_)return;let t=e.clientX-S,n=e.clientY-C;Math.hypot(t,n)>Zn&&V()}function te(){V(),w&&a.longPressRelease===`restore`&&U(!1),w=!1}function ne(){w||V(),!b&&R()}function re(){let e=s.value,t=c.value;if(!e||!t||a.disabled||f.value&&a.entranceOnce)return;if(f.value=!0,e.classList.add(`has-entered`),o(`enter`),y?.kill(),y=void 0,x=!1,h?.revert(),h=void 0,a.entrance===`none`||j()){n.gsap.set(t,{autoAlpha:1,clearProps:`transform,filter`});return}let r=B();h=n.gsap.context(()=>{let e=n.gsap.fromTo(t,r.from,{...r.to,duration:Math.max(.1,a.entranceDuration),delay:Math.max(0,a.entranceDelay),clearProps:`filter`,onComplete:()=>{y===e&&(y=void 0,x=!1)},onInterrupt:()=>{y===e&&(y=void 0,x=!1)}});y=e,x=!0},e)}function q(){if(g?.disconnect(),g=void 0,!A()){re();return}if(a.entrance===`none`||j()){re();return}if(!(`IntersectionObserver`in window)){re();return}let e=s.value;e&&(g=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&(re(),a.entranceOnce&&(g?.disconnect(),g=void 0))},{threshold:.18,rootMargin:`0px 0px -8% 0px`}),g.observe(e))}return(0,t.watch)(()=>[a.entrance,a.entranceOnce,a.entranceDelay,a.entranceDuration,a.flipAxis,a.flipTurns,a.flipEase,a.flipTrigger,a.disabled],()=>{V(),f.value=!1,(0,t.nextTick)(q)},{flush:`post`}),(0,t.onMounted)(()=>{(0,t.nextTick)(q)}),(0,t.onBeforeUnmount)(()=>{V(),y?.kill(),y=void 0,x=!1,v?.kill(),v=void 0,b=!1,g?.disconnect(),g=void 0,h?.revert(),h=void 0,n.gsap.killTweensOf([c.value,l.value,u.value,d.value].filter(Boolean))}),(n,r)=>((0,t.openBlock)(),(0,t.createElementBlock)(`article`,{ref_key:`rootRef`,ref:s,class:(0,t.normalizeClass)(D.value),style:(0,t.normalizeStyle)(O.value),onPointerdown:W,onPointermove:L,onPointerup:te,onPointerleave:ne,onPointercancel:te,onLostpointercapture:te,onClick:K},[(0,t.createElementVNode)(`div`,{ref_key:`surfaceRef`,ref:c,class:`bing-card__surface`},[(0,t.createElementVNode)(`div`,Vn,[e.glare?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,ref_key:`glareRef`,ref:l,class:`bing-card__glare`,"aria-hidden":`true`},null,512)):(0,t.createCommentVNode)(``,!0),n.$slots.media?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,Hn,[(0,t.renderSlot)(n.$slots,`media`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`div`,Un,[n.$slots.header||k.value?((0,t.openBlock)(),(0,t.createElementBlock)(`header`,Wn,[(0,t.renderSlot)(n.$slots,`header`,{},()=>[(0,t.createElementVNode)(`div`,Gn,[e.title?((0,t.openBlock)(),(0,t.createElementBlock)(`h3`,Kn,(0,t.toDisplayString)(e.title),1)):(0,t.createCommentVNode)(``,!0),e.description?((0,t.openBlock)(),(0,t.createElementBlock)(`p`,qn,(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`,Jn,[(0,t.renderSlot)(n.$slots,`default`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0),n.$slots.footer?((0,t.openBlock)(),(0,t.createElementBlock)(`footer`,Yn,[(0,t.renderSlot)(n.$slots,`footer`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0)])]),(0,t.createElementVNode)(`div`,Xn,[(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`},`交互卡片`,-1)],!0)]),E.value===`press`?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:0,ref_key:`pressAmbienceRef`,ref:d,class:`bing-card__press-ambience`,"aria-hidden":`true`},null,512)):(0,t.createCommentVNode)(``,!0),E.value===`press`?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,{key:1,ref_key:`pressFeedbackRef`,ref:u,class:`bing-card__press-feedback`,"aria-hidden":`true`},null,512)):(0,t.createCommentVNode)(``,!0)],512)],38))}}),[[`__scopeId`,`data-v-42286b35`]]),$n=Symbol(`BingCheckboxGroupContext`),er=[`id`,`checked`,`indeterminate`,`disabled`,`name`,`value`,`aria-label`,`aria-describedby`,`aria-invalid`],tr={class:`bing-checkbox__control`,"aria-hidden":`true`},nr={key:1,class:`bing-checkbox__label`},rr=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:void 0},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,{playClickFeedback:o}=G(),s=(0,t.useSlots)(),c=(0,t.inject)($n,null),{formItem:l,resolvedSize:u,resolvedDisabled:d,resolvedStatus:f,resolvedId:p,resolvedAriaDescribedby:m}=ne({get id(){return i.id},get size(){return i.size??c?.size.value},get disabled(){return c?.disabled.value||i.disabled},get status(){return i.status??c?.status.value},get ariaDescribedby(){return i.ariaDescribedby}},{register:!c}),h=(0,t.ref)(null),g=(0,t.ref)(null),_=(0,t.ref)(!1),v=null,y=(0,t.computed)(()=>!!(i.label||s.default)),b=(0,t.computed)(()=>i.name??c?.name.value),x=(0,t.computed)(()=>c?c.modelValue.value.some(e=>e===i.value):i.modelValue),S=(0,t.computed)(()=>[`bing-checkbox`,typeof u.value==`string`?`bing-checkbox--${u.value}`:void 0,`bing-checkbox--${i.shape}`,`bing-checkbox--${i.tone}`,`bing-checkbox--status-${f.value}`,{"is-checked":x.value,"is-indeterminate":i.indeterminate,"is-disabled":d.value,"is-invalid":f.value===`error`,"is-decorative":i.decorative,"is-check-exiting":_.value,"has-label":y.value&&!i.decorative}]),C=(0,t.computed)(()=>{if(typeof u.value==`number`)return{"--bing-checkbox-size":`${u.value}px`,"--bing-checkbox-radius":i.shape===`circle`?`50%`:`${Math.max(2,Math.round(u.value*.22))}px`}});function w(){return typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function T(){n.gsap.killTweensOf([h.value,g.value].filter(e=>!!e))}function E(e,t,r,i){if(w()){_.value=!1;return}let a=h.value,o=g.value;if(!a||!o)return;let s=e&&!t,c=r&&!i;T(),_.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&&(_.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:()=>{_.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 D(e){if(e.defaultPrevented||d.value||i.decorative)return;let t=e.currentTarget.parentElement?.querySelector(`.bing-checkbox__control`);o(e,t)}function O(e){let t=e.target.checked;if(v={checked:t,indeterminate:i.indeterminate},E(t,i.indeterminate,x.value,i.indeterminate),c&&i.value!==void 0){c.updateValue(i.value,t,e);return}a(`update:modelValue`,t),a(`change`,t,e),l?.handleControlChange()}function k(e){a(`blur`,e),c?.handleCheckboxBlur(e),c||l?.handleControlBlur()}return(0,t.watch)(()=>[x.value,i.indeterminate],([e,t],[n,r])=>{if(v?.checked===e&&v.indeterminate===t){v=null;return}v=null,E(e,t,n,r)},{flush:`post`}),(0,t.onBeforeUnmount)(T),(n,r)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.decorative?`span`:`label`),{class:(0,t.normalizeClass)(S.value),style:(0,t.normalizeStyle)(C.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:(0,t.unref)(p),type:`checkbox`,checked:x.value,indeterminate:e.indeterminate,disabled:(0,t.unref)(d),name:b.value,value:e.value,"aria-label":e.ariaLabel||void 0,"aria-describedby":(0,t.unref)(m),"aria-invalid":(0,t.unref)(f)===`error`||void 0,onChange:O,onClick:D,onFocus:r[0]||=e=>a(`focus`,e),onBlur:k},null,40,er)),(0,t.createElementVNode)(`span`,tr,[(0,t.createElementVNode)(`span`,{ref_key:`checkRef`,ref:h,class:`bing-checkbox__check`},[(0,t.createVNode)(Q,{icon:(0,t.unref)(Re),size:`xs`,"stroke-width":2.25},null,8,[`icon`])],512),(0,t.createElementVNode)(`span`,{ref_key:`mixedRef`,ref:g,class:`bing-checkbox__mixed`},null,512)]),!e.decorative&&y.value?((0,t.openBlock)(),(0,t.createElementBlock)(`span`,nr,[(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-7d6ea319`]]),ir=[`aria-label`],ar={class:`bing-resizable__content`},or={key:0,class:`bing-resizable__size`,"aria-hidden":`true`},sr=[`aria-label`,`disabled`,`onPointerdown`,`onKeydown`],cr={class:`bing-resizable__handle-mark`,"aria-hidden":`true`},lr=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:Me,right:je,bottom:Me,left:je,"top-left":Ne,"top-right":Pe,"bottom-left":Oe,"bottom-right":ke},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)} × ${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 W(e,t){return Math.abs(e.x-t.x)<.001&&Math.abs(e.y-t.y)<.001}function G(){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 K(e){return{top:e.includes(`top`),right:e.includes(`right`),bottom:e.includes(`bottom`),left:e.includes(`left`)}}function ee(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 te(e){return[`ew-resize`,`ns-resize`,`nwse-resize`,`nesw-resize`].includes(e)}function ne(e){let t=K(e);return`${t.left?`100%`:t.right?`0%`:`50%`} ${t.top?`100%`:t.bottom?`0%`:`50%`}`}function re(e){return`调整${{top:`上边`,right:`右边`,bottom:`下边`,left:`左边`,"top-left":`左上角`,"top-right":`右上角`,"bottom-left":`左下角`,"bottom-right":`右下角`}[e]}尺寸`}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=K(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=K(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=G();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=K(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 J(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 de(e,t,n,r=e.snapMode===`live`){let i=K(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=J(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 fe(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 pe(e,t,n){return{direction:e,size:p.value,position:h.value,delta:t,event:n}}function Y(){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 me(e){if(!P()||E)return;let t=ee(e);S=te(document.documentElement.style.cursor)?``:document.documentElement.style.cursor,C=te(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 he(){!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 ge(){if(P()){window.addEventListener(`pointermove`,X),window.addEventListener(`pointerup`,Se),window.addEventListener(`pointercancel`,Se),window.addEventListener(`pointerout`,we),window.addEventListener(`blur`,Ce),window.addEventListener(`keydown`,Ee),document.addEventListener(`visibilitychange`,Te);try{window.parent&&window.parent!==window&&(window.parent.addEventListener(`pointerup`,Se),window.parent.addEventListener(`pointercancel`,Se),window.parent.addEventListener(`blur`,Ce))}catch{}}}function _e(){if(P()){window.removeEventListener(`pointermove`,X),window.removeEventListener(`pointerup`,Se),window.removeEventListener(`pointercancel`,Se),window.removeEventListener(`pointerout`,we),window.removeEventListener(`blur`,Ce),window.removeEventListener(`keydown`,Ee),document.removeEventListener(`visibilitychange`,Te);try{window.parent&&window.parent!==window&&(window.parent.removeEventListener(`pointerup`,Se),window.parent.removeEventListener(`pointercancel`,Se),window.parent.removeEventListener(`blur`,Ce))}catch{}}}function ve(e){F()||(u.value&&n.gsap.to(u.value,{scale:1.006,transformOrigin:ne(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:ne(e),duration:.18,ease:`power2.out`,overwrite:!0,force3D:!0}))}function ye(e){F()||(u.value&&n.gsap.to(u.value,{scale:1,transformOrigin:ne(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:ne(e),duration:.28,ease:`power3.out`,overwrite:!0,force3D:!0}))}function be(e,t){if(!(s.disabled||t.button!==0)){t.preventDefault(),b=fe(e,t.clientX,t.clientY),x={x:0,y:0},p.value=b.startSize,h.value=b.startPosition,y.value=e,v.value=!0,me(e),ge(),ve(e);try{t.currentTarget?.setPointerCapture?.(t.pointerId)}catch{}c(`resize-start`,pe(e,x,t))}}function X(e){if(!b)return;e.preventDefault(),x={x:e.clientX-b.startClientX,y:e.clientY-b.startClientY};let t=de(b,x.x,x.y);U(t.size,p.value)&&W(t.position,h.value)||(p.value=t.size,h.value=t.position,Y(),c(`resize`,pe(b.direction,x,e)))}function xe(e,t=!0){let n=b;if(_e(),he(),!n)return;let r=n.direction;if(n.snapMode===`end`){let e=de(n,x.x,x.y,!0);p.value=e.size,h.value=e.position}Y(),e&&t&&c(`resize-end`,pe(r,x,e)),ye(r),b=void 0,y.value=null,v.value=!1}function Se(e){xe(e)}function Ce(){xe(void 0,!1)}function we(e){e.relatedTarget||(e.clientX<=0||e.clientY<=0||e.clientX>=window.innerWidth||e.clientY>=window.innerHeight)&&Ce()}function Te(){document.visibilityState===`hidden`&&Ce()}function Ee(e){e.key===`Escape`&&xe(e)}function De(e,t){let n=K(e),r=G(),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 Z(e,t){if(s.disabled)return;let n=De(e,t);if(!n)return;t.preventDefault();let r=de(fe(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`,pe(e,{x:0,y:0},t)),Y(),c(`resize`,pe(e,n,t)),c(`resize-end`,pe(e,n,t)),ve(e),ye(e),y.value=null,v.value=!1}function Ae(){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 Fe(){return v.value?p.value:R(O.value)}function Ie(){return k.value}return(0,t.onBeforeUnmount)(()=>{_e(),he(),n.gsap.killTweensOf([u.value,d.value].filter(Boolean))}),r({reset:Ae,getSize:Fe,getPosition:Ie}),(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`,ar,[(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`,or,(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":re(i),disabled:e.disabled,onPointerdown:e=>be(i,e),onKeydown:e=>Z(i,e)},[(0,t.renderSlot)(n.$slots,`handle`,{direction:i,active:y.value===i},()=>[(0,t.createElementVNode)(`span`,cr,[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":1.75},null,8,[`icon`,`size`])])],!0)],42,sr))),128))],512)],14,ir))}}),[[`__scopeId`,`data-v-0cb888b5`]]),ur=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function dr(e){return fr(e)}function fr(e){return Array.isArray(e)?pr(e):e instanceof RegExp?e:typeof e==`object`?mr(e):e}function pr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=fr(e[n]);return t}function mr(e){let t={};for(let n in e)t[n]=fr(e[n]);return t}function hr(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function gr(e){let t=~e.lastIndexOf(`/`)||~e.lastIndexOf(`\\`);return t===0?e:~t===e.length-1?gr(e.substring(0,e.length-1)):e.substr(~t+1)}var _r=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,vr=class{static hasCaptures(e){return e===null?!1:(_r.lastIndex=0,_r.test(e))}static replaceCaptures(e,t,n){return e.replace(_r,(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 yr(e,t){return e<t?-1:+(e>t)}function br(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=yr(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function xr(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 Sr(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)}var Cr=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}},wr=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(kr(e),t)}static createFromParsedTheme(e,t){return Mr(e,t)}_cachedMatchRoot=new Cr(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=>Er(e.parent,t.parentScopes));return n?new Or(n.fontStyle,n.foreground,n.background):null}},Tr=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 Er(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&&!Dr(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function Dr(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}var Or=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function kr(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`&&xr(i.settings.foreground)&&(s=i.settings.foreground);let c=null;typeof i.settings.background==`string`&&xr(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 Ar(l,u,e,o,s,c)}}return n}var Ar=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}},jr=(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))(jr||{});function Mr(e,t){e.sort((e,t)=>{let n=yr(e.scope,t.scope);return n!==0||(n=br(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 Nr(t),o=new Or(n,a.getId(r),a.getId(i)),s=new Ir(new Fr(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 wr(a,o,s)}var Nr=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)}},Pr=Object.freeze([]),Fr=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||Pr,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)}},Ir=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(),Fr.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(br(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 Fr(e,t,n,r,i))}},Lr=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=zr(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 Rr(e){return e}function zr(e){return e}function Br(e,t){let n=[],r=Hr(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(Vr(i)){let e=[];do e.push(i),i=r.next();while(Vr(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 Vr(e){return!!e&&!!e.match(/[\w\.:]+/)}function Hr(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 Ur(e){typeof e.dispose==`function`&&e.dispose()}var Wr=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},Gr=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},Kr=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))}},qr=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Wr(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new Kr;for(let n of e)Jr(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof Wr){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 Jr(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 Wr?Xr({baseGrammar:a,selfGrammar:i},r):Yr(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 Wr(e))}function Yr(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];Zr([r],t,n)}}function Xr(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Zr(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Zr(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Zr(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?hr({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&Zr(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=ri(i);switch(a.kind){case 0:Xr({...t,selfGrammar:t.baseGrammar},n);break;case 1:Xr(t,n);break;case 2:Yr(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?Yr(a.ruleName,i,n):Xr(i,n)}else a.kind===4?n.add(new Gr(a.scopeName,a.ruleName)):n.add(new Wr(a.scopeName));break}}}var Qr=class{kind=0},$r=class{kind=1},ei=class{constructor(e){this.ruleName=e}kind=2},ti=class{constructor(e){this.scopeName=e}kind=3},ni=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function ri(e){if(e===`$base`)return new Qr;if(e===`$self`)return new $r;let t=e.indexOf(`#`);return t===-1?new ti(e):t===0?new ei(e.substring(1)):new ni(e.substring(0,t),e.substring(t+1))}var ii=/\\(\d+)/,ai=/\\(\d+)/g,oi=-1,si=-2;function ci(e){return e}function li(e){return e}var ui=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=vr.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=vr.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${gr(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:vr.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:vr.replaceCaptures(this._contentName,e,t)}},di=class extends ui{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!`)}},fi=class extends ui{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new _i(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 vi,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},pi=class extends ui{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 vi,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},mi=class extends ui{_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 _i(i,this.id),this.beginCaptures=a,this._end=new _i(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 vi;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}},hi=class extends ui{_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 _i(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new _i(o,si),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 vi;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 vi,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||`￿`),this._cachedCompiledWhilePatterns}},gi=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new di(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new fi(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(t.begin===void 0){t.repository&&(r=hr({},r,t.repository));let i=t.patterns;return i===void 0&&t.include&&(i=[{include:t.include}]),new pi(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new hi(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 mi(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=ri(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 pi||e instanceof mi||e instanceof hi)&&e.hasMissingPatterns&&e.patterns.length===0&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},_i=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=ii.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 ai.lastIndex=0,this.source.replace(ai,(e,t)=>Sr(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}},vi=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 yi(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 yi(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},yi=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}},bi=class{constructor(e,t){this.languageId=e,this.tokenType=t}},xi=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new bi(e,8),this._embeddedLanguagesMatcher=new Si(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 bi(0,0);_getBasicScopeAttributes=new Cr(e=>new bi(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/},Si=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])=>Sr(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 Ci=!1,wi=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function Ti(e,t,n,r,i,a,o,s){let c=t.content.length,l=!1,u=-1;if(o){let o=Ei(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 wi(i,!0);f()}return new wi(i,!1);function f(){let o=Di(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===oi){let o=i.getRule(e);a.produce(i,s[0].start),i=i.withContentNameScopesList(i.nameScopesList),Ni(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 mi){let r=o;Ni(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 hi){let r=o;Ni(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(Ni(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 Ei(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 hi&&s.push({rule:n,stack:t})}for(let c=s.pop();c;c=s.pop()){let{ruleScanner:s,findOptions:l}=ji(c.rule,e,c.stack.endRule,n,r===o),u=s.findNextMatchSync(t,r,l);if(u){if(u.ruleId!==si){i=c.stack.pop();break}u.captureIndices&&u.captureIndices.length&&(a.produce(c.stack,u.captureIndices[0].start),Ni(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 Di(e,t,n,r,i,a){let o=Oi(e,t,n,r,i,a),s=e.getInjections();if(s.length===0)return o;let c=ki(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 Oi(e,t,n,r,i,a){let{ruleScanner:o,findOptions:s}=Ai(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 ki(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}=Ai(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 Ai(e,t,n,r,i){return Ci?{ruleScanner:e.compile(t,n),findOptions:Mi(r,i)}:{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function ji(e,t,n,r,i){return Ci?{ruleScanner:e.compileWhile(t,n),findOptions:Mi(r,i)}:{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function Mi(e,t){let n=0;return e||(n|=1),t||(n|=4),n}function Ni(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));Ti(e,p,n&&d.start===0,d.start,f,i,!1,0),Ur(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 Pi(t,d.end))}}for(;l.length>0;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var Pi=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function Fi(e,t,n,r,i,a,o,s){return new zi(e,t,n,r,i,a,o,s)}function Ii(e,t,n,r,i){let a=Br(t,Li),o=gi.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 Li(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(Ri(t[r],e))return n=r+1,!0;return!1})}function Ri(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 zi=class{constructor(e,t,n,r,i,a,o,s){if(this._rootScopeName=e,this.balancedBracketSelectors=a,this._onigLib=s,this._basicScopeAttributesProvider=new xi(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=Bi(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(let e of Object.keys(i)){let t=Br(e,Li);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)Ii(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&&Ii(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(ci(t));return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[li(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]=Bi(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=gi.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===Hi.NULL){i=!0;let e=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),r=Lr.set(0,e.languageId,e.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),a=this.getRule(this._rootId).getName(null,null),o;o=a?Vi.createRootAndLookUpScopeName(a,r,this):Vi.createRoot(`unknown`,r),t=new Hi(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 Wi(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=Ti(this,a,i,0,t,s,!0,r);return Ur(a),{lineLength:o,lineTokens:s,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function Bi(e,t){return e=dr(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 Vi=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=Tr.push(i,t.scopeNames),r=new e(r,i,t.encodedTokenAttributes);return r}static createRoot(t,n){return new e(null,new Tr(null,t),n)}static createRootAndLookUpScopeName(t,n,r){let i=r.getMetadataForScope(t),a=new Tr(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),Lr.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}},Hi=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)?Vi.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:li(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=Vi.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,ci(n.ruleId),n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,Vi.fromExtension(r,n.contentNameScopesList))}},Ui=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>e===`*`?(this.allowAny=!0,[]):Br(e,Li).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>Br(e,Li).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}},Wi=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=Lr.set(n,0,Rr(e.type),null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(t))}if(r&&(n=Lr.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}},Gi=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,Fi(e,a,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},Ki=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new Gi(wr.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(wr.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 Ui(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,i){let a=new qr(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)}},qi=Hi.NULL;function Ji(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 Yi(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function Xi(e){return Array.isArray(e)?e:[e]}async function Zi(e){return Promise.resolve(typeof e==`function`?e():e).then(e=>e.default||e)}function Qi(e){return!e||[`plaintext`,`txt`,`text`,`plain`].includes(e)}function $i(e){return e===`ansi`||Qi(e)}function ea(e){return e===`none`}function ta(e){return ea(e)}var na=/(\r?\n)/g;function ra(e,t=!1){if(e.length===0)return[[``,0]];let n=e.split(na),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 ia={light:`#333333`,dark:`#bbbbbb`},aa={light:`#fffffe`,dark:`#1e1e1e`},oa=`__shiki_resolved`;function sa(e){if(e?.[oa])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`?ia.light:ia.dark,n||=t.type===`light`?aa.light:aa.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,oa,{enumerable:!1,writable:!1,value:!0}),t}async function ca(e){return[...new Set((await Promise.all(e.filter(e=>!$i(e)).map(async e=>await Zi(e).then(e=>Array.isArray(e)?e:[e])))).flat())]}async function la(e){return(await Promise.all(e.map(async e=>ta(e)?null:sa(await Zi(e))))).filter(e=>!!e)}function ua(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 ur(`Circular alias \`${[...n].join(` -> `)} -> ${e}\``);n.add(e)}}return e}var da=class extends Ki{_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=sa(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=wr.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=ua(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 ur(`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))}},fa=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}},pa=0;function ma(e){pa+=1,e.warnings!==!1&&pa>=10&&pa%10==0&&console.warn(`[Shiki] ${pa} 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 ur("`engine` option is required for synchronous mode");let n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(sa),i=new da(new fa(e.engine,n),r,n,e.langAlias),a;function o(t){return ua(t,e.langAlias)}function s(e){g();let t=i.getGrammar(typeof e==`string`?e:e.name);if(!t)throw new ur(`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 ur(`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 ca(e))}function m(...e){g();for(let t of e.flat(1))i.loadTheme(t)}async function h(...e){return g(),m(await la(e))}function g(){if(t)throw new ur(`Shiki instance has been disposed`)}function _(){t||(t=!0,i.dispose(),--pa)}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 ha(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([la(e.themes||[]),ca(e.langs||[]),e.engine]);return ma({...e,themes:t,langs:n,engine:r})}var ga=new WeakMap;function _a(e,t){ga.set(e,t)}function va(e){return ga.get(e)}var ya=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(Xi(n).map(e=>[e,qi])),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 ba(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function ba(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 xa(e,t){if(!(e instanceof ya))throw new ur(`Invalid grammar state`);return e.getInternalStack(t)}var Sa=/,/,Ca=/ /;function wa(e,t,n={}){let{theme:r=e.getLoadedThemes()[0]}=n;if(Qi(e.resolveLangAlias(n.lang||`text`))||ea(r))return ra(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 ur(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${o.name}"`);if(!n.grammarState.themes.includes(i.name))throw new ur(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return Ea(t,o,i,a,n)}function Ta(...e){if(e.length===2)return va(e[1]);let[t,n,r={}]=e,{lang:i=`text`,theme:a=t.getLoadedThemes()[0]}=r;if(Qi(i)||ea(a))throw new ur(`Plain language does not have grammar state`);if(i===`ansi`)throw new ur(`ANSI language does not have grammar state`);let{theme:o,colorMap:s}=t.setTheme(a),c=t.getLanguage(i);return new ya(Da(n,c,o,s,r).stateStack,c.name,o.name)}function Ea(e,t,n,r,i){let a=Da(e,t,n,r,i),o=new ya(a.stateStack,t.name,n.name);return _a(a.tokens,o),a.tokens}function Da(e,t,n,r,i){let a=Ji(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:s=500}=i,c=ra(e),l=i.grammarState?xa(i.grammarState,n.name)??qi:i.grammarContextCode==null?qi:Da(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=Yi(r[Lr.getForeground(s)],a),l=Lr.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(Sa).map(e=>e.trim());break;case`object`:n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(Ca))})}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`?Oa(t.scopes):ka(e,t.scopes)}),g+=1}}u.push(d)}d.push(u),u=[],l=_.ruleStack}return{tokens:d,stateStack:l}}function Oa(e){return e.map(e=>({scopeName:e}))}function ka(e,t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];n[r]={scopeName:i,themeMatches:Ma(e,i,t.slice(0,r))}}return n}function Aa(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]===`.`}function ja(e,t,n){if(!Aa(e.at(-1),t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)Aa(e[r],n[i])&&--r,--i;return r===-1}function Ma(e,t,n){let r=[];for(let{selectors:i,settings:a}of e)for(let e of i)if(ja(e,t,n)){r.push(a);break}return r}function Na(e,t,n,r=wa){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:va(a),theme:typeof i.theme==`string`?i.theme:i.theme.name}}),o=Pa(...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 ya(Object.fromEntries(a.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),a[0].state.lang):void 0;return c&&_a(s,c),s}function Pa(...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 Fa=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`],Ia=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};Ia.prototype.normal={},Ia.prototype.property={},Ia.prototype.space=void 0;function La(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new Ia(n,r,t)}function Ra(e){return e.toLowerCase()}var za=class{constructor(e,t){this.attribute=t,this.property=e}};za.prototype.attribute=``,za.prototype.booleanish=!1,za.prototype.boolean=!1,za.prototype.commaOrSpaceSeparated=!1,za.prototype.commaSeparated=!1,za.prototype.defined=!1,za.prototype.mustUseProperty=!1,za.prototype.number=!1,za.prototype.overloadedBoolean=!1,za.prototype.property=``,za.prototype.spaceSeparated=!1,za.prototype.space=void 0;var Ba=u({boolean:()=>Ha,booleanish:()=>Ua,commaOrSpaceSeparated:()=>qa,commaSeparated:()=>Ka,number:()=>$,overloadedBoolean:()=>Wa,spaceSeparated:()=>Ga}),Va=0,Ha=Ja(),Ua=Ja(),Wa=Ja(),$=Ja(),Ga=Ja(),Ka=Ja(),qa=Ja();function Ja(){return 2**++Va}var Ya=Object.keys(Ba),Xa=class extends za{constructor(e,t,n,r){let i=-1;if(super(e,t),Za(this,`space`,r),typeof n==`number`)for(;++i<Ya.length;){let e=Ya[i];Za(this,Ya[i],(n&Ba[e])===Ba[e])}}};Xa.prototype.defined=!0;function Za(e,t,n){n&&(e[t]=n)}function Qa(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new Xa(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Ra(r)]=r,n[Ra(a.attribute)]=r}return new Ia(t,n,e.space)}var $a=Qa({properties:{ariaActiveDescendant:null,ariaAtomic:Ua,ariaAutoComplete:null,ariaBusy:Ua,ariaChecked:Ua,ariaColCount:$,ariaColIndex:$,ariaColSpan:$,ariaControls:Ga,ariaCurrent:null,ariaDescribedBy:Ga,ariaDetails:null,ariaDisabled:Ua,ariaDropEffect:Ga,ariaErrorMessage:null,ariaExpanded:Ua,ariaFlowTo:Ga,ariaGrabbed:Ua,ariaHasPopup:null,ariaHidden:Ua,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ga,ariaLevel:$,ariaLive:null,ariaModal:Ua,ariaMultiLine:Ua,ariaMultiSelectable:Ua,ariaOrientation:null,ariaOwns:Ga,ariaPlaceholder:null,ariaPosInSet:$,ariaPressed:Ua,ariaReadOnly:Ua,ariaRelevant:null,ariaRequired:Ua,ariaRoleDescription:Ga,ariaRowCount:$,ariaRowIndex:$,ariaRowSpan:$,ariaSelected:Ua,ariaSetSize:$,ariaSort:null,ariaValueMax:$,ariaValueMin:$,ariaValueNow:$,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function eo(e,t){return t in e?e[t]:t}function to(e,t){return eo(e,t.toLowerCase())}var no=Qa({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:Ka,acceptCharset:Ga,accessKey:Ga,action:null,allow:null,allowFullScreen:Ha,allowPaymentRequest:Ha,allowUserMedia:Ha,alpha:Ha,alt:null,as:null,async:Ha,autoCapitalize:null,autoComplete:Ga,autoFocus:Ha,autoPlay:Ha,blocking:Ga,capture:null,charSet:null,checked:Ha,cite:null,className:Ga,closedBy:null,colorSpace:null,cols:$,colSpan:$,command:null,commandFor:null,content:null,contentEditable:Ua,controls:Ha,controlsList:Ga,coords:$|Ka,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ha,defer:Ha,dir:null,dirName:null,disabled:Ha,download:Wa,draggable:Ua,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ha,formTarget:null,headers:Ga,height:$,hidden:Wa,high:$,href:null,hrefLang:null,htmlFor:Ga,httpEquiv:Ga,id:null,imageSizes:null,imageSrcSet:null,inert:Ha,inputMode:null,integrity:null,is:null,isMap:Ha,itemId:null,itemProp:Ga,itemRef:Ga,itemScope:Ha,itemType:Ga,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ha,low:$,manifest:null,max:null,maxLength:$,media:null,method:null,min:null,minLength:$,multiple:Ha,muted:Ha,name:null,nonce:null,noModule:Ha,noValidate:Ha,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:Ha,optimum:$,pattern:null,ping:Ga,placeholder:null,playsInline:Ha,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ha,referrerPolicy:null,rel:Ga,required:Ha,reversed:Ha,rows:$,rowSpan:$,sandbox:Ga,scope:null,scoped:Ha,seamless:Ha,selected:Ha,shadowRootClonable:Ha,shadowRootCustomElementRegistry:Ha,shadowRootDelegatesFocus:Ha,shadowRootMode:null,shadowRootSerializable:Ha,shape:null,size:$,sizes:null,slot:null,span:$,spellCheck:Ua,src:null,srcDoc:null,srcLang:null,srcSet:null,start:$,step:null,style:null,tabIndex:$,target:null,title:null,translate:null,type:null,typeMustMatch:Ha,useMap:null,value:Ua,width:$,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ga,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:Ha,declare:Ha,event:null,face:null,frame:null,frameBorder:null,hSpace:$,leftMargin:$,link:null,longDesc:null,lowSrc:null,marginHeight:$,marginWidth:$,noResize:Ha,noHref:Ha,noShade:Ha,noWrap:Ha,object:null,profile:null,prompt:null,rev:null,rightMargin:$,rules:null,scheme:null,scrolling:Ua,standby:null,summary:null,text:null,topMargin:$,valueType:null,version:null,vAlign:null,vLink:null,vSpace:$,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Ha,disablePictureInPicture:Ha,disableRemotePlayback:Ha,exportParts:Ka,part:Ga,prefix:null,property:null,results:$,security:null,unselectable:null},space:`html`,transform:to}),ro=Qa({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:qa,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:Ga,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:Ha,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:Ka,g2:Ka,glyphName:Ka,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:qa,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:Ga,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:$,pointsAtY:$,pointsAtZ:$,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:qa,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:qa,rev:qa,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:qa,requiredFeatures:qa,requiredFonts:qa,requiredFormats:qa,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:qa,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:$,strokeOpacity:$,strokeWidth:null,style:null,surfaceScale:$,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:qa,tabIndex:$,tableValues:null,target:null,targetX:$,targetY:$,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:qa,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:eo}),io=Qa({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()}}),ao=Qa({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:to}),oo=Qa({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),so=/[A-Z]/g,co=/-[a-z]/g,lo=/^data[-\w.:]+$/i;function uo(e,t){let n=Ra(t),r=t,i=za;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&lo.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(co,po);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!co.test(e)){let n=e.replace(so,fo);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=Xa}return new i(r,t)}function fo(e){return`-`+e.toLowerCase()}function po(e){return e.charAt(1).toUpperCase()}var mo=La([$a,no,io,ao,oo],`html`),ho=La([$a,ro,io,ao,oo],`svg`),go={}.hasOwnProperty;function _o(e,t){let n=t||{};function r(t,...n){let i=r.invalid,a=r.handlers;if(t&&go.call(t,e)){let n=String(t[e]);i=go.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 vo=/["&'<>`]/g,yo=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,bo=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,xo=/[|\\{}()[\]^$+*?.]/g,So=new WeakMap;function Co(e,t){if(e=e.replace(t.subset?wo(t.subset):vo,r),t.subset||t.escapeOnly)return e;return e.replace(yo,n).replace(bo,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 wo(e){let t=So.get(e);return t||(t=To(e),So.set(e,t)),t}function To(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(xo,`\\$&`));return RegExp(`(?:`+t.join(`|`)+`)`,`g`)}var Eo=/[\dA-Fa-f]/;function Do(e,t,n){let r=`&#x`+e.toString(16).toUpperCase();return n&&t&&!Eo.test(String.fromCharCode(t))?r:r+`;`}var Oo=/\d/;function ko(e,t,n){let r=`&#`+String(e);return n&&t&&!Oo.test(String.fromCharCode(t))?r:r+`;`}var Ao=`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(`.`),jo={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:`€`},Mo=[`cent`,`copy`,`divide`,`gt`,`lt`,`not`,`para`,`times`],No={}.hasOwnProperty,Po={},Fo;for(Fo in jo)No.call(jo,Fo)&&(Po[jo[Fo]]=Fo);var Io=/[^\dA-Za-z]/;function Lo(e,t,n,r){let i=String.fromCharCode(e);if(No.call(Po,i)){let e=Po[i],a=`&`+e;return n&&Ao.includes(e)&&!Mo.includes(e)&&(!r||t&&t!==61&&Io.test(String.fromCharCode(t)))?a:a+`;`}return``}function Ro(e,t,n){let r=Do(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=Lo(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){let i=ko(e,t,n.omitOptionalSemicolons);i.length<r.length&&(r=i)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function zo(e,t){return Co(e,Object.assign({format:Ro},t))}var Bo=/^>|^->|<!--|-->|--!>|<!-$/g,Vo=[`>`],Ho=[`<`,`>`];function Uo(e,t,n,r){return r.settings.bogusComments?`<?`+zo(e.value,Object.assign({},r.settings.characterReferences,{subset:Vo}))+`>`:`<!--`+e.value.replace(Bo,i)+`-->`;function i(e){return zo(e,Object.assign({},r.settings.characterReferences,{subset:Ho}))}}function Wo(e,t,n,r){return`<!`+(r.settings.upperDoctype?`DOCTYPE`:`doctype`)+(r.settings.tightDoctype?``:` `)+`html>`}function Go(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 Ko(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}function qo(e){return e.join(` `).trim()}var Jo=/[ \t\n\f\r]/g;function Yo(e){return typeof e==`object`?e.type===`text`?Xo(e.value):!1:Xo(e)}function Xo(e){return e.replace(Jo,``)===``}var Zo=es(1),Qo=es(-1),$o=[];function es(e){return t;function t(t,n,r){let i=t?t.children:$o,a=(n||0)+e,o=i[a];if(!r)for(;o&&Yo(o);)a+=e,o=i[a];return o}}var ts={}.hasOwnProperty;function ns(e){return t;function t(t,n,r){return ts.call(e,t.tagName)&&e[t.tagName](t,n,r)}}var rs=ns({body:os,caption:is,colgroup:is,dd:us,dt:ls,head:is,html:as,li:cs,optgroup:fs,option:ps,p:ss,rp:ds,rt:ds,tbody:hs,td:vs,tfoot:gs,th:vs,thead:ms,tr:_s});function is(e,t,n){let r=Zo(n,t,!0);return!r||r.type!==`comment`&&!(r.type===`text`&&Yo(r.value.charAt(0)))}function as(e,t,n){let r=Zo(n,t);return!r||r.type!==`comment`}function os(e,t,n){let r=Zo(n,t);return!r||r.type!==`comment`}function ss(e,t,n){let r=Zo(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 cs(e,t,n){let r=Zo(n,t);return!r||r.type===`element`&&r.tagName===`li`}function ls(e,t,n){let r=Zo(n,t);return!!(r&&r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`))}function us(e,t,n){let r=Zo(n,t);return!r||r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`)}function ds(e,t,n){let r=Zo(n,t);return!r||r.type===`element`&&(r.tagName===`rp`||r.tagName===`rt`)}function fs(e,t,n){let r=Zo(n,t);return!r||r.type===`element`&&r.tagName===`optgroup`}function ps(e,t,n){let r=Zo(n,t);return!r||r.type===`element`&&(r.tagName===`option`||r.tagName===`optgroup`)}function ms(e,t,n){let r=Zo(n,t);return!!(r&&r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`))}function hs(e,t,n){let r=Zo(n,t);return!r||r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`)}function gs(e,t,n){return!Zo(n,t)}function _s(e,t,n){let r=Zo(n,t);return!r||r.type===`element`&&r.tagName===`tr`}function vs(e,t,n){let r=Zo(n,t);return!r||r.type===`element`&&(r.tagName===`td`||r.tagName===`th`)}var ys=ns({body:Ss,colgroup:Cs,head:xs,html:bs,tbody:ws});function bs(e){let t=Zo(e,-1);return!t||t.type!==`comment`}function xs(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 Ss(e){let t=Zo(e,-1,!0);return!t||t.type!==`comment`&&!(t.type===`text`&&Yo(t.value.charAt(0)))&&!(t.type===`element`&&(t.tagName===`meta`||t.tagName===`link`||t.tagName===`script`||t.tagName===`style`||t.tagName===`template`))}function Cs(e,t,n){let r=Qo(n,t),i=Zo(e,-1,!0);return n&&r&&r.type===`element`&&r.tagName===`colgroup`&&rs(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`col`)}function ws(e,t,n){let r=Qo(n,t),i=Zo(e,-1);return n&&r&&r.type===`element`&&(r.tagName===`thead`||r.tagName===`tbody`)&&rs(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`tr`)}var Ts={name:[[`
6
6
  \f\r &/=>`.split(``),`