%PDF- %PDF-
| Direktori : /dom645759/wp-content/plugins/translatepress-multilingual/assets/js/ |
| Current File : //dom645759/wp-content/plugins/translatepress-multilingual/assets/js/trp-ald-popup-configurator.js |
/*! For license information please see trp-ald-popup-configurator.js.LICENSE.txt */
(()=>{var e={983(e,t,n){"use strict";var r=n.cw(e=>{var t,r=function(){return void 0===t&&(t=Boolean(window&&document&&document.all&&!window.atob)),t},i=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),o=[];function s(e){for(var t=-1,n=0;n<o.length;n++)if(o[n].identifier===e){t=n;break}return t}function a(e,t){for(var n={},r=[],i=0;i<e.length;i++){var a=e[i],l=t.base?a[0]+t.base:a[0],c=n[l]||0,d="".concat(l," ").concat(c);n[l]=c+1;var u=s(d),p={css:a[1],media:a[2],sourceMap:a[3]};-1!==u?(o[u].references++,o[u].updater(p)):o.push({identifier:d,updater:g(p,t),references:1}),r.push(d)}return r}function l(e){var t=document.createElement("style"),r=e.attributes||{};if(void 0===r.nonce){var o=n.nc;o&&(r.nonce=o)}if(Object.keys(r).forEach(function(e){t.setAttribute(e,r[e])}),"function"==typeof e.insert)e.insert(t);else{var s=i(e.insert||"head");if(!s)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");s.appendChild(t)}return t}var c,d=(c=[],function(e,t){return c[e]=t,c.filter(Boolean).join("\n")});function u(e,t,n,r){var i=n?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(e.styleSheet)e.styleSheet.cssText=d(t,i);else{var o=document.createTextNode(i),s=e.childNodes;s[t]&&e.removeChild(s[t]),s.length?e.insertBefore(o,s[t]):e.appendChild(o)}}function p(e,t,n){var r=n.css,i=n.media,o=n.sourceMap;if(i?e.setAttribute("media",i):e.removeAttribute("media"),o&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var h=null,f=0;function g(e,t){var n,r,i;if(t.singleton){var o=f++;n=h||(h=l(t)),r=u.bind(null,n,o,!1),i=u.bind(null,n,o,!0)}else n=l(t),r=p.bind(null,n,t),i=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=r());var n=a(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var r=0;r<n.length;r++){var i=s(n[r]);o[i].references--}for(var l=a(e,t),c=0;c<n.length;c++){var d=s(n[c]);0===o[d].references&&(o[d].updater(),o.splice(d,1))}n=l}}}}),i=n.cw((e,t)=>{t.A=(e,t)=>{const n=e.__vccOpts||e;for(const[e,r]of t)n[e]=r;return n}}),o={};function s(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return e=>e in t}n.r(o),n.d(o,{BaseTransition:()=>Hr,BaseTransitionPropsValidators:()=>Wr,Comment:()=>Ys,DeprecationTypes:()=>null,EffectScope:()=>_e,ErrorCodes:()=>Rn,ErrorTypeStrings:()=>rl,Fragment:()=>qs,KeepAlive:()=>Ii,ReactiveEffect:()=>De,Static:()=>Xs,Suspense:()=>Ls,Teleport:()=>Ir,Text:()=>Us,TrackOpTypes:()=>yn,Transition:()=>bl,TransitionGroup:()=>kc,TriggerOpTypes:()=>Cn,VueElement:()=>hc,assertNumber:()=>Pn,callWithAsyncErrorHandling:()=>Ln,callWithErrorHandling:()=>Nn,camelize:()=>R,capitalize:()=>L,cloneVNode:()=>ga,compatUtils:()=>null,computed:()=>Ja,createApp:()=>od,createBlock:()=>oa,createCommentVNode:()=>Aa,createElementBlock:()=>ia,createElementVNode:()=>ua,createHydrationRenderer:()=>Ss,createPropsRestProxy:()=>Do,createRenderer:()=>ks,createSSRApp:()=>sd,createSlots:()=>co,createStaticVNode:()=>va,createTextVNode:()=>ma,createVNode:()=>pa,customRef:()=>hn,defineAsyncComponent:()=>Mi,defineComponent:()=>Zr,defineCustomElement:()=>dc,defineEmits:()=>yo,defineExpose:()=>Co,defineModel:()=>ko,defineOptions:()=>xo,defineProps:()=>bo,defineSSRCustomElement:()=>uc,defineSlots:()=>wo,devtools:()=>il,effect:()=>He,effectScope:()=>Be,getCurrentInstance:()=>Ba,getCurrentScope:()=>Ee,getCurrentWatcher:()=>Sn,getTransitionRawChildren:()=>Gr,guardReactiveProps:()=>fa,h:()=>Ga,handleError:()=>$n,hasInjectionContext:()=>mr,hydrate:()=>id,hydrateOnIdle:()=>Oi,hydrateOnInteraction:()=>Ei,hydrateOnMediaQuery:()=>Bi,hydrateOnVisible:()=>_i,initCustomFormatter:()=>Ka,initDirectivesForSSR:()=>dd,inject:()=>gr,isMemoSame:()=>el,isProxy:()=>Jt,isReactive:()=>Ut,isReadonly:()=>Yt,isRef:()=>tn,isRuntimeOnly:()=>ja,isShallow:()=>Xt,isVNode:()=>sa,markRaw:()=>Kt,mergeDefaults:()=>To,mergeModels:()=>Mo,mergeProps:()=>xa,nextTick:()=>qn,nodeOps:()=>pl,normalizeClass:()=>K,normalizeProps:()=>Z,normalizeStyle:()=>U,onActivated:()=>Li,onBeforeMount:()=>Hi,onBeforeUnmount:()=>Xi,onBeforeUpdate:()=>Ui,onDeactivated:()=>$i,onErrorCaptured:()=>eo,onMounted:()=>qi,onRenderTracked:()=>Zi,onRenderTriggered:()=>Ki,onScopeDispose:()=>Te,onServerPrefetch:()=>Gi,onUnmounted:()=>Ji,onUpdated:()=>Yi,onWatcherCleanup:()=>On,openBlock:()=>Ks,patchProp:()=>lc,popScopeId:()=>cr,provide:()=>fr,proxyRefs:()=>un,pushScopeId:()=>lr,queuePostFlushCb:()=>Xn,reactive:()=>Wt,readonly:()=>Qt,ref:()=>nn,registerRuntimeCompiler:()=>Fa,render:()=>rd,renderList:()=>lo,renderSlot:()=>uo,resolveComponent:()=>no,resolveDirective:()=>oo,resolveDynamicComponent:()=>io,resolveFilter:()=>null,resolveTransitionHooks:()=>Ur,setBlockTracking:()=>na,setDevtoolsHook:()=>ol,setTransitionHooks:()=>Jr,shallowReactive:()=>zt,shallowReadonly:()=>Ht,shallowRef:()=>rn,ssrContextKey:()=>vr,ssrUtils:()=>sl,stop:()=>qe,toDisplayString:()=>Ce,toHandlerKey:()=>$,toHandlers:()=>ho,toRaw:()=>Gt,toRef:()=>vn,toRefs:()=>fn,toValue:()=>cn,transformVNodeArgs:()=>la,triggerRef:()=>an,unref:()=>ln,useAttrs:()=>_o,useCssModule:()=>mc,useCssVars:()=>$l,useHost:()=>fc,useId:()=>ei,useModel:()=>Jo,useSSRContext:()=>Ar,useShadowRoot:()=>gc,useSlots:()=>Oo,useTemplateRef:()=>ni,useTransitionState:()=>jr,vModelCheckbox:()=>Lc,vModelDynamic:()=>Qc,vModelRadio:()=>Fc,vModelSelect:()=>jc,vModelText:()=>Nc,vShow:()=>Il,version:()=>"3.5.46",warn:()=>nl,watch:()=>xr,watchEffect:()=>br,watchPostEffect:()=>yr,watchSyncEffect:()=>Cr,withAsyncContext:()=>Po,withCtx:()=>ur,withDefaults:()=>So,withDirectives:()=>pr,withKeys:()=>Gc,withMemo:()=>Za,withModifiers:()=>Xc,withScopeId:()=>dr});const a={},l=[],c=()=>{},d=()=>!1,u=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),p=e=>e.startsWith("onUpdate:"),h=Object.assign,f=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},g=Object.prototype.hasOwnProperty,m=(e,t)=>g.call(e,t),v=Array.isArray,A=e=>"[object Map]"===_(e),b=e=>"[object Set]"===_(e),y=e=>"[object Date]"===_(e),C=e=>"function"==typeof e,x=e=>"string"==typeof e,w=e=>"symbol"==typeof e,k=e=>null!==e&&"object"==typeof e,S=e=>(k(e)||C(e))&&C(e.then)&&C(e.catch),O=Object.prototype.toString,_=e=>O.call(e),B=e=>"[object Object]"===_(e),E=e=>x(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,T=s(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),M=s("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),D=e=>{let t=Object.create(null),n=0;return r=>{const i=t[r];return void 0!==i?i:(++n>1e4&&(t=Object.create(null),n=1),t[r]=e(r))}},P=/-\w/g,R=D(e=>e.replace(P,e=>e.slice(1).toUpperCase())),I=/\B([A-Z])/g,N=D(e=>e.replace(I,"-$1").toLowerCase()),L=D(e=>e.charAt(0).toUpperCase()+e.slice(1)),$=D(e=>e?`on${L(e)}`:""),F=(e,t)=>!Object.is(e,t),j=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},V=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},W=e=>{const t=parseFloat(e);return isNaN(t)?e:t},z=e=>{const t=x(e)?Number(e):NaN;return isNaN(t)?e:t};let Q;const H=()=>Q||(Q="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:{});const q=s("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol");function U(e){if(v(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],i=x(r)?G(r):U(r);if(i)for(const e in i)t[e]=i[e]}return t}if(x(e)||k(e))return e}const Y=/;(?![^(]*\))/g,X=/:([^]+)/,J=/"(?:[^"\\]|\\[^])*"|'(?:[^'\\]|\\[^])*'|\\[^]|\/\*[^]*?\*\//g;function G(e){const t={};return e.replace(J,e=>e.startsWith("/*")?"":e).split(Y).forEach(e=>{if(e){const n=e.split(X);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function K(e){let t="";if(x(e))t=e;else if(v(e))for(let n=0;n<e.length;n++){const r=K(e[n]);r&&(t+=r+" ")}else if(k(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function Z(e){if(!e)return null;let{class:t,style:n}=e;return t&&!x(t)&&(e.class=K(t)),n&&(e.style=U(n)),e}const ee=s("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"),te=s("svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"),ne=s("annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics"),re=s("area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr"),ie="itemscope,allowfullscreen,disablepictureinpicture,disableremoteplayback,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly",oe=s(ie),se=s(ie+",async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");function ae(e){return!!e||""===e}const le=s("accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap"),ce=s("xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan");function de(e){if(null==e)return!1;const t=typeof e;return"string"===t||"number"===t||"boolean"===t}const ue=/[ !"#$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g;function pe(e,t){return e.replace(ue,e=>t?'"'===e?'\\\\\\"':`\\\\${e}`:`\\${e}`)}function he(e,t,n){if(e.length!==t.length)return!1;let r=!0;for(let i=0;r&&i<e.length;i++)r=ve(e[i],t[i],n);return r}function fe(e,t,n){if(e.size!==t.size)return!1;const r=Array.from(t),i=new Uint8Array(r.length);for(const t of e){let e=-1;for(let o=0;o<r.length;o++)if(!i[o]&&ve(t,r[o],n)){e=o;break}if(e<0)return!1;i[e]=1}return!0}function ge(e,t,n){let r=A(e),i=A(t);if(r||i)return!(!r||!i)&&fe(e,t,n);if(r=b(e),i=b(t),r||i)return!(!r||!i)&&fe(e,t,n);if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e){const i=m(e,r),o=m(t,r);if(i&&!o||!i&&o||!ve(e[r],t[r],n))return!1}return be(e)===be(t)}function me(e,t,n,r){n||(n=[new Map,new Map]);const[i,o]=n;if(i.has(e)||o.has(t))return i.get(e)===t&&o.get(t)===e;i.set(e,t),o.set(t,e);const s=r(e,t,n);return i.delete(e),o.delete(t),s}function ve(e,t,n){if(e===t)return!0;let r=y(e),i=y(t);return r||i?!(!r||!i)&&e.getTime()===t.getTime():(r=w(e),i=w(t),r||i?e===t:(r=v(e),i=v(t),r||i?!(!r||!i)&&me(e,t,n,he):(r=k(e),i=k(t),r||i?!(!r||!i)&&me(e,t,n,ge):String(e)===String(t))))}function Ae(e,t){return e.findIndex(e=>ve(e,t))}function be(e){return null===Object.getPrototypeOf(e)&&null==e[Symbol.toPrimitive]&&"function"!=typeof e.toString&&"function"!=typeof e.valueOf?_(e):String(e)}const ye=e=>!(!e||!0!==e.__v_isRef),Ce=e=>x(e)?e:null==e?"":v(e)||k(e)&&(e.toString===O||!C(e.toString))?ye(e)?Ce(e.value):JSON.stringify(e,xe,2):String(e),xe=(e,t)=>ye(t)?xe(e,t.value):A(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n],r)=>(e[we(t,r)+" =>"]=n,e),{})}:b(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>we(e))}:w(t)?we(t):!k(t)||v(t)||B(t)?t:String(t),we=(e,t="")=>{var n;return w(e)?`Symbol(${null!=(n=e.description)?n:t})`:e};function ke(e){return null==e?"initial":"string"==typeof e?""===e?" ":e:("number"==typeof e&&Number.isFinite(e),String(e))}let Se,Oe;class _e{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!e&&Se&&(Se.active?(this.parent=Se,this.index=(Se.scopes||(Se.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){let e,t;if(this._isPaused=!0,this.scopes){const n=this.scopes.slice();for(e=0,t=n.length;e<t;e++)n[e].pause()}for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){let e,t;if(this._isPaused=!1,this.scopes){const n=this.scopes.slice();for(e=0,t=n.length;e<t;e++)n[e].resume()}const n=this.effects.slice();for(e=0,t=n.length;e<t;e++)n[e].resume()}}run(e){if(this._active){const t=Se;try{return Se=this,e()}finally{Se=t}}else 0}on(){1===++this._on&&(this.prevScope=Se,Se=this)}off(){if(this._on>0&&0===--this._on){if(Se===this)Se=this.prevScope;else{let e=Se;for(;e;){if(e.prevScope===this){e.prevScope=this.prevScope;break}e=e.prevScope}}this.prevScope=void 0}}stop(e){if(this._active){let t,n;for(this._active=!1,t=0,n=this.effects.length;t<n;t++)this.effects[t].stop();for(this.effects.length=0,t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){const e=this.scopes.slice();for(t=0,n=e.length;t<n;t++)e[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){const e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.parent=void 0}}}function Be(e){return new _e(e)}function Ee(){return Se}function Te(e,t=!1){Se&&(Se.active?Se.cleanups.push(e):e())}const Me=new WeakSet;class De{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Se&&(Se.active?Se.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){64&this.flags&&(this.flags&=-65,Me.has(this)&&(Me.delete(this),this.trigger()))}notify(){2&this.flags&&!(32&this.flags)||8&this.flags||Ne(this)}run(){if(!(1&this.flags))return this.fn();this.flags|=2,Ge(this),Fe(this);const e=Oe,t=Ue;Oe=this,Ue=!0;try{return this.fn()}finally{0,je(this),Oe=e,Ue=t,this.flags&=-3}}stop(){if(1&this.flags){for(let e=this.deps;e;e=e.nextDep)ze(e);this.deps=this.depsTail=void 0,Ge(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){64&this.flags?Me.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Ve(this)&&this.run()}get dirty(){return Ve(this)}}let Pe,Re,Ie=0;function Ne(e,t=!1){if(e.flags|=8,t)return e.next=Re,void(Re=e);e.next=Pe,Pe=e}function Le(){Ie++}function $e(){if(--Ie>0)return;if(Re){let e=Re;for(Re=void 0;e;){const t=e.next;e.next=void 0,e.flags&=-9,e=t}}let e;for(;Pe;){let t=Pe;for(Pe=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,1&t.flags)try{t.trigger()}catch(t){e||(e=t)}t=n}}if(e)throw e}function Fe(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function je(e){let t,n=e.depsTail,r=n;for(;r;){const e=r.prevDep;-1===r.version?(r===n&&(n=e),ze(r),Qe(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=e}e.deps=t,e.depsTail=n}function Ve(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(We(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function We(e){if(4&e.flags&&!(16&e.flags))return;if(e.flags&=-17,e.globalVersion===Ke)return;if(e.globalVersion=Ke,!e.isSSR&&128&e.flags&&(!e.deps&&!e._dirty||!Ve(e)))return;e.flags|=2;const t=e.dep,n=Oe,r=Ue;Oe=e,Ue=!0;try{Fe(e);const n=e.fn(e._value);(0===t.version||F(n,e._value))&&(e.flags|=128,e._value=n,t.version++)}catch(e){throw t.version++,e}finally{Oe=n,Ue=r,je(e),e.flags&=-3}}function ze(e,t=!1){const{dep:n,prevSub:r,nextSub:i}=e;if(r&&(r.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)ze(e,!0)}t||--n.sc||!n.map||n.map.delete(n.key)}function Qe(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}function He(e,t){e.effect instanceof De&&(e=e.effect.fn);const n=new De(e);t&&h(n,t);try{n.run()}catch(e){throw n.stop(),e}const r=n.run.bind(n);return r.effect=n,r}function qe(e){e.effect.stop()}let Ue=!0;const Ye=[];function Xe(){Ye.push(Ue),Ue=!1}function Je(){const e=Ye.pop();Ue=void 0===e||e}function Ge(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const e=Oe;Oe=void 0;try{t()}finally{Oe=e}}}let Ke=0;class Ze{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class et{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!Oe||!Ue||Oe===this.computed)return;let t=this.activeLink;if(void 0===t||t.sub!==Oe)t=this.activeLink=new Ze(Oe,this),Oe.deps?(t.prevDep=Oe.depsTail,Oe.depsTail.nextDep=t,Oe.depsTail=t):Oe.deps=Oe.depsTail=t,tt(t);else if(-1===t.version&&(t.version=this.version,t.nextDep)){const e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=Oe.depsTail,t.nextDep=void 0,Oe.depsTail.nextDep=t,Oe.depsTail=t,Oe.deps===t&&(Oe.deps=e)}return t}trigger(e){this.version++,Ke++,this.notify(e)}notify(e){Le();try{0;for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{$e()}}}function tt(e){if(e.dep.sc++,4&e.sub.flags){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let e=t.deps;e;e=e.nextDep)tt(e)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const nt=new WeakMap,rt=Symbol(""),it=Symbol(""),ot=Symbol("");function st(e,t,n){if(Ue&&Oe){let t=nt.get(e);t||nt.set(e,t=new Map);let r=t.get(n);r||(t.set(n,r=new et),r.map=t,r.key=n),r.track()}}function at(e,t,n,r,i,o){const s=nt.get(e);if(!s)return void Ke++;const a=e=>{e&&e.trigger()};if(Le(),"clear"===t)s.forEach(a);else{const i=v(e),o=i&&E(n);if(i&&"length"===n){const e=Number(r);s.forEach((t,n)=>{("length"===n||n===ot||!w(n)&&n>=e)&&a(t)})}else switch((void 0!==n||s.has(void 0))&&a(s.get(n)),o&&a(s.get(ot)),t){case"add":i?o&&a(s.get("length")):(a(s.get(rt)),A(e)&&a(s.get(it)));break;case"delete":i||(a(s.get(rt)),A(e)&&a(s.get(it)));break;case"set":A(e)&&a(s.get(rt))}}$e()}function lt(e){const t=Gt(e);return t===e?t:(st(t,0,ot),Xt(e)?t:Yt(e)?Ut(e)?t.map(e=>en(Zt(e))):t.map(en):t.map(Zt))}function ct(e){return st(e=Gt(e),0,ot),e}function dt(e,t){return Yt(e)?Ut(e)?en(Zt(t)):en(t):Zt(t)}const ut={__proto__:null,[Symbol.iterator](){return pt(this,Symbol.iterator,e=>dt(this,e))},concat(...e){return lt(this).concat(...e.map(e=>v(e)?lt(e):e))},entries(){return pt(this,"entries",e=>(e[1]=dt(this,e[1]),e))},every(e,t){return gt(this,"every",e,t,void 0,arguments)},filter(e,t){return gt(this,"filter",e,t,e=>e.map(e=>dt(this,e)),arguments)},find(e,t){return gt(this,"find",e,t,e=>dt(this,e),arguments)},findIndex(e,t){return gt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return gt(this,"findLast",e,t,e=>dt(this,e),arguments)},findLastIndex(e,t){return gt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return gt(this,"forEach",e,t,void 0,arguments)},includes(...e){return vt(this,"includes",e)},indexOf(...e){return vt(this,"indexOf",e)},join(e){return lt(this).join(e)},lastIndexOf(...e){return vt(this,"lastIndexOf",e)},map(e,t){return gt(this,"map",e,t,void 0,arguments)},pop(){return At(this,"pop")},push(...e){return At(this,"push",e)},reduce(e,...t){return mt(this,"reduce",e,t)},reduceRight(e,...t){return mt(this,"reduceRight",e,t)},shift(){return At(this,"shift")},some(e,t){return gt(this,"some",e,t,void 0,arguments)},splice(...e){return At(this,"splice",e)},toReversed(){return lt(this).toReversed()},toSorted(e){return lt(this).toSorted(e)},toSpliced(...e){return lt(this).toSpliced(...e)},unshift(...e){return At(this,"unshift",e)},values(){return pt(this,"values",e=>dt(this,e))}};function pt(e,t,n){const r=ct(e),i=r[t],o=i.call(r);if(r!==e&&!Xt(e)){if("Array Iterator"===o[Symbol.toStringTag]){const e=Object.create(Object.getPrototypeOf(o));return e.next=()=>ht(o.next(),n),i!==ft[t]&&Object.defineProperties(e,{return:{get(){const e=o.return;return"function"==typeof e?e.bind(o):e}},throw:{get(){const e=o.throw;return"function"==typeof e?e.bind(o):e}}}),e}o._next=o.next,o.next=()=>ht(o._next(),n)}return o}function ht(e,t){return e.done||(e.value=t(e.value)),e}const ft=Array.prototype;function gt(e,t,n,r,i,o){const s=ct(e),a=s!==e&&!Xt(e),l=s[t];if(l!==ft[t]){const t=l.apply(e,o);return a?Zt(t):t}let c=n;s!==e&&(a?c=function(t,r){return n.call(this,dt(e,t),r,e)}:n.length>2&&(c=function(t,r){return n.call(this,t,r,e)}));const d=l.call(s,c,r);return a&&i?i(d):d}function mt(e,t,n,r){const i=ct(e),o=i!==e&&!Xt(e);let s=n,a=!1;i!==e&&(o?(a=0===r.length,s=function(t,r,i){return a&&(a=!1,t=dt(e,t)),n.call(this,t,dt(e,r),i,e)}):n.length>3&&(s=function(t,r,i){return n.call(this,t,r,i,e)}));const l=i[t](s,...r);return a?dt(e,l):l}function vt(e,t,n){const r=Gt(e);st(r,0,ot);const i=r[t](...n);return-1!==i&&!1!==i||!Jt(n[0])?i:(n[0]=Gt(n[0]),r[t](...n))}function At(e,t,n=[]){Xe(),Le();const r=Gt(e)[t].apply(e,n);return $e(),Je(),r}const bt=s("__proto__,__v_isRef,__isVue"),yt=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>"arguments"!==e&&"caller"!==e).map(e=>Symbol[e]).filter(w));function Ct(e){w(e)||(e=String(e));const t=Gt(this);return st(t,0,e),t.hasOwnProperty(e)}class xt{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if("__v_skip"===t)return e.__v_skip;const r=this._isReadonly,i=this._isShallow;if("__v_isReactive"===t)return!r;if("__v_isReadonly"===t)return r;if("__v_isShallow"===t)return i;if("__v_raw"===t)return n===(r?i?Vt:jt:i?Ft:$t).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;const o=v(e);if(!r){let e;if(o&&(e=ut[t]))return e;if("hasOwnProperty"===t)return Ct}const s=Reflect.get(e,t,tn(e)?e:n);if(w(t)?yt.has(t):bt(t))return s;if(r||st(e,0,t),i)return s;if(tn(s)){const e=o&&E(t)?s:s.value;return r&&k(e)?Qt(e):e}return k(s)?r?Qt(s):Wt(s):s}}class wt extends xt{constructor(e=!1){super(!1,e)}set(e,t,n,r){let i=e[t];const o=v(e)&&E(t);if(!this._isShallow){const e=Yt(i);if(Xt(n)||Yt(n)||(i=Gt(i),n=Gt(n)),!o&&tn(i)&&!tn(n))return e||(i.value=n),!0}const s=o?Number(t)<e.length:m(e,t),a=Reflect.set(e,t,n,tn(e)?e:r);return e===Gt(r)&&a&&(s?F(n,i)&&at(e,"set",t,n):at(e,"add",t,n)),a}deleteProperty(e,t){const n=m(e,t),r=(e[t],Reflect.deleteProperty(e,t));return r&&n&&at(e,"delete",t,void 0),r}has(e,t){const n=Reflect.has(e,t);return w(t)&&yt.has(t)||st(e,0,t),n}ownKeys(e){return st(e,0,v(e)?"length":rt),Reflect.ownKeys(e)}}class kt extends xt{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}}const St=new wt,Ot=new kt,_t=new wt(!0),Bt=new kt(!0),Et=e=>e,Tt=e=>Reflect.getPrototypeOf(e);function Mt(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}function Dt(e,t){const n={get(n){const r=this.__v_raw,i=Gt(r),o=Gt(n);e||(F(n,o)&&st(i,0,n),st(i,0,o));const{has:s}=Tt(i),a=t?Et:e?en:Zt;return s.call(i,n)?a(r.get(n)):s.call(i,o)?a(r.get(o)):void(r!==i&&r.get(n))},get size(){const t=this.__v_raw;return!e&&st(Gt(t),0,rt),t.size},has(t){const n=this.__v_raw,r=Gt(n),i=Gt(t);return e||(F(t,i)&&st(r,0,t),st(r,0,i)),t===i?n.has(t):n.has(t)||n.has(i)},forEach(n,r){const i=this,o=i.__v_raw,s=Gt(o),a=t?Et:e?en:Zt;return!e&&st(s,0,rt),o.forEach((e,t)=>n.call(r,a(e),a(t),i))}};h(n,e?{add:Mt("add"),set:Mt("set"),delete:Mt("delete"),clear:Mt("clear")}:{add(e){const n=Gt(this),r=Tt(n),i=Gt(e),o=t||Xt(e)||Yt(e)?e:i;return r.has.call(n,o)||F(e,o)&&r.has.call(n,e)||F(i,o)&&r.has.call(n,i)||(n.add(o),at(n,"add",o,o)),this},set(e,n){t||Xt(n)||Yt(n)||(n=Gt(n));const r=Gt(this),{has:i,get:o}=Tt(r);let s=i.call(r,e);s||(e=Gt(e),s=i.call(r,e));const a=o.call(r,e);return r.set(e,n),s?F(n,a)&&at(r,"set",e,n):at(r,"add",e,n),this},delete(e){const t=Gt(this),{has:n,get:r}=Tt(t);let i=n.call(t,e);i||(e=Gt(e),i=n.call(t,e));r&&r.call(t,e);const o=t.delete(e);return i&&at(t,"delete",e,void 0),o},clear(){const e=Gt(this),t=0!==e.size,n=e.clear();return t&&at(e,"clear",void 0,void 0),n}});return["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=function(e,t,n){return function(...r){const i=this.__v_raw,o=Gt(i),s=A(o),a="entries"===e||e===Symbol.iterator&&s,l="keys"===e&&s,c=i[e](...r),d=n?Et:t?en:Zt;return!t&&st(o,0,l?it:rt),h(Object.create(c),{next(){const{value:e,done:t}=c.next();return t?{value:e,done:t}:{value:a?[d(e[0]),d(e[1])]:d(e),done:t}}})}}(r,e,t)}),n}function Pt(e,t){const n=Dt(e,t);return(r,i,o)=>"__v_isReactive"===i?!e:"__v_isReadonly"===i?e:"__v_isShallow"===i?t:"__v_raw"===i?r:Reflect.get(m(n,i)&&i in r?n:r,i,o)}const Rt={get:Pt(!1,!1)},It={get:Pt(!1,!0)},Nt={get:Pt(!0,!1)},Lt={get:Pt(!0,!0)};const $t=new WeakMap,Ft=new WeakMap,jt=new WeakMap,Vt=new WeakMap;function Wt(e){return Yt(e)?e:qt(e,!1,St,Rt,$t)}function zt(e){return qt(e,!1,_t,It,Ft)}function Qt(e){return qt(e,!0,Ot,Nt,jt)}function Ht(e){return qt(e,!0,Bt,Lt,Vt)}function qt(e,t,n,r,i){if(!k(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;if(e.__v_skip||!Object.isExtensible(e))return e;const o=i.get(e);if(o)return o;const s=function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}(_(e).slice(8,-1));if(0===s)return e;const a=new Proxy(e,2===s?r:n);return i.set(e,a),a}function Ut(e){return Yt(e)?Ut(e.__v_raw):!(!e||!e.__v_isReactive)}function Yt(e){return!(!e||!e.__v_isReadonly)}function Xt(e){return!(!e||!e.__v_isShallow)}function Jt(e){return!!e&&!!e.__v_raw}function Gt(e){const t=e&&e.__v_raw;return t?Gt(t):e}function Kt(e){return!m(e,"__v_skip")&&Object.isExtensible(e)&&V(e,"__v_skip",!0),e}const Zt=e=>k(e)?Wt(e):e,en=e=>k(e)?Qt(e):e;function tn(e){return!!e&&!0===e.__v_isRef}function nn(e){return on(e,!1)}function rn(e){return on(e,!0)}function on(e,t){return tn(e)?e:new sn(e,t)}class sn{constructor(e,t){this.dep=new et,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:Gt(e),this._value=t?e:Zt(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){const t=this._rawValue,n=this.__v_isShallow||Xt(e)||Yt(e);e=n?e:Gt(e),F(e,t)&&(this._rawValue=e,this._value=n?e:Zt(e),this.dep.trigger())}}function an(e){e.dep&&e.dep.trigger()}function ln(e){return tn(e)?e.value:e}function cn(e){return C(e)?e():ln(e)}const dn={get:(e,t,n)=>"__v_raw"===t?e:ln(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const i=e[t];return tn(i)&&!tn(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function un(e){return Ut(e)?e:new Proxy(e,dn)}class pn{constructor(e){this.__v_isRef=!0,this._value=void 0;const t=this.dep=new et,{get:n,set:r}=e(t.track.bind(t),t.trigger.bind(t));this._get=n,this._set=r}get value(){return this._value=this._get()}set value(e){this._set(e)}}function hn(e){return new pn(e)}function fn(e){const t=v(e)?new Array(e.length):{};for(const n in e)t[n]=An(e,n);return t}class gn{constructor(e,t,n){this._object=e,this._defaultValue=n,this.__v_isRef=!0,this._value=void 0,this._key=w(t)?t:String(t),this._raw=Gt(e);let r=!0,i=e;if(!v(e)||w(this._key)||!E(this._key))do{r=!Jt(i)||Xt(i)}while(r&&(i=i.__v_raw));this._shallow=r}get value(){let e=this._object[this._key];return this._shallow&&(e=ln(e)),this._value=void 0===e?this._defaultValue:e}set value(e){if(this._shallow&&tn(this._raw[this._key])){const t=this._object[this._key];if(tn(t))return void(t.value=e)}this._object[this._key]=e}get dep(){return function(e,t){const n=nt.get(e);return n&&n.get(t)}(this._raw,this._key)}}class mn{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function vn(e,t,n){return tn(e)?e:C(e)?new mn(e):k(e)&&arguments.length>1?An(e,t,n):nn(e)}function An(e,t,n){return new gn(e,t,n)}class bn{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new et(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Ke-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(8&this.flags||Oe===this))return Ne(this,!0),!0}get value(){const e=this.dep.track();return We(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}const yn={GET:"get",HAS:"has",ITERATE:"iterate"},Cn={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},xn={},wn=new WeakMap;let kn;function Sn(){return kn}function On(e,t=!1,n=kn){if(n){let t=wn.get(n);t||wn.set(n,t=[]),t.push(e)}else 0}function _n(e,t=1/0,n){if(t<=0||!k(e)||e.__v_skip)return e;if(((n=n||new Map).get(e)||0)>=t)return e;if(n.set(e,t),t--,tn(e))_n(e.value,t,n);else if(v(e))for(let r=0;r<e.length;r++)_n(e[r],t,n);else if(b(e)||A(e))e.forEach(e=>{_n(e,t,n)});else if(B(e)){for(const r in e)_n(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&_n(e[r],t,n)}return e}const Bn=[];let En=!1;function Tn(e,...t){if(En)return;En=!0,Xe();const n=Bn.length?Bn[Bn.length-1].component:null,r=n&&n.appContext.config.warnHandler,i=function(){let e=Bn[Bn.length-1];if(!e)return[];const t=[];for(;e;){const n=t[0];n&&n.vnode===e?n.recurseCount++:t.push({vnode:e,recurseCount:0});const r=e.component&&e.component.parent;e=r&&r.vnode}return t}();if(r)Nn(r,n,11,[e+t.map(e=>{var t,n;return null!=(n=null==(t=e.toString)?void 0:t.call(e))?n:JSON.stringify(e)}).join(""),n&&n.proxy,i.map(({vnode:e})=>`at <${Ya(n,e.type)}>`).join("\n"),i]);else{const n=[`[Vue warn]: ${e}`,...t];i.length&&n.push("\n",...function(e){const t=[];return e.forEach((e,n)=>{t.push(...0===n?[]:["\n"],...function({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",r=!!e.component&&null==e.component.parent,i=` at <${Ya(e.component,e.type,r)}`,o=">"+n;return e.props?[i,...Mn(e.props),o]:[i+o]}(e))}),t}(i)),console.warn(...n)}Je(),En=!1}function Mn(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(n=>{t.push(...Dn(n,e[n]))}),n.length>3&&t.push(" ..."),t}function Dn(e,t,n){return x(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):"number"==typeof t||"boolean"==typeof t||null==t?n?t:[`${e}=${t}`]:tn(t)?(t=Dn(e,Gt(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):C(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=Gt(t),n?t:[`${e}=`,t])}function Pn(e,t){}const Rn={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE",APP_UNMOUNT_CLEANUP:16,16:"APP_UNMOUNT_CLEANUP"},In={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function Nn(e,t,n,r){try{return r?e(...r):e()}catch(e){$n(e,t,n)}}function Ln(e,t,n,r){if(C(e)){const i=Nn(e,t,n,r);return i&&S(i)&&i.catch(e=>{$n(e,t,n,void 0,!0)}),i}if(v(e)){const i=[];for(let o=0;o<e.length;o++)i.push(Ln(e[o],t,n,r));return i}}function $n(e,t,n,r=!0,i=!1){t&&t.vnode;const{errorHandler:o,throwUnhandledErrorInProduction:s}=t&&t.appContext.config||a;if(t){let r=t.parent;const s=t.proxy,a=`https://vuejs.org/error-reference/#runtime-${n}`;for(;r;){const t=r.ec;if(t&&!r.isUnmounted&&(!i||r.scope.active))for(let n=0;n<t.length;n++)if(!1===t[n](e,s,a))return;r=r.parent}if(o)return Xe(),Nn(o,null,10,[e,s,a]),void Je()}!function(e,t,n,r=!0,i=!1){if(i)throw e;console.error(e)}(e,0,0,r,s)}const Fn=[];let jn=-1;const Vn=[];let Wn=null,zn=0;const Qn=Promise.resolve();let Hn=null;function qn(e){const t=Hn||Qn;return e?t.then(this?e.bind(this):e):t}function Un(e){if(!(1&e.flags)){const t=Zn(e),n=Fn[Fn.length-1];!n||!(2&e.flags)&&t>=Zn(n)?Fn.push(e):Fn.splice(function(e){let t=jn+1,n=Fn.length;for(;t<n;){const r=t+n>>>1,i=Fn[r],o=Zn(i);o<e||o===e&&2&i.flags?t=r+1:n=r}return t}(t),0,e),e.flags|=1,Yn()}}function Yn(){Hn||(Hn=Qn.then(er))}function Xn(e){if(v(e))for(let t=0;t<e.length;t++)Vn.push(e[t]);else Wn&&-1===e.id?Wn.splice(zn+1,0,e):1&e.flags||(Vn.push(e),e.flags|=1);Yn()}function Jn(e,t,n,r=jn+1){for(0;r<Fn.length;r++){const n=Fn[r];if(n&&2&n.flags){if(e&&n.id!==e.uid||void 0!==t&&!(n.id>=t))continue;0,Fn.splice(r,1),r=e?r-1:jn,4&n.flags&&(n.flags&=-2),n(),4&n.flags||(n.flags&=-2)}}}function Gn(e,t,n=0){if(Vn.length){let e=Vn,r=0;if(t){e=[];for(let i=0;i<Vn.length;i++){const o=Vn[i];(void 0!==o.i?!o.i||o.i.uid<n:t.has(o))?Vn[r++]=o:e.push(o)}}const i=[...new Set(e)].sort((e,t)=>Zn(e)-Zn(t));if(Vn.length=r,Wn){for(let e=0;e<i.length;e++)Wn.push(i[e]);return}for(Wn=i,zn=0;zn<Wn.length;zn++){const e=Wn[zn];0,4&e.flags&&(e.flags&=-2),8&e.flags||e(),e.flags&=-2}Wn=null,zn=0}}let Kn=!1;const Zn=e=>null==e.id?2&e.flags?-1:1/0:e.id;function er(e){try{for(jn=0;jn<Fn.length;jn++){const e=Fn[jn];!e||8&e.flags||(4&e.flags&&(e.flags&=-2),Nn(e,e.i,e.i?15:14),4&e.flags||(e.flags&=-2))}}finally{for(;jn<Fn.length;jn++){const e=Fn[jn];e&&(e.flags&=-2)}jn=-1,Fn.length=0,Gn(),Hn=null,(Fn.length||Vn.length)&&er(e)}}let tr=!1;let nr,rr=[],ir=!1;let or=null,sr=null;function ar(e){const t=or;return or=e,sr=e&&e.type.__scopeId||null,t}function lr(e){sr=e}function cr(){sr=null}const dr=e=>ur;function ur(e,t=or,n){if(!t)return e;if(e._n)return e;const r=(...n)=>{r._d&&na(-1);const i=ar(t),o=Js.length;let s;try{s=e(...n)}finally{for(let e=Js.length;e>o;e--)Zs();ar(i),r._d&&na(1)}return s};return r._n=!0,r._c=!0,r._d=!0,r}function pr(e,t){if(null===or)return e;const n=Ha(or),r=e.dirs||(e.dirs=[]);for(let e=0;e<t.length;e++){let[i,o,s,l=a]=t[e];i&&(C(i)&&(i={mounted:i,updated:i}),i.deep&&_n(o),r.push({dir:i,instance:n,value:o,oldValue:void 0,arg:s,modifiers:l}))}return e}function hr(e,t,n,r){let i=e;if("beforeMount"===r)e._mount=e;else if("beforeUpdate"===r){const n=t&&t._mount;n&&(n._latest=e,e._mount=n)}else if("mounted"===r){const t=e._latest;e._mount=e._latest=void 0,t&&(i=t,t._mount=void 0)}const o=i.dirs,s=t&&t.dirs;for(let a=0;a<o.length;a++){let l=o[a];s?l.oldValue=s[a].value:"mounted"===r&&void 0!==l.oldValue&&(l=h({},l,{oldValue:void 0}));let c=l.dir[r];c&&(Xe(),Ln(c,n,8,[e.el,l,i,t]),Je())}}function fr(e,t){if(_a){let n=_a.provides;const r=_a.parent&&_a.parent.provides;r===n&&(n=_a.provides=Object.create(r)),n[e]=t}}function gr(e,t,n=!1){const r=Ba();if(r||Xo){let i=Xo?Xo._context.provides:r?null==r.parent||r.ce?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(i&&e in i)return i[e];if(arguments.length>1)return n&&C(t)?t.call(r&&r.proxy):t}else 0}function mr(){return!(!Ba()&&!Xo)}const vr=Symbol.for("v-scx"),Ar=()=>{{const e=gr(vr);return e}};function br(e,t){return wr(e,null,t)}function yr(e,t){return wr(e,null,{flush:"post"})}function Cr(e,t){return wr(e,null,{flush:"sync"})}function xr(e,t,n){return wr(e,t,n)}function wr(e,t,n=a){const{immediate:r,deep:i,flush:o,once:s}=n;const l=h({},n);const d=t&&r||!t&&"post"!==o;let u;if(Na)if("sync"===o){const e=Ar();u=e.__watcherHandles||(e.__watcherHandles=[])}else if(!d){const e=()=>{};return e.stop=c,e.resume=c,e.pause=c,e}const p=_a;l.call=(e,t,n)=>Ln(e,p,t,n);let g=!1;"post"===o?l.scheduler=e=>{e.i=p,ws(e,p&&p.suspense)}:"sync"!==o&&(g=!0,l.scheduler=(e,t)=>{t?e():Un(e)}),l.augmentJob=e=>{t&&(e.flags|=4),g&&(e.flags|=2,p&&(e.id=p.uid,e.i=p))};const m=function(e,t,n=a){const{immediate:r,deep:i,once:o,scheduler:s,augmentJob:l,call:d}=n,u=e=>i?e:Xt(e)||!1===i||0===i?_n(e,1):_n(e);let p,h,g,m,A=!1,b=!1;if(tn(e)?(h=()=>e.value,A=Xt(e)):Ut(e)?(h=()=>u(e),A=!0):v(e)?(b=!0,A=e.some(e=>Ut(e)||Xt(e)),h=()=>e.map(e=>tn(e)?e.value:Ut(e)?u(e):C(e)?d?d(e,2):e():void 0)):h=C(e)?t?d?()=>d(e,2):e:()=>{if(g){Xe();try{g()}finally{Je()}}const t=kn;kn=p;try{return d?d(e,3,[m]):e(m)}finally{kn=t}}:c,t&&i){const e=h,t=!0===i?1/0:i;h=()=>_n(e(),t)}const y=Ee(),x=()=>{p.stop(),y&&y.active&&f(y.effects,p)};if(o&&t){const e=t;t=(...t)=>{try{return e(...t)}finally{x()}}}let w=b?new Array(e.length).fill(xn):xn;const k=e=>{if(1&p.flags&&(p.dirty||e))if(t){const n=p.run();if(e||i||A||(b?n.some((e,t)=>F(e,w[t])):F(n,w))){const e=kn;Xe();try{g&&g(),kn=p;const e=[n,w===xn?void 0:b&&w[0]===xn?[]:w,m];w=n,d?d(t,3,e):t(...e)}finally{kn=e,Je()}}}else p.run()};return l&&l(k),p=new De(h),p.scheduler=s?()=>s(k,!1):k,m=e=>On(e,!1,p),g=p.onStop=()=>{const e=wn.get(p);if(e){if(d)d(e,4);else for(const t of e)t();wn.delete(p)}},t?r?k(!0):w=p.run():s?s(k.bind(null,!0),!0):p.run(),x.pause=p.pause.bind(p),x.resume=p.resume.bind(p),x.stop=x,x}(e,t,l);return Na&&(u?u.push(m):d&&m()),m}function kr(e,t,n){const r=this.proxy,i=x(e)?e.includes(".")?Sr(r,e):()=>r[e]:e.bind(r,r);let o;C(t)?o=t:(o=t.handler,n=t);const s=Ma(this),a=wr(i,o.bind(r),n);return s(),a}function Sr(e,t){const n=t.split(".");return()=>{let t=e;for(let e=0;e<n.length&&t;e++)t=t[n[e]];return t}}const Or=new WeakMap,_r=Symbol("_vte"),Br=e=>e.__isTeleport,Er=e=>e&&(e.disabled||""===e.disabled),Tr=e=>"undefined"!=typeof SVGElement&&e instanceof SVGElement,Mr=e=>"function"==typeof MathMLElement&&e instanceof MathMLElement,Dr=(e,t)=>{const n=e&&e.to;if(x(n)){if(t){return t(n)}return null}return n},Pr={name:"Teleport",__isTeleport:!0,process(e,t,n,r,i,o,s,a,l,c){const{mc:d,pc:u,pbc:p,o:{insert:h,querySelector:f,createText:g,createComment:m,parentNode:v}}=c,A=Er(t.props);let{dynamicChildren:b}=t;const y=(e,t,n)=>{16&e.shapeFlag&&d(e.children,t,n,i,o,s,a,l)},C=(e=t)=>{const n=Er(e.props),r=e.target=Dr(e.props,f),o=Lr(r,e,g,h);r&&("svg"!==s&&Tr(r)?s="svg":"mathml"!==s&&Mr(r)&&(s="mathml"),i&&i.isCE&&(i.ce._teleportTargets||(i.ce._teleportTargets=new Set)).add(r),n||(y(e,r,o),Nr(e,!1)))},x=e=>{const t=()=>{if(Or.get(e)===t){if(Or.delete(e),Er(e.props)){const t=v(e.el)||n;y(e,t,e.anchor),Nr(e,!0)}C(e)}};Or.set(e,t),ws(t,o)};if(null==e){const e=t.el=g(""),i=t.anchor=g("");if(h(e,n,r),h(i,n,r),(w=t.props)&&(w.defer||""===w.defer)||o&&o.pendingBranch)return void x(t);A&&(y(t,n,i),Nr(t,!0)),C()}else{t.el=e.el;const r=t.anchor=e.anchor,d=Or.get(e);if(d)return d.flags|=8,Or.delete(e),void x(t);t.targetStart=e.targetStart;const h=t.target=e.target,g=t.targetAnchor=e.targetAnchor,m=Er(e.props),v=m?n:h,y=m?r:g;if("svg"===s||Tr(h)?s="svg":("mathml"===s||Mr(h))&&(s="mathml"),b?(p(e.dynamicChildren,b,v,i,o,s,a),Ts(e,t,!0)):l||u(e,t,v,y,i,o,s,a,!1),A)m?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Rr(t,n,r,c,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const e=Dr(t.props,f);e&&(t.target=e,Rr(t,e,null,c,0))}else m&&Rr(t,h,g,c,1);Nr(t,A)}var w},remove(e,t,n,{um:r,o:{remove:i}},o){const{shapeFlag:s,children:a,anchor:l,targetStart:c,targetAnchor:d,target:u,props:p}=e,h=Er(p),f=o||!h,g=Or.get(e);if(g&&(g.flags|=8,Or.delete(e)),u&&(i(c),i(d)),o&&i(l),!g&&(h||u)&&16&s)for(let e=0;e<a.length;e++){const i=a[e];r(i,t,n,f,!!i.dynamicChildren)}},move:Rr,hydrate:function(e,t,n,r,i,o,{o:{nextSibling:s,parentNode:a,querySelector:l,insert:c,createText:d}},u){function p(e,n){let r=n;for(;r;){if(r&&8===r.nodeType)if("teleport start anchor"===r.data)t.targetStart=r;else if("teleport anchor"===r.data){t.targetAnchor=r,e._lpa=t.targetAnchor&&s(t.targetAnchor);break}r=s(r)}}function h(e,t){t.anchor=u(s(e),t,a(e),n,r,i,o)}const f=t.target=Dr(t.props,l),g=Er(t.props);if(f){const l=f._lpa||f.firstChild;16&t.shapeFlag&&(g?(p(f,l),h(e,t),t.targetAnchor||Lr(f,t,d,c,a(e)===f?e:null)):(t.anchor=s(e),p(f,l),t.targetAnchor||Lr(f,t,d,c),u(l&&s(l),t,f,n,r,i,o))),Nr(t,g)}else g&&16&t.shapeFlag&&(h(e,t),t.targetStart=e,t.targetAnchor=s(e));return t.anchor&&s(t.anchor)}};function Rr(e,t,n,{o:{insert:r},m:i},o=2){0===o&&(e.targetStart&&r(e.targetStart,t,n),r(e.targetAnchor,t,n),n=e.targetAnchor);const{el:s,anchor:a,shapeFlag:l,children:c,props:d}=e,u=2===o;if(u&&r(s,t,n),!Or.has(e)&&(!u||Er(d))&&16&l)for(let e=0;e<c.length;e++)i(c[e],t,n,2);u&&r(a,t,n)}const Ir=Pr;function Nr(e,t){const n=e.ctx;n&&n.ut&&(t?n.ut(e.el,e.anchor):n.ut(e.targetStart,e.targetAnchor))}function Lr(e,t,n,r,i=null){const o=t.targetStart=n(""),s=t.targetAnchor=n("");return o[_r]=s,e&&(r(o,e,i),r(s,e,i)),s}const $r=Symbol("_leaveCb"),Fr=Symbol("_enterCb");function jr(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return qi(()=>{e.isMounted=!0}),Xi(()=>{e.isUnmounting=!0}),e}const Vr=[Function,Array],Wr={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Vr,onEnter:Vr,onAfterEnter:Vr,onEnterCancelled:Vr,onBeforeLeave:Vr,onLeave:Vr,onAfterLeave:Vr,onLeaveCancelled:Vr,onBeforeAppear:Vr,onAppear:Vr,onAfterAppear:Vr,onAppearCancelled:Vr},zr={name:"BaseTransition",props:Wr,setup(e,{slots:t}){const n=Ba(),r=jr();return()=>{const i=t.default&&Gr(t.default(),!0),o=i&&i.length?Qr(i):n.subTree?Aa():void 0;if(!o)return;const s=Gt(e),{mode:a}=s;if(r.isLeaving)return Yr(o);const l=Xr(o);if(!l)return Yr(o);const c=Ur(l,s,r,n);l.type!==Ys&&Jr(l,c);let d=n.subTree&&Xr(n.subTree);if(d&&d.type!==Ys&&!aa(d,l)&&Kr(n.subTree)){let e=Ur(d,s,r,n);if(Jr(d,e),"out-in"===a&&l.type!==Ys)return r.isLeaving=!0,e.afterLeave=()=>{if(r.isLeaving=!1,!(8&n.job.flags))if(2&n.effect.flags){const e=()=>{8&n.job.flags||n.update()};e.i=n,Un(e)}else n.update();delete e.afterLeave,d=void 0},Yr(o);"in-out"===a&&l.type!==Ys?e.delayLeave=(e,t,n)=>{qr(r,d)[String(d.key)]=d,e[$r]=()=>{t(),e[$r]=void 0,delete c.delayedLeave,d=void 0},c.delayedLeave=()=>{n(),delete c.delayedLeave,d=void 0}}:d=void 0}else d&&(d=void 0);return o}}};function Qr(e){let t=e[0];if(e.length>1){let n=!1;for(const r of e)if(r.type!==Ys){0,t=r,n=!0;break}}return t}const Hr=zr;function qr(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function Ur(e,t,n,r){const{appear:i,mode:o,persisted:s=!1,onBeforeEnter:a,onEnter:l,onAfterEnter:c,onEnterCancelled:d,onBeforeLeave:u,onLeave:p,onAfterLeave:h,onLeaveCancelled:f,onBeforeAppear:g,onAppear:m,onAfterAppear:A,onAppearCancelled:b}=t,y=String(e.key),C=qr(n,e),x=(e,t)=>{e&&Ln(e,r,9,t)},w=(e,t)=>{const n=t[1];x(e,t),v(e)?e.every(e=>e.length<=1)&&n():e.length<=1&&n()},k={mode:o,persisted:s,beforeEnter(t){let r=a;if(!n.isMounted){if(!i)return;r=g||a}t[$r]&&t[$r](!0);const o=C[y];if(o&&aa(e,o)){let e=o.el[$r];if(!e){const t=Kr(o);e=t&&t.el[$r]}e&&e()}x(r,[t])},enter(e){if(!tr&&e[$r])return void(k.delayedLeave&&k.delayedLeave());let t=l,r=c,o=d;if(!n.isMounted){if(!i)return;t=m||l,r=A||c,o=b||d}let s=!1;e[Fr]=t=>{s||(s=!0,x(t?o:r,[e]),k.delayedLeave&&k.delayedLeave(),e[Fr]=void 0)};const a=e[Fr].bind(null,!1);t?w(t,[e,a]):a()},leave(t,r){const i=String(e.key);if(t[Fr]&&t[Fr](!0),n.isUnmounting)return r();x(u,[t]);let o=!1;t[$r]=n=>{o||(o=!0,r(),x(n?f:h,[t]),t[$r]=void 0,C[i]===e&&delete C[i])};const s=t[$r].bind(null,!1);C[i]=e,p?w(p,[t,s]):s()},clone(e){const i=Ur(e,t,n,r);return i.afterLeave=()=>{k.afterLeave&&k.afterLeave()},i.delayLeave=(e,t,n)=>{k.delayLeave?k.delayLeave(e,t,n):n()},i.delayedLeave=()=>{k.delayedLeave&&k.delayedLeave()},i}};return k}function Yr(e){if(Pi(e))return(e=ga(e)).children=null,e}function Xr(e){if(!Pi(e))return Br(e.type)&&e.children?Qr(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(16&t)return n[0];if(32&t&&C(n.default))return n.default()}}function Jr(e,t){if(6&e.shapeFlag&&e.component){e.transition=t;const n=e.component.subTree;Jr(Br(n.type)&&Xr(n)||n,t)}else if(128&e.shapeFlag){const n=e.suspense;if(n){const e=n.isHydrating?n.pendingBranch:n.activeBranch;e&&Jr(e,t.clone(e))}else e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)}else if(e.transition=t,e.type===qs&&v(e.children)){const n=rs(e.children,!1);n&&Jr(n,t)}}function Gr(e,t=!1,n){let r=[],i=0;for(let o=0;o<e.length;o++){let s=e[o];const a=null==n?s.key:String(n)+String(null!=s.key?s.key:o);s.type===qs?(128&s.patchFlag&&i++,r=r.concat(Gr(s.children,t,a))):(t||s.type!==Ys)&&r.push(null!=a?ga(s,{key:a}):s)}if(i>1)for(let e=0;e<r.length;e++)r[e].patchFlag=-2;return r}function Kr(e){if(e.component)return Kr(e.component.subTree);if(e.type===qs){const t=v(e.children)&&rs(e.children,!1);return t?Kr(t):void 0}return e.type!==Ys?e:void 0}function Zr(e,t){return C(e)?(()=>h({name:e.name},t,{setup:e}))():e}function ei(){const e=Ba();return e?(e.appContext.config.idPrefix||"v")+"-"+e.ids[0]+e.ids[1]++:""}function ti(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function ni(e){const t=Ba(),n=rn(null);if(t){const r=t.refs===a?t.refs={}:t.refs;Object.defineProperty(r,e,{enumerable:!0,get:()=>n.value,set:e=>n.value=e})}else 0;return n}function ri(e,t){let n;return!(!(n=Object.getOwnPropertyDescriptor(e,t))||n.configurable)}const ii=new WeakMap;function oi(e,t,n,r,i=!1){if(v(e))return void e.forEach((e,o)=>oi(e,t&&(v(t)?t[o]:t),n,r,i));if(Ti(r)&&!i)return void(512&r.shapeFlag&&r.type.__asyncResolved&&r.component.subTree.component&&oi(e,t,n,r.component.subTree));const o=4&r.shapeFlag?Ha(r.component):r.el,s=i?null:o,{i:l,r:c}=e;const u=t&&t.r,p=l.refs===a?l.refs={}:l.refs,h=l.setupState,g=Gt(h),A=h===a?d:e=>!ri(p,e)&&m(g,e),b=(e,t)=>!t||!ri(p,t);if(null!=u&&u!==c)if(si(t),x(u))p[u]=null,A(u)&&(h[u]=null);else if(tn(u)){const e=t;b(0,e.k)&&(u.value=null),e.k&&(p[e.k]=null)}if(C(c))Nn(c,l,12,[s,p]);else{const t=x(c),r=tn(c);if(t||r){const a=()=>{if(e.f){const n=t?A(c)?h[c]:p[c]:b()||!e.k?c.value:p[e.k];if(i)v(n)&&f(n,o);else if(v(n))n.includes(o)||n.push(o);else if(t)p[c]=[o],A(c)&&(h[c]=p[c]);else{const t=[o];b(0,e.k)&&(c.value=t),e.k&&(p[e.k]=t)}}else t?(p[c]=s,A(c)&&(h[c]=s)):r&&(b(0,e.k)&&(c.value=s),e.k&&(p[e.k]=s))};if(s){const t=()=>{a(),ii.delete(e)};t.id=-1,ii.set(e,t),ws(t,n)}else si(e),a()}else 0}}function si(e){const t=ii.get(e);t&&(t.flags|=8,ii.delete(e))}let ai=!1;const li=()=>{ai||(console.error("Hydration completed but contains mismatches."),ai=!0)},ci=e=>{if(1===e.nodeType)return(e=>e.namespaceURI.includes("svg")&&"foreignObject"!==e.tagName)(e)?"svg":(e=>e.namespaceURI.includes("MathML"))(e)?"mathml":void 0},di=e=>8===e.nodeType;function ui(e){const{mt:t,p:n,o:{patchProp:r,createText:i,nextSibling:o,parentNode:s,remove:a,insert:l,createComment:c}}=e,d=(n,r,a,c,u,b=!1)=>{b=b||!!r.dynamicChildren;const y=di(n)&&"["===n.data,C=()=>g(n,r,a,c,u,y),{type:x,ref:w,shapeFlag:k,patchFlag:S}=r;let O=n.nodeType;r.el=n,-2===S&&(b=!1,r.dynamicChildren=null);let _=null;switch(x){case Us:3!==O?""===r.children?(l(r.el=i(""),s(n),n),_=n):_=C():(n.data!==r.children&&(__VUE_PROD_HYDRATION_MISMATCH_DETAILS__&&Tn("Hydration text mismatch in",n.parentNode,`\n - rendered on server: ${JSON.stringify(n.data)}\n - expected on client: ${JSON.stringify(r.children)}`),li(),n.data=r.children),_=o(n));break;case Ys:A(n)?(_=o(n),v(r.el=n.content.firstChild,n,a)):_=8!==O||y?C():o(n);break;case Xs:if(y&&(O=(n=o(n)).nodeType),1===O||3===O){_=n;const e=!r.children.length;for(let t=0;t<r.staticCount;t++)e&&(r.children+=1===_.nodeType?_.outerHTML:_.data),t===r.staticCount-1&&(r.anchor=_),_=o(_);return y?o(_):_}C();break;case qs:_=y?f(n,r,a,c,u,b):C();break;default:if(1&k)_=1===O&&r.type.toLowerCase()===n.tagName.toLowerCase()||A(n)?p(n,r,a,c,u,b):C();else if(6&k){r.slotScopeIds=u;const e=s(n);if(_=y?m(n):di(n)&&"teleport start"===n.data?m(n,n.data,"teleport end"):o(n),t(r,e,null,a,c,ci(e),b),(Ti(r)||r.component.asyncDep)&&!r.component.subTree){let t;y?(t=pa(Xs),t.anchor=_?_.previousSibling:e.lastChild):t=3===n.nodeType?ma(""):pa(8===n.nodeType?Ys:"div"),t.el=n,r.component.subTree=t}}else 64&k?_=8!==O?C():r.type.hydrate(n,r,a,c,u,b,e,h):128&k?_=r.type.hydrate(n,r,a,c,ci(s(n)),u,b,e,d):__VUE_PROD_HYDRATION_MISMATCH_DETAILS__&&Tn("Invalid HostVNode type:",x,`(${typeof x})`)}return null!=w&&oi(w,null,c,r),_},p=(e,t,n,i,o,s)=>{s=s||!!t.dynamicChildren;const{type:l,dynamicProps:c,props:d,patchFlag:p,shapeFlag:f,dirs:g,transition:m}=t,b="input"===l||"option"===l,y=!!c;if(b||y||-1!==p){g&&hr(t,null,n,"created");let l,C=!1;if(A(e)){C=Es(null,m)&&n&&n.vnode.props&&n.vnode.props.appear;const r=e.content.firstChild;if(C){const e=r.getAttribute("class");e&&(r.$cls=e),m.beforeEnter(r)}v(r,e,n),t.el=e=r}if(16&f&&(!d||!d.innerHTML&&!d.textContent)){let r=h(e.firstChild,t,e,n,i,o,s);for(r&&!xi(e,1)&&(__VUE_PROD_HYDRATION_MISMATCH_DETAILS__&&Tn("Hydration children mismatch on",e,"\nServer rendered element contains more child nodes than client vdom."),li());r;){const e=r;r=r.nextSibling,a(e)}}else if(8&f){let n=t.children;"\n"!==n[0]||"PRE"!==e.tagName&&"TEXTAREA"!==e.tagName||(n=n.slice(1));const{textContent:r}=e;r!==n&&r!==n.replace(/\r\n|\r/g,"\n")&&(xi(e,0)||(__VUE_PROD_HYDRATION_MISMATCH_DETAILS__&&Tn("Hydration text content mismatch on",e,`\n - rendered on server: ${r}\n - expected on client: ${n}`),li()),e.textContent=t.children)}if(d)if(__VUE_PROD_HYDRATION_MISMATCH_DETAILS__||b||y||!s||48&p){const i=e.tagName.includes("-"),o=e.namespaceURI.includes("svg")?"svg":e.namespaceURI.includes("MathML")?"mathml":void 0;for(const s in d)if(!__VUE_PROD_HYDRATION_MISMATCH_DETAILS__||g&&g.some(e=>e.dir.created)||!fi(e,s,d[s],t,n)||li(),b&&(s.endsWith("value")||"indeterminate"===s)||u(s)&&!T(s)||"."===s[0]||i&&!T(s)||c&&c.includes(s)){if(hi(e,s,d[s]))continue;r(e,s,null,d[s],o,n)}}else if(d.onClick)r(e,"onClick",null,d.onClick,void 0,n);else if(4&p&&Ut(d.style))for(const e in d.style)d.style[e];(l=d&&d.onVnodeBeforeMount)&&wa(l,n,t),g&&hr(t,null,n,"beforeMount"),((l=d&&d.onVnodeMounted)||g||C)&&Qs(()=>{l&&wa(l,n,t),C&&m.enter(e),g&&hr(t,null,n,"mounted")},i)}return e.nextSibling},h=(e,t,r,s,a,c,u)=>{u=u||!!t.dynamicChildren;const p=t.children,h=p.length;let f=!1;for(let t=0;t<h;t++){const g=u?p[t]:p[t]=ba(p[t]),m=g.type===Us;e?(m&&!u&&t+1<h&&ba(p[t+1]).type===Us&&(l(i(e.data.slice(g.children.length)),r,o(e)),e.data=g.children),e=d(e,g,s,a,c,u)):m&&!g.children?l(g.el=i(""),r):(f||(f=!0,xi(r,1)||(__VUE_PROD_HYDRATION_MISMATCH_DETAILS__&&Tn("Hydration children mismatch on",r,"\nServer rendered element contains fewer child nodes than client vdom."),li())),n(null,g,r,null,s,a,ci(r),c))}return e},f=(e,t,n,r,i,a)=>{const{slotScopeIds:d}=t;d&&(i=i?i.concat(d):d);const u=s(e),p=h(o(e),t,u,n,r,i,a);return p&&di(p)&&"]"===p.data?o(t.anchor=p):(li(),l(t.anchor=c("]"),u,p),p)},g=(e,t,r,i,l,c)=>{if(function(e,t){return xi(e.parentElement,1)||function(e){return 1===e.nodeType&&wi(e.getAttribute(yi),1)}(e)||function({props:e}){const t=e&&e[yi];return"string"==typeof t&&wi(t,1)}(t)}(e,t)||(__VUE_PROD_HYDRATION_MISMATCH_DETAILS__&&Tn("Hydration node mismatch:\n- rendered on server:",e,3===e.nodeType?"(text)":di(e)&&"["===e.data?"(start of fragment)":"","\n- expected on client:",t.type),li()),t.el=null,c){const t=m(e);for(;;){const n=o(e);if(!n||n===t)break;a(n)}}const d=o(e),u=s(e);return a(e),n(null,t,u,d,r,i,ci(u),l),r&&r.vnode.el===e&&(r.vnode.el=t.el,ls(r,t.el)),d},m=(e,t="[",n="]")=>{let r=0;for(;e;)if((e=o(e))&&di(e)&&(e.data===t&&r++,e.data===n)){if(0===r)return o(e);r--}return e},v=(e,t,n)=>{const r=t.parentNode;r&&r.replaceChild(e,t);let i=n;for(;i;)i.vnode.el===t&&(i.vnode.el=i.subTree.el=e),i=i.parent},A=e=>1===e.nodeType&&"TEMPLATE"===e.tagName;return[(e,t)=>{if(!t.hasChildNodes())return __VUE_PROD_HYDRATION_MISMATCH_DETAILS__&&Tn("Attempting to hydrate existing markup but container is empty. Performing full mount instead."),n(null,e,t),Gn(),void(t._vnode=e);d(t.firstChild,e,null,null,null),Gn(),t._vnode=e},d]}const pi=new Set(["src","srcset","href","poster"]);function hi(e,t,n){return!!pi.has(t)&&e.getAttribute(t)===(null==n?null:`${n}`)}function fi(e,t,n,r,i){let o,s,a,l;if("class"===t)e.$cls?(a=e.$cls,delete e.$cls):a=e.getAttribute("class"),l=K(n),function(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}(mi(a||""),mi(l))||(o=2,s="class");else if("style"===t){a=e.getAttribute("style")||"",l=x(n)?n:function(e){if(!e)return"";if(x(e))return e;let t="";for(const n in e){const r=e[n];(x(r)||"number"==typeof r)&&(t+=`${n.startsWith("--")?n:N(n)}:${r};`)}return t}(U(n));const t=vi(a),c=vi(l);if(r.dirs)for(const{dir:e,value:t}of r.dirs)"show"!==e.name||t||c.set("display","none");i&&Ai(i,r,c),function(e,t){if(e.size!==t.size)return!1;for(const[n,r]of e)if(r!==t.get(n))return!1;return!0}(t,c)||(o=3,s="style")}else(e instanceof SVGElement&&ce(t)||e instanceof HTMLElement&&(se(t)||le(t)))&&("hidden"===t?(a=gi(e.getAttribute(t)),l=gi(n)):se(t)?(a=e.hasAttribute(t),l=ae(n)):null==n?(a=e.hasAttribute(t),l=!1):(a=e.hasAttribute(t)?e.getAttribute(t):"value"===t&&"TEXTAREA"===e.tagName&&e.value,l=!!de(n)&&String(n)),a!==l&&(o=4,s=t));if(null!=o&&!xi(e,o)){const t=e=>!1===e?"(not rendered)":`${s}="${e}"`;return Tn(`Hydration ${Ci[o]} mismatch on`,e,`\n - rendered on server: ${t(a)}\n - expected on client: ${t(l)}\n Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead.\n You should fix the source of the mismatch.`),!0}return!1}function gi(e){return!!de(e)&&(x(e)?"until-found"===e.toLowerCase()?"until-found":"":!!ae(e)&&"")}function mi(e){return new Set(e.trim().split(/\s+/))}function vi(e){const t=new Map;for(const n of e.split(";")){let[e,r]=n.split(":");e=e.trim(),r=r&&r.trim(),e&&r&&t.set(e,r)}return t}function Ai(e,t,n){const r=e.subTree;if(e.getCssVars&&bi(r,t)){const t=e.getCssVars();for(const e in t){const r=ke(t[e]);n.set(`--${pe(e,!1)}`,r)}}t===r&&e.parent&&Ai(e.parent,e.vnode,n)}function bi(e,t){return e===t||!!(e&&(e.type===qs||64&e.shapeFlag)&&e.children.some(e=>bi(e,t)))}const yi="data-allow-mismatch",Ci={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function xi(e,t){if(0===t||1===t)for(;e&&!e.hasAttribute(yi);)e=e.parentElement;return wi(e&&e.getAttribute(yi),t)}function wi(e,t){if(null==e)return!1;if(""===e)return!0;{const n=e.split(",");return!(0!==t||!n.includes("children"))||n.includes(Ci[t])}}const ki=H().requestIdleCallback||(e=>setTimeout(e,1)),Si=H().cancelIdleCallback||(e=>clearTimeout(e)),Oi=(e=1e4)=>t=>{const n=ki(t,{timeout:e});return()=>Si(n)};const _i=e=>(t,n)=>{const r=new IntersectionObserver(e=>{for(const n of e)if(n.isIntersecting){r.disconnect(),t();break}},e),i=e=>{if(function(e){const{top:t,left:n,bottom:r,right:i}=e.getBoundingClientRect(),{innerHeight:o,innerWidth:s}=window;return(t>0&&t<o||r>0&&r<o)&&(n>0&&n<s||i>0&&i<s)}(e))return t(),r.disconnect(),!1;if("contents"===getComputedStyle(e).display)for(let t=0;t<e.children.length;t++)if(!1===i(e.children[t]))return!1;r.observe(e)};return n(e=>{if(e instanceof Element)return i(e)}),()=>r.disconnect()},Bi=e=>t=>{if(e){const n=matchMedia(e);if(!n.matches)return n.addEventListener("change",t,{once:!0}),()=>n.removeEventListener("change",t);t()}},Ei=(e=[])=>(t,n)=>{x(e)&&(e=[e]);let r=!1;const i=e=>{r||(r=!0,o(),t(),e.target.dispatchEvent(new e.constructor(e.type,e)))},o=()=>{n(t=>{for(const n of e)t.removeEventListener(n,i)})};return n(t=>{for(const n of e)t.addEventListener(n,i,{once:!0})}),o};const Ti=e=>!!e.type.__asyncLoader;function Mi(e){C(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:r,delay:i=200,hydrate:o,timeout:s,suspensible:a=!0,onError:l}=e;let c,d=null,u=0;const p=()=>{let e;return d||(e=d=t().catch(e=>{if(e=e instanceof Error?e:new Error(String(e)),l)return new Promise((t,n)=>{l(e,()=>t((u++,d=null,p())),()=>n(e),u+1)});throw e}).then(t=>e!==d&&d?d:(t&&(t.__esModule||"Module"===t[Symbol.toStringTag])&&(t=t.default),c=t,t)))};return Zr({name:"AsyncComponentWrapper",__asyncLoader:p,__asyncHydrate(e,t,n){const r=e.isConnected;let i=!1;(t.bu||(t.bu=[])).push(()=>i=!0);const s=()=>{i||!e.parentNode||r&&!e.isConnected||n()},a=o?()=>{const n=o(s,t=>function(e,t){if(di(e)&&"["===e.data){let n=1,r=e.nextSibling;for(;r;){if(1===r.nodeType){if(!1===t(r))break}else if(di(r))if("]"===r.data){if(0===--n)break}else"["===r.data&&n++;r=r.nextSibling}}else t(e)}(e,t));n&&(t.bum||(t.bum=[])).push(n)}:s;c?a():p().then(()=>!t.isUnmounted&&a())},get __asyncResolved(){return c},setup(){const e=_a;if(ti(e),c)return()=>Di(c,e);const t=t=>{d=null,$n(t,e,13,!r,!0)};if(a&&e.suspense||Na)return p().then(t=>()=>Di(t,e)).catch(e=>(t(e),()=>r?pa(r,{error:e}):null));const o=nn(!1),l=nn(),u=nn(!!i);let h,f;return Te(()=>{null!=h&&clearTimeout(h),null!=f&&clearTimeout(f)}),i&&(f=setTimeout(()=>{e.isUnmounted||(u.value=!1)},i)),null!=s&&(h=setTimeout(()=>{if(!e.isUnmounted&&!o.value&&!l.value){const e=new Error(`Async component timed out after ${s}ms.`);t(e),l.value=e}},s)),p().then(()=>{e.isUnmounted||(o.value=!0,e.parent&&Pi(e.parent.vnode)&&e.parent.update())}).catch(n=>{e.isUnmounted?d=null:(t(n),l.value=n)}),()=>o.value&&c?Di(c,e):l.value&&r?pa(r,{error:l.value}):n&&!u.value?Di(n,e):void 0}})}function Di(e,t){const{ref:n,props:r,children:i,ce:o}=t.vnode,s=pa(e,r,i);return s.ref=n,s.ce=o,delete t.vnode.ce,s}const Pi=e=>e.type.__isKeepAlive,Ri={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=Ba(),r=n.ctx;if(!r.renderer)return()=>{const e=t.default&&t.default();return e&&1===e.length?e[0]:e};const i=new Map,o=new Set;let s=null;const a=n.suspense,{renderer:{p:l,m:c,um:d,o:{createElement:u}}}=r,p=u("div");function h(e){Vi(e),d(e,n,a,!0)}function f(e){i.forEach((t,n)=>{const r=Ua(Ti(t)?t.type.__asyncResolved||{}:t.type);r&&!e(r)&&g(n)})}function g(e){const t=i.get(e);!t||s&&aa(t,s)?s&&(Vi(s),t&&Vi(t)):h(t),i.delete(e),o.delete(e)}r.activate=(e,t,n,r,i)=>{const o=e.component;c(e,t,n,0,a),l(o.vnode,e,t,n,o,a,r,e.slotScopeIds,i),ws(()=>{o.isDeactivated=!1,o.a&&j(o.a);const t=e.props&&e.props.onVnodeMounted;t&&wa(t,o.parent,e)},a)},r.deactivate=e=>{const t=i.get(null==e.key?e.type:e.key);if(!t||t.component!==e.component)return!1;const n=e.component;return Ds(n.m),Ds(n.a),c(e,p,null,1,a),ws(()=>{n.da&&j(n.da);const t=e.props&&e.props.onVnodeUnmounted;t&&wa(t,n.parent,e),n.isDeactivated=!0},a),!0},xr(()=>[e.include,e.exclude],([e,t])=>{e&&f(t=>Ni(e,t)),t&&f(e=>!Ni(t,e))},{flush:"post",deep:!0});let m=null;const v=()=>{if(null!=m)if(Rs(n.subTree.type)){const e=()=>{const e=Wi(n.subTree);e.component&&i.set(m,e)};n.subTree.suspense.pendingBranch?ws(e,n.subTree.suspense):e()}else i.set(m,Wi(n.subTree))};return qi(v),Yi(v),Xi(()=>{i.forEach(e=>{const{subTree:t,suspense:r}=n,i=Wi(t);if(e.type===i.type&&e.key===i.key){Vi(i);const e=i.component.da;return void(e&&ws(e,r))}h(e)})}),()=>{if(m=null,!t.default)return s=null;const n=t.default(),r=n[0];if(n.length>1)return s=null,n;if(!(sa(r)&&(4&r.shapeFlag||128&r.shapeFlag)))return s=null,r;let a=Wi(r);if(a.type===Ys)return s=null,a;const l=a.type,c=Ua(Ti(a)?a.type.__asyncResolved||{}:l),{include:d,exclude:u,max:p}=e;if(d&&(!c||!Ni(d,c))||u&&c&&Ni(u,c))return a.shapeFlag&=-257,s=a,r;const h=null==a.key?l:a.key,f=i.get(h);return a.el&&(a=ga(a),128&r.shapeFlag&&(r.ssContent=a)),m=h,f?(a.el=f.el,a.component=f.component,a.transition&&Jr(a,a.transition),a.shapeFlag|=512,o.delete(h),o.add(h)):(o.add(h),p&&o.size>parseInt(p,10)&&g(o.values().next().value)),a.shapeFlag|=256,s=a,Rs(r.type)?r:a}}},Ii=Ri;function Ni(e,t){return v(e)?e.some(e=>Ni(e,t)):x(e)?e.split(",").includes(t):"[object RegExp]"===_(e)&&(e.lastIndex=0,e.test(t))}function Li(e,t){Fi(e,"a",t)}function $i(e,t){Fi(e,"da",t)}function Fi(e,t,n=_a){const r=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(zi(t,r,n),n){let e=n.parent;for(;e&&e.parent;)Pi(e.parent.vnode)&&ji(r,t,n,e),e=e.parent}}function ji(e,t,n,r){const i=zi(t,e,r,!0);zi("um",()=>f(r[t],i),n).flags=16}function Vi(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function Wi(e){return 128&e.shapeFlag?e.ssContent:e}function zi(e,t,n=_a,r=!1){if(n){const i=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...r)=>{Xe();const i=Ma(n),o=Ln(t,n,e,r);return i(),Je(),o});return r?i.unshift(o):i.push(o),o}}const Qi=e=>(t,n=_a)=>{Na&&"sp"!==e||zi(e,(...e)=>t(...e),n)},Hi=Qi("bm"),qi=Qi("m"),Ui=Qi("bu"),Yi=Qi("u"),Xi=Qi("bum"),Ji=Qi("um"),Gi=Qi("sp"),Ki=Qi("rtg"),Zi=Qi("rtc");function eo(e,t=_a){zi("ec",e,t)}const to="components";function no(e,t){return so(to,e,!0,t)||e}const ro=Symbol.for("v-ndc");function io(e){return x(e)?so(to,e,!1)||e:e||ro}function oo(e){return so("directives",e)}function so(e,t,n=!0,r=!1){const i=or||_a;if(i){const n=i.type;if(e===to){const e=Ua(n,!1);if(e&&(e===t||e===R(t)||e===L(R(t))))return n}const o=ao(i[e]||n[e],t)||ao(i.appContext[e],t);return!o&&r?n:o}}function ao(e,t){return e&&(e[t]||e[R(t)]||e[L(R(t))])}function lo(e,t,n,r){let i;const o=n&&n[r],s=v(e);if(s||x(e)){let n=!1,r=!1;s&&Ut(e)&&(n=!Xt(e),r=Yt(e),e=ct(e)),i=new Array(e.length);for(let s=0,a=e.length;s<a;s++)i[s]=t(n?r?en(Zt(e[s])):Zt(e[s]):e[s],s,void 0,o&&o[s])}else if("number"==typeof e)if(!Number.isInteger(e)||e<0)i=[];else{i=new Array(e);for(let n=0;n<e;n++)i[n]=t(n+1,n,void 0,o&&o[n])}else if(k(e))if(e[Symbol.iterator])i=Array.from(e,(e,n)=>t(e,n,void 0,o&&o[n]));else{const n=Object.keys(e);i=new Array(n.length);for(let r=0,s=n.length;r<s;r++){const s=n[r];i[r]=t(e[s],s,r,o&&o[r])}}else i=[];return n&&(n[r]=i),i}function co(e,t){for(let n=0;n<t.length;n++){const r=t[n];if(v(r))for(let t=0;t<r.length;t++)e[r[t].name]=r[t].fn;else r&&(e[r.name]=r.key?(...e)=>{const t=r.fn(...e);return t&&(t.key=r.key),t}:r.fn)}return e}function uo(e,t,n,r,i,o){if(null==n&&(n={}),or.ce||or.parent&&Ti(or.parent)&&or.parent.ce){const e=null!=o&&null==n.key?h({},n,{key:o}):n,i=Object.keys(e).length>0;return"default"!==t&&(e.name=t),Ks(),oa(qs,null,[pa("slot",e,r&&r())],i?-2:64)}let s=e[t];s&&s._c&&(s._d=!1);const a=Js.length;let l;Ks();try{const i=s&&po(s(n)),a=n.key||o||i&&i.key;l=oa(qs,{key:(a&&!w(a)?a:`_${t}`)+(!i&&r?"_fb":"")},i||(r?r():[]),i&&1===e._?64:-2)}catch(e){for(let e=Js.length;e>a;e--)Zs();throw e}finally{s&&s._c&&(s._d=!0)}return!i&&l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),l}function po(e){return e.some(e=>!sa(e)||e.type!==Ys&&!(e.type===qs&&!po(e.children)))?e:null}function ho(e,t){const n={};for(const r in e)n[t&&/[A-Z]/.test(r)?`on:${r}`:$(r)]=e[r];return n}const fo=e=>e?Pa(e)?Ha(e):fo(e.parent):null,go=h(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>fo(e.parent),$root:e=>fo(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>$o(e),$forceUpdate:e=>e.f||(e.f=()=>{Un(e.update)}),$nextTick:e=>e.n||(e.n=qn.bind(e.proxy)),$watch:e=>kr.bind(e)}),mo=(e,t)=>e!==a&&!e.__isScriptSetup&&m(e,t),vo={get({_:e},t){if("__v_skip"===t)return!0;const{ctx:n,setupState:r,data:i,props:o,accessCache:s,type:l,appContext:c}=e;if("$"!==t[0]){const e=s[t];if(void 0!==e)switch(e){case 1:return r[t];case 2:return i[t];case 4:return n[t];case 3:return o[t]}else{if(mo(r,t))return s[t]=1,r[t];if(i!==a&&m(i,t))return s[t]=2,i[t];if(m(o,t))return s[t]=3,o[t];if(n!==a&&m(n,t))return s[t]=4,n[t];Ro&&(s[t]=0)}}const d=go[t];let u,p;return d?("$attrs"===t&&st(e.attrs,0,""),d(e)):(u=l.__cssModules)&&(u=u[t])?u:n!==a&&m(n,t)?(s[t]=4,n[t]):(p=c.config.globalProperties,m(p,t)?p[t]:void 0)},set({_:e},t,n){const{data:r,setupState:i,ctx:o}=e;return mo(i,t)?(i[t]=n,!0):r!==a&&m(r,t)?(r[t]=n,!0):!m(e.props,t)&&(("$"!==t[0]||!(t.slice(1)in e))&&(o[t]=n,!0))},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:i,props:o,type:s}},l){let c;return!!(n[l]||e!==a&&"$"!==l[0]&&m(e,l)||mo(t,l)||m(o,l)||m(r,l)||m(go,l)||m(i.config.globalProperties,l)||(c=s.__cssModules)&&c[l])},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:m(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};const Ao=h({},vo,{get(e,t){if(t!==Symbol.unscopables)return vo.get(e,t,e)},has:(e,t)=>"_"!==t[0]&&!q(t)});function bo(){return null}function yo(){return null}function Co(e){0}function xo(e){0}function wo(){return null}function ko(){0}function So(e,t){return null}function Oo(){return Bo("useSlots").slots}function _o(){return Bo("useAttrs").attrs}function Bo(e){const t=Ba();return t.setupContext||(t.setupContext=Qa(t))}function Eo(e){return v(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}function To(e,t){const n=Eo(e);for(const e in t){if(e.startsWith("__skip"))continue;let r=n[e];r?v(r)||C(r)?r=n[e]={type:r,default:t[e]}:r.default=t[e]:null===r&&(r=n[e]={default:t[e]}),r&&t[`__skip_${e}`]&&(r.skipFactory=!0)}return n}function Mo(e,t){return e&&t?v(e)&&v(t)?e.concat(t):h({},Eo(e),Eo(t)):e||t}function Do(e,t){const n={};for(const r in e)t.includes(r)||Object.defineProperty(n,r,{enumerable:!0,get:()=>e[r]});return n}function Po(e){const t=Ba(),n=Na;let r=e();Da(),n&&Ta(!1);const i=()=>{Ma(t),n&&Ta(!0)},o=()=>{Ba()!==t&&t.scope.off(),Da(),n&&Ta(!1)};return S(r)&&(r=r.catch(e=>{throw i(),Promise.resolve().then(()=>Promise.resolve().then(o)),e})),[r,()=>{i(),Promise.resolve().then(o)}]}let Ro=!0;function Io(e){const t=$o(e),n=e.proxy,r=e.ctx;Ro=!1,t.beforeCreate&&No(t.beforeCreate,e,"bc");const{data:i,computed:o,methods:s,watch:a,provide:l,inject:d,created:u,beforeMount:p,mounted:h,beforeUpdate:f,updated:g,activated:m,deactivated:A,beforeDestroy:b,beforeUnmount:y,destroyed:x,unmounted:w,render:S,renderTracked:O,renderTriggered:_,errorCaptured:B,serverPrefetch:E,expose:T,inheritAttrs:M,components:D,directives:P,filters:R}=t;if(d&&function(e,t){v(e)&&(e=Wo(e));for(const n in e){const r=e[n];let i;i=k(r)?"default"in r?gr(r.from||n,r.default,!0):gr(r.from||n):gr(r),tn(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e}):t[n]=i}}(d,r,null),s)for(const e in s){const t=s[e];C(t)&&(r[e]=t.bind(n))}if(i){0;const t=i.call(n,n);0,k(t)&&(e.data=Wt(t))}if(Ro=!0,o)for(const e in o){const t=o[e],i=C(t)?t.bind(n,n):C(t.get)?t.get.bind(n,n):c;0;const s=!C(t)&&C(t.set)?t.set.bind(n):c,a=Ja({get:i,set:s});Object.defineProperty(r,e,{enumerable:!0,configurable:!0,get:()=>a.value,set:e=>a.value=e})}if(a)for(const e in a)Lo(a[e],r,n,e);if(l){const e=C(l)?l.call(n):l;Reflect.ownKeys(e).forEach(t=>{fr(t,e[t])})}function I(e,t){v(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(u&&No(u,e,"c"),I(Hi,p),I(qi,h),I(Ui,f),I(Yi,g),I(Li,m),I($i,A),I(eo,B),I(Zi,O),I(Ki,_),I(Xi,y),I(Ji,w),I(Gi,E),v(T))if(T.length){const t=e.exposed||(e.exposed={});T.forEach(e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t,enumerable:!0})})}else e.exposed||(e.exposed={});S&&e.render===c&&(e.render=S),null!=M&&(e.inheritAttrs=M),D&&(e.components=D),P&&(e.directives=P),E&&ti(e)}function No(e,t,n){Ln(v(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function Lo(e,t,n,r){let i=r.includes(".")?Sr(n,r):()=>n[r];if(x(e)){const n=t[e];C(n)&&xr(i,n)}else if(C(e))xr(i,e.bind(n));else if(k(e))if(v(e))e.forEach(e=>Lo(e,t,n,r));else{const r=C(e.handler)?e.handler.bind(n):t[e.handler];C(r)&&xr(i,r,e)}else 0}function $o(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:i,optionsCache:o,config:{optionMergeStrategies:s}}=e.appContext,a=o.get(t);let l;return a?l=a:i.length||n||r?(l={},i.length&&i.forEach(e=>Fo(l,e,s,!0)),Fo(l,t,s)):l=t,k(t)&&o.set(t,l),l}function Fo(e,t,n,r=!1){const{mixins:i,extends:o}=t;o&&Fo(e,o,n,!0),i&&i.forEach(t=>Fo(e,t,n,!0));for(const i in t)if(r&&"expose"===i);else{const r=jo[i]||n&&n[i];e[i]=r?r(e[i],t[i]):t[i]}return e}const jo={data:Vo,props:Ho,emits:Ho,methods:Qo,computed:Qo,beforeCreate:zo,created:zo,beforeMount:zo,mounted:zo,beforeUpdate:zo,updated:zo,beforeDestroy:zo,beforeUnmount:zo,destroyed:zo,unmounted:zo,activated:zo,deactivated:zo,errorCaptured:zo,serverPrefetch:zo,components:Qo,directives:Qo,watch:function(e,t){if(!e)return t;if(!t)return e;const n=h(Object.create(null),e);for(const r in t)n[r]=zo(e[r],t[r]);return n},provide:Vo,inject:function(e,t){return Qo(Wo(e),Wo(t))}};function Vo(e,t){return t?e?function(){return h(C(e)?e.call(this,this):e,C(t)?t.call(this,this):t)}:t:e}function Wo(e){if(v(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function zo(e,t){return e?[...new Set([].concat(e,t))]:t}function Qo(e,t){return e?h(Object.create(null),e,t):t}function Ho(e,t){return e?v(e)&&v(t)?[...new Set([...e,...t])]:h(Object.create(null),Eo(e),Eo(null!=t?t:{})):t}function qo(){return{app:null,config:{isNativeTag:d,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Uo=0;function Yo(e,t){return function(n,r=null){C(n)||(n=h({},n)),null==r||k(r)||(r=null);const i=qo(),o=new WeakSet,s=[];let a=!1;const l=i.app={_uid:Uo++,_component:n,_props:r,_container:null,_context:i,_instance:null,version:tl,get config(){return i.config},set config(e){0},use:(e,...t)=>(o.has(e)||(e&&C(e.install)?(o.add(e),e.install(l,...t)):C(e)&&(o.add(e),e(l,...t))),l),mixin:e=>(i.mixins.includes(e)||i.mixins.push(e),l),component:(e,t)=>t?(i.components[e]=t,l):i.components[e],directive:(e,t)=>t?(i.directives[e]=t,l):i.directives[e],mount(o,s,c){if(!a){0;const d=l._ceVNode||pa(n,r);return d.appContext=i,!0===c?c="svg":!1===c&&(c=void 0),s&&t?t(d,o):e(d,o,c),a=!0,l._container=o,o.__vue_app__=l,Ha(d.component)}},onUnmount(e){s.push(e)},unmount(){a&&(Ln(s,l._instance,16),e(null,l._container),delete l._container.__vue_app__)},provide:(e,t)=>(i.provides[e]=t,l),runWithContext(e){const t=Xo;Xo=l;try{return e()}finally{Xo=t}}};return l}}let Xo=null;function Jo(e,t,n=a){const r=Ba();const i=R(t);const o=N(t),s=Go(e,i),l=hn((s,l)=>{let c,d,u=a;return Cr(()=>{const t=e[i];F(c,t)&&(c=t,l())}),{get:()=>(s(),n.get?n.get(c):c),set(e){const s=n.set?n.set(e):e;if(!(F(s,c)||u!==a&&F(e,u)))return;const p=r.vnode.props,h=!!(p&&(t in p||i in p||o in p)&&(`onUpdate:${t}`in p||`onUpdate:${i}`in p||`onUpdate:${o}`in p));h||(c=e,l()),r.emit(`update:${t}`,s),F(e,u)&&(F(e,s)&&!F(s,d)||h&&u!==a&&!F(s,c))&&l(),u=e,d=s}}});return l[Symbol.iterator]=()=>{let e=0;return{next:()=>e<2?{value:e++?s||a:l,done:!1}:{done:!0}}},l}const Go=(e,t)=>"modelValue"===t||"model-value"===t?e.modelModifiers:e[`${t}Modifiers`]||e[`${R(t)}Modifiers`]||e[`${N(t)}Modifiers`];function Ko(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||a;let i=n;const o=t.startsWith("update:"),s=o&&Go(r,t.slice(7));let l;s&&(s.trim&&(i=n.map(e=>x(e)?e.trim():e)),s.number&&(i=i.map(W)));let c=r[l=$(t)]||r[l=$(R(t))];!c&&o&&(c=r[l=$(N(t))]),c&&Ln(c,e,6,i);const d=r[l+"Once"];if(d){if(e.emitted){if(e.emitted[l])return}else e.emitted={};e.emitted[l]=!0,Ln(d,e,6,i)}}const Zo=new WeakMap;function es(e,t,n=!1){const r=n?Zo:t.emitsCache,i=r.get(e);if(void 0!==i)return i;const o=e.emits;let s={},a=!1;if(!C(e)){const r=e=>{const n=es(e,t,!0);n&&(a=!0,h(s,n))};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}return o||a?(v(o)?o.forEach(e=>s[e]=null):h(s,o),k(e)&&r.set(e,s),s):(k(e)&&r.set(e,null),null)}function ts(e,t){return!(!e||!u(t))&&(t="Once"===(t=t.slice(2))?t:t.replace(/Once$/,""),m(e,t[0].toLowerCase()+t.slice(1))||m(e,N(t))||m(e,t))}function ns(e){const{type:t,vnode:n,proxy:r,withProxy:i,propsOptions:[o],slots:s,attrs:a,emit:l,render:c,renderCache:d,props:u,data:h,setupState:f,ctx:g,inheritAttrs:m}=e,v=ar(e);let A,b;try{if(4&n.shapeFlag){const e=i||r,t=e;A=ba(c.call(t,e,d,u,f,h,g)),b=a}else{const e=t;0,A=ba(e.length>1?e(u,{attrs:a,slots:s,emit:l}):e(u,null)),b=t.props?a:is(a)}}catch(t){Js.length=0,$n(t,e,1),A=pa(Ys)}let y=A;if(b&&!1!==m){const e=Object.keys(b),{shapeFlag:t}=y;e.length&&7&t&&(o&&e.some(p)&&(b=os(b,o)),y=ga(y,b,!1,!0))}if(n.dirs&&(y=ga(y,null,!1,!0),y.dirs=y.dirs?y.dirs.concat(n.dirs):n.dirs),n.transition){0,Jr(Br(y.type)&&Xr(y)||y,n.transition)}return A=y,ar(v),A}function rs(e,t=!0){let n;for(let t=0;t<e.length;t++){const r=e[t];if(!sa(r))return;if(r.type!==Ys||"v-if"===r.children){if(n)return;n=r}}return n}const is=e=>{let t;for(const n in e)("class"===n||"style"===n||u(n))&&((t||(t={}))[n]=e[n]);return t},os=(e,t)=>{const n={};for(const r in e)p(r)&&r.slice(9)in t||(n[r]=e[r]);return n};function ss(e,t,n){const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let i=0;i<r.length;i++){const o=r[i];if(!m(e,o)||as(t,e,o)&&!ts(n,o))return!0}return!1}function as(e,t,n){const r=e[n],i=t[n];return"style"===n&&k(r)&&k(i)?!ve(r,i):r!==i}function ls({vnode:e,parent:t,suspense:n},r){for(;t;){const n=t.subTree;if(n.suspense&&n.suspense.activeBranch===e&&(n.suspense.vnode.el=n.el=r,e=n),n!==e)break;(e=t.vnode).el=r,t=t.parent}n&&n.activeBranch===e&&(n.vnode.el=r)}const cs={},ds=()=>Object.create(cs),us=e=>Object.getPrototypeOf(e)===cs;function ps(e,t,n,r){const[i,o]=e.propsOptions;let s,l=!1;if(t)for(let a in t){if(T(a))continue;const c=t[a];let d;i&&m(i,d=R(a))?o&&o.includes(d)?(s||(s={}))[d]=c:n[d]=c:ts(e.emitsOptions,a)||a in r&&c===r[a]||(r[a]=c,l=!0)}if(o){const t=Gt(n),r=s||a;for(let s=0;s<o.length;s++){const a=o[s];n[a]=hs(i,t,a,r[a],e,!m(r,a))}}return l}function hs(e,t,n,r,i,o){const s=e[n];if(null!=s){const e=m(s,"default");if(e&&void 0===r){const e=s.default;if(s.type!==Function&&!s.skipFactory&&C(e)){const{propsDefaults:o}=i;if(n in o)r=o[n];else{const s=Ma(i);r=o[n]=e.call(null,t),s()}}else r=e;i.ce&&i.ce._setProp(n,r)}s[0]&&(o&&!e?r=!1:!s[1]||""!==r&&r!==N(n)||(r=!0))}return r}const fs=new WeakMap;function gs(e,t,n=!1){const r=n?fs:t.propsCache,i=r.get(e);if(i)return i;const o=e.props,s={},c=[];let d=!1;if(!C(e)){const r=e=>{d=!0;const[n,r]=gs(e,t,!0);h(s,n),r&&c.push(...r)};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}if(!o&&!d)return k(e)&&r.set(e,l),l;if(v(o))for(let e=0;e<o.length;e++){0;const t=R(o[e]);ms(t)&&(s[t]=a)}else if(o){0;for(const e in o){const t=R(e);if(ms(t)){const n=o[e],r=s[t]=v(n)||C(n)?{type:n}:h({},n),i=r.type;let a=!1,l=!0;if(v(i))for(let e=0;e<i.length;++e){const t=i[e],n=C(t)&&t.name;if("Boolean"===n){a=!0;break}"String"===n&&(l=!1)}else a=C(i)&&"Boolean"===i.name;r[0]=a,r[1]=l,(a||m(r,"default"))&&c.push(t)}}}const u=[s,c];return k(e)&&r.set(e,u),u}function ms(e){return"$"!==e[0]&&!T(e)}const vs=e=>"_"===e||"_ctx"===e||"$stable"===e,As=e=>v(e)?e.map(ba):[ba(e)],bs=(e,t,n)=>{if(t._n)return t;const r=ur((...e)=>As(t(...e)),n);return r._c=!1,r},ys=(e,t,n)=>{const r=e._ctx;for(const n in e){if(vs(n))continue;const i=e[n];if(C(i))t[n]=bs(0,i,r);else if(null!=i){0;const e=As(i);t[n]=()=>e}}},Cs=(e,t)=>{const n=As(t);e.slots.default=()=>n},xs=(e,t,n)=>{for(const r in t)!n&&vs(r)||(e[r]=t[r])};const ws=Qs;function ks(e){return Os(e)}function Ss(e){return Os(e,ui)}function Os(e,t){"boolean"!=typeof __VUE_PROD_HYDRATION_MISMATCH_DETAILS__&&(H().__VUE_PROD_HYDRATION_MISMATCH_DETAILS__=!1);H().__VUE__=!0;const{insert:n,remove:r,patchProp:i,createElement:o,createText:s,createComment:d,setText:u,setElementText:p,parentNode:h,nextSibling:f,setScopeId:g=c,insertStaticContent:v}=e,A=(e,t,n,r=null,i=null,o=null,s=void 0,a=null,c=!!t.dynamicChildren)=>{if(e===t)return;e&&!aa(e,t)&&(r=J(e),Q(e,i,o,!0),e=null),-2===t.patchFlag&&(c=!1,t.dynamicChildren=null),t.dynamicChildren&&e&&e.dynamicChildren&&e.dynamicChildren.hasOnce&&(t.dynamicChildren===l&&(t.dynamicChildren=[]),t.dynamicChildren.hasOnce=!0);const{type:d,ref:u,shapeFlag:p}=t;switch(d){case Us:b(e,t,n,r);break;case Ys:y(e,t,n,r);break;case Xs:null==e&&C(t,n,r,s);break;case qs:M(e,t,n,r,i,o,s,a,c);break;default:1&p?w(e,t,n,r,i,o,s,a,c):6&p?D(e,t,n,r,i,o,s,a,c):(64&p||128&p)&&d.process(e,t,n,r,i,o,s,a,c,K)}null!=u&&i?oi(u,e&&e.ref,o,t||e,!t):null==u&&e&&null!=e.ref&&oi(e.ref,null,o,e,!0)},b=(e,t,r,i)=>{if(null==e)n(t.el=s(t.children),r,i);else{const n=t.el=e.el;t.children!==e.children&&u(n,t.children)}},y=(e,t,r,i)=>{null==e?n(t.el=d(t.children||""),r,i):t.el=e.el},C=(e,t,n,r)=>{[e.el,e.anchor]=v(e.children,t,n,r,e.el,e.anchor)},x=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=f(e),r(e),e=n;r(t)},w=(e,t,n,r,i,o,s,a,l)=>{if("svg"===t.type?s="svg":"math"===t.type&&(s="mathml"),null==e)k(t,n,r,i,o,s,a,l);else{const n=e.el&&e.el._isVueCE?e.el:null;try{n&&n._beginPatch(),_(e,t,i,o,s,a,l)}finally{n&&n._endPatch()}}},k=(e,t,r,s,a,l,c,d)=>{let u,h;const{props:f,shapeFlag:g,transition:m,dirs:v}=e;if(u=e.el=o(e.type,l,f&&f.is,f),8&g?p(u,e.children):16&g&&O(e.children,u,null,s,a,_s(e,l),c,d),v&&hr(e,null,s,"created"),S(u,e,e.scopeId,c,s),f){for(const e in f)"value"===e||T(e)||i(u,e,null,f[e],l,s);"value"in f&&i(u,"value",null,f.value,l),(h=f.onVnodeBeforeMount)&&wa(h,s,e)}v&&hr(e,null,s,"beforeMount");const A=Es(a,m);if(A?m.beforeEnter(u):m&&!m.persisted&&(u[Ns]=!0),n(u,t,r),(h=f&&f.onVnodeMounted)||A||v){ws(()=>{try{h&&wa(h,s,e),A&&m.enter(u),v&&hr(e,null,s,"mounted")}finally{0}},a)}},S=(e,t,n,r,i)=>{if(n&&g(e,n),r)for(let t=0;t<r.length;t++)g(e,r[t]);if(i){let n=i.subTree;if(t===n||Rs(n.type)&&(n.ssContent===t||n.ssFallback===t)){const t=i.vnode;S(e,t,t.scopeId,t.slotScopeIds,i.parent)}}},O=(e,t,n,r,i,o,s,a,l=0)=>{for(let c=l;c<e.length;c++){const l=e[c]=a?ya(e[c]):ba(e[c]);A(null,l,t,n,r,i,o,s,a)}},_=(e,t,n,r,o,s,l)=>{const c=t.el=e.el;let{patchFlag:d,dynamicChildren:u,dirs:h}=t;d|=16&e.patchFlag;const f=e.props||a,g=t.props||a;let m;if(n&&Bs(n,!1),(m=g.onVnodeBeforeUpdate)&&wa(m,n,t,e),h&&hr(t,e,n,"beforeUpdate"),n&&Bs(n,!0),!u||e.dynamicChildren&&e.dynamicChildren.length===u.length||(d=0,l=!1,u=null),(f.innerHTML&&null==g.innerHTML||f.textContent&&null==g.textContent)&&p(c,""),u?B(e.dynamicChildren,u,c,n,r,_s(t,o),s):l||F(e,t,c,null,n,r,_s(t,o),s,!1),d>0){if(16&d)E(c,f,g,n,o);else if(2&d&&f.class!==g.class&&i(c,"class",null,g.class,o),4&d&&i(c,"style",f.style,g.style,o),8&d){const e=t.dynamicProps;for(let t=0;t<e.length;t++){const r=e[t],s=f[r],a=g[r];a===s&&"value"!==r||i(c,r,s,a,o,n)}}1&d&&e.children!==t.children&&p(c,t.children)}else l||null!=u||E(c,f,g,n,o);((m=g.onVnodeUpdated)||h)&&ws(()=>{m&&wa(m,n,t,e),h&&hr(t,e,n,"updated")},r)},B=(e,t,n,r,i,o,s)=>{for(let a=0;a<t.length;a++){const l=e[a],c=t[a],d=l.el||Ps(l),u=d&&(l.type===qs||!aa(l,c)||198&l.shapeFlag)?h(d):n;A(l,c,u,null,r,i,o,s,!0)}},E=(e,t,n,r,o)=>{if(t!==n){if(t!==a)for(const s in t)T(s)||s in n||i(e,s,t[s],null,o,r);for(const s in n){if(T(s))continue;const a=n[s],l=t[s];a!==l&&"value"!==s&&i(e,s,l,a,o,r)}"value"in n&&i(e,"value",t.value,n.value,o)}},M=(e,t,r,i,o,a,l,c,d)=>{const u=t.el=e?e.el:s(""),p=t.anchor=e?e.anchor:s("");let{patchFlag:h,dynamicChildren:f,slotScopeIds:g}=t;g&&(c=c?c.concat(g):g),null==e?(n(u,r,i),n(p,r,i),O(t.children||[],r,p,o,a,l,c,d)):h>0&&64&h&&f&&e.dynamicChildren&&e.dynamicChildren.length===f.length?(B(e.dynamicChildren,f,r,o,a,l,c),(null!=t.key||o&&t===o.subTree)&&Ts(e,t,!0)):F(e,t,r,p,o,a,l,c,d)},D=(e,t,n,r,i,o,s,a,l)=>{t.slotScopeIds=a,null==e?512&t.shapeFlag?i.ctx.activate(t,n,r,s,l):P(t,n,r,i,o,s,l):I(e,t,l)},P=(e,t,n,r,i,o,s)=>{const a=e.component=Oa(e,r,i);if(Pi(e)&&(a.ctx.renderer=K),La(a,!1,s),a.asyncDep){if(i&&i.registerDep(a,L,s,o),!e.el){const r=a.subTree=pa(Ys);y(null,r,t,n),e.placeholder=r.el}}else L(a,e,t,n,i,o,s)},I=(e,t,n)=>{const r=t.component=e.component;if(function(e,t,n){const{props:r,children:i,component:o}=e,{props:s,children:a,patchFlag:l}=t,c=o.emitsOptions;if(t.dirs||t.transition)return!0;if(!(n&&l>=0))return!(!i&&!a||a&&a.$stable)||r!==s&&(r?!s||ss(r,s,c):!!s);if(1024&l)return!0;if(16&l)return r?ss(r,s,c):!!s;if(8&l){const e=t.dynamicProps;for(let t=0;t<e.length;t++){const n=e[t];if(as(s,r,n)&&!ts(c,n))return!0}}return!1}(e,t,n)){if(r.asyncDep&&!r.asyncResolved)return t.el=e.el,t.placeholder=e.placeholder,void $(r,t,n);r.next=t,r.update()}else t.el=e.el,t.placeholder=e.placeholder,r.vnode=t},L=(e,t,n,r,i,o,s)=>{e.scope.on();const a=e.effect=new De(()=>{if(e.isMounted){let{next:t,bu:n,u:r,parent:a,vnode:c}=e;{const n=Ms(e);if(n)return t&&(t.el=c.el,$(e,t,s)),void n.asyncDep.then(()=>{const t=()=>{8&e.job.flags||(i&&i.pendingBranch?ws(t,i):l())};t.flags=48,ws(t,i)})}let d,u=t;0,Bs(e,!1),t?(t.el=c.el,$(e,t,s)):t=c,n&&j(n),(d=t.props&&t.props.onVnodeBeforeUpdate)&&wa(d,a,t,c),Bs(e,!0);const p=ns(e);0;const f=e.subTree;e.subTree=p,A(f,p,h(f.el||Ps(f)),J(f),e,i,o),t.el=p.el,null===u&&ls(e,p.el),r&&ws(r,i),(d=t.props&&t.props.onVnodeUpdated)&&ws(()=>wa(d,a,t,c),i)}else{let s;const{el:a,props:l}=t,{bm:c,m:d,parent:u,root:p,type:h}=e,f=Ti(t);if(Bs(e,!1),c&&j(c),!f&&(s=l&&l.onVnodeBeforeMount)&&wa(s,u,t),Bs(e,!0),a&&ee){const t=()=>{e.subTree=ns(e),ee(a,e.subTree,e,i,null)};f&&h.__asyncHydrate?h.__asyncHydrate(a,e,t):t()}else{p.ce&&p.ce._hasShadowRoot()&&p.ce._injectChildStyle(h,e.parent?e.parent.type:void 0);const s=e.subTree=ns(e);0,A(null,s,n,r,e,i,o),t.el=s.el}if(d&&ws(d,i),!f&&(s=l&&l.onVnodeMounted)){const e=t;ws(()=>wa(s,u,e),i)}(256&t.shapeFlag||u&&Ti(u.vnode)&&256&u.vnode.shapeFlag)&&e.a&&ws(e.a,i),e.isMounted=!0,t=n=r=null}});e.scope.off();const l=e.update=a.run.bind(a),c=e.job=a.runIfDirty.bind(a);c.i=e,c.id=e.uid,a.scheduler=()=>Un(c),Bs(e,!0),l()},$=(e,t,n)=>{t.component=e;const r=e.vnode.props;e.vnode=t,e.next=null,function(e,t,n,r){const{props:i,attrs:o,vnode:{patchFlag:s}}=e,a=Gt(i),[l]=e.propsOptions;let c=!1;if(!(r||s>0)||16&s){let r;ps(e,t,i,o)&&(c=!0);for(const o in a)t&&(m(t,o)||(r=N(o))!==o&&m(t,r))||(l?!n||void 0===n[o]&&void 0===n[r]||(i[o]=hs(l,a,o,void 0,e,!0)):delete i[o]);if(o!==a)for(const e in o)t&&m(t,e)||(delete o[e],c=!0)}else if(8&s){const n=e.vnode.dynamicProps;for(let r=0;r<n.length;r++){let s=n[r];if(ts(e.emitsOptions,s))continue;const d=t[s];if(l)if(m(o,s))d!==o[s]&&(o[s]=d,c=!0);else{const t=R(s);i[t]=hs(l,a,t,d,e,!1)}else d!==o[s]&&(o[s]=d,c=!0)}}c&&at(e.attrs,"set","")}(e,t.props,r,n),((e,t,n)=>{const{vnode:r,slots:i}=e;let o=!0,s=a;if(32&r.shapeFlag){const e=t._;e?n&&1===e?o=!1:xs(i,t,n):(o=!t.$stable,ys(t,i)),s=t}else t&&(Cs(e,t),s={default:1});if(o)for(const e in i)vs(e)||null!=s[e]||delete i[e]})(e,t.children,n),Xe(),Jn(e),Je()},F=(e,t,n,r,i,o,s,a,l=!1)=>{const c=e&&e.children,d=e?e.shapeFlag:0,u=t.children,{patchFlag:h,shapeFlag:f}=t;if(h>0){if(128&h)return void W(c,u,n,r,i,o,s,a,l);if(256&h)return void V(c,u,n,r,i,o,s,a,l)}8&f?(16&d&&X(c,i,o),u!==c&&p(n,u)):16&d?16&f?W(c,u,n,r,i,o,s,a,l):X(c,i,o,!0):(8&d&&p(n,""),16&f&&O(u,n,r,i,o,s,a,l))},V=(e,t,n,r,i,o,s,a,c)=>{t=t||l;const d=(e=e||l).length,u=t.length,p=Math.min(d,u);let h;for(h=0;h<p;h++){const r=t[h]=c?ya(t[h]):ba(t[h]);A(e[h],r,n,null,i,o,s,a,c)}d>u?X(e,i,o,!0,!1,p):O(t,n,r,i,o,s,a,c,p)},W=(e,t,n,r,i,o,s,a,c)=>{let d=0;const u=t.length;let p=e.length-1,h=u-1;for(;d<=p&&d<=h;){const r=e[d],l=t[d]=c?ya(t[d]):ba(t[d]);if(!aa(r,l))break;A(r,l,n,null,i,o,s,a,c),d++}for(;d<=p&&d<=h;){const r=e[p],l=t[h]=c?ya(t[h]):ba(t[h]);if(!aa(r,l))break;A(r,l,n,null,i,o,s,a,c),p--,h--}if(d>p){if(d<=h){const e=h+1,l=e<u?t[e].el:r;for(;d<=h;)A(null,t[d]=c?ya(t[d]):ba(t[d]),n,l,i,o,s,a,c),d++}}else if(d>h)for(;d<=p;)Q(e[d],i,o,!0),d++;else{const f=d,g=d,m=new Map;for(d=g;d<=h;d++){const e=t[d]=c?ya(t[d]):ba(t[d]);null!=e.key&&m.set(e.key,d)}let v,b=0;const y=h-g+1;let C=!1,x=0;const w=new Array(y);for(d=0;d<y;d++)w[d]=0;for(d=f;d<=p;d++){const r=e[d];if(b>=y){Q(r,i,o,!0);continue}let l;if(null!=r.key)l=m.get(r.key);else for(v=g;v<=h;v++)if(0===w[v-g]&&aa(r,t[v])){l=v;break}void 0===l?Q(r,i,o,!0):(w[l-g]=d+1,l>=x?x=l:C=!0,A(r,t[l],n,null,i,o,s,a,c),b++)}const k=C?function(e){const t=e.slice(),n=[0];let r,i,o,s,a;const l=e.length;for(r=0;r<l;r++){const l=e[r];if(0!==l){if(i=n[n.length-1],e[i]<l){t[r]=i,n.push(r);continue}for(o=0,s=n.length-1;o<s;)a=o+s>>1,e[n[a]]<l?o=a+1:s=a;l<e[n[o]]&&(o>0&&(t[r]=n[o-1]),n[o]=r)}}o=n.length,s=n[o-1];for(;o-- >0;)n[o]=s,s=t[s];return n}(w):l;for(v=k.length-1,d=y-1;d>=0;d--){const e=g+d,l=t[e],p=t[e+1],h=e+1<u?p.el||Ps(p):r;0===w[d]?A(null,l,n,h,i,o,s,a,c):C&&(v<0||d!==k[v]?z(l,n,h,2):v--)}}},z=(e,t,i,o,s=null)=>{const{el:a,type:l,transition:c,children:d,shapeFlag:u}=e;if(6&u)return void z(e.component.subTree,t,i,o);if(128&u)return void e.suspense.move(t,i,o);if(64&u)return void l.move(e,t,i,K);if(l===qs){n(a,t,i);for(let e=0;e<d.length;e++)z(d[e],t,i,o);return void n(e.anchor,t,i)}if(l===Xs)return void(({el:e,anchor:t},r,i)=>{let o;for(;e&&e!==t;)o=f(e),n(e,r,i),e=o;n(t,r,i)})(e,t,i);if(2!==o&&1&u&&c)if(0===o)c.persisted&&!a[$r]?n(a,t,i):(c.beforeEnter(a),n(a,t,i),ws(()=>c.enter(a),s));else{const{leave:o,delayLeave:s,afterLeave:l}=c,d=()=>{e.ctx.isUnmounted?r(a):n(a,t,i)},u=()=>{const e=a._isLeaving||!!a[$r];a._isLeaving&&a[$r](!0),c.persisted&&!e?d():o(a,()=>{d(),l&&l()})};s?s(a,d,u):u()}else n(a,t,i)},Q=(e,t,n,r=!1,i=!1)=>{const{type:o,props:s,ref:a,children:l,dynamicChildren:c,shapeFlag:d,patchFlag:u,dirs:p,cacheIndex:h,memo:f}=e;if((-2===u||c&&c.hasOnce)&&(i=!1),null!=a&&(Xe(),oi(a,null,n,e,!0),Je()),null==h||e.ctx&&e.ctx!==t||(t.renderCache[h]=void 0),256&d&&t.ctx.deactivate(e))return;const g=1&d&&p,m=!Ti(e);let v;if(m&&(v=s&&s.onVnodeBeforeUnmount)&&wa(v,t,e),6&d)Y(e.component,n,r);else{if(128&d)return void e.suspense.unmount(n,r);g&&hr(e,null,t,"beforeUnmount"),64&d?e.type.remove(e,t,n,K,r):c&&!c.hasOnce&&(o!==qs||u>0&&64&u)?X(c,t,n,!1,!0):(o===qs&&384&u||!i&&16&d)&&X(l,t,n),r&&q(e)}const A=null!=f&&null==h;(m&&(v=s&&s.onVnodeUnmounted)||g||A)&&ws(()=>{v&&wa(v,t,e),g&&hr(e,null,t,"unmounted"),A&&(e.el=null)},n)},q=e=>{const{type:t,el:n,anchor:i,transition:o}=e,s=t===qs;if(s&&!o)return void U(n,i);if(t===Xs)return x(e),void(o&&!o.persisted&&o.afterLeave&&o.afterLeave());const a=s?Kr(e):e,l=()=>{s?h(n)&&U(n,i):r(n),o&&!o.persisted&&o.afterLeave&&o.afterLeave()};if(a&&1&a.shapeFlag&&o&&!o.persisted){const{leave:e,delayLeave:t}=o,n=a.el,r=()=>e(n,l);t?t(n,l,r):r()}else l()},U=(e,t)=>{let n;for(;e!==t;)n=f(e),r(e),e=n;r(t)},Y=(e,t,n)=>{const{bum:r,scope:i,job:o,subTree:s,um:a,m:l,a:c}=e;Ds(l),Ds(c),r&&j(r),i.stop(),o?(o.flags|=8,Q(s,e,t,n)):s&&(s.transition=e.vnode.transition,Q(s,e,t,n)),a&&ws(a,t);const d=()=>{e.isUnmounted=!0};d.flags=16,ws(d,t)},X=(e,t,n,r=!1,i=!1,o=0)=>{for(let s=o;s<e.length;s++)Q(e[s],t,n,r,i)},J=e=>{if(6&e.shapeFlag)return J(e.component.subTree);if(128&e.shapeFlag)return e.suspense.next();const t=f(e.anchor||e.el),n=t&&t[_r];return n?f(n):t},G=(e,t,n)=>{!function(e,t){if(Kn)return void e();const n=void 0===t?void 0:new Set(Vn);e(),Kn=!0;try{Jn(void 0,t),Gn(0,n,t)}finally{Kn=!1}}(()=>{null==e?t._vnode&&Q(t._vnode,null,null,!0):A(t._vnode||null,e,t,null,null,null,n),t._vnode=e},e&&t._vnode?void 0:e&&e.component?e.component.uid:Sa)},K={p:A,um:Q,m:z,r:q,mt:P,mc:O,pc:F,pbc:B,n:J,o:e};let Z,ee;return t&&([Z,ee]=t(K)),{render:G,hydrate:Z,createApp:Yo(G,Z)}}function _s({type:e,props:t},n){return"svg"===n&&"foreignObject"===e||"mathml"===n&&"annotation-xml"===e&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Bs({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Es(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Ts(e,t,n=!1){const r=e.children,i=t.children;if(v(r)&&v(i))for(let e=0;e<r.length;e++){const t=r[e];let o=i[e];1&o.shapeFlag&&!o.dynamicChildren&&((o.patchFlag<=0||32===o.patchFlag)&&(o=i[e]=ya(i[e]),o.el=t.el),n||-2===o.patchFlag||Ts(t,o)),o.type===Us&&(-1===o.patchFlag&&(o=i[e]=ya(o)),o.el=t.el),o.type!==Ys||o.el||(o.el=t.el)}}function Ms(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Ms(t)}function Ds(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function Ps(e){if(e.placeholder)return e.placeholder;const t=e.component;if(t)return Ps(t.subTree);const n=e.suspense;return n&&n.activeBranch?Ps(n.activeBranch):null}const Rs=e=>e.__isSuspense;let Is=0;const Ns=Symbol("_deferredEnter"),Ls={name:"Suspense",__isSuspense:!0,process(e,t,n,r,i,o,s,a,l,c){if(null==e)!function(e,t,n,r,i,o,s,a,l){const{p:c,o:{createElement:d}}=l,u=d("div"),p=e.suspense=Vs(e,i,r,t,u,n,o,s,a,l);c(null,p.pendingBranch=e.ssContent,u,null,r,p,o,s),p.deps>0?($s(e,"onPending"),$s(e,"onFallback"),c(null,e.ssFallback,t,n,r,null,o,s),Hs(p,e.ssFallback)):p.resolve(!1,!0)}(t,n,r,i,o,s,a,l,c);else{const d=e.suspense;if(o&&o.deps>0&&!o.isHydrating){const n=d.parentComponent;if(!!n&&n.suspense===o&&n.suspenseId!==o.pendingId?o.pendingBranch&&!aa(t.ssContent,d.pendingBranch||d.activeBranch):!d.isInFallback)return t.suspense=d,d.vnode=t,void(t.el=e.el)}!function(e,t,n,r,i,o,s,a,{p:l,um:c,o:{createElement:d}}){const u=t.suspense=e.suspense;u.vnode=t,t.el=e.el;const p=t.ssContent,h=t.ssFallback,{activeBranch:f,pendingBranch:g,isInFallback:m,isHydrating:v}=u;if(g)u.pendingBranch=p,aa(g,p)?(u.deps++,l(g,p,v?n:u.hiddenContainer,null,i,u,o,s,a),u.deps--,u.deps<=0?u.resolve():m&&(v||u.isFallbackMountPending||(l(f,h,n,r,i,null,o,s,a),Hs(u,h)))):(u.pendingId=Is++,v?(u.isHydrating=!1,u.activeBranch=g):c(g,i,u),u.deps=0,zs(u),u.hiddenContainer=d("div"),m?(l(null,p,u.hiddenContainer,null,i,u,o,s,a),u.deps<=0?u.resolve():u.isFallbackMountPending||(l(f,h,n,r,i,null,o,s,a),Hs(u,h))):f&&aa(f,p)?(l(f,p,n,r,i,u,o,s,a),u.resolve(!0)):(l(null,p,u.hiddenContainer,null,i,u,o,s,a),u.deps<=0&&u.resolve()));else if(f&&aa(f,p))l(f,p,n,r,i,u,o,s,a),Hs(u,p);else if($s(t,"onPending"),u.pendingBranch=p,u.pendingId=Is++,l(null,p,u.hiddenContainer,null,i,u,o,s,a),u.deps<=0)u.resolve();else{const{timeout:e}=u;e>0?u.timeoutTimer=setTimeout(()=>{u.timeoutTimer=void 0,u.fallback(u.vnode.ssFallback)},e):0===e&&u.fallback(h)}}(e,t,n,r,i,s,a,l,c)}},hydrate:function(e,t,n,r,i,o,s,a,l){const c=t.suspense=Vs(t,r,n,e.parentNode,document.createElement("div"),null,i,o,s,a,!0),d=l(e,c.pendingBranch=t.ssContent,n,c,o,s);0===c.deps&&c.resolve(!1,!0);return d},normalize:function(e){const{shapeFlag:t,children:n}=e,r=32&t;e.ssContent=Ws(r?n.default:n),e.ssFallback=r?Ws(n.fallback):pa(Ys)}};function $s(e,t){const n=e.props&&e.props[t];C(n)&&n()}function Fs(e){const t=[];js(e,t,!0),t.length&&Xn(t)}function js(e,t,n){const{el:r,transition:i,children:o,shapeFlag:s}=e;if(6&s)js(e.component.subTree,t,n);else if(!(192&s)&&(1&s&&(!n&&r&&r[Ns]&&(r[Ns]=void 0,i&&!i.persisted&&(i.beforeEnter(r),t.push(()=>i.enter(r)))),n=!1),16&s))for(let e=0;e<o.length;e++)js(o[e],t,n)}function Vs(e,t,n,r,i,o,s,a,l,c,d=!1){const{p:u,m:p,um:h,n:f,o:{parentNode:g,remove:m}}=c;let v;const A=function(e){const t=e.props&&e.props.suspensible;return null!=t&&!1!==t}(e);A&&t&&t.pendingBranch&&(v=t.pendingId,t.deps++);const b=e.props?z(e.props.timeout):void 0;const y=o,C={vnode:e,parent:t,parentComponent:n,namespace:s,container:r,hiddenContainer:i,deps:0,pendingId:Is++,timeout:"number"==typeof b?b:-1,timeoutTimer:void 0,activeBranch:null,isFallbackMountPending:!1,pendingBranch:null,isInFallback:!d,isHydrating:d,isUnmounted:!1,effects:[],resolve(e=!1,n=!1){const{vnode:r,activeBranch:i,pendingBranch:s,pendingId:a,effects:l,parentComponent:c,container:d,isInFallback:u}=C;let m=C.parent;for(;m&&!m.pendingBranch;)m=m.parent;let b=!1;if(C.isHydrating)C.isHydrating=!1;else if(!e){b=i&&s.transition&&"out-in"===s.transition.mode;let e=!1;b&&(i.transition.afterLeave=()=>{if(a===C.pendingId&&!C.isUnmounted){Fs(s),p(s,d,o!==y||e?o:f(i),0);let t=!1;if(m){let e,n=d;for(;e=g(n);)n=e;t=n===m.hiddenContainer}t||Xn(l),u&&r.ssFallback&&(r.ssFallback.el=null)}}),i&&!C.isFallbackMountPending&&(g(i.el||Ps(i))===d&&(o=f(i),e=!0),h(i,c,C,!0),!b&&u&&r.ssFallback&&ws(()=>r.ssFallback.el=null,C)),b||(Fs(s),p(s,d,o,0))}clearTimeout(C.timeoutTimer),C.timeoutTimer=void 0,C.isFallbackMountPending=!1,Hs(C,s),C.pendingBranch=null,C.isInFallback=!1;let x=0;for(let e=0;e<l.length;e++){const t=l[e];32&t.flags?Xn(t):l[x++]=t}if(l.length=x,m)for(let e=0;e<l.length;e++)m.effects.push(l[e]);else b||Xn(l);C.effects=[],A&&t&&t.pendingBranch&&v===t.pendingId&&(v=void 0,t.deps--,0!==t.deps||n||t.resolve()),$s(r,"onResolve")},fallback(e){if(C.isUnmounted||!C.pendingBranch)return;const{vnode:t,activeBranch:n,parentComponent:r,container:i,namespace:o}=C;$s(t,"onFallback");const s=f(n),c=()=>{if(C.isFallbackMountPending=!1,C.isUnmounted||!C.isInFallback)return;const e=C.vnode.ssFallback;u(null,e,i,s,r,null,o,a,l),Hs(C,e)},d=e.transition&&"out-in"===e.transition.mode;d&&(C.isFallbackMountPending=!0,n.transition.afterLeave=c),C.isInFallback=!0,h(n,r,null,!0),d||c()},move(e,t,n){C.activeBranch&&p(C.activeBranch,e,t,n),C.container=e},next:()=>C.activeBranch&&f(C.activeBranch),registerDep(e,t,n,r){const i=!!C.pendingBranch;i&&C.deps++;const o=e.vnode.el,s=i=>{e.asyncResolved=!0;const{vnode:s}=e;$a(e,i,!1),o&&(s.el=o);const a=!o&&e.subTree.el;t(e,s,g(o||e.subTree.el),o?null:f(e.subTree),C,r,n),a&&(s.placeholder=null,m(a)),ls(e,s.el)};e.asyncDep.catch(t=>(e.scope.active&&$n(t,e,0,!1,!0),()=>null)).then(t=>{if(e.isUnmounted||C.isUnmounted)return;const n=i&&C.pendingId===e.suspenseId;if(Da(),e.scope.active){if(!n&&C.pendingBranch){const n=()=>{e.isUnmounted||C.isUnmounted||!e.scope.active||(C.pendingBranch?Qs(n,C):s(t))};return n.flags=48,void Qs(n,C)}s(t),n&&0===--C.deps&&C.resolve()}else n&&0===--C.deps&&C.resolve()})},unmount(e,t){if(C.isUnmounted=!0,clearTimeout(C.timeoutTimer),C.timeoutTimer=void 0,void 0!==v){const e=C.parent,t=v;v=void 0,Xn(()=>{e.pendingId!==t||e.isUnmounted||0!==--e.deps||e.resolve()})}C.activeBranch&&h(C.activeBranch,n,e,t),C.pendingBranch&&(h(C.pendingBranch,n,C,t),zs(C))}};return C}function Ws(e){let t;if(C(e)){const n=ta&&e._c;n&&(e._d=!1,Ks()),e=e(),n&&(e._d=!0,t=Gs,Zs())}if(v(e)){const t=rs(e);0,e=t}return e=ba(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(t=>t!==e)),e}function zs(e){const{effects:t}=e;for(let e=0;e<t.length;e++){const n=t[e];16&n.flags&&Xn(n)}t.length=0}function Qs(e,t){t&&t.pendingBranch?v(e)?t.effects.push(...e):t.effects.push(e):Xn(e)}function Hs(e,t){e.activeBranch=t;const{vnode:n,parentComponent:r}=e;let i=t.el;for(;!i&&t.component;)i=(t=t.component.subTree).el;n.el=i,r&&r.subTree===n&&(r.vnode.el=i,ls(r,i))}const qs=Symbol.for("v-fgt"),Us=Symbol.for("v-txt"),Ys=Symbol.for("v-cmt"),Xs=Symbol.for("v-stc"),Js=[];let Gs=null;function Ks(e=!1){Js.push(Gs=e?null:[])}function Zs(){Js.pop(),Gs=Js[Js.length-1]||null}let ea,ta=1;function na(e,t=!1){ta+=e,e<0&&Gs&&t&&(Gs.hasOnce=!0)}function ra(e){return e.dynamicChildren=ta>0?Gs||l:null,Zs(),ta>0&&Gs&&Gs.push(e),e}function ia(e,t,n,r,i,o){return ra(ua(e,t,n,r,i,o,!0))}function oa(e,t,n,r,i){return ra(pa(e,t,n,r,i,!0))}function sa(e){return!!e&&!0===e.__v_isVNode}function aa(e,t){return e.type===t.type&&e.key===t.key}function la(e){ea=e}const ca=({key:e})=>null!=e?e:null,da=({ref:e,ref_key:t,ref_for:n})=>("number"==typeof e&&(e=""+e),null!=e?x(e)||tn(e)||C(e)?{i:or,r:e,k:t,f:!!n}:e:null);function ua(e,t=null,n=null,r=0,i=null,o=(e===qs?0:1),s=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&ca(t),ref:t&&da(t),scopeId:sr,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:or};return a?(Ca(l,n),128&o&&e.normalize(l)):n&&(l.shapeFlag|=x(n)?8:16),ta>0&&!s&&Gs&&(l.patchFlag>0||6&o)&&32!==l.patchFlag&&Gs.push(l),l}const pa=ha;function ha(e,t=null,n=null,r=0,i=null,o=!1){if(e&&e!==ro||(e=Ys),sa(e)){const r=ga(e,t,!0);return n&&Ca(r,n),ta>0&&!o&&Gs&&(6&r.shapeFlag?Gs[Gs.indexOf(e)]=r:Gs.push(r)),r.patchFlag=-2,r}if(Xa(e)&&(e=e.__vccOpts),t){t=fa(t);let{class:e,style:n}=t;e&&!x(e)&&(t.class=K(e)),k(n)&&(Jt(n)&&!v(n)&&(n=h({},n)),t.style=U(n))}return ua(e,t,n,r,i,x(e)?1:Rs(e)?128:Br(e)?64:k(e)?4:C(e)?2:0,o,!0)}function fa(e){return e?Jt(e)?h({},e):us(e)?h({},e[Wa]||e):e:null}function ga(e,t,n=!1,r=!1){const{props:i,ref:o,patchFlag:s,children:a,transition:l}=e,c=t?xa(i||{},t):i,d={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&ca(c),ref:t&&t.ref?n&&o?v(o)?o.concat(da(t)):[o,da(t)]:da(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==qs?-1===s?16:16|s:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&ga(e.ssContent),ssFallback:e.ssFallback&&ga(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce,cacheIndex:e.cacheIndex};return l&&r&&Jr(d,l.clone(d)),d}function ma(e=" ",t=0){return pa(Us,null,e,t)}function va(e,t){const n=pa(Xs,null,e);return n.staticCount=t,n}function Aa(e="",t=!1){return t?(Ks(),oa(Ys,null,e)):pa(Ys,null,e)}function ba(e){return null==e||"boolean"==typeof e?pa(Ys):v(e)?pa(qs,null,e.slice()):sa(e)?ya(e):pa(Us,null,String(e))}function ya(e){return null===e.el&&-1!==e.patchFlag||e.memo?e:ga(e)}function Ca(e,t){let n=0;const{shapeFlag:r}=e;if(null==t)t=null;else if(v(t))n=16;else if("object"==typeof t){if(65&r){const n=t.default;return void(n&&(n._c&&(n._d=!1),Ca(e,n()),n._c&&(n._d=!0)))}{n=32;const r=t._;r||us(t)?3===r&&or&&(1===or.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=or}}else if(C(t)){if(65&r)return void Ca(e,{default:t});t={default:t,_ctx:or},n=32}else t=String(t),64&r?(n=16,t=[ma(t)]):n=8;e.children=t,e.shapeFlag|=n}function xa(...e){const t={};for(let n=0;n<e.length;n++){const r=e[n];for(const e in r)if("class"===e)t.class!==r.class&&(t.class=K([t.class,r.class]));else if("style"===e)t.style=U([t.style,r.style]);else if(u(e)){const n=t[e],i=r[e];!i||n===i||v(n)&&n.includes(i)?null!=i||null!=n||p(e)||(t[e]=i):t[e]=n?[].concat(n,i):i}else""!==e&&(t[e]=r[e])}return t}function wa(e,t,n,r=null){Ln(e,t,7,[n,r])}const ka=qo();let Sa=0;function Oa(e,t,n){const r=e.type,i=(t?t.appContext:e.appContext)||ka,o={uid:Sa++,vnode:e,type:r,parent:t,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new _e(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(i.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:gs(r,i),emitsOptions:es(r,i),emit:null,emitted:null,propsDefaults:a,inheritAttrs:r.inheritAttrs,ctx:a,data:a,props:a,attrs:a,slots:a,refs:a,setupState:a,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return o.ctx={_:o},o.root=t?t.root:o,o.emit=Ko.bind(null,o),e.ce&&e.ce(o),o}let _a=null;const Ba=()=>_a||or;let Ea,Ta;{const e=H(),t=(t,n)=>{let r;return(r=e[t])||(r=e[t]=[]),r.push(n),e=>{r.length>1?r.forEach(t=>t(e)):r[0](e)}};Ea=t("__VUE_INSTANCE_SETTERS__",e=>_a=e),Ta=t("__VUE_SSR_SETTERS__",e=>Na=e)}const Ma=e=>{const t=_a;return Ea(e),e.scope.on(),()=>{e.scope.off(),Ea(t)}},Da=()=>{_a&&_a.scope.off(),Ea(null)};function Pa(e){return 4&e.vnode.shapeFlag}let Ra,Ia,Na=!1;function La(e,t=!1,n=!1){t&&Ta(t);const{props:r,children:i}=e.vnode,o=Pa(e);!function(e,t,n,r=!1){const i={},o=ds();e.propsDefaults=Object.create(null),ps(e,t,i,o);for(const t in e.propsOptions[0])t in i||(i[t]=void 0);n?e.props=r?i:zt(i):e.type.props?e.props=i:e.props=o,e.attrs=o}(e,r,o,t),((e,t,n)=>{const r=e.slots=ds();if(32&e.vnode.shapeFlag){const e=t._;e?(xs(r,t,n),n&&V(r,"_",e,!0)):ys(t,r)}else t&&Cs(e,t)})(e,i,n||t);const s=o?function(e,t){const n=e.type;0;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,vo),!1;const{setup:r}=n;if(r){Xe();const n=e.setupContext=r.length>1?Qa(e):null,i=Ma(e),o=Nn(r,e,0,[e.props,n]),s=S(o);if(Je(),i(),!s&&!e.sp||Ti(e)||ti(e),s){if(o.then(Da,Da),t)return o.then(n=>{Ta(!0);try{$a(e,n,t)}finally{Ta(!1)}}).catch(t=>{$n(t,e,0,void 0,!0),e.ssrRender=(e,t)=>t("\x3c!----\x3e")});e.asyncDep=o}else $a(e,o,t)}else Va(e,t)}(e,t):void 0;return t&&Ta(!1),s}function $a(e,t,n){C(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:k(t)&&(e.setupState=un(t)),Va(e,n)}function Fa(e){Ra=e,Ia=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,Ao))}}const ja=()=>!Ra;function Va(e,t,n){const r=e.type;if(!e.render){if(!t&&Ra&&!r.render){const t=r.template||$o(e).template;if(t){0;const{isCustomElement:n,compilerOptions:i}=e.appContext.config,{delimiters:o,compilerOptions:s}=r,a=h(h({isCustomElement:n,delimiters:o},i),s);r.render=Ra(t,a)}}e.render=r.render||c,Ia&&Ia(e)}{const t=Ma(e);Xe();try{Io(e)}finally{Je(),t()}}}const Wa=Symbol(),za={get:(e,t)=>(st(e,0,""),t===Wa?e:e[t])};function Qa(e){const t=t=>{e.exposed=t||{}};return{attrs:new Proxy(e.attrs,za),slots:e.slots,emit:e.emit,expose:t}}function Ha(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(un(Kt(e.exposed)),{get:(t,n)=>n in t?t[n]:n in go?go[n](e):void 0,has:(e,t)=>t in e||t in go})):e.proxy}const qa=/(?:^|[-_])\w/g;function Ua(e,t=!0){return C(e)?e.displayName||e.name:e.name||t&&e.__name}function Ya(e,t,n=!1){let r=Ua(t);if(!r&&t.__file){const e=t.__file.match(/([^/\\]+)\.\w+$/);e&&(r=e[1])}if(!r&&e){const n=e=>{for(const n in e)if(e[n]===t)return n};r=n(e.components)||e.parent&&n(e.parent.type.components)||n(e.appContext.components)}return r?r.replace(qa,e=>e.toUpperCase()).replace(/[-_]/g,""):n?"App":"Anonymous"}function Xa(e){return C(e)&&"__vccOpts"in e}const Ja=(e,t)=>{const n=function(e,t,n=!1){let r,i;return C(e)?r=e:(r=e.get,i=e.set),new bn(r,i,n)}(e,0,Na);return n};function Ga(e,t,n){try{na(-1);const r=arguments.length;return 2===r?k(t)&&!v(t)?sa(t)?pa(e,null,[t]):pa(e,t):pa(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):3===r&&sa(n)&&(n=[n]),pa(e,t,n))}finally{na(1)}}function Ka(){return void 0}function Za(e,t,n,r){const i=n[r];if(i&&el(i,e))return i;const o=t();return o.memo=e.slice(),o.cacheIndex=r,n[r]=o}function el(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let e=0;e<n.length;e++)if(F(n[e],t[e]))return!1;return ta>0&&Gs&&Gs.push(e),!0}const tl="3.5.46",nl=c,rl=In,il=nr,ol=function e(t,n){var r,i;if(nr=t,nr)nr.enabled=!0,rr.forEach(({event:e,args:t})=>nr.emit(e,...t)),rr=[];else if("undefined"!=typeof window&&window.HTMLElement&&!(null==(i=null==(r=window.navigator)?void 0:r.userAgent)?void 0:i.includes("jsdom"))){(n.__VUE_DEVTOOLS_HOOK_REPLAY__=n.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(t=>{e(t,n)}),setTimeout(()=>{nr||(n.__VUE_DEVTOOLS_HOOK_REPLAY__=null,ir=!0,rr=[])},3e3)}else ir=!0,rr=[]},sl={createComponentInstance:Oa,setupComponent:La,renderComponentRoot:ns,setCurrentRenderingInstance:ar,isVNode:sa,normalizeVNode:ba,getComponentPublicInstance:Ha,ensureValidVNode:po,pushWarningContext:function(e){Bn.push(e)},popWarningContext:function(){Bn.pop()}};let al;const ll="undefined"!=typeof window&&window.trustedTypes;if(ll)try{al=ll.createPolicy("vue",{createHTML:e=>e})}catch(GD){}const cl=al?e=>al.createHTML(e):e=>e,dl="undefined"!=typeof document?document:null,ul=dl&&dl.createElement("template"),pl={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const i="svg"===t?dl.createElementNS("http://www.w3.org/2000/svg",e):"mathml"===t?dl.createElementNS("http://www.w3.org/1998/Math/MathML",e):n?dl.createElement(e,{is:n}):dl.createElement(e);return"select"===e&&r&&null!=r.multiple&&i.setAttribute("multiple",r.multiple),i},createText:e=>dl.createTextNode(e),createComment:e=>dl.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>dl.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,i,o){const s=n?n.previousSibling:t.lastChild;if(i&&(i===o||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),i!==o&&(i=i.nextSibling););else{ul.innerHTML=cl("svg"===r?`<svg>${e}</svg>`:"mathml"===r?`<math>${e}</math>`:e);const i=ul.content;if("svg"===r||"mathml"===r){const e=i.firstChild;for(;e.firstChild;)i.appendChild(e.firstChild);i.removeChild(e)}t.insertBefore(i,n)}return[s?s.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},hl="transition",fl="animation",gl=Symbol("_vtc"),ml={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},vl=h({},Wr,ml),Al=e=>(e.displayName="Transition",e.props=vl,e),bl=Al((e,{slots:t})=>Ga(Hr,xl(e),t)),yl=(e,t=[])=>{v(e)?e.forEach(e=>e(...t)):e&&e(...t)},Cl=e=>!!e&&(v(e)?e.some(e=>e.length>1):e.length>1);function xl(e){const t={};for(const n in e)n in ml||(t[n]=e[n]);if(!1===e.css)return t;const{name:n="v",type:r,duration:i,enterFromClass:o=`${n}-enter-from`,enterActiveClass:s=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:l=o,appearActiveClass:c=s,appearToClass:d=a,leaveFromClass:u=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:f=`${n}-leave-to`}=e,g=function(e){if(null==e)return null;if(k(e))return[wl(e.enter),wl(e.leave)];{const t=wl(e);return[t,t]}}(i),m=g&&g[0],v=g&&g[1],{onBeforeEnter:A,onEnter:b,onEnterCancelled:y,onLeave:C,onLeaveCancelled:x,onBeforeAppear:w=A,onAppear:S=b,onAppearCancelled:O=y}=t,_=(e,t,n,r)=>{e._enterResolve=void 0,e._enterCancelled=r,Sl(e,t?d:a),Sl(e,t?c:s),n&&n()},B=(e,t)=>{e._leaveResolve=void 0,e._isLeaving=!1,Sl(e,u),Sl(e,f),Sl(e,p),t&&t()},E=e=>(t,n)=>{const i=e?S:b,s=()=>{t._enterResolve===s&&_(t,e,n)};t._enterResolve=s,yl(i,[t,s]),Ol(()=>{Sl(t,e?l:o),t._enterResolve===s&&(kl(t,e?d:a),Cl(i)||Bl(t,r,m,s))})};return h(t,{onBeforeEnter(e){yl(A,[e]),kl(e,o),kl(e,s)},onBeforeAppear(e){yl(w,[e]),kl(e,l),kl(e,c)},onEnter:E(!1),onAppear:E(!0),onLeave(e,t){e._isLeaving=!0;const n=()=>{e._leaveResolve===n&&B(e,t)};e._leaveResolve=n,kl(e,u),e._enterCancelled?(kl(e,p),Dl(e)):(Dl(e),kl(e,p)),Ol(()=>{e._leaveResolve===n&&(Sl(e,u),kl(e,f),Cl(C)||Bl(e,r,v,n))}),yl(C,[e,n])},onEnterCancelled(e){_(e,!1,void 0,!0),yl(y,[e])},onAppearCancelled(e){_(e,!0,void 0,!0),yl(O,[e])},onLeaveCancelled(e){B(e),yl(x,[e])}})}function wl(e){return z(e)}function kl(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.add(t)),(e[gl]||(e[gl]=new Set)).add(t)}function Sl(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.remove(t));const n=e[gl];n&&(n.delete(t),n.size||(e[gl]=void 0))}function Ol(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let _l=0;function Bl(e,t,n,r){const i=e._endId=++_l,o=()=>{i===e._endId&&r()};if(null!=n)return setTimeout(o,n);const{type:s,timeout:a,propCount:l}=El(e,t);if(!s)return r();const c=s+"end";let d=0;const u=()=>{e.removeEventListener(c,p),o()},p=t=>{t.target===e&&++d>=l&&u()};setTimeout(()=>{d<l&&u()},a+1),e.addEventListener(c,p)}function El(e,t){const n=window.getComputedStyle(e),r=e=>(n[e]||"").split(", "),i=r(`${hl}Delay`),o=r(`${hl}Duration`),s=Tl(i,o),a=r(`${fl}Delay`),l=r(`${fl}Duration`),c=Tl(a,l);let d=null,u=0,p=0;t===hl?s>0&&(d=hl,u=s,p=o.length):t===fl?c>0&&(d=fl,u=c,p=l.length):(u=Math.max(s,c),d=u>0?s>c?hl:fl:null,p=d?d===hl?o.length:l.length:0);return{type:d,timeout:u,propCount:p,hasTransform:d===hl&&/\b(?:transform|all)(?:,|$)/.test(r(`${hl}Property`).toString())}}function Tl(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((t,n)=>Ml(t)+Ml(e[n])))}function Ml(e){return"auto"===e?0:1e3*Number(e.slice(0,-1).replace(",","."))}function Dl(e){return(e?e.ownerDocument:document).body.offsetHeight}const Pl=Symbol("_vod"),Rl=Symbol("_vsh"),Il={name:"show",beforeMount(e,{value:t},{transition:n}){e[Pl]="none"===e.style.display?"":e.style.display,n&&t?n.beforeEnter(e):Nl(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),Nl(e,!0),r.enter(e)):r.leave(e,()=>{Nl(e,!1)}):Nl(e,t))},beforeUnmount(e,{value:t}){Nl(e,t)}};function Nl(e,t){e.style.display=t?e[Pl]:"none",e[Rl]=!t}const Ll=Symbol("");function $l(e){const t=Ba();if(!t)return;const n=(n=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(e=>Ql(e,n))},r={uid:String(t.uid),update:n};Te(()=>r.update=void 0),t.ut=(e,t)=>{e&&(e[Fl]=[t,r],Vl(e),jl(e)),n()};const i=()=>{const r=e(t.proxy);t.ce?Ql(t.ce,r):zl(t.subTree,r),n(r)};Ui(()=>{Xn(i)}),qi(()=>{xr(i,c,{flush:"post"});const e=new MutationObserver(i);e.observe(t.subTree.el.parentNode,{childList:!0}),Ji(()=>e.disconnect())})}const Fl=Symbol("");function jl(e,t){const[n,r]=e[Fl];let i;if(r.update)for(let o=e;o&&o!==n;o=o.nextSibling)1!==o.nodeType||t&&(!0!==t&&!t.has(o)||(o.getAttribute("data-v-owner")||r.uid)!==r.uid)||(o.setAttribute("data-v-owner",r.uid),i=r.update);return i}function Vl(e){const t=e.parentNode;if(t){let n=t[Fl];n||(n=t[Fl]=new Set,new MutationObserver(Wl).observe(t,{childList:!0})),n.add(e)}}function Wl(e,t){const n=e[0].target,r=n[Fl],i=new Set;for(const{addedNodes:t}of e)t.forEach(e=>i.add(e));const o=new Set;r.forEach(e=>{e.parentNode!==n?(r.delete(e),Vl(e),o.add(jl(e,!0))):i.size&&o.add(jl(e,i))}),o.forEach(e=>e&&e()),r.size||(t.disconnect(),n[Fl]=void 0)}function zl(e,t){if(128&e.shapeFlag){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{zl(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(1&e.shapeFlag&&e.el)Ql(e.el,t);else if(e.type===qs)e.children.forEach(e=>zl(e,t));else if(e.type===Xs){let{el:n,anchor:r}=e;for(;n&&(Ql(n,t),n!==r);)n=n.nextSibling}}function Ql(e,t){if(1===e.nodeType){const n=e.style;let r="";for(const e in t){const i=ke(t[e]);n.setProperty(`--${e}`,i),r+=`--${e}: ${i};`}n[Ll]=r}}const Hl=/(?:^|;)\s*display\s*:/;const ql=/\s*!important$/;function Ul(e,t,n){if(v(n))n.forEach(n=>Ul(e,t,n));else if(null==n&&(n=""),t.startsWith("--"))ql.test(n)?e.setProperty(t,n.replace(ql,""),"important"):e.setProperty(t,n);else{const r=function(e,t){const n=Xl[t];if(n)return n;let r=R(t);if("filter"!==r&&r in e)return Xl[t]=r;r=L(r);for(let n=0;n<Yl.length;n++){const i=Yl[n]+r;if(i in e)return Xl[t]=i}return t}(e,t);ql.test(n)?e.setProperty(N(r),n.replace(ql,""),"important"):e[r]=n}}const Yl=["Webkit","Moz","ms"],Xl={};function Jl(e,t,n,r){return"TEXTAREA"===e.tagName&&("width"===t||"height"===t)&&x(r)&&n===r}const Gl="http://www.w3.org/1999/xlink";function Kl(e,t,n,r,i,o=oe(t)){r&&t.startsWith("xlink:")?null==n?e.removeAttributeNS(Gl,t.slice(6,t.length)):e.setAttributeNS(Gl,t,n):null==n||o&&!ae(n)?e.removeAttribute(t):e.setAttribute(t,o?"":w(n)?String(n):n)}function Zl(e,t,n,r,i){if("innerHTML"===t||"textContent"===t)return void(null!=n&&(e[t]="innerHTML"===t?cl(n):n));const o=e.tagName;if("value"===t&&"PROGRESS"!==o&&!o.includes("-")){const r="OPTION"===o?e.getAttribute("value")||"":e.value,i=null==n?"checkbox"===e.type?"on":"":String(n);return r===i&&"_value"in e||(e.value=i),null==n&&e.removeAttribute(t),void(e._value=n)}let s=!1;if(""===n||null==n){const r=typeof e[t];"boolean"===r?n=ae(n):null==n&&"string"===r?(n="",s=!0):"number"===r&&(n=0,s=!0)}try{e[t]=n}catch(e){0}s&&e.removeAttribute(i||t)}function ec(e,t,n,r){e.addEventListener(t,n,r)}const tc=Symbol("_vei");function nc(e,t,n,r,i=null){const o=e[tc]||(e[tc]={}),s=o[t];if(r&&s)s.value=r;else{const[n,a]=function(e){let t,n;for(;(n=e.match(rc))&&!ic.test(e);)t||(t={}),e=e.slice(0,e.length-n[1].length),t[n[1].toLowerCase()]=!0;const r=":"===e[2]?e.slice(3):N(e.slice(2));return[r,t]}(t);if(r){const s=o[t]=function(e,t){const n=e=>{if(e._vts){if(e._vts<=n.attached)return}else e._vts=Date.now();const r=n.value;if(v(r)){const n=e.stopImmediatePropagation;e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0};const i=r.slice(),o=[e];for(let n=0;n<i.length&&!e._stopped;n++){const e=i[n];e&&Ln(e,t,5,o)}}else Ln(r,t,5,[e])};return n.value=e,n.attached=(()=>oc||(sc.then(()=>oc=0),oc=Date.now()))(),n}(r,i);ec(e,n,s,a)}else s&&(!function(e,t,n,r){e.removeEventListener(t,n,r)}(e,n,s,a),o[t]=void 0)}}const rc=/(Once|Passive|Capture)$/,ic=/^on:?(?:Once|Passive|Capture)$/;let oc=0;const sc=Promise.resolve();const ac=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,lc=(e,t,n,r,i,o)=>{const s="svg"===i;"class"===t?function(e,t,n){const r=e[gl];r&&(t=(t?[t,...r]:[...r]).join(" ")),null==t?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}(e,r,s):"style"===t?function(e,t,n){const r=e.style,i=x(n);let o=!1;if(n&&!i){if(t)if(x(t))for(const e of t.split(";")){const t=e.slice(0,e.indexOf(":")).trim();null==n[t]&&Ul(r,t,"")}else for(const e in t)null==n[e]&&Ul(r,e,"");for(const i in n){"display"===i&&(o=!0);const s=n[i];null!=s?Jl(e,i,!x(t)&&t?t[i]:void 0,s)||Ul(r,i,s):Ul(r,i,"")}}else if(i){if(t!==n){const e=r[Ll];e&&(n+=";"+e),r.cssText=n,o=Hl.test(n)}}else t&&e.removeAttribute("style");Pl in e&&(i&&t===n||(e[Pl]=o?r.display:""),e[Rl]&&(r.display="none"))}(e,n,r):u(t)?p(t)||nc(e,t,0,r,o):("."===t[0]?(t=t.slice(1),1):"^"===t[0]?(t=t.slice(1),0):function(e,t,n,r){if(r)return"innerHTML"===t||"textContent"===t||!!(t in e&&ac(t)&&C(n));if("spellcheck"===t||"draggable"===t||"translate"===t||"autocorrect"===t)return!1;if("sandbox"===t&&"IFRAME"===e.tagName)return!1;if("form"===t)return!1;if("list"===t&&"INPUT"===e.tagName)return!1;if("type"===t&&"TEXTAREA"===e.tagName)return!1;if("width"===t||"height"===t){const t=e.tagName;if("IMG"===t||"VIDEO"===t||"CANVAS"===t||"SOURCE"===t)return!1}if(ac(t)&&x(n))return!1;return t in e}(e,t,r,s))?(Zl(e,t,r),e.tagName.includes("-")||"value"!==t&&"checked"!==t&&"selected"!==t||Kl(e,t,r,s,0,"value"!==t)):e._isVueCE&&(function(e,t){const n=e._def.props;if(!n)return!1;const r=R(t);return Array.isArray(n)?n.some(e=>R(e)===r):Object.keys(n).some(e=>R(e)===r)}(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!x(r)))?Zl(e,R(t),r,0,t):("true-value"===t?e._trueValue=r:"false-value"===t&&(e._falseValue=r),Kl(e,t,r,s))};const cc={};function dc(e,t,n){let r=Zr(e,t);B(r)&&(r=h({},r,t));class i extends hc{constructor(e){super(r,e,n)}}return i.def=r,i}const uc=(e,t)=>dc(e,t,sd),pc="undefined"!=typeof HTMLElement?HTMLElement:class{};class hc extends pc{constructor(e,t={},n=od){super(),this._def=e,this._props=t,this._createApp=n,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._patching=!1,this._dirty=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._styleAnchors=new WeakMap,this._ob=null,this.shadowRoot&&n!==od?this._root=this.shadowRoot:!1!==e.shadowRoot?(this.attachShadow(h({},e.shadowRootOptions,{mode:"open"})),this._root=this.shadowRoot):this._root=this}connectedCallback(){if(!this.isConnected)return;this.shadowRoot||this._resolved||this._parseSlots(),this._connected=!0;let e=this;for(;e=e&&(e.assignedSlot||e.parentNode||e.host);)if(e instanceof hc){this._parent=e;break}this._instance||(this._resolved?this._mount(this._def):e&&e._pendingResolve?this._pendingResolve=e._pendingResolve.then(()=>{if(this._pendingResolve=void 0,this.isConnected)return this._resolveDef()}):this._resolveDef())}_setParent(e=this._parent){e&&(this._instance.parent=e._instance,this._inheritParentContext(e))}_inheritParentContext(e=this._parent){e&&this._app&&Object.setPrototypeOf(this._app._context.provides,e._instance.provides)}disconnectedCallback(){this._connected=!1,qn(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null,this._teleportTargets&&(this._teleportTargets.clear(),this._teleportTargets=void 0))})}_processMutations(e){for(const t of e)this._setAttr(t.attributeName)}_resolveDef(){if(this._pendingResolve)return this._pendingResolve;for(let e=0;e<this.attributes.length;e++)this._setAttr(this.attributes[e].name);this._ob=new MutationObserver(this._processMutations.bind(this)),this._ob.observe(this,{attributes:!0});const e=(e,t=!1)=>{this._resolved=!0,this._pendingResolve=void 0;const{props:n,styles:r}=e;let i;if(n&&!v(n))for(const e in n){const t=n[e];(t===Number||t&&t.type===Number)&&(e in this._props&&(this._props[e]=z(this._props[e])),(i||(i=Object.create(null)))[R(e)]=!0)}this._numberProps=i,this._resolveProps(e),this.shadowRoot&&this._applyStyles(r),this._connected&&this._mount(e)},t=this._def.__asyncLoader;if(t)return this._pendingResolve=t().then(t=>{t.configureApp=this._def.configureApp,e(this._def=t,!0)}),this._pendingResolve;e(this._def)}_mount(e){this._app=this._createApp(e),this._inheritParentContext(),e.configureApp&&e.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);const t=this._instance&&this._instance.exposed;if(t)for(const e in t)m(this,e)||Object.defineProperty(this,e,{get:()=>ln(t[e])})}_resolveProps(e){const{props:t}=e,n=v(t)?t:Object.keys(t||{});for(const e of Object.keys(this))"_"!==e[0]&&n.includes(e)&&this._setProp(e,this[e]);for(const e of n.map(R))Object.defineProperty(this,e,{get(){return this._getProp(e)},set(t){this._setProp(e,t,!0,!this._patching)}})}_setAttr(e){if(e.startsWith("data-v-"))return;const t=this.hasAttribute(e);let n=t?this.getAttribute(e):cc;const r=R(e);t&&this._numberProps&&this._numberProps[r]&&(n=z(n)),this._setProp(r,n,!1,!0)}_getProp(e){return this._props[e]}_setProp(e,t,n=!0,r=!1){if(t!==this._props[e]&&(this._dirty=!0,t===cc?delete this._props[e]:(this._props[e]=t,"key"===e&&this._app&&(this._app._ceVNode.key=t)),r&&this._instance&&this._update(),n)){const n=this._ob;n&&(this._processMutations(n.takeRecords()),n.disconnect()),!0===t?this.setAttribute(N(e),""):"string"==typeof t||"number"==typeof t?this.setAttribute(N(e),t+""):t||this.removeAttribute(N(e)),n&&n.observe(this,{attributes:!0})}}_update(){const e=this._createVNode();this._app&&(e.appContext=this._app._context),rd(e,this._root)}_createVNode(){const e={};this.shadowRoot||(e.onVnodeMounted=e.onVnodeUpdated=this._renderSlots.bind(this));const t=pa(this._def,h(e,this._props));return this._instance||(t.ce=e=>{this._instance=e,e.ce=this,e.isCE=!0;const t=(e,t)=>{this.dispatchEvent(new CustomEvent(e,B(t[0])?h({detail:t},t[0]):{detail:t}))};e.emit=(e,...n)=>{t(e,n),N(e)!==e&&t(N(e),n)},this._setParent()}),t}_applyStyles(e,t,n){if(!e)return;if(t){if(t===this._def||this._styleChildren.has(t))return;this._styleChildren.add(t)}const r=this._nonce,i=this.shadowRoot,o=n?this._getStyleAnchor(n)||this._getStyleAnchor(this._def):this._getRootStyleInsertionAnchor(i);let s=null;for(let a=e.length-1;a>=0;a--){const l=document.createElement("style");r&&l.setAttribute("nonce",r),l.textContent=e[a],i.insertBefore(l,s||o),s=l,0===a&&(n||this._styleAnchors.set(this._def,l),t&&this._styleAnchors.set(t,l))}}_getStyleAnchor(e){if(!e)return null;const t=this._styleAnchors.get(e);return t&&t.parentNode===this.shadowRoot?t:(t&&this._styleAnchors.delete(e),null)}_getRootStyleInsertionAnchor(e){for(let t=0;t<e.childNodes.length;t++){const n=e.childNodes[t];if(!(n instanceof HTMLStyleElement))return n}return null}_parseSlots(){const e=this._slots={};let t;for(;t=this.firstChild;){const n=1===t.nodeType&&t.getAttribute("slot")||"default";(e[n]||(e[n]=[])).push(t),this.removeChild(t)}}_renderSlots(){const e=this._getSlots(),t=this._instance.type.__scopeId;for(let n=0;n<e.length;n++){const r=e[n],i=r.getAttribute("name")||"default",o=this._slots[i],s=r.parentNode;if(o)for(const e of o){if(t&&1===e.nodeType){const n=t+"-s",r=document.createTreeWalker(e,1);let i;for(e.setAttribute(n,"");i=r.nextNode();)i.setAttribute(n,"")}s.insertBefore(e,r)}else for(;r.firstChild;)s.insertBefore(r.firstChild,r);s.removeChild(r)}}_getSlots(){const e=[this];this._teleportTargets&&e.push(...this._teleportTargets);const t=new Set;for(const n of e){const e=n.querySelectorAll("slot");for(let n=0;n<e.length;n++)t.add(e[n])}return Array.from(t)}_injectChildStyle(e,t){this._applyStyles(e.styles,e,t)}_beginPatch(){this._patching=!0,this._dirty=!1}_endPatch(){this._patching=!1,this._dirty&&this._instance&&this._update()}_hasShadowRoot(){return!1!==this._def.shadowRoot}_removeChildStyle(e){0}}function fc(e){const t=Ba(),n=t&&t.ce;return n||null}function gc(){const e=fc();return e&&e.shadowRoot}function mc(e="$style"){{const t=Ba();if(!t)return a;const n=t.type.__cssModules;if(!n)return a;const r=n[e];return r||a}}const vc=new WeakMap,Ac=new WeakMap,bc=Symbol("_moveCb"),yc=Symbol("_enterCb"),Cc=new WeakMap,xc=e=>(delete e.props.mode,e),wc=xc({name:"TransitionGroup",props:h({},vl,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=Ba(),r=jr();let i,o,s,a;const l=()=>(void 0===a&&(a=i.length>0&&function(e,t,n){const r=e.cloneNode(),i=e[gl];i&&i.forEach(e=>{e.split(/\s+/).forEach(e=>e&&r.classList.remove(e))});n.split(/\s+/).forEach(e=>e&&r.classList.add(e)),r.style.display="none";const o=1===t.nodeType?t:t.parentNode;o.appendChild(r);const{hasTransform:s}=El(r);return o.removeChild(r),s}(i[0].el,n.vnode.el,Oc(e))),a);return Yi(()=>{if(Cc.delete(n),!l())return i=[],void(s=void 0);const t=Oc(e);i.forEach(Sc);const r=s&&function(e,t){const n=e.find(e=>e.willMove()&&e.item.contains(t));return n&&Bc(n.item,n)}(s,n.vnode.el);s=void 0,i.forEach(e=>function(e,t){Ac.set(e,Bc(e.el,t))}(e,r));const o=i.filter(_c);Dl(n.vnode.el),o.forEach(e=>{const n=e.el,r=n.style;kl(n,t),r.transform=r.webkitTransform=r.transitionDuration="";const i=n[bc]=e=>{e&&e.target!==n||e&&!e.propertyName.endsWith("transform")||(n.removeEventListener("transitionend",i),n[bc]=null,Sl(n,t))};n.addEventListener("transitionend",i)}),i=[]}),()=>{const c=Gt(e),d=xl(c);let u=c.tag||qs;if(i=[],a=void 0,o)for(let e=0;e<o.length;e++){const t=o[e];t.el&&t.el instanceof Element&&!t.el[Rl]&&(i.push(t),Jr(t,Ur(t,d,r,n)),vc.set(t,Bc(t.el)))}o=t.default?Gr(t.default()):[];for(let e=0;e<o.length;e++){const t=o[e];null!=t.key&&Jr(t,Ur(t,d,r,n))}return i.length&&(s=function(e){let t;for(let n=e.parent;n;n=n.parent){const r=Cc.get(n);if(r){const i=Ec(n.vnode.el,e.vnode.el);i&&(t||(t=[])).push(h(Bc(i),{item:i,willMove:r}))}}return t}(n),Cc.set(n,l)),pa(u,null,o)}}}),kc=wc;function Sc(e){const t=e.el;t[bc]&&t[bc](),t[yc]&&t[yc]()}function Oc(e){return e.moveClass||`${e.name||"v"}-move`}function _c(e){const t=vc.get(e),n=Ac.get(e),r=t.left-n.left,i=t.top-n.top;if(r||i){const t=e.el,n=t.style,o=t.getBoundingClientRect();let s=1,a=1;return t.offsetWidth&&(s=o.width/t.offsetWidth),t.offsetHeight&&(a=o.height/t.offsetHeight),Number.isFinite(s)&&0!==s||(s=1),Number.isFinite(a)&&0!==a||(a=1),Math.abs(s-1)<.01&&(s=1),Math.abs(a-1)<.01&&(a=1),n.transform=n.webkitTransform=`translate(${r/s}px,${i/a}px)`,n.transitionDuration="0s",e}}function Bc(e,t){const n=e.getBoundingClientRect();return{left:n.left-(t?t.left:0),top:n.top-(t?t.top:0)}}function Ec(e,t){const n=1===e.nodeType?e:e.parentNode;for(;t&&t.parentNode!==n;)t=t.parentNode;if(t&&1===t.nodeType)return t}const Tc=e=>{const t=e.props["onUpdate:modelValue"]||!1;return v(t)?e=>j(t,e):t};function Mc(e){e.target.composing=!0}function Dc(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Pc=Symbol("_assign"),Rc=Symbol("_initialValue");function Ic(e,t,n){return t&&(e=e.trim()),n&&(e=W(e)),e}const Nc={created(e,{modifiers:{lazy:t,trim:n,number:r}},i){e.parentNode&&("text"===e.type?e[Rc]=e.defaultValue.replace(/[\r\n]/g,""):"textarea"===e.type&&(e[Rc]=e.defaultValue.replace(/\r\n?/g,"\n"))),e[Pc]=Tc(i);const o=r||i.props&&"number"===i.props.type;ec(e,t?"change":"input",t=>{t.target.composing||e[Pc](Ic(e.value,n,o))}),(n||o)&&ec(e,"change",()=>{e.value=Ic(e.value,n,o)}),t||(ec(e,"compositionstart",Mc),ec(e,"compositionend",Dc),ec(e,"change",Dc))},mounted(e,{value:t,modifiers:{trim:n,number:r}}){const i=t??"",o=e[Rc];delete e[Rc],void 0===o||"text"!==e.type&&"textarea"!==e.type||e.value===o?e.value=i:e[Pc](Ic(e.value,n,r))},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:i,number:o}},s){if(e[Pc]=Tc(s),e.composing)return;const a=t??"";if((!o&&"number"!==e.type||/^0\d/.test(e.value)?e.value:W(e.value))===a)return;const l=e.getRootNode();if((l instanceof Document||l instanceof ShadowRoot)&&l.activeElement===e&&"range"!==e.type){if(r&&t===n)return;if(i&&e.value.trim()===a)return}e.value=a}},Lc={deep:!0,created(e,t,n){e[Pc]=Tc(n),ec(e,"change",()=>{const t=e._modelValue,n=Wc(e),r=e.checked,i=e[Pc];if(v(t)){const e=Ae(t,n),o=-1!==e;if(r&&!o)i(t.concat(n));else if(!r&&o){const n=[...t];n.splice(e,1),i(n)}}else if(b(t)){const e=new Set(t);r?e.add(n):e.delete(n),i(e)}else i(zc(e,r))})},mounted:$c,beforeUpdate(e,t,n){e[Pc]=Tc(n),$c(e,t,n)}};function $c(e,{value:t,oldValue:n},r){let i;if(e._modelValue=t,v(t))i=Ae(t,r.props.value)>-1;else if(b(t))i=t.has(r.props.value);else{if(t===n)return;i=ve(t,zc(e,!0))}e.checked!==i&&(e.checked=i)}const Fc={created(e,{value:t},n){e.checked=ve(t,n.props.value),e[Pc]=Tc(n),ec(e,"change",()=>{e[Pc](Wc(e))})},beforeUpdate(e,{value:t,oldValue:n},r){e[Pc]=Tc(r),t!==n&&(e.checked=ve(t,r.props.value))}},jc={deep:!0,created(e,{value:t,modifiers:{number:n}},r){e._modelValue=t,ec(e,"change",()=>{const t=Array.prototype.filter.call(e.options,e=>e.selected).map(e=>n?W(Wc(e)):Wc(e)),r=e.multiple,i=r?b(e._modelValue)?new Set(t):t:t[0],o=e._pendingValue=[r,r?v(i)?t.slice():t:i];try{e[Pc](i)}finally{qn(()=>{e._pendingValue===o&&(e._pendingValue=void 0)})}}),e[Pc]=Tc(r)},mounted(e,{value:t,modifiers:{number:n}}){Vc(e,t,n)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[Pc]=Tc(n)},updated(e,{value:t,modifiers:{number:n}}){const r=e._pendingValue;e._pendingValue=void 0,r&&r[0]===e.multiple&&function(e,t,n){if(!n)return ve(e,t);if(v(e))return ve(e,t);if(b(e)){if(e.size!==t.length)return!1;for(const n of t)if(!e.has(n))return!1;return!0}return!1}(t,r[1],r[0])||Vc(e,t,n)}};function Vc(e,t,n=!1){const r=e.multiple,i=v(t);if(!r||i||b(t)){for(let o=0,s=e.options.length;o<s;o++){const s=e.options[o],a=Wc(s);if(r)if(i){const e=typeof a;s.selected="string"===e||"number"===e?t.some(e=>String(e)===String(a)):Ae(t,a)>-1}else s.selected=t.has(a)||n&&"string"==typeof a&&t.has(W(a));else if(ve(Wc(s),t))return void(e.selectedIndex!==o&&(e.selectedIndex=o))}r||-1===e.selectedIndex||(e.selectedIndex=-1)}}function Wc(e){return"_value"in e?e._value:e.value}function zc(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Qc={created(e,t,n){qc(e,t,n,null,"created")},mounted(e,t,n){qc(e,t,n,null,"mounted")},beforeUpdate(e,t,n,r){qc(e,t,n,r,"beforeUpdate")},updated(e,t,n,r){qc(e,t,n,r,"updated")}};function Hc(e,t){switch(e){case"SELECT":return jc;case"TEXTAREA":return Nc;default:switch(t){case"checkbox":return Lc;case"radio":return Fc;default:return Nc}}}function qc(e,t,n,r,i){const o=Hc(e.tagName,n.props&&n.props.type)[i];o&&o(e,t,n,r)}const Uc=["ctrl","shift","alt","meta"],Yc={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&0!==e.button,middle:e=>"button"in e&&1!==e.button,right:e=>"button"in e&&2!==e.button,exact:(e,t)=>Uc.some(n=>e[`${n}Key`]&&!t.includes(n))},Xc=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=(n,...r)=>{for(let e=0;e<t.length;e++){const r=Yc[t[e]];if(r&&r(n,t))return}return e(n,...r)})},Jc={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Gc=(e,t)=>{const n=e._withKeys||(e._withKeys={}),r=t.join(".");return n[r]||(n[r]=n=>{if(!("key"in n))return;const r=N(n.key);return t.some(e=>e===r||Jc[e]===r)?e(n):void 0})},Kc=h({patchProp:lc},pl);let Zc,ed=!1;function td(){return Zc||(Zc=ks(Kc))}function nd(){return Zc=ed?Zc:Ss(Kc),ed=!0,Zc}const rd=(...e)=>{td().render(...e)},id=(...e)=>{nd().hydrate(...e)},od=(...e)=>{const t=td().createApp(...e);const{mount:n}=t;return t.mount=e=>{const r=ld(e);if(!r)return;const i=t._component;C(i)||i.render||i.template||(i.template=r.innerHTML),1===r.nodeType&&(r.textContent="");const o=n(r,!1,ad(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),o},t},sd=(...e)=>{const t=nd().createApp(...e);const{mount:n}=t;return t.mount=e=>{const t=ld(e);if(t)return n(t,!0,ad(t))},t};function ad(e){return e instanceof SVGElement?"svg":"function"==typeof MathMLElement&&e instanceof MathMLElement?"mathml":void 0}function ld(e){if(x(e)){return document.querySelector(e)}return e}let cd=!1;const dd=()=>{cd||(cd=!0,Nc.getSSRProps=({value:e})=>({value:e}),Fc.getSSRProps=({value:e},t)=>{if(t.props&&ve(t.props.value,e))return{checked:!0}},Lc.getSSRProps=({value:e},t)=>{if(v(e)){if(t.props&&Ae(e,t.props.value)>-1)return{checked:!0}}else if(b(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},Qc.getSSRProps=(e,t)=>{if("string"!=typeof t.type)return;const n=Hc(t.type.toUpperCase(),t.props&&t.props.type);return n.getSSRProps?n.getSSRProps(e,t):void 0},Il.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}})};const ud=Symbol(""),pd=Symbol(""),hd=Symbol(""),fd=Symbol(""),gd=Symbol(""),md=Symbol(""),vd=Symbol(""),Ad=Symbol(""),bd=Symbol(""),yd=Symbol(""),Cd=Symbol(""),xd=Symbol(""),wd=Symbol(""),kd=Symbol(""),Sd=Symbol(""),Od=Symbol(""),_d=Symbol(""),Bd=Symbol(""),Ed=Symbol(""),Td=Symbol(""),Md=Symbol(""),Dd=Symbol(""),Pd=Symbol(""),Rd=Symbol(""),Id=Symbol(""),Nd=Symbol(""),Ld=Symbol(""),$d=Symbol(""),Fd=Symbol(""),jd=Symbol(""),Vd=Symbol(""),Wd=Symbol(""),zd=Symbol(""),Qd=Symbol(""),Hd=Symbol(""),qd=Symbol(""),Ud=Symbol(""),Yd=Symbol(""),Xd=Symbol(""),Jd={[ud]:"Fragment",[pd]:"Teleport",[hd]:"Suspense",[fd]:"KeepAlive",[gd]:"BaseTransition",[md]:"openBlock",[vd]:"createBlock",[Ad]:"createElementBlock",[bd]:"createVNode",[yd]:"createElementVNode",[Cd]:"createCommentVNode",[xd]:"createTextVNode",[wd]:"createStaticVNode",[kd]:"resolveComponent",[Sd]:"resolveDynamicComponent",[Od]:"resolveDirective",[_d]:"resolveFilter",[Bd]:"withDirectives",[Ed]:"renderList",[Td]:"renderSlot",[Md]:"createSlots",[Dd]:"toDisplayString",[Pd]:"mergeProps",[Rd]:"normalizeClass",[Id]:"normalizeStyle",[Nd]:"normalizeProps",[Ld]:"guardReactiveProps",[$d]:"toHandlers",[Fd]:"camelize",[jd]:"capitalize",[Vd]:"toHandlerKey",[Wd]:"setBlockTracking",[zd]:"pushScopeId",[Qd]:"popScopeId",[Hd]:"withCtx",[qd]:"unref",[Ud]:"isRef",[Yd]:"withMemo",[Xd]:"isMemoSame"};const Gd={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0},source:""};function Kd(e,t,n,r,i,o,s,a=!1,l=!1,c=!1,d=Gd){return e&&(a?(e.helper(md),e.helper(lu(e.inSSR,c))):e.helper(au(e.inSSR,c)),s&&e.helper(Bd)),{type:13,tag:t,props:n,children:r,patchFlag:i,dynamicProps:o,directives:s,isBlock:a,disableTracking:l,isComponent:c,loc:d}}function Zd(e,t=Gd){return{type:17,loc:t,elements:e}}function eu(e,t=Gd){return{type:15,loc:t,properties:e}}function tu(e,t){return{type:16,loc:Gd,key:x(e)?nu(e,!0):e,value:t}}function nu(e,t=!1,n=Gd,r=0){return{type:4,loc:n,content:e,isStatic:t,constType:t?3:r}}function ru(e,t=Gd){return{type:8,loc:t,children:e}}function iu(e,t=[],n=Gd){return{type:14,loc:n,callee:e,arguments:t}}function ou(e,t=void 0,n=!1,r=!1,i=Gd){return{type:18,params:e,returns:t,newline:n,isSlot:r,loc:i}}function su(e,t,n,r=!0){return{type:19,test:e,consequent:t,alternate:n,newline:r,loc:Gd}}function au(e,t){return e||t?bd:yd}function lu(e,t){return e||t?vd:Ad}function cu(e,{helper:t,removeHelper:n,inSSR:r}){e.isBlock||(e.isBlock=!0,n(au(r,e.isComponent)),t(md),t(lu(r,e.isComponent)))}const du=new Uint8Array([123,123]),uu=new Uint8Array([125,125]);function pu(e){return e>=97&&e<=122||e>=65&&e<=90}function hu(e){return 32===e||10===e||9===e||12===e||13===e}function fu(e){return 47===e||62===e||hu(e)}function gu(e){const t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}const mu={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97])};function vu(e,{compatConfig:t}){const n=t&&t[e];return"MODE"===e?n||3:n}function Au(e,t){const n=vu("MODE",t),r=vu(e,t);return 3===n?!0===r:!1!==r}function bu(e,t,n,...r){return Au(e,t)}function yu(e){throw e}function Cu(e){}function xu(e,t,n,r){const i=new SyntaxError(String(`https://vuejs.org/error-reference/#compiler-${e}`));return i.code=e,i.loc=t,i}const wu=e=>4===e.type&&e.isStatic;function ku(e){switch(e){case"Teleport":case"teleport":return pd;case"Suspense":case"suspense":return hd;case"KeepAlive":case"keep-alive":return fd;case"BaseTransition":case"base-transition":return gd}}const Su=/^$|^\d|[^\$\w\xA0-\uFFFF]/,Ou=e=>!Su.test(e),_u=/[A-Za-z_$\xA0-\uFFFF]/,Bu=/[\.\?\w$\xA0-\uFFFF]/,Eu=/\s+[.[]\s*|\s*[.[]\s+/g,Tu=e=>4===e.type?e.content:e.loc.source,Mu=e=>{const t=Tu(e).trim().replace(Eu,e=>e.trim());let n=0,r=[],i=0,o=0,s=null;for(let e=0;e<t.length;e++){const a=t.charAt(e);switch(n){case 0:if("["===a)r.push(n),n=1,i++;else if("("===a)r.push(n),n=2,o++;else if(!(0===e?_u:Bu).test(a))return!1;break;case 1:"'"===a||'"'===a||"`"===a?(r.push(n),n=3,s=a):"["===a?i++:"]"===a&&(--i||(n=r.pop()));break;case 2:if("'"===a||'"'===a||"`"===a)r.push(n),n=3,s=a;else if("("===a)o++;else if(")"===a){if(e===t.length-1)return!1;--o||(n=r.pop())}break;case 3:a===s&&(n=r.pop(),s=null)}}return!i&&!o},Du=/^\s*(?:async\s*)?(?:\([^)]*?\)|[\w$_]+)\s*(?::[^=]+)?=>|^\s*(?:async\s+)?function(?:\s+[\w$]+)?\s*\(/,Pu=e=>Du.test(Tu(e));function Ru(e,t,n=!1){for(let r=0;r<e.props.length;r++){const i=e.props[r];if(7===i.type&&(n||i.exp)&&(x(t)?i.name===t:t.test(i.name)))return i}}function Iu(e,t,n=!1,r=!1){for(let i=0;i<e.props.length;i++){const o=e.props[i];if(6===o.type){if(n)continue;if(o.name===t&&(o.value||r))return o}else if("bind"===o.name&&(o.exp||r)&&Nu(o.arg,t))return o}}function Nu(e,t){return!(!e||!wu(e)||e.content!==t)}function Lu(e){return 5===e.type||2===e.type}function $u(e){return 7===e.type&&"pre"===e.name}function Fu(e){return 7===e.type&&"slot"===e.name}function ju(e){return 1===e.type&&3===e.tagType}function Vu(e){return 1===e.type&&2===e.tagType}const Wu=new Set([Nd,Ld]);function zu(e,t=[]){if(e&&!x(e)&&14===e.type){const n=e.callee;if(!x(n)&&Wu.has(n))return zu(e.arguments[0],t.concat(e))}return[e,t]}function Qu(e,t,n){if(13!==e.type&&function(e,t){var n,r,i;if(4!==t.key.type||"key"!==t.key.content)return!1;const o=e.arguments[2];if(o&&!x(o)){const[e]=zu(o);if(e&&!x(e)&&15===e.type&&Hu(t,e))return!0}return(n=e.arguments)[2]||(n[2]="{}"),(r=e.arguments)[3]||(r[3]="undefined"),(i=e.arguments)[4]||(i[4]="undefined"),e.arguments[5]=t.value,!0}(e,t))return;let r,i,o=13===e.type?e.props:e.arguments[2],s=[];if(o&&!x(o)&&14===o.type){const e=zu(o);o=e[0],s=e[1],i=s[s.length-1]}if(null==o||x(o))r=eu([t]);else if(14===o.type){const e=o.arguments[0];x(e)||15!==e.type?o.callee===$d?r=iu(n.helper(Pd),[eu([t]),o]):o.arguments.unshift(eu([t])):Hu(t,e)||e.properties.unshift(t),!r&&(r=o)}else 15===o.type?(Hu(t,o)||o.properties.unshift(t),r=o):(r=iu(n.helper(Pd),[eu([t]),o]),i&&i.callee===Ld&&(i=s[s.length-2]));13===e.type?i?i.arguments[0]=r:e.props=r:i?i.arguments[0]=r:e.arguments[2]=r}function Hu(e,t){let n=!1;if(4===e.key.type){const r=e.key.content;n=t.properties.some(e=>4===e.key.type&&e.key.content===r)}return n}function qu(e,t){return`_${t}_${e.replace(/[^\w]/g,(t,n)=>"-"===t?"_":e.charCodeAt(n).toString())}`}const Uu=/([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/;function Yu(e){for(let t=0;t<e.length;t++)if(!hu(e.charCodeAt(t)))return!1;return!0}function Xu(e){return 2===e.type&&Yu(e.content)||12===e.type&&Xu(e.content)}function Ju(e){return 3===e.type||Xu(e)}const Gu={parseMode:"base",ns:0,delimiters:["{{","}}"],getNamespace:()=>0,isVoidTag:d,isPreTag:d,isIgnoreNewlineTag:d,isCustomElement:d,onError:yu,onWarn:Cu,comments:!1,prefixIdentifiers:!1};let Ku=Gu,Zu=null,ep="",tp=null,np=null,rp="",ip=-1,op=-1,sp=0,ap=!1,lp=null;const cp=[],dp=new class{constructor(e,t){this.stack=e,this.cbs=t,this.state=1,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=1,this.inRCDATA=!1,this.inXML=!1,this.inVPre=!1,this.newlines=[],this.mode=0,this.delimiterOpen=du,this.delimiterClose=uu,this.delimiterIndex=-1,this.currentSequence=void 0,this.sequenceIndex=0}get inSFCRoot(){return 2===this.mode&&0===this.stack.length}reset(){this.state=1,this.mode=0,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=1,this.inRCDATA=!1,this.currentSequence=void 0,this.newlines.length=0,this.delimiterOpen=du,this.delimiterClose=uu}getPos(e){let t=1,n=e+1;const r=this.newlines.length;let i=-1;if(r>100){let t=-1,n=r;for(;t+1<n;){const r=t+n>>>1;this.newlines[r]<e?t=r:n=r}i=t}else for(let t=r-1;t>=0;t--)if(e>this.newlines[t]){i=t;break}return i>=0&&(t=i+2,n=e-this.newlines[i]),{column:n,line:t,offset:e}}peek(){return this.buffer.charCodeAt(this.index+1)}stateText(e){60===e?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=5,this.sectionStart=this.index):this.inVPre||e!==this.delimiterOpen[0]||(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(e))}stateInterpolationOpen(e){if(e===this.delimiterOpen[this.delimiterIndex])if(this.delimiterIndex===this.delimiterOpen.length-1){const e=this.index+1-this.delimiterOpen.length;e>this.sectionStart&&this.cbs.ontext(this.sectionStart,e),this.state=3,this.sectionStart=e}else this.delimiterIndex++;else this.inRCDATA?(this.state=32,this.stateInRCDATA(e)):(this.state=1,this.stateText(e))}stateInterpolation(e){e===this.delimiterClose[0]&&(this.state=4,this.delimiterIndex=0,this.stateInterpolationClose(e))}stateInterpolationClose(e){e===this.delimiterClose[this.delimiterIndex]?this.delimiterIndex===this.delimiterClose.length-1?(this.cbs.oninterpolation(this.sectionStart,this.index+1),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):this.delimiterIndex++:(this.state=3,this.stateInterpolation(e))}stateSpecialStartSequence(e){const t=this.sequenceIndex===this.currentSequence.length;if(t?fu(e):(32|e)===this.currentSequence[this.sequenceIndex]){if(!t)return void this.sequenceIndex++}else this.inRCDATA=!1;this.sequenceIndex=0,this.state=6,this.stateInTagName(e)}stateInRCDATA(e){if(this.sequenceIndex===this.currentSequence.length){if(62===e||hu(e)){const t=this.index-this.currentSequence.length;if(this.sectionStart<t){const e=this.index;this.index=t,this.cbs.ontext(this.sectionStart,t),this.index=e}return this.sectionStart=t+2,this.stateInClosingTagName(e),void(this.inRCDATA=!1)}this.sequenceIndex=0}(32|e)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:0===this.sequenceIndex?this.currentSequence===mu.TitleEnd||this.currentSequence===mu.TextareaEnd&&!this.inSFCRoot?this.inVPre||e!==this.delimiterOpen[0]||(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(e)):this.fastForwardTo(60)&&(this.sequenceIndex=1):this.sequenceIndex=Number(60===e)}stateCDATASequence(e){e===mu.Cdata[this.sequenceIndex]?++this.sequenceIndex===mu.Cdata.length&&(this.state=28,this.currentSequence=mu.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=23,this.stateInDeclaration(e))}fastForwardTo(e){for(;++this.index<this.buffer.length;){const t=this.buffer.charCodeAt(this.index);if(10===t&&this.newlines.push(this.index),t===e)return!0}return this.index=this.buffer.length-1,!1}stateInCommentLike(e){e===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===mu.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index-2):this.cbs.oncomment(this.sectionStart,this.index-2),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=1):0===this.sequenceIndex?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):e!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)}startSpecial(e,t){this.enterRCDATA(e,t),this.state=31}enterRCDATA(e,t){this.inRCDATA=!0,this.currentSequence=e,this.sequenceIndex=t}stateBeforeTagName(e){33===e?(this.state=22,this.sectionStart=this.index+1):63===e?(this.state=24,this.sectionStart=this.index+1):pu(e)?(this.sectionStart=this.index,0===this.mode?this.state=6:this.inSFCRoot?this.state=34:this.inXML?this.state=6:this.state=116===e?30:115===e?29:6):47===e?this.state=8:(this.state=1,this.stateText(e))}stateInTagName(e){fu(e)&&this.handleTagName(e)}stateInSFCRootTagName(e){if(fu(e)){const t=this.buffer.slice(this.sectionStart,this.index);"template"!==t&&this.enterRCDATA(gu("</"+t),0),this.handleTagName(e)}}handleTagName(e){this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(e)}stateBeforeClosingTagName(e){hu(e)||(62===e?(this.state=1,this.sectionStart=this.index+1):(this.state=pu(e)?9:27,this.sectionStart=this.index))}stateInClosingTagName(e){(62===e||hu(e))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=10,this.stateAfterClosingTagName(e))}stateAfterClosingTagName(e){62===e&&(this.state=1,this.sectionStart=this.index+1)}stateBeforeAttrName(e){62===e?(this.cbs.onopentagend(this.index),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):47===e?this.state=7:60===e&&47===this.peek()?(this.cbs.onopentagend(this.index),this.state=5,this.sectionStart=this.index):hu(e)||this.handleAttrStart(e)}handleAttrStart(e){118===e&&45===this.peek()?(this.state=13,this.sectionStart=this.index):46===e||58===e||64===e||35===e?(this.cbs.ondirname(this.index,this.index+1),this.state=14,this.sectionStart=this.index+1):(this.state=12,this.sectionStart=this.index)}stateInSelfClosingTag(e){62===e?(this.cbs.onselfclosingtag(this.index),this.state=1,this.sectionStart=this.index+1,this.inRCDATA=!1):hu(e)||(this.state=11,this.stateBeforeAttrName(e))}stateInAttrName(e){(61===e||fu(e))&&(this.cbs.onattribname(this.sectionStart,this.index),this.handleAttrNameEnd(e))}stateInDirName(e){61===e||fu(e)?(this.cbs.ondirname(this.sectionStart,this.index),this.handleAttrNameEnd(e)):58===e?(this.cbs.ondirname(this.sectionStart,this.index),this.state=14,this.sectionStart=this.index+1):46===e&&(this.cbs.ondirname(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDirArg(e){61===e||fu(e)?(this.cbs.ondirarg(this.sectionStart,this.index),this.handleAttrNameEnd(e)):91===e?this.state=15:46===e&&(this.cbs.ondirarg(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDynamicDirArg(e){93===e?this.state=14:(61===e||fu(e))&&(this.cbs.ondirarg(this.sectionStart,this.index+1),this.handleAttrNameEnd(e))}stateInDirModifier(e){61===e||fu(e)?(this.cbs.ondirmodifier(this.sectionStart,this.index),this.handleAttrNameEnd(e)):46===e&&(this.cbs.ondirmodifier(this.sectionStart,this.index),this.sectionStart=this.index+1)}handleAttrNameEnd(e){this.sectionStart=this.index,this.state=17,this.cbs.onattribnameend(this.index),this.stateAfterAttrName(e)}stateAfterAttrName(e){61===e?this.state=18:47===e||62===e?(this.cbs.onattribend(0,this.sectionStart),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(e)):hu(e)||(this.cbs.onattribend(0,this.sectionStart),this.handleAttrStart(e))}stateBeforeAttrValue(e){34===e?(this.state=19,this.sectionStart=this.index+1):39===e?(this.state=20,this.sectionStart=this.index+1):hu(e)||(this.sectionStart=this.index,this.state=21,this.stateInAttrValueNoQuotes(e))}handleInAttrValue(e,t){(e===t||this.fastForwardTo(t))&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(34===t?3:2,this.index+1),this.state=11)}stateInAttrValueDoubleQuotes(e){this.handleInAttrValue(e,34)}stateInAttrValueSingleQuotes(e){this.handleInAttrValue(e,39)}stateInAttrValueNoQuotes(e){hu(e)||62===e?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(1,this.index),this.state=11,this.stateBeforeAttrName(e)):39!==e&&60!==e&&61!==e&&96!==e||this.cbs.onerr(18,this.index)}stateBeforeDeclaration(e){91===e?(this.state=26,this.sequenceIndex=0):this.state=45===e?25:23}stateInDeclaration(e){(62===e||this.fastForwardTo(62))&&(this.state=1,this.sectionStart=this.index+1)}stateInProcessingInstruction(e){(62===e||this.fastForwardTo(62))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeComment(e){45===e?(this.state=28,this.currentSequence=mu.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=23}stateInSpecialComment(e){(62===e||this.fastForwardTo(62))&&(this.cbs.oncomment(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeSpecialS(e){e===mu.ScriptEnd[3]?this.startSpecial(mu.ScriptEnd,4):e===mu.StyleEnd[3]?this.startSpecial(mu.StyleEnd,4):(this.state=6,this.stateInTagName(e))}stateBeforeSpecialT(e){e===mu.TitleEnd[3]?this.startSpecial(mu.TitleEnd,4):e===mu.TextareaEnd[3]?this.startSpecial(mu.TextareaEnd,4):(this.state=6,this.stateInTagName(e))}startEntity(){}stateInEntity(){}parse(e){for(this.buffer=e;this.index<this.buffer.length;){const e=this.buffer.charCodeAt(this.index);switch(10===e&&33!==this.state&&this.newlines.push(this.index),this.state){case 1:this.stateText(e);break;case 2:this.stateInterpolationOpen(e);break;case 3:this.stateInterpolation(e);break;case 4:this.stateInterpolationClose(e);break;case 31:this.stateSpecialStartSequence(e);break;case 32:this.stateInRCDATA(e);break;case 26:this.stateCDATASequence(e);break;case 19:this.stateInAttrValueDoubleQuotes(e);break;case 12:this.stateInAttrName(e);break;case 13:this.stateInDirName(e);break;case 14:this.stateInDirArg(e);break;case 15:this.stateInDynamicDirArg(e);break;case 16:this.stateInDirModifier(e);break;case 28:this.stateInCommentLike(e);break;case 27:this.stateInSpecialComment(e);break;case 11:this.stateBeforeAttrName(e);break;case 6:this.stateInTagName(e);break;case 34:this.stateInSFCRootTagName(e);break;case 9:this.stateInClosingTagName(e);break;case 5:this.stateBeforeTagName(e);break;case 17:this.stateAfterAttrName(e);break;case 20:this.stateInAttrValueSingleQuotes(e);break;case 18:this.stateBeforeAttrValue(e);break;case 8:this.stateBeforeClosingTagName(e);break;case 10:this.stateAfterClosingTagName(e);break;case 29:this.stateBeforeSpecialS(e);break;case 30:this.stateBeforeSpecialT(e);break;case 21:this.stateInAttrValueNoQuotes(e);break;case 7:this.stateInSelfClosingTag(e);break;case 23:this.stateInDeclaration(e);break;case 22:this.stateBeforeDeclaration(e);break;case 25:this.stateBeforeComment(e);break;case 24:this.stateInProcessingInstruction(e);break;case 33:this.stateInEntity()}this.index++}this.cleanup(),this.finish()}cleanup(){this.sectionStart!==this.index&&(1===this.state||32===this.state&&0===this.sequenceIndex?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):19!==this.state&&20!==this.state&&21!==this.state||(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))}finish(){this.handleTrailingData(),this.cbs.onend()}handleTrailingData(){const e=this.buffer.length;this.sectionStart>=e||(28===this.state?this.currentSequence===mu.CdataEnd?this.cbs.oncdata(this.sectionStart,e):this.cbs.oncomment(this.sectionStart,e):6===this.state||11===this.state||18===this.state||17===this.state||12===this.state||13===this.state||14===this.state||15===this.state||16===this.state||20===this.state||19===this.state||21===this.state||9===this.state||this.cbs.ontext(this.sectionStart,e))}emitCodePoint(e,t){}}(cp,{onerr:Mp,ontext(e,t){gp(hp(e,t),e,t)},ontextentity(e,t,n){gp(e,t,n)},oninterpolation(e,t){if(ap)return gp(hp(e,t),e,t);let n=e+dp.delimiterOpen.length,r=t-dp.delimiterClose.length;for(;hu(ep.charCodeAt(n));)n++;for(;hu(ep.charCodeAt(r-1));)r--;let i=hp(n,r);i.includes("&")&&(i=Ku.decodeEntities(i,!1)),Sp({type:5,content:Tp(i,!1,Op(n,r)),loc:Op(e,t)})},onopentagname(e,t){const n=hp(e,t);tp={type:1,tag:n,ns:Ku.getNamespace(n,cp[0],Ku.ns),tagType:0,props:[],children:[],loc:Op(e-1,t),codegenNode:void 0}},onopentagend(e){fp(e)},onclosetag(e,t){const n=hp(e,t);if(!Ku.isVoidTag(n)){let r=!1;for(let e=0;e<cp.length;e++){if(cp[e].tag.toLowerCase()===n.toLowerCase()){r=!0,e>0&&Mp(24,cp[0].loc.start.offset);for(let n=0;n<=e;n++){mp(cp.shift(),t,n<e)}break}}r||Mp(23,vp(e,60))}},onselfclosingtag(e){const t=tp.tag;tp.isSelfClosing=!0,fp(e),cp[0]&&cp[0].tag===t&&mp(cp.shift(),e)},onattribname(e,t){np={type:6,name:hp(e,t),nameLoc:Op(e,t),value:void 0,loc:Op(e)}},ondirname(e,t){const n=hp(e,t),r="."===n||":"===n?"bind":"@"===n?"on":"#"===n?"slot":n.slice(2);if(ap||""!==r||Mp(26,e),ap||""===r)np={type:6,name:n,nameLoc:Op(e,t),value:void 0,loc:Op(e)};else if(np={type:7,name:r,rawName:n,exp:void 0,arg:void 0,modifiers:"."===n?[nu("prop")]:[],loc:Op(e)},"pre"===r){ap=dp.inVPre=!0,lp=tp;const e=tp.props;for(let t=0;t<e.length;t++)7===e[t].type&&(e[t]=Ep(e[t]))}},ondirarg(e,t){if(e===t)return;const n=hp(e,t);if(ap&&!$u(np))np.name+=n,Bp(np.nameLoc,t);else{const r="["!==n[0];np.arg=Tp(r?n:n.slice(1,-1),r,Op(e,t),r?3:0)}},ondirmodifier(e,t){const n=hp(e,t);if(ap&&!$u(np))np.name+="."+n,Bp(np.nameLoc,t);else if("slot"===np.name){const e=np.arg;e&&(e.content+="."+n,Bp(e.loc,t))}else{const r=nu(n,!0,Op(e,t));np.modifiers.push(r)}},onattribdata(e,t){rp+=hp(e,t),ip<0&&(ip=e),op=t},onattribentity(e,t,n){rp+=e,ip<0&&(ip=t),op=n},onattribnameend(e){const t=np.loc.start.offset,n=hp(t,e);7===np.type&&(np.rawName=n),tp.props.some(e=>(7===e.type?e.rawName:e.name)===n)&&Mp(2,t)},onattribend(e,t){if(tp&&np){if(Bp(np.loc,t),0!==e)if(rp.includes("&")&&(rp=Ku.decodeEntities(rp,!0)),6===np.type)"class"===np.name&&(rp=kp(rp).trim()),1!==e||rp||Mp(13,t),np.value={type:2,content:rp,loc:1===e?Op(ip,op):Op(ip-1,op+1)},dp.inSFCRoot&&"template"===tp.tag&&"lang"===np.name&&rp&&"html"!==rp&&dp.enterRCDATA(gu("</template"),0);else{let e=0;np.exp=Tp(rp,!1,Op(ip,op),0,e),"for"===np.name&&(np.forParseResult=function(e){const t=e.loc,n=e.content,r=n.match(Uu);if(!r)return;const[,i,o]=r,s=(e,n,r=!1)=>{const i=t.start.offset+n;return Tp(e,!1,Op(i,i+e.length),0,r?1:0)},a={source:s(o.trim(),n.indexOf(o,i.length)),value:void 0,key:void 0,index:void 0,finalized:!1};let l=i.trim().replace(pp,"").trim();const c=i.indexOf(l),d=l.match(up);if(d){l=l.replace(up,"").trim();const e=d[1].trim();let t;if(e&&(t=n.indexOf(e,c+l.length),a.key=s(e,t,!0)),d[2]){const r=d[2].trim();r&&(a.index=s(r,n.indexOf(r,a.key?t+e.length:c+l.length),!0))}}l&&(a.value=s(l,c,!0));return a}(np.exp));let t=-1;"bind"===np.name&&(t=np.modifiers.findIndex(e=>"sync"===e.content))>-1&&bu("COMPILER_V_BIND_SYNC",Ku,np.loc,np.arg.loc.source)&&(np.name="model",np.modifiers.splice(t,1))}7===np.type&&"pre"===np.name||tp.props.push(np)}rp="",ip=op=-1},oncomment(e,t){Ku.comments&&Sp({type:3,content:hp(e,t),loc:Op(e-4,t+3)})},onend(){const e=ep.length;for(let t=0;t<cp.length;t++)mp(cp[t],e-1),Mp(24,cp[t].loc.start.offset)},oncdata(e,t){0!==(cp[0]?cp[0].ns:Ku.ns)?gp(hp(e,t),e,t):Mp(1,e-9)},onprocessinginstruction(e){0===(cp[0]?cp[0].ns:Ku.ns)&&Mp(21,e-1)}}),up=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,pp=/^\(|\)$/g;function hp(e,t){return ep.slice(e,t)}function fp(e){dp.inSFCRoot&&(tp.innerLoc=Op(e+1,e+1)),Sp(tp);const{tag:t,ns:n}=tp;0===n&&Ku.isPreTag(t)&&sp++,Ku.isVoidTag(t)?mp(tp,e):(cp.unshift(tp),1!==n&&2!==n||(dp.inXML=!0)),tp=null}function gp(e,t,n){{const t=cp[0]&&cp[0].tag;"script"!==t&&"style"!==t&&e.includes("&")&&(e=Ku.decodeEntities(e,!1))}const r=cp[0]||Zu,i=r.children[r.children.length-1];i&&2===i.type?(i.content+=e,Bp(i.loc,n)):r.children.push({type:2,content:e,loc:Op(t,n)})}function mp(e,t,n=!1){Bp(e.loc,n?vp(t,60):function(e,t){let n=e;for(;ep.charCodeAt(n)!==t&&n<ep.length-1;)n++;return n}(t,62)+1),dp.inSFCRoot&&(e.children.length?e.innerLoc.end=h({},e.children[e.children.length-1].loc.end):e.innerLoc.end=h({},e.innerLoc.start),e.innerLoc.source=hp(e.innerLoc.start.offset,e.innerLoc.end.offset));const{tag:r,ns:i,children:o}=e;if(ap||("slot"===r?e.tagType=2:bp(e)?e.tagType=3:function({tag:e,props:t}){if(Ku.isCustomElement(e))return!1;if("component"===e||(n=e.charCodeAt(0),n>64&&n<91)||ku(e)||Ku.isBuiltInComponent&&Ku.isBuiltInComponent(e)||Ku.isNativeTag&&!Ku.isNativeTag(e))return!0;var n;for(let e=0;e<t.length;e++){const n=t[e];if(6===n.type){if("is"===n.name&&n.value){if(n.value.content.startsWith("vue:"))return!0;if(bu("COMPILER_IS_ON_ELEMENT",Ku,n.loc))return!0}}else if("bind"===n.name&&Nu(n.arg,"is")&&bu("COMPILER_IS_ON_ELEMENT",Ku,n.loc))return!0}return!1}(e)&&(e.tagType=1)),dp.inRCDATA||(e.children=Cp(o)),0===i&&Ku.isIgnoreNewlineTag(r)){const e=o[0];e&&2===e.type&&(e.content=e.content.replace(/^\r?\n/,""))}0===i&&Ku.isPreTag(r)&&sp--,lp===e&&(ap=dp.inVPre=!1,lp=null),dp.inXML&&0===(cp[0]?cp[0].ns:Ku.ns)&&(dp.inXML=!1);{const t=e.props;if(!dp.inSFCRoot&&Au("COMPILER_NATIVE_TEMPLATE",Ku)&&"template"===e.tag&&!bp(e)){const t=cp[0]||Zu,n=t.children.indexOf(e);t.children.splice(n,1,...e.children)}const n=t.find(e=>6===e.type&&"inline-template"===e.name);n&&bu("COMPILER_INLINE_TEMPLATE",Ku,n.loc)&&e.children.length&&(n.value={type:2,content:hp(e.children[0].loc.start.offset,e.children[e.children.length-1].loc.end.offset),loc:n.loc})}}function vp(e,t){let n=e;for(;ep.charCodeAt(n)!==t&&n>=0;)n--;return n}const Ap=new Set(["if","else","else-if","for","slot"]);function bp({tag:e,props:t}){if("template"===e)for(let e=0;e<t.length;e++)if(7===t[e].type&&Ap.has(t[e].name))return!0;return!1}const yp=/\r\n/g;function Cp(e){const t="preserve"!==Ku.whitespace;let n=!1;for(let r=0;r<e.length;r++){const i=e[r];if(2===i.type)if(sp)i.content=i.content.replace(yp,"\n");else if(Yu(i.content)){const o=e[r-1]&&e[r-1].type,s=e[r+1]&&e[r+1].type;!o||!s||t&&(3===o&&(3===s||1===s)||1===o&&(3===s||1===s&&xp(i.content)))?(n=!0,e[r]=null):i.content=" "}else t&&(i.content=kp(i.content))}return n?e.filter(Boolean):e}function xp(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(10===n||13===n)return!0}return!1}function kp(e){let t="",n=!1;for(let r=0;r<e.length;r++)hu(e.charCodeAt(r))?n||(t+=" ",n=!0):(t+=e[r],n=!1);return t}function Sp(e){(cp[0]||Zu).children.push(e)}function Op(e,t){return{start:dp.getPos(e),end:null==t?t:dp.getPos(t),source:null==t?t:hp(e,t)}}function _p(e){return{start:h({},e.start),end:h({},e.end),source:e.source}}function Bp(e,t){e.end=dp.getPos(t),e.source=hp(e.start.offset,t)}function Ep(e){const t={type:6,name:e.rawName,nameLoc:Op(e.loc.start.offset,e.loc.start.offset+e.rawName.length),value:void 0,loc:e.loc};if(e.exp){const n=e.exp.loc;n.end.offset<e.loc.end.offset&&(n.start.offset--,n.start.column--,n.end.offset++,n.end.column++),t.value={type:2,content:e.exp.content,loc:n}}return t}function Tp(e,t=!1,n,r=0,i=0){return nu(e,t,n,r)}function Mp(e,t,n){Ku.onError(xu(e,Op(t,t)))}function Dp(e,t){if(dp.reset(),tp=null,np=null,rp="",ip=-1,op=-1,cp.length=0,ep=e,Ku=h({},Gu),t){let e;for(e in t)null!=t[e]&&(Ku[e]=t[e])}dp.mode="html"===Ku.parseMode?1:"sfc"===Ku.parseMode?2:0,dp.inXML=1===Ku.ns||2===Ku.ns;const n=t&&t.delimiters;n&&(dp.delimiterOpen=gu(n[0]),dp.delimiterClose=gu(n[1]));const r=Zu=function(e,t=""){return{type:0,source:t,children:e,helpers:new Set,components:[],directives:[],hoists:[],imports:[],cached:[],temps:0,codegenNode:void 0,loc:Gd}}([],e);return dp.parse(ep),r.loc=Op(0,e.length),r.children=Cp(r.children),Zu=null,r}function Pp(e,t){Ip(e,void 0,t,!!Rp(e))}function Rp(e){const t=e.children.filter(e=>3!==e.type);return 1!==t.length||1!==t[0].type||Vu(t[0])?null:t[0]}function Ip(e,t,n,r=!1,i=!1){const{children:o}=e,s=[];for(let t=0;t<o.length;t++){const a=o[t];if(1===a.type&&0===a.tagType){const e=r?0:Np(a,n);if(e>0){if(e>=2){a.codegenNode.patchFlag=-1,s.push(a);continue}}else{const e=a.codegenNode;if(13===e.type){const t=e.patchFlag;if((void 0===t||512===t||1===t)&&Fp(a,n)>=2){const t=jp(a);t&&(e.props=n.hoist(t))}e.dynamicProps&&(e.dynamicProps=n.hoist(e.dynamicProps))}}}else if(12===a.type){if((r?0:Np(a,n))>=2){14===a.codegenNode.type&&a.codegenNode.arguments.length>0&&a.codegenNode.arguments.push("-1"),s.push(a);continue}}if(1===a.type){const t=1===a.tagType;t&&n.scopes.vSlot++,Ip(a,e,n,!1,i),t&&n.scopes.vSlot--}else if(11===a.type)Ip(a,e,n,1===a.children.length,!0);else if(9===a.type)for(let t=0;t<a.branches.length;t++)Ip(a.branches[t],e,n,1===a.branches[t].children.length,i)}let a=!1;if(s.length===o.length&&1===e.type)if(0===e.tagType&&e.codegenNode&&13===e.codegenNode.type&&v(e.codegenNode.children))e.codegenNode.children=l(Zd(e.codegenNode.children)),a=!0;else if(1===e.tagType&&e.codegenNode&&13===e.codegenNode.type&&e.codegenNode.children&&!v(e.codegenNode.children)&&15===e.codegenNode.children.type){const t=c(e.codegenNode,"default");t&&(t.returns=l(Zd(t.returns)),a=!0)}else if(3===e.tagType&&t&&1===t.type&&1===t.tagType&&t.codegenNode&&13===t.codegenNode.type&&t.codegenNode.children&&!v(t.codegenNode.children)&&15===t.codegenNode.children.type){const n=Ru(e,"slot",!0),r=n&&n.arg&&c(t.codegenNode,n.arg);r&&(r.returns=l(Zd(r.returns)),a=!0)}if(!a)for(const e of s)e.codegenNode=n.cache(e.codegenNode);function l(e){const t=n.cache(e);return t.needArraySpread=!0,t}function c(e,t){if(e.children&&!v(e.children)&&15===e.children.type){const n=e.children.properties.find(e=>e.key===t||e.key.content===t);return n&&n.value}}s.length&&n.transformHoist&&n.transformHoist(o,n,e)}function Np(e,t){const{constantCache:n}=t;switch(e.type){case 1:if(0!==e.tagType)return 0;const r=n.get(e);if(void 0!==r)return r;const i=e.codegenNode;if(13!==i.type)return 0;if(i.isBlock&&"svg"!==e.tag&&"foreignObject"!==e.tag&&"math"!==e.tag)return 0;if(void 0===i.patchFlag){let r=3;const o=Fp(e,t);if(0===o)return n.set(e,0),0;o<r&&(r=o);for(let i=0;i<e.children.length;i++){const o=Np(e.children[i],t);if(0===o)return n.set(e,0),0;o<r&&(r=o)}if(r>1)for(let i=0;i<e.props.length;i++){const o=e.props[i];if(7===o.type&&"bind"===o.name&&o.exp){const i=Np(o.exp,t);if(0===i)return n.set(e,0),0;i<r&&(r=i)}}if(i.isBlock){for(let t=0;t<e.props.length;t++){if(7===e.props[t].type)return n.set(e,0),0}t.removeHelper(md),t.removeHelper(lu(t.inSSR,i.isComponent)),i.isBlock=!1,t.helper(au(t.inSSR,i.isComponent))}return n.set(e,r),r}return n.set(e,0),0;case 2:case 3:return 3;case 9:case 11:case 10:default:return 0;case 5:case 12:return Np(e.content,t);case 4:return e.constType;case 8:let o=3;for(let n=0;n<e.children.length;n++){const r=e.children[n];if(x(r)||w(r))continue;const i=Np(r,t);if(0===i)return 0;i<o&&(o=i)}return o;case 20:return 2}}const Lp=new Set([Rd,Id,Nd,Ld]);function $p(e,t){if(14===e.type&&!x(e.callee)&&Lp.has(e.callee)){const n=e.arguments[0];if(4===n.type)return Np(n,t);if(14===n.type)return $p(n,t)}return 0}function Fp(e,t){let n=3;const r=jp(e);if(r&&15===r.type){const{properties:e}=r;for(let r=0;r<e.length;r++){const{key:i,value:o}=e[r],s=Np(i,t);if(0===s)return s;let a;if(s<n&&(n=s),a=4===o.type?Np(o,t):14===o.type?$p(o,t):0,0===a)return a;a<n&&(n=a)}}return n}function jp(e){const t=e.codegenNode;if(13===t.type)return t.props}function Vp(e,{filename:t="",prefixIdentifiers:n=!1,hoistStatic:r=!1,hmr:i=!1,cacheHandlers:o=!1,nodeTransforms:s=[],directiveTransforms:l={},transformHoist:d=null,isBuiltInComponent:u=c,isCustomElement:p=c,expressionPlugins:h=[],scopeId:f=null,slotted:g=!0,ssr:m=!1,inSSR:v=!1,ssrCssVars:A="",bindingMetadata:b=a,inline:y=!1,isTS:C=!1,onError:w=yu,onWarn:k=Cu,compatConfig:S}){const O=t.replace(/\?.*$/,"").match(/([^/\\]+)\.\w+$/),_={filename:t,selfName:O&&L(R(O[1])),prefixIdentifiers:n,hoistStatic:r,hmr:i,cacheHandlers:o,nodeTransforms:s,directiveTransforms:l,transformHoist:d,isBuiltInComponent:u,isCustomElement:p,expressionPlugins:h,scopeId:f,slotted:g,ssr:m,inSSR:v,ssrCssVars:A,bindingMetadata:b,inline:y,isTS:C,onError:w,onWarn:k,compatConfig:S,root:e,helpers:new Map,components:new Set,directives:new Set,hoists:[],imports:[],cached:[],constantCache:new WeakMap,vForMemoKeyedNodes:new WeakSet,temps:0,identifiers:Object.create(null),scopes:{vFor:0,vSlot:0,vPre:0,vOnce:0},parent:null,grandParent:null,currentNode:e,childIndex:0,inVOnce:!1,helper(e){const t=_.helpers.get(e)||0;return _.helpers.set(e,t+1),e},removeHelper(e){const t=_.helpers.get(e);if(t){const n=t-1;n?_.helpers.set(e,n):_.helpers.delete(e)}},helperString:e=>`_${Jd[_.helper(e)]}`,replaceNode(e){_.parent.children[_.childIndex]=_.currentNode=e},removeNode(e){const t=_.parent.children,n=e?t.indexOf(e):_.currentNode?_.childIndex:-1;e&&e!==_.currentNode?_.childIndex>n&&(_.childIndex--,_.onNodeRemoved()):(_.currentNode=null,_.onNodeRemoved()),_.parent.children.splice(n,1)},onNodeRemoved:c,addIdentifiers(e){},removeIdentifiers(e){},hoist(e){x(e)&&(e=nu(e)),_.hoists.push(e);const t=nu(`_hoisted_${_.hoists.length}`,!1,e.loc,2);return t.hoisted=e,t},cache(e,t=!1,n=!1){const r=function(e,t,n=!1,r=!1){return{type:20,index:e,value:t,needPauseTracking:n,inVOnce:r,needArraySpread:!1,loc:Gd}}(_.cached.length,e,t,n);return _.cached.push(r),r}};return _.filters=new Set,_}function Wp(e,t){const n=Vp(e,t);zp(e,n),t.hoistStatic&&Pp(e,n),t.ssr||function(e,t){const{helper:n}=t,{children:r}=e;if(1===r.length){const n=Rp(e);if(n&&n.codegenNode){const r=n.codegenNode;13===r.type&&cu(r,t),e.codegenNode=r}else e.codegenNode=r[0]}else if(r.length>1){let r=64;0,e.codegenNode=Kd(t,n(ud),void 0,e.children,r,void 0,void 0,!0,void 0,!1)}}(e,n),e.helpers=new Set([...n.helpers.keys()]),e.components=[...n.components],e.directives=[...n.directives],e.imports=n.imports,e.hoists=n.hoists,e.temps=n.temps,e.cached=n.cached,e.transformed=!0,e.filters=[...n.filters]}function zp(e,t){t.currentNode=e;const{nodeTransforms:n}=t,r=[];for(let i=0;i<n.length;i++){const o=n[i](e,t);if(o&&(v(o)?r.push(...o):r.push(o)),!t.currentNode)return;e=t.currentNode}switch(e.type){case 3:t.ssr||t.helper(Cd);break;case 5:t.ssr||t.helper(Dd);break;case 9:for(let n=0;n<e.branches.length;n++)zp(e.branches[n],t);break;case 10:case 11:case 1:case 0:!function(e,t){let n=0;const r=()=>{n--};for(;n<e.children.length;n++){const i=e.children[n];x(i)||(t.grandParent=t.parent,t.parent=e,t.childIndex=n,t.onNodeRemoved=r,zp(i,t))}}(e,t)}t.currentNode=e;let i=r.length;for(;i--;)r[i]()}function Qp(e,t){const n=x(e)?t=>t===e:t=>e.test(t);return(e,r)=>{if(1===e.type){const{props:i}=e;if(3===e.tagType&&i.some(Fu))return;const o=[];for(let s=0;s<i.length;s++){const a=i[s];if(7===a.type&&n(a.name)){i.splice(s,1),s--;const n=t(e,a,r);n&&o.push(n)}}return o}}}const Hp="/*@__PURE__*/",qp=e=>`${Jd[e]}: _${Jd[e]}`;function Up(e,t={}){const n=function(e,{mode:t="function",prefixIdentifiers:n="module"===t,sourceMap:r=!1,filename:i="template.vue.html",scopeId:o=null,optimizeImports:s=!1,runtimeGlobalName:a="Vue",runtimeModuleName:l="vue",ssrRuntimeModuleName:c="vue/server-renderer",ssr:d=!1,isTS:u=!1,inSSR:p=!1}){const h={mode:t,prefixIdentifiers:n,sourceMap:r,filename:i,scopeId:o,optimizeImports:s,runtimeGlobalName:a,runtimeModuleName:l,ssrRuntimeModuleName:c,ssr:d,isTS:u,inSSR:p,source:e.source,code:"",column:1,line:1,offset:0,indentLevel:0,pure:!1,map:void 0,helper:e=>`_${Jd[e]}`,push(e,t=-2,n){h.code+=e},indent(){f(++h.indentLevel)},deindent(e=!1){e?--h.indentLevel:f(--h.indentLevel)},newline(){f(h.indentLevel)}};function f(e){h.push("\n"+" ".repeat(e),0)}return h}(e,t);t.onContextCreated&&t.onContextCreated(n);const{mode:r,push:i,prefixIdentifiers:o,indent:s,deindent:a,newline:l,scopeId:c,ssr:d}=n,u=Array.from(e.helpers),p=u.length>0,h=!o&&"module"!==r;!function(e,t){const{ssr:n,prefixIdentifiers:r,push:i,newline:o,runtimeModuleName:s,runtimeGlobalName:a,ssrRuntimeModuleName:l}=t,c=a,d=Array.from(e.helpers);if(d.length>0&&(i(`const _Vue = ${c}\n`,-1),e.hoists.length)){i(`const { ${[bd,yd,Cd,xd,wd].filter(e=>d.includes(e)).map(qp).join(", ")} } = _Vue\n`,-1)}(function(e,t){if(!e.length)return;t.pure=!0;const{push:n,newline:r}=t;r();for(let i=0;i<e.length;i++){const o=e[i];o&&(n(`const _hoisted_${i+1} = `),Gp(o,t),r())}t.pure=!1})(e.hoists,t),o(),i("return ")}(e,n);if(i(`function ${d?"ssrRender":"render"}(${(d?["_ctx","_push","_parent","_attrs"]:["_ctx","_cache"]).join(", ")}) {`),s(),h&&(i("with (_ctx) {"),s(),p&&(i(`const { ${u.map(qp).join(", ")} } = _Vue\n`,-1),l())),e.components.length&&(Yp(e.components,"component",n),(e.directives.length||e.temps>0)&&l()),e.directives.length&&(Yp(e.directives,"directive",n),e.temps>0&&l()),e.filters&&e.filters.length&&(l(),Yp(e.filters,"filter",n),l()),e.temps>0){i("let ");for(let t=0;t<e.temps;t++)i(`${t>0?", ":""}_temp${t}`)}return(e.components.length||e.directives.length||e.temps)&&(i("\n",0),l()),d||i("return "),e.codegenNode?Gp(e.codegenNode,n):i("null"),h&&(a(),i("}")),a(),i("}"),{ast:e,code:n.code,preamble:"",map:n.map?n.map.toJSON():void 0}}function Yp(e,t,{helper:n,push:r,newline:i,isTS:o}){const s=n("filter"===t?_d:"component"===t?kd:Od);for(let n=0;n<e.length;n++){let a=e[n];const l=a.endsWith("__self");l&&(a=a.slice(0,-6)),r(`const ${qu(a,t)} = ${s}(${JSON.stringify(a)}${l?", true":""})${o?"!":""}`),n<e.length-1&&i()}}function Xp(e,t){const n=e.length>3||!1;t.push("["),n&&t.indent(),Jp(e,t,n),n&&t.deindent(),t.push("]")}function Jp(e,t,n=!1,r=!0){const{push:i,newline:o}=t;for(let s=0;s<e.length;s++){const a=e[s];x(a)?i(a,-3):v(a)?Xp(a,t):Gp(a,t),s<e.length-1&&(n?(r&&i(","),o()):r&&i(", "))}}function Gp(e,t){if(x(e))t.push(e,-3);else if(w(e))t.push(t.helper(e));else switch(e.type){case 1:case 9:case 11:case 12:Gp(e.codegenNode,t);break;case 2:!function(e,t){t.push(JSON.stringify(e.content),-3,e)}(e,t);break;case 4:Kp(e,t);break;case 5:!function(e,t){const{push:n,helper:r,pure:i}=t;i&&n(Hp);n(`${r(Dd)}(`),Gp(e.content,t),n(")")}(e,t);break;case 8:Zp(e,t);break;case 3:!function(e,t){const{push:n,helper:r,pure:i}=t;i&&n(Hp);n(`${r(Cd)}(${JSON.stringify(e.content)})`,-3,e)}(e,t);break;case 13:!function(e,t){const{push:n,helper:r,pure:i}=t,{tag:o,props:s,children:a,patchFlag:l,dynamicProps:c,directives:d,isBlock:u,disableTracking:p,isComponent:h}=e;let f;l&&(f=String(l));d&&n(r(Bd)+"(");u&&n(`(${r(md)}(${p?"true":""}), `);i&&n(Hp);const g=u?lu(t.inSSR,h):au(t.inSSR,h);n(r(g)+"(",-2,e),Jp(function(e){let t=e.length;for(;t--&&null==e[t];);return e.slice(0,t+1).map(e=>e||"null")}([o,s,a,f,c]),t),n(")"),u&&n(")");d&&(n(", "),Gp(d,t),n(")"))}(e,t);break;case 14:!function(e,t){const{push:n,helper:r,pure:i}=t,o=x(e.callee)?e.callee:r(e.callee);i&&n(Hp);n(o+"(",-2,e),Jp(e.arguments,t),n(")")}(e,t);break;case 15:!function(e,t){const{push:n,indent:r,deindent:i,newline:o}=t,{properties:s}=e;if(!s.length)return void n("{}",-2,e);const a=s.length>1||!1;n(a?"{":"{ "),a&&r();for(let e=0;e<s.length;e++){const{key:r,value:i}=s[e];eh(r,t),n(": "),Gp(i,t),e<s.length-1&&(n(","),o())}a&&i(),n(a?"}":" }")}(e,t);break;case 17:!function(e,t){Xp(e.elements,t)}(e,t);break;case 18:!function(e,t){const{push:n,indent:r,deindent:i}=t,{params:o,returns:s,body:a,newline:l,isSlot:c}=e;c&&n(`_${Jd[Hd]}(`);n("(",-2,e),v(o)?Jp(o,t):o&&Gp(o,t);n(") => "),(l||a)&&(n("{"),r());s?(l&&n("return "),v(s)?Xp(s,t):Gp(s,t)):a&&Gp(a,t);(l||a)&&(i(),n("}"));c&&(e.isNonScopedSlot&&n(", undefined, true"),n(")"))}(e,t);break;case 19:!function(e,t){const{test:n,consequent:r,alternate:i,newline:o}=e,{push:s,indent:a,deindent:l,newline:c}=t;if(4===n.type){const e=!Ou(n.content);e&&s("("),Kp(n,t),e&&s(")")}else s("("),Gp(n,t),s(")");o&&a(),t.indentLevel++,o||s(" "),s("? "),Gp(r,t),t.indentLevel--,o&&c(),o||s(" "),s(": ");const d=19===i.type;d||t.indentLevel++;Gp(i,t),d||t.indentLevel--;o&&l(!0)}(e,t);break;case 20:!function(e,t){const{push:n,helper:r,indent:i,deindent:o,newline:s}=t,{needPauseTracking:a,needArraySpread:l}=e;l&&n("[...(");n(`_cache[${e.index}] || (`),a&&(i(),n(`${r(Wd)}(-1`),e.inVOnce&&n(", true"),n("),"),s(),n("("));n(`_cache[${e.index}] = `),Gp(e.value,t),a&&(n(`).cacheIndex = ${e.index},`),s(),n(`${r(Wd)}(1),`),s(),n(`_cache[${e.index}]`),o());n(")"),l&&n(")]")}(e,t);break;case 21:Jp(e.body,t,!0,!1)}}function Kp(e,t){const{content:n,isStatic:r}=e;t.push(r?JSON.stringify(n):n,-3,e)}function Zp(e,t){for(let n=0;n<e.children.length;n++){const r=e.children[n];x(r)?t.push(r,-3):Gp(r,t)}}function eh(e,t){const{push:n}=t;if(8===e.type)n("["),Zp(e,t),n("]");else if(e.isStatic){n(Ou(e.content)?e.content:JSON.stringify(e.content),-2,e)}else n(`[${e.content}]`,-3,e)}new RegExp("\\b"+"arguments,await,break,case,catch,class,const,continue,debugger,default,delete,do,else,export,extends,finally,for,function,if,import,let,new,return,super,switch,throw,try,var,void,while,with,yield".split(",").join("\\b|\\b")+"\\b");const th=Qp(/^(?:if|else|else-if)$/,(e,t,n)=>function(e,t,n,r){if(!("else"===t.name||t.exp&&t.exp.content.trim())){const r=t.exp?t.exp.loc:e.loc;n.onError(xu(28,t.loc)),t.exp=nu("true",!1,r)}0;if("if"===t.name){const i=nh(e,t),o={type:9,loc:_p(e.loc),branches:[i]};if(n.replaceNode(o),r)return r(o,i,!0)}else{const i=n.parent.children;let o=i.indexOf(e);for(;o-- >=-1;){const s=i[o];if(!s||!Ju(s)){if(s&&9===s.type){"else-if"!==t.name&&"else"!==t.name||void 0!==s.branches[s.branches.length-1].condition||n.onError(xu(30,e.loc)),n.removeNode();const i=nh(e,t);0,s.branches.push(i);const o=r&&r(s,i,!1);zp(i,n),o&&o(),n.currentNode=null}else n.onError(xu(30,e.loc));break}n.removeNode(s)}}}(e,t,n,(e,t,r)=>{const i=n.parent.children;let o=i.indexOf(e),s=0;for(;o-- >=0;){const e=i[o];e&&9===e.type&&(s+=e.branches.length)}return()=>{if(r)e.codegenNode=rh(t,s,n);else{const r=function(e){for(;;)if(19===e.type){if(19!==e.alternate.type)return e;e=e.alternate}else 20===e.type&&(e=e.value)}(e.codegenNode);r.alternate=rh(t,s+e.branches.length-1,n)}}}));function nh(e,t){const n=3===e.tagType;return{type:10,loc:e.loc,condition:"else"===t.name?void 0:t.exp,children:n&&!Ru(e,"for")?e.children:[e],userKey:Iu(e,"key"),isTemplateIf:n}}function rh(e,t,n){return e.condition?su(e.condition,ih(e,t,n),iu(n.helper(Cd),['""',"true"])):ih(e,t,n)}function ih(e,t,n){const{helper:r}=n,i=tu("key",nu(`${t}`,!1,Gd,2)),{children:o}=e,s=o[0];if(1!==o.length||1!==s.type){if(1===o.length&&11===s.type){const e=s.codegenNode;return Qu(e,i,n),e}{let t=64;return Kd(n,r(ud),eu([i]),o,t,void 0,void 0,!0,!1,!1,e.loc)}}{const e=s.codegenNode,t=14===(a=e).type&&a.callee===Yd?a.arguments[1].returns:a;return 13===t.type&&cu(t,n),Qu(t,i,n),e}var a}const oh=Qp("for",(e,t,n)=>{const{helper:r,removeHelper:i}=n;return function(e,t,n,r){if(!t.exp)return void n.onError(xu(31,t.loc));const i=t.forParseResult;if(!i)return void n.onError(xu(32,t.loc));sh(i,n);const{addIdentifiers:o,removeIdentifiers:s,scopes:a}=n,{source:l,value:c,key:d,index:u}=i,p={type:11,loc:t.loc,source:l,valueAlias:c,keyAlias:d,objectIndexAlias:u,parseResult:i,children:ju(e)?e.children:[e]};n.replaceNode(p),a.vFor++;const h=r&&r(p);return()=>{a.vFor--,h&&h()}}(e,t,n,t=>{const o=iu(r(Ed),[t.source]),s=ju(e),a=Ru(e,"memo"),l=Iu(e,"key",!1,!0);l&&l.type;let c=l&&(6===l.type?l.value?nu(l.value.content,!0):void 0:l.exp);const d=c?tu("key",c):null,u=4===t.source.type&&t.source.constType>0,p=u?64:l?128:256;return t.codegenNode=Kd(n,r(ud),void 0,o,p,void 0,void 0,!0,!u,!1,e.loc),()=>{var l;let p;const{children:h}=t;const f=1!==h.length||1!==h[0].type,g=Vu(e)?e:s&&1===e.children.length&&Vu(e.children[0])?e.children[0]:null;if(g)p=g.codegenNode,s&&d&&Qu(p,d,n);else if(f)p=Kd(n,r(ud),d?eu([d]):void 0,e.children,64,void 0,void 0,!0,void 0,!1);else{p=h[0].codegenNode,s&&d&&Qu(p,d,n);const e=!u||!0===p.isBlockRequired;p.isBlock!==e&&(p.isBlock?(i(md),i(lu(n.inSSR,p.isComponent))):i(au(n.inSSR,p.isComponent))),p.isBlock=e,p.isBlock?(r(md),r(lu(n.inSSR,p.isComponent))):(r(au(n.inSSR,p.isComponent)),p.needsPatch&&(p.patchFlag=512|(null!=(l=p.patchFlag)?l:0)))}if(a){const e=ou(ah(t.parseResult,[nu("_cached")]));e.body={type:21,body:[ru(["const _memo = (",a.exp,")"]),ru(["if (_cached && _cached.el",...c?[" && _cached.key === (",c,")"]:[],` && ${n.helperString(Xd)}(_cached, _memo)) return _cached`]),ru(["const _item = ",p]),nu("_item.memo = _memo"),nu("return _item")],loc:Gd},o.arguments.push(e,nu("_cache"),nu(String(n.cached.length))),n.cached.push(null)}else o.arguments.push(ou(ah(t.parseResult),p,!0))}})});function sh(e,t){e.finalized||(e.finalized=!0)}function ah({value:e,key:t,index:n},r=[]){return function(e){let t=e.length;for(;t--&&!e[t];);return e.slice(0,t+1).map((e,t)=>e||nu("_".repeat(t+1),!1))}([e,t,n,...r])}const lh=nu("undefined",!1),ch=(e,t)=>{if(1===e.type&&(1===e.tagType||3===e.tagType)){const n=Ru(e,"slot");if(n)return n.exp,t.scopes.vSlot++,()=>{t.scopes.vSlot--}}},dh=(e,t,n,r)=>ou(e,n,!1,!0,n.length?n[0].loc:r);function uh(e,t,n=dh){t.helper(Hd);const{children:r,loc:i}=e,o=[],s=[];let a=t.scopes.vSlot>0||t.scopes.vFor>0;const l=Ru(e,"slot",!0);if(l){const{arg:e,exp:t}=l;e&&!wu(e)&&(a=!0),o.push(tu(e||nu("default",!0),n(t,void 0,r,i)))}let c=!1,d=!1;const u=[],p=new Set;let h=0;for(let e=0;e<r.length;e++){const i=r[e];let f;if(!ju(i)||!(f=Ru(i,"slot",!0))){3!==i.type&&u.push(i);continue}if(l){t.onError(xu(37,f.loc));break}c=!0;const{children:g,loc:m}=i,{arg:v=nu("default",!0),exp:A,loc:b}=f;let y;wu(v)?y=v?v.content:"default":a=!0;const C=Ru(i,"for"),x=n(A,C,g,m);let w,k;if(w=Ru(i,"if"))a=!0,s.push(su(w.exp,ph(v,x,h++),lh));else if(k=Ru(i,/^else(?:-if)?$/,!0)){let n,i=e;for(;i--&&(n=r[i],Ju(n)););if(n&&ju(n)&&Ru(n,/^(?:else-)?if$/)){let e=s[s.length-1];for(;19===e.alternate.type;)e=e.alternate;e.alternate=k.exp?su(k.exp,ph(v,x,h++),lh):ph(v,x,h++)}else t.onError(xu(30,k.loc))}else if(C){a=!0;const e=C.forParseResult;e?(sh(e),s.push(iu(t.helper(Ed),[e.source,ou(ah(e),ph(v,x),!0)]))):t.onError(xu(32,C.loc))}else{if(y){if(p.has(y)){t.onError(xu(38,b));continue}p.add(y),"default"===y&&(d=!0)}o.push(tu(v,x))}}if(!l){const e=(e,r)=>{const o=n(e,void 0,r,i);return t.compatConfig&&(o.isNonScopedSlot=!0),tu("default",o)};c?u.length&&!u.every(Xu)&&(d?t.onError(xu(39,u[0].loc)):o.push(e(void 0,u))):o.push(e(void 0,r))}const f=a?2:hh(e.children)?3:1;let g=eu(o.concat(tu("_",nu(f+"",!1))),i);return s.length&&(g=iu(t.helper(Md),[g,Zd(s)])),{slots:g,hasDynamicSlots:a}}function ph(e,t,n){const r=[tu("name",e),tu("fn",t)];return null!=n&&r.push(tu("key",nu(String(n),!0))),eu(r)}function hh(e){for(let t=0;t<e.length;t++){const n=e[t];switch(n.type){case 1:if(2===n.tagType||hh(n.children))return!0;break;case 9:if(hh(n.branches))return!0;break;case 10:case 11:if(hh(n.children))return!0}}return!1}const fh=new WeakMap,gh=(e,t)=>function(){if(1!==(e=t.currentNode).type||0!==e.tagType&&1!==e.tagType)return;const{tag:n,props:r}=e,i=1===e.tagType;let o=i?function(e,t,n=!1){let{tag:r}=e;const i=bh(r),o=Iu(e,"is",!1,!0);if(o)if(i||Au("COMPILER_IS_ON_ELEMENT",t)){let e;if(6===o.type?e=o.value&&nu(o.value.content,!0):(e=o.exp,e||(e=nu("is",!1,o.arg.loc))),e)return iu(t.helper(Sd),[e])}else 6===o.type&&o.value.content.startsWith("vue:")&&(r=o.value.content.slice(4));const s=ku(r)||t.isBuiltInComponent(r);if(s)return n||t.helper(s),s;return t.helper(kd),t.components.add(r),qu(r,"component")}(e,t):`"${n}"`;const s=k(o)&&o.callee===Sd;let a,l,c,d,u,p=0,h=!1,f=!1,g=s||o===pd||o===hd||!i&&("svg"===n||"foreignObject"===n||"math"===n);if(r.length>0){const n=mh(e,t,void 0,i,s);a=n.props,p=n.patchFlag,d=n.dynamicPropNames,h=n.needsPatch,f=n.isBlockRequired;const r=n.directives;u=r&&r.length?Zd(r.map(e=>function(e,t){const n=[],r=fh.get(e);r?n.push(t.helperString(r)):(t.helper(Od),t.directives.add(e.name),n.push(qu(e.name,"directive")));const{loc:i}=e;e.exp&&n.push(e.exp);e.arg&&(e.exp||n.push("void 0"),n.push(e.arg));if(Object.keys(e.modifiers).length){e.arg||(e.exp||n.push("void 0"),n.push("void 0"));const t=nu("true",!1,i);n.push(eu(e.modifiers.map(e=>tu(e,t)),i))}return Zd(n,e.loc)}(e,t))):void 0,n.shouldUseBlock&&(g=!0)}if(e.children.length>0){o===fd&&(g=!0,p|=1024);if(i&&o!==pd&&o!==fd){const{slots:n,hasDynamicSlots:r}=uh(e,t);l=n,r&&(p|=1024)}else if(1===e.children.length&&o!==pd){const n=e.children[0],r=n.type,i=5===r||8===r;i&&0===Np(n,t)&&(p|=1),l=i||2===r?n:e.children}else l=e.children}d&&d.length&&(c=function(e){let t="[";for(let n=0,r=e.length;n<r;n++)t+=JSON.stringify(e[n]),n<r-1&&(t+=", ");return t+"]"}(d));const m=e.codegenNode=Kd(t,o,a,l,0===p?void 0:p,c,u,!!g,!1,i,e.loc);h=h&&(0===p||32===p),h&&(m.needsPatch=!0),f&&(m.isBlockRequired=!0)};function mh(e,t,n=e.props,r,i,o=!1){const{tag:s,loc:a,children:l}=e;let c=[];const d=[],p=[],h=l.length>0;let f=!1,g=!1,m=0,v=!1,A=!1,b=!1,y=!1,C=!1,x=!1;const k=[],S=e=>{c.length&&(d.push(eu(vh(c),a)),c=[]),e&&d.push(e)},O=()=>{t.scopes.vFor>0&&c.push(tu(nu("ref_for",!0),nu("true")))},_=({key:e,value:n})=>{if(wu(e)){const o=e.content,s=u(o);if(!s||r&&!i||"onclick"===o.toLowerCase()||"onUpdate:modelValue"===o||T(o)||(y=!0),s&&T(o)&&(x=!0),"ref"===o&&(v=!0),s&&14===n.type&&(n=n.arguments[0]),20===n.type||(4===n.type||8===n.type)&&Np(n,t)>0)return;"class"===o?A=!0:"style"===o?b=!0:"ref"===o||"key"===o||k.includes(o)||k.push(o),!r||"class"!==o&&"style"!==o||k.includes(o)||k.push(o)}else C=!0};for(let i=0;i<n.length;i++){const l=n[i];if(6===l.type){const{loc:e,name:n,nameLoc:r,value:i}=l;let o=!0;if("ref"===n&&(v=!0,O()),"is"===n&&(bh(s)||i&&i.content.startsWith("vue:")||Au("COMPILER_IS_ON_ELEMENT",t)))continue;c.push(tu(nu(n,!0,r),nu(i?i.content:"",o,i?i.loc:e)))}else{const{name:n,arg:i,exp:u,loc:v,modifiers:A}=l,b="bind"===n,y="on"===n;if("slot"===n){r||t.onError(xu(40,v));continue}if("once"===n||"memo"===n)continue;if("is"===n||b&&Nu(i,"is")&&(bh(s)||Au("COMPILER_IS_ON_ELEMENT",t)))continue;if(y&&o)continue;if(b&&Nu(i,"key")&&(f=!0),y&&h&&i&&wu(i)&&"vue:beforeUpdate"===R(i.content)&&(f=!0,g=!0),b&&Nu(i,"ref")&&O(),!i&&(b||y)){if(C=!0,u)if(b){if(S(),Au("COMPILER_V_BIND_OBJECT_ORDER",t)){d.unshift(u);continue}O(),S(),d.push(u)}else S({type:14,loc:v,callee:t.helper($d),arguments:r?[u]:[u,"true"]});else t.onError(xu(b?34:35,v));continue}b&&A.some(e=>"prop"===e.content)&&(m|=32);const x=t.directiveTransforms[n];if(x){const{props:n,needRuntime:r}=x(l,e,t);!o&&n.forEach(_),y&&i&&!wu(i)?S(eu(n,a)):c.push(...n),r&&(p.push(l),w(r)&&fh.set(l,r))}else M(n)||(p.push(l),h&&(f=!0,g=!0))}}let B;d.length?(S(),B=d.length>1?iu(t.helper(Pd),d,a):d[0]):c.length&&(B=eu(vh(c),a)),C?m|=16:(A&&!r&&(m|=2),b&&!r&&(m|=4),k.length&&(m|=8),y&&(m|=32));const E=(0===m||32===m)&&(v||x||p.length>0);if(!f&&E&&(m|=512),!t.inSSR&&B)switch(B.type){case 15:let e=-1,n=-1,r=!1;for(let t=0;t<B.properties.length;t++){const i=B.properties[t].key;wu(i)?"class"===i.content?e=t:"style"===i.content&&(n=t):i.isHandlerKey||(r=!0)}const i=B.properties[e],o=B.properties[n];r?B=iu(t.helper(Nd),[B]):(i&&!wu(i.value)&&(i.value=iu(t.helper(Rd),[i.value])),o&&(b||4===o.value.type&&"["===o.value.content.trim()[0]||17===o.value.type)&&(o.value=iu(t.helper(Id),[o.value])));break;case 14:break;default:B=iu(t.helper(Nd),[iu(t.helper(Ld),[B])])}return{props:B,directives:p,patchFlag:m,dynamicPropNames:k,shouldUseBlock:f,needsPatch:E,isBlockRequired:g}}function vh(e){const t=new Map,n=[];for(let r=0;r<e.length;r++){const i=e[r];if(8===i.key.type||!i.key.isStatic){n.push(i);continue}const o=i.key.content,s=t.get(o);s?("style"===o||"class"===o||u(o))&&Ah(s,i):(t.set(o,i),n.push(i))}return n}function Ah(e,t){17===e.value.type?e.value.elements.push(t.value):e.value=Zd([e.value,t.value],e.loc)}function bh(e){return"component"===e||"Component"===e}const yh=(e,t)=>{if(Vu(e)){const{children:n,loc:r}=e,{slotName:i,slotProps:o}=function(e,t){let n,r='"default"';const i=[];for(let t=0;t<e.props.length;t++){const n=e.props[t];if(6===n.type)n.value&&("name"===n.name?r=JSON.stringify(n.value.content):(n.name=R(n.name),i.push(n)));else if("bind"===n.name&&Nu(n.arg,"name")){if(n.exp)r=n.exp;else if(n.arg&&4===n.arg.type){const e=R(n.arg.content);r=n.exp=nu(e,!1,n.arg.loc)}}else"bind"===n.name&&n.arg&&wu(n.arg)&&(n.arg.content=R(n.arg.content)),i.push(n)}if(i.length>0){const{props:r,directives:o}=mh(e,t,i,!1,!1);n=r,o.length&&t.onError(xu(36,o[0].loc))}return{slotName:r,slotProps:n}}(e,t),s=[t.prefixIdentifiers?"_ctx.$slots":"$slots",i,"{}","undefined","true"];let a=2;o&&(s[2]=o,a=3),n.length&&(s[3]=ou([],n,!1,!1,r),a=4),t.scopeId&&!t.slotted&&(a=5),s.splice(a),e.codegenNode=iu(t.helper(Td),s,r)}};const Ch=(e,t,n,r)=>{const{loc:i,modifiers:o,arg:s}=e;let a;if(e.exp||o.length||n.onError(xu(35,i)),4===s.type)if(s.isStatic){let e=s.content;0,e.startsWith("vue:")&&(e=`vnode-${e.slice(4)}`);a=nu(0!==t.tagType||e.startsWith("vnode")||!/[A-Z]/.test(e)?$(R(e)):`on:${e}`,!0,s.loc)}else a=ru([`${n.helperString(Vd)}(`,s,")"]);else a=s,a.children.unshift(`${n.helperString(Vd)}(`),a.children.push(")");let l=e.exp;l&&!l.content.trim()&&(l=void 0);let c=n.cacheHandlers&&!l&&!n.inVOnce;if(l){const e=Mu(l),t=!(e||Pu(l)),n=l.content.includes(";");0,(t||c&&e)&&(l=ru([`${t?"$event":"(...args)"} => ${n?"{":"("}`,l,n?"}":")"]))}let d={props:[tu(a,l||nu("() => {}",!1,i))]};return r&&(d=r(d)),c&&(d.props[0].value=n.cache(d.props[0].value)),d.props.forEach(e=>e.key.isHandlerKey=!0),d},xh=(e,t,n)=>{const{modifiers:r,loc:i}=e,o=e.arg;let{exp:s}=e;return s&&4===s.type&&!s.content.trim()&&(s=void 0),4!==o.type?(o.children.unshift("("),o.children.push(') || ""')):o.isStatic||(o.content=o.content?`${o.content} || ""`:'""'),r.some(e=>"camel"===e.content)&&(4===o.type?o.isStatic?o.content=R(o.content):o.content=`${n.helperString(Fd)}(${o.content})`:(o.children.unshift(`${n.helperString(Fd)}(`),o.children.push(")"))),n.inSSR||(r.some(e=>"prop"===e.content)&&wh(o,"."),r.some(e=>"attr"===e.content)&&wh(o,"^")),{props:[tu(o,s)]}},wh=(e,t)=>{4===e.type?e.isStatic?e.content=t+e.content:e.content=`\`${t}\${${e.content}}\``:(e.children.unshift(`'${t}' + (`),e.children.push(")"))},kh=(e,t)=>{if(0===e.type||1===e.type||11===e.type||10===e.type)return()=>{const n=e.children;let r,i=!1;for(let e=0;e<n.length;e++){const t=n[e];if(Lu(t)){i=!0;for(let i=e+1;i<n.length;i++){const o=n[i];if(!Lu(o)){r=void 0;break}r||(r=n[e]=ru([t],t.loc)),r.children.push(" + ",o),n.splice(i,1),i--}}}if(i&&(1!==n.length||0!==e.type&&(1!==e.type||0!==e.tagType||e.props.find(e=>7===e.type&&!t.directiveTransforms[e.name])||"template"===e.tag)))for(let e=0;e<n.length;e++){const r=n[e];if(Lu(r)||8===r.type){const i=[];2===r.type&&" "===r.content||i.push(r),t.ssr||0!==Np(r,t)||i.push("1"),n[e]={type:12,content:r,loc:r.loc,codegenNode:iu(t.helper(xd),i)}}}}},Sh=new WeakSet,Oh=(e,t)=>{if(1===e.type&&Ru(e,"once",!0)){if(Sh.has(e)||t.inVOnce||t.inSSR)return;return Sh.add(e),t.inVOnce=!0,t.helper(Wd),()=>{t.inVOnce=!1;const e=t.currentNode;e.codegenNode&&(e.codegenNode=t.cache(e.codegenNode,!0,!0))}}},_h=(e,t,n)=>{const{exp:r,arg:i}=e;if(!r)return n.onError(xu(41,e.loc)),Bh();const o=r.loc.source.trim(),s=4===r.type?r.content:o,a=n.bindingMetadata[o];if("props"===a||"props-aliased"===a)return n.onError(xu(44,r.loc)),Bh();if("literal-const"===a||"setup-const"===a)return n.onError(xu(45,r.loc)),Bh();if(!s.trim()||!Mu(r))return n.onError(xu(42,r.loc)),Bh();const l=i||nu("modelValue",!0),c=i?wu(i)?`onUpdate:${R(i.content)}`:ru(['"onUpdate:" + ',i]):"onUpdate:modelValue";let d;d=ru([`${n.isTS?"($event: any)":"$event"} => ((`,r,") = $event)"]);const u=[tu(l,e.exp),tu(c,d)];if(e.modifiers.length&&1===t.tagType){const t=e.modifiers.map(e=>e.content).map(e=>(Ou(e)?e:JSON.stringify(e))+": true").join(", "),n=i?wu(i)?`${i.content}Modifiers`:ru([i,' + "Modifiers"']):"modelModifiers";u.push(tu(n,nu(`{ ${t} }`,!1,e.loc,2)))}return Bh(u)};function Bh(e=[]){return{props:e}}const Eh=/[\w).+\-_$\]]/,Th=(e,t)=>{Au("COMPILER_FILTERS",t)&&(5===e.type?Mh(e.content,t):1===e.type&&e.props.forEach(e=>{7===e.type&&"for"!==e.name&&e.exp&&Mh(e.exp,t)}))};function Mh(e,t){if(4===e.type)Dh(e,t);else for(let n=0;n<e.children.length;n++){const r=e.children[n];"object"==typeof r&&(4===r.type?Dh(r,t):8===r.type?Mh(r,t):5===r.type&&Mh(r.content,t))}}function Dh(e,t){const n=e.content;let r,i,o,s,a=!1,l=!1,c=!1,d=!1,u=0,p=0,h=0,f=0,g=[];for(o=0;o<n.length;o++)if(i=r,r=n.charCodeAt(o),a)39===r&&92!==i&&(a=!1);else if(l)34===r&&92!==i&&(l=!1);else if(c)96===r&&92!==i&&(c=!1);else if(d)47===r&&92!==i&&(d=!1);else if(124!==r||124===n.charCodeAt(o+1)||124===n.charCodeAt(o-1)||u||p||h){switch(r){case 34:l=!0;break;case 39:a=!0;break;case 96:c=!0;break;case 40:h++;break;case 41:h--;break;case 91:p++;break;case 93:p--;break;case 123:u++;break;case 125:u--}if(47===r){let e,t=o-1;for(;t>=0&&(e=n.charAt(t)," "===e);t--);e&&Eh.test(e)||(d=!0)}}else void 0===s?(f=o+1,s=n.slice(0,o).trim()):m();function m(){g.push(n.slice(f,o).trim()),f=o+1}if(void 0===s?s=n.slice(0,o).trim():0!==f&&m(),g.length){for(o=0;o<g.length;o++)s=Ph(s,g[o],t);e.content=s,e.ast=void 0}}function Ph(e,t,n){n.helper(_d);const r=t.indexOf("(");if(r<0)return n.filters.add(t),`${qu(t,"filter")}(${e})`;{const i=t.slice(0,r),o=t.slice(r+1);return n.filters.add(i),`${qu(i,"filter")}(${e}${")"!==o?","+o:o}`}}const Rh=new WeakSet,Ih=(e,t)=>{if(1===e.type){const n=Ru(e,"memo");if(!n||Rh.has(e)||t.inSSR)return;return Rh.add(e),()=>{const r=e.codegenNode||t.currentNode.codegenNode;r&&13===r.type&&(1!==e.tagType&&cu(r,t),e.codegenNode=iu(t.helper(Yd),[n.exp,ou(void 0,r),"_cache",String(t.cached.length)]),t.cached.push(null))}}},Nh=(e,t)=>{if(1===e.type)for(const n of e.props)if(7===n.type&&"bind"===n.name&&(!n.exp||4===n.exp.type&&!n.exp.content.trim())&&n.arg){const e=n.arg;if(4===e.type&&e.isStatic){const t=R(e.content);(_u.test(t[0])||"-"===t[0])&&(n.exp=nu(t,!1,e.loc))}else t.onError(xu(53,e.loc)),n.exp=nu("",!0,e.loc)}};function Lh(e,t={}){const n=t.onError||yu,r="module"===t.mode;!0===t.prefixIdentifiers?n(xu(48)):r&&n(xu(49));t.cacheHandlers&&n(xu(50)),t.scopeId&&!r&&n(xu(51));const i=h({},t,{prefixIdentifiers:!1}),o=x(e)?Dp(e,i):e,[s,a]=[[Nh,Oh,th,Ih,oh,Th,yh,gh,ch,kh],{on:Ch,bind:xh,model:_h}];return Wp(o,h({},i,{nodeTransforms:[...s,...t.nodeTransforms||[]],directiveTransforms:h({},a,t.directiveTransforms||{})})),Up(o,i)}const $h=Symbol(""),Fh=Symbol(""),jh=Symbol(""),Vh=Symbol(""),Wh=Symbol(""),zh=Symbol(""),Qh=Symbol(""),Hh=Symbol(""),qh=Symbol(""),Uh=Symbol("");var Yh;let Xh;Yh={[$h]:"vModelRadio",[Fh]:"vModelCheckbox",[jh]:"vModelText",[Vh]:"vModelSelect",[Wh]:"vModelDynamic",[zh]:"withModifiers",[Qh]:"withKeys",[Hh]:"vShow",[qh]:"Transition",[Uh]:"TransitionGroup"},Object.getOwnPropertySymbols(Yh).forEach(e=>{Jd[e]=Yh[e]});const Jh={parseMode:"html",isVoidTag:re,isNativeTag:e=>ee(e)||te(e)||ne(e),isPreTag:e=>"pre"===e,isIgnoreNewlineTag:e=>"pre"===e||"textarea"===e,decodeEntities:function(e,t=!1){return Xh||(Xh=document.createElement("div")),t?(Xh.innerHTML=`<div foo="${e.replace(/"/g,""")}">`,Xh.children[0].getAttribute("foo")):(Xh.innerHTML=e,Xh.textContent)},isBuiltInComponent:e=>"Transition"===e||"transition"===e?qh:"TransitionGroup"===e||"transition-group"===e?Uh:void 0,getNamespace(e,t,n){let r=t?t.ns:n;if(t&&2===r)if("annotation-xml"===t.tag){if("svg"===e)return 1;t.props.some(e=>6===e.type&&"encoding"===e.name&&null!=e.value&&("text/html"===e.value.content||"application/xhtml+xml"===e.value.content))&&(r=0)}else/^m(?:[ions]|text)$/.test(t.tag)&&"mglyph"!==e&&"malignmark"!==e&&(r=0);else t&&1===r&&("foreignObject"!==t.tag&&"desc"!==t.tag&&"title"!==t.tag||(r=0));if(0===r){if("svg"===e)return 1;if("math"===e)return 2}return r}},Gh=(e,t)=>{const n=G(e);return nu(JSON.stringify(n),!1,t,3)};function Kh(e,t){return xu(e,t)}const Zh=s("passive,once,capture"),ef=s("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),tf=s("left,right"),nf=s("onkeyup,onkeydown,onkeypress"),rf=(e,t)=>wu(e)&&"onclick"===e.content.toLowerCase()?nu(t,!0):4!==e.type?ru(["(",e,`) === "onClick" ? "${t}" : (`,e,")"]):e;function of(e){const t=e.children=e.children.filter(e=>!Ju(e)),n=t[0];return 1!==t.length||11===n.type||9===n.type&&n.branches.some(of)}const sf=(e,t)=>{1!==e.type||0!==e.tagType||"script"!==e.tag&&"style"!==e.tag||t.removeNode()};const af=[e=>{1===e.type&&e.props.forEach((t,n)=>{6===t.type&&"style"===t.name&&t.value&&(e.props[n]={type:7,name:"bind",arg:nu("style",!0,t.loc),exp:Gh(t.value.content,t.loc),modifiers:[],loc:t.loc})})},(e,t)=>{if(1===e.type&&1===e.tagType){if(t.isBuiltInComponent(e.tag)===qh)return()=>{if(!e.children.length)return;of(e);const t=e.children[0];if(1===t.type)for(const n of t.props)7===n.type&&"show"===n.name&&e.props.push({type:6,name:"persisted",nameLoc:e.loc,value:void 0,loc:e.loc})}}}],lf={cloak:()=>({props:[]}),html:(e,t,n)=>{const{exp:r,loc:i}=e;return r||n.onError(Kh(54,i)),t.children.length&&(n.onError(Kh(55,i)),t.children.length=0),{props:[tu(nu("innerHTML",!0,i),r||nu("",!0))]}},text:(e,t,n)=>{const{exp:r,loc:i}=e;return r||n.onError(Kh(56,i)),t.children.length&&(n.onError(Kh(57,i)),t.children.length=0),{props:[tu(nu("textContent",!0),r?Np(r,n)>0?r:iu(n.helperString(Dd),[r],i):nu("",!0))]}},model:(e,t,n)=>{const r=_h(e,t,n);if(!r.props.length||1===t.tagType)return r;e.arg&&n.onError(Kh(59,e.arg.loc));const{tag:i}=t,o=n.isCustomElement(i);if("input"===i||"textarea"===i||"select"===i||o){let s=jh,a=!1;if("input"===i||o){const r=Iu(t,"type");if(r){if(7===r.type)s=Wh;else if(r.value)switch(r.value.content){case"radio":s=$h;break;case"checkbox":s=Fh;break;case"file":a=!0,n.onError(Kh(60,e.loc))}}else(function(e){return e.props.some(e=>!(7!==e.type||"bind"!==e.name||e.arg&&4===e.arg.type&&e.arg.isStatic))})(t)&&(s=Wh)}else"select"===i&&(s=Vh);a||(r.needRuntime=n.helper(s))}else n.onError(Kh(58,e.loc));return r.props=r.props.filter(e=>!(4===e.key.type&&"modelValue"===e.key.content)),r},on:(e,t,n)=>Ch(e,t,n,t=>{const{modifiers:r}=e;if(!r.length)return t;let{key:i,value:o}=t.props[0];const{keyModifiers:s,nonKeyModifiers:a,eventOptionModifiers:l}=((e,t,n)=>{const r=[],i=[],o=[];for(let s=0;s<t.length;s++){const a=t[s].content;"native"===a&&bu("COMPILER_V_ON_NATIVE",n)||Zh(a)?o.push(a):tf(a)?wu(e)?nf(e.content.toLowerCase())?r.push(a):i.push(a):(r.push(a),i.push(a)):ef(a)?i.push(a):r.push(a)}return{keyModifiers:r,nonKeyModifiers:i,eventOptionModifiers:o}})(i,r,n,e.loc);if(a.includes("right")&&(i=rf(i,"onContextmenu")),a.includes("middle")&&(i=rf(i,"onMouseup")),a.length&&(o=iu(n.helper(zh),[o,JSON.stringify(a)])),!s.length||wu(i)&&!nf(i.content.toLowerCase())||(o=iu(n.helper(Qh),[o,JSON.stringify(s)])),l.length){const e=l.map(L).join("");i=wu(i)?nu(`${i.content}${e}`,!0):ru(["(",i,`) + "${e}"`])}return{props:[tu(i,o)]}}),show:(e,t,n)=>{const{exp:r,loc:i}=e;return r||n.onError(Kh(62,i)),{props:[],needRuntime:n.helper(Hh)}}};const cf=Object.create(null);Fa(function(e,t){if(!x(e)){if(!e.nodeType)return c;e=e.innerHTML}const n=function(e,t){return e+JSON.stringify(t,(e,t)=>"function"==typeof t?t.toString():t)}(e,t),r=cf[n];if(r)return r;if("#"===e[0]){const t=document.querySelector(e);0,e=t?t.innerHTML:""}const i=h({hoistStatic:!0,onError:void 0,onWarn:c},t);i.isCustomElement||"undefined"==typeof customElements||(i.isCustomElement=e=>!!customElements.get(e));const{code:s}=function(e,t={}){return Lh(e,h({},Jh,t,{nodeTransforms:[sf,...af,...t.nodeTransforms||[]],directiveTransforms:h({},lf,t.directiveTransforms||{}),transformHoist:null}))}(e,i),a=new Function("Vue",s)(o);return a._rc=!0,cf[n]=a});const df=wp.i18n;function uf(){return uf.c||(uf.c=n.n(r()))}r();var pf=n(877),hf={insert:"head",singleton:!1};uf()()(pf.A,hf);pf.A.locals;function ff(e){return(ff="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var gf=/^\s+/,mf=/\s+$/;function vf(e,t){if(t=t||{},(e=e||"")instanceof vf)return e;if(!(this instanceof vf))return new vf(e,t);var n=function(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,o=null,s=!1,a=!1;return"string"==typeof e&&(e=function(e){e=e.replace(gf,"").replace(mf,"").toLowerCase();var t,n=!1;if(Rf[e])e=Rf[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};return(t=Uf.rgb.exec(e))?{r:t[1],g:t[2],b:t[3]}:(t=Uf.rgba.exec(e))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=Uf.hsl.exec(e))?{h:t[1],s:t[2],l:t[3]}:(t=Uf.hsla.exec(e))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=Uf.hsv.exec(e))?{h:t[1],s:t[2],v:t[3]}:(t=Uf.hsva.exec(e))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=Uf.hex8.exec(e))?{r:Ff(t[1]),g:Ff(t[2]),b:Ff(t[3]),a:zf(t[4]),format:n?"name":"hex8"}:(t=Uf.hex6.exec(e))?{r:Ff(t[1]),g:Ff(t[2]),b:Ff(t[3]),format:n?"name":"hex"}:(t=Uf.hex4.exec(e))?{r:Ff(t[1]+""+t[1]),g:Ff(t[2]+""+t[2]),b:Ff(t[3]+""+t[3]),a:zf(t[4]+""+t[4]),format:n?"name":"hex8"}:!!(t=Uf.hex3.exec(e))&&{r:Ff(t[1]+""+t[1]),g:Ff(t[2]+""+t[2]),b:Ff(t[3]+""+t[3]),format:n?"name":"hex"}}(e)),"object"==ff(e)&&(Yf(e.r)&&Yf(e.g)&&Yf(e.b)?(t=function(e,t,n){return{r:255*Lf(e,255),g:255*Lf(t,255),b:255*Lf(n,255)}}(e.r,e.g,e.b),s=!0,a="%"===String(e.r).substr(-1)?"prgb":"rgb"):Yf(e.h)&&Yf(e.s)&&Yf(e.v)?(r=Vf(e.s),i=Vf(e.v),t=function(e,t,n){e=6*Lf(e,360),t=Lf(t,100),n=Lf(n,100);var r=Math.floor(e),i=e-r,o=n*(1-t),s=n*(1-i*t),a=n*(1-(1-i)*t),l=r%6,c=[n,s,o,o,a,n][l],d=[a,n,n,s,o,o][l],u=[o,o,a,n,n,s][l];return{r:255*c,g:255*d,b:255*u}}(e.h,r,i),s=!0,a="hsv"):Yf(e.h)&&Yf(e.s)&&Yf(e.l)&&(r=Vf(e.s),o=Vf(e.l),t=function(e,t,n){var r,i,o;function s(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=Lf(e,360),t=Lf(t,100),n=Lf(n,100),0===t)r=i=o=n;else{var a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;r=s(l,a,e+1/3),i=s(l,a,e),o=s(l,a,e-1/3)}return{r:255*r,g:255*i,b:255*o}}(e.h,r,o),s=!0,a="hsl"),e.hasOwnProperty("a")&&(n=e.a)),n=Nf(n),{ok:s,format:e.format||a,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}function Af(e,t,n){e=Lf(e,255),t=Lf(t,255),n=Lf(n,255);var r,i,o=Math.max(e,t,n),s=Math.min(e,t,n),a=(o+s)/2;if(o==s)r=i=0;else{var l=o-s;switch(i=a>.5?l/(2-o-s):l/(o+s),o){case e:r=(t-n)/l+(t<n?6:0);break;case t:r=(n-e)/l+2;break;case n:r=(e-t)/l+4}r/=6}return{h:r,s:i,l:a}}function bf(e,t,n){e=Lf(e,255),t=Lf(t,255),n=Lf(n,255);var r,i,o=Math.max(e,t,n),s=Math.min(e,t,n),a=o,l=o-s;if(i=0===o?0:l/o,o==s)r=0;else{switch(o){case e:r=(t-n)/l+(t<n?6:0);break;case t:r=(n-e)/l+2;break;case n:r=(e-t)/l+4}r/=6}return{h:r,s:i,v:a}}function yf(e,t,n,r){var i=[jf(Math.round(e).toString(16)),jf(Math.round(t).toString(16)),jf(Math.round(n).toString(16))];return r&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function Cf(e,t,n,r){return[jf(Wf(r)),jf(Math.round(e).toString(16)),jf(Math.round(t).toString(16)),jf(Math.round(n).toString(16))].join("")}function xf(e,t){t=0===t?0:t||10;var n=vf(e).toHsl();return n.s-=t/100,n.s=$f(n.s),vf(n)}function wf(e,t){t=0===t?0:t||10;var n=vf(e).toHsl();return n.s+=t/100,n.s=$f(n.s),vf(n)}function kf(e){return vf(e).desaturate(100)}function Sf(e,t){t=0===t?0:t||10;var n=vf(e).toHsl();return n.l+=t/100,n.l=$f(n.l),vf(n)}function Of(e,t){t=0===t?0:t||10;var n=vf(e).toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(-t/100*255))),n.g=Math.max(0,Math.min(255,n.g-Math.round(-t/100*255))),n.b=Math.max(0,Math.min(255,n.b-Math.round(-t/100*255))),vf(n)}function _f(e,t){t=0===t?0:t||10;var n=vf(e).toHsl();return n.l-=t/100,n.l=$f(n.l),vf(n)}function Bf(e,t){var n=vf(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,vf(n)}function Ef(e){var t=vf(e).toHsl();return t.h=(t.h+180)%360,vf(t)}function Tf(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var n=vf(e).toHsl(),r=[vf(e)],i=360/t,o=1;o<t;o++)r.push(vf({h:(n.h+o*i)%360,s:n.s,l:n.l}));return r}function Mf(e){var t=vf(e).toHsl(),n=t.h;return[vf(e),vf({h:(n+72)%360,s:t.s,l:t.l}),vf({h:(n+216)%360,s:t.s,l:t.l})]}function Df(e,t,n){t=t||6,n=n||30;var r=vf(e).toHsl(),i=360/n,o=[vf(e)];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(vf(r));return o}function Pf(e,t){t=t||6;for(var n=vf(e).toHsv(),r=n.h,i=n.s,o=n.v,s=[],a=1/t;t--;)s.push(vf({h:r,s:i,v:o})),o=(o+a)%1;return s}vf.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=Nf(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=bf(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=bf(this._r,this._g,this._b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=Af(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=Af(this._r,this._g,this._b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return yf(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,i){var o=[jf(Math.round(e).toString(16)),jf(Math.round(t).toString(16)),jf(Math.round(n).toString(16)),jf(Wf(r))];return i&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*Lf(this._r,255))+"%",g:Math.round(100*Lf(this._g,255))+"%",b:Math.round(100*Lf(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*Lf(this._r,255))+"%, "+Math.round(100*Lf(this._g,255))+"%, "+Math.round(100*Lf(this._b,255))+"%)":"rgba("+Math.round(100*Lf(this._r,255))+"%, "+Math.round(100*Lf(this._g,255))+"%, "+Math.round(100*Lf(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(If[yf(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+Cf(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var i=vf(e);n="#"+Cf(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return!t&&r&&("hex"===e||"hex6"===e||"hex3"===e||"hex4"===e||"hex8"===e||"name"===e)?"name"===e&&0===this._a?this.toName():this.toRgbString():("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),("hex"===e||"hex6"===e)&&(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString())},clone:function(){return vf(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(Sf,arguments)},brighten:function(){return this._applyModification(Of,arguments)},darken:function(){return this._applyModification(_f,arguments)},desaturate:function(){return this._applyModification(xf,arguments)},saturate:function(){return this._applyModification(wf,arguments)},greyscale:function(){return this._applyModification(kf,arguments)},spin:function(){return this._applyModification(Bf,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(Df,arguments)},complement:function(){return this._applyCombination(Ef,arguments)},monochromatic:function(){return this._applyCombination(Pf,arguments)},splitcomplement:function(){return this._applyCombination(Mf,arguments)},triad:function(){return this._applyCombination(Tf,[3])},tetrad:function(){return this._applyCombination(Tf,[4])}},vf.fromRatio=function(e,t){if("object"==ff(e)){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:Vf(e[r]));e=n}return vf(e,t)},vf.equals=function(e,t){return!(!e||!t)&&vf(e).toRgbString()==vf(t).toRgbString()},vf.random=function(){return vf.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},vf.mix=function(e,t,n){n=0===n?0:n||50;var r=vf(e).toRgb(),i=vf(t).toRgb(),o=n/100;return vf({r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a})},vf.readability=function(e,t){var n=vf(e),r=vf(t);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)},vf.isReadable=function(e,t,n){var r,i,o=vf.readability(e,t);switch(i=!1,r=function(e){var t,n;return e=e||{level:"AA",size:"small"},t=(e.level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA"),"small"!==n&&"large"!==n&&(n="small"),{level:t,size:n}}(n),r.level+r.size){case"AAsmall":case"AAAlarge":i=o>=4.5;break;case"AAlarge":i=o>=3;break;case"AAAsmall":i=o>=7}return i},vf.mostReadable=function(e,t,n){var r,i,o,s,a=null,l=0;i=(n=n||{}).includeFallbackColors,o=n.level,s=n.size;for(var c=0;c<t.length;c++)(r=vf.readability(e,t[c]))>l&&(l=r,a=vf(t[c]));return vf.isReadable(e,a,{level:o,size:s})||!i?a:(n.includeFallbackColors=!1,vf.mostReadable(e,["#fff","#000"],n))};var Rf=vf.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},If=vf.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(Rf);function Nf(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Lf(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function $f(e){return Math.min(1,Math.max(0,e))}function Ff(e){return parseInt(e,16)}function jf(e){return 1==e.length?"0"+e:""+e}function Vf(e){return e<=1&&(e=100*e+"%"),e}function Wf(e){return Math.round(255*parseFloat(e)).toString(16)}function zf(e){return Ff(e)/255}var Qf,Hf,qf,Uf=(Hf="[\\s|\\(]+("+(Qf="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+Qf+")[,|\\s]+("+Qf+")\\s*\\)?",qf="[\\s|\\(]+("+Qf+")[,|\\s]+("+Qf+")[,|\\s]+("+Qf+")[,|\\s]+("+Qf+")\\s*\\)?",{CSS_UNIT:new RegExp(Qf),rgb:new RegExp("rgb"+Hf),rgba:new RegExp("rgba"+qf),hsl:new RegExp("hsl"+Hf),hsla:new RegExp("hsla"+qf),hsv:new RegExp("hsv"+Hf),hsva:new RegExp("hsva"+qf),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function Yf(e){return!!Uf.CSS_UNIT.exec(e)}const Xf=(e,t,n=!1)=>{if(!n){let n=t;"hex"===t&&e.getAlpha()<1&&(n="hex8");let r=e.toString(n);try{r=JSON.parse(r)}catch{}return r}switch(t){case"rgb":return e.toRgb();case"prgb":return e.toPercentageRgb();case"hsl":return e.toHsl();case"hsv":return e.toHsv();default:return null}},Jf=(e,t)=>!!(Object.prototype.hasOwnProperty.call(e,t)&&typeof e[t]<"u"),Gf=e=>typeof e>"u",Kf=["update:tinyColor","update:modelValue","input"];function Zf(e,t,n){let r,i;const o=Ja({get:()=>{const{modelValue:t,tinyColor:n,value:o}=e,s=n??t??o;return Gf(i)&&(Gf(o)||(i=vf(o).getFormat()),Gf(t)||(i=vf(t).getFormat())),Gf(r)&&("object"==typeof o&&!(o instanceof vf)&&(r=!0),"object"==typeof t&&(r=!0)),vf(s)},set:e=>{s(e)}}),s=n=>{const o=vf(n);if(Jf(e,"tinyColor")&&t("update:tinyColor",o),Jf(e,"modelValue")){const e=Xf(o,i,r);t("update:modelValue",e)}if(Jf(e,"value")){const e=Xf(o,i,r);t("input",e)}};return o}const eg=e=>{const t={x:0,y:0};return e instanceof MouseEvent&&(t.x=e.pageX,t.y=e.pageY),typeof TouchEvent<"u"&&e instanceof TouchEvent&&(t.x=e.touches?.[0]?e.touches[0].pageX:e.changedTouches?.[0]?e.changedTouches[0].pageX:0,t.y=e.touches?.[0]?e.touches[0].pageY:e.changedTouches?.[0]?e.changedTouches[0].pageY:0),t},tg=e=>{const{x:t,y:n}={x:window.scrollX||window.pageXOffset||document.documentElement.scrollLeft||0,y:window.scrollY||window.pageYOffset||document.documentElement.scrollTop||0},r=e.getBoundingClientRect();return{x:r.left+t,y:r.top+n}},ng=e=>"ArrowUp"===e.code||38===e.keyCode?"up":"ArrowDown"===e.code||40===e.keyCode?"down":"ArrowLeft"===e.code||37===e.keyCode?"left":"ArrowRight"===e.code||39===e.keyCode?"right":null;function rg(e,t,n){return Math.min(Math.max(e,t),n)}const ig=(e,t=20)=>{let n,r,i;return(...o)=>{n?(clearTimeout(r),r=setTimeout(()=>{Date.now()-i>=t&&(e(...o),i=Date.now())},Math.max(t-(Date.now()-i),0))):(e(...o),i=Date.now(),n=!0)}},og=["aria-valuetext"],sg=Zr({__name:"SaturationSlider",props:{hue:{},tinyColor:{},modelValue:{},value:{}},emits:["change"].concat(Kf),setup(e,{emit:t}){const n=t,r=e,i=nn(0),o=Zf(r,n),s=Ja(()=>o.value.toHsv()),a=Ja(()=>r.hue??s.value.h),l=Ja(()=>`hsl(${a.value}, 100%, 50%)`),c=Ja(()=>-100*s.value.v+1+100+"%"),d=Ja(()=>s.value.v<=.01?100*i.value+"%":100*s.value.s+"%"),u=nn(null);function p(e){o.value=e}const h=ig(function(e){const t=u.value;if(!t)return;const n=t.clientWidth,r=t.clientHeight,{x:o,y:l}=tg(t),{x:c,y:d}=eg(e),h=rg(c-o,0,n),f=rg(d-l,0,r),g=h/n,m=rg(1-f/r,0,1);i.value=g;let v=Math.round(100*g),A=Math.round(100*m);1===v&&(v=.01),1===A&&(A=.01),p({h:a.value,s:v,v:A,a:s.value.a})},20);function f(e){e.preventDefault(),e.type.startsWith("mouse")?(window.addEventListener("mousemove",h),window.addEventListener("mouseup",h),window.addEventListener("mouseup",g)):e.type.startsWith("touch")&&(window.addEventListener("touchmove",h),window.addEventListener("touchend",h),window.addEventListener("touchend",g))}function g(){m()}function m(){window.removeEventListener("mousemove",h),window.removeEventListener("mouseup",h),window.removeEventListener("mouseup",g),window.removeEventListener("touchmove",h),window.removeEventListener("touchend",h),window.removeEventListener("touchend",g)}function v(e){switch(e.preventDefault(),ng(e)){case"left":{const e=s.value.s-.01;p({...s.value,s:e>=0?e:0});break}case"right":{const e=s.value.s+.01;p({...s.value,s:e>1?1:e});break}case"up":{const e=s.value.v+.01;p({...s.value,v:e>1?1:e});break}case"down":{const e=s.value.v-.01;p({...s.value,v:e<0?0:e});break}}}return Ji(()=>{m()}),(e,t)=>(Ks(),ia("div",{class:"vc-saturation-slider bg",style:U({background:l.value}),ref_key:"containerRef",ref:u,onMousedown:f,onTouchstart:f,role:"application","aria-label":"Saturation and brightness picker"},[t[1]||(t[1]=ua("div",{class:"bg white"},null,-1)),t[2]||(t[2]=ua("div",{class:"bg black"},null,-1)),ua("div",{class:"picker-wrap",style:U({top:c.value,left:d.value}),role:"slider",tabindex:"0","aria-valuemin":"0","aria-valuemax":"1","aria-label":"press arrow to change saturation or brightness","aria-valuenow":"?","aria-valuetext":`saturation: ${s.value.s.toFixed(0)}%, brightness: ${s.value.v.toFixed(0)}%`,onKeydown:v},t[0]||(t[0]=[ua("div",{class:"picker"},null,-1)]),44,og)],36))}}),ag=(e,t)=>{const n=e.__vccOpts||e;for(const[e,r]of t)n[e]=r;return n},lg=ag(sg,[["__scopeId","data-v-4d048d6e"]]),cg=e=>typeof e<"u",dg={class:"vc-base-slider"},ug={key:0,class:"background"},pg=["aria-label","aria-valuemax","aria-valuenow"],hg=Zr({__name:"BaseSlider",props:{direction:{default:"horizontal"},modelValue:{default:0},value:{default:0},max:{default:100},step:{},ariaLabel:{default:"slider"}},emits:["input","update:modelValue"],setup(e,{emit:t}){const n=e,r=t,i=Ja(()=>n.modelValue??n.value),o=Ja(()=>{let e=i.value/n.max;return"vertical"===n.direction&&(e=1-e),100*e+"%"}),s=nn(null);function a(e){cg(e)&&(r("input",e),r("update:modelValue",e))}function l(e){const{direction:t,max:r}=n,i=s.value;if(!i)return;const o=i.clientWidth,l=i.clientHeight,{x:c,y:d}=tg(i),{x:u,y:p}=eg(e),h=u-c,f=p-d;let g;g="vertical"===t?f<0?r:f>l?0:(1-f/l)*r:h<0?0:h>o?r:h/o*r,a(g)}const c=ig(l);function d(e){l(e),e.type.startsWith("mouse")?(window.addEventListener("mousemove",c),window.addEventListener("mouseup",u)):(window.addEventListener("touchmove",c),window.addEventListener("touchend",u))}function u(){p()}function p(){window.removeEventListener("mousemove",c),window.removeEventListener("mouseup",u),window.removeEventListener("touchmove",c),window.removeEventListener("touchend",u)}function h(e){e.preventDefault();const{direction:t,max:r}=n,o=ng(e),s=n.step??r/100,l=i.value;let c;switch(o){case"left":if("horizontal"!==t)return;c=l-s<0?0:l-s;break;case"right":if("horizontal"!==t)return;c=l+s>r?r:l+s;break;case"down":if("vertical"!==t)return;c=l-s<0?0:l-s;break;case"up":if("vertical"!==t)return;c=l+s>r?r:l+s}a(c)}return Ji(()=>{p()}),(e,t)=>(Ks(),ia("div",dg,[e.$slots.background?(Ks(),ia("div",ug,[uo(e.$slots,"background",{},void 0,!0)])):Aa("",!0),ua("div",{class:K({slider:!0,horizontal:"horizontal"===e.direction,vertical:"vertical"===e.direction}),ref_key:"containerRef",ref:s,onMousedown:d,onTouchstart:d,role:"slider","aria-label":e.ariaLabel,"aria-valuemax":e.max,"aria-valuemin":"0","aria-valuenow":i.value.toFixed(1),tabindex:"0",onKeydown:h},[ua("div",{class:"picker-wrap",style:U({left:"horizontal"===e.direction?o.value:0,top:"vertical"===e.direction?o.value:0}),role:"presentation"},[uo(e.$slots,"picker",{},()=>[t[0]||(t[0]=ua("div",{class:"picker"},null,-1))],!0)],4)],42,pg)]))}}),fg=ag(hg,[["__scopeId","data-v-972b0fad"]]),gg=Zr({__name:"HueSlider",props:{direction:{default:"horizontal"},modelValue:{default:0}},emits:["update:modelValue"],setup(e,{emit:t}){$l(e=>({"2f44f39d":i.value}));const n=e,r=t,i=Ja(()=>`linear-gradient(to ${"horizontal"===n.direction?"right":"top"}, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%)`),o=Ja(()=>{const e=Number(n.modelValue);return Number.isNaN(e)?0:e}),s=nn();xr(o,(e,t)=>{0!==e&&e-t>0&&(s.value="right"),0!==e&&e-t<0&&(s.value="left")});const a=Ja(()=>"vertical"===n.direction?0===o.value&&"right"===s.value?0:o.value:"horizontal"===n.direction?0===o.value&&"right"===s.value?360:o.value:0);function l(e){!function(e){r("update:modelValue",e)}(Math.round(e))}return(e,t)=>(Ks(),oa(fg,{class:"vc-hue-slider",max:360,step:1,modelValue:a.value,direction:e.direction,"onUpdate:modelValue":l,"aria-label":"Hue"},{background:ur(()=>t[0]||(t[0]=[ua("div",{class:"gradient"},null,-1)])),picker:ur(()=>[uo(e.$slots,"default",{},void 0,!0)]),_:3},8,["modelValue","direction"]))}}),mg=ag(gg,[["__scopeId","data-v-5367c985"]]),vg=Zr({__name:"CheckerboardBG",props:{size:{default:8},white:{default:"#fff"},grey:{default:"#e6e6e6"}},setup(e){const t=e;function n(e,t,n){return function(e,t,n){if(typeof document>"u")return null;var r=document.createElement("canvas");r.width=r.height=2*n;var i=r.getContext("2d");return i?(i.fillStyle=e,i.fillRect(0,0,r.width,r.height),i.fillStyle=t,i.fillRect(0,0,n,n),i.translate(n,n),i.fillRect(0,0,n,n),r.toDataURL()):null}(e,t,n)}const r=Ja(()=>`url(${n(t.white,t.grey,t.size)})`);return(e,t)=>(Ks(),ia("div",{class:"vc-checkerboard",style:U({backgroundImage:r.value})},null,4))}}),Ag=ag(vg,[["__scopeId","data-v-37d61ccd"]]),bg=Zr({__name:"AlphaSlider",props:{tinyColor:{},modelValue:{},value:{}},emits:Kf,setup(e,{emit:t}){const n=Zf(e,t),r=Ja(()=>{const e=n.value.toRgb(),t=[e.r,e.g,e.b].join(",");return"linear-gradient(to right, rgba("+t+", 0) 0%, rgba("+t+", 1) 100%)"}),i=Ja(()=>n.value.getAlpha());function o(e){n.value=n.value.setAlpha(e).clone()}return(e,t)=>(Ks(),oa(fg,{class:"vc-alpha-slider",modelValue:i.value,max:1,"aria-label":"Transparency","onUpdate:modelValue":o},{background:ur(()=>[pa(Ag),ua("div",{class:"gradient",style:U({background:r.value})},null,4)]),_:1},8,["modelValue"]))}}),yg=ag(bg,[["__scopeId","data-v-07dd346b"]]),Cg={class:"vc-editable-input"},xg=["value","aria-label"],wg={key:0,class:"vc-input-desc","aria-hidden":"true"},kg=Zr({__name:"EditableInput",props:{value:{},label:{},desc:{},max:{},min:{},step:{default:1},a11y:{}},emits:["change","blur"],setup(e,{emit:t}){const n=e,r=t,i=n.a11y?.label??n.label,o=`input__label__${i}__${Math.random().toString().slice(2,5)}`;function s(e){const{min:t,max:i}=n;cg(i)&&+e>i?r("change",i):cg(t)&&+e<t?r("change",t):r("change",e)}function a(e){s(e.target?.value)}function l(e){r("blur",e)}function c(e){let t=Number(n.value);if(!isNaN(t)){let r=n.step;const i=function(e){const t=e.toString();return-1!==t.indexOf(".")?t.split(".")[1].length:0}(r),o=ng(e);"up"===o&&(s((t+r).toFixed(i)),e.preventDefault()),"down"===o&&(s((t-r).toFixed(i)),e.preventDefault())}}return(e,t)=>(Ks(),ia("div",Cg,[ua("input",{class:"vc-input-input",value:n.value,onKeydown:c,onInput:a,onBlur:l,"aria-label":ln(i),id:o},null,40,xg),ua("label",{for:o,class:"vc-input-label","aria-hidden":"true"},Ce(n.label),1),e.desc?(Ks(),ia("span",wg,Ce(e.desc),1)):Aa("",!0)]))}}),Sg=ag(kg,[["__scopeId","data-v-9c267b2b"]]),Og=e=>vf(e).isValid(),_g=e=>0===vf(e).getAlpha(),Bg=Zr({__name:"HexInput",props:{value:{},label:{},desc:{},a11y:{},type:{default:"hex"},withHash:{type:Boolean,default:!1}},emits:["change"],setup(e,{emit:t}){const n=e,r=t,i={label:"hex"===n.type?"Hex":"Hex with transparency",...n.a11y},o=(e,t="hex")=>{let r="";return"hex"===t&&(r=vf(e).toHexString()),"hex8"===t&&(r=vf(e).toHex8String()),!0!==n.withHash&&(r=r.replace("#","")),r},s=nn(o(n.value,n.type));xr(()=>n.value,e=>{vf.equals(e,s.value)||(s.value=o(e,n.type))});const a=e=>{if(!e)return;s.value=e;let t=e.length;"#"===e[0]&&(t-=1),("hex"!==n.type||t%3==0||8===t)&&("hex8"===n.type&&8!==t||Og(e)&&r("change",e))},l=()=>{let e=s.value.length;"#"===s.value[0]&&(e-=1),(!Og(s.value)||!("hex"===n.type&&6===e||"hex8"===n.type&&8===e))&&(s.value=o(n.value,n.type))};return(e,t)=>(Ks(),oa(Sg,{label:n.label,a11y:i,value:s.value,onChange:a,onBlur:l},null,8,["label","value"]))}});const Eg=e=>{const t=nn(0),n=`__from__vc__hue__${function(){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";return e.charAt(Math.floor(62*Math.random()))+e.charAt(Math.floor(62*Math.random()))}()}`;return xr(e,e=>{if(e[n])return;const r=e.toHsl().h;0===r&&0!==t.value||(t.value=r)},{immediate:!0}),{hueRef:t,updateHueRef:r=>{const i=vf({...e.value.toHsl(),h:r});i[n]=!0,e.value=i,t.value=r}}},Tg={class:"saturation"},Mg={class:"body"},Dg={class:"controls"},Pg={class:"color-wrap"},Rg=["aria-label"],Ig={class:"sliders"},Ng={class:"hue-wrap"},Lg={key:0,class:"alpha-wrap"},$g={key:0,class:"fieldsWrap","data-testid":"fields"},Fg={key:0,class:"fields"},jg={class:"field"},Vg={class:"field"},Wg={class:"field"},zg={key:0,class:"field"},Qg={key:1,class:"fields"},Hg={class:"field"},qg={key:2,class:"fields"},Ug={class:"field"},Yg={class:"field"},Xg={class:"field"},Jg={key:0,class:"field"},Gg={class:"toggle-icon",role:"presentation"},Kg={style:{width:"24px",height:"24px"},viewBox:"0 0 24 24"},Zg={class:"toggle-icon_highlighted",role:"presentation"},em=Zr({__name:"ChromePicker",props:{disableAlpha:{type:Boolean},disableFields:{type:Boolean},formats:{default:()=>["rgb","hex","hsl"]},tinyColor:{},modelValue:{},value:{}},emits:Kf,setup(e,{emit:t}){const n=e,r=Zf(n,t),{hueRef:i,updateHueRef:o}=Eg(r),s=nn(0);let a=nn(!1);const l=Ja(()=>{const e=r.value.toRgb();return"rgba("+[e.r,e.g,e.b,r.value.getAlpha()].join(",")+")"}),c=Ja(()=>{const{h:e,s:t,l:n}=r.value.toHsl();return{h:e.toFixed(),s:`${(100*t).toFixed()}%`,l:`${(100*n).toFixed()}%`}}),d=Ja(()=>r.value.toRgb()),u=Ja(()=>Number(r.value.getAlpha().toFixed(2))),p=new Set(["hex","hsl","rgb"]),h=Ja(()=>{const e=new Set,t=[],r=n.formats;for(const n of r)if(p.has(n)){const r=n;e.has(r)||(e.add(r),t.push(r))}return t}),f=Ja(()=>{const{disableFields:e,formats:t}=n;return!(!0===e||!Array.isArray(t)||0===h.value.length)}),g=e=>h.value.includes(e),m=e=>h.value.indexOf(e),v=e=>{r.value=e},A=(e,t)=>{if(!t||isNaN(Number(t)))return;const n={[e]:t};r.value={...d.value,a:u.value,...n}},b=(e,t)=>{if(!t)return;const n={[e]:+t};("s"===e||"l"===e)&&(n[e]=+t.replace("%","")/100),r.value={...r.value.toHsl(),a:u.value,...n}},y=()=>{s.value!==h.value.length-1?s.value++:s.value=0},C=()=>{a.value=!0},x=()=>{a.value=!1};return(e,t)=>(Ks(),ia("div",{role:"application","aria-label":"Chrome Color Picker",class:K(["vc-chrome-picker",e.disableAlpha?"alpha-disabled":""])},[ua("div",Tg,[pa(lg,{tinyColor:ln(r),"onUpdate:tinyColor":t[0]||(t[0]=e=>tn(r)?r.value=e:null),hue:ln(i)},null,8,["tinyColor","hue"])]),ua("div",Mg,[ua("div",Dg,[ua("div",Pg,[ua("div",{class:"active-color",style:U({backgroundColor:l.value}),role:"presentation","aria-live":"polite","aria-label":`Current color is ${l.value}`},null,12,Rg),n.disableAlpha?Aa("",!0):(Ks(),oa(Ag,{key:0}))]),ua("div",Ig,[ua("div",Ng,[pa(mg,{modelValue:ln(i),"onUpdate:modelValue":ln(o)},null,8,["modelValue","onUpdate:modelValue"])]),n.disableAlpha?Aa("",!0):(Ks(),ia("div",Lg,[pa(yg,{tinyColor:ln(r),"onUpdate:tinyColor":t[1]||(t[1]=e=>tn(r)?r.value=e:null)},null,8,["tinyColor"])]))])]),f.value?(Ks(),ia("div",$g,[g("rgb")?pr((Ks(),ia("div",Fg,[ua("div",jg,[pa(Sg,{label:"r",value:d.value.r,onChange:t[2]||(t[2]=e=>A("r",e)),a11y:{label:"Red"}},null,8,["value"])]),ua("div",Vg,[pa(Sg,{label:"g",value:d.value.g,onChange:t[3]||(t[3]=e=>A("g",e)),a11y:{label:"Green"}},null,8,["value"])]),ua("div",Wg,[pa(Sg,{label:"b",value:d.value.b,onChange:t[4]||(t[4]=e=>A("b",e)),a11y:{label:"Blue"}},null,8,["value"])]),e.disableAlpha?Aa("",!0):(Ks(),ia("div",zg,[pa(Sg,{label:"a",value:u.value,step:.01,max:1,onChange:t[5]||(t[5]=e=>A("a",e)),a11y:{label:"Transparency"}},null,8,["value"])]))],512)),[[Il,s.value===m("rgb")]]):Aa("",!0),g("hex")?pr((Ks(),ia("div",Qg,[ua("div",Hg,[pa(Bg,{type:1===u.value?"hex":"hex8",label:"hex",value:ln(r).toHex8String(),onChange:v,"with-hash":!0},null,8,["type","value"])])],512)),[[Il,s.value===m("hex")]]):Aa("",!0),g("hsl")?pr((Ks(),ia("div",qg,[ua("div",Ug,[pa(Sg,{label:"h",value:ln(i).toFixed(),onChange:t[6]||(t[6]=e=>b("h",e)),a11y:{label:"Hue"}},null,8,["value"])]),ua("div",Yg,[pa(Sg,{label:"s",value:c.value.s,onChange:t[7]||(t[7]=e=>b("s",e)),a11y:{label:"Saturation"}},null,8,["value"])]),ua("div",Xg,[pa(Sg,{label:"l",value:c.value.l,onChange:t[8]||(t[8]=e=>b("l",e)),a11y:{label:"Lightness"}},null,8,["value"])]),e.disableAlpha?Aa("",!0):(Ks(),ia("div",Jg,[pa(Sg,{label:"a",value:u.value,step:.01,max:1,onChange:t[9]||(t[9]=e=>b("a",e)),a11y:{label:"Transparency"}},null,8,["value"])]))],512)),[[Il,s.value===m("hsl")]]):Aa("",!0),h.value.length>1?(Ks(),ia("div",{key:3,class:"toggle-btn",onClick:y,onKeydown:[Gc(y,["enter"]),Gc(y,["space"])],onMouseover:C,onMouseenter:C,onMouseout:x,onFocus:C,onBlur:x,role:"button","aria-label":"Change color format",tabindex:"0"},[ua("div",Gg,[(Ks(),ia("svg",Kg,t[10]||(t[10]=[ua("path",{fill:"currentColor",d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"},null,-1)])))]),pr(ua("div",Zg,null,512),[[Il,ln(a)]])],32)):Aa("",!0)])):Aa("",!0)])],2))}}),tm=ag(em,[["__scopeId","data-v-dfdde7e0"]]),nm={class:"vc-compact-picker",role:"application","aria-label":"Compact color picker",tabindex:"0"},rm={class:"colors",role:"listbox","aria-label":"Pick a color"},im=["onClick","aria-label","aria-selected","title","onKeydown"],om={class:"dot"},sm=["#4D4D4D","#999999","#FFFFFF","#F44E3B","#FE9200","#FCDC00","#DBDF00","#A4DD00","#68CCCA","#73D8FF","#AEA1FF","#FDA1FF","#333333","#808080","#CCCCCC","#D33115","#E27300","#FCC400","#B0BC00","#68BC00","#16A5A5","#009CE0","#7B64FF","#FA28FF","#000000","#666666","#B3B3B3","#9F0500","#C45100","#FB9E00","#808900","#194D33","#0C797D","#0062B1","#653294","#AB149E"],am=(["change"].concat(Kf),{role:"application","aria-label":"Grayscale color picker",class:"vc-grayscale-picker"}),lm={class:"colors",role:"listbox","aria-label":"Select a grayscale color",tabindex:"0"},cm=["onClick","aria-label","aria-selected","title","onKeydown"],dm={class:"dot"},um=["#FFFFFF","#F2F2F2","#E6E6E6","#D9D9D9","#CCCCCC","#BFBFBF","#B3B3B3","#A6A6A6","#999999","#8C8C8C","#808080","#737373","#666666","#595959","#4D4D4D","#404040","#333333","#262626","#0D0D0D","#000000"],pm=(["change"].concat(Kf),{class:"title","aria-hidden":"true"}),hm={class:"body"},fm={class:"saturation"},gm={class:"hue"},mm={class:"preview"},vm={class:"preview-label","aria-hidden":"true"},Am={class:"preview-swatches"},bm=["aria-label"],ym=["aria-label"],Cm={class:"preview-label","aria-hidden":"true"},xm={key:0,class:"actions"},wm=["aria-label"],km={class:"fields"},Sm=["aria-label"],Om=(Boolean,Boolean,Kf.concat(["ok","cancel","reset"]),{class:"saturation"}),_m={class:"controls"},Bm={class:"sliders"},Em={class:"hue"},Tm={key:0,class:"alpha"},Mm={class:"color"},Dm=["aria-label"],Pm={key:0,class:"field"},Rm={class:"field_double"},Im={class:"field_single"},Nm={class:"field_single"},Lm={class:"field_single"},$m={key:0,class:"field_single"},Fm={class:"presets",role:"listbox","aria-label":"A color preset, pick one to set as current color"},jm=["onClick","title","aria-label","aria-selected","onKeydown"],Vm=["onClick","aria-selected","title","onKeydown"],Wm=["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF","rgba(0,0,0,0)"];Boolean,Boolean,["change"].concat(Kf);var zm={key:0,class:"trp-field__label trp-primary-text-bold"},Qm={class:"trp-color__wrapper"},Hm=["aria-label"],qm={class:"trp-color-code trp-primary-text"};const Um={__name:"ColorField",props:{label:{type:String,default:""},modelValue:{type:String,required:!0}},emits:["update:modelValue"],setup:function(e,t){var n=t.emit,r=e,i=n,o=(0,df.__)("Open colour picker","translatepress-multilingual"),s=nn(!1),a=nn(null),l=nn(null);function c(){s.value=!s.value}function d(e){a.value&&!a.value.contains(e.target)&&l.value&&!l.value.contains(e.target)&&(s.value=!1)}qi(function(){return document.addEventListener("mousedown",d)}),Xi(function(){return document.removeEventListener("mousedown",d)});var u=Ja({get:function(){return vf(r.modelValue)},set:function(e){var t=vf(e),n=t.toHexString().toUpperCase(),r=Math.round(255*t.getAlpha()).toString(16).padStart(2,"0").toUpperCase(),o="FF"===r?n:"".concat(n).concat(r);i("update:modelValue",o)}});return function(t,n){return Ks(),ia("div",{class:K({"trp-color--picking":s.value})},[e.label?(Ks(),ia("span",zm,Ce(e.label),1)):Aa("",!0),ua("div",Qm,[ua("div",{class:"trp-color-input",style:U({background:e.modelValue}),ref_key:"swatchRef",ref:a,onClick:c,onKeydown:Gc(c,["enter","space"]),role:"button","aria-label":ln(o),tabindex:"0"},null,44,Hm),ua("span",qm,Ce(e.modelValue.toUpperCase()),1),s.value?(Ks(),ia("div",{key:0,class:"trp-color__popover",ref_key:"pickerRef",ref:l,onMousedown:n[1]||(n[1]=Xc(function(){},["stop"]))},[pa(ln(tm),{tinyColor:u.value,"onUpdate:tinyColor":n[0]||(n[0]=function(e){return u.value=e})},null,8,["tinyColor"])],544)):Aa("",!0)])],2)}}};var Ym=n(252),Xm={insert:"head",singleton:!1};uf()()(Ym.A,Xm);Ym.A.locals;i();const Jm=(0,i().A)(Um,[["__scopeId","data-v-f6dd67f8"]]);var Gm={key:0,class:"trp-field__label trp-primary-text-bold"},Km={class:"trp-number__wrapper"},Zm=["value","min"];const ev={__name:"NumberField",props:{label:{type:String,default:""},modelValue:{type:[Number,null],default:null},min:{type:Number,default:0,required:!1}},emits:["update:modelValue"],setup:function(e,t){var n=t.emit,r=e,i=n;function o(e){var t=e.target.value;i("update:modelValue",""===t?r.min:Number(t))}return function(t,n){var r;return Ks(),ia("div",null,[e.label?(Ks(),ia("span",Gm,Ce(e.label),1)):Aa("",!0),ua("div",Km,[ua("input",{type:"number",class:"trp-number-input",value:null!==(r=e.modelValue)&&void 0!==r?r:"",min:e.min,onInput:o},null,40,Zm),n[0]||(n[0]=ua("span",{class:"trp-primary-text"},"px",-1))])])}}};var tv=n(921),nv={insert:"head",singleton:!1};uf()()(tv.A,nv);tv.A.locals;const rv=(0,i().A)(ev,[["__scopeId","data-v-a8788afe"]]);var iv={key:0,class:"trp-field__label trp-primary-text-bold"},ov=["checked"];const sv={__name:"ToggleField",props:{modelValue:Boolean,label:{type:String,default:""},compact:{type:Boolean,default:!1}},emits:["update:modelValue"],setup:function(e,t){var n=t.emit,r=n;return function(t,n){return Ks(),ia("div",{class:K(["trp-toggle-wrapper",{"trp-toggle-wrapper--compact":e.compact}])},[e.label?(Ks(),ia("span",iv,Ce(e.label),1)):Aa("",!0),ua("div",{class:"trp-toggle-inner",onClick:n[0]||(n[0]=function(t){return r("update:modelValue",!e.modelValue)})},[ua("input",{type:"checkbox",class:"trp-toggle-input",checked:e.modelValue,readonly:""},null,8,ov),n[1]||(n[1]=ua("span",{class:"trp-toggle-slider"},null,-1))])],2)}}};var av=n(350),lv={insert:"head",singleton:!1};uf()()(av.A,lv);av.A.locals;const cv=(0,i().A)(sv,[["__scopeId","data-v-6399655e"]]);var dv={class:"trp-toggle-status-field"},uv={class:"trp-primary-text"};const pv={__name:"ToggleStatusField",props:{modelValue:Boolean,onText:{type:String,default:(0,df.__)("Enabled","translatepress-multilingual")},offText:{type:String,default:(0,df.__)("Disabled","translatepress-multilingual")}},emits:["update:modelValue"],setup:function(e,t){var n=t.emit,r=e,i=n,o=Ja({get:function(){return r.modelValue},set:function(e){return i("update:modelValue",e)}});return function(t,n){return Ks(),ia("div",dv,[pa(cv,{modelValue:o.value,"onUpdate:modelValue":n[0]||(n[0]=function(e){return o.value=e}),label:""},null,8,["modelValue"]),ua("span",uv,Ce(e.modelValue?e.onText:e.offText),1)])}}};var hv=n(954),fv={insert:"head",singleton:!1};uf()()(hv.A,fv);hv.A.locals;const gv=(0,i().A)(pv,[["__scopeId","data-v-6e6b5f68"]]);function mv(e){return function(e){if(Array.isArray(e))return vv(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return vv(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?vv(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function vv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Av={class:"trp-radio-group__wrapper"},bv={key:0,class:"trp-field__label trp-primary-text-bold"},yv=["title"],Cv={class:"trp-radio-label"},xv=["name","value","checked","disabled","onChange"];const wv={__name:"RadioGroupField",props:{label:{type:String,required:!1,default:""},modelValue:{type:String,required:!0},options:{type:Array,required:!0,validator:function(e){return e.every(function(e){return"value"in e&&"label"in e&&(void 0===e.disabled||"boolean"==typeof e.disabled)&&(void 0===e.title||"string"==typeof e.title)})}},columns:{type:Number,default:0},customValue:{type:[Number,String]}},emits:["update:modelValue","update:customValue"],setup:function(e,t){var n=t.emit,r=e,i=n,o=nn(r.customValue);xr(function(){return r.customValue},function(e){e!==o.value&&(o.value=e)}),xr(o,function(e){i("update:customValue",e)});var s=Ja(function(){return void 0!==r.customValue}),a=Ja(function(){return s.value?r.options.some(function(e){return"custom"===e.value})?r.options:[].concat(mv(r.options),[{value:"custom",label:(0,df.__)("Custom","translatepress-multilingual")}]):r.options});return function(t,n){return Ks(),ia("div",Av,[e.label?(Ks(),ia("span",bv,Ce(e.label),1)):Aa("",!0),ua("div",{class:K(["trp-radio-group",{"trp-radio-group--grid":e.columns>0}]),style:U(e.columns>0?{"--trp-radio-columns":e.columns}:null)},[(Ks(!0),ia(qs,null,lo(a.value,function(t){return Ks(),ia("div",{key:t.value,class:K(["trp-radio-option",{"is-disabled":t.disabled}]),title:t.title},[ua("label",Cv,[ua("input",{type:"radio",name:e.label||"radio-group",value:t.value,checked:e.modelValue===t.value,disabled:t.disabled,onChange:function(){return i("update:modelValue",t.value)}},null,40,xv),ua("span",null,Ce(t.label),1)]),s.value&&"custom"===t.value&&"custom"===e.modelValue?(Ks(),oa(rv,{key:0,class:"trp-lc-custom-number",modelValue:o.value,"onUpdate:modelValue":n[0]||(n[0]=function(e){return o.value=e}),label:"",min:0},null,8,["modelValue"])):Aa("",!0)],10,yv)}),128))],6)])}}};var kv=n(846),Sv={insert:"head",singleton:!1};uf()()(kv.A,Sv);kv.A.locals;const Ov=(0,i().A)(wv,[["__scopeId","data-v-13e4f2c2"]]);function _v(e){return function(e){if(Array.isArray(e))return Bv(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Bv(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Bv(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Bv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Ev={class:"trp-field trp-field--column"},Tv={class:"trp-field__label trp-primary-text-bold"},Mv={class:"trp-quad-grid"},Dv={class:"trp-primary-text trp-corner-label"};const Pv={__name:"QuadRadiusField",props:{label:{type:String,default:""},modelValue:{type:Array,required:!0}},emits:["update:modelValue"],setup:function(e,t){var n=t.emit,r=e,i=n,o=Array.from({length:4},function(e,t){return Ja({get:function(){var e;return null!==(e=r.modelValue[t])&&void 0!==e?e:0},set:function(e){var n=_v(r.modelValue);n[t]=e,i("update:modelValue",n)}})}),s=[(0,df.__)("Top Left","translatepress-multilingual"),(0,df.__)("Top Right","translatepress-multilingual"),(0,df.__)("Bottom Left","translatepress-multilingual"),(0,df.__)("Bottom Right","translatepress-multilingual")];return function(t,n){return Ks(),ia("div",Ev,[ua("span",Tv,Ce(e.label),1),ua("div",Mv,[(Ks(),ia(qs,null,lo(s,function(e,t){return ua("div",{key:t,class:"trp-quad-radius-corner"},[ua("span",Dv,Ce(e),1),pa(rv,{modelValue:ln(o)[t].value,"onUpdate:modelValue":function(e){return ln(o)[t].value=e},label:""},null,8,["modelValue","onUpdate:modelValue"])])}),64))])])}}};var Rv=n(332),Iv={insert:"head",singleton:!1};uf()()(Rv.A,Iv);Rv.A.locals;const Nv=(0,i().A)(Pv,[["__scopeId","data-v-f8e660d6"]]);let Lv=[],$v=[];function Fv(e){if(e<768)return!1;for(let t=0,n=Lv.length;;){let r=t+n>>1;if(e<Lv[r])n=r;else{if(!(e>=$v[r]))return!0;t=r+1}if(t==n)return!1}}function jv(e){return e>=127462&&e<=127487}(()=>{let e="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,1n,9,16,o,,x,1i,3,,i,,7,a,2,t,3,1k,,,7,2,2,2,3,9,,a,2,q,,2,3,1k,,,5,4,2,2,3,3,,u,2,3,,b,3,1k,,,8,,3,,3,k,2,m,6,,3,1k,,,7,2,2,2,3,7,3,a,2,u,,1n,5,3,3,,4,9,,14,5,1j,,,7,,3,,4,7,2,b,2,t,3,1k,,,7,,3,,4,7,2,b,2,f,,c,4,1j,2,,7,,3,,4,9,,a,2,t,3,1y,,4,6,,,,8,i,2,1p,,,8,c,8,2q,,,a,b,7,21,2,r,,,,,,4,2,1d,k,,2,5,b,,10,9,,2u,b,,6,n,4,4,3,g,4,d,,,3,6,,f,,jj,3,qa,4,s,3,t,2,u,2,1s,w,9,,19,3,,,39,2,y,,3a,c,4,c,63,5,1l,a,,,,,2,o,2,,1c,1a,2,c,k,5,1b,h,12,9,c,3,u,d,1k,e,1c,k,48,3,,l,4,,6,,2,3,5i,1s,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,n,5,4,,2b,2,1e,i,q,i,d,,12,8,p,d,18,4,1b,e,10,,1v,e,c,,8,2,1a,,1f,,,3,2,2,5,2,,,15,5,5,2,6k,8,,2,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,1t,5,8t,2,25,6,1y,b,1d,4,3e,3,1h,f,15,,2,2,a,4,19,b,7,,1p,3,10,e,g,2,18,,c,3,1c,e,8,4,,2,2k,c,6,,2,,4d,c,l,4,1j,2,,7,2,2,2,3,9,,a,2,2,7,3,5,1v,9,,,2,,,4,,5,,,e,2,2a,i,n,,29,k,6j,7,2,9,r,2,2a,h,2y,d,2t,3,2,a,74,f,6t,6,,2,2,4,,,,2,3x,7,2,7,3,,s,a,14,7,,4,8,,9,b,1a,g,5i,8,5j,8,,8,2a,m,,e,3e,6,3,,,2,,7,,,1u,5,,2,,5,9n,4,9,2,,,1c,7,3,5,n,,44l,,6,f,8ug,i,1xc,5,1n,7,t4,,,1j,7,4,29,,b,2,f57,2,3mp,1a,2,n,f2,5,3,6,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,2s,,4g,7,af,,1p,4,e4,4,72,2,6r,,2,,7,2,5,,d6,7,31,7,240,5".split(",").map(e=>e?parseInt(e,36):1);for(let t=0,n=0;t<e.length;t++)(t%2?$v:Lv).push(n+=e[t])})();function Vv(e,t,n=!0,r=!0){return(n?Wv:zv)(e,t,r)}function Wv(e,t,n){if(t==e.length)return t;t&&Hv(e.charCodeAt(t))&&qv(e.charCodeAt(t-1))&&t--;let r=Qv(e,t);for(t+=Uv(r);t<e.length;){let i=Qv(e,t);if(8205==r||8205==i||n&&Fv(i))t+=Uv(i),r=i;else{if(!jv(i))break;{let n=0,r=t-2;for(;r>=0&&jv(Qv(e,r));)n++,r-=2;if(n%2==0)break;t+=2}}}return t}function zv(e,t,n){for(;t>1;){let r=Wv(e,t-2,n);if(r<t)return r;t--}return 0}function Qv(e,t){let n=e.charCodeAt(t);if(!qv(n)||t+1==e.length)return n;let r=e.charCodeAt(t+1);return Hv(r)?r-56320+(n-55296<<10)+65536:n}function Hv(e){return e>=56320&&e<57344}function qv(e){return e>=55296&&e<56320}function Uv(e){return e<65536?1:2}class Yv{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,n){[e,t]=rA(this,e,t);let r=[];return this.decompose(0,e,r,2),n.length&&n.decompose(0,n.length,r,3),this.decompose(t,this.length,r,1),Jv.from(r,this.length-(t-e)+n.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=rA(this,e,t);let n=[];return this.decompose(e,t,n,0),Jv.from(n,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),n=this.length-this.scanIdentical(e,-1),r=new Zv(this),i=new Zv(e);for(let e=t,o=t;;){if(r.next(e),i.next(e),e=0,r.lineBreak!=i.lineBreak||r.done!=i.done||r.value!=i.value)return!1;if(o+=r.value.length,r.done||o>=n)return!0}}iter(e=1){return new Zv(this,e)}iterRange(e,t=this.length){return new eA(this,e,t)}iterLines(e,t){let n;if(null==e)n=this.iter();else{null==t&&(t=this.lines+1);let r=this.line(e).from;n=this.iterRange(r,Math.max(r,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new tA(n)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(0==e.length)throw new RangeError("A document must have at least one line");return 1!=e.length||e[0]?e.length<=32?new Xv(e):Jv.from(Xv.split(e,[])):Yv.empty}}class Xv extends Yv{constructor(e,t=function(e){let t=-1;for(let n of e)t+=n.length+1;return t}(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,n,r){for(let i=0;;i++){let o=this.text[i],s=r+o.length;if((t?n:s)>=e)return new nA(r,s,n,o);r=s+1,n++}}decompose(e,t,n,r){let i=e<=0&&t>=this.length?this:new Xv(Kv(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(1&r){let e=n.pop(),t=Gv(i.text,e.text.slice(),0,i.length);if(t.length<=32)n.push(new Xv(t,e.length+i.length));else{let e=t.length>>1;n.push(new Xv(t.slice(0,e)),new Xv(t.slice(e)))}}else n.push(i)}replace(e,t,n){if(!(n instanceof Xv))return super.replace(e,t,n);[e,t]=rA(this,e,t);let r=Gv(this.text,Gv(n.text,Kv(this.text,0,e)),t),i=this.length+n.length-(t-e);return r.length<=32?new Xv(r,i):Jv.from(Xv.split(r,[]),i)}sliceString(e,t=this.length,n="\n"){[e,t]=rA(this,e,t);let r="";for(let i=0,o=0;i<=t&&o<this.text.length;o++){let s=this.text[o],a=i+s.length;i>e&&o&&(r+=n),e<a&&t>i&&(r+=s.slice(Math.max(0,e-i),t-i)),i=a+1}return r}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let n=[],r=-1;for(let i of e)n.push(i),r+=i.length+1,32==n.length&&(t.push(new Xv(n,r)),n=[],r=-1);return r>-1&&t.push(new Xv(n,r)),t}}class Jv extends Yv{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let t of e)this.lines+=t.lines}lineInner(e,t,n,r){for(let i=0;;i++){let o=this.children[i],s=r+o.length,a=n+o.lines-1;if((t?a:s)>=e)return o.lineInner(e,t,n,r);r=s+1,n=a+1}}decompose(e,t,n,r){for(let i=0,o=0;o<=t&&i<this.children.length;i++){let s=this.children[i],a=o+s.length;if(e<=a&&t>=o){let i=r&((o<=e?1:0)|(a>=t?2:0));o>=e&&a<=t&&!i?n.push(s):s.decompose(e-o,t-o,n,i)}o=a+1}}replace(e,t,n){if([e,t]=rA(this,e,t),n.lines<this.lines)for(let r=0,i=0;r<this.children.length;r++){let o=this.children[r],s=i+o.length;if(e>=i&&t<=s){let a=o.replace(e-i,t-i,n),l=this.lines-o.lines+a.lines;if(a.lines<l>>4&&a.lines>l>>6){let i=this.children.slice();return i[r]=a,new Jv(i,this.length-(t-e)+n.length)}return super.replace(i,s,a)}i=s+1}return super.replace(e,t,n)}sliceString(e,t=this.length,n="\n"){[e,t]=rA(this,e,t);let r="";for(let i=0,o=0;i<this.children.length&&o<=t;i++){let s=this.children[i],a=o+s.length;o>e&&i&&(r+=n),e<a&&t>o&&(r+=s.sliceString(e-o,t-o,n)),o=a+1}return r}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof Jv))return 0;let n=0,[r,i,o,s]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;r+=t,i+=t){if(r==o||i==s)return n;let a=this.children[r],l=e.children[i];if(a!=l)return n+a.scanIdentical(l,t);n+=a.length+1}}static from(e,t=e.reduce((e,t)=>e+t.length+1,-1)){let n=0;for(let t of e)n+=t.lines;if(n<32){let n=[];for(let t of e)t.flatten(n);return new Xv(n,t)}let r=Math.max(32,n>>5),i=r<<1,o=r>>1,s=[],a=0,l=-1,c=[];function d(e){let t;if(e.lines>i&&e instanceof Jv)for(let t of e.children)d(t);else e.lines>o&&(a>o||!a)?(u(),s.push(e)):e instanceof Xv&&a&&(t=c[c.length-1])instanceof Xv&&e.lines+t.lines<=32?(a+=e.lines,l+=e.length+1,c[c.length-1]=new Xv(t.text.concat(e.text),t.length+1+e.length)):(a+e.lines>r&&u(),a+=e.lines,l+=e.length+1,c.push(e))}function u(){0!=a&&(s.push(1==c.length?c[0]:Jv.from(c,l)),l=-1,a=c.length=0)}for(let t of e)d(t);return u(),1==s.length?s[0]:new Jv(s,t)}}function Gv(e,t,n=0,r=1e9){for(let i=0,o=0,s=!0;o<e.length&&i<=r;o++){let a=e[o],l=i+a.length;l>=n&&(l>r&&(a=a.slice(0,r-i)),i<n&&(a=a.slice(n-i)),s?(t[t.length-1]+=a,s=!1):t.push(a)),i=l+1}return t}function Kv(e,t,n){return Gv(e,[""],t,n)}Yv.empty=new Xv([""],0);class Zv{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof Xv?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,r=this.nodes[n],i=this.offsets[n],o=i>>1,s=r instanceof Xv?r.text.length:r.children.length;if(o==(t>0?s:0)){if(0==n)return this.done=!0,this.value="",this;t>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&i)==(t>0?0:1)){if(this.offsets[n]+=t,0==e)return this.lineBreak=!0,this.value="\n",this;e--}else if(r instanceof Xv){let i=r.text[o+(t<0?-1:0)];if(this.offsets[n]+=t,i.length>Math.max(0,e))return this.value=0==e?i:t>0?i.slice(e):i.slice(0,i.length-e),this;e-=i.length}else{let i=r.children[o+(t<0?-1:0)];e>i.length?(e-=i.length,this.offsets[n]+=t):(t<0&&this.offsets[n]--,this.nodes.push(i),this.offsets.push(t>0?1:(i instanceof Xv?i.text.length:i.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class eA{constructor(e,t,n){this.value="",this.done=!1,this.cursor=new Zv(e,t>n?-1:1),this.pos=t>n?e.length:0,this.from=Math.min(t,n),this.to=Math.max(t,n)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let n=t<0?this.pos-this.from:this.to-this.pos;e>n&&(e=n),n-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*t,this.value=r.length<=n?r:t<0?r.slice(r.length-n):r.slice(0,n),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&""!=this.value}}class tA{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:n,value:r}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):n?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}}"undefined"!=typeof Symbol&&(Yv.prototype[Symbol.iterator]=function(){return this.iter()},Zv.prototype[Symbol.iterator]=eA.prototype[Symbol.iterator]=tA.prototype[Symbol.iterator]=function(){return this});class nA{constructor(e,t,n,r){this.from=e,this.to=t,this.number=n,this.text=r}get length(){return this.to-this.from}}function rA(e,t,n){return[t=Math.max(0,Math.min(e.length,t)),Math.max(t,Math.min(e.length,n))]}function iA(e,t,n=!0,r=!0){return Vv(e,t,n,r)}function oA(e,t){let n=e.charCodeAt(t);if(!(r=n,r>=55296&&r<56320&&t+1!=e.length))return n;var r;let i=e.charCodeAt(t+1);return function(e){return e>=56320&&e<57344}(i)?i-56320+(n-55296<<10)+65536:n}function sA(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}function aA(e){return e<65536?1:2}const lA=/\r\n?|\n/;var cA=function(e){return e[e.Simple=0]="Simple",e[e.TrackDel=1]="TrackDel",e[e.TrackBefore=2]="TrackBefore",e[e.TrackAfter=3]="TrackAfter",e}(cA||(cA={}));class dA{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t+1];e+=n<0?this.sections[t]:n}return e}get empty(){return 0==this.sections.length||2==this.sections.length&&this.sections[1]<0}iterGaps(e){for(let t=0,n=0,r=0;t<this.sections.length;){let i=this.sections[t++],o=this.sections[t++];o<0?(e(n,r,i),r+=i):r+=o,n+=i}}iterChangedRanges(e,t=!1){fA(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let n=this.sections[t++],r=this.sections[t++];r<0?e.push(n,r):e.push(r,n)}return new dA(e)}composeDesc(e){return this.empty?e:e.empty?this:mA(this,e)}mapDesc(e,t=!1){return e.empty?this:gA(this,e,t)}mapPos(e,t=-1,n=cA.Simple){let r=0,i=0;for(let o=0;o<this.sections.length;){let s=this.sections[o++],a=this.sections[o++],l=r+s;if(a<0){if(l>e)return i+(e-r);i+=s}else{if(n!=cA.Simple&&l>=e&&(n==cA.TrackDel&&r<e&&l>e||n==cA.TrackBefore&&r<e||n==cA.TrackAfter&&l>e))return null;if(l>e||l==e&&t<0&&!s)return e==r||t<0?i:i+a;i+=a}r=l}if(e>r)throw new RangeError(`Position ${e} is out of range for changeset of length ${r}`);return i}touchesRange(e,t=e){for(let n=0,r=0;n<this.sections.length&&r<=t;){let i=r+this.sections[n++];if(this.sections[n++]>=0&&r<=t&&i>=e)return!(r<e&&i>t)||"cover";r=i}return!1}toString(){let e="";for(let t=0;t<this.sections.length;){let n=this.sections[t++],r=this.sections[t++];e+=(e?" ":"")+n+(r>=0?":"+r:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(e=>"number"!=typeof e))throw new RangeError("Invalid JSON representation of ChangeDesc");return new dA(e)}static create(e){return new dA(e)}}class uA extends dA{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return fA(this,(t,n,r,i,o)=>e=e.replace(r,r+(n-t),o),!1),e}mapDesc(e,t=!1){return gA(this,e,t,!0)}invert(e){let t=this.sections.slice(),n=[];for(let r=0,i=0;r<t.length;r+=2){let o=t[r],s=t[r+1];if(s>=0){t[r]=s,t[r+1]=o;let a=r>>1;for(;n.length<a;)n.push(Yv.empty);n.push(o?e.slice(i,i+o):Yv.empty)}i+=o}return new uA(t,n)}compose(e){return this.empty?e:e.empty?this:mA(this,e,!0)}map(e,t=!1){return e.empty?this:gA(this,e,t,!0)}iterChanges(e,t=!1){fA(this,e,t)}get desc(){return dA.create(this.sections)}filter(e){let t=[],n=[],r=[],i=new vA(this);e:for(let o=0,s=0;;){let a=o==e.length?1e9:e[o++];for(;s<a||s==a&&0==i.len;){if(i.done)break e;let e=Math.min(i.len,a-s);pA(r,e,-1);let o=-1==i.ins?-1:0==i.off?i.ins:0;pA(t,e,o),o>0&&hA(n,t,i.text),i.forward(e),s+=e}let l=e[o++];for(;s<l;){if(i.done)break e;let e=Math.min(i.len,l-s);pA(t,e,-1),pA(r,e,-1==i.ins?-1:0==i.off?i.ins:0),i.forward(e),s+=e}}return{changes:new uA(t,n),filtered:dA.create(r)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t],r=this.sections[t+1];r<0?e.push(n):0==r?e.push([n]):e.push([n].concat(this.inserted[t>>1].toJSON()))}return e}static of(e,t,n){let r=[],i=[],o=0,s=null;function a(e=!1){if(!e&&!r.length)return;o<t&&pA(r,t-o,-1);let n=new uA(r,i);s=s?s.compose(n.map(s)):n,r=[],i=[],o=0}return function e(l){if(Array.isArray(l))for(let t of l)e(t);else if(l instanceof uA){if(l.length!=t)throw new RangeError(`Mismatched change set length (got ${l.length}, expected ${t})`);a(),s=s?s.compose(l.map(s)):l}else{let{from:e,to:s=e,insert:c}=l;if(e>s||e<0||s>t)throw new RangeError(`Invalid change range ${e} to ${s} (in doc of length ${t})`);let d=c?"string"==typeof c?Yv.of(c.split(n||lA)):c:Yv.empty,u=d.length;if(e==s&&0==u)return;e<o&&a(),e>o&&pA(r,e-o,-1),pA(r,s-e,u),hA(i,r,d),o=s}}(e),a(!s),s}static empty(e){return new uA(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],n=[];for(let r=0;r<e.length;r++){let i=e[r];if("number"==typeof i)t.push(i,-1);else{if(!Array.isArray(i)||"number"!=typeof i[0]||i.some((e,t)=>t&&"string"!=typeof e))throw new RangeError("Invalid JSON representation of ChangeSet");if(1==i.length)t.push(i[0],0);else{for(;n.length<r;)n.push(Yv.empty);n[r]=Yv.of(i.slice(1)),t.push(i[0],n[r].length)}}}return new uA(t,n)}static createSet(e,t){return new uA(e,t)}}function pA(e,t,n,r=!1){if(0==t&&n<=0)return;let i=e.length-2;i>=0&&n<=0&&n==e[i+1]?e[i]+=t:i>=0&&0==t&&0==e[i]?e[i+1]+=n:r?(e[i]+=t,e[i+1]+=n):e.push(t,n)}function hA(e,t,n){if(0==n.length)return;let r=t.length-2>>1;if(r<e.length)e[e.length-1]=e[e.length-1].append(n);else{for(;e.length<r;)e.push(Yv.empty);e.push(n)}}function fA(e,t,n){let r=e.inserted;for(let i=0,o=0,s=0;s<e.sections.length;){let a=e.sections[s++],l=e.sections[s++];if(l<0)i+=a,o+=a;else{let c=i,d=o,u=Yv.empty;for(;c+=a,d+=l,l&&r&&(u=u.append(r[s-2>>1])),!(n||s==e.sections.length||e.sections[s+1]<0);)a=e.sections[s++],l=e.sections[s++];t(i,c,o,d,u),i=c,o=d}}}function gA(e,t,n,r=!1){let i=[],o=r?[]:null,s=new vA(e),a=new vA(t);for(let e=-1;;){if(s.done&&a.len||a.done&&s.len)throw new Error("Mismatched change set lengths");if(-1==s.ins&&-1==a.ins){let e=Math.min(s.len,a.len);pA(i,e,-1),s.forward(e),a.forward(e)}else if(a.ins>=0&&(s.ins<0||e==s.i||0==s.off&&(a.len<s.len||a.len==s.len&&!n))){let t=a.len;for(pA(i,a.ins,-1);t;){let n=Math.min(s.len,t);s.ins>=0&&e<s.i&&s.len<=n&&(pA(i,0,s.ins),o&&hA(o,i,s.text),e=s.i),s.forward(n),t-=n}a.next()}else{if(!(s.ins>=0)){if(s.done&&a.done)return o?uA.createSet(i,o):dA.create(i);throw new Error("Mismatched change set lengths")}{let t=0,n=s.len;for(;n;)if(-1==a.ins){let e=Math.min(n,a.len);t+=e,n-=e,a.forward(e)}else{if(!(0==a.ins&&a.len<n))break;n-=a.len,a.next()}pA(i,t,e<s.i?s.ins:0),o&&e<s.i&&hA(o,i,s.text),e=s.i,s.forward(s.len-n)}}}}function mA(e,t,n=!1){let r=[],i=n?[]:null,o=new vA(e),s=new vA(t);for(let e=!1;;){if(o.done&&s.done)return i?uA.createSet(r,i):dA.create(r);if(0==o.ins)pA(r,o.len,0,e),o.next();else if(0!=s.len||s.done){if(o.done||s.done)throw new Error("Mismatched change set lengths");{let t=Math.min(o.len2,s.len),n=r.length;if(-1==o.ins){let n=-1==s.ins?-1:s.off?0:s.ins;pA(r,t,n,e),i&&n&&hA(i,r,s.text)}else-1==s.ins?(pA(r,o.off?0:o.len,t,e),i&&hA(i,r,o.textBit(t))):(pA(r,o.off?0:o.len,s.off?0:s.ins,e),i&&!s.off&&hA(i,r,s.text));e=(o.ins>t||s.ins>=0&&s.len>t)&&(e||r.length>n),o.forward2(t),s.forward(t)}}else pA(r,0,s.ins,e),i&&hA(i,r,s.text),s.next()}}class vA{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return-2==this.ins}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>1;return t>=e.length?Yv.empty:e[t]}textBit(e){let{inserted:t}=this.set,n=this.i-2>>1;return n>=t.length&&!e?Yv.empty:t[n].slice(this.off,null==e?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){-1==this.ins?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class AA{constructor(e,t,n,r){this.from=e,this.to=t,this.flags=n,this.goalColumn=r}get anchor(){return 32&this.flags?this.to:this.from}get head(){return 32&this.flags?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return 8&this.flags?-1:16&this.flags?1:0}get undirectional(){return(64&this.flags)>0}get bidiLevel(){let e=7&this.flags;return 7==e?null:e}map(e,t=-1){let n,r;return this.empty?n=r=e.mapPos(this.from,t):(n=e.mapPos(this.from,1),r=e.mapPos(this.to,-1)),n==this.from&&r==this.to?this:new AA(n,r,this.flags,this.goalColumn)}extend(e,t=e,n=0){if(e<=this.anchor&&t>=this.anchor)return bA.range(e,t,void 0,void 0,n);let r=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return bA.range(this.anchor,r,void 0,void 0,n)}eq(e,t=!1){return!(this.anchor!=e.anchor||this.head!=e.head||this.goalColumn!=e.goalColumn||t&&this.empty&&this.assoc!=e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||"number"!=typeof e.anchor||"number"!=typeof e.head)throw new RangeError("Invalid JSON representation for SelectionRange");return bA.range(e.anchor,e.head)}static create(e,t,n,r){return new AA(e,t,n,r)}}class bA{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:bA.create(this.ranges.map(n=>n.map(e,t)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let n=0;n<this.ranges.length;n++)if(!this.ranges[n].eq(e.ranges[n],t))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return 1==this.ranges.length?this:new bA([this.main],0)}addRange(e,t=!0){return bA.create([e].concat(this.ranges),t?0:this.mainIndex+1)}replaceRange(e,t=this.mainIndex){let n=this.ranges.slice();return n[t]=e,bA.create(n,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||"number"!=typeof e.main||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new bA(e.ranges.map(e=>AA.fromJSON(e)),e.main)}static single(e,t=e){return new bA([bA.range(e,t)],0)}static create(e,t=0){if(0==e.length)throw new RangeError("A selection needs at least one range");for(let n=0,r=0;r<e.length;r++){let i=e[r];if(i.empty?i.from<=n:i.from<n)return bA.normalized(e.slice(),t);n=i.to}return new bA(e,t)}static cursor(e,t=0,n,r){return AA.create(e,e,(0==t?0:t<0?8:16)|(null==n?7:Math.min(6,n)),r)}static range(e,t,n,r,i){let o=null==r?7:Math.min(6,r);return i||e==t||(i=t<e?1:-1),i&&(o|=i<0?8:16),t<e?AA.create(t,e,32|o,n):AA.create(e,t,o,n)}static undirectionalRange(e,t){return AA.create(e,t,64,void 0)}static normalized(e,t=0){let n=e[t];e.sort((e,t)=>e.from-t.from),t=e.indexOf(n);for(let n=1;n<e.length;n++){let r=e[n],i=e[n-1];if(r.empty?r.from<=i.to:r.from<i.to){let o=i.from,s=Math.max(r.to,i.to);n<=t&&t--,e.splice(--n,2,r.anchor>r.head?bA.range(s,o):bA.range(o,s))}}return new bA(e,t)}}function yA(e,t){for(let n of e.ranges)if(n.to>t)throw new RangeError("Selection points outside of document")}let CA=0;class xA{constructor(e,t,n,r,i){this.combine=e,this.compareInput=t,this.compare=n,this.isStatic=r,this.id=CA++,this.default=e([]),this.extensions="function"==typeof i?i(this):i}get reader(){return this}static define(e={}){return new xA(e.combine||(e=>e),e.compareInput||((e,t)=>e===t),e.compare||(e.combine?(e,t)=>e===t:wA),!!e.static,e.enables)}of(e){return new kA([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new kA(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new kA(e,this,2,t)}from(e,t){return t||(t=e=>e),this.compute([e],n=>t(n.field(e)))}}function wA(e,t){return e==t||e.length==t.length&&e.every((e,n)=>e===t[n])}class kA{constructor(e,t,n,r){this.dependencies=e,this.facet=t,this.type=n,this.value=r,this.id=CA++}dynamicSlot(e){var t;let n=this.value,r=this.facet.compareInput,i=this.id,o=e[i]>>1,s=2==this.type,a=!1,l=!1,c=[];for(let n of this.dependencies)"doc"==n?a=!0:"selection"==n?l=!0:1&(null!==(t=e[n.id])&&void 0!==t?t:1)||c.push(e[n.id]);return{create:e=>(e.values[o]=n(e),1),update(e,t){if(a&&t.docChanged||l&&(t.docChanged||t.selection)||OA(e,c)){let t=n(e);if(s?!SA(t,e.values[o],r):!r(t,e.values[o]))return e.values[o]=t,1}return 0},reconfigure:(e,t)=>{let a,l=t.config.address[i];if(null!=l){let i=VA(t,l);if(this.dependencies.every(n=>n instanceof xA?t.facet(n)===e.facet(n):!(n instanceof EA)||t.field(n,!1)==e.field(n,!1))||(s?SA(a=n(e),i,r):r(a=n(e),i)))return e.values[o]=i,0}else a=n(e);return e.values[o]=a,1}}}get extension(){return this}}function SA(e,t,n){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1;return!0}function OA(e,t){let n=!1;for(let r of t)1&jA(e,r)&&(n=!0);return n}function _A(e,t,n){let r=n.map(t=>e[t.id]),i=n.map(e=>e.type),o=r.filter(e=>!(1&e)),s=e[t.id]>>1;function a(e){let n=[];for(let t=0;t<r.length;t++){let o=VA(e,r[t]);if(2==i[t])for(let e of o)n.push(e);else n.push(o)}return t.combine(n)}return{create(e){for(let t of r)jA(e,t);return e.values[s]=a(e),1},update(e,n){if(!OA(e,o))return 0;let r=a(e);return t.compare(r,e.values[s])?0:(e.values[s]=r,1)},reconfigure(e,i){let o=OA(e,r),l=i.config.facets[t.id],c=i.facet(t);if(l&&!o&&wA(n,l))return e.values[s]=c,0;let d=a(e);return t.compare(d,c)?(e.values[s]=c,0):(e.values[s]=d,1)}}}const BA=xA.define({static:!0});class EA{constructor(e,t,n,r,i){this.id=e,this.createF=t,this.updateF=n,this.compareF=r,this.spec=i,this.provides=void 0}static define(e){let t=new EA(CA++,e.create,e.update,e.compare||((e,t)=>e===t),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(BA).find(e=>e.field==this);return((null==t?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:e=>(e.values[t]=this.create(e),1),update:(e,n)=>{let r=e.values[t],i=this.updateF(r,n);return this.compareF(r,i)?0:(e.values[t]=i,1)},reconfigure:(e,n)=>{let r,i=e.facet(BA),o=n.facet(BA);return(r=i.find(e=>e.field==this))&&r!=o.find(e=>e.field==this)?(e.values[t]=r.create(e),1):null!=n.config.address[this.id]?(e.values[t]=n.field(this),0):(e.values[t]=this.create(e),1)}}}init(e){return[this,BA.of({field:this,create:e})]}get extension(){return this}}const TA=4,MA=3,DA=2,PA=1;function RA(e){return t=>new NA(t,e)}const IA={highest:RA(0),high:RA(PA),default:RA(DA),low:RA(MA),lowest:RA(TA)};class NA{constructor(e,t){this.inner=e,this.prec=t}get extension(){return this}}class LA{of(e){return new $A(this,e)}reconfigure(e){return LA.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class $A{constructor(e,t){this.compartment=e,this.inner=t}get extension(){return this}}class FA{constructor(e,t,n,r,i,o){for(this.base=e,this.compartments=t,this.dynamicSlots=n,this.address=r,this.staticValues=i,this.facets=o,this.statusTemplate=[];this.statusTemplate.length<n.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return null==t?e.default:this.staticValues[t>>1]}static resolve(e,t,n){let r=[],i=Object.create(null),o=new Map;for(let n of function(e,t,n){let r=[[],[],[],[],[]],i=new Map;function o(e,s){let a=i.get(e);if(null!=a){if(a<=s)return;let t=r[a].indexOf(e);t>-1&&r[a].splice(t,1),e instanceof $A&&n.delete(e.compartment)}if(i.set(e,s),Array.isArray(e))for(let t of e)o(t,s);else if(e instanceof $A){if(n.has(e.compartment))throw new RangeError("Duplicate use of compartment in extensions");let r=t.get(e.compartment)||e.inner;n.set(e.compartment,r),o(r,s)}else if(e instanceof NA)o(e.inner,e.prec);else if(e instanceof EA)r[s].push(e),e.provides&&o(e.provides,s);else if(e instanceof kA)r[s].push(e),e.facet.extensions&&o(e.facet.extensions,DA);else{let t=e.extension;if(!t)throw new Error(`Unrecognized extension value in extension set (${e}).`);if(t==e)throw new Error(`Unrecognized extension value in extension set (${e}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);o(t,s)}}return o(e,DA),r.reduce((e,t)=>e.concat(t))}(e,t,o))n instanceof EA?r.push(n):(i[n.facet.id]||(i[n.facet.id]=[])).push(n);let s=Object.create(null),a=[],l=[];for(let e of r)s[e.id]=l.length<<1,l.push(t=>e.slot(t));let c=null==n?void 0:n.config.facets;for(let e in i){let t=i[e],r=t[0].facet,o=c&&c[e]||[];if(t.every(e=>0==e.type))if(s[r.id]=a.length<<1|1,wA(o,t))a.push(n.facet(r));else{let e=r.combine(t.map(e=>e.value));a.push(n&&r.compare(e,n.facet(r))?n.facet(r):e)}else{for(let e of t)0==e.type?(s[e.id]=a.length<<1|1,a.push(e.value)):(s[e.id]=l.length<<1,l.push(t=>e.dynamicSlot(t)));s[r.id]=l.length<<1,l.push(e=>_A(e,r,t))}}let d=l.map(e=>e(s));return new FA(e,o,d,s,a,i)}}function jA(e,t){if(1&t)return 2;let n=t>>1,r=e.status[n];if(4==r)throw new Error("Cyclic dependency between fields and/or facets");if(2&r)return r;e.status[n]=4;let i=e.computeSlot(e,e.config.dynamicSlots[n]);return e.status[n]=2|i}function VA(e,t){return 1&t?e.config.staticValues[t>>1]:e.values[t>>1]}const WA=xA.define(),zA=xA.define({combine:e=>e.some(e=>e),static:!0}),QA=xA.define({combine:e=>e.length?e[0]:void 0,static:!0}),HA=xA.define(),qA=xA.define(),UA=xA.define(),YA=xA.define({combine:e=>!!e.length&&e[0]});class XA{constructor(e,t){this.type=e,this.value=t}static define(){return new JA}}class JA{of(e){return new XA(this,e)}}class GA{constructor(e){this.map=e}of(e){return new KA(this,e)}}class KA{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return void 0===t?void 0:t==this.value?this:new KA(this.type,t)}is(e){return this.type==e}static define(e={}){return new GA(e.map||(e=>e))}static mapEffects(e,t){if(!e.length)return e;let n=[];for(let r of e){let e=r.map(t);e&&n.push(e)}return n}}KA.reconfigure=KA.define(),KA.appendConfig=KA.define();class ZA{constructor(e,t,n,r,i,o){this.startState=e,this.changes=t,this.selection=n,this.effects=r,this.annotations=i,this.scrollIntoView=o,this._doc=null,this._state=null,n&&yA(n,t.newLength),i.some(e=>e.type==ZA.time)||(this.annotations=i.concat(ZA.time.of(Date.now())))}static create(e,t,n,r,i,o){return new ZA(e,t,n,r,i,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(ZA.userEvent);return!(!t||!(t==e||t.length>e.length&&t.slice(0,e.length)==e&&"."==t[e.length]))}}function eb(e,t){let n=[];for(let r=0,i=0;;){let o,s;if(r<e.length&&(i==t.length||t[i]>=e[r]))o=e[r++],s=e[r++];else{if(!(i<t.length))return n;o=t[i++],s=t[i++]}!n.length||n[n.length-1]<o?n.push(o,s):n[n.length-1]<s&&(n[n.length-1]=s)}}function tb(e,t,n){var r;let i,o,s;return n?(i=t.changes,o=uA.empty(t.changes.length),s=e.changes.compose(t.changes)):(i=t.changes.map(e.changes),o=e.changes.mapDesc(t.changes,!0),s=e.changes.compose(i)),{changes:s,selection:t.selection?t.selection.map(o):null===(r=e.selection)||void 0===r?void 0:r.map(i),effects:KA.mapEffects(e.effects,i).concat(KA.mapEffects(t.effects,o)),annotations:e.annotations.length?e.annotations.concat(t.annotations):t.annotations,scrollIntoView:e.scrollIntoView||t.scrollIntoView}}function nb(e,t,n){let r=t.selection,i=ob(t.annotations);return t.userEvent&&(i=i.concat(ZA.userEvent.of(t.userEvent))),{changes:t.changes instanceof uA?t.changes:uA.of(t.changes||[],n,e.facet(QA)),selection:r&&(r instanceof bA?r:bA.single(r.anchor,r.head)),effects:ob(t.effects),annotations:i,scrollIntoView:!!t.scrollIntoView}}function rb(e,t,n){let r=nb(e,t.length?t[0]:{},e.doc.length);t.length&&!1===t[0].filter&&(n=!1);for(let i=1;i<t.length;i++){!1===t[i].filter&&(n=!1);let o=!!t[i].sequential;r=tb(r,nb(e,t[i],o?r.changes.newLength:e.doc.length),o)}let i=ZA.create(e,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return function(e){let t=e.startState,n=t.facet(UA),r=e;for(let i=n.length-1;i>=0;i--){let o=n[i](e);o&&Object.keys(o).length&&(r=tb(r,nb(t,o,e.changes.newLength),!0))}return r==e?e:ZA.create(t,e.changes,e.selection,r.effects,r.annotations,r.scrollIntoView)}(n?function(e){let t=e.startState,n=!0;for(let r of t.facet(HA)){let t=r(e);if(!1===t){n=!1;break}Array.isArray(t)&&(n=!0===n?t:eb(n,t))}if(!0!==n){let r,i;if(!1===n)i=e.changes.invertedDesc,r=uA.empty(t.doc.length);else{let t=e.changes.filter(n);r=t.changes,i=t.filtered.mapDesc(t.changes).invertedDesc}e=ZA.create(t,r,e.selection&&e.selection.map(i),KA.mapEffects(e.effects,i),e.annotations,e.scrollIntoView)}let r=t.facet(qA);for(let n=r.length-1;n>=0;n--){let i=r[n](e);e=i instanceof ZA?i:Array.isArray(i)&&1==i.length&&i[0]instanceof ZA?i[0]:rb(t,ob(i),!1)}return e}(i):i)}ZA.time=XA.define(),ZA.userEvent=XA.define(),ZA.addToHistory=XA.define(),ZA.remote=XA.define();const ib=[];function ob(e){return null==e?ib:Array.isArray(e)?e:[e]}var sb=function(e){return e[e.Word=0]="Word",e[e.Space=1]="Space",e[e.Other=2]="Other",e}(sb||(sb={}));const ab=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let lb;try{lb=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(e){}function cb(e){return t=>{if(!/\S/.test(t))return sb.Space;if(function(e){if(lb)return lb.test(e);for(let t=0;t<e.length;t++){let n=e[t];if(/\w/.test(n)||n>""&&(n.toUpperCase()!=n.toLowerCase()||ab.test(n)))return!0}return!1}(t))return sb.Word;for(let n=0;n<e.length;n++)if(t.indexOf(e[n])>-1)return sb.Word;return sb.Other}}class db{constructor(e,t,n,r,i,o){this.config=e,this.doc=t,this.selection=n,this.values=r,this.status=e.statusTemplate.slice(),this.computeSlot=i,o&&(o._state=this);for(let e=0;e<this.config.dynamicSlots.length;e++)jA(this,e<<1);this.computeSlot=null}field(e,t=!0){let n=this.config.address[e.id];if(null!=n)return jA(this,n),VA(this,n);if(t)throw new RangeError("Field is not present in this state")}update(...e){return rb(this,e,!0)}applyTransaction(e){let t,n=this.config,{base:r,compartments:i}=n;for(let t of e.effects)t.is(LA.reconfigure)?(n&&(i=new Map,n.compartments.forEach((e,t)=>i.set(t,e)),n=null),i.set(t.value.compartment,t.value.extension)):t.is(KA.reconfigure)?(n=null,r=t.value):t.is(KA.appendConfig)&&(n=null,r=ob(r).concat(t.value));if(n)t=e.startState.values.slice();else{n=FA.resolve(r,i,this),t=new db(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(e,t)=>t.reconfigure(e,this),null).values}let o=e.startState.facet(zA)?e.newSelection:e.newSelection.asSingle();new db(n,e.newDoc,o,t,(t,n)=>n.update(t,e),e)}replaceSelection(e){return"string"==typeof e&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:bA.cursor(t.from+e.length,-1)}))}changeByRange(e){let t=this.selection,n=e(t.ranges[0]),r=this.changes(n.changes),i=[n.range],o=ob(n.effects);for(let n=1;n<t.ranges.length;n++){let s=e(t.ranges[n]),a=this.changes(s.changes),l=a.map(r);for(let e=0;e<n;e++)i[e]=i[e].map(l);let c=r.mapDesc(a,!0);i.push(s.range.map(c)),r=r.compose(l),o=KA.mapEffects(o,l).concat(KA.mapEffects(ob(s.effects),c))}return{changes:r,selection:bA.create(i,t.mainIndex),effects:o}}changes(e=[]){return e instanceof uA?e:uA.of(e,this.doc.length,this.facet(db.lineSeparator))}toText(e){return Yv.of(e.split(this.facet(db.lineSeparator)||lA))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return null==t?e.default:(jA(this,t),VA(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let n in e){let r=e[n];r instanceof EA&&null!=this.config.address[r.id]&&(t[n]=r.spec.toJSON(this.field(e[n]),this))}return t}static fromJSON(e,t={},n){if(!e||"string"!=typeof e.doc)throw new RangeError("Invalid JSON representation for EditorState");let r=[];if(n)for(let t in n)if(Object.prototype.hasOwnProperty.call(e,t)){let i=n[t],o=e[t];r.push(i.init(e=>i.spec.fromJSON(o,e)))}return db.create({doc:e.doc,selection:bA.fromJSON(e.selection),extensions:t.extensions?r.concat([t.extensions]):r})}static create(e={}){let t=FA.resolve(e.extensions||[],new Map),n=e.doc instanceof Yv?e.doc:Yv.of((e.doc||"").split(t.staticFacet(db.lineSeparator)||lA)),r=e.selection?e.selection instanceof bA?e.selection:bA.single(e.selection.anchor,e.selection.head):bA.single(0);return yA(r,n.length),t.staticFacet(zA)||(r=r.asSingle()),new db(t,n,r,t.dynamicSlots.map(()=>null),(e,t)=>t.create(e),null)}get tabSize(){return this.facet(db.tabSize)}get lineBreak(){return this.facet(db.lineSeparator)||"\n"}get readOnly(){return this.facet(YA)}phrase(e,...t){for(let t of this.facet(db.phrases))if(Object.prototype.hasOwnProperty.call(t,e)){e=t[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(e,n)=>{if("$"==n)return"$";let r=+(n||1);return!r||r>t.length?e:t[r-1]})),e}languageDataAt(e,t,n=-1){let r=[];for(let i of this.facet(WA))for(let o of i(this,t,n))Object.prototype.hasOwnProperty.call(o,e)&&r.push(o[e]);return r}charCategorizer(e){let t=this.languageDataAt("wordChars",e);return cb(t.length?t[0]:"")}wordAt(e){let{text:t,from:n,length:r}=this.doc.lineAt(e),i=this.charCategorizer(e),o=e-n,s=e-n;for(;o>0;){let e=iA(t,o,!1);if(i(t.slice(e,o))!=sb.Word)break;o=e}for(;s<r;){let e=iA(t,s);if(i(t.slice(s,e))!=sb.Word)break;s=e}return o==s?null:bA.range(o+n,s+n)}}function ub(e,t,n={}){let r={};for(let t of e)for(let e of Object.keys(t)){let i=t[e],o=r[e];if(void 0===o)r[e]=i;else if(o===i||void 0===i);else{if(!Object.hasOwnProperty.call(n,e))throw new Error("Config merge conflict for field "+e);r[e]=n[e](o,i)}}for(let e in t)void 0===r[e]&&(r[e]=t[e]);return r}db.allowMultipleSelections=zA,db.tabSize=xA.define({combine:e=>e.length?e[0]:4}),db.lineSeparator=QA,db.readOnly=YA,db.phrases=xA.define({compare(e,t){let n=Object.keys(e),r=Object.keys(t);return n.length==r.length&&n.every(n=>e[n]==t[n])}}),db.languageData=WA,db.changeFilter=HA,db.transactionFilter=qA,db.transactionExtender=UA,LA.reconfigure=KA.define();class pb{eq(e){return this==e}range(e,t=e){return fb.create(e,t,this)}}function hb(e,t){return e==t||e.constructor==t.constructor&&e.eq(t)}pb.prototype.startSide=pb.prototype.endSide=0,pb.prototype.point=!1,pb.prototype.mapMode=cA.TrackDel;class fb{constructor(e,t,n){this.from=e,this.to=t,this.value=n}static create(e,t,n){return new fb(e,t,n)}}function gb(e,t){return e.from-t.from||e.value.startSide-t.value.startSide}class mb{constructor(e,t,n,r){this.from=e,this.to=t,this.value=n,this.maxPoint=r}get length(){return Ab(this.to)}findIndex(e,t,n,r=0){let i=n?this.to:this.from;for(let o=r,s=i.length;;){if(o==s)return o;let r=o+s>>1,a=i[r]-e||(n?this.value[r].endSide:this.value[r].startSide)-t;if(r==o)return a>=0?o:s;a>=0?s=r:o=r+1}}between(e,t,n,r){for(let i=this.findIndex(t,-1e9,!0),o=this.findIndex(n,1e9,!1,i);i<o;i++)if(!1===r(this.from[i]+e,this.to[i]+e,this.value[i]))return!1}map(e,t,n,r,i){let o=[],s=[],a=[],l=-1,c=-1;e:for(let d=0;d<this.value.length;d++){let u,p,h=this.value[d],f=this.from[d]+e,g=this.to[d]+e;if(f==g){let e=t.mapPos(f,h.startSide,h.mapMode);if(null==e)continue;if(u=p=e,h.startSide!=h.endSide&&(p=t.mapPos(f,h.endSide),p<u))continue}else if(u=t.mapPos(f,h.startSide),p=t.mapPos(g,h.endSide),u>p||u==p&&h.startSide>0&&h.endSide<=0)continue;if(!((p-u||h.endSide-h.startSide)<0))if(l<0&&(l=u),h.point&&(c=Math.max(c,p-u)),(u-n||h.startSide-r)>=0)o.push(h),s.push(u-l),a.push(p-l),n=p,r=h.endSide;else{if(u==p)for(let e=o.length;e>0;e--){if((u-(a[e-1]+l)||h.startSide-o[e-1].endSide)>=0){o.splice(e,0,h),s.splice(e,0,u-l),a.splice(e,0,p-l);continue e}if((u-(s[e-1]+l)||h.endSide-o[e-1].startSide)>0)break}i(u,p,h)}}return{mapped:o.length?new mb(s,a,o,c):null,pos:l}}}class vb{constructor(e,t,n,r){this.chunkPos=e,this.chunk=t,this.nextLayer=n,this.maxPoint=r}static create(e,t,n,r){return new vb(e,t,n,r)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:n=!1,filterFrom:r=0,filterTo:i=this.length}=e,o=e.filter;if(0==t.length&&!o)return this;if(n&&(t=t.slice().sort(gb)),this.isEmpty)return t.length?vb.of(t):this;let s=new Cb(this,null,-1).goto(0),a=0,l=[],c=new bb;for(;s.value||a<t.length;)if(a<t.length&&(s.from-t[a].from||s.startSide-t[a].value.startSide)>=0){let e=t[a++];c.addInner(e.from,e.to,e.value,!1)||l.push(e)}else 1==s.rangeIndex&&s.chunkIndex<this.chunk.length&&(a==t.length||this.chunkEnd(s.chunkIndex)<t[a].from)&&(!o||r>this.chunkEnd(s.chunkIndex)||i<this.chunkPos[s.chunkIndex])&&c.addChunk(this.chunkPos[s.chunkIndex],this.chunk[s.chunkIndex])?s.nextChunk():((!o||r>s.to||i<s.from||o(s.from,s.to,s.value))&&(c.addInner(s.from,s.to,s.value,!1)||l.push(fb.create(s.from,s.to,s.value))),s.next());return c.finishInner(this.nextLayer.isEmpty&&!l.length?vb.empty:this.nextLayer.update({add:l,filter:o,filterFrom:r,filterTo:i}))}map(e){if(e.empty||this.isEmpty)return this;let t,n=[],r=[],i=-1,o=(e,n,r)=>{t||(t=new bb),t.addRange(e,n,r,!1)};for(let t=0;t<this.chunk.length;t++){let s=this.chunkPos[t],a=this.chunk[t],l=e.touchesRange(s,s+a.length);if(!1===l)i=Math.max(i,a.maxPoint),n.push(a),r.push(e.mapPos(s));else if(!0===l){let[t,l]=n.length?[Ab(r)+Ab(n).length,Ab(Ab(n).value).endSide]:[-1,-1],{mapped:c,pos:d}=a.map(s,e,t,l,o);c&&(i=Math.max(i,c.maxPoint),n.push(c),r.push(d))}}let s=this.nextLayer.map(e);return t&&(s=t.finishInner(s)),0==n.length?s:new vb(r,n,s||vb.empty,i)}between(e,t,n){if(!this.isEmpty){for(let r=0;r<this.chunk.length;r++){let i=this.chunkPos[r],o=this.chunk[r];if(t>=i&&e<=i+o.length&&!1===o.between(i,e-i,t-i,n))return}this.nextLayer.between(e,t,n)}}iter(e=0){return xb.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return xb.from(e).goto(t)}static compare(e,t,n,r,i=-1){let o=e.filter(e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=i),s=t.filter(e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=i),a=yb(o,s,n),l=new kb(o,a,i),c=new kb(s,a,i);n.iterGaps((e,t,n)=>Sb(l,e,c,t,n,r)),n.empty&&0==n.length&&Sb(l,0,c,0,0,r)}static eq(e,t,n=0,r){null==r&&(r=999999999);let i=e.filter(e=>!e.isEmpty&&t.indexOf(e)<0),o=t.filter(t=>!t.isEmpty&&e.indexOf(t)<0);if(i.length!=o.length)return!1;if(!i.length)return!0;let s=yb(i,o),a=new kb(i,s,0).goto(n),l=new kb(o,s,0).goto(n);for(;;){if(a.to!=l.to||!Ob(a.active,l.active)||a.point&&(!l.point||!hb(a.point,l.point)))return!1;if(a.to>r)return!0;a.next(),l.next()}}static spans(e,t,n,r,i=-1){let o=new kb(e,null,i).goto(t),s=t,a=o.openStart;for(;;){let e=Math.min(o.to,n);if(o.point){let n=o.activeForPoint(o.to),i=o.pointFrom<t?n.length+1:o.point.startSide<0?n.length:Math.min(n.length,a);r.point(s,e,o.point,n,i,o.pointRank),a=Math.min(o.openEnd(e),n.length)}else e>s&&(r.span(s,e,o.active,a),a=o.openEnd(e));if(o.to>n)return a+(o.point&&o.to>n?1:0);s=o.to,o.next()}}static of(e,t=!1){let n=new bb;for(let r of e instanceof fb?[e]:t?function(e){if(e.length>1)for(let t=e[0],n=1;n<e.length;n++){let r=e[n];if(gb(t,r)>0)return e.slice().sort(gb);t=r}return e}(e):e)n.add(r.from,r.to,r.value);return n.finish()}static join(e){if(!e.length)return vb.empty;let t=Ab(e);for(let n=e.length-2;n>=0;n--)for(let r=e[n];r!=vb.empty;r=r.nextLayer)t=new vb(r.chunkPos,r.chunk,t,Math.max(r.maxPoint,t.maxPoint));return t}}function Ab(e){return e[e.length-1]}vb.empty=new vb([],[],null,-1),vb.empty.nextLayer=vb.empty;class bb{finishChunk(e){this.chunks.push(new mb(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,n){this.addRange(e,t,n,!0)}addRange(e,t,n,r){this.addInner(e,t,n,r)||(this.nextLayer||(this.nextLayer=new bb)).addRange(e,t,n,r)}addInner(e,t,n,r){let i=e-this.lastTo||n.startSide-this.last.endSide;if(r&&i<=0&&(e-this.lastFrom||n.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return!(i<0)&&(250==this.from.length&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=n,this.lastFrom=e,this.lastTo=t,this.value.push(n),n.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let n=t.value.length-1;return this.last=t.value[n],this.lastFrom=t.from[n]+e,this.lastTo=t.to[n]+e,!0}finish(){return this.finishInner(vb.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return e;let t=vb.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function yb(e,t,n){let r=new Map;for(let t of e)for(let e=0;e<t.chunk.length;e++)t.chunk[e].maxPoint<=0&&r.set(t.chunk[e],t.chunkPos[e]);let i=new Set;for(let e of t)for(let t=0;t<e.chunk.length;t++){let o=r.get(e.chunk[t]);null==o||(n?n.mapPos(o):o)!=e.chunkPos[t]||(null==n?void 0:n.touchesRange(o,o+e.chunk[t].length))||i.add(e.chunk[t])}return i}class Cb{constructor(e,t,n,r=0){this.layer=e,this.skip=t,this.minPoint=n,this.rank=r}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,t=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,t,!1),this}gotoInner(e,t,n){for(;this.chunkIndex<this.layer.chunk.length;){let t=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(t)||this.layer.chunkEnd(this.chunkIndex)<e||t.maxPoint<this.minPoint))break;this.chunkIndex++,n=!1}if(this.chunkIndex<this.layer.chunk.length){let r=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],t,!0);(!n||this.rangeIndex<r)&&this.setRangeIndex(r)}this.next()}forward(e,t){(this.to-e||this.endSide-t)<0&&this.gotoInner(e,t,!0)}next(){for(;;){if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}{let e=this.layer.chunkPos[this.chunkIndex],t=this.layer.chunk[this.chunkIndex],n=e+t.from[this.rangeIndex];if(this.from=n,this.to=e+t.to[this.rangeIndex],this.value=t.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}}class xb{constructor(e){this.heap=e}static from(e,t=null,n=-1){let r=[];for(let i=0;i<e.length;i++)for(let o=e[i];!o.isEmpty;o=o.nextLayer)o.maxPoint>=n&&r.push(new Cb(o,t,n,i));return 1==r.length?r[0]:new xb(r)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let n of this.heap)n.goto(e,t);for(let e=this.heap.length>>1;e>=0;e--)wb(this.heap,e);return this.next(),this}forward(e,t){for(let n of this.heap)n.forward(e,t);for(let e=this.heap.length>>1;e>=0;e--)wb(this.heap,e);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(0==this.heap.length)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),wb(this.heap,0)}}}function wb(e,t){for(let n=e[t];;){let r=1+(t<<1);if(r>=e.length)break;let i=e[r];if(r+1<e.length&&i.compare(e[r+1])>=0&&(i=e[r+1],r++),n.compare(i)<0)break;e[r]=n,e[t]=i,t=r}}class kb{constructor(e,t,n){this.minPoint=n,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=xb.from(e,t,n)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){_b(this.active,e),_b(this.activeTo,e),_b(this.activeRank,e),this.minActive=Eb(this.active,this.activeTo)}addActive(e){let t=0,{value:n,to:r,rank:i}=this.cursor;for(;t<this.activeRank.length&&(i-this.activeRank[t]||r-this.activeTo[t])>0;)t++;Bb(this.active,t,n),Bb(this.activeTo,t,r),Bb(this.activeRank,t,i),e&&Bb(e,t,this.cursor.from),this.minActive=Eb(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let n=this.openStart<0?[]:null;for(;;){let r=this.minActive;if(r>-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>e){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),n&&_b(n,r)}else{if(!this.cursor.value){this.to=this.endSide=1e9;break}if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}{let e=this.cursor.value;if(e.point){if(!(t&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)){this.point=e,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=e.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}this.cursor.next()}else this.addActive(n),this.cursor.next()}}}if(n){this.openStart=0;for(let t=n.length-1;t>=0&&n[t]<e;t--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let t=[];for(let n=this.active.length-1;n>=0&&!(this.activeRank[n]<this.pointRank);n--)(this.activeTo[n]>e||this.activeTo[n]==e&&this.active[n].endSide>=this.point.endSide)&&t.push(this.active[n]);return t.reverse()}openEnd(e){let t=0;for(let n=this.activeTo.length-1;n>=0&&this.activeTo[n]>e;n--)t++;return t}}function Sb(e,t,n,r,i,o){e.goto(t),n.goto(r);let s=r+i,a=r,l=r-t,c=!!o.boundChange;for(let t=!1;;){let r=e.to+l-n.to,i=r||e.endSide-n.endSide,d=i<0?e.to+l:n.to,u=Math.min(d,s);if(e.point||n.point?(e.point&&n.point&&hb(e.point,n.point)&&Ob(e.activeForPoint(e.to),n.activeForPoint(n.to))||o.comparePoint(a,u,e.point,n.point),t=!1):(t&&(o.boundChange(a),t=!1),u>a&&!Ob(e.active,n.active)&&o.compareRange(a,u,e.active,n.active),c&&u<s&&(r||e.openEnd(d)!=n.openEnd(d))&&(t=!0)),d>s)break;a=d,i<=0&&e.next(),i>=0&&n.next()}}function Ob(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n]&&!hb(e[n],t[n]))return!1;return!0}function _b(e,t){for(let n=t,r=e.length-1;n<r;n++)e[n]=e[n+1];e.pop()}function Bb(e,t,n){for(let n=e.length-1;n>=t;n--)e[n+1]=e[n];e[t]=n}function Eb(e,t){let n=-1,r=1e9;for(let i=0;i<t.length;i++)(t[i]-r||e[i].endSide-e[n].endSide)<0&&(n=i,r=t[i]);return n}function Tb(e,t,n=e.length){let r=0;for(let i=0;i<n&&i<e.length;)9==e.charCodeAt(i)?(r+=t-r%t,i++):(r++,i=iA(e,i));return r}function Mb(e,t,n,r){for(let r=0,i=0;;){if(i>=t)return r;if(r==e.length)break;i+=9==e.charCodeAt(r)?n-i%n:1,r=iA(e,r)}return!0===r?-1:e.length}const Db="undefined"==typeof Symbol?"__ͼ":Symbol.for("ͼ"),Pb="undefined"==typeof Symbol?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),Rb="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:{};class Ib{constructor(e,t){this.rules=[];let{finish:n}=t||{};function r(e,t,i,o){let s=[],a=/^@(\w+)\b/.exec(e[0]),l=a&&"keyframes"==a[1];if(a&&null==t)return i.push(e[0]+";");for(let n in t){let o=t[n];if(/&/.test(n))r(n.split(/,\s*/).map(t=>e.map(e=>t.replace(/&/,e))).reduce((e,t)=>e.concat(t)),o,i);else if(o&&"object"==typeof o){if(!a)throw new RangeError("The value of a property ("+n+") should be a primitive value.");r(Nb(n),o,s,l)}else null!=o&&(/^--/.test(n)||(n=n.replace(/_.*/,"").replace(/[A-Z]/g,e=>"-"+e.toLowerCase())),s.push(n+": "+o+";"))}(s.length||l)&&i.push((!n||a||o?e:e.map(n)).join(", ")+" {"+s.join(" ")+"}")}for(let t in e)r(Nb(t),e[t],this.rules)}getRules(){return this.rules.join("\n")}static newName(){let e=Rb[Db]||1;return Rb[Db]=e+1,"ͼ"+e.toString(36)}static mount(e,t,n){let r=e[Pb],i=n&&n.nonce;r?i&&r.setNonce(i):r=new $b(e,i),r.mount(Array.isArray(t)?t:[t],e)}}function Nb(e){if(/^@/.test(e))return[e];let t=[],n=0,r=null,i=0,o=0;for(let s=0;s<e.length;s++){let a=e[s];"\\"==a?s++:'"'==a||"'"==a?a==r?r=!1:r||(r=a):"["!=a&&"("!=a||r?"]"!=a&&")"!=a||r?","!=a||n||r||(t.push(e.slice(o,i)),o=s+1):n--:n++,/\S/.test(a)?i=s+1:s==o&&o++}return t.push(e.slice(o,i)),t}let Lb=new Map;class $b{constructor(e,t){let n=e.ownerDocument||e,r=n.defaultView;if(!e.head&&e.adoptedStyleSheets&&r.CSSStyleSheet){let t=Lb.get(n);if(t)return e[Pb]=t;this.sheet=new r.CSSStyleSheet,Lb.set(n,this)}else this.styleTag=n.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[Pb]=this}mount(e,t){let n=this.sheet,r=0,i=0,o=!1;for(let t=0;t<e.length;t++){let s=e[t],a=this.modules.indexOf(s);if(a<i&&a>-1&&(this.modules.splice(a,1),o=!0,i--,a=-1),-1==a){if(this.modules.splice(i++,0,s),o=!0,n)for(let e=0;e<s.rules.length;e++)n.insertRule(s.rules[e],r++)}else{for(;i<a;)r+=this.modules[i++].rules.length;r+=s.rules.length,i++}}if(n)t.adoptedStyleSheets.indexOf(this.sheet)<0&&(t.adoptedStyleSheets=[this.sheet,...t.adoptedStyleSheets]);else{if(o){let e="";for(let t=0;t<this.modules.length;t++)e+=this.modules[t].getRules()+"\n";this.styleTag.textContent=e}let e=t.head||t;this.styleTag.parentNode!=e&&e.insertBefore(this.styleTag,e.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}for(var Fb={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},jb={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Vb="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),Wb="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),zb=0;zb<10;zb++)Fb[48+zb]=Fb[96+zb]=String(zb);for(zb=1;zb<=24;zb++)Fb[zb+111]="F"+zb;for(zb=65;zb<=90;zb++)Fb[zb]=String.fromCharCode(zb+32),jb[zb]=String.fromCharCode(zb);for(var Qb in Fb)jb.hasOwnProperty(Qb)||(jb[Qb]=Fb[Qb]);function Hb(){var e=arguments[0];"string"==typeof e&&(e=document.createElement(e));var t=1,n=arguments[1];if(n&&"object"==typeof n&&null==n.nodeType&&!Array.isArray(n)){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var i=n[r];"string"==typeof i?e.setAttribute(r,i):null!=i&&(e[r]=i)}t++}for(;t<arguments.length;t++)qb(e,arguments[t]);return e}function qb(e,t){if("string"==typeof t)e.appendChild(document.createTextNode(t));else if(null==t);else if(null!=t.nodeType)e.appendChild(t);else{if(!Array.isArray(t))throw new RangeError("Unsupported child node: "+t);for(var n=0;n<t.length;n++)qb(e,t[n])}}let Ub="undefined"!=typeof navigator?navigator:{userAgent:"",vendor:"",platform:""},Yb="undefined"!=typeof document?document:{documentElement:{style:{}}};const Xb=/Edge\/(\d+)/.exec(Ub.userAgent),Jb=/MSIE \d/.test(Ub.userAgent),Gb=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Ub.userAgent),Kb=!!(Jb||Gb||Xb),Zb=!Kb&&/gecko\/(\d+)/i.test(Ub.userAgent),ey=!Kb&&/Chrome\/(\d+)/.exec(Ub.userAgent),ty="webkitFontSmoothing"in Yb.documentElement.style,ny=!Kb&&/Apple Computer/.test(Ub.vendor),ry=ny&&(/Mobile\/\w+/.test(Ub.userAgent)||Ub.maxTouchPoints>2);var iy={mac:ry||/Mac/.test(Ub.platform),windows:/Win/.test(Ub.platform),linux:/Linux|X11/.test(Ub.platform),ie:Kb,ie_version:Jb?Yb.documentMode||6:Gb?+Gb[1]:Xb?+Xb[1]:0,gecko:Zb,gecko_version:Zb?+(/Firefox\/(\d+)/.exec(Ub.userAgent)||[0,0])[1]:0,chrome:!!ey,chrome_version:ey?+ey[1]:0,ios:ry,android:/Android\b/.test(Ub.userAgent),webkit:ty,webkit_version:ty?+(/\bAppleWebKit\/(\d+)/.exec(Ub.userAgent)||[0,0])[1]:0,safari:ny,safari_version:ny?+(/\bVersion\/(\d+(\.\d+)?)/.exec(Ub.userAgent)||[0,0])[1]:0,tabSize:null!=Yb.documentElement.style.tabSize?"tab-size":"-moz-tab-size"};function oy(e,t){for(let n in e)"class"==n&&t.class?t.class+=" "+e.class:"style"==n&&t.style?t.style+=";"+e.style:t[n]=e[n];return t}const sy=Object.create(null);function ay(e,t,n){if(e==t)return!0;e||(e=sy),t||(t=sy);let r=Object.keys(e),i=Object.keys(t);if(r.length-0!=i.length-0)return!1;for(let o of r)if(o!=n&&(-1==i.indexOf(o)||e[o]!==t[o]))return!1;return!0}function ly(e,t,n){let r=!1;if(t)for(let i in t)n&&i in n||(r=!0,"style"==i?e.style.cssText="":e.removeAttribute(i));if(n)for(let i in n)t&&t[i]==n[i]||(r=!0,"style"==i?e.style.cssText=n[i]:e.setAttribute(i,n[i]));return r}function cy(e){let t=Object.create(null);for(let n=0;n<e.attributes.length;n++){let r=e.attributes[n];t[r.name]=r.value}return t}class dy{eq(e){return!1}updateDOM(e,t,n){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,t,n){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var uy=function(e){return e[e.Text=0]="Text",e[e.WidgetBefore=1]="WidgetBefore",e[e.WidgetAfter=2]="WidgetAfter",e[e.WidgetRange=3]="WidgetRange",e}(uy||(uy={}));class py extends pb{constructor(e,t,n,r){super(),this.startSide=e,this.endSide=t,this.widget=n,this.spec=r}get heightRelevant(){return!1}static mark(e){return new hy(e)}static widget(e){let t=Math.max(-1e4,Math.min(1e4,e.side||0)),n=!!e.block;return t+=n&&!e.inlineOrder?t>0?3e8:-4e8:t>0?1e8:-1e8,new gy(e,t,t,n,e.widget||null,!1)}static replace(e){let t,n,r=!!e.block;if(e.isBlockGap)t=-5e8,n=4e8;else{let{start:i,end:o}=my(e,r);t=(i?r?-3e8:-1:5e8)-1,n=1+(o?r?2e8:1:-6e8)}return new gy(e,t,n,r,e.widget||null,!0)}static line(e){return new fy(e)}static set(e,t=!1){return vb.of(e,t)}hasHeight(){return!!this.widget&&this.widget.estimatedHeight>-1}}py.none=vb.empty;class hy extends py{constructor(e){let{start:t,end:n}=my(e);super(t?-1:5e8,n?1:-6e8,null,e),this.tagName=e.tagName||"span",this.attrs=e.class&&e.attributes?oy(e.attributes,{class:e.class}):e.class?{class:e.class}:e.attributes||sy}eq(e){return this==e||e instanceof hy&&this.tagName==e.tagName&&ay(this.attrs,e.attrs)}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}}hy.prototype.point=!1;class fy extends py{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof fy&&this.spec.class==e.spec.class&&ay(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}fy.prototype.mapMode=cA.TrackBefore,fy.prototype.point=!0;class gy extends py{constructor(e,t,n,r,i,o){super(t,n,i,e),this.block=r,this.isReplace=o,this.mapMode=r?t<=0?cA.TrackBefore:cA.TrackAfter:cA.TrackDel}get type(){return this.startSide!=this.endSide?uy.WidgetRange:this.startSide<=0?uy.WidgetBefore:uy.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof gy&&(t=this.widget,n=e.widget,t==n||!!(t&&n&&t.compare(n)))&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide;var t,n}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}function my(e,t=!1){let{inclusiveStart:n,inclusiveEnd:r}=e;return null==n&&(n=e.inclusive),null==r&&(r=e.inclusive),{start:null!=n?n:t,end:null!=r?r:t}}function vy(e,t,n,r=0){let i=n.length-1;i>=0&&n[i]+r>=e?n[i]=Math.max(n[i],t):n.push(e,t)}gy.prototype.point=!0;class Ay extends pb{constructor(e,t,n){super(),this.tagName=e,this.attributes=t,this.rank=n}eq(e){return e==this||e instanceof Ay&&this.tagName==e.tagName&&ay(this.attributes,e.attributes)}static create(e){return new Ay(e.tagName,e.attributes||sy,null==e.rank?50:Math.max(0,Math.min(e.rank,100)))}static set(e,t=!1){return vb.of(e,t)}}Ay.prototype.startSide=Ay.prototype.endSide=-1;const by=e=>1==e.nodeType,yy=e=>3==e.nodeType;function Cy(e){let t;return t=11==e.nodeType?e.getSelection?e:e.ownerDocument:e,t.getSelection()}function xy(e,t){return!!t&&(e==t||e.contains(1!=t.nodeType?t.parentNode:t))}function wy(e,t){if(!t.anchorNode)return!1;try{return xy(e,t.anchorNode)}catch(e){return!1}}function ky(e){return yy(e)?jy(e,0,e.nodeValue.length).getClientRects():by(e)?e.getClientRects():[]}function Sy(e,t,n,r){return!!n&&(By(e,t,n,r,-1)||By(e,t,n,r,1))}function Oy(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t}function _y(e){return by(e)&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(e.nodeName)}function By(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:Ey(e))){if("DIV"==e.nodeName)return!1;let n=e.parentNode;if(!n||!by(n))return!1;t=Oy(e)+(i<0?0:1),e=n}else{if(!by(e))return!1;if(e=e.childNodes[t+(i<0?-1:0)],by(e)&&("IMG"==e.nodeName||"BR"==e.nodeName||"false"==e.contentEditable))return!1;t=i<0?Ey(e):0}}}function Ey(e){return yy(e)?e.nodeValue.length:e.childNodes.length}function Ty(e,t){let{left:n,right:r}=e;if(n==r)return e;let i=t?n:r;return{left:i,right:i,top:e.top,bottom:e.bottom}}function My(e){let t=e.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.innerWidth,top:0,bottom:e.innerHeight}}function Dy(e,t){let n=t.width/e.offsetWidth,r=t.height/e.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(t.width-e.offsetWidth)<1)&&(n=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(t.height-e.offsetHeight)<1)&&(r=1),{scaleX:n,scaleY:r}}function Py(e,t=!0){let n=e.ownerDocument,r=null,i=null;for(let o=e.parentNode;o&&(o!=n.body&&(t&&!r||!i));)if(by(o))!i&&o.scrollHeight>o.clientHeight&&/scroll|auto/.test(getComputedStyle(o).overflowY)&&(i=o),t&&!r&&o.scrollWidth>o.clientWidth&&/scroll|auto/.test(getComputedStyle(o).overflowX)&&(r=o),o=o.assignedSlot||o.parentNode;else{if(11!=o.nodeType)break;o=o.host}return{x:r,y:i}}class Ry{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:n}=e;this.set(t,Math.min(e.anchorOffset,t?Ey(t):0),n,Math.min(e.focusOffset,n?Ey(n):0))}set(e,t,n,r){this.anchorNode=e,this.anchorOffset=t,this.focusNode=n,this.focusOffset=r}}function Iy(e){let t=[];for(let n=e;n;n=11==n.nodeType?n.host:n.parentNode)by(n)&&t.push({node:n,left:n.scrollLeft,top:n.scrollTop});return t}function Ny(e,t=!0){for(let{node:n,left:r,top:i}of e)t&&n.scrollTop!=i&&(n.scrollTop=i),n.scrollLeft!=r&&(n.scrollLeft=r)}let Ly,$y=null;function Fy(e){if(e.setActive)return e.setActive();if($y)return e.focus($y);let t=Iy(e);e.focus(null==$y?{get preventScroll(){return $y={preventScroll:!0},!0}}:void 0),$y||($y=!1,Ny(t))}function jy(e,t,n=t){let r=Ly||(Ly=document.createRange());return r.setEnd(e,n),r.setStart(e,t),r}function Vy(e,t,n,r){let i={key:t,code:t,keyCode:n,which:n,cancelable:!0};r&&({altKey:i.altKey,ctrlKey:i.ctrlKey,shiftKey:i.shiftKey,metaKey:i.metaKey}=r);let o=new KeyboardEvent("keydown",i);o.synthetic=!0,e.dispatchEvent(o);let s=new KeyboardEvent("keyup",i);return s.synthetic=!0,e.dispatchEvent(s),o.defaultPrevented||s.defaultPrevented}function Wy(e){return e instanceof Window?e.pageYOffset>Math.max(0,e.document.documentElement.scrollHeight-e.innerHeight-4):e.scrollTop>Math.max(1,e.scrollHeight-e.clientHeight-4)}function zy(e,t){for(let n=e,r=t;;){if(yy(n)&&r>0)return{node:n,offset:r};if(by(n)&&r>0){if("false"==n.contentEditable)return null;n=n.childNodes[r-1],r=Ey(n)}else{if(!n.parentNode||_y(n))return null;r=Oy(n),n=n.parentNode}}}function Qy(e,t){for(let n=e,r=t;;){if(yy(n)&&r<n.nodeValue.length)return{node:n,offset:r};if(by(n)&&r<n.childNodes.length){if("false"==n.contentEditable)return null;n=n.childNodes[r],r=0}else{if(!n.parentNode||_y(n))return null;r=Oy(n)+1,n=n.parentNode}}}iy.safari&&iy.safari_version>=26&&($y=!1);class Hy{constructor(e,t,n=!0){this.node=e,this.offset=t,this.precise=n}static before(e,t){return new Hy(e.parentNode,Oy(e),t)}static after(e,t){return new Hy(e.parentNode,Oy(e)+1,t)}}var qy=function(e){return e[e.LTR=0]="LTR",e[e.RTL=1]="RTL",e}(qy||(qy={}));const Uy=qy.LTR,Yy=qy.RTL;function Xy(e){let t=[];for(let n=0;n<e.length;n++)t.push(1<<+e[n]);return t}const Jy=Xy("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),Gy=Xy("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),Ky=Object.create(null),Zy=[];for(let e of["()","[]","{}"]){let t=e.charCodeAt(0),n=e.charCodeAt(1);Ky[t]=n,Ky[n]=-t}function eC(e){return e<=247?Jy[e]:1424<=e&&e<=1524?2:1536<=e&&e<=1785?Gy[e-1536]:1774<=e&&e<=2220?4:8192<=e&&e<=8204?256:64336<=e&&e<=65023?4:1}const tC=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class nC{get dir(){return this.level%2?Yy:Uy}constructor(e,t,n){this.from=e,this.to=t,this.level=n}side(e,t){return this.dir==t==e?this.to:this.from}forward(e,t){return e==(this.dir==t)}static find(e,t,n,r){let i=-1;for(let o=0;o<e.length;o++){let s=e[o];if(s.from<=t&&s.to>=t){if(s.level==n)return o;(i<0||(0!=r?r<0?s.from<t:s.to>t:e[i].level>s.level))&&(i=o)}}if(i<0)throw new RangeError("Index out of range");return i}}function rC(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r.from!=i.from||r.to!=i.to||r.direction!=i.direction||!rC(r.inner,i.inner))return!1}return!0}const iC=[];function oC(e,t,n,r,i,o,s){let a=r%2?2:1;if(r%2==i%2)for(let l=t,c=0;l<n;){let t=!0,d=!1;if(c==o.length||l<o[c].from){let e=iC[l];e!=a&&(t=!1,d=16==e)}let u=t||1!=a?null:[],p=t?r:r+1,h=l;e:for(;;)if(c<o.length&&h==o[c].from){if(d)break e;let f=o[c];if(!t)for(let e=f.to,t=c+1;;){if(e==n)break e;if(!(t<o.length&&o[t].from==e)){if(iC[e]==a)break e;break}e=o[t++].to}if(c++,u)u.push(f);else{f.from>l&&s.push(new nC(l,f.from,p)),sC(e,f.direction==Uy!=!(p%2)?r+1:r,i,f.inner,f.from,f.to,s),l=f.to}h=f.to}else{if(h==n||(t?iC[h]!=a:iC[h]==a))break;h++}u?oC(e,l,h,r+1,i,u,s):l<h&&s.push(new nC(l,h,p)),l=h}else for(let l=n,c=o.length;l>t;){let n=!0,d=!1;if(!c||l>o[c-1].to){let e=iC[l-1];e!=a&&(n=!1,d=16==e)}let u=n||1!=a?null:[],p=n?r:r+1,h=l;e:for(;;)if(c&&h==o[c-1].to){if(d)break e;let f=o[--c];if(!n)for(let e=f.from,n=c;;){if(e==t)break e;if(!n||o[n-1].to!=e){if(iC[e-1]==a)break e;break}e=o[--n].from}if(u)u.push(f);else{f.to<l&&s.push(new nC(f.to,l,p)),sC(e,f.direction==Uy!=!(p%2)?r+1:r,i,f.inner,f.from,f.to,s),l=f.from}h=f.from}else{if(h==t||(n?iC[h-1]!=a:iC[h-1]==a))break;h--}u?oC(e,h,l,r+1,i,u,s):h<l&&s.push(new nC(h,l,p)),l=h}}function sC(e,t,n,r,i,o,s){let a=t%2?2:1;!function(e,t,n,r,i){for(let o=0;o<=r.length;o++){let s=o?r[o-1].to:t,a=o<r.length?r[o].from:n,l=o?256:i;for(let t=s,n=l,r=l;t<a;t++){let i=eC(e.charCodeAt(t));512==i?i=n:8==i&&4==r&&(i=16),iC[t]=4==i?2:i,7&i&&(r=i),n=i}for(let e=s,t=l,r=l;e<a;e++){let i=iC[e];if(128==i)e<a-1&&t==iC[e+1]&&24&t?i=iC[e]=t:iC[e]=256;else if(64==i){let i=e+1;for(;i<a&&64==iC[i];)i++;let o=e&&8==t||i<n&&8==iC[i]?1==r?1:8:256;for(let t=e;t<i;t++)iC[t]=o;e=i-1}else 8==i&&1==r&&(iC[e]=1);t=i,7&i&&(r=i)}}}(e,i,o,r,a),function(e,t,n,r,i){let o=1==i?2:1;for(let s=0,a=0,l=0;s<=r.length;s++){let c=s?r[s-1].to:t,d=s<r.length?r[s].from:n;for(let t,n,r,s=c;s<d;s++)if(n=Ky[t=e.charCodeAt(s)])if(n<0){for(let e=a-3;e>=0;e-=3)if(Zy[e+1]==-n){let t=Zy[e+2],n=2&t?i:4&t?1&t?o:i:0;n&&(iC[s]=iC[Zy[e]]=n),a=e;break}}else{if(189==Zy.length)break;Zy[a++]=s,Zy[a++]=t,Zy[a++]=l}else if(2==(r=iC[s])||1==r){let e=r==i;l=e?0:1;for(let t=a-3;t>=0;t-=3){let n=Zy[t+2];if(2&n)break;if(e)Zy[t+2]|=2;else{if(4&n)break;Zy[t+2]|=4}}}}}(e,i,o,r,a),function(e,t,n,r){for(let i=0,o=r;i<=n.length;i++){let s=i?n[i-1].to:e,a=i<n.length?n[i].from:t;for(let l=s;l<a;){let s=iC[l];if(256==s){let s=l+1;for(;;)if(s==a){if(i==n.length)break;s=n[i++].to,a=i<n.length?n[i].from:t}else{if(256!=iC[s])break;s++}let c=1==o,d=c==(1==(s<t?iC[s]:r))?c?1:2:r;for(let t=s,r=i,o=r?n[r-1].to:e;t>l;)t==o&&(t=n[--r].from,o=r?n[r-1].to:e),iC[--t]=d;l=s}else o=s,l++}}}(i,o,r,a),oC(e,i,o,t,n,r,s)}function aC(e,t,n){if(!e)return[new nC(0,0,t==Yy?1:0)];if(t==Uy&&!n.length&&!tC.test(e))return lC(e.length);if(n.length)for(;e.length>iC.length;)iC[iC.length]=256;let r=[],i=t==Uy?0:1;return sC(e,i,i,n,0,e.length,r),r}function lC(e){return[new nC(0,e,0)]}let cC="";function dC(e,t,n,r,i){var o;if(!e.length)return null;let s,a=r.head-e.from;if(r.head==e.from&&r.assoc<0){if(!i)return null;a=t[s=0].side(!1,n)}else if(r.head==e.to&&r.assoc>0){if(i)return null;a=t[s=t.length-1].side(!0,n)}else s=nC.find(t,a,null!==(o=r.bidiLevel)&&void 0!==o?o:-1,r.assoc);let l=t[s],c=l.side(i,n);if(a==c){let e=s+=i?1:-1;if(e<0||e>=t.length)return null;l=t[s=e],a=l.side(!i,n),c=l.side(i,n)}let d=iA(e.text,a,l.forward(i,n));(d<l.from||d>l.to)&&(d=c),cC=e.text.slice(Math.min(a,d),Math.max(a,d));let u=s==(i?t.length-1:0)?null:t[s+(i?1:-1)];if(d==c){if(!u)return i?bA.cursor(e.to,1):bA.cursor(e.from,-1);if(u.level+(i?0:1)<l.level)return bA.cursor(u.side(!i,n)+e.from,u.forward(i,n)?1:-1,u.level)}return bA.cursor(d+e.from,l.forward(i,n)?-1:1,l.level)}function uC(e,t,n){for(let r=t;r<n;r++){let t=eC(e.charCodeAt(r));if(1==t)return Uy;if(2==t||4==t)return Yy}}const pC=xA.define(),hC=xA.define(),fC=xA.define(),gC=xA.define(),mC=xA.define(),vC=xA.define(),AC=xA.define(),bC=xA.define(),yC=xA.define(),CC=xA.define({combine:e=>e.some(e=>e)}),xC=xA.define({combine:e=>e.some(e=>e)}),wC=xA.define();class kC{constructor(e,t,n,r,i,o=!1){this.range=e,this.y=t,this.x=n,this.yMargin=r,this.xMargin=i,this.isSnapshot=o}map(e){return e.empty?this:new kC(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new kC(bA.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const SC=KA.define({map:(e,t)=>e.map(t)}),OC=KA.define();function _C(e,t,n){let r=e.facet(gC);r.length?r[0](t):window.onerror&&window.onerror(String(t),n,void 0,void 0,t)||(n?console.error(n+":",t):console.error(t))}const BC=xA.define({combine:e=>!e.length||e[0]});let EC=0;const TC=xA.define({combine:e=>e.filter((t,n)=>{for(let r=0;r<n;r++)if(e[r].plugin==t.plugin)return!1;return!0})});class MC{constructor(e,t,n,r,i){this.id=e,this.create=t,this.domEventHandlers=n,this.domEventObservers=r,this.baseExtensions=i(this),this.extension=this.baseExtensions.concat(TC.of({plugin:this,arg:void 0}))}of(e){return this.baseExtensions.concat(TC.of({plugin:this,arg:e}))}static define(e,t){const{eventHandlers:n,eventObservers:r,provide:i,decorations:o}=t||{};return new MC(EC++,e,n,r,e=>{let t=[];return o&&t.push(IC.of(t=>{let n=t.plugin(e);return n?o(n):py.none})),i&&t.push(i(e)),t})}static fromClass(e,t){return MC.define((t,n)=>new e(t,n),t)}}class DC{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(e){if(this.value){if(this.mustUpdate){let e=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(e)}catch(t){if(_C(e.state,t,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch(e){}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.plugin.create(e,this.spec.arg)}catch(t){_C(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(null===(t=this.value)||void 0===t?void 0:t.destroy)try{this.value.destroy()}catch(t){_C(e.state,t,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const PC=xA.define(),RC=xA.define(),IC=xA.define(),NC=xA.define(),LC=xA.define(),$C=xA.define(),FC=xA.define();function jC(e,t){let n=e.state.facet(FC);if(!n.length)return n;let r=n.map(t=>t instanceof Function?t(e):t),i=[];return vb.spans(r,t.from,t.to,{point(){},span(e,n,r,o){let s=e-t.from,a=n-t.from,l=i;for(let e=r.length-1;e>=0;e--,o--){let t,n=r[e].spec.bidiIsolate;if(o>0&&l.length&&(t=l[l.length-1]).to==s&&t.direction==n)t.to=a,l=t.inner;else{let e={from:s,to:a,direction:n,inner:[]};l.push(e),l=e.inner}}}}),VC(t.text,i)}function VC(e,t){for(let n of t){if(null==n.direction){for(let t=n.from,r=0;t<n.to;r++){let i=r<n.inner.length?n.inner[r]:null,o=uC(e,t,i?i.from:n.to);if(o){n.direction=o;break}if(!i)break;t=i.to}null==n.direction&&(n.direction=qy.LTR)}VC(e,n.inner)}return t}const WC=xA.define();function zC(e){let t=0,n=0,r=0,i=0;for(let o of e.state.facet(WC)){let s=o(e);s&&(null!=s.left&&(t=Math.max(t,s.left)),null!=s.right&&(n=Math.max(n,s.right)),null!=s.top&&(r=Math.max(r,s.top)),null!=s.bottom&&(i=Math.max(i,s.bottom)))}return{left:t,right:n,top:r,bottom:i}}const QC=xA.define();class HC{constructor(e,t,n,r){this.fromA=e,this.toA=t,this.fromB=n,this.toB=r}join(e){return new HC(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,n=this;for(;t>0;t--){let r=e[t-1];if(!(r.fromA>n.toA)){if(r.toA<n.fromA)break;n=n.join(r),e.splice(t-1,1)}}return e.splice(t,0,n),e}static extendWithRanges(e,t){if(0==t.length)return e;let n=[];for(let r=0,i=0,o=0;;){let s=r<e.length?e[r].fromB:1e9,a=i<t.length?t[i]:1e9,l=Math.min(s,a);if(1e9==l)break;let c=l+o,d=l,u=c;for(;;)if(i<t.length&&t[i]<=d){let n=t[i+1];i+=2,d=Math.max(d,n);for(let t=r;t<e.length&&e[t].fromB<=d;t++)o=e[t].toA-e[t].toB;u=Math.max(u,n+o)}else{if(!(r<e.length&&e[r].fromB<=d))break;{let t=e[r++];d=Math.max(d,t.toB),u=Math.max(u,t.toA),o=t.toA-t.toB}}n.push(new HC(c,u,l,d))}return n}}class qC{constructor(e,t,n){this.view=e,this.state=t,this.transactions=n,this.flags=0,this.startState=e.state,this.changes=uA.empty(this.startState.doc.length);for(let e of n)this.changes=this.changes.compose(e.changes);let r=[];this.changes.iterChangedRanges((e,t,n,i)=>r.push(new HC(e,t,n,i))),this.changedRanges=r}static create(e,t,n){return new qC(e,t,n)}get viewportChanged(){return(4&this.flags)>0}get viewportMoved(){return(8&this.flags)>0}get heightChanged(){return(2&this.flags)>0}get geometryChanged(){return this.docChanged||(18&this.flags)>0}get focusChanged(){return(1&this.flags)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return 0==this.flags&&0==this.transactions.length}}const UC=[];class YC{constructor(e,t,n=0){this.dom=e,this.length=t,this.flags=n,this.parent=null,e.cmTile=this}get breakAfter(){return 1&this.flags}get children(){return UC}isWidget(){return!1}get isHidden(){return!1}isComposite(){return!1}isLine(){return!1}isText(){return!1}isBlock(){return!1}get domAttrs(){return null}sync(e){if(this.flags|=2,4&this.flags){this.flags&=-5;let e=this.domAttrs;e&&function(e,t){for(let n=e.attributes.length-1;n>=0;n--){let r=e.attributes[n].name;null==t[r]&&e.removeAttribute(r)}for(let n in t){let r=t[n];"style"==n?e.style.cssText=r:e.getAttribute(n)!=r&&e.setAttribute(n,r)}}(this.dom,e)}}toString(){return this.constructor.name+(this.children.length?`(${this.children})`:"")+(this.breakAfter?"#":"")}destroy(){this.parent=null}setDOM(e){this.dom=e,e.cmTile=this}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e,t=this.posAtStart){let n=t;for(let t of this.children){if(t==e)return n;n+=t.length+t.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}covers(e){return!0}coordsIn(e,t,n){return null}domPosFor(e,t){let n=Oy(this.dom),r=this.length?e>0:t>0;return new Hy(this.parent.dom,n+(r?1:0),0==e||e==this.length)}markDirty(e){this.flags&=-3,e&&(this.flags|=4),this.parent&&2&this.parent.flags&&this.parent.markDirty(!1)}get overrideDOMText(){return null}get root(){for(let e=this;e;e=e.parent)if(e instanceof GC)return e;return null}static get(e){return e.cmTile}}class XC extends YC{constructor(e){super(e,0),this._children=[]}isComposite(){return!0}get children(){return this._children}get lastChild(){return this.children.length?this.children[this.children.length-1]:null}append(e){this.children.push(e),e.parent=this}sync(e){if(2&this.flags)return;super.sync(e);let t,n=this.dom,r=null,i=(null==e?void 0:e.node)==n?e:null,o=0;for(let s of this.children){if(s.sync(e),o+=s.length+s.breakAfter,t=r?r.nextSibling:n.firstChild,i&&t!=s.dom&&(i.written=!0),s.dom.parentNode==n)for(;t&&t!=s.dom;)t=JC(t);else n.insertBefore(s.dom,t);r=s.dom}for(t=r?r.nextSibling:n.firstChild,i&&t&&(i.written=!0);t;)t=JC(t);this.length=o}}function JC(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}class GC extends XC{constructor(e,t){super(t),this.view=e}owns(e){for(;e;e=e.parent)if(e==this)return!0;return!1}isBlock(){return!0}nearest(e){for(;;){if(!e)return null;let t=YC.get(e);if(t&&this.owns(t))return t;e=e.parentNode}}blockTiles(e){for(let t=[],n=this,r=0,i=0;;)if(r==n.children.length){if(!t.length)return;n=n.parent,n.breakAfter&&i++,r=t.pop()}else{let o=n.children[r++];if(o instanceof KC)t.push(r),n=o,r=0;else{let t=i+o.length,n=e(o,i);if(void 0!==n)return n;i=t+o.breakAfter}}}resolveBlock(e,t){let n,r,i=-1,o=-1;if(this.blockTiles((s,a)=>{let l=a+s.length;if(e>=a&&e<=l){if(s.isWidget()&&t>=-1&&t<=1){if(32&s.flags)return!0;16&s.flags&&(n=void 0)}(a<e||e==l&&(t<-1?s.length:s.covers(1)))&&(!n||!s.isWidget()&&n.isWidget())&&(n=s,i=e-a),(l>e||e==a&&(t>1?s.length:s.covers(-1)))&&(!r||!s.isWidget()&&r.isWidget())&&(r=s,o=e-a)}}),!n&&!r)throw new Error("No tile at position "+e);return n&&t<0||!r?{tile:n,offset:i}:{tile:r,offset:o}}}class KC extends XC{constructor(e,t){super(e),this.wrapper=t}isBlock(){return!0}covers(e){return!!this.children.length&&(e<0?this.children[0].covers(-1):this.lastChild.covers(1))}get domAttrs(){return this.wrapper.attributes}static of(e,t){let n=new KC(t||document.createElement(e.tagName),e);return t||(n.flags|=4),n}}class ZC extends XC{constructor(e,t){super(e),this.attrs=t}isLine(){return!0}static start(e,t,n){let r=new ZC(t||document.createElement("div"),e);return t&&n||(r.flags|=4),r}get domAttrs(){return this.attrs}resolveInline(e,t,n=!1){let r=null,i=-1,o=null,s=-1;!function e(a,l){for(let c=0,d=0;c<a.children.length&&d<=l;c++){let u=a.children[c],p=d+u.length;p>=l&&(u.isComposite()?e(u,l-d):(!o||n&&o.isHidden&&(t>0&&!(32&o.flags)||n&&ex(o,u)))&&(p>l||32&u.flags&&t<=1)?(o=u,s=l-d):(d<l||16&u.flags&&(!n||!u.isHidden)&&t>=-1)&&(r=u,i=l-d)),d=p}}(this,e);let a=(t<0?r:o)||r||o;return a?{tile:a,offset:a==r?i:s}:null}coordsIn(e,t,n){let r=this.resolveInline(e,t,!0);return r?r.tile.coordsIn(Math.max(0,r.offset),t,n):function(e){let t=e.dom.lastChild;if(!t)return e.dom.getBoundingClientRect();let n=ky(t);return n[n.length-1]||null}(this)}domIn(e,t){let n=this.resolveInline(e,t);if(n){let{tile:e,offset:r}=n;if(this.dom.contains(e.dom))return e.isText()?new Hy(e.dom,Math.min(e.dom.nodeValue.length,r)):e.domPosFor(r,16&e.flags?1:32&e.flags?-1:t);let i=n.tile.parent,o=!1;for(let e of i.children){if(o)return new Hy(e.dom,0);e==n.tile&&(o=!0)}}return new Hy(this.dom,0)}}function ex(e,t){let n=e.coordsIn(0,1),r=t.coordsIn(0,1);return n&&r&&r.top<n.bottom}class tx extends XC{constructor(e,t){super(e),this.mark=t}get domAttrs(){return this.mark.attrs}static of(e,t){let n=new tx(t||document.createElement(e.tagName),e);return t||(n.flags|=4),n}}class nx extends YC{constructor(e,t){super(e,t.length),this.text=t}sync(e){2&this.flags||(super.sync(e),this.dom.nodeValue!=this.text&&(e&&e.node==this.dom&&(e.written=!0),this.dom.nodeValue=this.text))}isText(){return!0}toString(){return JSON.stringify(this.text)}coordsIn(e,t,n){let r=this.dom.nodeValue.length;e>r&&(e=r);let i=e,o=e,s=0;0==e&&t<0||e==r&&t>=0?iy.chrome||iy.gecko||(e?(i--,s=1):o<r&&(o++,s=-1)):t<0?i--:o<r&&o++;let a=jy(this.dom,i,o).getClientRects();if(!a.length)return null;let l=a[(s?s<0:t>=0)?0:a.length-1];return iy.safari&&!s&&0==l.width&&(l=Array.prototype.find.call(a,e=>e.width)||l),null==n?l:Ty(l,(s?s>0:t<0)==n)}static of(e,t){let n=new nx(t||document.createTextNode(e),e);return t||(n.flags|=2),n}}class rx extends YC{constructor(e,t,n,r){super(e,t,r),this.widget=n}isWidget(){return!0}get isHidden(){return this.widget.isHidden}covers(e){return!(48&this.flags)&&(this.flags&(e<0?64:128))>0}coordsIn(e,t){return this.coordsInWidget(e,t,!1)}coordsInWidget(e,t,n){let r=this.widget.coordsAt(this.dom,e,t);if(r)return r;if(n)return Ty(this.dom.getBoundingClientRect(),this.length?0==e:t<=0);{let t=this.dom.getClientRects(),n=null;if(!t.length)return null;let r=!!(16&this.flags)||!(32&this.flags)&&e>0;for(let i=r?t.length-1:0;n=t[i],!(e>0?0==i:i==t.length-1||n.top<n.bottom);i+=r?-1:1);return Ty(n,!r)}}get overrideDOMText(){if(!this.length)return Yv.empty;let{root:e}=this;if(!e)return Yv.empty;let t=this.posAtStart;return e.view.state.doc.slice(t,t+this.length)}destroy(){super.destroy(),this.widget.destroy(this.dom)}static of(e,t,n,r,i){return i||(i=e.toDOM(t),e.editable||(i.contentEditable="false")),new rx(i,n,e,r)}}class ix extends YC{constructor(e){let t=document.createElement("img");t.className="cm-widgetBuffer",t.setAttribute("aria-hidden","true"),super(t,0,e)}get isHidden(){return!0}get overrideDOMText(){return Yv.empty}coordsIn(e,t,n){let r=this.dom.getBoundingClientRect();return null==n?r:Ty(r,t>0==n)}}class ox{constructor(e){this.index=0,this.beforeBreak=!1,this.parents=[],this.tile=e}advance(e,t,n){let{tile:r,index:i,beforeBreak:o,parents:s}=this;for(;e||t>0;)if(r.isComposite())if(o){if(!e)break;n&&n.break(),e--,o=!1}else if(i==r.children.length){if(!e&&!s.length)break;n&&n.leave(r),o=!!r.breakAfter,({tile:r,index:i}=s.pop()),i++}else{let a=r.children[i],l=a.breakAfter;!(t>0?a.length<=e:a.length<e)||n&&!1===n.skip(a,0,a.length)&&a.isComposite?(s.push({tile:r,index:i}),r=a,i=0,n&&a.isComposite()&&n.enter(a)):(o=!!l,i++,e-=a.length)}else{let t=r.length;if(i<t&&e){let o=Math.min(e,t-i);n&&n.skip(r,i,i+o),e-=o,i+=o}if(i==t)o=!!r.breakAfter,({tile:r,index:i}=s.pop()),i++;else if(!e)break}return this.tile=r,this.index=i,this.beforeBreak=o,this}get root(){return this.parents.length?this.parents[0].tile:this.tile}}class sx{constructor(e,t,n,r){this.from=e,this.to=t,this.wrapper=n,this.rank=r}}class ax{constructor(e,t,n){this.cache=e,this.root=t,this.blockWrappers=n,this.curLine=null,this.lastBlock=null,this.afterWidget=null,this.pos=0,this.wrappers=[],this.wrapperPos=0}addText(e,t,n,r){var i;this.flushBuffer();let o=this.ensureMarks(t,n),s=o.lastChild;if(s&&s.isText()&&!(8&s.flags)&&s.length+e.length<512){this.cache.reused.set(s,2),(o.children[o.children.length-1]=new nx(s.dom,s.text+e)).parent=o}else o.append(r||nx.of(e,null===(i=this.cache.find(nx))||void 0===i?void 0:i.dom));this.pos+=e.length,this.afterWidget=null}addComposition(e,t){let n=this.curLine;n.dom!=t.line.dom&&(n.setDOM(this.cache.reused.has(t.line)?fx(t.line.dom):t.line.dom),this.cache.reused.set(t.line,2));let r=n;for(let e=t.marks.length-1;e>=0;e--){let n=t.marks[e],i=r.lastChild;if(i instanceof tx&&i.mark.eq(n.mark))i.dom!=n.dom&&i.setDOM(fx(n.dom)),r=i;else{let{dom:e}=n;if(this.cache.reused.get(n)){YC.get(n.dom)&&(e=fx(n.dom))}let t=tx.of(n.mark,e);r.append(t),r=t}this.cache.reused.set(n,2)}let i=YC.get(e.text);i&&this.cache.reused.set(i,2);let o=new nx(e.text,e.text.nodeValue);o.flags|=8,this.pos=e.range.toB,r.append(o)}addInlineWidget(e,t,n){let r=this.afterWidget&&48&e.flags&&(48&this.afterWidget.flags)==(48&e.flags);r||this.flushBuffer();let i=this.ensureMarks(t,n);r||16&e.flags||i.append(this.getBuffer(1)),i.append(e),this.pos+=e.length,this.afterWidget=e}addMark(e,t,n){this.flushBuffer(),this.ensureMarks(t,n).append(e),this.pos+=e.length,this.afterWidget=null}addBlockWidget(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}continueWidget(e){(this.afterWidget||this.lastBlock).length+=e,this.pos+=e}addLineStart(e,t){var n;e||(e=hx);let r=ZC.start(e,t||(null===(n=this.cache.find(ZC))||void 0===n?void 0:n.dom),!!t);this.getBlockPos().append(this.lastBlock=this.curLine=r)}addLine(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}addBreak(){this.lastBlock.flags|=1,this.endLine(),this.pos++}addLineStartIfNotCovered(e){this.blockPosCovered()||this.addLineStart(e)}ensureLine(e){this.curLine||this.addLineStart(e)}ensureMarks(e,t){var n;let r=this.curLine;for(let i=e.length-1;i>=0;i--){let o,s=e[i];if(t>0&&(o=r.lastChild)&&o instanceof tx&&o.mark.eq(s))r=o,t--;else{let e=tx.of(s,null===(n=this.cache.find(tx,e=>e.mark.eq(s)))||void 0===n?void 0:n.dom);r.append(e),r=e,t=0}}return r}endLine(){if(this.curLine){this.flushBuffer();let e=this.curLine.lastChild;e&&px(this.curLine,!1)&&("BR"==e.dom.nodeName||!e.isWidget()||iy.ios&&px(this.curLine,!0))||this.curLine.append(this.cache.findWidget(mx,0,32)||new rx(mx.toDOM(),0,mx,32)),this.curLine=this.afterWidget=null}}updateBlockWrappers(){this.wrapperPos>this.pos+1e4&&(this.blockWrappers.goto(this.pos),this.wrappers.length=0);for(let e=this.wrappers.length-1;e>=0;e--)this.wrappers[e].to<this.pos&&this.wrappers.splice(e,1);for(let e=this.blockWrappers;e.value&&e.from<=this.pos;e.next())if(e.to>=this.pos){let t=102*e.rank+e.value.rank,n=new sx(e.from,e.to,e.value,t),r=this.wrappers.length;for(;r>0&&(this.wrappers[r-1].rank-n.rank||this.wrappers[r-1].to-n.to)<0;)r--;this.wrappers.splice(r,0,n)}this.wrapperPos=this.pos}getBlockPos(){var e;this.updateBlockWrappers();let t=this.root;for(let n of this.wrappers){let r=t.lastChild;if(n.from<this.pos&&r instanceof KC&&r.wrapper.eq(n.wrapper))t=r;else{let r=KC.of(n.wrapper,null===(e=this.cache.find(KC,e=>e.wrapper.eq(n.wrapper)))||void 0===e?void 0:e.dom);t.append(r),t=r}}return t}blockPosCovered(){let e=this.lastBlock;return null!=e&&!e.breakAfter&&(!e.isWidget()||(160&e.flags)>0)}getBuffer(e){let t=2|(e<0?16:32),n=this.cache.find(ix,void 0,1);return n&&(n.flags=t),n||new ix(t)}flushBuffer(){!this.afterWidget||32&this.afterWidget.flags||(this.afterWidget.parent.append(this.getBuffer(-1)),this.afterWidget=null)}}class lx{constructor(e){this.skipCount=0,this.text="",this.textOff=0,this.cursor=e.iter()}skip(e){this.textOff+e<=this.text.length?this.textOff+=e:(this.skipCount+=e-(this.text.length-this.textOff),this.text="",this.textOff=0)}next(e){if(this.textOff==this.text.length){let{value:t,lineBreak:n,done:r}=this.cursor.next(this.skipCount);if(this.skipCount=0,r)throw new Error("Ran out of text content when drawing inline views");this.text=t;let i=this.textOff=Math.min(e,t.length);return n?null:t.slice(0,i)}let t=Math.min(this.text.length,this.textOff+e),n=this.text.slice(this.textOff,t);return this.textOff=t,n}}const cx=[rx,ZC,nx,tx,ix,KC,GC];for(let e=0;e<cx.length;e++)cx[e].bucket=e;class dx{constructor(e){this.view=e,this.buckets=cx.map(()=>[]),this.index=cx.map(()=>0),this.reused=new Map}add(e){let t=e.constructor.bucket,n=this.buckets[t];n.length<6?n.push(e):n[this.index[t]=(this.index[t]+1)%6]=e}find(e,t,n=2){let r=e.bucket,i=this.buckets[r],o=this.index[r];for(let e=0;e<i.length;e++){let s=(e+o)%i.length,a=i[s];if((!t||t(a))&&!this.reused.has(a))return i.splice(s,1),s<o&&this.index[r]--,this.reused.set(a,n),a}return null}findWidget(e,t,n){let r=this.buckets[0];if(r.length)for(let i=0,o=0;;i++){if(i==r.length){if(o)return null;o=1,i=0}let s=r[i];if(!this.reused.has(s)&&(0==o?s.widget.compare(e):s.widget.constructor==e.constructor&&e.updateDOM(s.dom,this.view,s.widget)))return r.splice(i,1),i<this.index[0]&&this.index[0]--,s.widget==e&&s.length==t&&(497&s.flags)==n?(this.reused.set(s,1),s):(this.reused.set(s,2),new rx(s.dom,t,e,-498&s.flags|n))}}reuse(e){return this.reused.set(e,1),e}maybeReuse(e,t=2){if(!this.reused.has(e))return this.reused.set(e,t),e.dom}clear(){for(let e=0;e<this.buckets.length;e++)this.buckets[e].length=this.index[e]=0}}class ux{constructor(e,t,n,r,i){this.view=e,this.decorations=r,this.disallowBlockEffectsFor=i,this.openWidget=!1,this.openMarks=0,this.cache=new dx(e),this.text=new lx(e.state.doc),this.builder=new ax(this.cache,new GC(e,e.contentDOM),vb.iter(n)),this.cache.reused.set(t,2),this.old=new ox(t),this.reuseWalker={skip:(e,t,n)=>{if(this.cache.add(e),e.isComposite())return!1},enter:e=>this.cache.add(e),leave:()=>{},break:()=>{}}}run(e,t){let n=t&&this.getCompositionContext(t.text);for(let r=0,i=0,o=0;;){let s=o<e.length?e[o++]:null,a=s?s.fromA:this.old.root.length;if(a>r){let e=a-r;this.preserve(e,!o,!s),r=a,i+=e}if(!s)break;t&&s.fromA<=t.range.fromA&&s.toA>=t.range.toA?(this.forward(s.fromA,t.range.fromA,t.range.fromA<t.range.toA?1:-1),this.emit(i,t.range.fromB),this.builder.flushBuffer(),this.cache.clear(),this.builder.addComposition(t,n),this.text.skip(t.range.toB-t.range.fromB),this.forward(t.range.fromA,s.toA),this.emit(t.range.toB,s.toB)):(this.forward(s.fromA,s.toA),this.emit(i,s.toB)),i=s.toB,r=s.toA}return this.builder.curLine&&this.builder.endLine(),this.builder.root}preserve(e,t,n){let r=function(e){let t=[];for(let n=e.parents.length;n>1;n--){let r=n==e.parents.length?e.tile:e.parents[n].tile;r instanceof tx&&t.push(r.mark)}return t}(this.old),i=this.openMarks;this.old.advance(e,n?1:-1,{skip:(e,t,n)=>{if(e.isWidget())if(this.openWidget)this.builder.continueWidget(n-t);else{let o=n>0||t<e.length?rx.of(e.widget,this.view,n-t,496&e.flags,this.cache.maybeReuse(e)):this.cache.reuse(e);256&o.flags?(o.flags&=-2,this.builder.addBlockWidget(o)):(this.builder.ensureLine(null),this.builder.addInlineWidget(o,r,i),i=r.length)}else if(e.isText())this.builder.ensureLine(null),t||n!=e.length||this.cache.reused.has(e)?(this.cache.add(e),this.builder.addText(e.text.slice(t,n),r,i)):this.builder.addText(e.text,r,i,this.cache.reuse(e)),i=r.length;else if(e.isLine())e.flags&=-2,this.cache.reused.set(e,1),this.builder.addLine(e);else if(e instanceof ix)this.cache.add(e);else{if(!(e instanceof tx))return!1;this.builder.ensureLine(null),this.builder.addMark(e,r,i),this.cache.reused.set(e,1),i=r.length}this.openWidget=!1},enter:e=>{e.isLine()?this.builder.addLineStart(e.attrs,this.cache.maybeReuse(e)):(this.cache.add(e),e instanceof tx&&r.unshift(e.mark)),this.openWidget=!1},leave:e=>{e.isLine()?r.length&&(r.length=i=0):e instanceof tx&&(r.shift(),i=Math.min(i,r.length))},break:()=>{this.builder.addBreak(),this.openWidget=!1}}),this.text.skip(e)}emit(e,t){let n=null,r=this.builder,i=-1,o=vb.spans(this.decorations,e,t,{point:(e,t,o,s,a,l)=>{if(o instanceof gy){if(this.disallowBlockEffectsFor[l]){if(o.block)throw new RangeError("Block decorations may not be specified via plugins");if(t>this.view.state.doc.lineAt(e).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}if(i=s.length,a>s.length)r.continueWidget(t-e);else{let i=o.widget||(o.block?gx.block:gx.inline),l=function(e){let t=e.isReplace?(e.startSide<0?64:0)|(e.endSide>0?128:0):e.startSide>0?32:16;e.block&&(t|=256);return t}(o),c=this.cache.findWidget(i,t-e,l)||rx.of(i,this.view,t-e,l);o.block?(o.startSide>0&&r.addLineStartIfNotCovered(n),r.addBlockWidget(c)):(r.ensureLine(n),r.addInlineWidget(c,s,a))}n=null}else n=function(e,t){let n=t.spec.attributes,r=t.spec.class;if(!n&&!r)return e;e||(e={class:"cm-line"});n&&oy(n,e);r&&(e.class+=" "+r);return e}(n,o);t>e&&this.text.skip(t-e)},span:(e,t,o,s)=>{for(let i=e;i<t;){let a=this.text.next(Math.min(512,t-i));null==a?(r.addLineStartIfNotCovered(n),r.addBreak(),i++):(r.ensureLine(n),r.addText(a,o,i==e?s:o.length),i+=a.length),n=null}i=o.length}});i>-1&&(this.openWidget=o>i),this.openWidget||r.addLineStartIfNotCovered(n),this.openMarks=o}forward(e,t,n=1){t-e<=10?this.old.advance(t-e,n,this.reuseWalker):(this.old.advance(5,-1,this.reuseWalker),this.old.advance(t-e-10,-1),this.old.advance(5,n,this.reuseWalker))}getCompositionContext(e){let t=[],n=null;for(let r=e.parentNode;;r=r.parentNode){let e=YC.get(r);if(r==this.view.contentDOM)break;e instanceof tx?t.push(e):(null==e?void 0:e.isLine())?n=e:e instanceof KC||("DIV"!=r.nodeName||n?n||t.push(tx.of(new hy({tagName:r.nodeName.toLowerCase(),attributes:cy(r)}),r)):n=new ZC(r,hx))}return n?{line:n,marks:t}:null}}function px(e,t){let n=e=>{for(let r of e.children)if((t?r.isText():r.length)||n(r))return!0;return!1};return n(e)}const hx={class:"cm-line"};function fx(e){let t=YC.get(e);return t&&t.setDOM(e.cloneNode()),e}class gx extends dy{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}gx.inline=new gx("span"),gx.block=new gx("div");const mx=new class extends dy{toDOM(){return document.createElement("br")}get isHidden(){return!0}get editable(){return!0}};class vx{constructor(e){this.view=e,this.decorations=[],this.blockWrappers=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.editContextFormatting=py.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.updateDeco(),this.tile=new GC(e,e.contentDOM),this.updateInner([new HC(0,0,0,e.state.doc.length)],null)}update(e){var t;let n=e.changedRanges;this.minWidth>0&&n.length&&(n.every(({fromA:e,toA:t})=>t<this.minWidthFrom||e>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let r=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&((null===(t=this.domChanged)||void 0===t?void 0:t.newSel)?r=this.domChanged.newSel.head:function(e,t){let n=!1;t&&e.iterChangedRanges((e,r)=>{e<t.to&&r>t.from&&(n=!0)});return n}(e.changes,this.hasComposition)||e.selectionSet||(r=e.state.selection.main.head));let i=r>-1?function(e,t,n){let r=bx(e,n);if(!r)return null;let{node:i,from:o,to:s}=r,a=i.nodeValue;if(/[\n\r]/.test(a))return null;if(e.state.doc.sliceString(r.from,r.to)!=a)return null;let l=t.invertedDesc;return{range:new HC(l.mapPos(o),l.mapPos(s),o,s),text:i}}(this.view,e.changes,r):null;if(this.domChanged=null,this.hasComposition){let{from:t,to:r}=this.hasComposition;n=new HC(t,r,e.changes.mapPos(t,-1),e.changes.mapPos(r,1)).addToSet(n.slice())}this.hasComposition=i?{from:i.range.fromB,to:i.range.toB}:null,(iy.ie||iy.chrome)&&!i&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let o=this.decorations,s=this.blockWrappers;this.updateDeco();let a=function(e,t,n){let r=new yx;return vb.compare(e,t,n,r),r.changes}(o,this.decorations,e.changes);a.length&&(n=HC.extendWithRanges(n,a));let l=function(e,t,n){let r=new Cx;return vb.compare(e,t,n,r),r.changes}(s,this.blockWrappers,e.changes);return l.length&&(n=HC.extendWithRanges(n,l)),i&&!n.some(e=>e.fromA<=i.range.fromA&&e.toA>=i.range.toA)&&(n=i.range.addToSet(n.slice())),!(2&this.tile.flags&&0==n.length)&&(this.updateInner(n,i),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t){this.view.viewState.mustMeasureContent=!0;let{observer:n}=this.view;n.ignore(()=>{if(t||e.length){let n=this.tile,r=new ux(this.view,n,this.blockWrappers,this.decorations,this.dynamicDecorationMap);t&&YC.get(t.text)&&r.cache.reused.set(YC.get(t.text),2),this.tile=r.run(e,t),Ax(n,r.cache.reused)}this.tile.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.tile.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let r=iy.chrome||iy.ios?{node:n.selectionRange.focusNode,written:!1}:void 0;this.tile.sync(r),!r||!r.written&&n.selectionRange.focusNode==r.node&&this.tile.dom.contains(r.node)||(this.forceSelection=!0),this.tile.dom.style.height=""});let r=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let e of this.tile.children)e.isWidget()&&e.widget instanceof xx&&r.push(e.dom);n.updateGaps(r)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let t of e.transactions)for(let e of t.effects)e.is(OC)&&(this.editContextFormatting=e.value)}updateSelection(e=!1,t=!1){!e&&this.view.observer.selectionRange.focusNode||this.view.observer.readSelectionRange();let{dom:n}=this.tile,r=this.view.root.activeElement,i=r==n,o=!i&&!(this.view.state.facet(BC)||n.tabIndex>-1)&&wy(n,this.view.observer.selectionRange)&&!(r&&n.contains(r));if(!(i||t||o))return;let s=this.forceSelection;this.forceSelection=!1;let a,l,c=this.view.state.selection.main;if(c.empty?l=a=this.inlineDOMNearPos(c.anchor,c.assoc||1):(l=this.inlineDOMNearPos(c.head,c.head==c.from?1:-1),a=this.inlineDOMNearPos(c.anchor,c.anchor==c.from?1:-1)),iy.gecko&&c.empty&&!this.hasComposition&&(by((d=a).node)&&d.node.firstChild&&(0==d.offset||"false"==d.node.childNodes[d.offset-1].contentEditable)&&(d.offset==d.node.childNodes.length||"false"==d.node.childNodes[d.offset].contentEditable))){let e=document.createTextNode("");this.view.observer.ignore(()=>a.node.insertBefore(e,a.node.childNodes[a.offset]||null)),a=l=new Hy(e,0),s=!0}var d;let u=this.view.observer.selectionRange;!s&&u.focusNode&&(Sy(a.node,a.offset,u.anchorNode,u.anchorOffset)&&Sy(l.node,l.offset,u.focusNode,u.focusOffset)||this.suppressWidgetCursorChange(u,c))||(this.view.observer.ignore(()=>{iy.android&&iy.chrome&&n.contains(u.focusNode)&&function(e,t){for(let n=e;n&&n!=t;n=n.assignedSlot||n.parentNode)if(by(n)&&"false"==n.contentEditable)return!0;return!1}(u.focusNode,n)&&(n.blur(),n.focus({preventScroll:!0}));let e=Cy(this.view.root);if(e)if(c.empty){if(iy.gecko){let e=(t=a.node,i=a.offset,by(t)?(i&&"false"==t.childNodes[i-1].contentEditable?1:0)|(i<t.childNodes.length&&"false"==t.childNodes[i].contentEditable?2:0):0);if(e&&3!=e){let t=(1==e?zy:Qy)(a.node,a.offset);t&&(a=new Hy(t.node,t.offset))}}e.collapse(a.node,a.offset),null!=c.bidiLevel&&void 0!==e.caretBidiLevel&&(e.caretBidiLevel=c.bidiLevel)}else if(e.extend){e.collapse(a.node,a.offset);try{e.extend(l.node,l.offset)}catch(e){}}else{let t=document.createRange();c.anchor>c.head&&([a,l]=[l,a]),t.setEnd(l.node,l.offset),t.setStart(a.node,a.offset),e.removeAllRanges(),e.addRange(t)}else;var t,i;o&&this.view.root.activeElement==n&&(n.blur(),r&&r.focus())}),this.view.observer.setSelectionRange(a,l)),this.impreciseAnchor=a.precise?null:new Hy(u.anchorNode,u.anchorOffset),this.impreciseHead=l.precise?null:new Hy(u.focusNode,u.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&Sy(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,n=Cy(e.root),{anchorNode:r,anchorOffset:i}=e.observer.selectionRange;if(!(n&&t.empty&&t.assoc&&n.modify))return;let o=this.lineAt(t.head,t.assoc);if(!o)return;let s=o.posAtStart;if(t.head==s||t.head==s+o.length)return;let a=this.coordsAt(t.head,-1),l=this.coordsAt(t.head,1);if(!a||!l||a.bottom>l.top)return;let c=this.domAtPos(t.head+t.assoc,t.assoc);n.collapse(c.node,c.offset),n.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let d=e.observer.selectionRange;e.docView.posFromDOM(d.anchorNode,d.anchorOffset)!=t.from&&n.collapse(r,i)}posFromDOM(e,t){let n=this.tile.nearest(e);if(!n)return 2&this.tile.dom.compareDocumentPosition(e)?0:this.view.state.doc.length;let r=n.posAtStart;if(!n.isComposite())return n.isText()?e==n.dom?r+t:r+(t?n.length:0):r;{let i;if(e==n.dom)i=n.dom.childNodes[t];else{let r=0==Ey(e)?0:0==t?-1:1;for(;;){let t=e.parentNode;if(t==n.dom)break;0==r&&t.firstChild!=t.lastChild&&(r=e==t.firstChild?-1:1),e=t}i=r<0?e:e.nextSibling}if(i==n.dom.firstChild)return r;for(;i&&!YC.get(i);)i=i.nextSibling;if(!i)return r+n.length;for(let e=0,t=r;;e++){let r=n.children[e];if(r.dom==i)return t;t+=r.length+r.breakAfter}}}domAtPos(e,t){let{tile:n,offset:r}=this.tile.resolveBlock(e,t);return n.isWidget()?n.domPosFor(r,t):n.domIn(r,t)}inlineDOMNearPos(e,t){let n,r,i=-1,o=!1,s=-1,a=!1;return this.tile.blockTiles((t,l)=>{if(t.isWidget()){if(32&t.flags&&l>=e)return!0;16&t.flags&&(o=!0)}else{let c=l+t.length;if(l<=e&&(n=t,i=e-l,o=c<e),c>=e&&!r&&(r=t,s=e-l,a=l>e),l>e&&r)return!0}}),n||r?(o&&r?n=null:a&&n&&(r=null),n&&t<0||!r?n.domIn(i,t):r.domIn(s,t)):this.domAtPos(e,t)}coordsAt(e,t,n){let{tile:r,offset:i}=this.tile.resolveBlock(e,t);return r.isWidget()?r.widget instanceof xx?null:r.coordsInWidget(i,t,!0):r.coordsIn(i,t,n)}lineAt(e,t){let{tile:n}=this.tile.resolveBlock(e,t);return n.isLine()?n:null}coordsForChar(e){let{tile:t,offset:n}=this.tile.resolveBlock(e,1);if(!t.isLine())return null;return function e(t,n){if(t.isComposite())for(let r of t.children){if(r.length>=n){let t=e(r,n);if(t)return t}if((n-=r.length)<0)break}else if(t.isText()&&n<t.length){let e=iA(t.text,n);if(e==n)return null;let r=jy(t.dom,n,e).getClientRects();for(let e=0;e<r.length;e++){let t=r[e];if(e==r.length-1||t.top<t.bottom&&t.left<t.right)return t}}return null}(t,n)}measureVisibleLineHeights(e){let t=[],{from:n,to:r}=e,i=this.view.contentDOM.clientWidth,o=i>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,s=-1,a=this.view.textDirection==qy.LTR,l=0,c=(e,d,u)=>{for(let p=0;p<e.children.length&&!(d>r);p++){let r=e.children[p],h=d+r.length,f=r.dom.getBoundingClientRect(),{height:g}=f;if(u&&!p&&(l+=f.top-u.top),r instanceof KC)h>n&&c(r,d,f);else if(d>=n&&(l>0&&t.push(-l),t.push(g+l),l=0,o)){let e=r.dom.lastChild,t=e?ky(e):[];if(t.length){let e=t[t.length-1],n=a?e.right-f.left:f.right-e.left;n>s&&(s=n,this.minWidth=i,this.minWidthFrom=d,this.minWidthTo=h)}}u&&p==e.children.length-1&&(l+=u.bottom-f.bottom),d=h+r.breakAfter}};return c(this.tile,0,null),t}textDirectionAt(e){let{tile:t}=this.tile.resolveBlock(e,1);return"rtl"==getComputedStyle(t.dom).direction?qy.RTL:qy.LTR}measureTextSize(){let e=this.tile.blockTiles(e=>{if(e.isLine()&&e.children.length&&e.length<=20){let t,n=0;for(let r of e.children){if(!r.isText()||/[^ -~]/.test(r.text))return;let e=ky(r.dom);if(1!=e.length)return;n+=e[0].width,t=e[0].height}if(n)return{lineHeight:e.dom.getBoundingClientRect().height,charWidth:n/e.length,textHeight:t}}});if(e)return e;let t,n,r,i=document.createElement("div");return i.className="cm-line",i.style.width="99999px",i.style.position="absolute",i.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.tile.dom.appendChild(i);let e=ky(i.firstChild)[0];t=i.getBoundingClientRect().height,n=e&&e.width?e.width/27:7,r=e&&e.height?e.height:t,i.remove()}),{lineHeight:t,charWidth:n,textHeight:r}}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let n=0,r=0;;r++){let i=r==t.viewports.length?null:t.viewports[r],o=i?i.from-1:this.view.state.doc.length;if(o>n){let r=(t.lineBlockAt(o).bottom-t.lineBlockAt(n).top)/this.view.scaleY;e.push(py.replace({widget:new xx(r),block:!0,inclusive:!0,isBlockGap:!0}).range(n,o))}if(!i)break;n=i.to+1}return py.set(e)}updateDeco(){let e=1,t=this.view.state.facet(IC).map(t=>(this.dynamicDecorationMap[e++]="function"==typeof t)?t(this.view):t),n=!1,r=this.view.state.facet(LC).map((e,t)=>{let r="function"==typeof e;return r&&(n=!0),r?e(this.view):e});for(r.length&&(this.dynamicDecorationMap[e++]=n,t.push(vb.join(r))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;this.blockWrappers=this.view.state.facet(NC).map(e=>"function"==typeof e?e(this.view):e)}scrollIntoView(e){if(e.isSnapshot){let t=this.view.viewState.lineBlockAt(e.range.head);return this.view.scrollDOM.scrollTop=t.top-e.yMargin,void(this.view.scrollDOM.scrollLeft=e.xMargin)}for(let t of this.view.state.facet(wC))try{if(t(this.view,e.range,e))return!0}catch(e){_C(this.view.state,e,"scroll handler")}let t,{range:n}=e,r=this.coordsAt(n.head,n.assoc||(n.head>n.anchor?-1:1));if(!r)return;!n.empty&&(t=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(r={left:Math.min(r.left,t.left),top:Math.min(r.top,t.top),right:Math.max(r.right,t.right),bottom:Math.max(r.bottom,t.bottom)});let i=zC(this.view),o={left:r.left-i.left,top:r.top-i.top,right:r.right+i.right,bottom:r.bottom+i.bottom},{offsetWidth:s,offsetHeight:a}=this.view.scrollDOM;if(function(e,t,n,r,i,o,s,a){let l=e.ownerDocument,c=l.defaultView||window;for(let d=e,u=!1;d&&!u;)if(by(d)){let e,p=d==l.body,h=1,f=1,g=!0,m=!0;if(p)e=My(c);else{let t=getComputedStyle(d);if(/^(fixed|sticky)$/.test(t.position)&&(u=!0),(d.scrollHeight<=d.clientHeight||!/auto|scroll/.test(t.overflowY))&&(m=!1),(d.scrollWidth<=d.clientWidth||!/auto|scroll/.test(t.overflowX))&&(g=!1),!g&&!m){d=d.assignedSlot||d.parentNode;continue}let n=d.getBoundingClientRect();({scaleX:h,scaleY:f}=Dy(d,n)),e={left:n.left,right:n.left+d.clientWidth*h,top:n.top,bottom:n.top+d.clientHeight*f}}let v=0,A=0;if(m)if("nearest"==i)t.top<e.top+s?(A=t.top-(e.top+s),n>0&&t.bottom>e.bottom+A&&(A=t.bottom-e.bottom+s)):t.bottom>e.bottom-s&&(A=t.bottom-e.bottom+s,n<0&&t.top-A<e.top&&(A=t.top-(e.top+s)));else{let r=t.bottom-t.top,o=e.bottom-e.top;A=("center"==i&&r<=o?t.top+r/2-o/2:"start"==i||"center"==i&&n<0?t.top-s:t.bottom-o+s)-e.top}if(g&&("nearest"==r?t.left<e.left+o?(v=t.left-(e.left+o),n>0&&t.right>e.right+v&&(v=t.right-e.right+o)):t.right>e.right-o&&(v=t.right-e.right+o,n<0&&t.left<e.left+v&&(v=t.left-(e.left+o))):v=("center"==r?t.left+(t.right-t.left)/2-(e.right-e.left)/2:"start"==r==a?t.left-o:t.right-(e.right-e.left)+o)-e.left),v||A)if(p)c.scrollBy(v,A);else{let e=0,n=0;if(A){let e=d.scrollTop;d.scrollTop+=A/f,n=(d.scrollTop-e)*f}if(v){let t=d.scrollLeft;d.scrollLeft+=v/h,e=(d.scrollLeft-t)*h}t={left:t.left-e,top:t.top-n,right:t.right-e,bottom:t.bottom-n},e&&Math.abs(e-v)<1&&(r="nearest"),n&&Math.abs(n-A)<1&&(i="nearest")}if(p)break;(t.top<e.top||t.bottom>e.bottom||t.left<e.left||t.right>e.right)&&(t={left:Math.max(t.left,e.left),right:Math.min(t.right,e.right),top:Math.max(t.top,e.top),bottom:Math.min(t.bottom,e.bottom)}),d=d.assignedSlot||d.parentNode}else{if(11!=d.nodeType)break;d=d.host}}(this.view.scrollDOM,o,n.head<n.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,s),-s),Math.max(Math.min(e.yMargin,a),-a),this.view.textDirection==qy.LTR),window.visualViewport&&window.innerHeight-window.visualViewport.height>1&&(r.top>window.visualViewport.offsetTop+window.visualViewport.height||r.bottom<window.visualViewport.offsetTop)){let e=this.view.docView.lineAt(n.head,1);if(e){let t=Iy(e.dom);e.dom.scrollIntoView({block:"nearest"}),Ny(t,!1)}}}lineHasWidget(e){let t=e=>e.isWidget()||e.children.some(t);return t(this.tile.resolveBlock(e,1).tile)}destroy(){Ax(this.tile)}}function Ax(e,t){let n=null==t?void 0:t.get(e);if(1!=n){null==n&&e.destroy();for(let n of e.children)Ax(n,t)}}function bx(e,t){let n=e.observer.selectionRange;if(!n.focusNode)return null;let r=zy(n.focusNode,n.focusOffset),i=Qy(n.focusNode,n.focusOffset),o=r||i;if(i&&r&&i.node!=r.node){let t=YC.get(i.node);if(!t||t.isText()&&t.text!=i.node.nodeValue)o=i;else if(e.docView.lastCompositionAfterCursor){let e=YC.get(r.node);!e||e.isText()&&e.text!=r.node.nodeValue||(o=i)}}if(e.docView.lastCompositionAfterCursor=o!=r,!o)return null;let s=t-o.offset;return{from:s,to:s+o.node.nodeValue.length,node:o.node}}let yx=class{constructor(){this.changes=[]}compareRange(e,t){vy(e,t,this.changes)}comparePoint(e,t){vy(e,t,this.changes)}boundChange(e){vy(e,e,this.changes)}};class Cx{constructor(){this.changes=[]}compareRange(e,t){vy(e,t,this.changes)}comparePoint(){}boundChange(e){vy(e,e,this.changes)}}class xx extends dy{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}function wx(e,t,n){let r=e.lineBlockAt(t);if(Array.isArray(r.type)){let e;for(let i of r.type){if(i.from>t)break;if(!(i.to<t)){if(i.from<t&&i.to>t)return i;e&&(i.type!=uy.Text||e.type==i.type&&!(n<0?i.from<t:i.to>t))||(e=i)}}return e||r}return r}function kx(e,t,n,r){let i=e.state.doc.lineAt(t.head),o=e.bidiSpans(i),s=e.textDirectionAt(i.from);for(let a=t,l=null;;){let t=dC(i,o,s,a,n),c=cC;if(!t){if(i.number==(n?e.state.doc.lines:1))return a;c="\n",i=e.state.doc.line(i.number+(n?1:-1)),o=e.bidiSpans(i),t=n?bA.cursor(i.from,-1):bA.cursor(i.to,1)}if(l){if(!l(c))return a}else{if(!r)return t;l=r(c)}a=t}}function Sx(e,t,n){for(;;){let r=0;for(let i of e)i.between(t-1,t+1,(e,i,o)=>{if(t>e&&t<i){let o=r||n||(t-e<i-t?-1:1);t=o<0?e:i,r=o}});if(!r)return t}}function Ox(e,t){let n=null;for(let r=0;r<t.ranges.length;r++){let i=t.ranges[r],o=null;if(i.empty){let t=Sx(e,i.from,0);t!=i.from&&(o=bA.cursor(t,-1))}else{let t=Sx(e,i.from,-1),n=Sx(e,i.to,1);t==i.from&&n==i.to||(o=i.undirectional?bA.undirectionalRange(i.from,i.to):bA.range(i.from==i.anchor?t:n,i.from==i.head?t:n))}o&&(n||(n=t.ranges.slice()),n[r]=o)}return n?bA.create(n,t.mainIndex):t}function _x(e,t,n){let r=Sx(e.state.facet($C).map(t=>t(e)),n.from,t.head>n.from?-1:1);return r==n.from?n:bA.cursor(r,r<n.from?1:-1)}class Bx{constructor(e,t){this.pos=e,this.assoc=t}}function Ex(e,t,n,r){let i,o=e.contentDOM.getBoundingClientRect(),s=o.top+e.viewState.paddingTop,{x:a,y:l}=t,c=l-s;for(;;){if(c<0)return new Bx(0,1);if(c>e.viewState.docHeight)return new Bx(e.state.doc.length,-1);if(i=e.elementAtHeight(c),null==r)break;if(i.type==uy.Text){if(r<0?i.to<e.viewport.from:i.from>e.viewport.to)break;let t=e.docView.coordsAt(r<0?i.from:i.to,r>0?-1:1);if(t&&(r<0?t.top<=c+s:t.bottom>=c+s))break}let t=e.viewState.heightOracle.textHeight/2;c=r>0?i.bottom+t:i.top-t}if(e.viewport.from>=i.to||e.viewport.to<=i.from){if(n)return null;if(i.type==uy.Text){let t=function(e,t,n,r,i){let o=Math.round((r-t.left)*e.defaultCharacterWidth);if(e.lineWrapping&&n.height>1.5*e.defaultLineHeight){let t=e.viewState.heightOracle.textHeight;o+=Math.floor((i-n.top-.5*(e.defaultLineHeight-t))/t)*e.viewState.heightOracle.lineLength}let s=e.state.sliceDoc(n.from,n.to);return n.from+Mb(s,o,e.state.tabSize)}(e,o,i,a,l);return new Bx(t,t==i.from?1:-1)}}if(i.type!=uy.Text)return c<(i.top+i.bottom)/2?new Bx(i.from,1):new Bx(i.to,-1);let d=e.docView.lineAt(i.from,2);return d&&d.length==i.length||(d=e.docView.lineAt(i.from,-2)),new Tx(e,a,l,e.textDirectionAt(i.from)).scanTile(d,i.from)}class Tx{constructor(e,t,n,r){this.view=e,this.x=t,this.y=n,this.baseDir=r,this.line=null,this.spans=null}bidiSpansAt(e){return(!this.line||this.line.from>e||this.line.to<e)&&(this.line=this.view.state.doc.lineAt(e),this.spans=this.view.bidiSpans(this.line)),this}baseDirAt(e,t){let{line:n,spans:r}=this.bidiSpansAt(e);return r[nC.find(r,e-n.from,-1,t)].level==this.baseDir}dirAt(e,t){let{line:n,spans:r}=this.bidiSpansAt(e);return r[nC.find(r,e-n.from,-1,t)].dir}bidiIn(e,t){let{spans:n,line:r}=this.bidiSpansAt(e);return n.length>1||n.length&&(n[0].level!=this.baseDir||n[0].to+r.from<t)}scan(e,t,n=!1){let r,i,o,s=0,a=e.length-1,l=new Set,c=this.bidiIn(e[0],e[a]),d=-1,u=1e9;e:for(;s<a;){let n=a-s,p=s+a>>1;t:if(l.has(p)){for(let e=1;e<n;e++){let t=p+e;if(t>=a&&(t-=n),!l.has(t)){p=t;break t}}break e}l.add(p);let h=t(p),f=0;if(h)for(let e=0;e<h.length;e++){let t=h[e];if(!(0==t.width&&h.length>1))if(t.bottom<this.y)(!r||r.bottom<t.bottom)&&(r=t),f=1;else if(t.top>this.y)(!i||i.top>t.top)&&(i=t),f=-1;else{let e=t.left>this.x?this.x-t.left:t.right<this.x?this.x-t.right:0,n=Math.abs(e);n<u&&(d=p,u=n,o=t),e&&(f=e<0==(this.baseDir==qy.LTR)?-1:1)}}-1!=f||c&&!this.baseDirAt(e[p],1)?1!=f||c&&!this.baseDirAt(e[p+1],-1)||(s=p+1):a=p}if(!o){if(!i&&!r)return{i:0,after:!1};let n=r&&(!i||this.y-r.bottom<i.top-this.y)?r:i;return this.y=(n.top+n.bottom)/2,this.scan(e,t,!0)}if(u&&!n){let{top:n,bottom:s}=o;if(r&&r.bottom>(n+n+s)/3)return this.y=r.bottom-1,this.scan(e,t,!0);if(i&&i.top<(n+s+s)/3)return this.y=i.top+1,this.scan(e,t,!0)}let p=(c?this.dirAt(e[d],1):this.baseDir)==qy.LTR;return{i:d,after:this.x>(o.left+o.right)/2==p}}scanText(e,t){let n=[];for(let r=0;r<e.length;r=iA(e.text,r))n.push(t+r);n.push(t+e.length);let r=this.scan(n,r=>{let i=n[r]-t,o=n[r+1]-t;return jy(e.dom,i,o).getClientRects()});return r.after?new Bx(n[r.i+1],-1):new Bx(n[r.i],1)}scanTile(e,t){if(!e.length)return new Bx(t,1);if(1==e.children.length){let n=e.children[0];if(n.isText())return this.scanText(n,t);if(n.isComposite())return this.scanTile(n,t)}let n=[t];for(let r=0,i=t;r<e.children.length;r++)n.push(i+=e.children[r].length);let r=this.scan(n,t=>{let n=e.children[t];return 48&n.flags?null:(by(n.dom)?n.dom:jy(n.dom,0,n.length)).getClientRects()}),i=e.children[r.i],o=n[r.i];return i.isText()?this.scanText(i,o):i.isComposite()?this.scanTile(i,o):r.after?new Bx(n[r.i+1],-1):new Bx(o,1)}}const Mx="";class Dx{constructor(e,t){this.points=e,this.view=t,this.text="",this.lineSeparator=t.state.facet(db.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=Mx}readRange(e,t){if(!e)return this;let n=e.parentNode;for(let r=e;;){this.findPointBefore(n,r);let e=this.text.length;this.readNode(r);let i=YC.get(r),o=r.nextSibling;if(o==t){(null==i?void 0:i.breakAfter)&&!o&&n!=this.view.contentDOM&&this.lineBreak();break}let s=YC.get(o);(i&&s?i.breakAfter:(i?i.breakAfter:_y(r))||_y(o)&&("BR"!=r.nodeName||(null==i?void 0:i.isWidget()))&&this.text.length>e)&&!Rx(o,t)&&this.lineBreak(),r=o}return this.findPointBefore(n,t),this}readTextNode(e){let t=e.nodeValue;for(let n of this.points)n.node==e&&(n.pos=this.text.length+Math.min(n.offset,t.length));for(let n=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let i,o=-1,s=1;if(this.lineSeparator?(o=t.indexOf(this.lineSeparator,n),s=this.lineSeparator.length):(i=r.exec(t))&&(o=i.index,s=i[0].length),this.append(t.slice(n,o<0?t.length:o)),o<0)break;if(this.lineBreak(),s>1)for(let t of this.points)t.node==e&&t.pos>this.text.length&&(t.pos-=s-1);n=o+s}}readNode(e){let t=YC.get(e),n=t&&t.overrideDOMText;if(null!=n){this.findPointInside(e,n.length);for(let e=n.iter();!e.next().done;)e.lineBreak?this.lineBreak():this.append(e.value)}else yy(e)?this.readTextNode(e):"BR"==e.nodeName?e.nextSibling&&this.lineBreak():by(e)&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let n of this.points)n.node==e&&e.childNodes[n.offset]==t&&(n.pos=this.text.length)}findPointInside(e,t){for(let n of this.points)(yy(e)?n.node==e:e.contains(n.node))&&(n.pos=this.text.length+(Px(e,n.node,n.offset)?t:0))}}function Px(e,t,n){for(;;){if(!t||n<Ey(t))return!1;if(t==e)return!0;n=Oy(t)+1,t=t.parentNode}}function Rx(e,t){let n;for(;e!=t&&e;e=e.nextSibling){let t=YC.get(e);if(!(null==t?void 0:t.isWidget()))return!1;t&&(n||(n=[])).push(t)}if(n)for(let e of n){let t=e.overrideDOMText;if(null==t?void 0:t.length)return!1}return!0}class Ix{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}}class Nx{constructor(e,t,n,r){this.typeOver=r,this.bounds=null,this.text="",this.domChanged=t>-1;let{impreciseHead:i,impreciseAnchor:o}=e.docView,s=e.state.selection;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=Lx(e.docView.tile,t,n,0))){let t=i||o?[]:function(e){let t=[];if(e.root.activeElement!=e.contentDOM)return t;let{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:o}=e.observer.selectionRange;n&&(t.push(new Ix(n,r)),i==n&&o==r||t.push(new Ix(i,o)));return t}(e),n=new Dx(t,e);n.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=n.text,this.newSel=function(e,t){if(0==e.length)return null;let n=e[0].pos,r=2==e.length?e[1].pos:n;return n<0||r<0?null:n==r?bA.create([bA.cursor(r+t,-1)]):bA.single(n+t,r+t)}(t,this.bounds.from)}else{let t=e.observer.selectionRange,n=i&&i.node==t.focusNode&&i.offset==t.focusOffset||!xy(e.contentDOM,t.focusNode)?s.main.head:e.docView.posFromDOM(t.focusNode,t.focusOffset),r=o&&o.node==t.anchorNode&&o.offset==t.anchorOffset||!xy(e.contentDOM,t.anchorNode)?s.main.anchor:e.docView.posFromDOM(t.anchorNode,t.anchorOffset),a=e.viewport;if((iy.ios||iy.chrome)&&n!=r&&Math.min(n,r)<=s.main.from&&Math.max(n,r)>=s.main.to&&(a.from>0||a.to<e.state.doc.length)){let t=Math.min(n,r),i=Math.max(n,r),o=a.from-t,s=a.to-i;0!=o&&1!=o&&0!=t||0!=s&&-1!=s&&i!=e.state.doc.length||(n=0,r=e.state.doc.length)}if(e.inputState.composing>-1&&s.ranges.length>1)this.newSel=s.replaceRange(bA.range(r,n));else if(e.lineWrapping&&r==n&&(!s.main.empty||s.main.head!=n)&&e.inputState.lastTouchTime>Date.now()-100){let t=e.coordsAtPos(n,-1),r=0;t&&(r=e.inputState.lastTouchY<=t.bottom?-1:1),this.newSel=bA.create([bA.cursor(n,r)])}else this.newSel=bA.single(r,n)}}}function Lx(e,t,n,r){if(e.isComposite()){let i=-1,o=-1,s=-1,a=-1;for(let l=0,c=r,d=r;l<e.children.length;l++){let r=e.children[l],u=c+r.length;if(c<t&&u>n)return Lx(r,t,n,c);if(u>=t&&-1==i&&(i=l,o=c),c>n&&r.dom.parentNode==e.dom){s=l,a=d;break}d=u,c=u+r.breakAfter}return{from:o,to:a<0?r+e.length:a,startDOM:(i?e.children[i-1].dom.nextSibling:null)||e.dom.firstChild,endDOM:s<e.children.length&&s>=0?e.children[s].dom:null}}return e.isText()?{from:r,to:r+e.length,startDOM:e.dom,endDOM:e.dom.nextSibling}:null}function $x(e,t){let n,{newSel:r}=t,{state:i}=e,o=i.selection.main,s=e.inputState.lastKeyTime>Date.now()-100?e.inputState.lastKeyCode:-1;if(t.bounds){let{from:e,to:r}=t.bounds,a=o.from,l=null;(8===s||iy.android&&t.text.length<r-e)&&(a=o.to,l="end");let c,d,u=i.doc.sliceString(e,r,Mx);!o.empty&&o.from>=e&&o.to<=r&&(t.typeOver||u!=t.text)&&u.slice(0,o.from-e)==t.text.slice(0,o.from-e)&&u.slice(o.to-e)==t.text.slice(c=t.text.length-(u.length-(o.to-e)))?n={from:o.from,to:o.to,insert:Yv.of(t.text.slice(o.from-e,c).split(Mx))}:(d=jx(u,t.text,a-e,l))&&(iy.chrome&&13==s&&d.toB==d.from+2&&t.text.slice(d.from,d.toB)==Mx+Mx&&d.toB--,n={from:e+d.from,to:e+d.toA,insert:Yv.of(t.text.slice(d.from,d.toB).split(Mx))})}else r&&(!e.hasFocus&&i.facet(BC)||Vx(r,o))&&(r=null);if(!n&&!r)return!1;if((iy.mac||iy.android)&&n&&n.from==n.to&&n.from==o.head-1&&/^\. ?$/.test(n.insert.toString())&&"off"==e.contentDOM.getAttribute("autocorrect")?(r&&2==n.insert.length&&(r=bA.single(r.main.anchor-1,r.main.head-1)),n={from:n.from,to:n.to,insert:Yv.of([n.insert.toString().replace("."," ")])}):i.doc.lineAt(o.from).to<o.to&&e.docView.lineHasWidget(o.to)&&e.inputState.insertingTextAt>Date.now()-50?n={from:o.from,to:o.to,insert:i.toText(e.inputState.insertingText)}:iy.chrome&&n&&n.from==n.to&&n.from==o.head&&"\n "==n.insert.toString()&&e.lineWrapping&&(r&&(r=bA.single(r.main.anchor-1,r.main.head-1)),n={from:o.from,to:o.to,insert:Yv.of([" "])}),n)return Fx(e,n,r,s);if(r&&!Vx(r,o)){let t=!1,n="select";return e.inputState.lastSelectionTime>Date.now()-50&&("select"==e.inputState.lastSelectionOrigin&&(t=!0),n=e.inputState.lastSelectionOrigin,"select.pointer"==n&&(r=Ox(i.facet($C).map(t=>t(e)),r))),e.dispatch({selection:r,scrollIntoView:t,userEvent:n}),!0}return!1}function Fx(e,t,n,r=-1){if(iy.ios&&e.inputState.flushIOSKey(t))return!0;let i=e.state.selection.main;if(iy.android&&(t.to==i.to&&(t.from==i.from||t.from==i.from-1&&" "==e.state.sliceDoc(t.from,i.from))&&1==t.insert.length&&2==t.insert.lines&&Vy(e.contentDOM,"Enter",13)||(t.from==i.from-1&&t.to==i.to&&0==t.insert.length||8==r&&t.insert.length<t.to-t.from&&t.to>i.head)&&Vy(e.contentDOM,"Backspace",8)||t.from==i.from&&t.to==i.to+1&&0==t.insert.length&&Vy(e.contentDOM,"Delete",46)))return!0;let o,s=t.insert.toString();e.inputState.composing>=0&&e.inputState.composing++;let a=()=>o||(o=function(e,t,n){let r,i=e.state,o=i.selection.main,s=-1;if(t.from==t.to&&t.from<o.from||t.from>o.to){let n=t.from<o.from?-1:1,r=n<0?o.from:o.to,a=Sx(i.facet($C).map(t=>t(e)),r,n);t.from==a&&(s=a)}if(s>-1)r={changes:t,selection:bA.cursor(t.from+t.insert.length,-1)};else if(t.from>=o.from&&t.to<=o.to&&t.to-t.from>=(o.to-o.from)/3&&(!n||n.main.empty&&n.main.from==t.from+t.insert.length)&&e.inputState.composing<0){let n=o.from<t.from?i.sliceDoc(o.from,t.from):"",s=o.to>t.to?i.sliceDoc(t.to,o.to):"";r=i.replaceSelection(e.state.toText(n+t.insert.sliceString(0,void 0,e.state.lineBreak)+s))}else{let s=i.changes(t),a=n&&n.main.to<=s.newLength?n.main:void 0;if(i.selection.ranges.length>1&&(e.inputState.composing>=0||e.inputState.compositionPendingChange)&&t.to<=o.to+10&&t.to>=o.to-10){let l,c=e.state.sliceDoc(t.from,t.to),d=n&&bx(e,n.main.head);if(d){let e=t.insert.length-(t.to-t.from);l={from:d.from,to:d.to-e}}else l=e.state.doc.lineAt(o.head);let u=o.to-t.to;r=i.changeByRange(n=>{if(n.from==o.from&&n.to==o.to)return{changes:s,range:a||n.map(s)};let r=n.to-u,d=r-c.length;if(e.state.sliceDoc(d,r)!=c||r>=l.from&&d<=l.to)return{range:n};let p=i.changes({from:d,to:r,insert:t.insert}),h=n.to-o.to;return{changes:p,range:a?bA.range(Math.max(0,a.anchor+h),Math.max(0,a.head+h)):n.map(p)}})}else r={changes:s,selection:a&&i.selection.replaceRange(a)}}let a="input.type";(e.composing||e.inputState.compositionPendingChange&&e.inputState.compositionEndedAt>Date.now()-50)&&(e.inputState.compositionPendingChange=!1,a+=".compose",e.inputState.compositionFirstChange&&(a+=".start",e.inputState.compositionFirstChange=!1));return i.update(r,{userEvent:a,scrollIntoView:!0})}(e,t,n));return e.state.facet(vC).some(n=>n(e,t.from,t.to,s,a))||e.dispatch(a()),!0}function jx(e,t,n,r){let i=Math.min(e.length,t.length),o=0;for(;o<i&&e.charCodeAt(o)==t.charCodeAt(o);)o++;if(o==i&&e.length==t.length)return null;let s=e.length,a=t.length;for(;s>0&&a>0&&e.charCodeAt(s-1)==t.charCodeAt(a-1);)s--,a--;if("end"==r){n-=s+Math.max(0,o-Math.min(s,a))-o}if(s<o&&e.length<t.length){o-=n<=o&&n>=s?o-n:0,a=o+(a-s),s=o}else if(a<o){o-=n<=o&&n>=a?o-n:0,s=o+(s-a),a=o}return{from:o,toA:s,toB:a}}function Vx(e,t){return t.head==e.main.head&&t.anchor==e.main.anchor}class Wx{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.touchActive=!1,this.lastTouchTime=0,this.lastTouchX=0,this.lastTouchY=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.lastWheelEvent=0,this.pendingIOSKey=void 0,this.lastIOSMomentumScroll=0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.insertingText="",this.insertingTextAt=0,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,iy.safari&&e.contentDOM.addEventListener("input",()=>null),iy.gecko&&function(e){pw.has(e)||(pw.add(e),e.addEventListener("copy",()=>{}),e.addEventListener("cut",()=>{}))}(e.contentDOM.ownerDocument)}handleEvent(e){(function(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n,r=t.target;r!=e.contentDOM;r=r.parentNode)if(!r||11==r.nodeType||(n=YC.get(r))&&n.isWidget()&&!n.isHidden&&n.widget.ignoreEvent(t))return!1;return!0})(this.view,e)&&!this.ignoreDuringComposition(e)&&("keydown"==e.type&&this.keydown(e)||(0!=this.view.updateState?Promise.resolve().then(()=>this.runHandlers(e.type,e)):this.runHandlers(e.type,e)))}runHandlers(e,t){let n=this.handlers[e];if(n){for(let e of n.observers)e(this.view,t);for(let e of n.handlers){if(t.defaultPrevented)break;if(e(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=Qx(e),n=this.handlers,r=this.view.contentDOM;for(let e in t)if("scroll"!=e){let i=!t[e].handlers.length,o=n[e];o&&i!=!o.handlers.length&&(r.removeEventListener(e,this.handleEvent),o=null),o||r.addEventListener(e,this.handleEvent,{passive:i})}for(let e in n)"scroll"==e||t[e]||r.removeEventListener(e,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),9==e.keyCode&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&27!=e.keyCode&&Ux.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),iy.android&&iy.chrome&&!e.synthetic&&(13==e.keyCode||8==e.keyCode))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;if(iy.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&(Hx.some(t=>t.keyCode==e.keyCode)&&!e.ctrlKey||qx.indexOf(e.key)>-1&&e.ctrlKey)){let n={ctrlKey:e.ctrlKey,altKey:e.altKey,metaKey:e.metaKey,shiftKey:e.shiftKey};n.shiftKey&&iy.ios&&!/^(off|none)$/.test(this.view.contentDOM.autocapitalize)&&((t=this.view.win).visualViewport&&t.visualViewport.height*t.visualViewport.scale/t.document.documentElement.clientHeight<.85)&&(n.shiftKey=!1);let r=this.pendingIOSKey={key:e.key,keyCode:e.keyCode,mods:n};return setTimeout(()=>{this.pendingIOSKey==r&&this.flushIOSKey()},50),!0}var t;return 229!=e.keyCode&&this.view.observer.forceFlush(),!1}flushIOSKey(e){let t=this.pendingIOSKey;return!(!t||this.view.observer.pendingRecords().length)&&(!("Enter"==t.key&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString()))&&(this.pendingIOSKey=void 0,Vy(this.view.contentDOM,t.key,t.keyCode,t.mods)))}ignoreDuringComposition(e){return!(!/^key/.test(e.type)||e.synthetic)&&(this.composing>0||!!(iy.safari&&!iy.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100)&&(this.compositionPendingKey=!1,!0))}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function zx(e,t){return(n,r)=>{try{return t.call(e,r,n)}catch(e){_C(n.state,e)}}}function Qx(e){let t=Object.create(null);function n(e){return t[e]||(t[e]={observers:[],handlers:[]})}for(let t of e){let e=t.spec,r=e&&e.plugin.domEventHandlers,i=e&&e.plugin.domEventObservers;if(r)for(let e in r){let i=r[e];i&&n(e).handlers.push(zx(t.value,i))}if(i)for(let e in i){let r=i[e];r&&n(e).observers.push(zx(t.value,r))}}for(let e in Jx)n(e).handlers.push(Jx[e]);for(let e in Gx)n(e).observers.push(Gx[e]);return t}const Hx=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],qx="dthko",Ux=[16,17,18,20,91,92,224,225];function Yx(e){return.7*Math.max(0,e)+8}class Xx{constructor(e,t,n,r){this.view=e,this.startEvent=t,this.style=n,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=Py(e.contentDOM),this.atoms=e.state.facet($C).map(t=>t(e));let i=e.contentDOM.ownerDocument;i.addEventListener("mousemove",this.move=this.move.bind(this)),i.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(db.allowMultipleSelections)&&function(e,t){let n=e.state.facet(pC);return n.length?n[0](t):iy.mac?t.metaKey:t.ctrlKey}(e,t),this.dragging=!(!function(e,t){let{main:n}=e.state.selection;if(n.empty)return!1;let r=Cy(e.root);if(!r||0==r.rangeCount)return!0;let i=r.getRangeAt(0).getClientRects();for(let e=0;e<i.length;e++){let n=i[e];if(n.left<=t.clientX&&n.right>=t.clientX&&n.top<=t.clientY&&n.bottom>=t.clientY)return!0}return!1}(e,t)||1!=sw(t))&&null}start(e){!1===this.dragging&&this.select(e)}move(e){if(0==e.buttons)return this.destroy();if(this.dragging||null==this.dragging&&(t=this.startEvent,n=e,Math.max(Math.abs(t.clientX-n.clientX),Math.abs(t.clientY-n.clientY))<10))return;var t,n;this.select(this.lastEvent=e);let r=0,i=0,o=0,s=0,a=this.view.win.innerWidth,l=this.view.win.innerHeight;this.scrollParents.x&&({left:o,right:a}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:s,bottom:l}=this.scrollParents.y.getBoundingClientRect());let c=zC(this.view);e.clientX-c.left<=o+6?r=-Yx(o-e.clientX):e.clientX+c.right>=a-6&&(r=Yx(e.clientX-a)),e.clientY-c.top<=s+6?i=-Yx(s-e.clientY):e.clientY+c.bottom>=l-6&&(i=Yx(e.clientY-l)),this.setScrollSpeed(r,i)}up(e){null==this.dragging&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),!1===this.dragging&&this.select(this.lastEvent)}select(e){let{view:t}=this,n=Ox(this.atoms,this.style.get(e,this.extend,this.multiple));!this.mustSelect&&n.eq(t.state.selection,!1===this.dragging)||this.view.dispatch({selection:n,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.transactions.some(e=>e.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}const Jx=Object.create(null),Gx=Object.create(null),Kx=iy.ie&&iy.ie_version<15||iy.ios&&iy.webkit_version<604;function Zx(e,t,n){for(let r of e.facet(t))n=r(n,e);return n}function ew(e,t){t=Zx(e.state,bC,t);let n,{state:r}=e,i=1,o=r.toText(t),s=o.lines==r.selection.ranges.length,a=null!=lw&&r.selection.ranges.every(e=>e.empty)&&lw==o.toString();if(a){let e=-1;n=r.changeByRange(n=>{let a=r.doc.lineAt(n.from);if(a.from==e)return{range:n};e=a.from;let l=r.toText((s?o.line(i++).text:t)+r.lineBreak);return{changes:{from:a.from,insert:l},range:bA.cursor(n.from+l.length,-1)}})}else n=s?r.changeByRange(e=>{let t=o.line(i++);return{changes:{from:e.from,to:e.to,insert:t.text},range:bA.cursor(e.from+t.length,-1)}}):r.replaceSelection(o);e.dispatch(n,{userEvent:"input.paste",scrollIntoView:!0})}function tw(e,t,n,r){if(1==r)return bA.cursor(t,n);if(2==r)return function(e,t,n=1){let r=e.charCategorizer(t),i=e.doc.lineAt(t),o=t-i.from;if(0==i.length)return bA.cursor(t);0==o?n=1:o==i.length&&(n=-1);let s=o,a=o;n<0?s=iA(i.text,o,!1):a=iA(i.text,o);let l=r(i.text.slice(s,a));for(;s>0;){let e=iA(i.text,s,!1);if(r(i.text.slice(e,s))!=l)break;s=e}for(;a<i.length;){let e=iA(i.text,a);if(r(i.text.slice(a,e))!=l)break;a=e}return bA.undirectionalRange(s+i.from,a+i.from)}(e.state,t,n);{let r=e.docView.lineAt(t,n),i=e.state.doc.lineAt(r?r.posAtEnd:t),o=r?r.posAtStart:i.from,s=r?r.posAtEnd:i.to;return s<e.state.doc.length&&s==i.to&&s++,bA.undirectionalRange(o,s)}}Gx.scroll=e=>{let t=e.inputState;t.lastScrollTop=e.scrollDOM.scrollTop,t.lastScrollLeft=e.scrollDOM.scrollLeft,iy.ios&&!t.touchActive&&(t.lastIOSMomentumScroll=Date.now())},Gx.wheel=Gx.mousewheel=e=>{e.inputState.lastWheelEvent=Date.now()},Jx.keydown=(e,t)=>(e.inputState.setSelectionOrigin("select"),27==t.keyCode&&0!=e.inputState.tabFocusMode&&(e.inputState.tabFocusMode=Date.now()+2e3),!1),Gx.touchstart=(e,t)=>{let n=e.inputState,r=t.targetTouches[0];n.touchActive=!0,n.lastTouchTime=Date.now(),r&&(n.lastTouchX=r.clientX,n.lastTouchY=r.clientY),n.setSelectionOrigin("select.pointer")},Gx.touchmove=e=>{e.inputState.setSelectionOrigin("select.pointer")},Gx.touchend=(e,t)=>{e.inputState.touchActive=!1},Jx.mousedown=(e,t)=>{if(e.observer.flush(),e.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let r of e.state.facet(fC))if(n=r(e,t),n)break;if(n||0!=t.button||(n=function(e,t){let n=e.posAndSideAtCoords({x:t.clientX,y:t.clientY},!1),r=sw(t),i=e.state.selection;return{update(e){e.docChanged&&(n.pos=e.changes.mapPos(n.pos),i=i.map(e.changes))},get(t,o,s){let a,l=e.posAndSideAtCoords({x:t.clientX,y:t.clientY},!1),c=tw(e,l.pos,l.assoc,r);if(n.pos!=l.pos&&!o){let t=tw(e,n.pos,n.assoc,r),i=Math.min(t.from,c.from),o=Math.max(t.to,c.to);c=i<c.from?bA.range(i,o,c.assoc):bA.range(o,i,c.assoc)}return o?i.replaceRange(i.main.extend(c.from,c.to,c.assoc)):s&&1==r&&i.ranges.length>1&&(a=function(e,t){for(let n=0;n<e.ranges.length;n++){let{from:r,to:i}=e.ranges[n];if(r<=t&&i>=t)return bA.create(e.ranges.slice(0,n).concat(e.ranges.slice(n+1)),e.mainIndex==n?0:e.mainIndex-(e.mainIndex>n?1:0))}return null}(i,l.pos))?a:s?i.addRange(c):bA.create([c])}}}(e,t)),n){let r=!e.hasFocus;e.inputState.startMouseSelection(new Xx(e,t,n,r)),r&&e.observer.ignore(()=>{Fy(e.contentDOM);let t=e.root.activeElement;t&&!t.contains(e.contentDOM)&&t.blur()});let i=e.inputState.mouseSelection;if(i)return i.start(t),!1===i.dragging}else e.inputState.setSelectionOrigin("select.pointer");return!1};const nw=iy.ie&&iy.ie_version<=11;let rw=null,iw=0,ow=0;function sw(e){if(!nw)return e.detail;let t=rw,n=ow;return rw=e,ow=Date.now(),iw=!t||n>Date.now()-400&&Math.abs(t.clientX-e.clientX)<2&&Math.abs(t.clientY-e.clientY)<2?(iw+1)%3:1}function aw(e,t,n,r){if(!(n=Zx(e.state,bC,n)))return;let i=e.posAtCoords({x:t.clientX,y:t.clientY},!1),{draggedContent:o}=e.inputState,s=r&&o&&function(e,t){let n=e.state.facet(hC);return n.length?n[0](t):iy.mac?!t.altKey:!t.ctrlKey}(e,t)?{from:o.from,to:o.to}:null,a={from:i,insert:n},l=e.state.changes(s?[s,a]:a);e.focus(),e.dispatch({changes:l,selection:{anchor:l.mapPos(i,-1),head:l.mapPos(i,1)},userEvent:s?"move.drop":"input.drop"}),e.inputState.draggedContent=null}Jx.dragstart=(e,t)=>{let{selection:{main:n}}=e.state;if(t.target.draggable){let r=e.docView.tile.nearest(t.target);if(r&&r.isWidget()){let e=r.posAtStart,t=e+r.length;(e>=n.to||t<=n.from)&&(n=bA.undirectionalRange(e,t))}}let{inputState:r}=e;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=n,t.dataTransfer&&(t.dataTransfer.setData("Text",Zx(e.state,yC,e.state.sliceDoc(n.from,n.to))),t.dataTransfer.effectAllowed="copyMove"),!1},Jx.dragend=e=>(e.inputState.draggedContent=null,!1),Jx.drop=(e,t)=>{if(!t.dataTransfer)return!1;if(e.state.readOnly)return!0;let n=t.dataTransfer.files;if(n&&n.length){let r=Array(n.length),i=0,o=()=>{++i==n.length&&aw(e,t,r.filter(e=>null!=e).join(e.state.lineBreak),!1)};for(let e=0;e<n.length;e++){let t=new FileReader;t.onerror=o,t.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(t.result)||(r[e]=t.result),o()},t.readAsText(n[e])}return!0}{let n=t.dataTransfer.getData("Text");if(n)return aw(e,t,n,!0),!0}return!1},Jx.paste=(e,t)=>{if(e.state.readOnly)return!0;e.observer.flush();let n=Kx?null:t.clipboardData;return n?(ew(e,n.getData("text/plain")||n.getData("text/uri-list")),!0):(function(e){let t=e.dom.parentNode;if(!t)return;let n=t.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{e.focus(),n.remove(),ew(e,n.value)},50)}(e),!1)};let lw=null;Jx.copy=Jx.cut=(e,t)=>{if(!wy(e.contentDOM,e.observer.selectionRange))return!1;let{text:n,ranges:r,linewise:i}=function(e){let t=[],n=[],r=!1;for(let r of e.selection.ranges)r.empty||(t.push(e.sliceDoc(r.from,r.to)),n.push(r));if(!t.length){let i=-1;for(let{from:r}of e.selection.ranges){let o=e.doc.lineAt(r);o.number>i&&(t.push(o.text),n.push({from:o.from,to:Math.min(e.doc.length,o.to+1)})),i=o.number}r=!0}return{text:Zx(e,yC,t.join(e.lineBreak)),ranges:n,linewise:r}}(e.state);if(!n&&!i)return!1;lw=i?n:null,"cut"!=t.type||e.state.readOnly||e.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let o=Kx?null:t.clipboardData;return o?(o.clearData(),o.setData("text/plain",n),!0):(function(e,t){let n=e.dom.parentNode;if(!n)return;let r=n.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=t,r.focus(),r.selectionEnd=t.length,r.selectionStart=0,setTimeout(()=>{r.remove(),e.focus()},50)}(e,n),!1)};const cw=XA.define();function dw(e,t){let n=[];for(let r of e.facet(AC)){let i=r(e,t);i&&n.push(i)}return n.length?e.update({effects:n,annotations:cw.of(!0)}):null}function uw(e){setTimeout(()=>{let t=e.hasFocus;if(t!=e.inputState.notifiedFocused){let n=dw(e.state,t);n?e.dispatch(n):e.update([])}},10)}Gx.focus=e=>{e.inputState.lastFocusTime=Date.now(),e.scrollDOM.scrollTop||!e.inputState.lastScrollTop&&!e.inputState.lastScrollLeft||(e.scrollDOM.scrollTop=e.inputState.lastScrollTop,e.scrollDOM.scrollLeft=e.inputState.lastScrollLeft),uw(e)},Gx.blur=e=>{e.observer.clearSelectionRange(),uw(e)},Gx.compositionstart=Gx.compositionupdate=(e,t)=>{if(!e.observer.editContext&&(null==e.inputState.compositionFirstChange&&(e.inputState.compositionFirstChange=!0),e.inputState.composing<0)){let{main:t}=e.state.selection;t.empty||e.lineBlockAt(t.from).from==e.lineBlockAt(t.to).from||e.state.readOnly||e.dispatch({changes:e.state.selection.ranges.filter(e=>!e.empty).map(e=>({from:e.from,to:e.to})),userEvent:"input"}),e.inputState.composing=0}},Gx.compositionend=e=>{e.observer.editContext||(e.inputState.composing=-1,e.inputState.compositionEndedAt=Date.now(),e.inputState.compositionPendingKey=!0,e.inputState.compositionPendingChange=e.observer.pendingRecords().length>0,e.inputState.compositionFirstChange=null,iy.chrome&&iy.android?e.observer.flushSoon():e.inputState.compositionPendingChange?Promise.resolve().then(()=>e.observer.flush()):setTimeout(()=>{e.inputState.composing<0&&e.docView.hasComposition&&e.update([])},50))},Gx.contextmenu=e=>{e.inputState.lastContextMenu=Date.now()},Jx.beforeinput=(e,t)=>{var n,r;if("insertText"!=t.inputType&&"insertCompositionText"!=t.inputType||(e.inputState.insertingText=t.data,e.inputState.insertingTextAt=Date.now()),"insertReplacementText"==t.inputType&&e.observer.editContext){let r=null===(n=t.dataTransfer)||void 0===n?void 0:n.getData("text/plain"),i=t.getTargetRanges();if(r&&i.length){let t=i[0],n=e.posAtDOM(t.startContainer,t.startOffset),o=e.posAtDOM(t.endContainer,t.endOffset);return Fx(e,{from:n,to:o,insert:e.state.toText(r)},null),!0}}let i;if(iy.chrome&&iy.android&&(i=Hx.find(e=>e.inputType==t.inputType))&&(e.observer.delayAndroidKey(i.key,i.keyCode),"Backspace"==i.key||"Delete"==i.key)){let t=(null===(r=window.visualViewport)||void 0===r?void 0:r.height)||0;setTimeout(()=>{var n;((null===(n=window.visualViewport)||void 0===n?void 0:n.height)||0)>t+10&&e.hasFocus&&(e.contentDOM.blur(),e.focus())},100)}return iy.ios&&"deleteContentForward"==t.inputType&&e.observer.flushSoon(),iy.safari&&"insertText"==t.inputType&&e.inputState.composing>=0&&setTimeout(()=>Gx.compositionend(e,t),20),!1};const pw=new Set;const hw=["pre-wrap","normal","pre-line","break-spaces"];let fw=!1;function gw(){fw=!1}class mw{constructor(e){this.lineWrapping=e,this.doc=Yv.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let n=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(n+=Math.max(0,Math.ceil((t-e-n*this.lineLength*.5)/this.lineLength))),this.lineHeight*n}heightForLine(e){if(!this.lineWrapping)return this.lineHeight;return(1+Math.max(0,Math.ceil((e-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return hw.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let n=0;n<e.length;n++){let r=e[n];r<0?n++:this.heightSamples[Math.floor(10*r)]||(t=!0,this.heightSamples[Math.floor(10*r)]=!0)}return t}refresh(e,t,n,r,i,o){let s=hw.indexOf(e)>-1,a=Math.abs(t-this.lineHeight)>.3||this.lineWrapping!=s;if(this.lineWrapping=s,this.lineHeight=t,this.charWidth=n,this.textHeight=r,this.lineLength=i,a){this.heightSamples={};for(let e=0;e<o.length;e++){let t=o[e];t<0?e++:this.heightSamples[Math.floor(10*t)]=!0}}return a}}class vw{constructor(e,t){this.from=e,this.heights=t,this.index=0}get more(){return this.index<this.heights.length}}class Aw{constructor(e,t,n,r,i){this.from=e,this.length=t,this.top=n,this.height=r,this._content=i}get type(){return"number"==typeof this._content?uy.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof gy?this._content.widget:null}get widgetLineBreaks(){return"number"==typeof this._content?this._content:0}join(e){let t=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(e._content)?e._content:[e]);return new Aw(this.from,this.length+e.length,this.top,this.height+e.height,t)}}var bw=function(e){return e[e.ByPos=0]="ByPos",e[e.ByHeight=1]="ByHeight",e[e.ByPosNoHeight=2]="ByPosNoHeight",e}(bw||(bw={}));const yw=.001;class Cw{constructor(e,t,n=2){this.length=e,this.height=t,this.flags=n}get outdated(){return(2&this.flags)>0}set outdated(e){this.flags=(e?2:0)|-3&this.flags}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>yw&&(fw=!0),this.height=e)}replace(e,t,n){return Cw.of(n)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,n,r){let i=this,o=n.doc;for(let s=r.length-1;s>=0;s--){let{fromA:a,toA:l,fromB:c,toB:d}=r[s],u=i.lineAt(a,bw.ByPosNoHeight,n.setDoc(t),0,0),p=u.to>=l?u:i.lineAt(l,bw.ByPosNoHeight,n,0,0);for(d+=p.to-l,l=p.to;s>0&&u.from<=r[s-1].toA;)a=r[s-1].fromA,c=r[s-1].fromB,s--,a<u.from&&(u=i.lineAt(a,bw.ByPosNoHeight,n,0,0));c+=u.from-a,a=u.from;let h=Ew.build(n.setDoc(o),e,c,d);i=xw(i,i.replace(a,l,h))}return i.updateHeight(n,0)}static empty(){return new Sw(0,0,0)}static of(e){if(1==e.length)return e[0];let t=0,n=e.length,r=0,i=0;for(;;)if(t==n)if(r>2*i){let i=e[t-1];i.break?e.splice(--t,1,i.left,null,i.right):e.splice(--t,1,i.left,i.right),n+=1+i.break,r-=i.size}else{if(!(i>2*r))break;{let t=e[n];t.break?e.splice(n,1,t.left,null,t.right):e.splice(n,1,t.left,t.right),n+=2+t.break,i-=t.size}}else if(r<i){let n=e[t++];n&&(r+=n.size)}else{let t=e[--n];t&&(i+=t.size)}let o=!1;return null==e[t-1]?(o=!0,t--):null==e[t]&&(o=!0,n++),new _w(Cw.of(e.slice(0,t)),o,Cw.of(e.slice(n)))}}function xw(e,t){return e==t?e:(e.constructor!=t.constructor&&(fw=!0),t)}Cw.prototype.size=1;const ww=py.replace({});class kw extends Cw{constructor(e,t,n){super(e,t),this.deco=n,this.spaceAbove=0}mainBlock(e,t){return new Aw(t,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.deco||0)}blockAt(e,t,n,r){return this.spaceAbove&&e<n+this.spaceAbove?new Aw(r,0,n,this.spaceAbove,ww):this.mainBlock(n,r)}lineAt(e,t,n,r,i){let o=this.mainBlock(r,i);return this.spaceAbove?this.blockAt(0,n,r,i).join(o):o}forEachLine(e,t,n,r,i,o){e<=i+this.length&&t>=i&&o(this.lineAt(0,bw.ByPos,n,r,i))}setMeasuredHeight(e){let t=e.heights[e.index++];t<0?(this.spaceAbove=-t,t=e.heights[e.index++]):this.spaceAbove=0,this.setHeight(t)}updateHeight(e,t=0,n=!1,r){return r&&r.from<=t&&r.more&&this.setMeasuredHeight(r),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Sw extends kw{constructor(e,t,n){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0,this.spaceAbove=n}mainBlock(e,t){return new Aw(t,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.breaks)}replace(e,t,n){let r=n[0];return 1==n.length&&(r instanceof Sw||r instanceof Ow&&4&r.flags)&&Math.abs(this.length-r.length)<10?(r instanceof Ow?r=new Sw(r.length,this.height,this.spaceAbove):r.height=this.height,this.outdated||(r.outdated=!1),r):Cw.of(n)}updateHeight(e,t=0,n=!1,r){return r&&r.from<=t&&r.more?this.setMeasuredHeight(r):(n||this.outdated)&&(this.spaceAbove=0,this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight)),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class Ow extends Cw{constructor(e){super(e,0)}heightMetrics(e,t){let n,r=e.doc.lineAt(t).number,i=e.doc.lineAt(t+this.length).number,o=i-r+1,s=0;if(e.lineWrapping){let t=Math.min(this.height,e.lineHeight*o);n=t/o,this.length>o+1&&(s=(this.height-t)/(this.length-o-1))}else n=this.height/o;return{firstLine:r,lastLine:i,perLine:n,perChar:s}}blockAt(e,t,n,r){let{firstLine:i,lastLine:o,perLine:s,perChar:a}=this.heightMetrics(t,r);if(t.lineWrapping){let i=r+(e<t.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-n)/this.height))*this.length)),o=t.doc.lineAt(i),l=s+o.length*a,c=Math.max(n,e-l/2);return new Aw(o.from,o.length,c,l,0)}{let r=Math.max(0,Math.min(o-i,Math.floor((e-n)/s))),{from:a,length:l}=t.doc.line(i+r);return new Aw(a,l,n+s*r,s,0)}}lineAt(e,t,n,r,i){if(t==bw.ByHeight)return this.blockAt(e,n,r,i);if(t==bw.ByPosNoHeight){let{from:t,to:r}=n.doc.lineAt(e);return new Aw(t,r-t,0,0,0)}let{firstLine:o,perLine:s,perChar:a}=this.heightMetrics(n,i),l=n.doc.lineAt(e),c=s+l.length*a,d=l.number-o,u=r+s*d+a*(l.from-i-d);return new Aw(l.from,l.length,Math.max(r,Math.min(u,r+this.height-c)),c,0)}forEachLine(e,t,n,r,i,o){e=Math.max(e,i),t=Math.min(t,i+this.length);let{firstLine:s,perLine:a,perChar:l}=this.heightMetrics(n,i);for(let c=e,d=r;c<=t;){let t=n.doc.lineAt(c);if(c==e){let n=t.number-s;d+=a*n+l*(e-i-n)}let r=a+l*t.length;o(new Aw(t.from,t.length,d,r,0)),d+=r,c=t.to+1}}replace(e,t,n){let r=this.length-t;if(r>0){let e=n[n.length-1];e instanceof Ow?n[n.length-1]=new Ow(e.length+r):n.push(null,new Ow(r-1))}if(e>0){let t=n[0];t instanceof Ow?n[0]=new Ow(e+t.length):n.unshift(new Ow(e-1),null)}return Cw.of(n)}decomposeLeft(e,t){t.push(new Ow(e-1),null)}decomposeRight(e,t){t.push(null,new Ow(this.length-e-1))}updateHeight(e,t=0,n=!1,r){let i=t+this.length;if(r&&r.from<=t+this.length&&r.more){let n=[],o=Math.max(t,r.from),s=-1;for(r.from>t&&n.push(new Ow(r.from-t-1).updateHeight(e,t));o<=i&&r.more;){let t=e.doc.lineAt(o).length;n.length&&n.push(null);let i=r.heights[r.index++],a=0;i<0&&(a=-i,i=r.heights[r.index++]),-1==s?s=i:Math.abs(i-s)>=yw&&(s=-2);let l=new Sw(t,i,a);l.outdated=!1,n.push(l),o+=t+1}o<=i&&n.push(null,new Ow(i-o).updateHeight(e,o));let a=Cw.of(n);return(s<0||Math.abs(a.height-this.height)>=yw||Math.abs(s-this.heightMetrics(e,t).perLine)>=yw)&&(fw=!0),xw(this,a)}return(n||this.outdated)&&(this.setHeight(e.heightForGap(t,t+this.length)),this.outdated=!1),this}toString(){return`gap(${this.length})`}}class _w extends Cw{constructor(e,t,n){super(e.length+(t?1:0)+n.length,e.height+n.height,(t?1:0)|(e.outdated||n.outdated?2:0)),this.left=e,this.right=n,this.size=e.size+n.size}get break(){return 1&this.flags}blockAt(e,t,n,r){let i=n+this.left.height;return e<i?this.left.blockAt(e,t,n,r):this.right.blockAt(e,t,i,r+this.left.length+this.break)}lineAt(e,t,n,r,i){let o=r+this.left.height,s=i+this.left.length+this.break,a=t==bw.ByHeight?e<o:e<s,l=a?this.left.lineAt(e,t,n,r,i):this.right.lineAt(e,t,n,o,s);if(this.break||(a?l.to<s:l.from>s))return l;let c=t==bw.ByPosNoHeight?bw.ByPosNoHeight:bw.ByPos;return a?l.join(this.right.lineAt(s,c,n,o,s)):this.left.lineAt(s,c,n,r,i).join(l)}forEachLine(e,t,n,r,i,o){let s=r+this.left.height,a=i+this.left.length+this.break;if(this.break)e<a&&this.left.forEachLine(e,t,n,r,i,o),t>=a&&this.right.forEachLine(e,t,n,s,a,o);else{let l=this.lineAt(a,bw.ByPos,n,r,i);e<l.from&&this.left.forEachLine(e,Math.min(t,l.from-1),n,r,i,o),l.to>=e&&l.from<=t&&o(l),t>l.to&&this.right.forEachLine(Math.max(e,l.to+1),t,n,s,a,o)}}replace(e,t,n){let r=this.left.length+this.break;if(t<r)return this.balanced(this.left.replace(e,t,n),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-r,t-r,n));let i=[];e>0&&this.decomposeLeft(e,i);let o=i.length;for(let e of n)i.push(e);if(e>0&&Bw(i,o-1),t<this.length){let e=i.length;this.decomposeRight(t,i),Bw(i,e)}return Cw.of(i)}decomposeLeft(e,t){let n=this.left.length;if(e<=n)return this.left.decomposeLeft(e,t);t.push(this.left),this.break&&(n++,e>=n&&t.push(null)),e>n&&this.right.decomposeLeft(e-n,t)}decomposeRight(e,t){let n=this.left.length,r=n+this.break;if(e>=r)return this.right.decomposeRight(e-r,t);e<n&&this.left.decomposeRight(e,t),this.break&&e<r&&t.push(null),t.push(this.right)}balanced(e,t){return e.size>2*t.size||t.size>2*e.size?Cw.of(this.break?[e,null,t]:[e,t]):(this.left=xw(this.left,e),this.right=xw(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,n=!1,r){let{left:i,right:o}=this,s=t+i.length+this.break,a=null;return r&&r.from<=t+i.length&&r.more?a=i=i.updateHeight(e,t,n,r):i.updateHeight(e,t,n),r&&r.from<=s+o.length&&r.more?a=o=o.updateHeight(e,s,n,r):o.updateHeight(e,s,n),a?this.balanced(i,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function Bw(e,t){let n,r;null==e[t]&&(n=e[t-1])instanceof Ow&&(r=e[t+1])instanceof Ow&&e.splice(t-1,3,new Ow(n.length+1+r.length))}class Ew{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let e=Math.min(t,this.lineEnd),n=this.nodes[this.nodes.length-1];n instanceof Sw?n.length+=e-this.pos:(e>this.pos||!this.isCovered)&&this.nodes.push(new Sw(e-this.pos,-1,0)),this.writtenTo=e,t>e&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,n){if(e<t||n.heightRelevant){let r=n.widget?n.widget.estimatedHeight:0,i=n.widget?n.widget.lineBreaks:0;r<0&&(r=this.oracle.lineHeight);let o=t-e;n.block?this.addBlock(new kw(o,r,n)):(o||i||r>=5)&&this.addLineDeco(r,i,o)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenTo<e&&((this.writtenTo<e-1||null==this.nodes[this.nodes.length-1])&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new Sw(this.pos-e,-1,0)),this.writtenTo=this.pos}blankContent(e,t){let n=new Ow(t-e);return this.oracle.doc.lineAt(e).to==t&&(n.flags|=4),n}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Sw)return e;let t=new Sw(0,-1,0);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,n){let r=this.ensureLine();r.length+=n,r.collapsed+=n,r.widgetHeight=Math.max(r.widgetHeight,e),r.breaks+=t,this.writtenTo=this.pos=this.pos+n}finish(e){let t=0==this.nodes.length?null:this.nodes[this.nodes.length-1];!(this.lineStart>-1)||t instanceof Sw||this.isCovered?(this.writtenTo<this.pos||null==t)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos)):this.nodes.push(new Sw(0,-1,0));let n=e;for(let e of this.nodes)e instanceof Sw&&e.updateHeight(this.oracle,n),n+=e?e.length:1;return this.nodes}static build(e,t,n,r){let i=new Ew(n,e);return vb.spans(t,n,r,i,0),i.finish(n)}}class Tw{constructor(){this.changes=[]}compareRange(){}comparePoint(e,t,n,r){(e<t||n&&n.heightRelevant||r&&r.heightRelevant)&&vy(e,t,this.changes,5)}}function Mw(e,t){let n=e.getBoundingClientRect(),r=e.ownerDocument,i=r.defaultView||window,o=Math.max(0,n.left),s=Math.min(i.innerWidth,n.right),a=Math.max(0,n.top),l=Math.min(i.innerHeight,n.bottom);for(let t=e.parentNode;t&&t!=r.body;)if(by(t)){let n=window.getComputedStyle(t);if((t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth)&&"visible"!=n.overflow){let n=t.getBoundingClientRect();o=Math.max(o,n.left),s=Math.min(s,n.right),a=Math.max(a,n.top),l=Math.min(t==e.parentNode?i.innerHeight:l,n.bottom)}t="absolute"==n.position||"fixed"==n.position?t.offsetParent:t.parentNode}else{if(11!=t.nodeType)break;t=t.host}return{left:o-n.left,right:Math.max(o,s)-n.left,top:a-(n.top+t),bottom:Math.max(a,l)-(n.top+t)}}function Dw(e,t){let n=e.getBoundingClientRect();return{left:0,right:n.right-n.left,top:t,bottom:n.bottom-(n.top+t)}}class Pw{constructor(e,t,n,r){this.from=e,this.to=t,this.size=n,this.displaySize=r}static same(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r.from!=i.from||r.to!=i.to||r.size!=i.size)return!1}return!0}draw(e,t){return py.replace({widget:new Rw(this.displaySize*(t?e.scaleY:e.scaleX),t)}).range(this.from,this.to)}}class Rw extends dy{constructor(e,t){super(),this.size=e,this.vertical=t}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}}class Iw{constructor(e,t){this.view=e,this.state=t,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scaleX=1,this.scaleY=1,this.scrollOffset=0,this.scrolledToBottom=!1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=Fw,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=qy.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let n=t.facet(RC).some(e=>"function"!=typeof e&&"cm-lineWrapping"==e.class);this.heightOracle=new mw(n),this.stateDeco=jw(t),this.heightMap=Cw.empty().applyChanges(this.stateDeco,Yv.empty,this.heightOracle.setDoc(t.doc),[new HC(0,0,0,t.doc.length)]);for(let e=0;e<2&&(this.viewport=this.getViewport(0,null),this.updateForViewport());e++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=py.set(this.lineGaps.map(e=>e.draw(this,!1))),this.scrollParent=e.scrollDOM,this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let n=0;n<=1;n++){let r=n?t.head:t.anchor;if(!e.some(({from:e,to:t})=>r>=e&&r<=t)){let{from:t,to:n}=this.lineBlockAt(r);e.push(new Nw(t,n))}}return this.viewports=e.sort((e,t)=>e.from-t.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?Fw:Vw.get(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(Ww(e,this.scaler))})}update(e,t=null){this.state=e.state;let n=this.stateDeco;this.stateDeco=jw(this.state);let r=e.changedRanges,i=HC.extendWithRanges(r,function(e,t,n){let r=new Tw;return vb.compare(e,t,n,r,0),r.changes}(n,this.stateDeco,e?e.changes:uA.empty(this.state.doc.length))),o=this.heightMap.height,s=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollOffset);gw(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),i),(this.heightMap.height!=o||fw)&&(e.flags|=2),s?(this.scrollAnchorPos=e.changes.mapPos(s.from,-1),this.scrollAnchorHeight=s.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=o);let a=i.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.head<a.from||t.range.head>a.to)||!this.viewportIsAppropriate(a))&&(a=this.getViewport(0,t));let l=a.from!=this.viewport.from||a.to!=this.viewport.to;this.viewport=a,e.flags|=this.updateForViewport(),(l||!e.changes.empty||2&e.flags)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&(e.selectionSet||e.focusChanged)&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(xC)&&(this.mustEnforceCursorAssoc=!0)}measure(){let{view:e}=this,t=e.contentDOM,n=window.getComputedStyle(t),r=this.heightOracle,i=n.whiteSpace;this.defaultTextDirection="rtl"==n.direction?qy.RTL:qy.LTR;let o=this.heightOracle.mustRefreshForWrapping(i)||"refresh"===this.mustMeasureContent,s=t.getBoundingClientRect(),a=o||this.mustMeasureContent||this.contentDOMHeight!=s.height;this.contentDOMHeight=s.height,this.mustMeasureContent=!1;let l=0,c=0;if(s.width&&s.height){let{scaleX:e,scaleY:n}=Dy(t,s);(e>.005&&Math.abs(this.scaleX-e)>.005||n>.005&&Math.abs(this.scaleY-n)>.005)&&(this.scaleX=e,this.scaleY=n,l|=16,o=a=!0)}let d=(parseInt(n.paddingTop)||0)*this.scaleY,u=(parseInt(n.paddingBottom)||0)*this.scaleY;this.paddingTop==d&&this.paddingBottom==u||(this.paddingTop=d,this.paddingBottom=u,l|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(r.lineWrapping&&(a=!0),this.editorWidth=e.scrollDOM.clientWidth,l|=16);let p=Py(this.view.contentDOM,!1).y;p!=this.scrollParent&&(this.scrollParent=p,this.scrollAnchorHeight=-1,this.scrollOffset=0);let h=this.getScrollOffset();this.scrollOffset!=h&&(this.scrollAnchorHeight=-1,this.scrollOffset=h),this.scrolledToBottom=Wy(this.scrollParent||e.win);let f=(this.printing?Dw:Mw)(t,this.paddingTop),g=f.top-this.pixelViewport.top,m=f.bottom-this.pixelViewport.bottom;this.pixelViewport=f;let v=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(v!=this.inView&&(this.inView=v,v&&(a=!0)),!this.inView&&!this.scrollTarget&&!function(e){let t=e.getBoundingClientRect(),n=e.ownerDocument.defaultView||window;return t.left<n.innerWidth&&t.right>0&&t.top<n.innerHeight&&t.bottom>0}(e.dom))return 0;let A=s.width;if(this.contentDOMWidth==A&&this.editorHeight==e.scrollDOM.clientHeight||(this.contentDOMWidth=s.width,this.editorHeight=e.scrollDOM.clientHeight,l|=16),a){let t=e.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(t)&&(o=!0),o||r.lineWrapping&&Math.abs(A-this.contentDOMWidth)>r.charWidth){let{lineHeight:n,charWidth:s,textHeight:a}=e.docView.measureTextSize();o=n>0&&r.refresh(i,n,s,a,Math.max(5,A/s),t),o&&(e.docView.minWidth=0,l|=16)}g>0&&m>0?c=Math.max(g,m):g<0&&m<0&&(c=Math.min(g,m)),gw();for(let n of this.viewports){let i=n.from==this.viewport.from?t:e.docView.measureVisibleLineHeights(n);this.heightMap=(o?Cw.empty().applyChanges(this.stateDeco,Yv.empty,this.heightOracle,[new HC(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(r,0,o,new vw(n.from,i))}fw&&(l|=2)}let b=!this.viewportIsAppropriate(this.viewport,c)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return b&&(2&l&&(l|=this.updateScaler()),this.viewport=this.getViewport(c,this.scrollTarget),l|=this.updateForViewport()),(2&l||b)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps,e)),l|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),l}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let n=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),r=this.heightMap,i=this.heightOracle,{visibleTop:o,visibleBottom:s}=this,a=new Nw(r.lineAt(o-1e3*n,bw.ByHeight,i,0,0).from,r.lineAt(s+1e3*(1-n),bw.ByHeight,i,0,0).to);if(t){let{head:e}=t.range;if(e<a.from||e>a.to){let n,o=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),s=r.lineAt(e,bw.ByPos,i,0,0);n="center"==t.y?(s.top+s.bottom)/2-o/2:"start"==t.y||"nearest"==t.y&&e<a.from?s.top:s.bottom-o,a=new Nw(r.lineAt(n-500,bw.ByHeight,i,0,0).from,r.lineAt(n+o+500,bw.ByHeight,i,0,0).to)}}return a}mapViewport(e,t){let n=t.mapPos(e.from,-1),r=t.mapPos(e.to,1);return new Nw(this.heightMap.lineAt(n,bw.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(r,bw.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:t},n=0){if(!this.inView)return!0;let{top:r}=this.heightMap.lineAt(e,bw.ByPos,this.heightOracle,0,0),{bottom:i}=this.heightMap.lineAt(t,bw.ByPos,this.heightOracle,0,0),{visibleTop:o,visibleBottom:s}=this;return(0==e||r<=o-Math.max(10,Math.min(-n,250)))&&(t==this.state.doc.length||i>=s+Math.max(10,Math.min(n,250)))&&r>o-2e3&&i<s+2e3}mapLineGaps(e,t){if(!e.length||t.empty)return e;let n=[];for(let r of e)t.touchesRange(r.from,r.to)||n.push(new Pw(t.mapPos(r.from),t.mapPos(r.to),r.size,r.displaySize));return n}ensureLineGaps(e,t){let n=this.heightOracle.lineWrapping,r=n?1e4:2e3,i=r>>1,o=r<<1;if(this.defaultTextDirection!=qy.LTR&&!n)return[];let s=[],a=(r,o,l,c)=>{if(o-r<i)return;let d=this.state.selection.main,u=[d.from];d.empty||u.push(d.to);for(let e of u)if(e>r&&e<o)return a(r,e-10,l,c),void a(e+10,o,l,c);let p=function(e,t){for(let n of e)if(t(n))return n;return}(e,e=>e.from>=l.from&&e.to<=l.to&&Math.abs(e.from-r)<i&&Math.abs(e.to-o)<i&&!u.some(t=>e.from<t&&e.to>t));if(!p){if(o<l.to&&t&&n&&t.visibleRanges.some(e=>e.from<=o&&e.to>=o)){let e=t.moveToLineBoundary(bA.cursor(o),!1,!0).head;e>r&&(o=e)}let e=this.gapSize(l,r,o,c);p=new Pw(r,o,e,n||e<2e6?e:2e6)}s.push(p)},l=t=>{if(t.length<o||t.type!=uy.Text)return;let i=function(e,t,n){let r=[],i=e,o=0;vb.spans(n,e,t,{span(){},point(e,t){e>i&&(r.push({from:i,to:e}),o+=e-i),i=t}},20),i<t&&(r.push({from:i,to:t}),o+=t-i);return{total:o,ranges:r}}(t.from,t.to,this.stateDeco);if(i.total<o)return;let s,l,c=this.scrollTarget?this.scrollTarget.range.head:null;if(n){let e,n,o=r/this.heightOracle.lineLength*this.heightOracle.lineHeight;if(null!=c){let r=$w(i,c),s=((this.visibleBottom-this.visibleTop)/2+o)/t.height;e=r-s,n=r+s}else e=(this.visibleTop-t.top-o)/t.height,n=(this.visibleBottom-t.top+o)/t.height;s=Lw(i,e),l=Lw(i,n)}else{let n=i.total*this.heightOracle.charWidth,o=r*this.heightOracle.charWidth,a=0;if(n>2e6)for(let n of e)n.from>=t.from&&n.from<t.to&&n.size!=n.displaySize&&n.from*this.heightOracle.charWidth+a<this.pixelViewport.left&&(a=n.size-n.displaySize);let d,u,p=this.pixelViewport.left+a,h=this.pixelViewport.right+a;if(null!=c){let e=$w(i,c),t=((h-p)/2+o)/n;d=e-t,u=e+t}else d=(p-o)/n,u=(h+o)/n;s=Lw(i,d),l=Lw(i,u)}s>t.from&&a(t.from,s,t,i),l<t.to&&a(l,t.to,t,i)};for(let e of this.viewportLines)Array.isArray(e.type)?e.type.forEach(l):l(e);return s}gapSize(e,t,n,r){let i=$w(r,n)-$w(r,t);return this.heightOracle.lineWrapping?e.height*i:r.total*this.heightOracle.charWidth*i}updateLineGaps(e){Pw.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=py.set(e.map(e=>e.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let t=this.stateDeco;this.lineGaps.length&&(t=t.concat(this.lineGapDeco));let n=[];vb.spans(t,this.viewport.from,this.viewport.to,{span(e,t){n.push({from:e,to:t})},point(){}},20);let r=0;if(n.length!=this.visibleRanges.length)r=12;else for(let t=0;t<n.length&&!(8&r);t++){let i=this.visibleRanges[t],o=n[t];i.from==o.from&&i.to==o.to||(r|=4,e&&e.mapPos(i.from,-1)==o.from&&e.mapPos(i.to,1)==o.to||(r|=8))}return this.visibleRanges=n,r}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||Ww(this.heightMap.lineAt(e,bw.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(t=>t.top<=e&&t.bottom>=e)||Ww(this.heightMap.lineAt(this.scaler.fromDOM(e),bw.ByHeight,this.heightOracle,0,0),this.scaler)}getScrollOffset(){return this.scrollParent==this.view.scrollDOM?this.scrollParent.scrollTop*this.scaleY:(this.scrollParent?this.scrollParent.getBoundingClientRect().top:0)-this.view.contentDOM.getBoundingClientRect().top}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+12-this.paddingTop);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return Ww(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class Nw{constructor(e,t){this.from=e,this.to=t}}function Lw({total:e,ranges:t},n){if(n<=0)return t[0].from;if(n>=1)return t[t.length-1].to;let r=Math.floor(e*n);for(let e=0;;e++){let{from:n,to:i}=t[e],o=i-n;if(r<=o)return n+r;r-=o}}function $w(e,t){let n=0;for(let{from:r,to:i}of e.ranges){if(t<=i){n+=t-r;break}n+=i-r}return n/e.total}const Fw={toDOM:e=>e,fromDOM:e=>e,scale:1,eq(e){return e==this}};function jw(e){let t=e.facet(IC).filter(e=>"function"!=typeof e),n=e.facet(LC).filter(e=>"function"!=typeof e);return n.length&&t.push(vb.join(n)),t}class Vw{constructor(e,t){this.scale=e,this.viewports=t}static get(e,t,n){let r=0,i=0,o=0,s=n.map(({from:n,to:i})=>{let o=t.lineAt(n,bw.ByPos,e,0,0).top,s=t.lineAt(i,bw.ByPos,e,0,0).bottom;return r+=s-o,{from:n,to:i,top:o,bottom:s,domTop:0,domBottom:0}});if(t.height-r<10)return Fw;let a=(7e6-r)/(t.height-r);for(let e of s)e.domTop=o+(e.top-i)*a,o=e.domBottom=e.domTop+(e.bottom-e.top),i=e.bottom;return new Vw(a,s)}toDOM(e){for(let t=0,n=0,r=0;;t++){let i=t<this.viewports.length?this.viewports[t]:null;if(!i||e<i.top)return r+(e-n)*this.scale;if(e<=i.bottom)return i.domTop+(e-i.top);n=i.bottom,r=i.domBottom}}fromDOM(e){for(let t=0,n=0,r=0;;t++){let i=t<this.viewports.length?this.viewports[t]:null;if(!i||e<i.domTop)return n+(e-r)/this.scale;if(e<=i.domBottom)return i.top+(e-i.domTop);n=i.bottom,r=i.domBottom}}eq(e){return e instanceof Vw&&(this.scale==e.scale&&this.viewports.length==e.viewports.length&&this.viewports.every((t,n)=>t.from==e.viewports[n].from&&t.to==e.viewports[n].to))}}function Ww(e,t){if(1==t.scale)return e;let n=t.toDOM(e.top),r=t.toDOM(e.bottom);return new Aw(e.from,e.length,n,r-n,Array.isArray(e._content)?e._content.map(e=>Ww(e,t)):e._content)}const zw=xA.define({combine:e=>e.join(" ")}),Qw=xA.define({combine:e=>e.indexOf(!0)>-1}),Hw=Ib.newName(),qw=Ib.newName(),Uw=Ib.newName(),Yw={"&light":"."+qw,"&dark":"."+Uw};function Xw(e,t,n){return new Ib(t,{finish:t=>/&/.test(t)?t.replace(/&\w*/,t=>{if("&"==t)return e;if(!n||!n[t])throw new RangeError(`Unsupported selector: ${t}`);return n[t]}):e+" "+t})}const Jw=Xw("."+Hw,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{userSelect:"none",position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-selectionHandle":{backgroundColor:"currentColor",width:"1.5px"},".cm-selectionHandle-start::before, .cm-selectionHandle-end::before":{content:'""',backgroundColor:"inherit",borderRadius:"50%",width:"8px",height:"8px",position:"absolute",left:"-3.25px"},".cm-selectionHandle-start::before":{top:"-8px"},".cm-selectionHandle-end::before":{bottom:"-8px"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",border:"0px solid #ddd","&.cm-gutters-before":{borderRightWidth:"1px"},"&.cm-gutters-after":{borderLeftWidth:"1px"}},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},".cm-panels-top":{top:"0"},".cm-panels-bottom":{bottom:"0"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-dialog":{padding:"2px 19px 4px 6px",position:"relative","& label":{fontSize:"80%"}},".cm-dialog-close":{position:"absolute",top:"3px",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",fontSize:"14px",padding:"0"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"baseline",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top",userSelect:"none"},".cm-highlightSpace":{background:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 0) no-repeat",backgroundSize:".4em",backgroundPosition:"calc(min(50%, 0px)) center"},".cm-highlightTab":{backgroundImage:'url(\'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>\')',backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},Yw),Gw={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Kw=iy.ie&&iy.ie_version<=11;class Zw{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new Ry,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let e of t)this.queue.push(e);(iy.ie&&iy.ie_version<=11||iy.ios&&e.composing)&&t.some(e=>"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length)?this.flushSoon():this.flush()}),!window.EditContext||!iy.android||!1===e.constructor.EDIT_CONTEXT||iy.chrome&&iy.chrome_version<126||(this.editContext=new nk(e),e.state.facet(BC)&&(e.contentDOM.editContext=this.editContext.editContext)),Kw&&(this.onCharData=e=>{this.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),"function"==typeof ResizeObserver&&(this.resizeScroll=new ResizeObserver(()=>{var e;(null===(e=this.view.docView)||void 0===e?void 0:e.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),"function"==typeof IntersectionObserver&&(this.intersection=new IntersectionObserver(e=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),e.length>0&&e[e.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(e=>{e.length>0&&e[e.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(this.pendingRecords().length>0),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){("change"!=e.type&&e.type||e.matches)&&(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,n)=>t!=e[n]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:n}=this,r=this.selectionRange;if(n.state.facet(BC)?n.root.activeElement!=this.dom:!wy(this.dom,r))return;let i=r.anchorNode&&n.docView.tile.nearest(r.anchorNode);i&&i.isWidget()&&i.widget.ignoreEvent(e)?t||(this.selectionChanged=!1):(iy.ie&&iy.ie_version<=11||iy.android&&iy.chrome)&&!n.state.selection.main.empty&&r.focusNode&&Sy(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=Cy(e.root);if(!t)return!1;let n=iy.safari&&11==e.root.nodeType&&e.root.activeElement==this.dom&&function(e,t){if(t.getComposedRanges){let n=t.getComposedRanges(e.root)[0];if(n)return tk(e,n)}let n=null;function r(e){e.preventDefault(),e.stopImmediatePropagation(),n=e.getTargetRanges()[0]}return e.contentDOM.addEventListener("beforeinput",r,!0),e.dom.ownerDocument.execCommand("indent"),e.contentDOM.removeEventListener("beforeinput",r,!0),n?tk(e,n):null}(this.view,t)||t;if(!n||this.selectionRange.eq(n))return!1;let r=wy(this.dom,n);return r&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&function(e,t){let n=t.focusNode,r=t.focusOffset;if(!n||t.anchorNode!=n||t.anchorOffset!=r)return!1;for(r=Math.min(r,Ey(n));;)if(r){if(!by(n))return!1;let e=n.childNodes[r-1];"false"==e.contentEditable?r--:(n=e,r=Ey(n))}else{if(n==e)return!0;r=Oy(n),n=n.parentNode}}(this.dom,n)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(n),r&&(this.selectionChanged=!0),!0)}setSelectionRange(e,t){this.selectionRange.set(e.node,e.offset,t.node,t.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,t=null;for(let n=this.dom;n;)if(by(n))!t&&e<this.scrollTargets.length&&this.scrollTargets[e]==n?e++:t||(t=this.scrollTargets.slice(0,e)),t&&t.push(n),n=n.assignedSlot||n.parentNode;else{if(11!=n.nodeType)break;n=n.host}if(e<this.scrollTargets.length&&!t&&(t=this.scrollTargets.slice(0,e)),t){for(let e of this.scrollTargets)e.removeEventListener("scroll",this.onScroll);for(let e of this.scrollTargets=t)e.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,Gw),Kw&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),Kw&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,t){var n;if(!this.delayedAndroidKey){let e=()=>{let e=this.delayedAndroidKey;if(e){this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=e.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&e.force&&Vy(this.dom,e.key,e.keyCode)}};this.flushingAndroidKey=this.view.win.requestAnimationFrame(e)}this.delayedAndroidKey&&"Enter"!=e||(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange<Date.now()-50||!!(null===(n=this.delayedAndroidKey)||void 0===n?void 0:n.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,n=-1,r=!1;for(let i of e){let e=this.readMutation(i);e&&(e.typeOver&&(r=!0),-1==t?({from:t,to:n}=e):(t=Math.min(e.from,t),n=Math.max(e.to,n)))}return{from:t,to:n,typeOver:r}}readChange(){let{from:e,to:t,typeOver:n}=this.processRecords(),r=this.selectionChanged&&wy(this.dom,this.selectionRange);if(e<0&&!r)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let i=new Nx(this.view,e,t,n);return this.view.docView.domChanged={newSel:i.newSel?i.newSel.main:null},i}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.selectionChanged,n=this.readChange();if(!n)return this.view.requestMeasure(),!1;let r=this.view.state,i=$x(this.view,n);return this.view.state==r&&(n.domChanged||t)&&this.view.update([]),i}readMutation(e){let t=this.view.docView.tile.nearest(e.target);if(!t||t.isWidget())return null;if(t.markDirty("attributes"==e.type),"childList"==e.type){let n=ek(t,e.previousSibling||e.target.previousSibling,-1),r=ek(t,e.nextSibling||e.target.nextSibling,1);return{from:n?t.posAfter(n):t.posAtStart,to:r?t.posBefore(r):t.posAtEnd,typeOver:!1}}return"characterData"==e.type?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(BC)!=e.state.facet(BC)&&(e.view.contentDOM.editContext=e.state.facet(BC)?this.editContext.editContext:null))}destroy(){var e,t,n;this.stop(),null===(e=this.intersection)||void 0===e||e.disconnect(),null===(t=this.gapIntersection)||void 0===t||t.disconnect(),null===(n=this.resizeScroll)||void 0===n||n.disconnect();for(let e of this.scrollTargets)e.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function ek(e,t,n){for(;t;){let r=YC.get(t);if(r&&r.parent==e)return r;let i=t.parentNode;t=i!=e.dom?i:n>0?t.nextSibling:t.previousSibling}return null}function tk(e,t){let n=t.startContainer,r=t.startOffset,i=t.endContainer,o=t.endOffset,s=e.docView.domAtPos(e.state.selection.main.anchor,1);return Sy(s.node,s.offset,i,o)&&([n,r,i,o]=[i,o,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:o}}class nk{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let t=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=n=>{let r=e.state.selection.main,{anchor:i,head:o}=r,s=this.toEditorPos(n.updateRangeStart),a=this.toEditorPos(n.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:n.updateRangeStart,editorBase:s,drifted:!1});let l=a-s>n.text.length;s==this.from&&i<this.from?s=i:a==this.to&&i>this.to&&(a=i);let c=jx(e.state.sliceDoc(s,a),n.text,(l?r.from:r.to)-s,l?"end":null);if(!c){let t=bA.single(this.toEditorPos(n.selectionStart),this.toEditorPos(n.selectionEnd));return void(Vx(t,r)||e.dispatch({selection:t,userEvent:"select"}))}let d={from:c.from+s,to:c.toA+s,insert:Yv.of(n.text.slice(c.from,c.toB).split("\n"))};if((iy.mac||iy.android)&&d.from==o-1&&/^\. ?$/.test(n.text)&&"off"==e.contentDOM.getAttribute("autocorrect")&&(d={from:s,to:a,insert:Yv.of([n.text.replace("."," ")])}),this.pendingContextChange=d,!e.state.readOnly){let t=this.to-this.from+(d.to-d.from+d.insert.length);Fx(e,d,bA.single(this.toEditorPos(n.selectionStart,t),this.toEditorPos(n.selectionEnd,t)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)),d.from<d.to&&!d.insert.length&&e.inputState.composing>=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(t.text.slice(Math.max(0,n.updateRangeStart-1),Math.min(t.text.length,n.updateRangeStart+1)))&&this.handlers.compositionend(n)},this.handlers.characterboundsupdate=n=>{let r=[],i=null;for(let t=this.toEditorPos(n.rangeStart),o=this.toEditorPos(n.rangeEnd);t<o;t++){let n=e.coordsForChar(t);i=n&&new DOMRect(n.left,n.top,n.right-n.left,n.bottom-n.top)||i||new DOMRect,r.push(i)}t.updateCharacterBounds(n.rangeStart,r)},this.handlers.textformatupdate=t=>{let n=[];for(let e of t.getTextFormats()){let t=e.underlineStyle,r=e.underlineThickness;if(!/none/i.test(t)&&!/none/i.test(r)){let i=this.toEditorPos(e.rangeStart),o=this.toEditorPos(e.rangeEnd);if(i<o){let e=`text-decoration: underline ${/^[a-z]/.test(t)?t+" ":"Dashed"==t?"dashed ":"Squiggle"==t?"wavy ":""}${/thin/i.test(r)?1:2}px`;n.push(py.mark({attributes:{style:e}}).range(i,o))}}}e.dispatch({effects:OC.of(py.set(n))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:t}=this.composing;this.composing=null,t&&this.reset(e.state)}};for(let e in this.handlers)t.addEventListener(e,this.handlers[e]);this.measureReq={read:e=>{let t=Cy(e.root);t&&t.rangeCount&&this.editContext.updateSelectionBounds(t.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,n=!1,r=this.pendingContextChange;return e.changes.iterChanges((i,o,s,a,l)=>{if(n)return;let c=l.length-(o-i);if(r&&o>=r.to){if(r.from==i&&r.to==o&&r.insert.eq(l))return r=this.pendingContextChange=null,t+=c,void(this.to+=c);r=null,this.revertPending(e.state)}if(i+=t,(o+=t)<=this.from)this.from+=c,this.to+=c;else if(i<this.to){if(i<this.from||o>this.to||this.to-this.from+l.length>3e4)return void(n=!0);this.editContext.updateText(this.toContextPos(i),this.toContextPos(o),l.toString()),this.to+=c}t+=c}),r&&!n&&this.revertPending(e.state),!n}update(e){let t=this.pendingContextChange,n=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(n.from,n.to)&&e.transactions.some(e=>!e.isUserEvent("input.type")&&e.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):this.applyEdits(e)&&this.rangeIsValid(e.state)?(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state):(this.pendingContextChange=null,this.reset(e.state)),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,n=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),r=this.toContextPos(t.head);this.editContext.selectionStart==n&&this.editContext.selectionEnd==r||this.editContext.updateSelection(n,r)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to<e.doc.length&&this.to-t<500||this.to-this.from>3e4)}toEditorPos(e,t=this.to-this.from){e=Math.min(e,t);let n=this.composing;return n&&n.drifted?n.editorBase+(e-n.contextBase):e+this.from}toContextPos(e){let t=this.composing;return t&&t.drifted?t.contextBase+(e-t.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class rk{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var t;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.clearAnnouncement=-1,this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:n}=e;this.dispatchTransactions=e.dispatchTransactions||n&&(e=>e.forEach(e=>n(e,this)))||(e=>this.update(e)),this.dispatch=this.dispatch.bind(this),this._root=e.root||function(e){for(;e;){if(e&&(9==e.nodeType||11==e.nodeType&&e.host))return e;e=e.assignedSlot||e.parentNode}return null}(e.parent)||document,this.viewState=new Iw(this,e.state||db.create(e)),e.scrollTo&&e.scrollTo.is(SC)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(TC).map(e=>new DC(e));for(let e of this.plugins)e.update(this);this.observer=new Zw(this),this.inputState=new Wx(this),this.inputState.ensureHandlers(this.plugins),this.docView=new vx(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),(null===(t=document.fonts)||void 0===t?void 0:t.ready)&&document.fonts.ready.then(()=>{this.viewState.mustMeasureContent="refresh",this.requestMeasure()})}dispatch(...e){let t=1==e.length&&e[0]instanceof ZA?e:1==e.length&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(0!=this.updateState)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t,n=!1,r=!1,i=this.state;for(let t of e){if(t.startState!=i)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");i=t.state}if(this.destroyed)return void(this.viewState.state=i);let o=this.hasFocus,s=0,a=null;e.some(e=>e.annotation(cw))?(this.inputState.notifiedFocused=o,s=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,a=dw(i,o),a||(s=1));let l=this.observer.delayedAndroidKey,c=null;if(l?(this.observer.clearDelayedAndroidKey(),c=this.observer.readChange(),(c&&!this.state.doc.eq(i.doc)||!this.state.selection.eq(i.selection))&&(c=null)):this.observer.clear(),i.facet(db.phrases)!=this.state.facet(db.phrases))return this.setState(i);t=qC.create(this,i,e),t.flags|=s;let d=this.viewState.scrollTarget;try{this.updateState=2;for(let t of e){if(d&&(d=d.map(t.changes)),t.scrollIntoView){let{main:e}=t.state.selection,{x:n,y:r}=this.state.facet(rk.cursorScrollMargin);d=new kC(e.empty?e:bA.cursor(e.head,e.head>e.anchor?-1:1),"nearest","nearest",r,n)}for(let e of t.effects)e.is(SC)&&(d=e.value.clip(this.state))}this.viewState.update(t,d),this.bidiCache=sk.update(this.bidiCache,t.changes),t.empty||(this.updatePlugins(t),this.inputState.update(t)),n=this.docView.update(t),this.state.facet(QC)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some(e=>e.isUserEvent("select.pointer")))}finally{this.updateState=0}if(t.startState.facet(zw)!=t.state.facet(zw)&&(this.viewState.mustMeasureContent=!0),(n||r||d||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!t.empty)for(let e of this.state.facet(mC))try{e(t)}catch(e){_C(this.state,e,"update listener")}(a||c)&&Promise.resolve().then(()=>{a&&this.state==a.startState&&this.dispatch(a),c&&!$x(this,c)&&l.force&&Vy(this.contentDOM,l.key,l.keyCode)})}setState(e){if(0!=this.updateState)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed)return void(this.viewState.state=e);this.updateState=2;let t=this.hasFocus;try{for(let e of this.plugins)e.destroy(this);this.viewState=new Iw(this,e),this.plugins=e.facet(TC).map(e=>new DC(e)),this.pluginMap.clear();for(let e of this.plugins)e.update(this);this.docView.destroy(),this.docView=new vx(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(TC),n=e.state.facet(TC);if(t!=n){let r=[];for(let i of n){let n=t.indexOf(i);if(n<0)r.push(new DC(i));else{let t=this.plugins[n];t.mustUpdate=e,r.push(t)}}for(let t of this.plugins)t.mustUpdate!=e&&t.destroy(this);this.plugins=r,this.pluginMap.clear()}else for(let t of this.plugins)t.mustUpdate=e;for(let e=0;e<this.plugins.length;e++)this.plugins[e].update(this);t!=n&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let e of this.plugins){let t=e.value;if(t&&t.docViewUpdate)try{t.docViewUpdate(this)}catch(e){_C(this.state,e,"doc view update listener")}}}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey)return this.measureScheduled=-1,void this.requestMeasure();this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,n=this.viewState.scrollParent,r=this.viewState.getScrollOffset(),{scrollAnchorPos:i,scrollAnchorHeight:o,scaleY:s}=this.viewState;Math.abs(r-this.viewState.scrollOffset)>1&&(o=-1),this.viewState.scrollAnchorHeight=-1;try{for(let e=0;;e++){if(o<0){if(Wy(n||this.win))i=-1,o=this.viewState.heightMap.height/this.viewState.scaleY;else{let e=this.viewState.scrollAnchorAt(r);i=e.from,o=e.top}s=this.viewState.scaleY}this.updateState=1;let a=this.viewState.measure();if(!a&&!this.measureRequests.length&&null==this.viewState.scrollTarget)break;if(e>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let l=[];4&a||([this.measureRequests,l]=[l,this.measureRequests]);let c=l.map(e=>{try{return e.read(this)}catch(e){return _C(this.state,e),ok}}),d=qC.create(this,this.state,[]),u=!1;d.flags|=a,t?t.flags|=a:t=d,this.updateState=2,d.empty||(this.updatePlugins(d),this.inputState.update(d),this.updateAttrs(),u=this.docView.update(d),u&&this.docViewUpdate());for(let e=0;e<l.length;e++)if(c[e]!=ok)try{let t=l[e];t.write&&t.write(c[e],this)}catch(e){_C(this.state,e)}if(u&&this.docView.updateSelection(!0),!d.viewportChanged&&0==this.measureRequests.length){if(this.viewState.editorHeight){if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,o=-1;continue}{let e=(i<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(i).top)/this.viewState.scaleY-o/s;if((e>1||e<-1)&&!(iy.ios&&this.inputState.lastIOSMomentumScroll>Date.now()-100)&&(n==this.scrollDOM||this.hasFocus||Math.max(this.inputState.lastWheelEvent,this.inputState.lastTouchTime)>Date.now()-100)){r+=e,n?i<0?n.scrollTop=n.scrollHeight:n.scrollTop+=e:this.win.scrollBy(0,e),o=-1;continue}}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let e of this.state.facet(mC))e(t)}get themeClasses(){return Hw+" "+(this.state.facet(Qw)?Uw:qw)+" "+this.state.facet(zw)}updateAttrs(){let e=ak(this,PC,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(BC)?"true":"false",class:"cm-content",style:`${iy.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),ak(this,RC,t);let n=this.observer.ignore(()=>{let n=ly(this.contentDOM,this.contentAttrs,t),r=ly(this.dom,this.editorAttrs,e);return n||r});return this.editorAttrs=e,this.contentAttrs=t,n}showAnnouncements(e){let t=!0;for(let n of e)for(let e of n.effects)if(e.is(rk.announce)){t&&(this.announceDOM.textContent="",this.win.clearTimeout(this.clearAnnouncement),this.clearAnnouncement=this.win.setTimeout(()=>{this.announceDOM.textContent=" "},200),t=!1),this.announceDOM.appendChild(document.createElement("div")).textContent=e.value}}mountStyles(){this.styleModules=this.state.facet(QC);let e=this.state.facet(rk.cspNonce);Ib.mount(this.root,this.styleModules.concat(Jw).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(2==this.updateState)throw new Error("Reading the editor layout isn't allowed during an update");0==this.updateState&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(null!=e.key)for(let t=0;t<this.measureRequests.length;t++)if(this.measureRequests[t].key===e.key)return void(this.measureRequests[t]=e);this.measureRequests.push(e)}}plugin(e){let t=this.pluginMap.get(e);return(void 0===t||t&&t.plugin!=e)&&this.pluginMap.set(e,t=this.plugins.find(t=>t.plugin==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,n){return _x(this,e,kx(this,e,t,n))}moveByGroup(e,t){return _x(this,e,kx(this,e,t,t=>function(e,t,n){let r=e.state.charCategorizer(t),i=r(n);return e=>{let t=r(e);return i==sb.Space&&(i=t),i==t}}(this,e.head,t)))}visualLineSide(e,t){return t?bA.cursor(e.to,1):bA.cursor(e.from,-1)}moveToLineBoundary(e,t,n=!0){return function(e,t,n,r){let i=wx(e,t.head,t.assoc||-1),o=r&&i.type==uy.Text&&(e.lineWrapping||i.widgetLineBreaks)?e.coordsAtPos(t.assoc<0&&t.head>i.from?t.head-1:t.head):null;if(o){let t=e.dom.getBoundingClientRect(),r=e.textDirectionAt(i.from),s=e.posAndSideAtCoords({x:n==(r==qy.LTR)?t.right-1:t.left+1,y:(o.top+o.bottom)/2});if(s)return bA.cursor(s.pos,s.assoc)}return bA.cursor(n?i.to:i.from,n?1:-1)}(this,e,t,n)}moveVertically(e,t,n){return _x(this,e,function(e,t,n,r){let i=t.head,o=n?1:-1;if(i==(n?e.state.doc.length:0))return bA.cursor(i,t.assoc);let s,a=t.goalColumn,l=e.contentDOM.getBoundingClientRect(),c=e.coordsAtPos(i,t.assoc||((t.empty?n:t.head==t.from)?1:-1)),d=e.documentTop;if(c)null==a&&(a=c.left-l.left),s=o<0?c.top:c.bottom;else{let t=e.viewState.lineBlockAt(i);null==a&&(a=Math.min(l.right-l.left,e.defaultCharacterWidth*(i-t.from))),s=(o<0?t.top:t.bottom)+d}let u=l.left+a,p=e.viewState.heightOracle.textHeight>>1,h=null!=r?r:p;for(let t=0;;t+=p){let r=s+(h+t)*o,i=Ex(e,{x:u,y:r},!1,o);if(n?r>l.bottom:r<l.top)return bA.cursor(i.pos,i.assoc);let c=e.coordsAtPos(i.pos,i.assoc),d=c?(c.top+c.bottom)/2:0;if(!c||(n?d>s:d<s))return bA.cursor(i.pos,i.assoc,void 0,a)}}(this,e,t,n))}domAtPos(e,t=1){return this.docView.domAtPos(e,t)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){this.readMeasured();let n=Ex(this,e,t);return n&&n.pos}posAndSideAtCoords(e,t=!0){return this.readMeasured(),Ex(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let n=this.state.doc.lineAt(e),r=this.bidiSpans(n),i=r[nC.find(r,e-n.from,-1,t)];return n.length&&(e==n.from&&t<0||e==n.to&&t>0)&&i.dir!=this.textDirectionAt(n.from)&&(e==n.to?(e=n.from+i.from,t=1):(e=n.from+i.to,t=-1)),this.docView.coordsAt(e,t,i.dir==qy.RTL)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(CC)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>ik)return lC(e.length);let t,n=this.textDirectionAt(e.from);for(let r of this.bidiCache)if(r.from==e.from&&r.dir==n&&(r.fresh||rC(r.isolates,t=jC(this,e))))return r.order;t||(t=jC(this,e));let r=aC(e.text,n,t);return this.bidiCache.push(new sk(e.from,e.to,n,t,!0,r)),r}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||iy.safari&&(null===(e=this.inputState)||void 0===e?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{Fy(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((9==e.nodeType?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.win.clearTimeout(this.clearAnnouncement),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){var n,r,i,o;return SC.of(new kC("number"==typeof e?bA.cursor(e):e,null!==(n=t.y)&&void 0!==n?n:"nearest",null!==(r=t.x)&&void 0!==r?r:"nearest",null!==(i=t.yMargin)&&void 0!==i?i:5,null!==(o=t.xMargin)&&void 0!==o?o:5))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,n=this.viewState.scrollAnchorAt(e);return SC.of(new kC(bA.cursor(n.from),"start","start",n.top-e,t,!0))}setTabFocusMode(e){null==e?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:"boolean"==typeof e?this.inputState.tabFocusMode=e?0:-1:0!=this.inputState.tabFocusMode&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return MC.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return MC.define(()=>({}),{eventObservers:e})}static theme(e,t){let n=Ib.newName(),r=[zw.of(n),QC.of(Xw(`.${n}`,e))];return t&&t.dark&&r.push(Qw.of(!0)),r}static baseTheme(e){return IA.lowest(QC.of(Xw("."+Hw,e,Yw)))}static findFromDOM(e){var t;let n=e.querySelector(".cm-content"),r=n&&YC.get(n)||YC.get(e);return(null===(t=null==r?void 0:r.root)||void 0===t?void 0:t.view)||null}}rk.styleModule=QC,rk.inputHandler=vC,rk.clipboardInputFilter=bC,rk.clipboardOutputFilter=yC,rk.scrollHandler=wC,rk.focusChangeEffect=AC,rk.perLineTextDirection=CC,rk.exceptionSink=gC,rk.updateListener=mC,rk.editable=BC,rk.mouseSelectionStyle=fC,rk.dragMovesSelection=hC,rk.clickAddsSelectionRange=pC,rk.decorations=IC,rk.blockWrappers=NC,rk.outerDecorations=LC,rk.atomicRanges=$C,rk.bidiIsolatedRanges=FC,rk.cursorScrollMargin=xA.define({combine:e=>{let t=5,n=5;for(let r of e)"number"==typeof r?t=n=r:({x:t,y:n}=r);return{x:t,y:n}}}),rk.scrollMargins=WC,rk.darkTheme=Qw,rk.cspNonce=xA.define({combine:e=>e.length?e[0]:""}),rk.contentAttributes=RC,rk.editorAttributes=PC,rk.lineWrapping=rk.contentAttributes.of({class:"cm-lineWrapping"}),rk.announce=KA.define();const ik=4096,ok={};class sk{constructor(e,t,n,r,i,o){this.from=e,this.to=t,this.dir=n,this.isolates=r,this.fresh=i,this.order=o}static update(e,t){if(t.empty&&!e.some(e=>e.fresh))return e;let n=[],r=e.length?e[e.length-1].dir:qy.LTR;for(let i=Math.max(0,e.length-10);i<e.length;i++){let o=e[i];o.dir!=r||t.touchesRange(o.from,o.to)||n.push(new sk(t.mapPos(o.from,1),t.mapPos(o.to,-1),o.dir,o.isolates,!1,o.order))}return n}}function ak(e,t,n){for(let r=e.state.facet(t),i=r.length-1;i>=0;i--){let t=r[i],o="function"==typeof t?t(e):t;o&&oy(o,n)}return n}const lk=iy.mac?"mac":iy.windows?"win":iy.linux?"linux":"key";function ck(e,t,n){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),!1!==n&&t.shiftKey&&(e="Shift-"+e),e}const dk=IA.default(rk.domEventHandlers({keydown:(e,t)=>mk(hk(t.state),e,t,"editor")})),uk=xA.define({enables:dk}),pk=new WeakMap;function hk(e){let t=e.facet(uk),n=pk.get(t);return n||pk.set(t,n=function(e,t=lk){let n=Object.create(null),r=Object.create(null),i=(e,t)=>{let n=r[e];if(null==n)r[e]=t;else if(n!=t)throw new Error("Key binding "+e+" is used both as a regular binding and as a multi-stroke prefix")},o=(e,r,o,s,a)=>{var l,c;let d=n[e]||(n[e]=Object.create(null)),u=r.split(/ (?!$)/).map(e=>function(e,t){const n=e.split(/-(?!$)/);let r,i,o,s,a=n[n.length-1];"Space"==a&&(a=" ");for(let e=0;e<n.length-1;++e){const a=n[e];if(/^(cmd|meta|m)$/i.test(a))s=!0;else if(/^a(lt)?$/i.test(a))r=!0;else if(/^(c|ctrl|control)$/i.test(a))i=!0;else if(/^s(hift)?$/i.test(a))o=!0;else{if(!/^mod$/i.test(a))throw new Error("Unrecognized modifier name: "+a);"mac"==t?s=!0:i=!0}}return r&&(a="Alt-"+a),i&&(a="Ctrl-"+a),s&&(a="Meta-"+a),o&&(a="Shift-"+a),a}(e,t));for(let t=1;t<u.length;t++){let n=u.slice(0,t).join(" ");i(n,!0),d[n]||(d[n]={preventDefault:!0,stopPropagation:!1,run:[t=>{let r=fk={view:t,prefix:n,scope:e};return setTimeout(()=>{fk==r&&(fk=null)},4e3),!0}]})}let p=u.join(" ");i(p,!1);let h=d[p]||(d[p]={preventDefault:!1,stopPropagation:!1,run:(null===(c=null===(l=d._any)||void 0===l?void 0:l.run)||void 0===c?void 0:c.slice())||[]});o&&h.run.push(o),s&&(h.preventDefault=!0),a&&(h.stopPropagation=!0)};for(let r of e){let e=r.scope?r.scope.split(" "):["editor"];if(r.any)for(let t of e){let e=n[t]||(n[t]=Object.create(null));e._any||(e._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:i}=r;for(let t in e)e[t].run.push(e=>i(e,gk))}let i=r[t]||r.key;if(i)for(let t of e)o(t,i,r.run,r.preventDefault,r.stopPropagation),r.shift&&o(t,"Shift-"+i,r.shift,r.preventDefault,r.stopPropagation)}return n}(t.reduce((e,t)=>e.concat(t),[]))),n}let fk=null;let gk=null;function mk(e,t,n,r){gk=t;let i=function(e){var t=!(Vb&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||Wb&&e.shiftKey&&e.key&&1==e.key.length||"Unidentified"==e.key)&&e.key||(e.shiftKey?jb:Fb)[e.keyCode]||e.key||"Unidentified";return"Esc"==t&&(t="Escape"),"Del"==t&&(t="Delete"),"Left"==t&&(t="ArrowLeft"),"Up"==t&&(t="ArrowUp"),"Right"==t&&(t="ArrowRight"),"Down"==t&&(t="ArrowDown"),t}(t),o=aA(oA(i,0))==i.length&&" "!=i,s="",a=!1,l=!1,c=!1;fk&&fk.view==n&&fk.scope==r&&(s=fk.prefix+" ",Ux.indexOf(t.keyCode)<0&&(l=!0,fk=null));let d,u,p=new Set,h=e=>{if(e){for(let t of e.run)if(!p.has(t)&&(p.add(t),t(n)))return e.stopPropagation&&(c=!0),!0;e.preventDefault&&(e.stopPropagation&&(c=!0),l=!0)}return!1},f=e[r];return f&&(h(f[s+ck(i,t,!o)])?a=!0:!o||!(t.altKey||t.metaKey||t.ctrlKey)||iy.windows&&t.ctrlKey&&t.altKey||iy.mac&&t.altKey&&!t.ctrlKey&&!t.metaKey||!(d=Fb[t.keyCode])||d==i?o&&t.shiftKey&&h(f[s+ck(i,t,!0)])&&(a=!0):(h(f[s+ck(d,t,!0)])||t.shiftKey&&(u=jb[t.keyCode])!=i&&u!=d&&h(f[s+ck(u,t,!1)]))&&(a=!0),!a&&h(f._any)&&(a=!0)),l&&(a=!0),a&&c&&t.stopPropagation(),gk=null,a}class vk{constructor(e,t,n,r,i){this.className=e,this.left=t,this.top=n,this.width=r,this.height=i}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,t){return t.className==this.className&&(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",null!=this.width&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,t,n){if(n.empty){let r=e.coordsAtPos(n.head,n.assoc||1);if(!r)return[];let i=Ak(e);return[new vk(t,r.left-i.left,r.top-i.top,null,r.bottom-r.top)]}return function(e,t,n){if(n.to<=e.viewport.from||n.from>=e.viewport.to)return[];let r=Math.max(n.from,e.viewport.from),i=Math.min(n.to,e.viewport.to),o=e.textDirection==qy.LTR,s=e.contentDOM,a=s.getBoundingClientRect(),l=Ak(e),c=s.querySelector(".cm-line"),d=c&&window.getComputedStyle(c),u=a.left+(d?parseInt(d.paddingLeft)+Math.min(0,parseInt(d.textIndent)):0),p=a.right-(d?parseInt(d.paddingRight):0),h=wx(e,r,1),f=wx(e,i,-1),g=h.type==uy.Text?h:null,m=f.type==uy.Text?f:null;g&&(e.lineWrapping||h.widgetLineBreaks)&&(g=bk(e,r,1,g));m&&(e.lineWrapping||f.widgetLineBreaks)&&(m=bk(e,i,-1,m));if(g&&m&&g.from==m.from&&g.to==m.to)return A(b(n.from,n.to,g));{let t=g?b(n.from,null,g):y(h,!1),r=m?b(null,n.to,m):y(f,!0),i=[];return(g||h).to<(m||f).from-(g&&m?1:0)||h.widgetLineBreaks>1&&t.bottom+e.defaultLineHeight/2<r.top?i.push(v(u,t.bottom,p,r.top)):t.bottom<r.top&&e.elementAtHeight((t.bottom+r.top)/2).type==uy.Text&&(t.bottom=r.top=(t.bottom+r.top)/2),A(t).concat(i).concat(A(r))}function v(e,n,r,i){return new vk(t,e-l.left,n-l.top,Math.max(0,r-e),i-n)}function A({top:e,bottom:t,horizontal:n}){let r=[];for(let i=0;i<n.length;i+=2)r.push(v(n[i],e,n[i+1],t));return r}function b(t,n,r){let i=1e9,s=-1e9,a=[];function l(t,n,l,c,d){let h=e.coordsAtPos(t,t==r.to?-2:2),f=e.coordsAtPos(l,l==r.from?2:-2);h&&f&&(i=Math.min(h.top,f.top,i),s=Math.max(h.bottom,f.bottom,s),d==qy.LTR?a.push(o&&n?u:h.left,o&&c?p:f.right):a.push(!o&&c?u:f.left,!o&&n?p:h.right))}let c=null!=t?t:r.from,d=null!=n?n:r.to;for(let r of e.visibleRanges)if(r.to>c&&r.from<d)for(let i=Math.max(r.from,c),o=Math.min(r.to,d);;){let r=e.state.doc.lineAt(i);for(let s of e.bidiSpans(r)){let e=s.from+r.from,a=s.to+r.from;if(e>=o)break;a>i&&l(Math.max(e,i),null==t&&e<=c,Math.min(a,o),null==n&&a>=d,s.dir)}if(i=r.to+1,i>=o)break}return 0==a.length&&l(c,null==t,d,null==n,e.textDirection),{top:i,bottom:s,horizontal:a}}function y(e,t){let n=a.top+(t?e.top:e.bottom);return{top:n,bottom:n,horizontal:[]}}}(e,t,n)}}function Ak(e){let t=e.scrollDOM.getBoundingClientRect();return{left:(e.textDirection==qy.LTR?t.left:t.right-e.scrollDOM.clientWidth*e.scaleX)-e.scrollDOM.scrollLeft*e.scaleX,top:t.top-e.scrollDOM.scrollTop*e.scaleY}}function bk(e,t,n,r){let i=e.coordsAtPos(t,2*n);if(!i)return r;let o=e.dom.getBoundingClientRect(),s=(i.top+i.bottom)/2,a=e.posAtCoords({x:o.left+1,y:s}),l=e.posAtCoords({x:o.right-1,y:s});return null==a||null==l?r:{from:Math.max(r.from,Math.min(a,l)),to:Math.min(r.to,Math.max(a,l))}}class yk{constructor(e,t){this.view=e,this.layer=t,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),t.above&&this.dom.classList.add("cm-layer-above"),t.class&&this.dom.classList.add(t.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),t.mount&&t.mount(this.dom,e)}update(e){e.startState.facet(Ck)!=e.state.facet(Ck)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){!1!==this.layer.updateOnDocViewUpdate&&e.requestMeasure(this.measureReq)}setOrder(e){let t=0,n=e.facet(Ck);for(;t<n.length&&n[t]!=this.layer;)t++;this.dom.style.zIndex=String((this.layer.above?150:-1)-t)}measure(){return this.layer.markers(this.view)}scale(){let{scaleX:e,scaleY:t}=this.view;e==this.scaleX&&t==this.scaleY||(this.scaleX=e,this.scaleY=t,this.dom.style.transform=`scale(${1/e}, ${1/t})`)}draw(e){if(e.length!=this.drawn.length||e.some((e,t)=>{return n=e,r=this.drawn[t],!(n.constructor==r.constructor&&n.eq(r));var n,r})){let t=this.dom.firstChild,n=0;for(let r of e)r.update&&t&&r.constructor&&this.drawn[n].constructor&&r.update(t,this.drawn[n])?(t=t.nextSibling,n++):this.dom.insertBefore(r.draw(),t);for(;t;){let e=t.nextSibling;t.remove(),t=e}this.drawn=e,iy.webkit&&(this.dom.style.display=this.dom.firstChild?"":"none")}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const Ck=xA.define();function xk(e){return[MC.define(t=>new yk(t,e)),Ck.of(e)]}const wk=!iy.ios,kk=xA.define({combine:e=>ub(e,{cursorBlinkRate:1200,drawRangeCursor:!0,iosSelectionHandles:!0},{cursorBlinkRate:(e,t)=>Math.min(e,t),drawRangeCursor:(e,t)=>e||t})});function Sk(e={}){return[kk.of(e),_k,Ek,Mk,xC.of(!0)]}function Ok(e){return e.startState.facet(kk)!=e.state.facet(kk)}const _k=xk({above:!0,markers(e){let{state:t}=e,n=t.facet(kk),r=[];for(let i of t.selection.ranges){let o=i==t.selection.main;if(i.empty||n.drawRangeCursor&&!(o&&iy.ios&&n.iosSelectionHandles)){let t=o?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",n=i.empty?i:bA.cursor(i.head,i.assoc);for(let i of vk.forRange(e,t,n))r.push(i)}}return r},update(e,t){e.transactions.some(e=>e.selection)&&(t.style.animationName="cm-blink"==t.style.animationName?"cm-blink2":"cm-blink");let n=Ok(e);return n&&Bk(e.state,t),e.docChanged||e.selectionSet||n},mount(e,t){Bk(t.state,e)},class:"cm-cursorLayer"});function Bk(e,t){t.style.animationDuration=e.facet(kk).cursorBlinkRate+"ms"}const Ek=xk({above:!1,markers(e){let t=[],{main:n,ranges:r}=e.state.selection;for(let i of r)if(!i.empty&&(wk||i!=n))for(let n of vk.forRange(e,"cm-selectionBackground",i))t.push(n);if(iy.ios&&!n.empty&&e.state.facet(kk).iosSelectionHandles){for(let r of vk.forRange(e,"cm-selectionHandle cm-selectionHandle-start",bA.cursor(n.from,1)))t.push(r);for(let r of vk.forRange(e,"cm-selectionHandle cm-selectionHandle-end",bA.cursor(n.to,1)))t.push(r)}return t},update:(e,t)=>e.docChanged||e.selectionSet||e.viewportChanged||Ok(e),class:"cm-selectionLayer"}),Tk=iy.gecko&&153==iy.gecko_version?"#ffffff01":"transparent",Mk=IA.highest(rk.theme({".cm-line":{...wk?{"& ::selection, &::selection":{backgroundColor:`${Tk} !important`}}:{},caretColor:"transparent !important"},".cm-content":{caretColor:"transparent !important","& :focus":{caretColor:"initial !important",...wk?{"&::selection, & ::selection":{backgroundColor:"Highlight !important"}}:{}}}})),Dk=KA.define({map:(e,t)=>null==e?null:t.mapPos(e)}),Pk=EA.define({create:()=>null,update:(e,t)=>(null!=e&&(e=t.changes.mapPos(e)),t.effects.reduce((e,t)=>t.is(Dk)?t.value:e,e))}),Rk=MC.fromClass(class{constructor(e){this.view=e,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(e){var t;let n=e.state.field(Pk);null==n?null!=this.cursor&&(null===(t=this.cursor)||void 0===t||t.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(e.startState.field(Pk)!=n||e.docChanged||e.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:e}=this,t=e.state.field(Pk),n=null!=t&&e.coordsAtPos(t);if(!n)return null;let r=e.scrollDOM.getBoundingClientRect();return{left:n.left-r.left+e.scrollDOM.scrollLeft*e.scaleX,top:n.top-r.top+e.scrollDOM.scrollTop*e.scaleY,height:n.bottom-n.top}}drawCursor(e){if(this.cursor){let{scaleX:t,scaleY:n}=this.view;e?(this.cursor.style.left=e.left/t+"px",this.cursor.style.top=e.top/n+"px",this.cursor.style.height=e.height/n+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(e){this.view.state.field(Pk)!=e&&this.view.dispatch({effects:Dk.of(e)})}},{eventObservers:{dragover(e){this.setDropPos(this.view.posAtCoords({x:e.clientX,y:e.clientY}))},dragleave(e){e.target!=this.view.contentDOM&&this.view.contentDOM.contains(e.relatedTarget)||this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function Ik(e,t,n,r,i){t.lastIndex=0;for(let o,s=e.iterRange(n,r),a=n;!s.next().done;a+=s.value.length)if(!s.lineBreak)for(;o=t.exec(s.value);)i(a+o.index,o)}class Nk{constructor(e){const{regexp:t,decoration:n,decorate:r,boundary:i,maxLength:o=1e3}=e;if(!t.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=t,r)this.addMatch=(e,t,n,i)=>r(i,n,n+e[0].length,e,t);else if("function"==typeof n)this.addMatch=(e,t,r,i)=>{let o=n(e,t,r);o&&i(r,r+e[0].length,o)};else{if(!n)throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.addMatch=(e,t,r,i)=>i(r,r+e[0].length,n)}this.boundary=i,this.maxLength=o}createDeco(e){let t=new bb,n=t.add.bind(t);for(let{from:t,to:r}of function(e,t){let n=e.visibleRanges;if(1==n.length&&n[0].from==e.viewport.from&&n[0].to==e.viewport.to)return n;let r=[];for(let{from:i,to:o}of n)i=Math.max(e.state.doc.lineAt(i).from,i-t),o=Math.min(e.state.doc.lineAt(o).to,o+t),r.length&&r[r.length-1].to>=i?r[r.length-1].to=o:r.push({from:i,to:o});return r}(e,this.maxLength))Ik(e.state.doc,this.regexp,t,r,(t,r)=>this.addMatch(r,e,t,n));return t.finish()}updateDeco(e,t){let n=1e9,r=-1;return e.docChanged&&e.changes.iterChanges((t,i,o,s)=>{s>=e.view.viewport.from&&o<=e.view.viewport.to&&(n=Math.min(o,n),r=Math.max(s,r))}),e.viewportMoved||r-n>1e3?this.createDeco(e.view):r>-1?this.updateRange(e.view,t.map(e.changes),n,r):t}updateRange(e,t,n,r){for(let i of e.visibleRanges){let o=Math.max(i.from,n),s=Math.min(i.to,r);if(s>=o){let n=e.state.doc.lineAt(o),r=n.to<s?e.state.doc.lineAt(s):n,a=Math.max(i.from,n.from),l=Math.min(i.to,r.to);if(this.boundary){for(;o>n.from;o--)if(this.boundary.test(n.text[o-1-n.from])){a=o;break}for(;s<r.to;s++)if(this.boundary.test(r.text[s-r.from])){l=s;break}}let c,d=[],u=(e,t,n)=>d.push(n.range(e,t));if(n==r)for(this.regexp.lastIndex=a-n.from;(c=this.regexp.exec(n.text))&&c.index<l-n.from;)this.addMatch(c,e,c.index+n.from,u);else Ik(e.state.doc,this.regexp,a,l,(t,n)=>this.addMatch(n,e,t,u));t=t.update({filterFrom:a,filterTo:l,filter:(e,t)=>e<a||t>l,add:d})}}return t}}const Lk=null!=/x/.unicode?"gu":"g",$k=new RegExp("[\0-\b\n--\u2028\u2029\ufeff-]",Lk),Fk={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let jk=null;const Vk=xA.define({combine(e){let t=ub(e,{render:null,specialChars:$k,addSpecialChars:null});return(t.replaceTabs=!function(){var e;if(null==jk&&"undefined"!=typeof document&&document.body){let t=document.body.style;jk=null!=(null!==(e=t.tabSize)&&void 0!==e?e:t.MozTabSize)}return jk||!1}())&&(t.specialChars=new RegExp("\t|"+t.specialChars.source,Lk)),t.addSpecialChars&&(t.specialChars=new RegExp(t.specialChars.source+"|"+t.addSpecialChars.source,Lk)),t}});function Wk(e={}){return[Vk.of(e),zk||(zk=MC.fromClass(class{constructor(e){this.view=e,this.decorations=py.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(e.state.facet(Vk)),this.decorations=this.decorator.createDeco(e)}makeDecorator(e){return new Nk({regexp:e.specialChars,decoration:(t,n,r)=>{let{doc:i}=n.state,o=oA(t[0],0);if(9==o){let e=i.lineAt(r),t=n.state.tabSize,o=Tb(e.text,t,r-e.from);return py.replace({widget:new Hk((t-o%t)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[o]||(this.decorationCache[o]=py.replace({widget:new Qk(e,o)}))},boundary:e.replaceTabs?void 0:/[^]/})}update(e){let t=e.state.facet(Vk);e.startState.facet(Vk)!=t?(this.decorator=this.makeDecorator(t),this.decorations=this.decorator.createDeco(e.view)):this.decorations=this.decorator.updateDeco(e,this.decorations)}},{decorations:e=>e.decorations}))]}let zk=null;class Qk extends dy{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=function(e){return e>=32?"•":10==e?"":String.fromCharCode(9216+e)}(this.code),n=e.state.phrase("Control character")+" "+(Fk[this.code]||"0x"+this.code.toString(16)),r=this.options.render&&this.options.render(this.code,n,t);if(r)return r;let i=document.createElement("span");return i.textContent=t,i.title=n,i.setAttribute("aria-label",n),i.className="cm-specialChar",i}ignoreEvent(){return!1}}class Hk extends dy{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent="\t",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}const qk=py.line({class:"cm-activeLine"}),Uk=MC.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.docChanged||e.selectionSet)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=-1,n=[];for(let r of e.state.selection.ranges){let i=e.lineBlockAt(r.head);i.from>t&&(n.push(qk.range(i.from)),t=i.from)}return py.set(n)}},{decorations:e=>e.decorations});class Yk extends dy{constructor(e){super(),this.content=e}toDOM(e){let t=document.createElement("span");return t.className="cm-placeholder",t.style.pointerEvents="none",t.appendChild("string"==typeof this.content?document.createTextNode(this.content):"function"==typeof this.content?this.content(e):this.content.cloneNode(!0)),t.setAttribute("aria-hidden","true"),t}coordsAt(e){let t=e.firstChild?ky(e.firstChild):[];if(!t.length)return null;let n=window.getComputedStyle(e.parentNode),r=Ty(t[0],"rtl"!=n.direction),i=parseInt(n.lineHeight);return r.bottom-r.top>1.5*i?{left:r.left,right:r.right,top:r.top,bottom:r.top+i}:r}ignoreEvent(){return!1}}const Xk=2e3;function Jk(e,t){let n=e.posAtCoords({x:t.clientX,y:t.clientY},!1),r=e.state.doc.lineAt(n),i=n-r.from,o=i>Xk?-1:i==r.length?function(e,t){let n=e.coordsAtPos(e.viewport.from);return n?Math.round(Math.abs((n.left-t)/e.defaultCharacterWidth)):-1}(e,t.clientX):Tb(r.text,e.state.tabSize,n-r.from);return{line:r.number,col:o,off:i}}function Gk(e,t){let n=Jk(e,t),r=e.state.selection;return n?{update(e){if(e.docChanged){let t=e.changes.mapPos(e.startState.doc.line(n.line).from),i=e.state.doc.lineAt(t);n={line:i.number,col:n.col,off:Math.min(n.off,i.length)},r=r.map(e.changes)}},get(t,i,o){let s=Jk(e,t);if(!s)return r;let a=function(e,t,n){let r=Math.min(t.line,n.line),i=Math.max(t.line,n.line),o=[];if(t.off>Xk||n.off>Xk||t.col<0||n.col<0){let s=Math.min(t.off,n.off),a=Math.max(t.off,n.off);for(let t=r;t<=i;t++){let n=e.doc.line(t);n.length<=a&&o.push(bA.range(n.from+s,n.to+a))}}else{let s=Math.min(t.col,n.col),a=Math.max(t.col,n.col);for(let t=r;t<=i;t++){let n=e.doc.line(t),r=Mb(n.text,s,e.tabSize,!0);if(r<0)o.push(bA.cursor(n.to));else{let t=Mb(n.text,a,e.tabSize);o.push(bA.range(n.from+r,n.from+t))}}}return o}(e.state,n,s);return a.length?o?bA.create(a.concat(r.ranges)):bA.create(a):r}}:null}function Kk(e){let t=(null==e?void 0:e.eventFilter)||(e=>e.altKey&&0==e.button);return rk.mouseSelectionStyle.of((e,n)=>t(n)?Gk(e,n):null)}const Zk={Alt:[18,e=>!!e.altKey],Control:[17,e=>!!e.ctrlKey],Shift:[16,e=>!!e.shiftKey],Meta:[91,e=>!!e.metaKey]},eS={style:"cursor: crosshair"};function tS(e={}){let[t,n]=Zk[e.key||"Alt"],r=MC.fromClass(class{constructor(e){this.view=e,this.isDown=!1}set(e){this.isDown!=e&&(this.isDown=e,this.view.update([]))}},{eventObservers:{keydown(e){this.set(e.keyCode==t||n(e))},keyup(e){e.keyCode!=t&&n(e)||this.set(!1)},mousemove(e){this.set(n(e))}}});return[r,rk.contentAttributes.of(e=>{var t;return(null===(t=e.plugin(r))||void 0===t?void 0:t.isDown)?eS:null})]}const nS="-10000px";class rS{constructor(e,t,n,r){this.facet=t,this.createTooltipView=n,this.removeTooltipView=r,this.input=e.state.facet(t),this.tooltips=this.input.filter(e=>e);let i=null;this.tooltipViews=this.tooltips.map(e=>i=n(e,i))}update(e,t){var n;let r=e.state.facet(this.facet),i=r.filter(e=>e);if(r===this.input){for(let t of this.tooltipViews)t.update&&t.update(e);return!1}let o=[],s=t?[]:null;for(let n=0;n<i.length;n++){let r=i[n],a=-1;if(r){for(let e=0;e<this.tooltips.length;e++){let t=this.tooltips[e];t&&t.create==r.create&&(a=e)}if(a<0)o[n]=this.createTooltipView(r,n?o[n-1]:null),s&&(s[n]=!!r.above);else{let r=o[n]=this.tooltipViews[a];s&&(s[n]=t[a]),r.update&&r.update(e)}}}for(let e of this.tooltipViews)o.indexOf(e)<0&&(this.removeTooltipView(e),null===(n=e.destroy)||void 0===n||n.call(e));return t&&(s.forEach((e,n)=>t[n]=e),t.length=s.length),this.input=r,this.tooltips=i,this.tooltipViews=o,!0}}function iS(e){let t=e.dom.ownerDocument.documentElement,n=t.clientWidth,r=getComputedStyle(t);if(!/stable/.test(r.scrollbarGutter||""))return{left:0,right:n};let i=t.getBoundingClientRect(),o=e.win.scrollX;return{left:Math.max(0,i.left+o-parseFloat(r.marginLeft)),right:Math.min(n,i.right+o+parseFloat(r.marginRight))}}function oS(e){let{left:t,right:n}=iS(e);return{top:0,left:t,right:n,bottom:e.dom.ownerDocument.documentElement.clientHeight}}const sS=xA.define({combine:e=>{var t,n,r;return{position:iy.ios?"absolute":(null===(t=e.find(e=>e.position))||void 0===t?void 0:t.position)||"fixed",parent:(null===(n=e.find(e=>e.parent))||void 0===n?void 0:n.parent)||null,tooltipSpace:(null===(r=e.find(e=>e.tooltipSpace))||void 0===r?void 0:r.tooltipSpace)||oS}}}),aS=new WeakMap,lS=MC.fromClass(class{constructor(e){this.view=e,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let t=e.state.facet(sS);this.position=t.position,this.parent=t.parent,this.classes=e.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver="function"==typeof ResizeObserver?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new rS(e,pS,(e,t)=>this.createTooltip(e,t),e=>{this.resizeObserver&&this.resizeObserver.unobserve(e.dom),e.dom.remove()}),this.above=this.manager.tooltips.map(e=>!!e.above),this.intersectionObserver="function"==typeof IntersectionObserver?new IntersectionObserver(e=>{Date.now()>this.lastTransaction-50&&e.length>0&&e[e.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),e.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let e of this.manager.tooltipViews)this.intersectionObserver.observe(e.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(e){e.transactions.length&&(this.lastTransaction=Date.now());let t=this.manager.update(e,this.above);t&&this.observeIntersection();let n=t||e.geometryChanged,r=e.state.facet(sS);if(r.position!=this.position&&!this.madeAbsolute){this.position=r.position;for(let e of this.manager.tooltipViews)e.dom.style.position=this.position;n=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();for(let e of this.manager.tooltipViews)this.container.appendChild(e.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(e,t){let n=e.create(this.view),r=t?t.dom:null;if(n.dom.classList.add("cm-tooltip"),e.arrow&&!n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let e=document.createElement("div");e.className="cm-tooltip-arrow",n.dom.appendChild(e)}return n.dom.style.position=this.position,n.dom.style.top=nS,n.dom.style.left="0px",this.container.insertBefore(n.dom,r),n.mount&&n.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(n.dom),n}destroy(){var e,t,n;this.view.win.removeEventListener("resize",this.measureSoon);for(let t of this.manager.tooltipViews)t.dom.remove(),null===(e=t.destroy)||void 0===e||e.call(t);this.parent&&this.container.remove(),null===(t=this.resizeObserver)||void 0===t||t.disconnect(),null===(n=this.intersectionObserver)||void 0===n||n.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let e=1,t=1,n=!1,r=0;if("fixed"==this.position&&this.manager.tooltipViews.length){let{dom:e}=this.manager.tooltipViews[0];if(iy.safari){let t=e.getBoundingClientRect();n=Math.abs(t.top+1e4)>1||Math.abs(t.left)>1}else n=!!e.offsetParent&&e.offsetParent!=this.container.ownerDocument.body}if(n||"absolute"==this.position)if(this.parent){let n=this.parent.getBoundingClientRect();n.width&&n.height&&(e=n.width/this.parent.offsetWidth,t=n.height/this.parent.offsetHeight)}else({scaleX:e,scaleY:t}=this.view.viewState);else r=iS(this.view).left;let i=this.view.scrollDOM.getBoundingClientRect(),o=zC(this.view);return{visible:{left:i.left+o.left,top:i.top+o.top,right:i.right-o.right,bottom:i.bottom-o.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((e,t)=>{let n=this.manager.tooltipViews[t];return n.getCoords?n.getCoords(e.pos):this.view.coordsAtPos(e.pos)}),size:this.manager.tooltipViews.map(({dom:e})=>e.getBoundingClientRect()),space:this.view.state.facet(sS).tooltipSpace(this.view),scaleX:e,scaleY:t,makeAbsolute:n,fixedLeft:r}}writeMeasure(e){var t;if(e.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let e of this.manager.tooltipViews)e.dom.style.position="absolute"}let{visible:n,space:r,scaleX:i,scaleY:o}=e,s=[];for(let a=0;a<this.manager.tooltips.length;a++){let l=this.manager.tooltips[a],c=this.manager.tooltipViews[a],{dom:d}=c,u=e.pos[a],p=e.size[a];if(!u||!1!==l.clip&&(u.bottom<=Math.max(n.top,r.top)||u.top>=Math.min(n.bottom,r.bottom)||u.right<Math.max(n.left,r.left)-.1||u.left>Math.min(n.right,r.right)+.1)){d.style.top=nS;continue}let h=l.arrow?c.dom.querySelector(".cm-tooltip-arrow"):null,f=h?7:0,g=p.right-p.left,m=null!==(t=aS.get(c))&&void 0!==t?t:p.bottom-p.top,v=c.offset||uS,A=this.view.textDirection==qy.LTR,b=p.width>r.right-r.left?A?r.left:r.right-p.width:A?Math.max(r.left,Math.min(u.left-(h?14:0)+v.x,r.right-g)):Math.min(Math.max(r.left,u.left-g+(h?14:0)-v.x),r.right-g),y=this.above[a];!l.strictSide&&(y?u.top-m-f-v.y<r.top:u.bottom+m+f+v.y>r.bottom)&&y==r.bottom-u.bottom>u.top-r.top&&(y=this.above[a]=!y);let C=(y?u.top-r.top:r.bottom-u.bottom)-f;if(C<m&&!1!==c.resize){if(C<this.view.defaultLineHeight){d.style.top=nS;continue}aS.set(c,m),d.style.height=(m=C)/o+"px"}else d.style.height&&(d.style.height="");let x=y?u.top-m-f-v.y:u.bottom+f+v.y,w=b+g;if(!0!==c.overlap)for(let e of s)e.left<w&&e.right>b&&e.top<x+m&&e.bottom>x&&(x=y?e.top-m-2-f:e.bottom+f+2);if("absolute"==this.position?(d.style.top=(x-e.parent.top)/o+"px",cS(d,(b-e.parent.left)/i)):(d.style.top=x/o+"px",cS(d,(b-e.fixedLeft)/i)),h){let e=u.left+(A?v.x:-v.x)-(b+14-7);h.style.left=e/i+"px"}!0!==c.overlap&&s.push({left:b,top:x,right:w,bottom:x+m}),d.classList.toggle("cm-tooltip-above",y),d.classList.toggle("cm-tooltip-below",!y),c.positioned&&c.positioned(e.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let e of this.manager.tooltipViews)e.dom.style.top=nS}},{eventObservers:{scroll(){this.maybeMeasure()}}});function cS(e,t){let n=parseInt(e.style.left,10);(isNaN(n)||Math.abs(t-n)>1)&&(e.style.left=t+"px")}const dS=rk.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:"14px",position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),uS={x:0,y:0},pS=xA.define({enables:[lS,dS]}),hS=xA.define({combine:e=>e.reduce((e,t)=>e.concat(t),[])});class fS{static create(e){return new fS(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new rS(e,hS,(e,t)=>this.createHostedView(e,t),e=>e.dom.remove())}createHostedView(e,t){let n=e.create(this.view);return n.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(n.dom,t?t.dom.nextSibling:this.dom.firstChild),this.mounted&&n.mount&&n.mount(this.view),n}mount(e){for(let t of this.manager.tooltipViews)t.mount&&t.mount(e);this.mounted=!0}positioned(e){for(let t of this.manager.tooltipViews)t.positioned&&t.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let t of this.manager.tooltipViews)null===(e=t.destroy)||void 0===e||e.call(t)}passProp(e){let t;for(let n of this.manager.tooltipViews){let r=n[e];if(void 0!==r)if(void 0===t)t=r;else if(t!==r)return}return t}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const gS=pS.compute([hS],e=>{let t=e.facet(hS);return 0===t.length?null:{pos:Math.min(...t.map(e=>e.pos)),end:Math.max(...t.map(e=>{var t;return null!==(t=e.end)&&void 0!==t?t:e.pos})),create:fS.create,above:t[0].above,arrow:t.some(e=>e.arrow)}}),mS=xA.define();class vS{constructor(e,t,n,r,i,o){this.view=e,this.source=t,this.field=n,this.locked=r,this.setHover=i,this.hoverTime=o,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(e){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;e<this.hoverTime?this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-e):this.startHover()}startHover(){clearTimeout(this.restartTimeout);let{view:e,lastMove:t}=this,n=e.docView.tile.nearest(t.target);if(!n)return;let r,i=1;if(n.isWidget())r=n.posAtStart;else{if(r=e.posAtCoords(t),null==r)return;let n=e.coordsAtPos(r);if(!n||t.y<n.top||t.y>n.bottom||t.x<n.left-e.defaultCharacterWidth||t.x>n.right+e.defaultCharacterWidth)return;let o=e.bidiSpans(e.state.doc.lineAt(r)).find(e=>e.from<=r&&e.to>=r),s=o&&o.dir==qy.RTL?-1:1;i=t.x<n.left?-s:s}this.activateHover(e,r,i)}activateHover(e,t,n,r){let i=this.source(e,t,n),o=t=>{if(t&&(!Array.isArray(t)||t.length)){let n=Array.isArray(t)?t:[t];r&&this.locked.set(n,r),e.dispatch({effects:this.setHover.of(n)})}};if(i&&"then"in i){let n=this.pending={pos:t};i.then(e=>{this.pending==n&&(this.pending=null,o(e))},t=>_C(e.state,t,"hover tooltip"))}else o(i)}get tooltip(){let e=this.view.plugin(lS),t=e?e.manager.tooltips.findIndex(e=>e.create==fS.create):-1;return t>-1?e.manager.tooltipViews[t]:null}mousemove(e){var t,n;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:r,tooltip:i}=this;if(r.length&&!this.locked.has(r)&&i&&!function(e,t){let n,{left:r,right:i,top:o,bottom:s}=e.getBoundingClientRect();if(n=e.querySelector(".cm-tooltip-arrow")){let e=n.getBoundingClientRect();o=Math.min(e.top,o),s=Math.max(e.bottom,s)}return t.clientX>=r-4&&t.clientX<=i+4&&t.clientY>=o-4&&t.clientY<=s+4}(i.dom,e)||this.pending){let{pos:i}=r[0]||this.pending,o=null!==(n=null===(t=r[0])||void 0===t?void 0:t.end)&&void 0!==n?n:i;(i==o?this.view.posAtCoords(this.lastMove)==i:function(e,t,n,r,i){let o=e.scrollDOM.getBoundingClientRect(),s=e.documentTop+e.documentPadding.top+e.contentHeight;if(o.left>r||o.right<r||o.top>i||Math.min(o.bottom,s)<i)return!1;let a=e.posAtCoords({x:r,y:i},!1);return a>=t&&a<=n}(this.view,i,o,e.clientX,e.clientY))||(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:t}=this;if(t.length&&!this.locked.has(t)){let{tooltip:t}=this;t&&t.dom.contains(e.relatedTarget)?this.watchTooltipLeave(t.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let t=n=>{e.removeEventListener("mouseleave",t);let{active:r}=this;!r.length||this.locked.has(r)||this.view.dom.contains(n.relatedTarget)||this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",t)}destroy(){clearTimeout(this.hoverTimeout),clearTimeout(this.restartTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}function AS(e,t={}){let n=KA.define(),r=new WeakMap,i=EA.define({create:()=>[],update(e,o){let s=r.get(e);if(e.length&&(t.hideOnChange&&(o.docChanged||o.selection)||s&&s(o)?e=[]:t.hideOn&&(e=e.filter(e=>!t.hideOn(o,e)))),o.docChanged&&e.length){let t=[];for(let n of e){let e=o.changes.mapPos(n.pos,-1,cA.TrackDel);if(null!=e){let r=Object.assign(Object.create(null),n);r.pos=e,null!=r.end&&(r.end=o.changes.mapPos(r.end)),t.push(r)}}e=t}for(let t of o.effects)t.is(n)&&(e=t.value,s=void 0),(t.is(yS)&&!t.value||t.value==i)&&(e=[]);return e.length&&s&&r.set(e,s),e},provide:e=>hS.from(e)});const o=MC.define(o=>new vS(o,e,i,r,n,t.hoverTime||300));return{active:i,extension:[i,o,mS.of(o),gS]}}function bS(e,t){let n=e.plugin(lS);if(!n)return null;let r=n.manager.tooltips.indexOf(t);return r<0?null:n.manager.tooltipViews[r]}const yS=KA.define();const CS=xA.define({combine(e){let t,n;for(let r of e)t=t||r.topContainer,n=n||r.bottomContainer;return{topContainer:t,bottomContainer:n}}});function xS(e,t){let n=e.plugin(wS),r=n?n.specs.indexOf(t):-1;return r>-1?n.panels[r]:null}const wS=MC.fromClass(class{constructor(e){this.input=e.state.facet(OS),this.specs=this.input.filter(e=>e),this.panels=this.specs.map(t=>t(e));let t=e.state.facet(CS);this.top=new kS(e,!0,t.topContainer),this.bottom=new kS(e,!1,t.bottomContainer),this.top.sync(this.panels.filter(e=>e.top)),this.bottom.sync(this.panels.filter(e=>!e.top));for(let e of this.panels)e.dom.classList.add("cm-panel"),e.mount&&e.mount()}update(e){let t=e.state.facet(CS);this.top.container!=t.topContainer&&(this.top.sync([]),this.top=new kS(e.view,!0,t.topContainer)),this.bottom.container!=t.bottomContainer&&(this.bottom.sync([]),this.bottom=new kS(e.view,!1,t.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=e.state.facet(OS);if(n!=this.input){let t=n.filter(e=>e),r=[],i=[],o=[],s=[];for(let n of t){let t,a=this.specs.indexOf(n);a<0?(t=n(e.view),s.push(t)):(t=this.panels[a],t.update&&t.update(e)),r.push(t),(t.top?i:o).push(t)}this.specs=t,this.panels=r,this.top.sync(i),this.bottom.sync(o);for(let e of s)e.dom.classList.add("cm-panel"),e.mount&&e.mount()}else for(let t of this.panels)t.update&&t.update(e)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:e=>rk.scrollMargins.of(t=>{let n=t.plugin(e);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})});class kS{constructor(e,t,n){this.view=e,this.top=t,this.container=n,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let t of this.panels)t.destroy&&e.indexOf(t)<0&&t.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(0==this.panels.length)return void(this.dom&&(this.dom.remove(),this.dom=void 0));if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom";let e=this.container||this.view.dom;e.insertBefore(this.dom,this.top?e.firstChild:null)}let e=this.dom.firstChild;for(let t of this.panels)if(t.dom.parentNode==this.dom){for(;e!=t.dom;)e=SS(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=SS(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(this.container&&this.classes!=this.view.themeClasses){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function SS(e){let t=e.nextSibling;return e.remove(),t}const OS=xA.define({enables:wS});function _S(e,t){let n,r=new Promise(e=>n=e),i=e=>function(e,t,n){let r=t.content?t.content(e,()=>a(null)):null;if(!r){if(r=Hb("form"),t.input){let e=Hb("input",t.input);/^(text|password|number|email|tel|url)$/.test(e.type)&&e.classList.add("cm-textfield"),e.name||(e.name="input"),r.appendChild(Hb("label",(t.label||"")+": ",e))}else r.appendChild(document.createTextNode(t.label||""));r.appendChild(document.createTextNode(" ")),r.appendChild(Hb("button",{class:"cm-button",type:"submit"},t.submitLabel||"OK"))}let i="FORM"==r.nodeName?[r]:r.querySelectorAll("form");for(let e=0;e<i.length;e++){let t=i[e];t.addEventListener("keydown",e=>{27==e.keyCode?(e.preventDefault(),a(null)):13==e.keyCode&&(e.preventDefault(),a(t))}),t.addEventListener("submit",e=>{e.preventDefault(),a(t)})}let o=Hb("div",r,Hb("button",{onclick:()=>a(null),"aria-label":e.state.phrase("close"),class:"cm-dialog-close",type:"button"},["×"]));t.class&&(o.className=t.class);o.classList.add("cm-dialog");let s="string"==typeof t.focus?r.querySelector(t.focus):t.focus?r.querySelector("input")||r.querySelector("button"):null;function a(t){o.contains(o.ownerDocument.activeElement)&&e.focus(),n(t)}return{dom:o,top:t.top,mount:()=>{s&&("select"in s?s.select():"focus"in s&&s.focus())},destroy:()=>n(null)}}(e,t,n);e.state.field(BS,!1)?e.dispatch({effects:ES.of(i)}):e.dispatch({effects:KA.appendConfig.of(BS.init(()=>[i]))});let o=TS.of(i);return{close:o,result:r.then(t=>((e.win.queueMicrotask||(t=>e.win.setTimeout(t,10)))(()=>{e.state.field(BS).indexOf(i)>-1&&e.dispatch({effects:o})}),t))}}const BS=EA.define({create:()=>[],update(e,t){for(let n of t.effects)n.is(ES)?e=[n.value].concat(e):n.is(TS)&&(e=e.filter(e=>e!=n.value));return e},provide:e=>OS.computeN([e],t=>t.field(e))}),ES=KA.define(),TS=KA.define();class MS extends pb{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}MS.prototype.elementClass="",MS.prototype.toDOM=void 0,MS.prototype.mapMode=cA.TrackBefore,MS.prototype.startSide=MS.prototype.endSide=-1,MS.prototype.point=!0;const DS=xA.define(),PS=xA.define(),RS={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>vb.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{},side:"before"},IS=xA.define();function NS(e){return[$S(),IS.of({...RS,...e})]}const LS=xA.define({combine:e=>e.some(e=>e)});function $S(e){let t=[FS];return e&&!1===e.fixed&&t.push(LS.of(!0)),t}const FS=MC.fromClass(class{constructor(e){this.view=e,this.domAfter=null,this.prevViewport=e.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters cm-gutters-before",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=e.state.facet(IS).map(t=>new zS(e,t)),this.fixed=!e.state.facet(LS);for(let e of this.gutters)"after"==e.config.side?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),e.scrollDOM.insertBefore(this.dom,e.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement("div"),this.domAfter.className="cm-gutters cm-gutters-after",this.domAfter.setAttribute("aria-hidden","true"),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.domAfter.style.position=this.fixed?"sticky":"",this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(e){if(this.updateGutters(e)){let t=this.prevViewport,n=e.view.viewport,r=Math.min(t.to,n.to)-Math.max(t.from,n.from);this.syncGutters(r<.8*(n.to-n.from))}if(e.geometryChanged){let e=this.view.contentHeight/this.view.scaleY+"px";this.dom.style.minHeight=e,this.domAfter&&(this.domAfter.style.minHeight=e)}this.view.state.facet(LS)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":"",this.domAfter&&(this.domAfter.style.position=this.fixed?"sticky":"")),this.prevViewport=e.view.viewport}syncGutters(e){let t=this.dom.nextSibling;e&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let n=vb.iter(this.view.state.facet(DS),this.view.viewport.from),r=[],i=this.gutters.map(e=>new WS(e,this.view.viewport,-this.view.documentPadding.top));for(let e of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(e.type)){let t=!0;for(let o of e.type)if(o.type==uy.Text&&t){VS(n,r,o.from);for(let e of i)e.line(this.view,o,r);t=!1}else if(o.widget)for(let e of i)e.widget(this.view,o)}else if(e.type==uy.Text){VS(n,r,e.from);for(let t of i)t.line(this.view,e,r)}else if(e.widget)for(let t of i)t.widget(this.view,e);for(let e of i)e.finish();e&&(this.view.scrollDOM.insertBefore(this.dom,t),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(e){let t=e.startState.facet(IS),n=e.state.facet(IS),r=e.docChanged||e.heightChanged||e.viewportChanged||!vb.eq(e.startState.facet(DS),e.state.facet(DS),e.view.viewport.from,e.view.viewport.to);if(t==n)for(let t of this.gutters)t.update(e)&&(r=!0);else{r=!0;let i=[];for(let r of n){let n=t.indexOf(r);n<0?i.push(new zS(this.view,r)):(this.gutters[n].update(e),i.push(this.gutters[n]))}for(let e of this.gutters)e.dom.remove(),i.indexOf(e)<0&&e.destroy();for(let e of i)"after"==e.config.side?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.gutters=i}return r}destroy(){for(let e of this.gutters)e.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:e=>rk.scrollMargins.of(t=>{let n=t.plugin(e);if(!n||0==n.gutters.length||!n.fixed)return null;let r=n.dom.offsetWidth*t.scaleX,i=n.domAfter?n.domAfter.offsetWidth*t.scaleX:0;return t.textDirection==qy.LTR?{left:r,right:i}:{right:r,left:i}})});function jS(e){return Array.isArray(e)?e:[e]}function VS(e,t,n){for(;e.value&&e.from<=n;)e.from==n&&t.push(e.value),e.next()}class WS{constructor(e,t,n){this.gutter=e,this.height=n,this.i=0,this.cursor=vb.iter(e.markers,t.from)}addElement(e,t,n){let{gutter:r}=this,i=(t.top-this.height)/e.scaleY,o=t.height/e.scaleY;if(this.i==r.elements.length){let t=new QS(e,o,i,n);r.elements.push(t),r.dom.appendChild(t.dom)}else r.elements[this.i].update(e,o,i,n);this.height=t.bottom,this.i++}line(e,t,n){let r=[];VS(this.cursor,r,t.from),n.length&&(r=r.concat(n));let i=this.gutter.config.lineMarker(e,t,r);i&&r.unshift(i);let o=this.gutter;(0!=r.length||o.config.renderEmptyElements)&&this.addElement(e,t,r)}widget(e,t){let n=this.gutter.config.widgetMarker(e,t.widget,t),r=n?[n]:null;for(let n of e.state.facet(PS)){let i=n(e,t.widget,t);i&&(r||(r=[])).push(i)}r&&this.addElement(e,t,r)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}}class zS{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let n in t.domEventHandlers)this.dom.addEventListener(n,r=>{let i,o=r.target;if(o!=this.dom&&this.dom.contains(o)){for(;o.parentNode!=this.dom;)o=o.parentNode;let e=o.getBoundingClientRect();i=(e.top+e.bottom)/2}else i=r.clientY;let s=e.lineBlockAtHeight(i-e.documentTop);t.domEventHandlers[n](e,s,r)&&r.preventDefault()});this.markers=jS(t.markers(e)),t.initialSpacer&&(this.spacer=new QS(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let t=this.markers;if(this.markers=jS(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let t=this.config.updateSpacer(this.spacer.markers[0],e);t!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[t])}let n=e.view.viewport;return!vb.eq(this.markers,t,n.from,n.to)||!!this.config.lineMarkerChange&&this.config.lineMarkerChange(e)}destroy(){for(let e of this.elements)e.destroy()}}class QS{constructor(e,t,n,r){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,n,r)}update(e,t,n,r){this.height!=t&&(this.height=t,this.dom.style.height=t+"px"),this.above!=n&&(this.dom.style.marginTop=(this.above=n)?n+"px":""),function(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].compare(t[n]))return!1;return!0}(this.markers,r)||this.setMarkers(e,r)}setMarkers(e,t){let n="cm-gutterElement",r=this.dom.firstChild;for(let i=0,o=0;;){let s=o,a=i<t.length?t[i++]:null,l=!1;if(a){let e=a.elementClass;e&&(n+=" "+e);for(let e=o;e<this.markers.length;e++)if(this.markers[e].compare(a)){s=e,l=!0;break}}else s=this.markers.length;for(;o<s;){let e=this.markers[o++];if(e.toDOM){e.destroy(r);let t=r.nextSibling;r.remove(),r=t}}if(!a)break;a.toDOM&&(l?r=r.nextSibling:this.dom.insertBefore(a.toDOM(e),r)),l&&o++}this.dom.className=n,this.markers=t}destroy(){this.setMarkers(null,[])}}const HS=xA.define(),qS=xA.define(),US=xA.define({combine:e=>ub(e,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,t){let n=Object.assign({},e);for(let e in t){let r=n[e],i=t[e];n[e]=r?(e,t,n)=>r(e,t,n)||i(e,t,n):i}return n}})});class YS extends MS{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function XS(e,t){return e.state.facet(US).formatNumber(t,e.state)}const JS=IS.compute([US],e=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers:e=>e.state.facet(HS),lineMarker:(e,t,n)=>n.some(e=>e.toDOM)?null:new YS(XS(e,e.state.doc.lineAt(t.from).number)),widgetMarker:(e,t,n)=>{for(let r of e.state.facet(qS)){let i=r(e,t,n);if(i)return i}return null},lineMarkerChange:e=>e.startState.facet(US)!=e.state.facet(US),initialSpacer:e=>new YS(XS(e,KS(e.state.doc.lines))),updateSpacer(e,t){let n=XS(t.view,KS(t.view.state.doc.lines));return n==e.number?e:new YS(n)},domEventHandlers:e.facet(US).domEventHandlers,side:"before"}));function GS(e={}){return[US.of(e),$S(),JS]}function KS(e){let t=9;for(;t<e;)t=10*t+9;return t}const ZS=new class extends MS{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},eO=DS.compute(["selection"],e=>{let t=[],n=-1;for(let r of e.selection.ranges){let i=e.doc.lineAt(r.head).from;i>n&&(n=i,t.push(ZS.range(i)))}return vb.of(t)});const tO=1024;let nO=0;class rO{constructor(e,t){this.from=e,this.to=t}}class iO{constructor(e={}){this.id=nO++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")}),this.combine=e.combine||null}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return"function"!=typeof e&&(e=aO.match(e)),t=>{let n=e(t);return void 0===n?null:[this,n]}}}iO.closedBy=new iO({deserialize:e=>e.split(" ")}),iO.openedBy=new iO({deserialize:e=>e.split(" ")}),iO.group=new iO({deserialize:e=>e.split(" ")}),iO.isolate=new iO({deserialize:e=>{if(e&&"rtl"!=e&&"ltr"!=e&&"auto"!=e)throw new RangeError("Invalid value for isolate: "+e);return e||"auto"}}),iO.contextHash=new iO({perNode:!0}),iO.lookAhead=new iO({perNode:!0}),iO.mounted=new iO({perNode:!0});class oO{constructor(e,t,n,r=!1){this.tree=e,this.overlay=t,this.parser=n,this.bracketed=r}static get(e){return e&&e.props&&e.props[iO.mounted.id]}}const sO=Object.create(null);class aO{constructor(e,t,n,r=0){this.name=e,this.props=t,this.id=n,this.flags=r}static define(e){let t=e.props&&e.props.length?Object.create(null):sO,n=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(null==e.name?8:0),r=new aO(e.name||"",t,e.id,n);if(e.props)for(let n of e.props)if(Array.isArray(n)||(n=n(r)),n){if(n[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[n[0].id]=n[1]}return r}prop(e){return this.props[e.id]}get isTop(){return(1&this.flags)>0}get isSkipped(){return(2&this.flags)>0}get isError(){return(4&this.flags)>0}get isAnonymous(){return(8&this.flags)>0}is(e){if("string"==typeof e){if(this.name==e)return!0;let t=this.prop(iO.group);return!!t&&t.indexOf(e)>-1}return this.id==e}static match(e){let t=Object.create(null);for(let n in e)for(let r of n.split(" "))t[r]=e[n];return e=>{for(let n=e.prop(iO.group),r=-1;r<(n?n.length:0);r++){let i=t[r<0?e.name:n[r]];if(i)return i}}}}aO.none=new aO("",Object.create(null),0,8);class lO{constructor(e){this.types=e;for(let t=0;t<e.length;t++)if(e[t].id!=t)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let t=[];for(let n of this.types){let r=null;for(let t of e){let e=t(n);if(e){r||(r=Object.assign({},n.props));let t=e[1],i=e[0];i.combine&&i.id in r&&(t=i.combine(r[i.id],t)),r[i.id]=t}}t.push(r?new aO(n.name,r,n.id,n.flags):n)}return new lO(t)}}const cO=new WeakMap,dO=new WeakMap;var uO;!function(e){e[e.ExcludeBuffers=1]="ExcludeBuffers",e[e.IncludeAnonymous=2]="IncludeAnonymous",e[e.IgnoreMounts=4]="IgnoreMounts",e[e.IgnoreOverlays=8]="IgnoreOverlays",e[e.EnterBracketed=16]="EnterBracketed"}(uO||(uO={}));class pO{constructor(e,t,n,r,i){if(this.type=e,this.children=t,this.positions=n,this.length=r,this.props=null,i&&i.length){this.props=Object.create(null);for(let[e,t]of i)this.props["number"==typeof e?e:e.id]=t}}toString(){let e=oO.get(this);if(e&&!e.overlay)return e.tree.toString();let t="";for(let e of this.children){let n=e.toString();n&&(t&&(t+=","),t+=n)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?"("+t+")":""):t}cursor(e=0){return new SO(this.topNode,e)}cursorAt(e,t=0,n=0){let r=cO.get(this)||this.topNode,i=new SO(r);return i.moveTo(e,t),cO.set(this,i._tree),i}get topNode(){return new AO(this,0,0,null)}resolve(e,t=0){let n=mO(cO.get(this)||this.topNode,e,t,!1);return cO.set(this,n),n}resolveInner(e,t=0){let n=mO(dO.get(this)||this.topNode,e,t,!0);return dO.set(this,n),n}resolveStack(e,t=0){return function(e,t,n){let r=e.resolveInner(t,n),i=null;for(let e=r instanceof AO?r:r.context.parent;e;e=e.parent)if(e.index<0){let o=e.parent;(i||(i=[r])).push(o.resolve(t,n)),e=o}else{let o=oO.get(e.tree);if(o&&o.overlay&&o.overlay[0].from<=t&&o.overlay[o.overlay.length-1].to>=t){let s=new AO(o.tree,o.overlay[0].from+e.from,-1,e);(i||(i=[r])).push(mO(s,t,n,!1))}}return i?wO(i):r}(this,e,t)}iterate(e){let{enter:t,leave:n,from:r=0,to:i=this.length}=e,o=e.mode||0,s=(o&uO.IncludeAnonymous)>0;for(let e=this.cursor(o|uO.IncludeAnonymous);;){let o=!1;if(e.from<=i&&e.to>=r&&(!s&&e.type.isAnonymous||!1!==t(e))){if(e.firstChild())continue;o=!0}for(;o&&n&&(s||!e.type.isAnonymous)&&n(e),!e.nextSibling();){if(!e.parent())return;o=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:EO(aO.none,this.children,this.positions,0,this.children.length,0,this.length,(e,t,n)=>new pO(this.type,e,t,n,this.propValues),e.makeTree||((e,t,n)=>new pO(aO.none,e,t,n)))}static build(e){return function(e){var t;let{buffer:n,nodeSet:r,maxBufferLength:i=tO,reused:o=[],minRepeatType:s=r.types.length}=e,a=Array.isArray(n)?new hO(n,n.length):n,l=r.types,c=0,d=0;function u(e,t,n,A,b,y){let{id:C,start:x,end:w,size:k}=a,S=d,O=c;if(k<0){if(a.next(),-1==k){let t=o[C];return n.push(t),void A.push(x-e)}if(-3==k)return void(c=C);if(-4==k)return void(d=C);throw new RangeError(`Unrecognized record size: ${k}`)}let _,B,E=l[C],T=x-e;if(w-x<=i&&(B=m(a.pos-t,b))){let t=new Uint16Array(B.size-B.skip),n=a.pos-B.size,i=t.length;for(;a.pos>n;)i=v(B.start,t,i);_=new fO(t,w-B.start,r),T=B.start-e}else{let e=a.pos-k;a.next();let t=[],n=[],l=C>=s?C:-1,c=0,m=w,v=S;for(;a.pos>e;)l>=0&&a.id==l&&a.size>=0?(a.end<=m-i&&(f(t,n,x,c,a.end,m,l,v,O),c=t.length,m=a.end,v=d),a.next()):y>2500?p(x,e,t,n):(l>=0&&-1==a.size&&o[a.id].type==r.types[l]&&(c<t.length&&f(t,n,x,c,a.end,m,l,v,O),c=t.length+1,m=a.start,v=d),u(x,e,t,n,l,y+1));if(l>=0&&c>0&&c<t.length&&f(t,n,x,c,x,m,l,v,O),t.reverse(),n.reverse(),l>-1&&c>0){let e=h(E,O);_=EO(E,t,n,0,t.length,0,w-x,e,e)}else _=g(E,t,n,w-x,S-w,O)}n.push(_),A.push(T)}function p(e,t,n,o){let s=[],l=0,c=-1;for(;a.pos>t;){let{id:e,start:t,end:n,size:r}=a;if(r>4)a.next();else{if(c>-1&&t<c)break;c<0&&(c=n-i),s.push(e,t,n),l++,a.next()}}if(l){let t=new Uint16Array(4*l),i=s[s.length-2];for(let e=s.length-3,n=0;e>=0;e-=3)t[n++]=s[e],t[n++]=s[e+1]-i,t[n++]=s[e+2]-i,t[n++]=n;n.push(new fO(t,s[2]-i,r)),o.push(i-e)}}function h(e,t){return(n,r,i)=>{let o,s,a=0,l=n.length-1;if(l>=0&&(o=n[l])instanceof pO){if(!l&&o.type==e&&o.length==i)return o;(s=o.prop(iO.lookAhead))&&(a=r[l]+o.length+s-i)}return g(e,n,r,i,a,t)}}function f(e,t,n,i,o,s,a,l,c){let d=[],u=[];for(;e.length>i;)d.push(e.pop()),u.push(t.pop()+n-o);e.push(g(r.types[a],d,u,s-o,l-s,c)),t.push(o-n)}function g(e,t,n,r,i,o,s){if(o){let e=[iO.contextHash,o];s=s?[e].concat(s):[e]}if(i>25){let e=[iO.lookAhead,i];s=s?[e].concat(s):[e]}return new pO(e,t,n,r,s)}function m(e,t){let n=a.fork(),r=0,o=0,l=0,c=n.end-i,d={size:0,start:0,skip:0};e:for(let i=n.pos-e;n.pos>i;){let e=n.size;if(n.id==t&&e>=0){d.size=r,d.start=o,d.skip=l,l+=4,r+=4,n.next();continue}let a=n.pos-e;if(e<0||a<i||n.start<c)break;let u=n.id>=s?4:0,p=n.start;for(n.next();n.pos>a;){if(n.size<0){if(-3!=n.size&&-4!=n.size)break e;u+=4}else n.id>=s&&(u+=4);n.next()}o=p,r+=e,l+=u}return(t<0||r==e)&&(d.size=r,d.start=o,d.skip=l),d.size>4?d:void 0}function v(e,t,n){let{id:r,start:i,end:o,size:l}=a;if(a.next(),l>=0&&r<s){let s=n;if(l>4){let r=a.pos-(l-4);for(;a.pos>r;)n=v(e,t,n)}t[--n]=s,t[--n]=o-e,t[--n]=i-e,t[--n]=r}else-3==l?c=r:-4==l&&(d=r);return n}let A=[],b=[];for(;a.pos>0;)u(e.start||0,e.bufferStart||0,A,b,-1,0);let y=null!==(t=e.length)&&void 0!==t?t:A.length?b[0]+A[0].length:0;return new pO(l[e.topID],A.reverse(),b.reverse(),y)}(e)}}pO.empty=new pO(aO.none,[],[],0);class hO{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new hO(this.buffer,this.index)}}class fO{constructor(e,t,n){this.buffer=e,this.length=t,this.set=n}get type(){return aO.none}toString(){let e=[];for(let t=0;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(",")}childString(e){let t=this.buffer[e],n=this.buffer[e+3],r=this.set.types[t],i=r.name;if(/\W/.test(i)&&!r.isError&&(i=JSON.stringify(i)),n==(e+=4))return i;let o=[];for(;e<n;)o.push(this.childString(e)),e=this.buffer[e+3];return i+"("+o.join(",")+")"}findChild(e,t,n,r,i){let{buffer:o}=this,s=-1;for(let a=e;a!=t&&!(gO(i,r,o[a+1],o[a+2])&&(s=a,n>0));a=o[a+3]);return s}slice(e,t,n){let r=this.buffer,i=new Uint16Array(t-e),o=0;for(let s=e,a=0;s<t;){i[a++]=r[s++],i[a++]=r[s++]-n;let t=i[a++]=r[s++]-n;i[a++]=r[s++]-e,o=Math.max(o,t)}return new fO(i,o,this.set)}}function gO(e,t,n,r){switch(e){case-2:return n<t;case-1:return r>=t&&n<t;case 0:return n<t&&r>t;case 1:return n<=t&&r>t;case 2:return r>t;case 4:return!0}}function mO(e,t,n,r){for(var i;e.from==e.to||(n<1?e.from>=t:e.from>t)||(n>-1?e.to<=t:e.to<t);){let t=!r&&e instanceof AO&&e.index<0?null:e.parent;if(!t)return e;e=t}let o=r?0:uO.IgnoreOverlays;if(r)for(let r=e,s=r.parent;s;r=s,s=r.parent)r instanceof AO&&r.index<0&&(null===(i=s.enter(t,n,o))||void 0===i?void 0:i.from)!=r.from&&(e=s);for(;;){let r=e.enter(t,n,o);if(!r)return e;e=r}}class vO{cursor(e=0){return new SO(this,e)}getChild(e,t=null,n=null){let r=bO(this,e,t,n);return r.length?r[0]:null}getChildren(e,t=null,n=null){return bO(this,e,t,n)}resolve(e,t=0){return mO(this,e,t,!1)}resolveInner(e,t=0){return mO(this,e,t,!0)}matchContext(e){return yO(this.parent,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),n=this;for(;t;){let e=t.lastChild;if(!e||e.to!=t.to)break;e.type.isError&&e.from==e.to?(n=t,t=e.prevSibling):t=e}return n}get node(){return this}get next(){return this.parent}}class AO extends vO{constructor(e,t,n,r){super(),this._tree=e,this.from=t,this.index=n,this._parent=r}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,t,n,r,i=0){for(let o=this;;){for(let{children:s,positions:a}=o._tree,l=t>0?s.length:-1;e!=l;e+=t){let l,c=s[e],d=a[e]+o.from;if(i&uO.EnterBracketed&&c instanceof pO&&(l=oO.get(c))&&!l.overlay&&l.bracketed&&n>=d&&n<=d+c.length||gO(r,n,d,d+c.length))if(c instanceof fO){if(i&uO.ExcludeBuffers)continue;let s=c.findChild(0,c.buffer.length,t,n-d,r);if(s>-1)return new xO(new CO(o,c,e,d),null,s)}else if(i&uO.IncludeAnonymous||!c.type.isAnonymous||OO(c)){let s;if(!(i&uO.IgnoreMounts)&&(s=oO.get(c))&&!s.overlay)return new AO(s.tree,d,e,o);let a=new AO(c,d,e,o);return i&uO.IncludeAnonymous||!a.type.isAnonymous?a:a.nextChild(t<0?c.children.length-1:0,t,n,r,i)}}if(i&uO.IncludeAnonymous||!o.type.isAnonymous)return null;if(e=o.index>=0?o.index+t:t<0?-1:o._parent._tree.children.length,o=o._parent,!o)return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}prop(e){return this._tree.prop(e)}enter(e,t,n=0){let r;if(!(n&uO.IgnoreOverlays)&&(r=oO.get(this._tree))&&r.overlay){let i=e-this.from,o=n&uO.EnterBracketed&&r.bracketed;for(let{from:e,to:n}of r.overlay)if((t>0||o?e<=i:e<i)&&(t<0||o?n>=i:n>i))return new AO(r.tree,r.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,n)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function bO(e,t,n,r){let i=e.cursor(),o=[];if(!i.firstChild())return o;if(null!=n)for(let e=!1;!e;)if(e=i.type.is(n),!i.nextSibling())return o;for(;;){if(null!=r&&i.type.is(r))return o;if(i.type.is(t)&&o.push(i.node),!i.nextSibling())return null==r?o:[]}}function yO(e,t,n=t.length-1){for(let r=e;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(t[n]&&t[n]!=r.name)return!1;n--}}return!0}class CO{constructor(e,t,n,r){this.parent=e,this.buffer=t,this.index=n,this.start=r}}class xO extends vO{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,n){super(),this.context=e,this._parent=t,this.index=n,this.type=e.buffer.set.types[e.buffer.buffer[n]]}child(e,t,n){let{buffer:r}=this.context,i=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.context.start,n);return i<0?null:new xO(this.context,this,i)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}prop(e){return this.type.prop(e)}enter(e,t,n=0){if(n&uO.ExcludeBuffers)return null;let{buffer:r}=this.context,i=r.findChild(this.index+4,r.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return i<0?null:new xO(this.context,this,i)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new xO(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new xO(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:n}=this.context,r=this.index+4,i=n.buffer[this.index+3];if(i>r){let o=n.buffer[this.index+1];e.push(n.slice(r,i,o)),t.push(0)}return new pO(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function wO(e){if(!e.length)return null;let t=0,n=e[0];for(let r=1;r<e.length;r++){let i=e[r];(i.from>n.from||i.to<n.to)&&(n=i,t=r)}let r=n instanceof AO&&n.index<0?null:n.parent,i=e.slice();return r?i[t]=r:i.splice(t,1),new kO(i,n)}class kO{constructor(e,t){this.heads=e,this.node=t}get next(){return wO(this.heads)}}class SO{get name(){return this.type.name}constructor(e,t=0){if(this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,this.mode=t&~uO.EnterBracketed,e instanceof AO)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let t=e._parent;t;t=t._parent)this.stack.unshift(t.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return!!e&&(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0)}yieldBuf(e,t){this.index=e;let{start:n,buffer:r}=this.buffer;return this.type=t||r.set.types[r.buffer[e]],this.from=n+r.buffer[e+1],this.to=n+r.buffer[e+2],!0}yield(e){return!!e&&(e instanceof AO?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)))}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,n){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,n,this.mode));let{buffer:r}=this.buffer,i=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.buffer.start,n);return!(i<0)&&(this.stack.push(this.index),this.yieldBuf(i))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,n=this.mode){return this.buffer?!(n&uO.ExcludeBuffers)&&this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,n))}parent(){if(!this.buffer)return this.yieldNode(this.mode&uO.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&uO.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return!!this._tree._parent&&this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode));let{buffer:t}=this.buffer,n=this.stack.length-1;if(e<0){let e=n<0?0:this.stack[n]+4;if(this.index!=e)return this.yieldBuf(t.findChild(e,this.index,-1,0,4))}else{let e=t.buffer[this.index+3];if(e<(n<0?t.buffer.length:t.buffer[this.stack[n]+3]))return this.yieldBuf(e)}return n<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode))}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,n,{buffer:r}=this;if(r){if(e>0){if(this.index<r.buffer.buffer.length)return!1}else for(let e=0;e<this.index;e++)if(r.buffer.buffer[e+3]<this.index)return!1;({index:t,parent:n}=r)}else({index:t,_parent:n}=this._tree);for(;n;({index:t,_parent:n}=n))if(t>-1)for(let r=t+e,i=e<0?-1:n._tree.children.length;r!=i;r+=e){let e=n._tree.children[r];if(this.mode&uO.IncludeAnonymous||e instanceof fO||!e.type.isAnonymous||OO(e))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,n=0;if(e&&e.context==this.buffer)e:for(let r=this.index,i=this.stack.length;i>=0;){for(let o=e;o;o=o._parent)if(o.index==r){if(r==this.index)return o;t=o,n=i+1;break e}r=this.stack[--i]}for(let e=n;e<this.stack.length;e++)t=new xO(this.buffer,t,this.stack[e]);return this.bufferNode=new xO(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let n=0;;){let r=!1;if(this.type.isAnonymous||!1!==e(this)){if(this.firstChild()){n++;continue}this.type.isAnonymous||(r=!0)}for(;;){if(r&&t&&t(this),r=this.type.isAnonymous,!n)return;if(this.nextSibling())break;this.parent(),n--,r=!0}}}matchContext(e){if(!this.buffer)return yO(this.node.parent,e);let{buffer:t}=this.buffer,{types:n}=t.set;for(let r=e.length-1,i=this.stack.length-1;r>=0;i--){if(i<0)return yO(this._tree,e,r);let o=n[t.buffer[this.stack[i]]];if(!o.isAnonymous){if(e[r]&&e[r]!=o.name)return!1;r--}}return!0}}function OO(e){return e.children.some(e=>e instanceof fO||!e.type.isAnonymous||OO(e))}const _O=new WeakMap;function BO(e,t){if(!e.isAnonymous||t instanceof fO||t.type!=e)return 1;let n=_O.get(t);if(null==n){n=1;for(let r of t.children){if(r.type!=e||!(r instanceof pO)){n=1;break}n+=BO(e,r)}_O.set(t,n)}return n}function EO(e,t,n,r,i,o,s,a,l){let c=0;for(let n=r;n<i;n++)c+=BO(e,t[n]);let d=Math.ceil(1.5*c/8),u=[],p=[];return function t(n,r,i,s,a){for(let c=i;c<s;){let i=c,h=r[c],f=BO(e,n[c]);for(c++;c<s;c++){let t=BO(e,n[c]);if(f+t>=d)break;f+=t}if(c==i+1){if(f>d){let e=n[i];t(e.children,e.positions,0,e.children.length,r[i]+a);continue}u.push(n[i])}else{let t=r[c-1]+n[c-1].length-h;u.push(EO(e,n,r,i,c,h,t,null,l))}p.push(h+a-o)}}(t,n,r,i,0),(a||l)(u,p,s)}class TO{constructor(){this.map=new WeakMap}setBuffer(e,t,n){let r=this.map.get(e);r||this.map.set(e,r=new Map),r.set(t,n)}getBuffer(e,t){let n=this.map.get(e);return n&&n.get(t)}set(e,t){e instanceof xO?this.setBuffer(e.context.buffer,e.index,t):e instanceof AO&&this.map.set(e.tree,t)}get(e){return e instanceof xO?this.getBuffer(e.context.buffer,e.index):e instanceof AO?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class MO{constructor(e,t,n,r,i=!1,o=!1){this.from=e,this.to=t,this.tree=n,this.offset=r,this.open=(i?1:0)|(o?2:0)}get openStart(){return(1&this.open)>0}get openEnd(){return(2&this.open)>0}static addTree(e,t=[],n=!1){let r=[new MO(0,e.length,e,0,!1,n)];for(let n of t)n.to>e.length&&r.push(n);return r}static applyChanges(e,t,n=128){if(!t.length)return e;let r=[],i=1,o=e.length?e[0]:null;for(let s=0,a=0,l=0;;s++){let c=s<t.length?t[s]:null,d=c?c.fromA:1e9;if(d-a>=n)for(;o&&o.from<d;){let t=o;if(a>=t.from||d<=t.to||l){let e=Math.max(t.from,a)-l,n=Math.min(t.to,d)-l;t=e>=n?null:new MO(e,n,t.tree,t.offset+l,t.openStart||s>0,t.openEnd||!!c)}if(t&&r.push(t),o.to>d)break;o=i<e.length?e[i++]:null}if(!c)break;a=c.toA,l=c.toA-c.toB}return r}}class DO{startParse(e,t,n){return"string"==typeof e&&(e=new PO(e)),n=n?n.length?n.map(e=>new rO(e.from,e.to)):[new rO(0,0)]:[new rO(0,e.length)],this.createParse(e,t||[],n)}parse(e,t,n){let r=this.startParse(e,t,n);for(;;){let e=r.advance();if(e)return e}}}class PO{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}new iO({perNode:!0});let RO=0;class IO{constructor(e,t,n,r){this.name=e,this.set=t,this.base=n,this.modified=r,this.id=RO++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(e,t){let n="string"==typeof e?e:"?";if(e instanceof IO&&(t=e),null==t?void 0:t.base)throw new Error("Can not derive from a modified tag");let r=new IO(n,[],null,[]);if(r.set.push(r),t)for(let e of t.set)r.set.push(e);return r}static defineModifier(e){let t=new LO(e);return e=>e.modified.indexOf(t)>-1?e:LO.get(e.base||e,e.modified.concat(t).sort((e,t)=>e.id-t.id))}}let NO=0;class LO{constructor(e){this.name=e,this.instances=[],this.id=NO++}static get(e,t){if(!t.length)return e;let n=t[0].instances.find(n=>{return n.base==e&&(r=t,i=n.modified,r.length==i.length&&r.every((e,t)=>e==i[t]));var r,i});if(n)return n;let r=[],i=new IO(e.name,r,e,t);for(let e of t)e.instances.push(i);let o=function(e){let t=[[]];for(let n=0;n<e.length;n++)for(let r=0,i=t.length;r<i;r++)t.push(t[r].concat(e[n]));return t.sort((e,t)=>t.length-e.length)}(t);for(let t of e.set)if(!t.modified.length)for(let e of o)r.push(LO.get(t,e));return i}}function $O(e){let t=Object.create(null);for(let n in e){let r=e[n];Array.isArray(r)||(r=[r]);for(let e of n.split(" "))if(e){let n=[],i=2,o=e;for(let t=0;;){if("..."==o&&t>0&&t+3==e.length){i=1;break}let r=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(o);if(!r)throw new RangeError("Invalid path: "+e);if(n.push("*"==r[0]?"":'"'==r[0][0]?JSON.parse(r[0]):r[0]),t+=r[0].length,t==e.length)break;let s=e[t++];if(t==e.length&&"!"==s){i=0;break}if("/"!=s)throw new RangeError("Invalid path: "+e);o=e.slice(t)}let s=n.length-1,a=n[s];if(!a)throw new RangeError("Invalid path: "+e);let l=new jO(r,i,s>0?n.slice(0,s):null);t[a]=l.sort(t[a])}}return FO.add(t)}const FO=new iO({combine(e,t){let n,r,i;for(;e||t;){if(!e||t&&e.depth<=t.depth?(i=t,t=t.next):(i=e,e=e.next),n&&n.mode==i.mode&&!i.context&&!n.context)continue;let o=new jO(i.tags,i.mode,i.context);n?n.next=o:r=o,n=o}return r}});class jO{constructor(e,t,n,r){this.tags=e,this.mode=t,this.context=n,this.next=r}get opaque(){return 0==this.mode}get inherit(){return 1==this.mode}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}function VO(e,t){let n=Object.create(null);for(let t of e)if(Array.isArray(t.tag))for(let e of t.tag)n[e.id]=t.class;else n[t.tag.id]=t.class;let{scope:r,all:i=null}=t||{};return{style:e=>{let t=i;for(let r of e)for(let e of r.set){let r=n[e.id];if(r){t=t?t+" "+r:r;break}}return t},scope:r}}function WO(e,t,n,r=0,i=e.length){let o=new zO(r,Array.isArray(t)?t:[t],n);o.highlightRange(e.cursor(),r,i,"",o.highlighters),o.flush(i)}jO.empty=new jO([],2,null);class zO{constructor(e,t,n){this.at=e,this.highlighters=t,this.span=n,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,n,r,i){let{type:o,from:s,to:a}=e;if(s>=n||a<=t)return;o.isTop&&(i=this.highlighters.filter(e=>!e.scope||e.scope(o)));let l=r,c=function(e){let t=e.type.prop(FO);for(;t&&t.context&&!e.matchContext(t.context);)t=t.next;return t||null}(e)||jO.empty,d=function(e,t){let n=null;for(let r of e){let e=r.style(t);e&&(n=n?n+" "+e:e)}return n}(i,c.tags);if(d&&(l&&(l+=" "),l+=d,1==c.mode&&(r+=(r?" ":"")+d)),this.startSpan(Math.max(t,s),l),c.opaque)return;let u=e.tree&&e.tree.prop(iO.mounted);if(u&&u.overlay){let o=e.node.enter(u.overlay[0].from+s,1),c=this.highlighters.filter(e=>!e.scope||e.scope(u.tree.type)),d=e.firstChild();for(let p=0,h=s;;p++){let f=p<u.overlay.length?u.overlay[p]:null,g=f?f.from+s:a,m=Math.max(t,h),v=Math.min(n,g);if(m<v&&d)for(;e.from<v&&(this.highlightRange(e,m,v,r,i),this.startSpan(Math.min(v,e.to),l),!(e.to>=g)&&e.nextSibling()););if(!f||g>n)break;h=f.to+s,h>t&&(this.highlightRange(o.cursor(),Math.max(t,f.from+s),Math.min(n,h),"",c),this.startSpan(Math.min(n,h),l))}d&&e.parent()}else if(e.firstChild()){u&&(r="");do{if(!(e.to<=t)){if(e.from>=n)break;this.highlightRange(e,t,n,r,i),this.startSpan(Math.min(n,e.to),l)}}while(e.nextSibling());e.parent()}}}const QO=IO.define,HO=QO(),qO=QO(),UO=QO(qO),YO=QO(qO),XO=QO(),JO=QO(XO),GO=QO(XO),KO=QO(),ZO=QO(KO),e_=QO(),t_=QO(),n_=QO(),r_=QO(n_),i_=QO(),o_={comment:HO,lineComment:QO(HO),blockComment:QO(HO),docComment:QO(HO),name:qO,variableName:QO(qO),typeName:UO,tagName:QO(UO),propertyName:YO,attributeName:QO(YO),className:QO(qO),labelName:QO(qO),namespace:QO(qO),macroName:QO(qO),literal:XO,string:JO,docString:QO(JO),character:QO(JO),attributeValue:QO(JO),number:GO,integer:QO(GO),float:QO(GO),bool:QO(XO),regexp:QO(XO),escape:QO(XO),color:QO(XO),url:QO(XO),keyword:e_,self:QO(e_),null:QO(e_),atom:QO(e_),unit:QO(e_),modifier:QO(e_),operatorKeyword:QO(e_),controlKeyword:QO(e_),definitionKeyword:QO(e_),moduleKeyword:QO(e_),operator:t_,derefOperator:QO(t_),arithmeticOperator:QO(t_),logicOperator:QO(t_),bitwiseOperator:QO(t_),compareOperator:QO(t_),updateOperator:QO(t_),definitionOperator:QO(t_),typeOperator:QO(t_),controlOperator:QO(t_),punctuation:n_,separator:QO(n_),bracket:r_,angleBracket:QO(r_),squareBracket:QO(r_),paren:QO(r_),brace:QO(r_),content:KO,heading:ZO,heading1:QO(ZO),heading2:QO(ZO),heading3:QO(ZO),heading4:QO(ZO),heading5:QO(ZO),heading6:QO(ZO),contentSeparator:QO(KO),list:QO(KO),quote:QO(KO),emphasis:QO(KO),strong:QO(KO),link:QO(KO),monospace:QO(KO),strikethrough:QO(KO),inserted:QO(),deleted:QO(),changed:QO(),invalid:QO(),meta:i_,documentMeta:QO(i_),annotation:QO(i_),processingInstruction:QO(i_),definition:IO.defineModifier("definition"),constant:IO.defineModifier("constant"),function:IO.defineModifier("function"),standard:IO.defineModifier("standard"),local:IO.defineModifier("local"),special:IO.defineModifier("special")};for(let e in o_){let t=o_[e];t instanceof IO&&(t.name=e)}VO([{tag:o_.link,class:"tok-link"},{tag:o_.heading,class:"tok-heading"},{tag:o_.emphasis,class:"tok-emphasis"},{tag:o_.strong,class:"tok-strong"},{tag:o_.keyword,class:"tok-keyword"},{tag:o_.atom,class:"tok-atom"},{tag:o_.bool,class:"tok-bool"},{tag:o_.url,class:"tok-url"},{tag:o_.labelName,class:"tok-labelName"},{tag:o_.inserted,class:"tok-inserted"},{tag:o_.deleted,class:"tok-deleted"},{tag:o_.literal,class:"tok-literal"},{tag:o_.string,class:"tok-string"},{tag:o_.number,class:"tok-number"},{tag:[o_.regexp,o_.escape,o_.special(o_.string)],class:"tok-string2"},{tag:o_.variableName,class:"tok-variableName"},{tag:o_.local(o_.variableName),class:"tok-variableName tok-local"},{tag:o_.definition(o_.variableName),class:"tok-variableName tok-definition"},{tag:o_.special(o_.variableName),class:"tok-variableName2"},{tag:o_.definition(o_.propertyName),class:"tok-propertyName tok-definition"},{tag:o_.typeName,class:"tok-typeName"},{tag:o_.namespace,class:"tok-namespace"},{tag:o_.className,class:"tok-className"},{tag:o_.macroName,class:"tok-macroName"},{tag:o_.propertyName,class:"tok-propertyName"},{tag:o_.operator,class:"tok-operator"},{tag:o_.comment,class:"tok-comment"},{tag:o_.meta,class:"tok-meta"},{tag:o_.invalid,class:"tok-invalid"},{tag:o_.punctuation,class:"tok-punctuation"}]);var s_;const a_=new iO;function l_(e){return xA.define({combine:e?t=>t.concat(e):void 0})}const c_=new iO;class d_{constructor(e,t,n=[],r=""){this.data=e,this.name=r,db.prototype.hasOwnProperty("tree")||Object.defineProperty(db.prototype,"tree",{get(){return h_(this)}}),this.parser=t,this.extension=[x_.of(this),db.languageData.of((e,t,n)=>{let r=u_(e,t,n),i=r.type.prop(a_);if(!i)return[];let o=e.facet(i),s=r.type.prop(c_);if(s){let i=r.resolve(t-r.from,n);for(let t of s)if(t.test(i,e)){let n=e.facet(t.facet);return"replace"==t.type?n:n.concat(o)}}return o})].concat(n)}isActiveAt(e,t,n=-1){return u_(e,t,n).type.prop(a_)==this.data}findRegions(e){let t=e.facet(x_);if((null==t?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let n=[],r=(e,t)=>{if(e.prop(a_)==this.data)return void n.push({from:t,to:t+e.length});let i=e.prop(iO.mounted);if(i){if(i.tree.prop(a_)==this.data){if(i.overlay)for(let e of i.overlay)n.push({from:e.from+t,to:e.to+t});else n.push({from:t,to:t+e.length});return}if(i.overlay){let e=n.length;if(r(i.tree,i.overlay[0].from+t),n.length>e)return}}for(let n=0;n<e.children.length;n++){let i=e.children[n];i instanceof pO&&r(i,e.positions[n]+t)}};return r(h_(e),0),n}get allowsNesting(){return!0}}function u_(e,t,n){let r=e.facet(x_),i=h_(e).topNode;if(!r||r.allowsNesting)for(let e=i;e;e=e.enter(t,n,uO.ExcludeBuffers|uO.EnterBracketed))e.type.isTop&&(i=e);return i}d_.setState=KA.define();class p_ extends d_{constructor(e,t,n){super(e,t,[],n),this.parser=t}static define(e){let t=l_(e.languageData);return new p_(t,e.parser.configure({props:[a_.add(e=>e.isTop?t:void 0)]}),e.name)}configure(e,t){return new p_(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function h_(e){let t=e.field(d_.state,!1);return t?t.tree:pO.empty}class f_{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let n=this.cursorPos-this.string.length;return e<n||t>=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-n,t-n)}}let g_=null;class m_{constructor(e,t,n=[],r,i,o,s,a){this.parser=e,this.state=t,this.fragments=n,this.tree=r,this.treeLen=i,this.viewport=o,this.skipped=s,this.scheduleOn=a,this.parse=null,this.tempSkipped=[]}static create(e,t,n){return new m_(e,t,[],pO.empty,0,n,[],null)}startParse(){return this.parser.startParse(new f_(this.state.doc),this.fragments)}work(e,t){return null!=t&&t>=this.state.doc.length&&(t=void 0),this.tree!=pO.empty&&this.isDone(null!=t?t:this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var n;if("number"==typeof e){let t=Date.now()+e;e=()=>Date.now()>t}for(this.parse||(this.parse=this.startParse()),null!=t&&(null==this.parse.stoppedAt||this.parse.stoppedAt>t)&&t<this.state.doc.length&&this.parse.stopAt(t);;){let r=this.parse.advance();if(r){if(this.fragments=this.withoutTempSkipped(MO.addTree(r,this.fragments,null!=this.parse.stoppedAt)),this.treeLen=null!==(n=this.parse.stoppedAt)&&void 0!==n?n:this.state.doc.length,this.tree=r,this.parse=null,!(this.treeLen<(null!=t?t:this.state.doc.length)))return!0;this.parse=this.startParse()}if(e())return!1}})}takeTree(){let e,t;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((null==this.parse.stoppedAt||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(MO.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=g_;g_=this;try{return e()}finally{g_=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=v_(e,t.from,t.to);return e}changes(e,t){let{fragments:n,tree:r,treeLen:i,viewport:o,skipped:s}=this;if(this.takeTree(),!e.empty){let t=[];if(e.iterChangedRanges((e,n,r,i)=>t.push({fromA:e,toA:n,fromB:r,toB:i})),n=MO.applyChanges(n,t),r=pO.empty,i=0,o={from:e.mapPos(o.from,-1),to:e.mapPos(o.to,1)},this.skipped.length){s=[];for(let t of this.skipped){let n=e.mapPos(t.from,1),r=e.mapPos(t.to,-1);n<r&&s.push({from:n,to:r})}}}return new m_(this.parser,t,n,r,i,o,s,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let t=this.skipped.length;for(let t=0;t<this.skipped.length;t++){let{from:n,to:r}=this.skipped[t];n<e.to&&r>e.from&&(this.fragments=v_(this.fragments,n,r),this.skipped.splice(t--,1))}return!(this.skipped.length>=t)&&(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends DO{createParse(t,n,r){let i=r[0].from,o=r[r.length-1].to,s={parsedPos:i,advance(){let t=g_;if(t){for(let e of r)t.tempSkipped.push(e);e&&(t.scheduleOn=t.scheduleOn?Promise.all([t.scheduleOn,e]):e)}return this.parsedPos=o,new pO(aO.none,[],[],o-i)},stoppedAt:null,stopAt(){}};return s}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&0==t[0].from&&t[0].to>=e}static get(){return g_}}function v_(e,t,n){return MO.applyChanges(e,[{fromA:t,toA:n,fromB:t,toB:n}])}class A_{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),n=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,n)||t.takeTree(),new A_(t)}static init(e){let t=Math.min(3e3,e.doc.length),n=m_.create(e.facet(x_).parser,e,{from:0,to:t});return n.work(20,t)||n.takeTree(),new A_(n)}}d_.state=EA.define({create:A_.init,update(e,t){for(let e of t.effects)if(e.is(d_.setState))return e.value;return t.startState.facet(x_)!=t.state.facet(x_)?A_.init(t.state):e.apply(t)}});let b_=e=>{let t=setTimeout(()=>e(),500);return()=>clearTimeout(t)};"undefined"!=typeof requestIdleCallback&&(b_=e=>{let t=-1,n=setTimeout(()=>{t=requestIdleCallback(e,{timeout:400})},100);return()=>t<0?clearTimeout(n):cancelIdleCallback(t)});const y_="undefined"!=typeof navigator&&(null===(s_=navigator.scheduling)||void 0===s_?void 0:s_.isInputPending)?()=>navigator.scheduling.isInputPending():null,C_=MC.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(d_.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(d_.state);t.tree==t.context.tree&&t.context.isDone(e.doc.length)||(this.working=b_(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEnd<t&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=t+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:n,viewport:{to:r}}=this.view,i=n.field(d_.state);if(i.tree==i.context.tree&&i.context.isDone(r+1e5))return;let o=Date.now()+Math.min(this.chunkBudget,100,e&&!y_?Math.max(25,e.timeRemaining()-5):1e9),s=i.context.treeLen<r&&n.doc.length>r+1e3,a=i.context.work(()=>y_&&y_()||Date.now()>o,r+(s?0:1e5));this.chunkBudget-=Date.now()-t,(a||this.chunkBudget<=0)&&(i.context.takeTree(),this.view.dispatch({effects:d_.setState.of(new A_(i.context))})),this.chunkBudget>0&&(!a||s)&&this.scheduleWork(),this.checkAsyncSchedule(i.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(e=>_C(this.view.state,e)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),x_=xA.define({combine:e=>e.length?e[0]:null,enables:e=>[d_.state,C_,rk.contentAttributes.compute([e],t=>{let n=t.facet(e);return n&&n.name?{"data-language":n.name}:{}})]});class w_{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}const k_=xA.define(),S_=xA.define({combine:e=>{if(!e.length)return" ";let t=e[0];if(!t||/\S/.test(t)||Array.from(t).some(e=>e!=t[0]))throw new Error("Invalid indent unit: "+JSON.stringify(e[0]));return t}});function O_(e){let t=e.facet(S_);return 9==t.charCodeAt(0)?e.tabSize*t.length:t.length}function __(e,t){let n="",r=e.tabSize,i=e.facet(S_)[0];if("\t"==i){for(;t>=r;)n+="\t",t-=r;i=" "}for(let e=0;e<t;e++)n+=i;return n}function B_(e,t){e instanceof db&&(e=new E_(e));for(let n of e.state.facet(k_)){let r=n(e,t);if(void 0!==r)return r}let n=h_(e.state);return n.length>=t?function(e,t,n){let r=t.resolveStack(n),i=t.resolveInner(n,-1).resolve(n,0).enterUnfinishedNodesBefore(n);if(i!=r.node){let e=[];for(let t=i;t&&!(t.from<r.node.from||t.to>r.node.to||t.from==r.node.from&&t.type==r.node.type);t=t.parent)e.push(t);for(let t=e.length-1;t>=0;t--)r={node:e[t],next:r}}return M_(r,e,n)}(e,n,t):null}class E_{constructor(e,t={}){this.state=e,this.options=t,this.unit=O_(e)}lineAt(e,t=1){let n=this.state.doc.lineAt(e),{simulateBreak:r,simulateDoubleBreak:i}=this.options;return null!=r&&r>=n.from&&r<=n.to?i&&r==e?{text:"",from:e}:(t<0?r<e:r<=e)?{text:n.text.slice(r-n.from),from:r}:{text:n.text.slice(0,r-n.from),from:n.from}:n}textAfterPos(e,t=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:n,from:r}=this.lineAt(e,t);return n.slice(e-r,Math.min(n.length,e+100-r))}column(e,t=1){let{text:n,from:r}=this.lineAt(e,t),i=this.countColumn(n,e-r),o=this.options.overrideIndentation?this.options.overrideIndentation(r):-1;return o>-1&&(i+=o-this.countColumn(n,n.search(/\S|$/))),i}countColumn(e,t=e.length){return Tb(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:n,from:r}=this.lineAt(e,t),i=this.options.overrideIndentation;if(i){let e=i(r);if(e>-1)return e}return this.countColumn(n,n.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const T_=new iO;function M_(e,t,n){for(let r=e;r;r=r.next){let e=D_(r.node);if(e)return e(R_.create(t,n,r))}return 0}function D_(e){let t=e.type.prop(T_);if(t)return t;let n,r=e.firstChild;if(r&&(n=r.type.prop(iO.closedBy))){let t=e.lastChild,r=t&&n.indexOf(t.name)>-1;return e=>N_(e,!0,1,void 0,r&&!function(e){return e.pos==e.options.simulateBreak&&e.options.simulateDoubleBreak}(e)?t.from:void 0)}return null==e.parent?P_:null}function P_(){return 0}class R_ extends E_{constructor(e,t,n){super(e.state,e.options),this.base=e,this.pos=t,this.context=n}get node(){return this.context.node}static create(e,t,n){return new R_(e,t,n)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let n=e.resolve(t.from);for(;n.parent&&n.parent.from==n.from;)n=n.parent;if(I_(n,e))break;t=this.state.doc.lineAt(n.from)}return this.lineIndent(t.from)}continue(){return M_(this.context.next,this.base,this.pos)}}function I_(e,t){for(let n=t;n;n=n.parent)if(e==n)return!0;return!1}function N_(e,t,n,r,i){let o=e.textAfter,s=o.match(/^\s*/)[0].length,a=r&&o.slice(s,s+r.length)==r||i==e.pos+s,l=t?function(e){let t=e.node,n=t.childAfter(t.from),r=t.lastChild;if(!n)return null;let i=e.options.simulateBreak,o=e.state.doc.lineAt(n.from),s=null==i||i<=o.from?o.to:Math.min(o.to,i);for(let e=n.to;;){let i=t.childAfter(e);if(!i||i==r)return null;if(!i.type.isSkipped){if(i.from>=s)return null;let e=/^ */.exec(o.text.slice(n.to-o.from))[0].length;return{from:n.from,to:n.to+e}}e=i.to}}(e):null;return l?a?e.column(l.from):e.column(l.to):e.baseIndent+(a?0:e.unit*n)}function L_({except:e,units:t=1}={}){return n=>{let r=e&&e.test(n.textAfter);return n.baseIndent+(r?0:t*n.unit)}}const $_=xA.define(),F_=new iO;function j_(e){let t=e.lastChild;return t&&t.to==e.to&&t.type.isError}function V_(e,t,n){for(let r of e.facet($_)){let i=r(e,t,n);if(i)return i}return function(e,t,n){let r=h_(e);if(r.length<n)return null;let i=null;for(let o=r.resolveStack(n,1);o;o=o.next){let s=o.node;if(s.to<=n||s.from>n)continue;if(i&&s.from<t)break;let a=s.type.prop(F_);if(a&&(s.to<r.length-50||r.length==e.doc.length||!j_(s))){let r=a(s,e);r&&r.from<=n&&r.from>=t&&r.to>n&&(i=r)}}return i}(e,t,n)}function W_(e,t){let n=t.mapPos(e.from,1),r=t.mapPos(e.to,-1);return n>=r?void 0:{from:n,to:r}}const z_=KA.define({map:W_}),Q_=KA.define({map:W_});function H_(e){let t=[];for(let{head:n}of e.state.selection.ranges)t.some(e=>e.from<=n&&e.to>=n)||t.push(e.lineBlockAt(n));return t}const q_=EA.define({create:()=>py.none,update(e,t){t.isUserEvent("delete")&&t.changes.iterChangedRanges((t,n)=>e=U_(e,t,n)),e=e.map(t.changes);let n=[];for(let r of t.effects)r.is(z_)&&!X_(e,r.value.from,r.value.to)?n.push(r.value):r.is(Q_)&&(e=e.update({filter:(e,t)=>r.value.from!=e||r.value.to!=t,filterFrom:r.value.from,filterTo:r.value.to}));if(n.length){let{preparePlaceholder:r}=t.state.facet(eB),i=n.map(e=>(r?py.replace({widget:new iB(r(t.state,e))}):rB).range(e.from,e.to));e=e.update({add:i})}return t.selection&&(e=U_(e,t.selection.main.head)),e},provide:e=>rk.decorations.from(e),toJSON(e,t){let n=[];return e.between(0,t.doc.length,(e,t)=>{n.push(e,t)}),n},fromJSON(e){if(!Array.isArray(e)||e.length%2)throw new RangeError("Invalid JSON for fold state");let t=[];for(let n=0;n<e.length;){let r=e[n++],i=e[n++];if("number"!=typeof r||"number"!=typeof i)throw new RangeError("Invalid JSON for fold state");t.push(rB.range(r,i))}return py.set(t,!0)}});function U_(e,t,n=t){let r=!1;return e.between(t,n,(e,i)=>{e<n&&i>t&&(r=!0)}),r?e.update({filterFrom:t,filterTo:n,filter:(e,r)=>e>=n||r<=t}):e}function Y_(e,t,n){var r;let i=null;return null===(r=e.field(q_,!1))||void 0===r||r.between(t,n,(e,t)=>{(!i||i.from>e)&&(i={from:e,to:t})}),i}function X_(e,t,n){let r=!1;return e.between(t,t,(e,i)=>{e==t&&i==n&&(r=!0)}),r}function J_(e,t){return e.field(q_,!1)?t:t.concat(KA.appendConfig.of(tB()))}function G_(e,t,n=!0){let r=e.state.doc.lineAt(t.from).number,i=e.state.doc.lineAt(t.to).number;return rk.announce.of(`${e.state.phrase(n?"Folded lines":"Unfolded lines")} ${r} ${e.state.phrase("to")} ${i}.`)}const K_=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:e=>{for(let t of H_(e)){let n=V_(e.state,t.from,t.to);if(n)return e.dispatch({effects:J_(e.state,[z_.of(n),G_(e,n)])}),!0}return!1}},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:e=>{if(!e.state.field(q_,!1))return!1;let t=[];for(let n of H_(e)){let r=Y_(e.state,n.from,n.to);r&&t.push(Q_.of(r),G_(e,r,!1))}return t.length&&e.dispatch({effects:t}),t.length>0}},{key:"Ctrl-Alt-[",run:e=>{let{state:t}=e,n=[];for(let r=0;r<t.doc.length;){let i=e.lineBlockAt(r),o=V_(t,i.from,i.to);o&&n.push(z_.of(o)),r=(o?e.lineBlockAt(o.to):i).to+1}return n.length&&e.dispatch({effects:J_(e.state,n)}),!!n.length}},{key:"Ctrl-Alt-]",run:e=>{let t=e.state.field(q_,!1);if(!t||!t.size)return!1;let n=[];return t.between(0,e.state.doc.length,(e,t)=>{n.push(Q_.of({from:e,to:t}))}),e.dispatch({effects:n}),!0}}],Z_={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},eB=xA.define({combine:e=>ub(e,Z_)});function tB(e){let t=[q_,lB];return e&&t.push(eB.of(e)),t}function nB(e,t){let{state:n}=e,r=n.facet(eB),i=t=>{let n=e.lineBlockAt(e.posAtDOM(t.target)),r=Y_(e.state,n.from,n.to);r&&e.dispatch({effects:Q_.of(r)}),t.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(e,i,t);let o=document.createElement("span");return o.textContent=r.placeholderText,o.setAttribute("aria-label",n.phrase("folded code")),o.title=n.phrase("unfold"),o.className="cm-foldPlaceholder",o.onclick=i,o}const rB=py.replace({widget:new class extends dy{toDOM(e){return nB(e,null)}}});class iB extends dy{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return nB(e,this.value)}}const oB={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class sB extends MS{constructor(e,t){super(),this.config=e,this.open=t}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let t=document.createElement("span");return t.textContent=this.open?this.config.openText:this.config.closedText,t.title=e.state.phrase(this.open?"Fold line":"Unfold line"),t}}function aB(e={}){let t={...oB,...e},n=new sB(t,!0),r=new sB(t,!1),i=MC.fromClass(class{constructor(e){this.from=e.viewport.from,this.markers=this.buildMarkers(e)}update(e){(e.docChanged||e.viewportChanged||e.startState.facet(x_)!=e.state.facet(x_)||e.startState.field(q_,!1)!=e.state.field(q_,!1)||h_(e.startState)!=h_(e.state)||t.foldingChanged(e))&&(this.markers=this.buildMarkers(e.view))}buildMarkers(e){let t=new bb;for(let i of e.viewportLineBlocks){let o=Y_(e.state,i.from,i.to)?r:V_(e.state,i.from,i.to)?n:null;o&&t.add(i.from,i.from,o)}return t.finish()}}),{domEventHandlers:o}=t;return[i,NS({class:"cm-foldGutter",markers(e){var t;return(null===(t=e.plugin(i))||void 0===t?void 0:t.markers)||vb.empty},initialSpacer:()=>new sB(t,!1),domEventHandlers:{...o,click:(e,t,n)=>{if(o.click&&o.click(e,t,n))return!0;let r=Y_(e.state,t.from,t.to);if(r)return e.dispatch({effects:Q_.of(r)}),!0;let i=V_(e.state,t.from,t.to);return!!i&&(e.dispatch({effects:z_.of(i)}),!0)}}}),tB()]}const lB=rk.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class cB{constructor(e,t){let n;function r(e){let t=Ib.newName();return(n||(n=Object.create(null)))["."+t]=e,t}this.specs=e;const i="string"==typeof t.all?t.all:t.all?r(t.all):void 0,o=t.scope;this.scope=o instanceof d_?e=>e.prop(a_)==o.data:o?e=>e==o:void 0,this.style=VO(e.map(e=>({tag:e.tag,class:e.class||r(Object.assign({},e,{tag:null}))})),{all:i}).style,this.module=n?new Ib(n):null,this.themeType=t.themeType}static define(e,t){return new cB(e,t||{})}}const dB=xA.define(),uB=xA.define({combine:e=>e.length?[e[0]]:null});function pB(e){let t=e.facet(dB);return t.length?t:e.facet(uB)}function hB(e,t){let n,r=[gB];return e instanceof cB&&(e.module&&r.push(rk.styleModule.of(e.module)),n=e.themeType),(null==t?void 0:t.fallback)?r.push(uB.of(e)):n?r.push(dB.computeN([rk.darkTheme],t=>t.facet(rk.darkTheme)==("dark"==n)?[e]:[])):r.push(dB.of(e)),r}class fB{constructor(e){this.markCache=Object.create(null),this.tree=h_(e.state),this.decorations=this.buildDeco(e,pB(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=h_(e.state),n=pB(e.state),r=n!=pB(e.startState),{viewport:i}=e.view,o=e.changes.mapPos(this.decoratedTo,1);t.length<i.to&&!r&&t.type==this.tree.type&&o>=i.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=o):(t!=this.tree||e.viewportChanged||r)&&(this.tree=t,this.decorations=this.buildDeco(e.view,n),this.decoratedTo=i.to)}buildDeco(e,t){if(!t||!this.tree.length)return py.none;let n=new bb;for(let{from:r,to:i}of e.visibleRanges)WO(this.tree,t,(e,t,r)=>{n.add(e,t,this.markCache[r]||(this.markCache[r]=py.mark({class:r})))},r,i);return n.finish()}}const gB=IA.high(MC.fromClass(fB,{decorations:e=>e.decorations})),mB=cB.define([{tag:o_.meta,color:"#404740"},{tag:o_.link,textDecoration:"underline"},{tag:o_.heading,textDecoration:"underline",fontWeight:"bold"},{tag:o_.emphasis,fontStyle:"italic"},{tag:o_.strong,fontWeight:"bold"},{tag:o_.strikethrough,textDecoration:"line-through"},{tag:o_.keyword,color:"#708"},{tag:[o_.atom,o_.bool,o_.url,o_.contentSeparator,o_.labelName],color:"#219"},{tag:[o_.literal,o_.inserted],color:"#164"},{tag:[o_.string,o_.deleted],color:"#a11"},{tag:[o_.regexp,o_.escape,o_.special(o_.string)],color:"#e40"},{tag:o_.definition(o_.variableName),color:"#00f"},{tag:o_.local(o_.variableName),color:"#30a"},{tag:[o_.typeName,o_.namespace],color:"#085"},{tag:o_.className,color:"#167"},{tag:[o_.special(o_.variableName),o_.macroName],color:"#256"},{tag:o_.definition(o_.propertyName),color:"#00c"},{tag:o_.comment,color:"#940"},{tag:o_.invalid,color:"#f00"}]),vB=rk.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),AB="()[]{}",bB=xA.define({combine:e=>ub(e,{afterCursor:!0,brackets:AB,maxScanDistance:1e4,renderMatch:xB})}),yB=py.mark({class:"cm-matchingBracket"}),CB=py.mark({class:"cm-nonmatchingBracket"});function xB(e){let t=[],n=e.matched?yB:CB;return t.push(n.range(e.start.from,e.start.to)),e.end&&t.push(n.range(e.end.from,e.end.to)),t}function wB(e){let t=[],n=e.facet(bB);for(let r of e.selection.ranges){if(!r.empty)continue;let i=EB(e,r.head,-1,n)||r.head>0&&EB(e,r.head-1,1,n)||n.afterCursor&&(EB(e,r.head,1,n)||r.head<e.doc.length&&EB(e,r.head+1,-1,n));i&&(t=t.concat(n.renderMatch(i,e)))}return py.set(t,!0)}const kB=[MC.fromClass(class{constructor(e){this.paused=!1,this.decorations=wB(e.state)}update(e){(e.docChanged||e.selectionSet||this.paused)&&(e.view.composing?(this.decorations=this.decorations.map(e.changes),this.paused=!0):(this.decorations=wB(e.state),this.paused=!1))}},{decorations:e=>e.decorations}),vB];function SB(e={}){return[bB.of(e),kB]}const OB=new iO;function _B(e,t,n){let r=e.prop(t<0?iO.openedBy:iO.closedBy);if(r)return r;if(1==e.name.length){let r=n.indexOf(e.name);if(r>-1&&r%2==(t<0?1:0))return[n[r+t]]}return null}function BB(e){let t=e.type.prop(OB);return t?t(e.node):e}function EB(e,t,n,r={}){let i=r.maxScanDistance||1e4,o=r.brackets||AB,s=h_(e),a=s.resolveInner(t,n);for(let r=a;r;r=r.parent){let i=_B(r.type,n,o);if(i&&r.from<r.to){let s=BB(r);if(s&&(n>0?t>=s.from&&t<s.to:t>s.from&&t<=s.to))return TB(e,t,n,r,s,i,o)}}return function(e,t,n,r,i,o,s){if(n<0?!t:t==e.doc.length)return null;let a=n<0?e.sliceDoc(t-1,t):e.sliceDoc(t,t+1),l=s.indexOf(a);if(l<0||l%2==0!=n>0)return null;let c={from:n<0?t-1:t,to:n>0?t+1:t},d=e.doc.iterRange(t,n>0?e.doc.length:0),u=0;for(let e=0;!d.next().done&&e<=o;){let o=d.value;n<0&&(e+=o.length);let a=t+e*n;for(let e=n>0?0:o.length-1,t=n>0?o.length:-1;e!=t;e+=n){let t=s.indexOf(o[e]);if(!(t<0||r.resolveInner(a+e,1).type!=i))if(t%2==0==n>0)u++;else{if(1==u)return{start:c,end:{from:a+e,to:a+e+1},matched:t>>1==l>>1};u--}}n>0&&(e+=o.length)}return d.done?{start:c,matched:!1}:null}(e,t,n,s,a.type,i,o)}function TB(e,t,n,r,i,o,s){let a=r.parent,l={from:i.from,to:i.to},c=0,d=null==a?void 0:a.cursor();if(d&&(n<0?d.childBefore(r.from):d.childAfter(r.to)))do{if(n<0?d.to<=r.from:d.from>=r.to){if(0==c&&o.indexOf(d.type.name)>-1&&d.from<d.to){let e=BB(d);return{start:l,end:e?{from:e.from,to:e.to}:void 0,matched:!0}}if(_B(d.type,n,s))c++;else if(_B(d.type,-n,s)){if(0==c){let e=BB(d);return{start:l,end:e&&e.from<e.to?{from:e.from,to:e.to}:void 0,matched:!1}}c--}}}while(n<0?d.prevSibling():d.nextSibling());return{start:l,matched:!1}}const MB=Object.create(null),DB=[aO.none],PB=[],RB=Object.create(null),IB=Object.create(null);for(let[e,t]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])IB[e]=LB(MB,t);function NB(e,t){PB.indexOf(e)>-1||(PB.push(e),console.warn(t))}function LB(e,t){let n=[];for(let r of t.split(" ")){let t=[];for(let n of r.split(".")){let r=e[n]||o_[n];r?"function"==typeof r?t.length?t=t.map(r):NB(n,`Modifier ${n} used at start of tag`):t.length?NB(n,`Tag ${n} used as modifier`):t=Array.isArray(r)?r:[r]:NB(n,`Unknown highlighting tag ${n}`)}for(let e of t)n.push(e)}if(!n.length)return 0;let r=t.replace(/ /g,"_"),i=r+" "+n.map(e=>e.id),o=RB[i];if(o)return o.id;let s=RB[i]=aO.define({id:DB.length,name:r,props:[$O({[r]:n})]});return DB.push(s),s.id}qy.RTL,qy.LTR;function $B(e,t){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let i=e(t,n);return!!i&&(r(n.update(i)),!0)}}const FB=$B(QB,0),jB=$B(zB,0),VB=$B((e,t)=>zB(e,t,function(e){let t=[];for(let n of e.selection.ranges){let r=e.doc.lineAt(n.from),i=n.to<=r.to?r:e.doc.lineAt(n.to);i.from>r.from&&i.from==n.to&&(i=n.to==r.to+1?r:e.doc.lineAt(n.to-1));let o=t.length-1;o>=0&&t[o].to>r.from?t[o].to=i.to:t.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return t}(t)),0);function WB(e,t){let n=e.languageDataAt("commentTokens",t,1);return n.length?n[0]:{}}function zB(e,t,n=t.selection.ranges){let r=n.map(e=>WB(t,e.from).block);if(!r.every(e=>e))return null;let i=n.map((e,n)=>function(e,{open:t,close:n},r,i){let o,s,a=e.sliceDoc(r-50,r),l=e.sliceDoc(i,i+50),c=/\s*$/.exec(a)[0].length,d=/^\s*/.exec(l)[0].length,u=a.length-c;if(a.slice(u-t.length,u)==t&&l.slice(d,d+n.length)==n)return{open:{pos:r-c,margin:c&&1},close:{pos:i+d,margin:d&&1}};i-r<=100?o=s=e.sliceDoc(r,i):(o=e.sliceDoc(r,r+50),s=e.sliceDoc(i-50,i));let p=/^\s*/.exec(o)[0].length,h=/\s*$/.exec(s)[0].length,f=s.length-h-n.length;return o.slice(p,p+t.length)==t&&s.slice(f,f+n.length)==n?{open:{pos:r+p+t.length,margin:/\s/.test(o.charAt(p+t.length))?1:0},close:{pos:i-h-n.length,margin:/\s/.test(s.charAt(f-1))?1:0}}:null}(t,r[n],e.from,e.to));if(2!=e&&!i.every(e=>e))return{changes:t.changes(n.map((e,t)=>i[t]?[]:[{from:e.from,insert:r[t].open+" "},{from:e.to,insert:" "+r[t].close}]))};if(1!=e&&i.some(e=>e)){let e=[];for(let t,n=0;n<i.length;n++)if(t=i[n]){let i=r[n],{open:o,close:s}=t;e.push({from:o.pos-i.open.length,to:o.pos+o.margin},{from:s.pos-s.margin,to:s.pos+i.close.length})}return{changes:e}}return null}function QB(e,t,n=t.selection.ranges){let r=[],i=-1;e:for(let{from:e,to:o}of n){let n,s=r.length,a=1e9;for(let s=e;s<=o;){let l=t.doc.lineAt(s);if(null==n&&(n=WB(t,l.from).line,!n))continue e;if(l.from>i&&(e==o||o>l.from)){i=l.from;let e=/^\s*/.exec(l.text)[0].length,t=e==l.length,o=l.text.slice(e,e+n.length)==n?e:-1;e<l.text.length&&e<a&&(a=e),r.push({line:l,comment:o,token:n,indent:e,empty:t,single:!1})}s=l.to+1}if(a<1e9)for(let e=s;e<r.length;e++)r[e].indent<r[e].line.text.length&&(r[e].indent=a);r.length==s+1&&(r[s].single=!0)}if(2!=e&&r.some(e=>e.comment<0&&(!e.empty||e.single))){let e=[];for(let{line:t,token:n,indent:i,empty:o,single:s}of r)!s&&o||e.push({from:t.from+i,insert:n+" "});let n=t.changes(e);return{changes:n,selection:t.selection.map(n,1)}}if(1!=e&&r.some(e=>e.comment>=0)){let e=[];for(let{line:t,comment:n,token:i}of r)if(n>=0){let r=t.from+n,o=r+i.length;" "==t.text[o-t.from]&&o++,e.push({from:r,to:o})}return{changes:e}}return null}const HB=XA.define(),qB=XA.define(),UB=xA.define(),YB=xA.define({combine:e=>ub(e,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(n,r)=>e(n,r)||t(n,r)})}),XB=EA.define({create:()=>uE.empty,update(e,t){let n=t.state.facet(YB),r=t.annotation(HB);if(r){let i=nE.fromTransaction(t,r.selection),o=r.side,s=0==o?e.undone:e.done;return s=i?rE(s,s.length,n.minDepth,i):sE(s,t.startState.selection),new uE(0==o?r.rest:s,0==o?s:r.rest)}let i=t.annotation(qB);if("full"!=i&&"before"!=i||(e=e.isolate()),!1===t.annotation(ZA.addToHistory))return t.changes.empty?e:e.addMapping(t.changes.desc);let o=nE.fromTransaction(t),s=t.annotation(ZA.time),a=t.annotation(ZA.userEvent);return o?e=e.addChanges(o,s,a,n,t):t.selection&&(e=e.addSelection(t.startState.selection,s,a,n.newGroupDelay)),"full"!=i&&"after"!=i||(e=e.isolate()),e},toJSON:e=>({done:e.done.map(e=>e.toJSON()),undone:e.undone.map(e=>e.toJSON())}),fromJSON:e=>new uE(e.done.map(nE.fromJSON),e.undone.map(nE.fromJSON))});function JB(e={}){return[XB,YB.of(e),rk.domEventHandlers({beforeinput(e,t){let n="historyUndo"==e.inputType?KB:"historyRedo"==e.inputType?ZB:null;return!!n&&(e.preventDefault(),n(t))}})]}function GB(e,t){return function({state:n,dispatch:r}){if(!t&&n.readOnly)return!1;let i=n.field(XB,!1);if(!i)return!1;let o=i.pop(e,n,t);return!!o&&(r(o),!0)}}const KB=GB(0,!1),ZB=GB(1,!1),eE=GB(0,!0),tE=GB(1,!0);class nE{constructor(e,t,n,r,i){this.changes=e,this.effects=t,this.mapped=n,this.startSelection=r,this.selectionsAfter=i}setSelAfter(e){return new nE(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,n;return{changes:null===(e=this.changes)||void 0===e?void 0:e.toJSON(),mapped:null===(t=this.mapped)||void 0===t?void 0:t.toJSON(),startSelection:null===(n=this.startSelection)||void 0===n?void 0:n.toJSON(),selectionsAfter:this.selectionsAfter.map(e=>e.toJSON())}}static fromJSON(e){return new nE(e.changes&&uA.fromJSON(e.changes),[],e.mapped&&dA.fromJSON(e.mapped),e.startSelection&&bA.fromJSON(e.startSelection),e.selectionsAfter.map(bA.fromJSON))}static fromTransaction(e,t){let n=oE;for(let t of e.startState.facet(UB)){let r=t(e);r.length&&(n=n.concat(r))}return!n.length&&e.changes.empty?null:new nE(e.changes.invert(e.startState.doc),n,void 0,t||e.startState.selection,oE)}static selection(e){return new nE(void 0,oE,void 0,void 0,e)}}function rE(e,t,n,r){let i=t+1>n+20?t-n-1:0,o=e.slice(i,t);return o.push(r),o}function iE(e,t){return e.length?t.length?e.concat(t):e:t}const oE=[];function sE(e,t){if(e.length){let n=e[e.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-200));return r.length&&r[r.length-1].eq(t)?e:(r.push(t),rE(e,e.length-1,1e9,n.setSelAfter(r)))}return[nE.selection([t])]}function aE(e){let t=e[e.length-1],n=e.slice();return n[e.length-1]=t.setSelAfter(t.selectionsAfter.slice(0,t.selectionsAfter.length-1)),n}function lE(e,t){if(!e.length)return e;let n=e.length,r=oE;for(;n;){let i=cE(e[n-1],t,r);if(i.changes&&!i.changes.empty||i.effects.length){let t=e.slice(0,n);return t[n-1]=i,t}t=i.mapped,n--,r=i.selectionsAfter}return r.length?[nE.selection(r)]:oE}function cE(e,t,n){let r=iE(e.selectionsAfter.length?e.selectionsAfter.map(e=>e.map(t)):oE,n);if(!e.changes)return nE.selection(r);let i=e.changes.map(t),o=t.mapDesc(e.changes,!0),s=e.mapped?e.mapped.composeDesc(o):o;return new nE(i,KA.mapEffects(e.effects,t),s,e.startSelection.map(o),r)}const dE=/^(input\.type|delete)($|\.)/;class uE{constructor(e,t,n=0,r=void 0){this.done=e,this.undone=t,this.prevTime=n,this.prevUserEvent=r}isolate(){return this.prevTime?new uE(this.done,this.undone):this}addChanges(e,t,n,r,i){let o=this.done,s=o[o.length-1];return o=s&&s.changes&&!s.changes.empty&&e.changes&&(!n||dE.test(n))&&(!s.selectionsAfter.length&&t-this.prevTime<r.newGroupDelay&&r.joinToEvent(i,function(e,t){let n=[],r=!1;return e.iterChangedRanges((e,t)=>n.push(e,t)),t.iterChangedRanges((e,t,i,o)=>{for(let e=0;e<n.length;){let t=n[e++],s=n[e++];o>=t&&i<=s&&(r=!0)}}),r}(s.changes,e.changes))||"input.type.compose"==n)?rE(o,o.length-1,r.minDepth,new nE(e.changes.compose(s.changes),iE(KA.mapEffects(e.effects,s.changes),s.effects),s.mapped,s.startSelection,oE)):rE(o,o.length,r.minDepth,e),new uE(o,oE,t,n)}addSelection(e,t,n,r){let i=this.done.length?this.done[this.done.length-1].selectionsAfter:oE;return i.length>0&&t-this.prevTime<r&&n==this.prevUserEvent&&n&&/^select($|\.)/.test(n)&&(o=i[i.length-1],s=e,o.ranges.length==s.ranges.length&&0===o.ranges.filter((e,t)=>e.empty!=s.ranges[t].empty).length)?this:new uE(sE(this.done,e),this.undone,t,n);var o,s}addMapping(e){return new uE(lE(this.done,e),lE(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,t,n){let r=0==e?this.done:this.undone;if(0==r.length)return null;let i=r[r.length-1],o=i.selectionsAfter[0]||(i.startSelection?i.startSelection.map(i.changes.invertedDesc,1):t.selection);if(n&&i.selectionsAfter.length)return t.update({selection:i.selectionsAfter[i.selectionsAfter.length-1],annotations:HB.of({side:e,rest:aE(r),selection:o}),userEvent:0==e?"select.undo":"select.redo",scrollIntoView:!0});if(i.changes){let n=1==r.length?oE:r.slice(0,r.length-1);return i.mapped&&(n=lE(n,i.mapped)),t.update({changes:i.changes,selection:i.startSelection,effects:i.effects,annotations:HB.of({side:e,rest:n,selection:o}),filter:!1,userEvent:0==e?"undo":"redo",scrollIntoView:!0})}return null}}uE.empty=new uE(oE,oE);const pE=[{key:"Mod-z",run:KB,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:ZB,preventDefault:!0},{linux:"Ctrl-Shift-z",run:ZB,preventDefault:!0},{key:"Mod-u",run:eE,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:tE,preventDefault:!0}];function hE(e,t){return bA.create(e.ranges.map(t),e.mainIndex)}function fE(e,t){return e.update({selection:t,scrollIntoView:!0,userEvent:"select"})}function gE({state:e,dispatch:t},n){let r=hE(e.selection,n);return!r.eq(e.selection,!0)&&(t(fE(e,r)),!0)}function mE(e,t){return bA.cursor(t?e.to:e.from)}function vE(e,t){return gE(e,n=>n.empty?e.moveByChar(n,t):mE(n,t))}function AE(e){return e.textDirectionAt(e.state.selection.main.head)==qy.LTR}const bE=e=>vE(e,!AE(e)),yE=e=>vE(e,AE(e));function CE(e,t){return gE(e,n=>n.empty?e.moveByGroup(n,t):mE(n,t))}"undefined"!=typeof Intl&&Intl.Segmenter;function xE(e,t,n){if(t.type.prop(n))return!0;let r=t.to-t.from;return r&&(r>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}function wE(e,t,n){let r,i,o=h_(e).resolveInner(t.head),s=n?iO.closedBy:iO.openedBy;for(let r=t.head;;){let t=n?o.childAfter(r):o.childBefore(r);if(!t)break;xE(e,t,s)?o=t:r=n?t.to:t.from}return i=o.type.prop(s)&&(r=n?EB(e,o.from,1):EB(e,o.to,-1))&&r.matched?n?r.end.to:r.end.from:n?o.to:o.from,bA.cursor(i,n?-1:1)}function kE(e,t){return gE(e,n=>{if(!n.empty)return mE(n,t);let r=e.moveVertically(n,t);return r.head!=n.head?r:e.moveToLineBoundary(n,t)})}const SE=e=>kE(e,!1),OE=e=>kE(e,!0);function _E(e){let t,n=e.scrollDOM.clientHeight<e.scrollDOM.scrollHeight-2,r=0,i=0;if(n){for(let t of e.state.facet(rk.scrollMargins)){let n=t(e);(null==n?void 0:n.top)&&(r=Math.max(null==n?void 0:n.top,r)),(null==n?void 0:n.bottom)&&(i=Math.max(null==n?void 0:n.bottom,i))}t=e.scrollDOM.clientHeight-r-i}else t=(e.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:r,marginBottom:i,selfScroll:n,height:Math.max(e.defaultLineHeight,t-5)}}function BE(e,t){let n,r=_E(e),{state:i}=e,o=hE(i.selection,n=>n.empty?e.moveVertically(n,t,r.height):mE(n,t));if(o.eq(i.selection))return!1;if(r.selfScroll){let t=e.coordsAtPos(i.selection.main.head),s=e.scrollDOM.getBoundingClientRect(),a=s.top+r.marginTop,l=s.bottom-r.marginBottom;t&&t.top>a&&t.bottom<l&&(n=rk.scrollIntoView(o.main.head,{y:"start",yMargin:t.top-a}))}return e.dispatch(fE(i,o),{effects:n}),!0}const EE=e=>BE(e,!1),TE=e=>BE(e,!0);function ME(e,t,n){let r=e.lineBlockAt(t.head),i=e.moveToLineBoundary(t,n);if(i.head==t.head&&i.head!=(n?r.to:r.from)&&(i=e.moveToLineBoundary(t,n,!1)),!n&&i.head==r.from&&r.length){let n=/^\s*/.exec(e.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;n&&t.head!=r.from+n&&(i=bA.cursor(r.from+n))}return i}function DE(e,t,n){let r=!1,i=hE(e.selection,t=>{let i=EB(e,t.head,-1)||EB(e,t.head,1)||t.head>0&&EB(e,t.head-1,1)||t.head<e.doc.length&&EB(e,t.head+1,-1);if(!i||!i.end)return t;r=!0;let o=i.start.from==t.head?i.end.to:i.end.from;return n?bA.range(t.anchor,o):bA.cursor(o)});return!!r&&(t(fE(e,i)),!0)}function PE(e,t,n){let r=hE(e.state.selection,e=>{e.undirectional&&e.head>=e.anchor!=t&&(e=bA.range(e.head,e.anchor));let r=n(e);return bA.range(e.anchor,r.head,r.goalColumn,r.bidiLevel||void 0,r.assoc)});return!r.eq(e.state.selection)&&(e.dispatch(fE(e.state,r)),!0)}function RE(e,t){return PE(e,t,n=>e.moveByChar(n,t))}const IE=e=>RE(e,!AE(e)),NE=e=>RE(e,AE(e));function LE(e,t){return PE(e,t,n=>e.moveByGroup(n,t))}function $E(e,t){return PE(e,t,n=>e.moveVertically(n,t))}const FE=e=>$E(e,!1),jE=e=>$E(e,!0);function VE(e,t){return PE(e,t,n=>e.moveVertically(n,t,_E(e).height))}const WE=e=>VE(e,!1),zE=e=>VE(e,!0),QE=({state:e,dispatch:t})=>(t(fE(e,{anchor:0})),!0),HE=({state:e,dispatch:t})=>(t(fE(e,{anchor:e.doc.length})),!0),qE=({state:e,dispatch:t})=>(t(fE(e,{anchor:e.selection.main.anchor,head:0})),!0),UE=({state:e,dispatch:t})=>(t(fE(e,{anchor:e.selection.main.anchor,head:e.doc.length})),!0);function YE(e,t){let{state:n}=e,r=n.selection,i=n.selection.ranges.slice();for(let r of n.selection.ranges){let o=n.doc.lineAt(r.head);if(t?o.to<e.state.doc.length:o.from>0)for(let n=r;;){let r=e.moveVertically(n,t);if(r.head<o.from||r.head>o.to){i.some(e=>e.head==r.head)||i.push(r);break}if(r.head==n.head)break;n=r}}return i.length!=r.ranges.length&&(e.dispatch(fE(n,bA.create(i,i.length-1))),!0)}function XE(e,t){if(e.state.readOnly)return!1;let n="delete.selection",{state:r}=e,i=r.changeByRange(r=>{let{from:i,to:o}=r;if(i==o){let s=t(r);s<i?(n="delete.backward",s=JE(e,s,!1)):s>i&&(n="delete.forward",s=JE(e,s,!0)),i=Math.min(i,s),o=Math.max(o,s)}else i=JE(e,i,!1),o=JE(e,o,!0);return i==o?{range:r}:{changes:{from:i,to:o},range:bA.cursor(i,i<r.head?-1:1)}});return!i.changes.empty&&(e.dispatch(r.update(i,{scrollIntoView:!0,userEvent:n,effects:"delete.selection"==n?rk.announce.of(r.phrase("Selection deleted")):void 0})),!0)}function JE(e,t,n){if(e instanceof rk)for(let r of e.state.facet(rk.atomicRanges).map(t=>t(e)))r.between(t,t,(e,r)=>{e<t&&r>t&&(t=n?r:e)});return t}const GE=(e,t,n)=>XE(e,r=>{let i,o,s=r.from,{state:a}=e,l=a.doc.lineAt(s);if(n&&!t&&s>l.from&&s<l.from+200&&!/[^ \t]/.test(i=l.text.slice(0,s-l.from))){if("\t"==i[i.length-1])return s-1;let e=Tb(i,a.tabSize)%O_(a)||O_(a);for(let t=0;t<e&&" "==i[i.length-1-t];t++)s--;o=s}else o=iA(l.text,s-l.from,t,t)+l.from,o==s&&l.number!=(t?a.doc.lines:1)?o+=t?1:-1:!t&&/[\ufe00-\ufe0f]/.test(l.text.slice(o-l.from,s-l.from))&&(o=iA(l.text,o-l.from,!1,!1)+l.from);return o}),KE=e=>GE(e,!1,!0),ZE=e=>GE(e,!0,!1),eT=(e,t)=>XE(e,n=>{let r=n.head,{state:i}=e,o=i.doc.lineAt(r),s=i.charCategorizer(r);for(let e=null;;){if(r==(t?o.to:o.from)){r==n.head&&o.number!=(t?i.doc.lines:1)&&(r+=t?1:-1);break}let a=iA(o.text,r-o.from,t)+o.from,l=o.text.slice(Math.min(r,a)-o.from,Math.max(r,a)-o.from),c=s(l);if(null!=e&&c!=e)break;" "==l&&r==n.head||(e=c),r=a}return r}),tT=e=>eT(e,!1);function nT(e){let t=[],n=-1;for(let r of e.selection.ranges){let i=e.doc.lineAt(r.from),o=e.doc.lineAt(r.to);if(r.empty||r.to!=o.from||(o=e.doc.lineAt(r.to-1)),n>=i.number){let e=t[t.length-1];e.to=o.to,e.ranges.push(r)}else t.push({from:i.from,to:o.to,ranges:[r]});n=o.number+1}return t}function rT(e,t,n){if(e.readOnly)return!1;let r=[],i=[];for(let t of nT(e)){if(n?t.to==e.doc.length:0==t.from)continue;let o=e.doc.lineAt(n?t.to+1:t.from-1),s=o.length+1;if(n){r.push({from:t.to,to:o.to},{from:t.from,insert:o.text+e.lineBreak});for(let n of t.ranges)i.push(bA.range(Math.min(e.doc.length,n.anchor+s),Math.min(e.doc.length,n.head+s)))}else{r.push({from:o.from,to:t.from},{from:t.to,insert:e.lineBreak+o.text});for(let e of t.ranges)i.push(bA.range(e.anchor-s,e.head-s))}}return!!r.length&&(t(e.update({changes:r,scrollIntoView:!0,selection:bA.create(i,e.selection.mainIndex),userEvent:"move.line"})),!0)}function iT(e,t,n){if(e.readOnly)return!1;let r=[];for(let t of nT(e))n?r.push({from:t.from,insert:e.doc.slice(t.from,t.to)+e.lineBreak}):r.push({from:t.to,insert:e.lineBreak+e.doc.slice(t.from,t.to)});let i=e.changes(r);return t(e.update({changes:i,selection:e.selection.map(i,n?1:-1),scrollIntoView:!0,userEvent:"input.copyline"})),!0}const oT=aT(!1),sT=aT(!0);function aT(e){return({state:t,dispatch:n})=>{if(t.readOnly)return!1;let r=t.changeByRange(n=>{let{from:r,to:i}=n,o=t.doc.lineAt(r),s=!e&&r==i&&function(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};let n,r=h_(e).resolveInner(t),i=r.childBefore(t),o=r.childAfter(t);return i&&o&&i.to<=t&&o.from>=t&&(n=i.type.prop(iO.closedBy))&&n.indexOf(o.name)>-1&&e.doc.lineAt(i.to).from==e.doc.lineAt(o.from).from&&!/\S/.test(e.sliceDoc(i.to,o.from))?{from:i.to,to:o.from}:null}(t,r);e&&(r=i=(i<=o.to?o:t.doc.lineAt(i)).to);let a=new E_(t,{simulateBreak:r,simulateDoubleBreak:!!s}),l=B_(a,r);for(null==l&&(l=Tb(/^\s*/.exec(t.doc.lineAt(r).text)[0],t.tabSize));i<o.to&&/\s/.test(o.text[i-o.from]);)i++;s?({from:r,to:i}=s):r>o.from&&r<o.from+100&&!/\S/.test(o.text.slice(0,r))&&(r=o.from);let c=["",__(t,l)];return s&&c.push(__(t,a.lineIndent(o.from,-1))),{changes:{from:r,to:i,insert:Yv.of(c)},range:bA.cursor(r+1+c[1].length)}});return n(t.update(r,{scrollIntoView:!0,userEvent:"input"})),!0}}function lT(e,t){let n=-1;return e.changeByRange(r=>{let i=[];for(let o=r.from;o<=r.to;){let s=e.doc.lineAt(o);s.number>n&&(r.empty||r.to>s.from)&&(t(s,i,r),n=s.number),o=s.to+1}let o=e.changes(i);return{changes:i,range:bA.range(o.mapPos(r.anchor,1),o.mapPos(r.head,1))}})}const cT=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(lT(e,(t,n)=>{n.push({from:t.from,insert:e.facet(S_)})}),{userEvent:"input.indent"})),!0),dT=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(lT(e,(t,n)=>{let r=/^\s*/.exec(t.text)[0];if(!r)return;let i=Tb(r,e.tabSize),o=0,s=__(e,Math.max(0,i-O_(e)));for(;o<r.length&&o<s.length&&r.charCodeAt(o)==s.charCodeAt(o);)o++;n.push({from:t.from+o,to:t.from+r.length,insert:s.slice(o)})}),{userEvent:"delete.dedent"})),!0),uT=[{key:"Ctrl-b",run:bE,shift:IE,preventDefault:!0},{key:"Ctrl-f",run:yE,shift:NE},{key:"Ctrl-p",run:SE,shift:FE},{key:"Ctrl-n",run:OE,shift:jE},{key:"Ctrl-a",run:e=>gE(e,t=>e.moveToLineBoundary(t,!1,!1)),shift:e=>PE(e,!1,t=>bA.cursor(e.lineBlockAt(t.head).from))},{key:"Ctrl-e",run:e=>gE(e,t=>e.moveToLineBoundary(t,!0,!1)),shift:e=>PE(e,!0,t=>bA.cursor(e.lineBlockAt(t.head).to))},{key:"Ctrl-d",run:ZE},{key:"Ctrl-h",run:KE},{key:"Ctrl-k",run:e=>XE(e,t=>{let n=e.lineBlockAt(t.head).to;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)})},{key:"Ctrl-Alt-h",run:tT},{key:"Ctrl-o",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(e=>({changes:{from:e.from,to:e.to,insert:Yv.of(["",""])},range:bA.cursor(e.from)}));return t(e.update(n,{scrollIntoView:!0,userEvent:"input"})),!0}},{key:"Ctrl-t",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(t=>{if(!t.empty||0==t.from||t.from==e.doc.length)return{range:t};let n=t.from,r=e.doc.lineAt(n),i=n==r.from?n-1:iA(r.text,n-r.from,!1)+r.from,o=n==r.to?n+1:iA(r.text,n-r.from,!0)+r.from;return{changes:{from:i,to:o,insert:e.doc.slice(n,o).append(e.doc.slice(i,n))},range:bA.cursor(o)}});return!n.changes.empty&&(t(e.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)}},{key:"Ctrl-v",run:TE}],pT=[{key:"ArrowLeft",run:bE,shift:IE,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:e=>CE(e,!AE(e)),shift:e=>LE(e,!AE(e)),preventDefault:!0},{mac:"Cmd-ArrowLeft",run:e=>gE(e,t=>ME(e,t,!AE(e))),shift:e=>{let t=!AE(e);return PE(e,t,n=>ME(e,n,t))},preventDefault:!0},{key:"ArrowRight",run:yE,shift:NE,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:e=>CE(e,AE(e)),shift:e=>LE(e,AE(e)),preventDefault:!0},{mac:"Cmd-ArrowRight",run:e=>gE(e,t=>ME(e,t,AE(e))),shift:e=>{let t=AE(e);return PE(e,t,n=>ME(e,n,t))},preventDefault:!0},{key:"ArrowUp",run:SE,shift:FE,preventDefault:!0},{mac:"Cmd-ArrowUp",run:QE,shift:qE},{mac:"Ctrl-ArrowUp",run:EE,shift:WE},{key:"ArrowDown",run:OE,shift:jE,preventDefault:!0},{mac:"Cmd-ArrowDown",run:HE,shift:UE},{mac:"Ctrl-ArrowDown",run:TE,shift:zE},{key:"PageUp",run:EE,shift:WE},{key:"PageDown",run:TE,shift:zE},{key:"Home",run:e=>gE(e,t=>ME(e,t,!1)),shift:e=>PE(e,!1,t=>ME(e,t,!1)),preventDefault:!0},{key:"Mod-Home",run:QE,shift:qE},{key:"End",run:e=>gE(e,t=>ME(e,t,!0)),shift:e=>PE(e,!0,t=>ME(e,t,!0)),preventDefault:!0},{key:"Mod-End",run:HE,shift:UE},{key:"Enter",run:oT,shift:oT},{key:"Mod-a",run:({state:e,dispatch:t})=>(t(e.update({selection:{anchor:0,head:e.doc.length},userEvent:"select"})),!0)},{key:"Backspace",run:KE,shift:KE,preventDefault:!0},{key:"Delete",run:ZE,preventDefault:!0},{key:"Mod-Backspace",mac:"Alt-Backspace",run:tT,preventDefault:!0},{key:"Mod-Delete",mac:"Alt-Delete",run:e=>eT(e,!0),preventDefault:!0},{mac:"Mod-Backspace",run:e=>XE(e,t=>{let n=e.moveToLineBoundary(t,!1).head;return t.head>n?n:Math.max(0,t.head-1)}),preventDefault:!0},{mac:"Mod-Delete",run:e=>XE(e,t=>{let n=e.moveToLineBoundary(t,!0).head;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)}),preventDefault:!0}].concat(uT.map(e=>({mac:e.key,run:e.run,shift:e.shift}))),hT=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:e=>gE(e,t=>wE(e.state,t,!AE(e))),shift:e=>{let t=!AE(e);return PE(e,t,n=>wE(e.state,n,t))}},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:e=>gE(e,t=>wE(e.state,t,AE(e))),shift:e=>{let t=AE(e);return PE(e,t,n=>wE(e.state,n,t))}},{key:"Alt-ArrowUp",run:({state:e,dispatch:t})=>rT(e,t,!1)},{key:"Shift-Alt-ArrowUp",run:({state:e,dispatch:t})=>iT(e,t,!1)},{key:"Alt-ArrowDown",run:({state:e,dispatch:t})=>rT(e,t,!0)},{key:"Shift-Alt-ArrowDown",run:({state:e,dispatch:t})=>iT(e,t,!0)},{key:"Mod-Alt-ArrowUp",run:e=>YE(e,!1)},{key:"Mod-Alt-ArrowDown",run:e=>YE(e,!0)},{key:"Escape",run:({state:e,dispatch:t})=>{let n=e.selection,r=null;return n.ranges.length>1?r=bA.create([n.main]):n.main.empty||(r=bA.create([bA.cursor(n.main.head)])),!!r&&(t(fE(e,r)),!0)}},{key:"Mod-Enter",run:sT},{key:"Alt-l",mac:"Ctrl-l",run:({state:e,dispatch:t})=>{let n=nT(e).map(({from:t,to:n})=>bA.undirectionalRange(t,Math.min(n+1,e.doc.length)));return t(e.update({selection:bA.create(n),userEvent:"select"})),!0}},{key:"Mod-i",run:({state:e,dispatch:t})=>{let n=hE(e.selection,t=>{let n=h_(e),r=n.resolveStack(t.from,1);if(t.empty){let e=n.resolveStack(t.from,-1);e.node.from>=r.node.from&&e.node.to<=r.node.to&&(r=e)}for(let e=r;e;e=e.next){let{node:n}=e;if((n.from<t.from&&n.to>=t.to||n.to>t.to&&n.from<=t.from)&&e.next)return bA.undirectionalRange(n.from,n.to)}return t});return!n.eq(e.selection)&&(t(fE(e,n)),!0)},preventDefault:!0},{key:"Mod-[",run:dT},{key:"Mod-]",run:cT},{key:"Mod-Alt-\\",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Object.create(null),r=new E_(e,{overrideIndentation:e=>{let t=n[e];return t??-1}}),i=lT(e,(t,i,o)=>{let s=B_(r,t.from);if(null==s)return;/\S/.test(t.text)||(s=0);let a=/^\s*/.exec(t.text)[0],l=__(e,s);(a!=l||o.from<t.from+a.length)&&(n[t.from]=s,i.push({from:t.from,to:t.from+a.length,insert:l}))});return i.changes.empty||t(e.update(i,{userEvent:"indent"})),!0}},{key:"Shift-Mod-k",run:e=>{if(e.state.readOnly)return!1;let{state:t}=e,n=t.changes(nT(t).map(({from:e,to:n})=>(e>0?e--:n<t.doc.length&&n++,{from:e,to:n}))),r=hE(t.selection,t=>{let n;if(e.lineWrapping){let r=e.lineBlockAt(t.head),i=e.coordsAtPos(t.head,t.assoc||1);i&&(n=r.bottom+e.documentTop-i.bottom+e.defaultLineHeight/2)}return e.moveVertically(t,!0,n)}).map(n);return e.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0}},{key:"Shift-Mod-\\",run:({state:e,dispatch:t})=>DE(e,t,!1)},{key:"Mod-/",run:e=>{let{state:t}=e,n=t.doc.lineAt(t.selection.main.from),r=WB(e.state,n.from);return r.line?FB(e):!!r.block&&VB(e)}},{key:"Alt-A",mac:"Ctrl-A",run:jB},{key:"Ctrl-m",mac:"Shift-Alt-m",run:e=>(e.setTabFocusMode(),!0)}].concat(pT),fT={key:"Tab",run:cT,shift:dT},gT="function"==typeof String.prototype.normalize?e=>e.normalize("NFKD"):e=>e;class mT{constructor(e,t,n=0,r=e.length,i,o){this.test=o,this.value={from:0,to:0,precise:!1},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(n,r),this.bufferStart=n,this.normalize=i?e=>i(gT(e)):gT,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return oA(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=sA(e),n=this.bufferStart+this.bufferPos;this.bufferPos+=aA(e);let r=this.normalize(t);if(r.length)for(let e=0,i=n,o=!0;;e++){let n=r.charCodeAt(e),s=this.match(n,i,o,this.bufferPos+this.bufferStart,e==r.length-1);if(s)return this.value=s,this;if(e==r.length-1)break;o&&e<t.length&&t.charCodeAt(e)==n?i++:o=!1}}}match(e,t,n,r,i){let o=null;for(let t=0;t<this.matches.length;){let n=this.matches[t],s=!1;this.query.charCodeAt(n.index)==e&&(n.index==this.query.length-1?o={from:n.from,to:r,precise:i&&n.precise}:(n.index++,s=!0)),s?t++:this.matches.splice(t,1)}return this.query.charCodeAt(0)==e&&(1==this.query.length?o={from:t,to:r,precise:n&&i}:this.matches.push({from:t,index:1,precise:n})),o&&this.test&&!this.test(o.from,o.to,this.buffer,this.bufferStart)&&(o=null),o}}"undefined"!=typeof Symbol&&(mT.prototype[Symbol.iterator]=function(){return this});const vT={from:-1,to:-1,match:/.*/.exec(""),precise:!0},AT="gm"+(null==/x/.unicode?"":"u");class bT{constructor(e,t,n,r=0,i=e.length){if(this.text=e,this.to=i,this.curLine="",this.done=!1,this.value=vT,/\\[sWDnr]|\n|\r|\[\^/.test(t))return new xT(e,t,n,r,i);this.re=new RegExp(t,AT+((null==n?void 0:n.ignoreCase)?"i":"")),this.test=null==n?void 0:n.test,this.iter=e.iter();let o=e.lineAt(r);this.curLineStart=o.from,this.matchPos=wT(e,r),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let n=this.curLineStart+t.index,r=n+t[0].length;if(this.matchPos=wT(this.text,r+(n==r?1:0)),n==this.curLineStart+this.curLine.length&&this.nextLine(),(n<r||n>this.value.to)&&(!this.test||this.test(n,r,t)))return this.value={from:n,to:r,precise:!0,match:t},this;e=this.matchPos-this.curLineStart}else{if(!(this.curLineStart+this.curLine.length<this.to))return this.done=!0,this;this.nextLine(),e=0}}}}const yT=new WeakMap;class CT{constructor(e,t){this.from=e,this.text=t}get to(){return this.from+this.text.length}static get(e,t,n){let r=yT.get(e);if(!r||r.from>=n||r.to<=t){let r=new CT(t,e.sliceString(t,n));return yT.set(e,r),r}if(r.from==t&&r.to==n)return r;let{text:i,from:o}=r;return o>t&&(i=e.sliceString(t,o)+i,o=t),r.to<n&&(i+=e.sliceString(r.to,n)),yT.set(e,new CT(o,i)),new CT(t,i.slice(t-o,n-o))}}class xT{constructor(e,t,n,r,i){this.text=e,this.to=i,this.done=!1,this.value=vT,this.matchPos=wT(e,r),this.re=new RegExp(t,AT+((null==n?void 0:n.ignoreCase)?"i":"")),this.test=null==n?void 0:n.test,this.flat=CT.get(e,r,this.chunkEnd(r+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let e=this.flat.from+t.index,n=e+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(e,n,t)))return this.value={from:e,to:n,precise:!0,match:t},this.matchPos=wT(this.text,n+(e==n?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=CT.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+2*this.flat.text.length))}}}function wT(e,t){if(t>=e.length)return t;let n,r=e.lineAt(t);for(;t<r.to&&(n=r.text.charCodeAt(t-r.from))>=56320&&n<57344;)t++;return t}"undefined"!=typeof Symbol&&(bT.prototype[Symbol.iterator]=xT.prototype[Symbol.iterator]=function(){return this});const kT={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},ST=xA.define({combine:e=>ub(e,kT,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})});function OT(e){let t=[MT,TT];return e&&t.push(ST.of(e)),t}const _T=py.mark({class:"cm-selectionMatch"}),BT=py.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function ET(e,t,n,r){return!(0!=n&&e(t.sliceDoc(n-1,n))==sb.Word||r!=t.doc.length&&e(t.sliceDoc(r,r+1))==sb.Word)}const TT=MC.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.selectionSet||e.docChanged||e.viewportChanged)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=e.state.facet(ST),{state:n}=e,r=n.selection;if(r.ranges.length>1)return py.none;let i,o=r.main,s=null;if(o.empty){if(!t.highlightWordAroundCursor)return py.none;let e=n.wordAt(o.head);if(!e)return py.none;s=n.charCategorizer(o.head),i=n.sliceDoc(e.from,e.to)}else{let e=o.to-o.from;if(e<t.minSelectionLength||e>200)return py.none;if(t.wholeWords){if(i=n.sliceDoc(o.from,o.to),s=n.charCategorizer(o.head),!ET(s,n,o.from,o.to)||!function(e,t,n,r){return e(t.sliceDoc(n,n+1))==sb.Word&&e(t.sliceDoc(r-1,r))==sb.Word}(s,n,o.from,o.to))return py.none}else if(i=n.sliceDoc(o.from,o.to),!i)return py.none}let a=[];for(let r of e.visibleRanges){let e=new mT(n.doc,i,r.from,r.to);for(;!e.next().done;){let{from:r,to:i}=e.value;if((!s||ET(s,n,r,i))&&(o.empty&&r<=o.from&&i>=o.to?a.push(BT.range(r,i)):(r>=o.to||i<=o.from)&&a.push(_T.range(r,i)),a.length>t.maxMatches))return py.none}}return py.set(a)}},{decorations:e=>e.decorations}),MT=rk.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}});const DT=xA.define({combine:e=>ub(e,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new aM(e),scrollToMatch:e=>rk.scrollIntoView(e)})});class PT{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||function(e){try{return new RegExp(e,AT),!0}catch(e){return!1}}(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord,this.test=e.test}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(e,t)=>"n"==t?"\n":"r"==t?"\r":"t"==t?"\t":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord&&this.test==e.test}create(){return this.regexp?new jT(this):new NT(this)}getCursor(e,t=0,n){let r=e.doc?e:db.create({doc:e});return null==n&&(n=r.doc.length),this.regexp?LT(this,r,t,n):IT(this,r,t,n)}}class RT{constructor(e){this.spec=e}}function IT(e,t,n,r){let i;return e.wholeWord&&(i=function(e,t){return(n,r,i,o)=>((o>n||o+i.length<r)&&(o=Math.max(0,n-2),i=e.sliceString(o,Math.min(e.length,r+2))),!(t($T(i,n-o))==sb.Word&&t(FT(i,n-o))==sb.Word||t(FT(i,r-o))==sb.Word&&t($T(i,r-o))==sb.Word))}(t.doc,t.charCategorizer(t.selection.main.head))),e.test&&(i=function(e,t,n){return(r,i,o,s)=>{if(n&&!n(r,i,o,s))return!1;let a=r>=s&&i<=s+o.length?o.slice(r-s,i-s):t.doc.sliceString(r,i);return e(a,t,r,i)}}(e.test,t,i)),new mT(t.doc,e.unquoted,n,r,e.caseSensitive?void 0:e=>e.toLowerCase(),i)}class NT extends RT{constructor(e){super(e)}nextMatch(e,t,n){let r=IT(this.spec,e,n,e.doc.length).nextOverlapping();if(r.done){let n=Math.min(e.doc.length,t+this.spec.unquoted.length);r=IT(this.spec,e,0,n).nextOverlapping()}return r.done||r.value.from==t&&r.value.to==n?null:r.value}prevMatchInRange(e,t,n){for(let r=n;;){let n=Math.max(t,r-1e4-this.spec.unquoted.length),i=IT(this.spec,e,n,r),o=null;for(;!i.nextOverlapping().done;)o=i.value;if(o)return o;if(n==t)return null;r-=1e4}}prevMatch(e,t,n){let r=this.prevMatchInRange(e,0,t);return r||(r=this.prevMatchInRange(e,Math.max(0,n-this.spec.unquoted.length),e.doc.length)),!r||r.from==t&&r.to==n?null:r}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,t){let n=IT(this.spec,e,0,e.doc.length),r=[];for(;!n.next().done;){if(r.length>=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let i=IT(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,e.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}}function LT(e,t,n,r){let i;var o;return e.wholeWord&&(o=t.charCategorizer(t.selection.main.head),i=(e,t,n)=>!n[0].length||(o($T(n.input,n.index))!=sb.Word||o(FT(n.input,n.index))!=sb.Word)&&(o(FT(n.input,n.index+n[0].length))!=sb.Word||o($T(n.input,n.index+n[0].length))!=sb.Word)),e.test&&(i=function(e,t,n){return(r,i,o)=>(!n||n(r,i,o))&&e(o[0],t,r,i)}(e.test,t,i)),new bT(t.doc,e.search,{ignoreCase:!e.caseSensitive,test:i},n,r)}function $T(e,t){return e.slice(iA(e,t,!1),t)}function FT(e,t){return e.slice(t,iA(e,t))}class jT extends RT{nextMatch(e,t,n){let r=LT(this.spec,e,n,e.doc.length).next();return r.done&&(r=LT(this.spec,e,0,t).next()),r.done?null:r.value}prevMatchInRange(e,t,n){for(let r=1;;r++){let i=Math.max(t,n-1e4*r),o=LT(this.spec,e,i,n),s=null;for(;!o.next().done;)s=o.value;if(s&&(i==t||s.from>i+10))return s;if(i==t)return null}}prevMatch(e,t,n){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,n,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(t,n)=>{if("&"==n)return e.match[0];if("$"==n)return"$";for(let t=n.length;t>0;t--){let r=+n.slice(0,t);if(r>0&&r<e.match.length)return e.match[r]+n.slice(t)}return t})}matchAll(e,t){let n=LT(this.spec,e,0,e.doc.length),r=[];for(;!n.next().done;){if(r.length>=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let i=LT(this.spec,e,Math.max(0,t-250),Math.min(n+250,e.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}}const VT=KA.define(),WT=KA.define(),zT=EA.define({create:e=>new QT(tM(e).create(),null),update(e,t){for(let n of t.effects)n.is(VT)?e=new QT(n.value.create(),e.panel):n.is(WT)&&(e=new QT(e.query,n.value?eM:null));return e},provide:e=>OS.from(e,e=>e.panel)});class QT{constructor(e,t){this.query=e,this.panel=t}}const HT=py.mark({class:"cm-searchMatch"}),qT=py.mark({class:"cm-searchMatch cm-searchMatch-selected"}),UT=MC.fromClass(class{constructor(e){this.view=e,this.decorations=this.highlight(e.state.field(zT))}update(e){let t=e.state.field(zT);(t!=e.startState.field(zT)||e.docChanged||e.selectionSet||e.viewportChanged)&&(this.decorations=this.highlight(t))}highlight({query:e,panel:t}){if(!t||!e.spec.valid)return py.none;let{view:n}=this,r=new bb;for(let t=0,i=n.visibleRanges,o=i.length;t<o;t++){let{from:s,to:a}=i[t];for(;t<o-1&&a>i[t+1].from-500;)a=i[++t].to;e.highlight(n.state,s,a,(e,t)=>{let i=n.state.selection.ranges.some(n=>n.from==e&&n.to==t);r.add(e,t,i?qT:HT)})}return r.finish()}},{decorations:e=>e.decorations});function YT(e){return t=>{let n=t.state.field(zT,!1);return n&&n.query.spec.valid?e(t,n):iM(t)}}const XT=YT((e,{query:t})=>{let{to:n}=e.state.selection.main,r=t.nextMatch(e.state,n,n);if(!r)return!1;let i=bA.single(r.from,r.to),o=e.state.facet(DT);return e.dispatch({selection:i,effects:[dM(e,r),o.scrollToMatch(i.main,e)],userEvent:"select.search"}),rM(e),!0}),JT=YT((e,{query:t})=>{let{state:n}=e,{from:r}=n.selection.main,i=t.prevMatch(n,r,r);if(!i)return!1;let o=bA.single(i.from,i.to),s=e.state.facet(DT);return e.dispatch({selection:o,effects:[dM(e,i),s.scrollToMatch(o.main,e)],userEvent:"select.search"}),rM(e),!0}),GT=YT((e,{query:t})=>{let n=t.matchAll(e.state,1e3);return!(!n||!n.length)&&(e.dispatch({selection:bA.create(n.map(e=>bA.range(e.from,e.to))),userEvent:"select.search.matches"}),!0)}),KT=YT((e,{query:t})=>{let{state:n}=e,{from:r,to:i}=n.selection.main;if(n.readOnly)return!1;let o=t.nextMatch(n,r,r);if(!o)return!1;let s,a,l=o,c=[],d=[];l.precise?l.from==r&&l.to==i&&(a=n.toText(t.getReplacement(l)),c.push({from:l.from,to:l.to,insert:a}),l=t.nextMatch(n,l.from,l.to),d.push(rk.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(r).number)+"."))):l=t.nextMatch(n,l.from,l.to);let u=e.state.changes(c);return l&&(s=bA.single(l.from,l.to).map(u),d.push(dM(e,l)),d.push(n.facet(DT).scrollToMatch(s.main,e))),e.dispatch({changes:u,selection:s,effects:d,userEvent:"input.replace"}),!0}),ZT=YT((e,{query:t})=>{if(e.state.readOnly)return!1;let n=[];for(let r of t.matchAll(e.state,1e9)){let{from:e,to:i,precise:o}=r;o&&n.push({from:e,to:i,insert:t.getReplacement(r)})}if(!n.length)return!1;let r=e.state.phrase("replaced $ matches",n.length)+".";return e.dispatch({changes:n,effects:rk.announce.of(r),userEvent:"input.replace.all"}),!0});function eM(e){return e.state.facet(DT).createPanel(e)}function tM(e,t){var n,r,i,o,s;let a=e.selection.main,l=a.empty||a.to>a.from+100?"":e.sliceDoc(a.from,a.to);if(t&&!l)return t;let c=e.facet(DT);return new PT({search:(null!==(n=null==t?void 0:t.literal)&&void 0!==n?n:c.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:null!==(r=null==t?void 0:t.caseSensitive)&&void 0!==r?r:c.caseSensitive,literal:null!==(i=null==t?void 0:t.literal)&&void 0!==i?i:c.literal,regexp:null!==(o=null==t?void 0:t.regexp)&&void 0!==o?o:c.regexp,wholeWord:null!==(s=null==t?void 0:t.wholeWord)&&void 0!==s?s:c.wholeWord})}function nM(e){let t=xS(e,eM);return t&&t.dom.querySelector("[main-field]")}function rM(e){let t=nM(e);t&&t==e.root.activeElement&&t.select()}const iM=e=>{let t=e.state.field(zT,!1);if(t&&t.panel){let n=nM(e);if(n&&n!=e.root.activeElement){let r=tM(e.state,t.query.spec);r.valid&&e.dispatch({effects:VT.of(r)}),n.focus(),n.select()}}else e.dispatch({effects:[WT.of(!0),t?VT.of(tM(e.state,t.query.spec)):KA.appendConfig.of(pM)]});return!0},oM=e=>{let t=e.state.field(zT,!1);if(!t||!t.panel)return!1;let n=xS(e,eM);return n&&n.dom.contains(e.root.activeElement)&&e.focus(),e.dispatch({effects:WT.of(!1)}),!0},sM=[{key:"Mod-f",run:iM,scope:"editor search-panel"},{key:"F3",run:XT,shift:JT,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:XT,shift:JT,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:oM,scope:"editor search-panel"},{key:"Mod-Shift-l",run:({state:e,dispatch:t})=>{let n=e.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:r,to:i}=n.main,o=[],s=0;for(let t=new mT(e.doc,e.sliceDoc(r,i));!t.next().done;){if(o.length>1e3)return!1;t.value.from==r&&(s=o.length),o.push(bA.range(t.value.from,t.value.to))}return t(e.update({selection:bA.create(o,s),userEvent:"select.search.matches"})),!0}},{key:"Mod-Alt-g",run:e=>{let t=function(e,t){let n=e.state.field(BS,!1)||[];for(let r of n){let n=xS(e,r);if(n&&n.dom.classList.contains(t))return n}return null}(e,"cm-goto-line");if(t){let e=t.dom.querySelector("input[type=text]");return e&&e.select(),!0}let{state:n}=e,r=String(n.doc.lineAt(e.state.selection.main.head).number),{close:i,result:o}=_S(e,{class:"cm-goto-line",label:n.phrase("Go to line"),input:{type:"text",name:"line",value:r},focus:!0,submitLabel:n.phrase("go")});return o.then(t=>{let r=t&&/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(t.elements.line.value);if(!r)return void e.dispatch({effects:i});let o=n.doc.lineAt(n.selection.main.head),[,s,a,l,c]=r,d=l?+l.slice(1):0,u=a?+a:o.number;if(a&&c){let e=u/100;s&&(e=e*("-"==s?-1:1)+o.number/n.doc.lines),u=Math.round(n.doc.lines*e)}else a&&s&&(u=u*("-"==s?-1:1)+o.number);let p=n.doc.line(Math.max(1,Math.min(n.doc.lines,u))),h=bA.cursor(p.from+Math.max(0,Math.min(d,p.length)));e.dispatch({effects:[i,rk.scrollIntoView(h.from,{y:"center"})],selection:h})}),!0}},{key:"Mod-d",run:({state:e,dispatch:t})=>{let{ranges:n}=e.selection;if(n.some(e=>e.from===e.to))return(({state:e,dispatch:t})=>{let{selection:n}=e,r=bA.create(n.ranges.map(t=>e.wordAt(t.head)||bA.cursor(t.head)),n.mainIndex);return!r.eq(n)&&(t(e.update({selection:r})),!0)})({state:e,dispatch:t});let r=e.sliceDoc(n[0].from,n[0].to);if(e.selection.ranges.some(t=>e.sliceDoc(t.from,t.to)!=r))return!1;let i=function(e,t){let{main:n,ranges:r}=e.selection,i=e.wordAt(n.head),o=i&&i.from==n.from&&i.to==n.to;for(let n=!1,i=new mT(e.doc,t,r[r.length-1].to);;){if(i.next(),!i.done){if(n&&r.some(e=>e.from==i.value.from))continue;if(o){let t=e.wordAt(i.value.from);if(!t||t.from!=i.value.from||t.to!=i.value.to)continue}return i.value}if(n)return null;i=new mT(e.doc,t,0,Math.max(0,r[r.length-1].from-1)),n=!0}}(e,r);return!!i&&(t(e.update({selection:e.selection.addRange(bA.range(i.from,i.to),!1),effects:rk.scrollIntoView(i.to)})),!0)},preventDefault:!0}];class aM{constructor(e){this.view=e;let t=this.query=e.state.field(zT).query.spec;function n(e,t,n){return Hb("button",{class:"cm-button",name:e,onclick:t,type:"button"},n)}this.commit=this.commit.bind(this),this.searchField=Hb("input",{value:t.search,placeholder:lM(e,"Find"),"aria-label":lM(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=Hb("input",{value:t.replace,placeholder:lM(e,"Replace"),"aria-label":lM(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=Hb("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=Hb("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=Hb("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit}),this.dom=Hb("div",{onkeydown:e=>this.keydown(e),class:"cm-search"},[this.searchField,n("next",()=>XT(e),[lM(e,"next")]),n("prev",()=>JT(e),[lM(e,"previous")]),n("select",()=>GT(e),[lM(e,"all")]),Hb("label",null,[this.caseField,lM(e,"match case")]),Hb("label",null,[this.reField,lM(e,"regexp")]),Hb("label",null,[this.wordField,lM(e,"by word")]),...e.state.readOnly?[]:[Hb("br"),this.replaceField,n("replace",()=>KT(e),[lM(e,"replace")]),n("replaceAll",()=>ZT(e),[lM(e,"replace all")])],Hb("button",{name:"close",onclick:()=>oM(e),"aria-label":lM(e,"close"),type:"button"},["×"])])}commit(){let e=new PT({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:VT.of(e)}))}keydown(e){var t,n,r;t=this.view,n=e,r="search-panel",mk(hk(t.state),n,t,r)?e.preventDefault():13==e.keyCode&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?JT:XT)(this.view)):13==e.keyCode&&e.target==this.replaceField&&(e.preventDefault(),KT(this.view))}update(e){for(let t of e.transactions)for(let e of t.effects)e.is(VT)&&!e.value.eq(this.query)&&this.setQuery(e.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(DT).top}}function lM(e,t){return e.state.phrase(t)}const cM=/[\s\.,:;?!]/;function dM(e,{from:t,to:n}){let r=e.state.doc.lineAt(t),i=e.state.doc.lineAt(n).to,o=Math.max(r.from,t-30),s=Math.min(i,n+30),a=e.state.sliceDoc(o,s);if(o!=r.from)for(let e=0;e<30;e++)if(!cM.test(a[e+1])&&cM.test(a[e])){a=a.slice(e);break}if(s!=i)for(let e=a.length-1;e>a.length-30;e--)if(!cM.test(a[e-1])&&cM.test(a[e])){a=a.slice(0,e);break}return rk.announce.of(`${e.state.phrase("current match")}. ${a} ${e.state.phrase("on line")} ${r.number}.`)}const uM=rk.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),pM=[zT,IA.low(UT),uM];class hM{constructor(e,t,n,r){this.state=e,this.pos=t,this.explicit=n,this.view=r,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=h_(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),n=Math.max(t.from,this.pos-250),r=t.text.slice(n-t.from,this.pos-t.from),i=r.search(AM(e,!1));return i<0?null:{from:n+i,to:this.pos,text:r.slice(i)}}get aborted(){return null==this.abortListeners}addEventListener(e,t,n){"abort"==e&&this.abortListeners&&(this.abortListeners.push(t),n&&n.onDocChange&&(this.abortOnDocChange=!0))}}function fM(e){let t=Object.keys(e).join(""),n=/\w/.test(t);return n&&(t=t.replace(/\w/g,"")),`[${n?"\\w":""}${t.replace(/[^\w\s]/g,"\\$&")}]`}function gM(e){let t=e.map(e=>"string"==typeof e?{label:e}:e),[n,r]=t.every(e=>/^\w+$/.test(e.label))?[/\w*$/,/\w+$/]:function(e){let t=Object.create(null),n=Object.create(null);for(let{label:r}of e){t[r[0]]=!0;for(let e=1;e<r.length;e++)n[r[e]]=!0}let r=fM(t)+fM(n)+"*$";return[new RegExp("^"+r),new RegExp(r)]}(t);return e=>{let i=e.matchBefore(r);return i||e.explicit?{from:i?i.from:e.pos,options:t,validFor:n}:null}}class mM{constructor(e,t,n,r){this.completion=e,this.source=t,this.match=n,this.score=r}}function vM(e){return e.selection.main.from}function AM(e,t){var n;let{source:r}=e,i=t&&"^"!=r[0],o="$"!=r[r.length-1];return i||o?new RegExp(`${i?"^":""}(?:${r})${o?"$":""}`,null!==(n=e.flags)&&void 0!==n?n:e.ignoreCase?"i":""):e}const bM=XA.define();function yM(e,t,n,r){let{main:i}=e.selection,o=n-i.from,s=r-i.from;return{...e.changeByRange(a=>{if(a!=i&&n!=r&&e.sliceDoc(a.from+o,a.from+s)!=e.sliceDoc(n,r))return{range:a};let l=e.toText(t);return{changes:{from:a.from+o,to:r==i.from?a.to:a.from+s,insert:l},range:bA.cursor(a.from+o+l.length)}}),scrollIntoView:!0,userEvent:"input.complete"}}const CM=new WeakMap;function xM(e){if(!Array.isArray(e))return e;let t=CM.get(e);return t||CM.set(e,t=gM(e)),t}const wM=KA.define(),kM=KA.define();class SM{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t<e.length;){let n=oA(e,t),r=aA(n);this.chars.push(n);let i=e.slice(t,t+r),o=i.toUpperCase();this.folded.push(oA(o==i?i.toLowerCase():o,0)),t+=r}this.astral=e.length!=this.chars.length}ret(e,t){return this.score=e,this.matched=t,this}match(e){if(0==this.pattern.length)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:t,folded:n,any:r,precise:i,byWord:o}=this;if(1==t.length){let r=oA(e,0),i=aA(r),o=i==e.length?0:-100;if(r==t[0]);else{if(r!=n[0])return null;o+=-200}return this.ret(o,[0,i])}let s=e.indexOf(this.pattern);if(0==s)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let a=t.length,l=0;if(s<0){for(let i=0,o=Math.min(e.length,200);i<o&&l<a;){let o=oA(e,i);o!=t[l]&&o!=n[l]||(r[l++]=i),i+=aA(o)}if(l<a)return null}let c=0,d=0,u=!1,p=0,h=-1,f=-1,g=/[a-z]/.test(e),m=!0;for(let r=0,l=Math.min(e.length,200),v=0;r<l&&d<a;){let l=oA(e,r);s<0&&(c<a&&l==t[c]&&(i[c++]=r),p<a&&(l==t[p]||l==n[p]?(0==p&&(h=r),f=r+1,p++):p=0));let A,b=l<255?l>=48&&l<=57||l>=97&&l<=122?2:l>=65&&l<=90?1:0:(A=sA(l))!=A.toLowerCase()?1:A!=A.toUpperCase()?2:0;(!r||1==b&&g||0==v&&0!=b)&&(t[d]==l||n[d]==l&&(u=!0)?o[d++]=r:o.length&&(m=!1)),v=b,r+=aA(l)}return d==a&&0==o[0]&&m?this.result((u?-200:0)-100,o,e):p==a&&0==h?this.ret(-200-e.length+(f==e.length?0:-100),[0,f]):s>-1?this.ret(-700-e.length,[s,s+this.pattern.length]):p==a?this.ret(-900-e.length,[h,f]):d==a?this.result((u?-200:0)-100-700+(m?0:-1100),o,e):2==t.length?null:this.result((r[0]?-700:0)-200-1100,r,e)}result(e,t,n){let r=[],i=0;for(let e of t){let t=e+(this.astral?aA(oA(n,e)):1);i&&r[i-1]==e?r[i-1]=t:(r[i++]=e,r[i++]=t)}return this.ret(e-n.length,r)}}class OM{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length<this.pattern.length)return null;let t=e.slice(0,this.pattern.length),n=t==this.pattern?0:t.toLowerCase()==this.folded?-200:null;return null==n?null:(this.matched=[0,t.length],this.score=n+(e.length==this.pattern.length?0:-100),this)}}const _M=xA.define({combine:e=>ub(e,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:EM,filterStrict:!1,compareCompletions:(e,t)=>(e.sortText||e.label).localeCompare(t.sortText||t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>n=>BM(e(n),t(n)),optionClass:(e,t)=>n=>BM(e(n),t(n)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})});function BM(e,t){return e?t?e+" "+t:e:t}function EM(e,t,n,r,i,o){let s,a,l=e.textDirection==qy.RTL,c=l,d=!1,u="top",p=t.left-i.left,h=i.right-t.right,f=r.right-r.left,g=r.bottom-r.top;if(c&&p<Math.min(f,h)?c=!1:!c&&h<Math.min(f,p)&&(c=!0),f<=(c?p:h))s=Math.max(i.top,Math.min(n.top,i.bottom-g))-t.top,a=Math.min(400,c?p:h);else{d=!0,a=Math.min(400,(l?t.right:i.right-t.left)-30);let e=i.bottom-t.bottom;e>=g||e>t.top?s=n.bottom-t.top:(u="bottom",s=t.bottom-n.top)}return{style:`${u}: ${s/((t.bottom-t.top)/o.offsetHeight)}px; max-width: ${a/((t.right-t.left)/o.offsetWidth)}px`,class:"cm-completionInfo-"+(d?l?"left-narrow":"right-narrow":c?"left":"right")}}const TM=KA.define();function MM(e,t,n){if(e<=n)return{from:0,to:e};if(t<0&&(t=0),t<=e>>1){let e=Math.floor(t/n);return{from:e*n,to:(e+1)*n}}let r=Math.ceil((e-t)/n);return{from:e-r*n,to:e-(r-1)*n}}class DM{constructor(e,t,n){this.view=e,this.stateField=t,this.applyCompletion=n,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:e=>this.placeInfo(e),key:this},this.space=null,this.currentClass="";let r=e.state.field(t),{options:i,selected:o}=r.open,s=e.state.facet(_M);this.optionContent=function(e){let t=e.addToOptions.slice();return e.icons&&t.push({render(e){let t=document.createElement("div");return t.classList.add("cm-completionIcon"),e.type&&t.classList.add(...e.type.split(/\s+/g).map(e=>"cm-completionIcon-"+e)),t.setAttribute("aria-hidden","true"),t},position:20}),t.push({render(e,t,n,r){let i=document.createElement("span");i.className="cm-completionLabel";let o=e.displayLabel||e.label,s=0;for(let e=0;e<r.length;){let t=r[e++],n=r[e++];t>s&&i.appendChild(document.createTextNode(o.slice(s,t)));let a=i.appendChild(document.createElement("span"));a.appendChild(document.createTextNode(o.slice(t,n))),a.className="cm-completionMatchedText",s=n}return s<o.length&&i.appendChild(document.createTextNode(o.slice(s))),i},position:50},{render(e){if(!e.detail)return null;let t=document.createElement("span");return t.className="cm-completionDetail",t.textContent=e.detail,t},position:80}),t.sort((e,t)=>e.position-t.position).map(e=>e.render)}(s),this.optionClass=s.optionClass,this.tooltipClass=s.tooltipClass,this.range=MM(i.length,o,s.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",n=>{let{options:r}=e.state.field(t).open;for(let t,i=n.target;i&&i!=this.dom;i=i.parentNode)if("LI"==i.nodeName&&(t=/-(\d+)$/.exec(i.id))&&+t[1]<r.length)return this.applyCompletion(e,r[+t[1]]),void n.preventDefault();if(n.target==this.list){let t=this.list.classList.contains("cm-completionListIncompleteTop")&&n.clientY<this.list.firstChild.getBoundingClientRect().top?this.range.from-1:this.list.classList.contains("cm-completionListIncompleteBottom")&&n.clientY>this.list.lastChild.getBoundingClientRect().bottom?this.range.to:null;null!=t&&(e.dispatch({effects:TM.of(t)}),n.preventDefault())}}),this.dom.addEventListener("focusout",t=>{let n=e.state.field(this.stateField,!1);n&&n.tooltip&&e.state.facet(_M).closeOnBlur&&t.relatedTarget!=e.contentDOM&&e.dispatch({effects:kM.of(null)})}),this.showOptions(i,r.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var t;let n=e.state.field(this.stateField),r=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),n!=r){let{options:i,selected:o,disabled:s}=n.open;r.open&&r.open.options==i||(this.range=MM(i.length,o,e.state.facet(_M).maxRenderedOptions),this.showOptions(i,n.id)),this.updateSel(),s!=(null===(t=r.open)||void 0===t?void 0:t.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!s)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let e of this.currentClass.split(" "))e&&this.dom.classList.remove(e);for(let e of t.split(" "))e&&this.dom.classList.add(e);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;(t.selected>-1&&t.selected<this.range.from||t.selected>=this.range.to)&&(this.range=MM(t.options.length,t.selected,this.view.state.facet(_M).maxRenderedOptions),this.showOptions(t.options,e.id));let n=this.updateSelectedOption(t.selected);if(n){this.destroyInfo();let{completion:r}=t.options[t.selected],{info:i}=r;if(!i)return;let o="string"==typeof i?document.createTextNode(i):i(r);if(!o)return;"then"in o?o.then(t=>{t&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(t,r)}).catch(e=>_C(this.view.state,e,"completion info")):(this.addInfoPane(o,r),n.setAttribute("aria-describedby",this.info.id))}}addInfoPane(e,t){this.destroyInfo();let n=this.info=document.createElement("div");if(n.className="cm-tooltip cm-completionInfo",n.id="cm-completionInfo-"+Math.floor(65535*Math.random()).toString(16),null!=e.nodeType)n.appendChild(e),this.infoDestroy=null;else{let{dom:t,destroy:r}=e;n.appendChild(t),this.infoDestroy=r||null}this.dom.appendChild(n),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let n=this.list.firstChild,r=this.range.from;n;n=n.nextSibling,r++)"LI"==n.nodeName&&n.id?r==e?n.hasAttribute("aria-selected")||(n.setAttribute("aria-selected","true"),t=n):n.hasAttribute("aria-selected")&&(n.removeAttribute("aria-selected"),n.removeAttribute("aria-describedby")):r--;return t&&function(e,t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=n.height/e.offsetHeight;r.top<n.top?e.scrollTop-=(n.top-r.top)/i:r.bottom>n.bottom&&(e.scrollTop+=(r.bottom-n.bottom)/i)}(this.list,t),t}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),n=this.info.getBoundingClientRect(),r=e.getBoundingClientRect(),i=this.space;if(!i){let e=this.dom.ownerDocument.documentElement;i={left:0,top:0,right:e.clientWidth,bottom:e.clientHeight}}return r.top>Math.min(i.bottom,t.bottom)-10||r.bottom<Math.max(i.top,t.top)+10?null:this.view.state.facet(_M).positionInfo(this.view,t,r,n,i,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className="cm-tooltip cm-completionInfo "+(e.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(e,t,n){const r=document.createElement("ul");r.id=t,r.setAttribute("role","listbox"),r.setAttribute("aria-expanded","true"),r.setAttribute("aria-label",this.view.state.phrase("Completions")),r.addEventListener("mousedown",e=>{e.target==r&&e.preventDefault()});let i=null;for(let o=n.from;o<n.to;o++){let{completion:s,match:a}=e[o],{section:l}=s;if(l){let e="string"==typeof l?l:l.name;if(e!=i&&(o>n.from||0==n.from))if(i=e,"string"!=typeof l&&l.header)r.appendChild(l.header(l));else{r.appendChild(document.createElement("completion-section")).textContent=e}}const c=r.appendChild(document.createElement("li"));c.id=t+"-"+o,c.setAttribute("role","option");let d=this.optionClass(s);d&&(c.className=d);for(let e of this.optionContent){let t=e(s,this.view.state,this.view,a);t&&c.appendChild(t)}}return n.from&&r.classList.add("cm-completionListIncompleteTop"),n.to<e.length&&r.classList.add("cm-completionListIncompleteBottom"),r}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function PM(e,t){return n=>new DM(n,e,t)}function RM(e){return 100*(e.boost||0)+(e.apply?10:0)+(e.info?5:0)+(e.type?1:0)}class IM{constructor(e,t,n,r,i,o){this.options=e,this.attrs=t,this.tooltip=n,this.timestamp=r,this.selected=i,this.disabled=o}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new IM(this.options,FM(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,n,r,i,o){if(r&&!o&&e.some(e=>e.isPending))return r.setDisabled();let s=function(e,t){let n=[],r=null,i=null,o=e=>{n.push(e);let{section:t}=e.completion;if(t){r||(r=[]);let e="string"==typeof t?t:t.name;r.some(t=>t.name==e)||r.push("string"==typeof t?{name:e}:t)}},s=t.facet(_M);for(let r of e)if(r.hasResult()){let e=r.result.getMatch;if(!1===r.result.filter)for(let t of r.result.options)o(new mM(t,r.source,e?e(t):[],1e9-n.length));else{let n,a=t.sliceDoc(r.from,r.to),l=s.filterStrict?new OM(a):new SM(a);for(let t of r.result.options)if(n=l.match(t.label)){let s=t.displayLabel?e?e(t,n.matched):[]:n.matched,a=n.score+(t.boost||0);if(o(new mM(t,r.source,s,a)),"object"==typeof t.section&&"dynamic"===t.section.rank){let{name:e}=t.section;i||(i=Object.create(null)),i[e]=Math.max(a,i[e]||-1e9)}}}}if(r){let e=Object.create(null),t=0,o=(e,t)=>("dynamic"===e.rank&&"dynamic"===t.rank?i[t.name]-i[e.name]:0)||("number"==typeof e.rank?e.rank:1e9)-("number"==typeof t.rank?t.rank:1e9)||(e.name<t.name?-1:1);for(let n of r.sort(o))t-=1e5,e[n.name]=t;for(let t of n){let{section:n}=t.completion;n&&(t.score+=e["string"==typeof n?n:n.name])}}let a=[],l=null,c=s.compareCompletions;for(let e of n.sort((e,t)=>t.score-e.score||c(e.completion,t.completion))){let t=e.completion;!l||l.label!=t.label||l.detail!=t.detail||null!=l.type&&null!=t.type&&l.type!=t.type||l.apply!=t.apply||l.boost!=t.boost?a.push(e):RM(e.completion)>RM(l)&&(a[a.length-1]=e),l=e.completion}return a}(e,t);if(!s.length)return r&&e.some(e=>e.isPending)?r.setDisabled():null;let a=t.facet(_M).selectOnOpen?0:-1;if(r&&r.selected!=a&&-1!=r.selected){let e=r.options[r.selected].completion;for(let t=0;t<s.length;t++)if(s[t].completion==e){a=t;break}}return new IM(s,FM(n,a),{pos:e.reduce((e,t)=>t.hasResult()?Math.min(e,t.from):e,1e8),create:UM,above:i.aboveCursor},r?r.timestamp:Date.now(),a,!1)}map(e){return new IM(this.options,this.attrs,{...this.tooltip,pos:e.mapPos(this.tooltip.pos)},this.timestamp,this.selected,this.disabled)}setDisabled(){return new IM(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class NM{constructor(e,t,n){this.active=e,this.id=t,this.open=n}static start(){return new NM(jM,"cm-ac-"+Math.floor(2e6*Math.random()).toString(36),null)}update(e){let{state:t}=e,n=t.facet(_M),r=(n.override||t.languageDataAt("autocomplete",vM(t)).map(xM)).map(t=>(this.active.find(e=>e.source==t)||new WM(t,this.active.some(e=>0!=e.state)?1:0)).update(e,n));r.length==this.active.length&&r.every((e,t)=>e==this.active[t])&&(r=this.active);let i=this.open,o=e.effects.some(e=>e.is(QM));i&&e.docChanged&&(i=i.map(e.changes)),e.selection||r.some(t=>t.hasResult()&&e.changes.touchesRange(t.from,t.to))||!function(e,t){if(e==t)return!0;for(let n=0,r=0;;){for(;n<e.length&&!e[n].hasResult();)n++;for(;r<t.length&&!t[r].hasResult();)r++;let i=n==e.length,o=r==t.length;if(i||o)return i==o;if(e[n++].result!=t[r++].result)return!1}}(r,this.active)||o?i=IM.build(r,t,this.id,i,n,o):i&&i.disabled&&!r.some(e=>e.isPending)&&(i=null),!i&&r.every(e=>!e.isPending)&&r.some(e=>e.hasResult())&&(r=r.map(e=>e.hasResult()?new WM(e.source,0):e));for(let t of e.effects)t.is(TM)&&(i=i&&i.setSelected(t.value,this.id));return r==this.active&&i==this.open?this:new NM(r,this.id,i)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?LM:$M}}const LM={"aria-autocomplete":"list"},$M={};function FM(e,t){let n={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":e};return t>-1&&(n["aria-activedescendant"]=e+"-"+t),n}const jM=[];function VM(e,t){if(e.isUserEvent("input.complete")){let n=e.annotation(bM);if(n&&t.activateOnCompletion(n))return 12}let n=e.isUserEvent("input.type");return n&&t.activateOnTyping?5:n?1:e.isUserEvent("delete.backward")?2:e.selection?8:e.docChanged?16:0}class WM{constructor(e,t,n=!1){this.source=e,this.state=t,this.explicit=n}hasResult(){return!1}get isPending(){return 1==this.state}update(e,t){let n=VM(e,t),r=this;(8&n||16&n&&this.touches(e))&&(r=new WM(r.source,0)),4&n&&0==r.state&&(r=new WM(this.source,1)),r=r.updateFor(e,n);for(let t of e.effects)if(t.is(wM))r=new WM(r.source,1,t.value);else if(t.is(kM))r=new WM(r.source,0);else if(t.is(QM))for(let e of t.value)e.source==r.source&&(r=e);return r}updateFor(e,t){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(vM(e.state))}}class zM extends WM{constructor(e,t,n,r,i,o){super(e,3,t),this.limit=n,this.result=r,this.from=i,this.to=o}hasResult(){return!0}updateFor(e,t){var n;if(!(3&t))return this.map(e.changes);let r=this.result;r.map&&!e.changes.empty&&(r=r.map(r,e.changes));let i=e.changes.mapPos(this.from),o=e.changes.mapPos(this.to,1),s=vM(e.state);if(s>o||!r||2&t&&(vM(e.startState)==this.from||s<this.limit))return new WM(this.source,4&t?1:0);let a=e.changes.mapPos(this.limit);return function(e,t,n,r){if(!e)return!1;let i=t.sliceDoc(n,r);return"function"==typeof e?e(i,n,r,t):AM(e,!0).test(i)}(r.validFor,e.state,i,o)?new zM(this.source,this.explicit,a,r,i,o):r.update&&(r=r.update(r,i,o,new hM(e.state,s,!1)))?new zM(this.source,this.explicit,a,r,r.from,null!==(n=r.to)&&void 0!==n?n:vM(e.state)):new WM(this.source,1,this.explicit)}map(e){if(e.empty)return this;let t=this.result.map?this.result.map(this.result,e):this.result;return t?new zM(this.source,this.explicit,e.mapPos(this.limit),t,e.mapPos(this.from),e.mapPos(this.to,1)):new WM(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}}const QM=KA.define({map:(e,t)=>e.map(e=>e.map(t))}),HM=EA.define({create:()=>NM.start(),update:(e,t)=>e.update(t),provide:e=>[pS.from(e,e=>e.tooltip),rk.contentAttributes.from(e,e=>e.attrs)]});function qM(e,t){const n=t.completion.apply||t.completion.label;let r=e.state.field(HM).active.find(e=>e.source==t.source);return r instanceof zM&&("string"==typeof n?e.dispatch({...yM(e.state,n,r.from,r.to),annotations:bM.of(t.completion)}):n(e,t.completion,r.from,r.to),!0)}const UM=PM(HM,qM);function YM(e,t="option"){return n=>{let r=n.state.field(HM,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp<n.state.facet(_M).interactionDelay)return!1;let i,o=1;"page"==t&&(i=bS(n,r.open.tooltip))&&(o=Math.max(2,Math.floor(i.dom.offsetHeight/i.dom.querySelector("li").offsetHeight)-1));let{length:s}=r.open.options,a=r.open.selected>-1?r.open.selected+o*(e?1:-1):e?0:s-1;return a<0?a="page"==t?0:s-1:a>=s&&(a="page"==t?s-1:0),n.dispatch({effects:TM.of(a)}),!0}}const XM=e=>!!e.state.field(HM,!1)&&(e.dispatch({effects:wM.of(!0)}),!0);class JM{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}const GM=MC.fromClass(class{constructor(e){this.view=e,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let t of e.state.field(HM).active)t.isPending&&this.startQuery(t)}update(e){let t=e.state.field(HM),n=e.state.facet(_M);if(!e.selectionSet&&!e.docChanged&&e.startState.field(HM)==t)return;let r=e.transactions.some(e=>{let t=VM(e,n);return 8&t||(e.selection||e.docChanged)&&!(3&t)});for(let t=0;t<this.running.length;t++){let n=this.running[t];if(r||n.context.abortOnDocChange&&e.docChanged||n.updates.length+e.transactions.length>50&&Date.now()-n.time>1e3){for(let e of n.context.abortListeners)try{e()}catch(e){_C(this.view.state,e)}n.context.abortListeners=null,this.running.splice(t--,1)}else n.updates.push(...e.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),e.transactions.some(e=>e.effects.some(e=>e.is(wM)))&&(this.pendingStart=!0);let i=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=t.active.some(e=>e.isPending&&!this.running.some(t=>t.active.source==e.source))?setTimeout(()=>this.startUpdate(),i):-1,0!=this.composing)for(let t of e.transactions)t.isUserEvent("input.type")?this.composing=2:2==this.composing&&t.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:e}=this.view,t=e.field(HM);for(let e of t.active)e.isPending&&!this.running.some(t=>t.active.source==e.source)&&this.startQuery(e);this.running.length&&t.open&&t.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(_M).updateSyncTime))}startQuery(e){let{state:t}=this.view,n=vM(t),r=new hM(t,n,e.explicit,this.view),i=new JM(e,r);this.running.push(i),Promise.resolve(e.source(r)).then(e=>{i.context.aborted||(i.done=e||null,this.scheduleAccept())},e=>{this.view.dispatch({effects:kM.of(null)}),_C(this.view.state,e)})}scheduleAccept(){this.running.every(e=>void 0!==e.done)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(_M).updateSyncTime))}accept(){var e;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let t=[],n=this.view.state.facet(_M),r=this.view.state.field(HM);for(let i=0;i<this.running.length;i++){let o=this.running[i];if(void 0===o.done)continue;if(this.running.splice(i--,1),o.done){let r=vM(o.updates.length?o.updates[0].startState:this.view.state),i=Math.min(r,o.done.from+(o.active.explicit?0:1)),s=new zM(o.active.source,o.active.explicit,i,o.done,o.done.from,null!==(e=o.done.to)&&void 0!==e?e:r);for(let e of o.updates)s=s.update(e,n);if(s.hasResult()){t.push(s);continue}}let s=r.active.find(e=>e.source==o.active.source);if(s&&s.isPending)if(null==o.done){let e=new WM(o.active.source,0);for(let t of o.updates)e=e.update(t,n);e.isPending||t.push(e)}else this.startQuery(s)}(t.length||r.open&&r.open.disabled)&&this.view.dispatch({effects:QM.of(t)})}},{eventHandlers:{blur(e){let t=this.view.state.field(HM,!1);if(t&&t.tooltip&&this.view.state.facet(_M).closeOnBlur){let n=t.open&&bS(this.view,t.open.tooltip);n&&n.dom.contains(e.relatedTarget)||setTimeout(()=>this.view.dispatch({effects:kM.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){3==this.composing&&setTimeout(()=>this.view.dispatch({effects:wM.of(!1)}),20),this.composing=0}}}),KM="object"==typeof navigator&&/Win/.test(navigator.platform),ZM=IA.highest(rk.domEventHandlers({keydown(e,t){let n=t.state.field(HM,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||!e.key||e.key.length>1||e.ctrlKey&&(!KM||!e.altKey)||e.metaKey)return!1;let r=n.open.options[n.open.selected],i=n.active.find(e=>e.source==r.source),o=r.completion.commitCharacters||i.result.commitCharacters;return o&&o.indexOf(e.key)>-1&&qM(t,r),!1}})),eD=rk.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center",cursor:"pointer"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});const tD={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},nD=KA.define({map(e,t){let n=t.mapPos(e,-1,cA.TrackAfter);return n??void 0}}),rD=new class extends pb{};rD.startSide=1,rD.endSide=-1;const iD=EA.define({create:()=>vb.empty,update(e,t){if(e=e.map(t.changes),t.selection){let n=t.state.doc.lineAt(t.selection.main.head);e=e.update({filter:e=>e>=n.from&&e<=n.to})}for(let n of t.effects)n.is(nD)&&(e=e.update({add:[rD.range(n.value,n.value+1)]}));return e}});const oD="()[]{}<>«»»«[]{}";function sD(e){for(let t=0;t<16;t+=2)if(oD.charCodeAt(t)==e)return oD.charAt(t+1);return sA(e<128?e:e+1)}function aD(e,t){return e.languageDataAt("closeBrackets",t)[0]||tD}const lD="object"==typeof navigator&&/Android\b/.test(navigator.userAgent),cD=rk.inputHandler.of((e,t,n,r)=>{if((lD?e.composing:e.compositionStarted)||e.state.readOnly)return!1;let i=e.state.selection.main;if(r.length>2||2==r.length&&1==aA(oA(r,0))||t!=i.from||n!=i.to)return!1;let o=function(e,t){let n=aD(e,e.selection.main.head),r=n.brackets||tD.brackets;for(let i of r){let o=sD(oA(i,0));if(t==i)return o==i?gD(e,i,r.indexOf(i+i+i)>-1,n):hD(e,i,o,n.before||tD.before);if(t==o&&uD(e,e.selection.main.from))return fD(e,i,o)}return null}(e.state,r);return!!o&&(e.dispatch(o),!0)}),dD=[{key:"Backspace",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=aD(e,e.selection.main.head).brackets||tD.brackets,r=null,i=e.changeByRange(t=>{if(t.empty){let r=function(e,t){let n=e.sliceString(t-2,t);return aA(oA(n,0))==n.length?n:n.slice(1)}(e.doc,t.head);for(let i of n)if(i==r&&pD(e.doc,t.head)==sD(oA(i,0)))return{changes:{from:t.head-i.length,to:t.head+i.length},range:bA.cursor(t.head-i.length)}}return{range:r=t}});return r||t(e.update(i,{scrollIntoView:!0,userEvent:"delete.backward"})),!r}}];function uD(e,t){let n=!1;return e.field(iD).between(0,e.doc.length,e=>{e==t&&(n=!0)}),n}function pD(e,t){let n=e.sliceString(t,t+2);return n.slice(0,aA(oA(n,0)))}function hD(e,t,n,r){let i=null,o=e.changeByRange(o=>{if(!o.empty)return{changes:[{insert:t,from:o.from},{insert:n,from:o.to}],effects:nD.of(o.to+t.length),range:bA.range(o.anchor+t.length,o.head+t.length)};let s=pD(e.doc,o.head);return!s||/\s/.test(s)||r.indexOf(s)>-1?{changes:{insert:t+n,from:o.head},effects:nD.of(o.head+t.length),range:bA.cursor(o.head+t.length)}:{range:i=o}});return i?null:e.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function fD(e,t,n){let r=null,i=e.changeByRange(t=>t.empty&&pD(e.doc,t.head)==n?{changes:{from:t.head,to:t.head+n.length,insert:n},range:bA.cursor(t.head+n.length)}:r={range:t});return r?null:e.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function gD(e,t,n,r){let i=r.stringPrefixes||tD.stringPrefixes,o=null,s=e.changeByRange(r=>{if(!r.empty)return{changes:[{insert:t,from:r.from},{insert:t,from:r.to}],effects:nD.of(r.to+t.length),range:bA.range(r.anchor+t.length,r.head+t.length)};let s,a=r.head,l=pD(e.doc,a);if(l==t){if(mD(e,a))return{changes:{insert:t+t,from:a},effects:nD.of(a+t.length),range:bA.cursor(a+t.length)};if(uD(e,a)){let r=n&&e.sliceDoc(a,a+3*t.length)==t+t+t?t+t+t:t;return{changes:{from:a,to:a+r.length,insert:r},range:bA.cursor(a+r.length)}}}else{if(n&&e.sliceDoc(a-2*t.length,a)==t+t&&(s=vD(e,a-2*t.length,i))>-1&&mD(e,s))return{changes:{insert:t+t+t+t,from:a},effects:nD.of(a+t.length),range:bA.cursor(a+t.length)};if(e.charCategorizer(a)(l)!=sb.Word&&vD(e,a,i)>-1&&!function(e,t,n,r){let i=h_(e).resolveInner(t,-1),o=r.reduce((e,t)=>Math.max(e,t.length),0);for(let s=0;s<5;s++){let s=e.sliceDoc(i.from,Math.min(i.to,i.from+n.length+o)),a=s.indexOf(n);if(!a||a>-1&&r.indexOf(s.slice(0,a))>-1){let t=i.firstChild;for(;t&&t.from==i.from&&t.to-t.from>n.length+a;){if(e.sliceDoc(t.to-n.length,t.to)==n)return!1;t=t.firstChild}return!0}let l=i.to==t&&i.parent;if(!l)break;i=l}return!1}(e,a,t,i))return{changes:{insert:t+t,from:a},effects:nD.of(a+t.length),range:bA.cursor(a+t.length)}}return{range:o=r}});return o?null:e.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function mD(e,t){let n=h_(e).resolveInner(t+1);return n.parent&&n.from==t}function vD(e,t,n){let r=e.charCategorizer(t);if(r(e.sliceDoc(t-1,t))!=sb.Word)return t;for(let i of n){let n=t-i.length;if(e.sliceDoc(n,t)==i&&r(e.sliceDoc(n-1,n))!=sb.Word)return n}return-1}function AD(e={}){return[ZM,HM,_M.of(e),GM,yD,eD]}const bD=[{key:"Ctrl-Space",run:XM},{mac:"Alt-`",run:XM},{mac:"Alt-i",run:XM},{key:"Escape",run:e=>{let t=e.state.field(HM,!1);return!(!t||!t.active.some(e=>0!=e.state))&&(e.dispatch({effects:kM.of(null)}),!0)}},{key:"ArrowDown",run:YM(!0)},{key:"ArrowUp",run:YM(!1)},{key:"PageDown",run:YM(!0,"page")},{key:"PageUp",run:YM(!1,"page")},{key:"Enter",run:e=>{let t=e.state.field(HM,!1);return!(e.state.readOnly||!t||!t.open||t.open.selected<0||t.open.disabled||Date.now()-t.open.timestamp<e.state.facet(_M).interactionDelay)&&qM(e,t.open.options[t.open.selected])}}],yD=IA.highest(uk.computeN([_M],e=>e.facet(_M).defaultKeymap?[bD]:[]));class CD{constructor(e,t,n){this.from=e,this.to=t,this.diagnostic=n}}class xD{constructor(e,t,n){this.diagnostics=e,this.panel=t,this.selected=n}static init(e,t,n){let r=n.facet(ID).markerFilter;r&&(e=r(e,n));let i=e.slice().sort((e,t)=>e.from-t.from||e.to-t.to),o=new bb,s=[],a=0,l=n.doc.iter(),c=0,d=n.doc.length;for(let e=0;;){let t,n,r=e==i.length?null:i[e];if(!r&&!s.length)break;if(s.length)t=a,n=s.reduce((e,t)=>Math.min(e,t.to),r&&r.from>t?r.from:1e8);else{if(t=r.from,t>d)break;n=r.to,s.push(r),e++}for(;e<i.length;){let r=i[e];if(r.from!=t||!(r.to>r.from||r.to==t)){n=Math.min(r.from,n);break}s.push(r),e++,n=Math.min(r.to,n)}n=Math.min(n,d);let u=!1;if(s.some(e=>e.from==t&&(e.to==n||n==d))&&(u=t==n,!u&&n-t<10)){let e=t-(c+l.value.length);e>0&&(l.next(e),c=t);for(let e=t;;){if(e>=n){u=!0;break}if(!l.lineBreak&&c+l.value.length>e)break;e=c+l.value.length,c+=l.value.length,l.next()}}let p=qD(s);if(u)o.add(t,t,py.widget({widget:new FD(p),diagnostics:s.slice()}));else{let e=s.reduce((e,t)=>t.markClass?e+" "+t.markClass:e,"");o.add(t,n,py.mark({class:"cm-lintRange cm-lintRange-"+p+e,diagnostics:s.slice(),inclusiveEnd:s.some(e=>e.to>n)}))}if(a=n,a==d)break;for(let e=0;e<s.length;e++)s[e].to<=a&&s.splice(e--,1)}let u=o.finish();return new xD(u,t,wD(u))}}function wD(e,t=null,n=0){let r=null;return e.between(n,1e9,(e,n,{spec:i})=>{if(!(t&&i.diagnostics.indexOf(t)<0))if(r){if(i.diagnostics.indexOf(r.diagnostic)<0)return!1;r=new CD(r.from,n,r.diagnostic)}else r=new CD(e,n,t||i.diagnostics[0])}),r}function kD(e,t){let n=t.pos,r=t.end||n,i=e.state.facet(ID).hideOn(e,n,r);if(null!=i)return i;let o=e.startState.doc.lineAt(t.pos);return!(!e.effects.some(e=>e.is(OD))&&!e.changes.touchesRange(o.from,Math.max(o.to,r)))}function SD(e,t){return e.field(ED,!1)?t:t.concat(KA.appendConfig.of(YD))}const OD=KA.define(),_D=KA.define(),BD=KA.define(),ED=EA.define({create:()=>new xD(py.none,null,null),update(e,t){if(t.docChanged&&e.diagnostics.size){let n=e.diagnostics.map(t.changes),r=null,i=e.panel;if(e.selected){let i=t.changes.mapPos(e.selected.from,1);r=wD(n,e.selected.diagnostic,i)||wD(n,null,i)}!n.size&&i&&t.state.facet(ID).autoPanel&&(i=null),e=new xD(n,i,r)}for(let n of t.effects)if(n.is(OD)){let r=t.state.facet(ID).autoPanel?n.value.length?VD.open:null:e.panel;e=xD.init(n.value,r,t.state)}else n.is(_D)?e=new xD(e.diagnostics,n.value?VD.open:null,e.selected):n.is(BD)&&(e=new xD(e.diagnostics,e.panel,n.value));return e},provide:e=>[OS.from(e,e=>e.panel),rk.decorations.from(e,e=>e.diagnostics)]});const TD=py.mark({class:"cm-lintRange cm-lintRange-active"});function MD(e,t,n){let r,{diagnostics:i}=e.state.field(ED),o=-1,s=-1;i.between(t-(n<0?1:0),t+(n>0?1:0),(e,i,{spec:a})=>{if(t>=e&&t<=i&&(e==i||(t>e||n>0)&&(t<i||n<0)))return r=a.diagnostics,o=e,s=i,!1});let a=e.state.facet(ID).tooltipFilter;return r&&a&&(r=a(r,e.state)),r?{pos:o,end:s,above:!0,create:()=>({dom:DD(e,r)})}:null}function DD(e,t){return Hb("ul",{class:"cm-tooltip-lint"},t.map(t=>$D(e,t,!1)))}const PD=e=>{let t=e.state.field(ED,!1);return!(!t||!t.panel)&&(e.dispatch({effects:_D.of(!1)}),!0)},RD=[{key:"Mod-Shift-m",run:e=>{let t=e.state.field(ED,!1);t&&t.panel||e.dispatch({effects:SD(e.state,[_D.of(!0)])});let n=xS(e,VD.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},preventDefault:!0},{key:"F8",run:e=>{let t=e.state.field(ED,!1);if(!t)return!1;let n=e.state.selection.main,r=wD(t.diagnostics,null,n.to+1);return!(!r&&(r=wD(t.diagnostics,null,0),!r||r.from==n.from&&r.to==n.to))&&(e.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),function(e,t,n,r={}){var i;let o=e.state.facet(mS).map(t=>e.plugin(t)).filter(e=>!!e);if(r.tooltip&&r.tooltip.active){let e=o.find(e=>e.field==r.tooltip.active);e&&(o=[e])}for(let s of o)s.activateHover(e,t,n,null!==(i=r.until)&&void 0!==i?i:()=>!1)}(e,r.from,1,{tooltip:UD,until:e=>e.docChanged||e.newSelection.main.head<r.from||e.newSelection.main.head>r.to}),!0)}}];const ID=xA.define({combine:e=>({sources:e.map(e=>e.source).filter(e=>null!=e),...ub(e.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{delay:Math.max,markerFilter:ND,tooltipFilter:ND,needsRefresh:(e,t)=>e?t?n=>e(n)||t(n):e:t,hideOn:(e,t)=>e?t?(n,r,i)=>e(n,r,i)||t(n,r,i):e:t,autoPanel:(e,t)=>e||t})})});function ND(e,t){return e?t?(n,r)=>t(e(n,r),r):e:t}function LD(e){let t=[];if(e)e:for(let{name:n}of e){for(let e=0;e<n.length;e++){let r=n[e];if(/[a-zA-Z]/.test(r)&&!t.some(e=>e.toLowerCase()==r.toLowerCase())){t.push(r);continue e}}t.push("")}return t}function $D(e,t,n){var r;let i=n?LD(t.actions):[];return Hb("li",{class:"cm-diagnostic cm-diagnostic-"+t.severity},Hb("span",{class:"cm-diagnosticText"},t.renderMessage?t.renderMessage(e):t.message),null===(r=t.actions)||void 0===r?void 0:r.map((n,r)=>{let o=0,s=r=>{if(r.preventDefault(),o>Date.now()-100)return;let i=wD(e.state.field(ED).diagnostics,t);i&&n.apply(e,i.from,i.to),o=Date.now()},{name:a}=n,l=i[r]?a.indexOf(i[r]):-1,c=l<0?a:[a.slice(0,l),Hb("u",a.slice(l,l+1)),a.slice(l+1)];return Hb("button",{type:"button",class:"cm-diagnosticAction"+(n.markClass?" "+n.markClass:""),onclick:s,onmousedown:s,"aria-label":` Action: ${a}${l<0?"":` (access key "${i[r]})"`}.`},c)}),t.source&&Hb("div",{class:"cm-diagnosticSource"},t.source))}class FD extends dy{constructor(e){super(),this.sev=e}eq(e){return e.sev==this.sev}toDOM(){return Hb("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}}class jD{constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(4294967295*Math.random()).toString(16),this.dom=$D(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class VD{constructor(e){this.view=e,this.items=[];this.list=Hb("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:t=>{if(!(t.ctrlKey||t.altKey||t.metaKey)){if(27==t.keyCode)PD(this.view),this.view.focus();else if(38==t.keyCode||33==t.keyCode)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(40==t.keyCode||34==t.keyCode)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(36==t.keyCode)this.moveSelection(0);else if(35==t.keyCode)this.moveSelection(this.items.length-1);else if(13==t.keyCode)this.view.focus();else{if(!(t.keyCode>=65&&t.keyCode<=90&&this.selectedIndex>=0))return;{let{diagnostic:n}=this.items[this.selectedIndex],r=LD(n.actions);for(let i=0;i<r.length;i++)if(r[i].toUpperCase().charCodeAt(0)==t.keyCode){let t=wD(this.view.state.field(ED).diagnostics,n);t&&n.actions[i].apply(e,t.from,t.to)}}}t.preventDefault()}},onclick:e=>{for(let t=0;t<this.items.length;t++)this.items[t].dom.contains(e.target)&&this.moveSelection(t)}}),this.dom=Hb("div",{class:"cm-panel-lint"},this.list,Hb("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>PD(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(ED).selected;if(!e)return-1;for(let t=0;t<this.items.length;t++)if(this.items[t].diagnostic==e.diagnostic)return t;return-1}update(){let{diagnostics:e,selected:t}=this.view.state.field(ED),n=0,r=!1,i=null,o=new Set;for(e.between(0,this.view.state.doc.length,(e,s,{spec:a})=>{for(let e of a.diagnostics){if(o.has(e))continue;o.add(e);let s,a=-1;for(let t=n;t<this.items.length;t++)if(this.items[t].diagnostic==e){a=t;break}a<0?(s=new jD(this.view,e),this.items.splice(n,0,s),r=!0):(s=this.items[a],a>n&&(this.items.splice(n,a-n),r=!0)),t&&s.diagnostic==t.diagnostic?s.dom.hasAttribute("aria-selected")||(s.dom.setAttribute("aria-selected","true"),i=s):s.dom.hasAttribute("aria-selected")&&s.dom.removeAttribute("aria-selected"),n++}});n<this.items.length&&!(1==this.items.length&&this.items[0].diagnostic.from<0);)r=!0,this.items.pop();0==this.items.length&&(this.items.push(new jD(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),r=!0),i?(this.list.setAttribute("aria-activedescendant",i.id),this.view.requestMeasure({key:this,read:()=>({sel:i.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:e,panel:t})=>{let n=t.height/this.list.offsetHeight;e.top<t.top?this.list.scrollTop-=(t.top-e.top)/n:e.bottom>t.bottom&&(this.list.scrollTop+=(e.bottom-t.bottom)/n)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),r&&this.sync()}sync(){let e=this.list.firstChild;function t(){let t=e;e=t.nextSibling,t.remove()}for(let n of this.items)if(n.dom.parentNode==this.list){for(;e!=n.dom;)t();e=n.dom.nextSibling}else this.list.insertBefore(n.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=wD(this.view.state.field(ED).diagnostics,this.items[e].diagnostic);t&&this.view.dispatch({selection:{anchor:t.from,head:t.to},scrollIntoView:!0,effects:BD.of(t)})}static open(e){return new VD(e)}}function WD(e,t='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${t}>${encodeURIComponent(e)}</svg>')`}function zD(e){return WD(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${e}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}const QD=rk.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:zD("#f11")},".cm-lintRange-warning":{backgroundImage:zD("orange")},".cm-lintRange-info":{backgroundImage:zD("#999")},".cm-lintRange-hint":{backgroundImage:zD("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}},"&dark .cm-lintRange-active":{backgroundColor:"#86714a80"},"&dark .cm-panel.cm-panel-lint ul":{"& [aria-selected]":{backgroundColor:"#2e343e"}}});function HD(e){return"error"==e?4:"warning"==e?3:"info"==e?2:1}function qD(e){let t="hint",n=1;for(let r of e){let e=HD(r.severity);e>n&&(n=e,t=r.severity)}return t}const UD=AS(MD,{hideOn:kD}),YD=[ED,rk.decorations.compute([ED],e=>{let{selected:t,panel:n}=e.field(ED);return t&&n&&t.from!=t.to?py.set([TD.range(t.from,t.to)]):py.none}),UD,QD];const XD=(()=>[GS(),eO,Wk(),JB(),aB(),Sk(),[Pk,Rk],db.allowMultipleSelections.of(!0),db.transactionFilter.of(e=>{if(!e.docChanged||!e.isUserEvent("input.type")&&!e.isUserEvent("input.complete"))return e;let t=e.startState.languageDataAt("indentOnInput",e.startState.selection.main.head);if(!t.length)return e;let n=e.newDoc,{head:r}=e.newSelection.main,i=n.lineAt(r);if(r>i.from+200)return e;let o=n.sliceString(i.from,r);if(!t.some(e=>e.test(o)))return e;let{state:s}=e,a=-1,l=[];for(let{head:e}of s.selection.ranges){let t=s.doc.lineAt(e);if(t.from==a)continue;a=t.from;let n=B_(s,t.from);if(null==n)continue;let r=/^\s*/.exec(t.text)[0],i=__(s,n);r!=i&&l.push({from:t.from,to:t.from+r.length,insert:i})}return l.length?[e,{changes:l,sequential:!0}]:e}),hB(mB,{fallback:!0}),SB(),[cD,iD],AD(),Kk(),tS(),Uk,OT(),uk.of([...dD,...hT,...sM,...pE,...K_,...bD,...RD])])();var JD,GD,KD=Object.freeze({autofocus:!1,disabled:!1,indentWithTab:!0,tabSize:2,placeholder:"",autoDestroy:!0,extensions:[XD]}),ZD=Symbol("vue-codemirror-global-config"),eP=function(e){var t=new LA;return{compartment:t,run:function(n){t.get(e.state)?e.dispatch({effects:t.reconfigure(n)}):e.dispatch({effects:KA.appendConfig.of(t.of(n))})}}},tP=function(e,t){var n=eP(e),r=n.compartment,i=n.run;return function(n){var o=r.get(e.state);i((null!=n?n:o!==t)?t:[])}},nP={type:Boolean,default:void 0},rP={autofocus:nP,disabled:nP,indentWithTab:nP,tabSize:Number,placeholder:String,style:Object,autoDestroy:nP,phrases:Object,root:Object,extensions:Array,selection:Object},iP={modelValue:{type:String,default:""}},oP=Object.assign(Object.assign({},rP),iP);(GD=JD||(JD={})).Change="change",GD.Update="update",GD.Focus="focus",GD.Blur="blur",GD.Ready="ready",GD.ModelUpdate="update:modelValue";var sP={};sP[JD.Change]=function(e,t){return!0},sP[JD.Update]=function(e){return!0},sP[JD.Focus]=function(e){return!0},sP[JD.Blur]=function(e){return!0},sP[JD.Ready]=function(e){return!0};var aP={};aP[JD.ModelUpdate]=sP[JD.Change];var lP=Object.assign(Object.assign({},sP),aP),cP=Zr({name:"VueCodemirror",props:Object.assign({},oP),emits:Object.assign({},lP),setup:function(e,t){var n=rn(),r=rn(),i=rn(),o=Object.assign(Object.assign({},KD),gr(ZD,{})),s=Ja(function(){var t={};return Object.keys(Gt(e)).forEach(function(n){var r;"modelValue"!==n&&(t[n]=null!==(r=e[n])&&void 0!==r?r:o[n])}),t});return qi(function(){var a;r.value=function(e){var t=e.onUpdate,n=e.onChange,r=e.onFocus,i=e.onBlur,o=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(e,["onUpdate","onChange","onFocus","onBlur"]);return db.create({doc:o.doc,selection:o.selection,extensions:(Array.isArray(o.extensions)?o.extensions:[o.extensions]).concat([rk.updateListener.of(function(e){t(e),e.docChanged&&n(e.state.doc.toString(),e),e.focusChanged&&(e.view.hasFocus?r(e):i(e))})])})}({doc:e.modelValue,selection:s.value.selection,extensions:null!==(a=o.extensions)&&void 0!==a?a:[],onFocus:function(e){return t.emit(JD.Focus,e)},onBlur:function(e){return t.emit(JD.Blur,e)},onUpdate:function(e){return t.emit(JD.Update,e)},onChange:function(n,r){n!==e.modelValue&&(t.emit(JD.Change,n,r),t.emit(JD.ModelUpdate,n,r))}}),i.value=function(e){return new rk(Object.assign({},e))}({state:r.value,parent:n.value,root:s.value.root});var l=function(e){var t=function(){return e.state.doc.toString()},n=eP(e).run,r=tP(e,[rk.editable.of(!1),db.readOnly.of(!0)]),i=tP(e,uk.of([fT])),o=eP(e).run,s=eP(e).run,a=eP(e).run,l=eP(e).run;return{focus:function(){return e.focus()},getDoc:t,setDoc:function(n){n!==t()&&e.dispatch({changes:{from:0,to:e.state.doc.length,insert:n}})},reExtensions:n,toggleDisabled:r,toggleIndentWithTab:i,setTabSize:function(e){o([db.tabSize.of(e),S_.of(" ".repeat(e))])},setPhrases:function(e){s([db.phrases.of(e)])},setPlaceholder:function(e){a(function(e){let t=MC.fromClass(class{constructor(t){this.view=t,this.placeholder=e?py.set([py.widget({widget:new Yk(e),side:1}).range(0)]):py.none}get decorations(){return this.view.state.doc.length?py.none:this.placeholder}},{decorations:e=>e.decorations});return"string"==typeof e?[t,rk.contentAttributes.of({"aria-placeholder":e})]:t}(e))},setStyle:function(e){void 0===e&&(e={}),l(rk.theme({"&":Object.assign({},e)}))}}}(i.value);xr(function(){return e.modelValue},function(e){e!==l.getDoc()&&l.setDoc(e)}),xr(function(){return e.extensions},function(e){return l.reExtensions(e||[])},{immediate:!0}),xr(function(){return s.value.disabled},function(e){return l.toggleDisabled(e)},{immediate:!0}),xr(function(){return s.value.indentWithTab},function(e){return l.toggleIndentWithTab(e)},{immediate:!0}),xr(function(){return s.value.tabSize},function(e){return l.setTabSize(e)},{immediate:!0}),xr(function(){return s.value.phrases},function(e){return l.setPhrases(e||{})},{immediate:!0}),xr(function(){return s.value.placeholder},function(e){return l.setPlaceholder(e)},{immediate:!0}),xr(function(){return s.value.style},function(e){return l.setStyle(e)},{immediate:!0}),s.value.autofocus&&l.focus(),t.emit(JD.Ready,{state:r.value,view:i.value,container:n.value})}),Xi(function(){s.value.autoDestroy&&i.value&&function(e){e.destroy()}(i.value)}),function(){return Ga("div",{class:"v-codemirror",style:{display:"contents"},ref:n})}}}),dP=cP,uP=n(606);class pP{constructor(e,t,n,r,i,o,s,a,l,c=0,d){this.p=e,this.stack=t,this.state=n,this.reducePos=r,this.pos=i,this.score=o,this.buffer=s,this.bufferBase=a,this.curContext=l,this.lookAhead=c,this.parent=d}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,n=0){let r=e.parser.context;return new pP(e,[],t,n,n,0,[],0,r?new hP(r,r.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var t;let n=e>>19,r=65535&e,{parser:i}=this.p,o=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),s=i.dynamicPrecedence(r);if(s&&(this.score+=s),0==n)return r<i.minRepeatTerm&&this.reducePos<this.pos&&(this.reducePos=this.pos),this.pushState(i.getGoto(this.state,r,!0),this.reducePos),r<i.minRepeatTerm&&this.storeNode(r,this.reducePos,this.reducePos,o?8:4,!0),void this.reduceContext(r,this.reducePos);let a=this.stack.length-3*(n-1)-(262144&e?6:0),l=a?this.stack[a-2]:this.p.ranges[0].from;r<i.minRepeatTerm&&l==this.reducePos&&this.reducePos<this.pos&&(this.reducePos=this.pos);let c=this.reducePos-l;c>=2e3&&!(null===(t=this.p.parser.nodeSet.types[r])||void 0===t?void 0:t.isAnonymous)&&(l==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=c):this.p.lastBigReductionSize<c&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=l,this.p.lastBigReductionSize=c));let d=a?this.stack[a-1]:0,u=this.bufferBase+this.buffer.length-d;if(r<i.minRepeatTerm||131072&e){let e=i.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(r,l,e,u+4,!0)}if(262144&e)this.state=this.stack[a];else{let e=this.stack[a-3];this.state=i.getGoto(e,r,!0)}for(;this.stack.length>a;)this.stack.pop();this.reduceContext(r,l)}storeNode(e,t,n,r=4,i=!1){if(0==e&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let e=this.buffer.length;if(e>0&&0==this.buffer[e-4]&&this.buffer[e-1]>-1){if(t==n)return;if(this.buffer[e-2]>=t)return void(this.buffer[e-2]=n)}}if(i&&this.pos!=n){let i=this.buffer.length;if(i>0&&(0!=this.buffer[i-4]||this.buffer[i-1]<0)){let e=!1;for(let t=i;t>0&&this.buffer[t-2]>n;t-=4)if(this.buffer[t-1]>=0){e=!0;break}if(e)for(;i>0&&this.buffer[i-2]>n;)this.buffer[i]=this.buffer[i-4],this.buffer[i+1]=this.buffer[i-3],this.buffer[i+2]=this.buffer[i-2],this.buffer[i+3]=this.buffer[i-1],i-=4,r>4&&(r-=4)}this.buffer[i]=e,this.buffer[i+1]=t,this.buffer[i+2]=n,this.buffer[i+3]=r}else this.buffer.push(e,t,n,r)}shift(e,t,n,r){if(131072&e)this.pushState(65535&e,this.pos);else if(262144&e)this.pos=r,this.shiftContext(t,n),t<=this.p.parser.maxNode&&this.buffer.push(t,n,r,4);else{let i=e,{parser:o}=this.p;this.pos=r;let s=o.stateFlag(i,1);!s&&(r>n||t<=o.maxNode)&&(this.reducePos=r),this.pushState(i,s?n:Math.min(n,this.reducePos)),this.shiftContext(t,n),t<=o.maxNode&&this.buffer.push(t,n,r,4)}}apply(e,t,n,r){65536&e?this.reduce(e):this.shift(e,t,n,r)}useNode(e,t,n){let r=this.p.reused.length-1;(r<0||this.p.reused[r]!=e)&&(this.p.reused.push(e),r++);let i=this.reducePos=this.pos=n+e.length;this.pushState(t,n),this.buffer.push(r,n,i,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(t&&0==e.buffer[t-4]&&(t-=4);t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let n=e.buffer.slice(t),r=e.bufferBase+t;for(;e&&r==e.bufferBase;)e=e.parent;return new pP(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,n,r,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let n=e<=this.p.parser.maxNode;n&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,n?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new fP(this);;){let n=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(0==n)return!1;if(!(65536&n))return!0;t.reduce(n)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let n=[];for(let r,i=0;i<t.length;i+=2)(r=t[i+1])!=this.state&&this.p.parser.hasAction(r,e)&&n.push(t[i],r);if(this.stack.length<120)for(let e=0;n.length<8&&e<t.length;e+=2){let r=t[e+1];n.some((e,t)=>1&t&&e==r)||n.push(t[e],r)}t=n}let n=[];for(let e=0;e<t.length&&n.length<4;e+=2){let r=t[e+1];if(r==this.state)continue;let i=this.split();i.pushState(r,this.pos),i.storeNode(0,i.pos,i.pos,4,!0),i.shiftContext(t[e],this.pos),i.reducePos=this.pos,i.score-=200,n.push(i)}return n}forceReduce(){let{parser:e}=this.p,t=e.stateSlot(this.state,5);if(!(65536&t))return!1;if(!e.validAction(this.state,t)){let n=t>>19,r=65535&t,i=this.stack.length-3*n;if(i<0||e.getGoto(this.stack[i],r,!1)<0){let e=this.findForcedReduction();if(null==e)return!1;t=e}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],n=(r,i)=>{if(!t.includes(r))return t.push(r),e.allActions(r,t=>{if(393216&t);else if(65536&t){let n=(t>>19)-i;if(n>1){let r=65535&t,i=this.stack.length-3*n;if(i>=0&&e.getGoto(this.stack[i],r,!1)>=0)return n<<19|65536|r}}else{let e=n(t,i+1);if(null!=e)return e}})};return n(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(3!=this.stack.length)return!1;let{parser:e}=this.p;return 65535==e.data[e.stateSlot(this.state,1)]&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;t<this.stack.length;t+=3)if(this.stack[t]!=e.stack[t])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(t)))}reduceContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(t)))}emitContext(){let e=this.buffer.length-1;(e<0||-3!=this.buffer[e])&&this.storeNode(this.curContext.hash,this.reducePos,this.reducePos,-3,!0)}emitLookAhead(){let e=this.buffer.length-1;(e<0||-4!=this.buffer[e])&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let t=new hP(this.curContext.tracker,e);t.hash!=this.curContext.hash&&this.emitContext(),this.curContext=t}}setLookAhead(e){return!(e<=this.lookAhead)&&(this.emitLookAhead(),this.lookAhead=e,!0)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class hP{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}class fP{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=65535&e,n=e>>19;0==n?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=3*(n-1);let r=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=r}}class gP{constructor(e,t,n){this.stack=e,this.pos=t,this.index=n,this.buffer=e.buffer,0==this.index&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new gP(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;null!=e&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,0==this.index&&this.maybeNext()}fork(){return new gP(this.stack,this.pos,this.index)}}function mP(e,t=Uint16Array){if("string"!=typeof e)return e;let n=null;for(let r=0,i=0;r<e.length;){let o=0;for(;;){let t=e.charCodeAt(r++),n=!1;if(126==t){o=65535;break}t>=92&&t--,t>=34&&t--;let i=t-32;if(i>=46&&(i-=46,n=!0),o+=i,n)break;o*=46}n?n[i++]=o:n=new t(o)}return n}class vP{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const AP=new vP;class bP{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=AP,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let n=this.range,r=this.rangeIndex,i=this.pos+e;for(;i<n.from;){if(!r)return null;let e=this.ranges[--r];i-=n.from-e.to,n=e}for(;t<0?i>n.to:i>=n.to;){if(r==this.ranges.length-1)return null;let e=this.ranges[++r];i+=e.from-n.to,n=e}return i}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let t of this.ranges)if(t.to>e)return Math.max(e,t.from);return this.end}peek(e){let t,n,r=this.chunkOff+e;if(r>=0&&r<this.chunk.length)t=this.pos+e,n=this.chunk.charCodeAt(r);else{let r=this.resolveOffset(e,1);if(null==r)return-1;if(t=r,t>=this.chunk2Pos&&t<this.chunk2Pos+this.chunk2.length)n=this.chunk2.charCodeAt(t-this.chunk2Pos);else{let e=this.rangeIndex,r=this.range;for(;r.to<=t;)r=this.ranges[++e];this.chunk2=this.input.chunk(this.chunk2Pos=t),t+this.chunk2.length>r.to&&(this.chunk2=this.chunk2.slice(0,r.to-t)),n=this.chunk2.charCodeAt(0)}}return t>=this.token.lookAhead&&(this.token.lookAhead=t+1),n}acceptToken(e,t=0){let n=t?this.resolveOffset(t,-1):this.pos;if(null==n||n<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=n}acceptTokenTo(e,t){this.token.value=e,this.token.end=t}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:t}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=t,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),t=this.pos+e.length;this.chunk=t>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=AP,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,t){if(e>=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let n="";for(let r of this.ranges){if(r.from>=t)break;r.to>e&&(n+=this.input.read(Math.max(r.from,e),Math.min(r.to,t)))}return n}}class yP{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:n}=t.p;wP(this.data,e,t,this.id,n.data,n.tokenPrecTable)}}yP.prototype.contextual=yP.prototype.fallback=yP.prototype.extend=!1;class CP{constructor(e,t,n){this.precTable=t,this.elseToken=n,this.data="string"==typeof e?mP(e):e}token(e,t){let n=e.pos,r=0;for(;;){let n=e.next<0,i=e.resolveOffset(1,1);if(wP(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(null==this.elseToken)return;if(n||r++,null==i)break;e.reset(i,e.token)}r&&(e.reset(n,e.token),e.acceptToken(this.elseToken,r))}}CP.prototype.contextual=yP.prototype.fallback=yP.prototype.extend=!1;class xP{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}}function wP(e,t,n,r,i,o){let s=0,a=1<<r,{dialect:l}=n.p.parser;e:for(;0!=(a&e[s]);){let n=e[s+1];for(let r=s+3;r<n;r+=2)if((e[r+1]&a)>0){let n=e[r];if(l.allows(n)&&(-1==t.token.value||t.token.value==n||SP(n,t.token.value,i,o))){t.acceptToken(n);break}}let r=t.next,c=0,d=e[s+2];if(!(t.next<0&&d>c&&65535==e[n+3*d-3])){for(;c<d;){let i=c+d>>1,o=n+i+(i<<1),a=e[o],l=e[o+1]||65536;if(r<a)d=i;else{if(!(r>=l)){s=e[o+2],t.advance();continue e}c=i+1}}break}s=e[n+3*d-1]}}function kP(e,t,n){for(let r,i=t;65535!=(r=e[i]);i++)if(r==n)return i-t;return-1}function SP(e,t,n,r){let i=kP(n,r,t);return i<0||kP(n,r,e)<i}const OP=void 0!==uP&&uP.env&&/\bparse\b/.test(uP.env.LOG);let _P=null;function BP(e,t,n){let r=e.cursor(uO.IncludeAnonymous);for(r.moveTo(t);;)if(!(n<0?r.childBefore(t):r.childAfter(t)))for(;;){if((n<0?r.to<t:r.from>t)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,t-25)):Math.min(e.length,Math.max(r.from+1,t+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:e.length}}class EP{constructor(e,t){this.fragments=e,this.minRepeat=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.lastRepeat=null,this.lastRepeatPos=-1,this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?BP(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?BP(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let t=this.trees.length-1;if(t<0)return this.nextFragment(),null;if(e<this.safeFrom)return null;let n=this.trees[t],r=this.index[t];if(r==n.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let i=n.children[r],o=this.start[t]+n.positions[r];if(o>e)return this.nextStart=o,null;if(i instanceof pO){let n=o>this.lastRepeatPos&&i.type.id>=this.minRepeat;if(o==e||n){let t,r=o+i.length;if(o>=this.safeFrom&&r<=this.safeTo&&(!(t=i.prop(iO.lookAhead))||r+t<this.fragment.to)&&(n&&(this.lastRepeat=i,this.lastRepeatPos=o),o==e))return i}this.index[t]++,o+i.length>=Math.max(this.safeFrom,e)&&(this.trees.push(i),this.start.push(o),this.index.push(0))}else this.index[t]++,this.nextStart=o+i.length}}}class TP{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(e=>new vP)}getActions(e){let t=0,n=null,{parser:r}=e.p,{tokenizers:i}=r,o=r.stateSlot(e.state,3),s=e.curContext?e.curContext.hash:0,a=0;for(let r=0;r<i.length;r++){if(!(1<<r&o))continue;let l=i[r],c=this.tokens[r];if((!n||l.fallback)&&((l.contextual||c.start!=e.pos||c.mask!=o||c.context!=s)&&(this.updateCachedToken(c,l,e),c.mask=o,c.context=s),c.lookAhead>c.end+25&&(a=Math.max(c.lookAhead,a)),0!=c.value)){let r=t;if(c.extended>-1&&(t=this.addActions(e,c.extended,c.end,t)),t=this.addActions(e,c.value,c.end,t),!l.extend&&(n=c,t>r))break}}for(;this.actions.length>t;)this.actions.pop();return a&&e.setLookAhead(a),n||e.pos!=this.stream.end||(n=new vP,n.value=e.p.parser.eofTerm,n.start=n.end=e.pos,t=this.addActions(e,n.value,n.end,t)),this.mainToken=n,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new vP,{pos:n,p:r}=e;return t.start=n,t.end=Math.min(n+1,r.stream.end),t.value=n==r.stream.end?r.parser.eofTerm:0,t}updateCachedToken(e,t,n){let r=this.stream.clipPos(n.pos);if(t.token(this.stream.reset(r,e),n),e.value>-1){let{parser:t}=n.p;for(let r=0;r<t.specialized.length;r++)if(t.specialized[r]==e.value){let i=t.specializers[r](this.stream.read(e.start,e.end),n);if(i>=0&&n.p.parser.dialect.allows(i>>1)){1&i?e.extended=i>>1:e.value=i>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}putAction(e,t,n,r){for(let t=0;t<r;t+=3)if(this.actions[t]==e)return r;return this.actions[r++]=e,this.actions[r++]=t,this.actions[r++]=n,r}addActions(e,t,n,r){let{state:i}=e,{parser:o}=e.p,{data:s}=o;for(let e=0;e<2;e++)for(let a=o.stateSlot(i,e?2:1);;a+=3){if(65535==s[a]){if(1!=s[a+1]){0==r&&2==s[a+1]&&(r=this.putAction(IP(s,a+2),t,n,r));break}a=IP(s,a+2)}s[a]==t&&(r=this.putAction(IP(s,a+1),t,n,r))}return r}}class MP{constructor(e,t,n,r){this.parser=e,this.input=t,this.ranges=r,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new bP(t,r),this.tokens=new TP(e,this.stream),this.topTerm=e.top[1];let{from:i}=r[0];this.stacks=[pP.start(this,e.top[0],i)],this.fragments=n.length&&this.stream.end-i>4*e.bufferLength?new EP(n,e.minRepeatTerm):null}get parsedPos(){return this.minStackPos}advance(){let e,t,n=this.stacks,r=this.minStackPos,i=this.stacks=[];if(this.bigReductionCount>300&&1==n.length){let[e]=n;for(;e.forceReduce()&&e.stack.length&&e.stack[e.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let o=0;o<n.length;o++){let s=n[o];for(;;){if(this.tokens.mainToken=null,s.pos>r)i.push(s);else{if(this.advanceStack(s,i,n))continue;{e||(e=[],t=[]),e.push(s);let n=this.tokens.getMainToken(s);t.push(n.value,n.end)}}break}}if(!i.length){let t=e&&function(e){let t=null;for(let n of e){let e=n.p.stoppedAt;(n.pos==n.p.stream.end||null!=e&&n.pos>e)&&n.p.parser.stateFlag(n.state,2)&&(!t||t.score<n.score)&&(t=n)}return t}(e);if(t)return OP&&console.log("Finish with "+this.stackID(t)),this.stackToTree(t);if(this.parser.strict)throw OP&&e&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+r);this.recovering||(this.recovering=5)}if(this.recovering&&e){let n=null!=this.stoppedAt&&e[0].pos>this.stoppedAt?e[0]:this.runRecovery(e,t,i);if(n)return OP&&console.log("Force-finish "+this.stackID(n)),this.stackToTree(n.forceAll())}if(this.recovering){let e=1==this.recovering?1:3*this.recovering;if(i.length>e)for(i.sort((e,t)=>t.score-e.score);i.length>e;)i.pop();i.some(e=>e.reducePos>r)&&this.recovering--}else if(i.length>1){e:for(let e=0;e<i.length-1;e++){let t=i[e];for(let n=e+1;n<i.length;n++){let r=i[n];if(t.sameState(r)||t.buffer.length>500&&r.buffer.length>500){if(!((t.score-r.score||t.buffer.length-r.buffer.length)>0)){i.splice(e--,1);continue e}i.splice(n--,1)}}}i.length>12&&(i.sort((e,t)=>t.score-e.score),i.splice(12,i.length-12))}this.minStackPos=i[0].pos;for(let e=1;e<i.length;e++)i[e].pos<this.minStackPos&&(this.minStackPos=i[e].pos);return null}stopAt(e){if(null!=this.stoppedAt&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}tryReuse(e,t,n,r){if(!n)return null;let i=e.curContext&&e.curContext.tracker.strict,o=i?e.curContext.hash:0;for(;n;){let s=this.parser.nodeSet.types[n.type.id]!=n.type?-1:this.parser.getGoto(e.state,n.type.id);if(s>-1&&n.length&&(!i||(n.prop(iO.contextHash)||0)==o))return e.useNode(n,s,t),n;if(0==n.children.length||n.positions[0]>0)break;let a=n.children[0];if(!(a instanceof pO&&(!r||a.type.id>=this.parser.minRepeatTerm)))break;n=a}return null}advanceStack(e,t,n){let r=e.pos,{parser:i}=this,o=OP?this.stackID(e)+" -> ":"";if(null!=this.stoppedAt&&r>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let t=e.reducePos<r&&e.buffer.length&&e.buffer[e.buffer.length-2]<=e.reducePos&&this.fragments.lastRepeatPos==e.reducePos&&this.tryReuse(e,e.reducePos,this.fragments.lastRepeat,!0)||this.tryReuse(e,r,this.fragments.nodeAt(r),!1);if(t)return OP&&console.log(o+this.stackID(e)+` (via reuse of ${i.getName(t.type.id)})`),!0}let s=i.stateSlot(e.state,4);if(s>0)return e.reduce(s),OP&&console.log(o+this.stackID(e)+` (via always-reduce ${i.getName(65535&s)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let a=this.tokens.getActions(e);for(let s=0;s<a.length;){let l=a[s++],c=a[s++],d=a[s++],u=s==a.length||!n,p=u?e:e.split(),h=this.tokens.mainToken;if(p.apply(l,c,h?h.start:p.pos,d),OP&&console.log(o+this.stackID(p)+` (via ${65536&l?`reduce of ${i.getName(65535&l)}`:"shift"} for ${i.getName(c)} @ ${r}${p==e?"":", split"})`),u)return!0;p.pos>r?t.push(p):n.push(p)}return!1}advanceFully(e,t){let n=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>n)return DP(e,t),!0}}runRecovery(e,t,n){let r=null,i=!1;for(let o=0;o<e.length;o++){let s=e[o],a=t[o<<1],l=t[1+(o<<1)],c=OP?this.stackID(s)+" -> ":"";if(s.deadEnd){if(i)continue;if(i=!0,s.restart(),OP&&console.log(c+this.stackID(s)+" (restarted)"),this.advanceFully(s,n))continue}let d=s.split(),u=c;for(let e=0;e<10&&d.forceReduce();e++){if(OP&&console.log(u+this.stackID(d)+" (via force-reduce)"),this.advanceFully(d,n))break;OP&&(u=this.stackID(d)+" -> ")}for(let e of s.recoverByInsert(a))OP&&console.log(c+this.stackID(e)+" (via recover-insert)"),this.advanceFully(e,n);this.stream.end>s.pos?(l==s.pos&&(l++,a=0),s.recoverByDelete(a,l),OP&&console.log(c+this.stackID(s)+` (via recover-delete ${this.parser.getName(a)})`),DP(s,n)):(!r||r.score<d.score)&&(r=d)}return r}stackToTree(e){return e.close(),pO.build({buffer:gP.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let t=(_P||(_P=new WeakMap)).get(e);return t||_P.set(e,t=String.fromCodePoint(this.nextStackID++)),t+e}}function DP(e,t){for(let n=0;n<t.length;n++){let r=t[n];if(r.pos==e.pos&&r.sameState(e))return void(t[n].score<e.score&&(t[n]=e))}t.push(e)}class PP{constructor(e,t,n){this.source=e,this.flags=t,this.disabled=n}allows(e){return!this.disabled||0==this.disabled[e]}}class RP extends DO{constructor(e){if(super(),this.wrappers=[],14!=e.version)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let n=0;n<e.repeatNodeCount;n++)t.push("");let n=Object.keys(e.topRules).map(t=>e.topRules[t][1]),r=[];for(let e=0;e<t.length;e++)r.push([]);function i(e,t,n){r[e].push([t,t.deserialize(String(n))])}if(e.nodeProps)for(let t of e.nodeProps){let e=t[0];"string"==typeof e&&(e=iO[e]);for(let n=1;n<t.length;){let r=t[n++];if(r>=0)i(r,e,t[n++]);else{let o=t[n+-r];for(let s=-r;s>0;s--)i(t[n++],e,o);n++}}}this.nodeSet=new lO(t.map((t,i)=>aO.define({name:i>=this.minRepeatTerm?void 0:t,id:i,props:r[i],top:n.indexOf(i)>-1,error:0==i,skipped:e.skippedNodes&&e.skippedNodes.indexOf(i)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=1024;let o=mP(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let e=0;e<this.specializerSpecs.length;e++)this.specialized[e]=this.specializerSpecs[e].term;this.specializers=this.specializerSpecs.map(NP),this.states=mP(e.states,Uint32Array),this.data=mP(e.stateData),this.goto=mP(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(e=>"number"==typeof e?new yP(o,e):e),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,n){let r=new MP(this,e,t,n);for(let i of this.wrappers)r=i(r,e,t,n);return r}getGoto(e,t,n=!1){let r=this.goto;if(t>=r[0])return-1;for(let i=r[t+1];;){let t=r[i++],o=1&t,s=r[i++];if(o&&n)return s;for(let n=i+(t>>1);i<n;i++)if(r[i]==e)return s;if(o)return-1}}hasAction(e,t){let n=this.data;for(let r=0;r<2;r++)for(let i,o=this.stateSlot(e,r?2:1);;o+=3){if(65535==(i=n[o])){if(1!=n[o+1]){if(2==n[o+1])return IP(n,o+2);break}i=n[o=IP(n,o+2)]}if(i==t||0==i)return IP(n,o+1)}return 0}stateSlot(e,t){return this.states[6*e+t]}stateFlag(e,t){return(this.stateSlot(e,0)&t)>0}validAction(e,t){return!!this.allActions(e,e=>e==t||null)}allActions(e,t){let n=this.stateSlot(e,4),r=n?t(n):void 0;for(let n=this.stateSlot(e,1);null==r;n+=3){if(65535==this.data[n]){if(1!=this.data[n+1])break;n=IP(this.data,n+2)}r=t(IP(this.data,n+1))}return r}nextStates(e){let t=[];for(let n=this.stateSlot(e,1);;n+=3){if(65535==this.data[n]){if(1!=this.data[n+1])break;n=IP(this.data,n+2)}if(!(1&this.data[n+2])){let e=this.data[n+1];t.some((t,n)=>1&n&&t==e)||t.push(this.data[n],e)}}return t}configure(e){let t=Object.assign(Object.create(RP.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let n=this.topRules[e.top];if(!n)throw new RangeError(`Invalid top rule name ${e.top}`);t.top=n}return e.tokenizers&&(t.tokenizers=this.tokenizers.map(t=>{let n=e.tokenizers.find(e=>e.from==t);return n?n.to:t})),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((n,r)=>{let i=e.specializers.find(e=>e.from==n.external);if(!i)return n;let o=Object.assign(Object.assign({},n),{external:i.to});return t.specializers[r]=NP(o),o})),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),null!=e.strict&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),null!=e.bufferLength&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return null==t?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),n=t.map(()=>!1);if(e)for(let r of e.split(" ")){let e=t.indexOf(r);e>=0&&(n[e]=!0)}let r=null;for(let e=0;e<t.length;e++)if(!n[e])for(let n,i=this.dialects[t[e]];65535!=(n=this.data[i++]);)(r||(r=new Uint8Array(this.maxTerm+1)))[n]=1;return new PP(e,n,r)}static deserialize(e){return new RP(e)}}function IP(e,t){return e[t]|e[t+1]<<16}function NP(e){if(e.external){let t=e.extend?1:0;return(n,r)=>e.external(n,r)<<1|t}return e.get}const LP=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288];function $P(e){return e>=65&&e<=90||e>=97&&e<=122||e>=161}function FP(e){return e>=48&&e<=57}function jP(e){return FP(e)||e>=97&&e<=102||e>=65&&e<=70}const VP=(e,t,n)=>(r,i)=>{for(let o=!1,s=0,a=0;;a++){let{next:l}=r;if($P(l)||45==l||95==l||o&&FP(l))!o&&(45!=l||a>0)&&(o=!0),s===a&&45==l&&s++,r.advance();else{if(92!=l||10==r.peek(1)){o&&r.acceptToken(s>=2&&i.canShift(2)?t:40==l?n:e);break}if(r.advance(),jP(r.next)){do{r.advance()}while(jP(r.next));32==r.next&&r.advance()}else r.next>-1&&r.advance();o=!0}}},WP=new xP(VP(149,2,150),{contextual:!0}),zP=new xP(VP(151,3,4),{contextual:!0}),QP=new xP(e=>{if(LP.includes(e.peek(-1))){let{next:t}=e;($P(t)||95==t||35==t||46==t||42==t||91==t||58==t&&$P(e.peek(1))||45==t||38==t)&&e.acceptToken(148)}}),HP=new xP(e=>{if(!LP.includes(e.peek(-1))){let{next:t}=e;if(37==t&&(e.advance(),e.acceptToken(1)),$P(t)){do{e.advance()}while($P(e.next)||FP(e.next));e.acceptToken(1)}}});function qP(e){let t=e.length;return 4!=t&&5!=t&&7!=t&&9!=t||!/^#[a-f\d]+$/i.test(e)?-1:152}const UP=$O({"AtKeyword import charset namespace keyframes media supports font-feature-values":o_.definitionKeyword,"from to selector scope MatchFlag":o_.keyword,NamespaceName:o_.namespace,KeyframeName:o_.labelName,KeyframeRangeName:o_.operatorKeyword,TagName:o_.tagName,ClassName:o_.className,PseudoClassName:o_.constant(o_.className),IdName:o_.labelName,"FeatureName PropertyName":o_.propertyName,AttributeName:o_.attributeName,NumberLiteral:o_.number,KeywordQuery:o_.keyword,UnaryQueryOp:o_.operatorKeyword,"CallTag ValueName FontName":o_.atom,VariableName:o_.variableName,Callee:o_.operatorKeyword,Unit:o_.unit,"UniversalSelector NestingSelector":o_.definitionOperator,"MatchOp CompareOp":o_.compareOperator,"ChildOp SiblingOp, LogicOp":o_.logicOperator,BinOp:o_.arithmeticOperator,Important:o_.modifier,Comment:o_.blockComment,ColorLiteral:o_.color,"ParenthesizedContent StringLiteral":o_.string,":":o_.punctuation,PseudoOp:o_.derefOperator,"; , |":o_.separator,"( )":o_.paren,"[ ]":o_.squareBracket,"{ }":o_.brace}),YP={__proto__:null,lang:44,"nth-child":44,"nth-last-child":44,"nth-of-type":44,"nth-last-of-type":44,dir:44,"host-context":44,if:88,url:158,"url-prefix":158,domain:158,regexp:158},XP={__proto__:null,or:102,and:102,not:112,only:112,layer:212},JP={__proto__:null,selector:118,style:124,layer:208},GP={__proto__:null,"@import":204,"@media":216,"@charset":220,"@namespace":224,"@keyframes":230,"@supports":242,"@scope":246,"@font-feature-values":252},KP={__proto__:null,to:249},ZP=RP.deserialize({version:14,states:"MrQYQdOOO$TQdOOP$[O`OOO%XQaO'#CfOOQP'#Ce'#CeO%`QdO'#CgO%eQ`O'#CgO%jQaO'#FrO&eQdO'#CkO'XQaO'#CcO'cQdO'#CnOOQP'#ES'#ESOOQP'#ER'#ERO'nQdO'#ETO'yQdO'#E[O'yQdO'#E_OOQP'#Fr'#FrO)`QhO'#FQOOQS'#Fq'#FqOOQS'#FT'#FTQYQdOOO)gQdO'#EeO*vQhO'#EkO)gQdO'#EmO*}QdO'#EoO+YQdO'#ErO*[QhO'#ExO+bQdO'#EzO+mQdO'#E}O+rQaO'#CfO+yQ`O'#EbO,OQ`O'#GPO,ZQdO'#GPQOQ`OOP,eO&jO'#CaPOOO)CAa)CAaOOQP'#Ci'#CiOOQP,59R,59RO%`QdO,59ROOQP'#Cm'#CmOOQP,59V,59VO&eQdO,59VO,pQdO,59YOOQP,5:m,5:mO'nQdO,5:oO'yQdO,5:vO'yQdO,5:xO'yQdO,5:yO'yQdO'#F[O,{Q`O,58}O-TQdO'#EaOOQS,58},58}OOQP'#Cq'#CqOOQO'#EP'#EPOOQP,59Y,59YO-[Q`O,59YO-aQ`O,59YO-fQpO'#EUO-qQdO'#EVO-vQ`O'#EVO-{QpO,5:oO.iQaO,5:vO/PQaO,5:yOOQW'#D]'#D]O0OQhO'#DgO0cQhO,5;lO*[QhO'#DeO0pQ`O'#DnO0uQhO'#D{OOQW'#Fx'#FxOOQS,5;l,5;lO0zQ`O'#DhO1PQ`O'#DkOOQS-E9R-E9ROOQ['#Cv'#CvO1UQdO'#CwO1iQdO'#C|O1|QdO'#DPOOQ['#DQ'#DQO2aQ!pO'#DRO4jQ!jO,5;POOQO'#DW'#DWO-aQ`O'#DVO4zQ!nO'#FuO6}Q`O'#DXO7SQ`O'#D|OOQ['#Fu'#FuO7XQhO'#GSO7gQ`O,5;VO7lQ!bO,5;XOOQS'#Eq'#EqO7tQ`O,5;ZO7yQdO,5;ZOOQO'#Et'#EtO8RQ`O,5;^O8WQhO,5;dO'yQdO'#DjOOQS,5;f,5;fO0zQ`O,5;fO8`QdO,5;fOOQS'#Fc'#FcO8hQdO'#FPO7gQ`O,5;iO8pQdO,5:|O9QQdO'#F^O9_Q`O,5<kO9_Q`O,5<kPOOO'#FS'#FSP9jO&jO,58{POOO,58{,58{OOQP1G.m1G.mOOQP1G.q1G.qOOQP1G.t1G.tO-[Q`O1G.tO-aQ`O1G.tO9uQpO1G0ZO9}QaO1G0bO:eQaO1G0dO:{QaO1G0eO;cQaO,5;vOOQO-E9Y-E9YOOQS1G.i1G.iO;mQ`O,5:{O;rQdO'#EQO;yQdO'#CuOOQO'#EX'#EXOOQO,5:q,5:qO-qQdO,5:qOOQP1G0Z1G0ZO)gQdO1G0ZO<QQ!jO'#D]O<`Q!bO,59xO<hQhO,5:ROOQO'#Dc'#DcOOQO'#Fy'#FyO<cQ!bO,59|O<pQhO'#FdO*[QhO,59zO*[QhO'#FdO=hQhO1G1WOOQS1G1W1G1WO=rQhO,5:PO>mQhO'#DoOOQW,5:Y,5:YOOQW,5:g,5:gOOQW,5:S,5:SO>wQhO,5:VO?cQ!fO'#FvOOQS'#Fv'#FvOOQS'#FV'#FVO@pQdO,59cOOQ[,59c,59cOATQdO,59hOOQ[,59h,59hOAhQdO,59kOOQ[,59k,59kOOQ[,59m,59mO)gQdO,59oOA{QhO'#EgOOQW'#Eg'#EgOBjQ`O1G0kO4sQhO1G0kOOQ[,59q,59qO*[QhO'#DZOOQ[,59s,59sOBoQ#tO,5:hOBzQhO'#F`OCXQ`O,5<nOOQS1G0q1G0qOOQS1G0s1G0sOOQS1G0u1G0uOCdQ`O1G0uOCiQdO'#EuOOQS1G0x1G0xOOQS1G1O1G1OOCtQaO,5:UO7gQ`O1G1QOOQS1G1Q1G1QO0zQ`O1G1QOOQS-E9a-E9aOOQS1G1T1G1TOC{Q!fO1G0hODcQ`O'#EdOOQO1G0h1G0hOOQO,5;x,5;xODhQdO,5;xOOQO-E9[-E9[ODuQ`O1G2VPOOO-E9Q-E9QPOOO1G.g1G.gOOQP7+$`7+$`OOQP7+%u7+%uO)gQdO7+%uOOQS1G0g1G0gOEQQaO'#F}OE[Q`O,5:lOEaQ!fO'#FUOF_QdO'#FtOFiQ`O,59aOOQO1G0]1G0]OFnQ!bO7+%uO)gQdO1G/dOFyQhO1G/hOOQW1G/m1G/mOOQW1G/f1G/fOG[QhO,5<OOOQW-E9b-E9bOOQS7+&r7+&rOHSQhO'#D]OHbQhO'#F|OHmQ`O'#F|OHrQ`O,5:ZOHwQ!bO'#D_O>wQhO'#DmOISQhO'#DsOI[QhO'#DuOIaQ!jO'#F{OOQO'#F{'#F{OIlQ`O'#DxOItQ!bO'#DzOOQO'#Fz'#FzOIyQ`O1G/qOOQS-E9T-E9TOOQ[1G.}1G.}OOQ[1G/S1G/SOOQ[1G/V1G/VOOQ[1G/Z1G/ZOJOQdO,5;ROOQS7+&V7+&VOJTQ`O7+&VOJYQhO'#D[OJbQ`O,59uO*[QhO,59uOOQ[1G0S1G0SOJjQ`O1G0SOJoQhO,5;zOOQO-E9^-E9^OOQS7+&a7+&aOJ}QbO'#DROOQO'#Ew'#EwOK]Q`O'#EvOOQO'#Ev'#EvOKhQ`O'#FaOKpQdO,5;aOOQS,5;a,5;aOOQ[1G/p1G/pOOQS7+&l7+&lO7gQ`O7+&lOK{Q!fO'#F]O)gQdO'#F]OMSQdO7+&SOOQO7+&S7+&SOOQO,5;O,5;OOOQO1G1d1G1dOMgQ!bO<<IaOMrQdO'#FZOM|Q`O,5<iOOQP1G0W1G0WOOQS-E9S-E9SONUQdO'#FYON`Q`O,5<`OOQ]1G.{1G.{OOQP<<Ia<<IaONhQ`O<<IaONmQdO7+%OOOQO'#D_'#D_ONtQ!bO7+%SON|QhO'#FXO! ZQ`O,5<hO)gQdO,5<hOOQW1G/u1G/uO! cQ`O,5:XO>wQhO'#DtOOQO,5:_,5:_O! hQhO,5:aO! pQhO,5:fO)gQdO,5:dOOQW7+%]7+%]OOQO'#Ei'#EiO! wQ`O1G0mOOQS<<Iq<<IqO)gQdO,59vO!!kQhO1G/aOOQ[1G/a1G/aO!!rQ`O1G/aOOQW-E9U-E9UOOQ[7+%n7+%nOOQO,5;b,5;bOClQdO'#FbOKhQ`O,5;{OOQS,5;{,5;{OOQS-E9_-E9_OOQS1G0{1G0{OOQS<<JW<<JWO!!zQ!fO,5;wOOQS-E9Z-E9ZOOQO<<In<<InOOQPAN>{AN>{O!$RQ`OAN>{O!$WQaO,5;uOOQO-E9X-E9XO!$bQdO,5;tOOQO-E9W-E9WOOQW<<Hj<<HjOOQW<<Hn<<HnO!$lQhO<<HnO!$}QhO'#D]O!%]QhO,5;sO!%hQ`O,5;sOOQO-E9V-E9VO!%mQdO1G2SO!%wQhO1G/sO!&PQ`O,5:`O>wQhO'#DwOOQO1G/{1G/{O!&UQ!bO1G0QO!&^QdO1G0OOJOQdO'#F_O!&eQ`O7+&XOOQW7+&X7+&XO!&mQ!bO1G/bOOQ[7+${7+${O!&xQhO7+${P!'PQ`O'#FWOOQO,5;|,5;|OOQO-E9`-E9`OOQS1G1g1G1gOOQPG24gG24gO!'UQ`OAN>YO)gQdO1G1_O!'ZQ`O7+'nOOQO1G/z1G/zO!'cQ`O,5:cO!'hQhO7+%lOOQO,5;y,5;yOOQO-E9]-E9]OOQW<<Is<<IsOOQ[<<Hg<<HgPOQW,5;r,5;rOOQWG23tG23tO!'oQdO7+&yOOQO1G/}1G/}OOQO<<IW<<IW",stateData:"!(R~O$`OS$aQQ~OWVO^`O`WOcYOdYOlaOo]O#P^O#S_O#YeO#`fO#bgO#dhO#giO#mjO#okO#rlO$ZRO$^ZO$gTO$rZO~OQnOWVO^`O`WOcYOdYOlaOo]O#P^O#S_O#YeO#`fO#bgO#dhO#giO#mjO#okO#rlO$ZmO$^ZO$gTO$rZO~O$X$sP~P!mO$arO~O`YXcYXdYXoYXrYX!eYX#PYX#SYX$YYX$^YX$g[X$rYX~OgYX~P$aO$ZtO~O$gvO~O$gvO`$fXc$fXd$fXo$fXr$fX!e$fX#P$fX#S$fX$Y$fX$^$fX$r$fXg$fX~O$ZwO~O`yOczOdzOo|O#P}O#S!PO$Y!OO$^ZO$rZO~Or!SO!e!QO~P&jOf!YO$Z!UO$[!VO~OW!]O$Z!ZO$g![O~OWVO^`O`WOcYOdYOo]O#P^O#S_O$ZRO$^ZO$gTO$rZO~OS!eOc!fOd!fOh!bOr!SO!Y!dO!]!iO!`!jO$]!aO~Om!hO~P(qOQ!uOh!mOo!nOr!oOv!xO|!vO!q!wO$Z!lO$[!sO$^!pO$k!qO~OS!eOc!fOd!fOh!bO!Y!dO!]!iO!`!jO$]!aO~Or$vP~P*[Ov!}O!q!wO$Z!|O~Ov#PO$Z#PO~Oh#SOr!SO#p#UO~O$Z#WO~Oc#VX~P$aOc#ZO~Om#[O$X$sXq$sX~O$X$sXq$sX~P!mO$b#_O$c#_O$d#aO~Of#fO$Z!UO$[!VO~Or!SO!e!QO~Oq$sP~P!mOh#oO~Oh#pO~On!xX!|!xX$g!zX~O$Z#qO~O$g#sO~On#tO!|#uO~O`yOczOdzOo|O$^ZO$rZO~Or#Oa!e#Oa#P#Oa#S#Oa$Y#Oag#Oa~P.TOr#Ra!e#Ra#P#Ra#S#Ra$Y#Rag#Ra~P.TOS!eOc!fOd!fOh!bO!Y!dO!]!iO!`!jO~OR#zOv#zO$]#vO$^#yO$k!qO~P/gOm$QO!T#}O!e$OO~P(qOh$SO~O$]$UO~Oh#SO~Oh$WO~O`$YOc$YOg$]Ol$YOm$YO~P)gO`$YOc$YOl$YOm$YOn$_O~P)gO`$YOc$YOl$YOm$YOq$aO~P)gOP$bOSuXcuXduXhuXmuXxuX!YuX!]uX!`uX#[uX#^uX$]uX!WuXQuX`uXguXluXouXruXvuX|uX!quX$ZuX$[uX$^uX$kuXnuXquX!euX$XuX$uuX!}uX~Ox$cO#[$dO#^$eOm$vP~P*[Oh#pOS$iXc$iXd$iXm$iXx$iX!Y$iX!]$iX!`$iX#[$iX#^$iX$]$iXQ$iX`$iXg$iXl$iXo$iXr$iXv$iX|$iX!q$iX$Z$iX$[$iX$^$iX$k$iXn$iXq$iX!e$iX$X$iX$u$iX!}$iX~Oh$iO~Oh$kO~O!T#}O!e$lOr$vXm$vX~Or!SO~Om$oOx$cO~Om$pO~Ov$qO!q!wO~Or$rO~Or!SO!T#}O~Or!SO#p$xO~O$Z#WOr#sX~O$u$|Om#Ua$X#Uaq#Ua~P)gOm$QX$X$QXq$QX~P!mOm#[O$X$saq$sa~O$b#_O$c#_O$d%TO~On%VO!|%WO~Or#Oi!e#Oi#P#Oi#S#Oi$Y#Oig#Oi~P.TOr#Qi!e#Qi#P#Qi#S#Qi$Y#Qig#Qi~P.TOr#Ri!e#Ri#P#Ri#S#Ri$Y#Rig#Ri~P.TOr$Oa!e$Oa~P&jOq%XO~Og$qP~P'yOg$hP~P)gOc!RXg!PX!T!PX!W!RX~Oc%aO!W%bO~Og%cO!T#}O~O!T#}OS$WXc$WXd$WXh$WXm$WXr$WX!Y$WX!]$WX!`$WX!e$WX$]$WX~Om%gO!e$OO~P(qO!T#}OS!Xac!Xad!Xah!Xam!Xar!Xa!Y!Xa!]!Xa!`!Xa!e!Xa$]!Xag!Xa~O$]%hOg$pP~P/gOR#zOS!eOh%mOv#zO!Y%nO$]%lO$^#yO$k!qO~Ox$cOQ$jX`$jXc$jXg$jXh$jXl$jXm$jXo$jXr$jXv$jX|$jX!q$jX$Z$jX$[$jX$^$jX$k$jXn$jXq$jX~O`$YOc$YOg%wOl$YOm$YO~P)gO`$YOc$YOl$YOm$YOn%xO~P)gO`$YOc$YOl$YOm$YOq%yO~P)gOh%{OS#ZXc#ZXd#ZXm#ZX!Y#ZX!]#ZX!`#ZX$]#ZX~Om%|O~Og&ROv&SO!r&SO~Or$SX!e$SXm$SX~P*[O!e$lOr$vam$va~Om&VO~Oq&^O$Z&XO$k&WO~Og&_O~P&jOx$cO!e&cO$u$|Om#Ui$X#Uiq#Ui~P)gO$t&fO~Om$Qa$X$Qaq$Qa~P!mOm#[O$X$siq$si~O!e&iOg$qX~P&jOg&kO~Ox$cOQ#xXg#xXh#xXo#xXr#xXv#xX|#xX!e#xX!q#xX$Z#xX$[#xX$^#xX$k#xX~O!e&mOg$hX~P)gOg&oO~On&pOx$cO!}&qO~OR#zOv#zO$]&sO$^#yO$k!qO~O!T#}OS$Wac$Wad$Wah$Wam$War$Wa!Y$Wa!]$Wa!`$Wa!e$Wa$]$Wa~Oc!dXg!PX!T!PX!e!PX~O!T#}O!e&uOg$pX~Oc&wO~Og&xO~Oc!mXg!mX!W!RX~OS!eOh&zO~O!T&|O~O!T&|O!W&}Og$oX~Oc'OOg!lX~O!W&}O~Og'PO~O$Z'QO~Om'SO~Oc'TO!T#}O~Og'VOm'UO~Og'YO~O!T#}Or$Sa!e$Sam$Sa~OP$bOruX!euXguX~O$k&WOr#jX!e#jX~Or!SO!e'[O~Oq'`O$Z&XO$k&WO~Ox$cOQ$PXh$PXm$PXo$PXr$PXv$PX|$PX!e$PX!q$PX$X$PX$Z$PX$[$PX$^$PX$k$PX$u$PXq$PX~O!e&cO$u$|Om#Uq$X#Uqq#Uq~P)gOn'eOx$cO!}'fO~Og#}X!e#}X~P'yO!e&iOg$qa~Og#|X!e#|X~P)gO!e&mOg$ha~On'eO~Og'kO~P)gOg'lO!W'mO~O$]'nOg#{X!e#{X~P/gO!e&uOg$pa~Og'sO~OS!eOh'uO~OS!eO~PFyO`'yOg'{O~OS#zac#zad#zah#za!Y#za!]#za!`#za$]#za~Og'}O~P!!POg'}Om(OO~Ox$cOQ$Pah$Pam$Pao$Par$Pav$Pa|$Pa!e$Pa!q$Pa$X$Pa$Z$Pa$[$Pa$^$Pa$k$Pa$u$Paq$Pa~On(TO~Og#}a!e#}a~P&jOg#|a!e#|a~P)gOR#zOv#zO$]&sO$^#yO$k&WO~Oc!fXg!PX!T!PX!e!PX~O!T#}Og#{a!e#{a~Oc(VO~O!e&uOg$pi~P)gOg!ai!T!ji~Og(XO~O!W(ZOg!ni~Og!li~P)gO`'yOg(^O~Ox$cOg!Oim!Oi~Og(_O~P!!POm(`O~Og(aO~O!e&uOg$pq~Og(cO~OS!eO~P!$lOg#{q!e#{q~P)gO$`!r$a$k`x#S~",goto:"8^$wPPPPP$xP${P%U%h%U%z&^P%UP&d%UPP&jPPP&p&z&zPPPP&zPP&z&z'jP&zP&z(m&zP)])`)f)f)x)fP)f*_P)fP)f)fP*j)fP*v*|+r+uP+x*v+{*v,O,U,X,_,X)f,ePP-Z-a%U-g%U.V.V.].aPP%UP%U%UP.g/c/p/w${P0QP0TP${P${P${P0Z${P0^0a0d0k${P${PP${P0p${P0s0y1Y1t2S2Y2d2j2p2v2|3W3^3d3j3p3vPPPPPPPPPPPP3|4VP4{5O6SP6[7U7k,X7w7zP7}PP8TRsQ_bOPdp!S#[%Pq`OP^_dp}!O!P!Q!S#S#[#o%P&iqSOP^_dp}!O!P!Q!S#S#[#o%P&iqUOP^_dp}!O!P!Q!S#S#[#o%P&iQuTR#bvQxWR#cyQ!WYR#dzQ#d!YS$h!t!uR%U#f!Z!xeg!m!n!o#Z#p#u$[$^$`$c${%W%]%a&c&d&m&r&w'O'T'i'r'x(V(b!Y!xeg!m!n!o#Z#p#u$[$^$`$c${%W%]%a&c&d&m&r&w'O'T'i'r'x(V(bb#z!b$W%b%m&z&}'m'u(ZU&Z$r&]'[R'Z&Y!Z!teg!m!n!o#Z#p#u$[$^$`$c${%W%]%a&c&d&m&r&w'O'T'i'r'x(V(bR$j!vQ&P$iR'W&Qq!gafj!b!c!d!r#}$O$P$S$g$i$l&Q&uQ#w!bW%s$W%m&z'uQ&t%bQ'w&}Q(U'mR(d(Zc#z!b$W%b%m&z&}'m'u(ZQ#VkQ$V!iQ$v#UR&a$xX%q$W%m&z'up!gafj!b!c!d!r#}$O$P$S$g$i$l&Q&uW%p$W%m&z'uQ&{%nQ'v&|Q'w&}R(d(ZR$T!eR%j$SR'p&uR&{%nX%o$W%m&z'uR'v&|X%t$W%m&z'uX%r$W%m&z'u!Y!xeg!m!n!o#Z#p#u$[$^$`$c${%W%]%a&c&d&m&r&w'O'T'i'r'x(V(bQ!}hR$q#OQ!XYR#ezQ#d!XR%U#ep[OP^_dp}!O!P!Q!S#S#[#o%P&ie{X!_!`#h#i#j#k$u%Y'gQ!^]R#g|T!]]|Q#r![R%_#sQ!TXQ!haQ#TkQ#m!RQ$Q!cQ$n!zQ$t#RQ$w#VQ$z#YQ%g$PQ&`$vQ'^&[Q'a&aR(S']SoP!SQ#^pQ%O#[R&g%PZnPp!S#[%PQ$}#ZQ&e${R'd&dR$g!rQ'R%{R(['yR#OhR#QiR$s#QS&[$r&]R(Q'[V&Y$r&]'[R#YlQ#`rR%S#`QdOSpP!SU!kdp%PR%P#[Q%]#p[&l%]&r'i'r'x(bQ&r%aQ'i&mQ'r&wQ'x'OR(b(VQ$[!mQ$^!nQ$`!oV%v$[$^$`Q&Q$iR'X&QQ&v%iS'q&v(WR(W'rQ&n%]R'j&nQ&j%YR'h&jQ!RXR#l!RQ&d${R'c&dQ#]oS%Q#]%RR%R#^Q'z'RR(]'zQ$m!yR&U$mQ&]$rR'_&]Q']&[R(R']Q#XlR$y#XQ$P!cR%f$P_cOPdp!S#[%P^XOPdp!S#[%PQ!_^Q!`_Q#h}Q#i!OQ#j!PQ#k!QQ$u#SQ%Y#oR'g&iR%^#pQ!reQ!{g[$X!m!n!o$[$^$`Q${#Zh%[#p%]%a&m&r&w'O'i'r'x(V(bQ%`#uQ%z$cS&b${&dQ&h%WQ'b&cR'|'T]$Z!m!n!o$[$^$`Q!caU!yf!r$gQ#RjQ#x!bS#|!c$PQ$R!dQ%d#}Q%e$OQ%i$SS&O$i&QQ&T$lR'o&uQ#{!bW%s$W%m&z'uQ&t%bQ'w&}Q(U'mR(d(ZQ%u$WQ&y%mQ't&zR(Y'uR%k$SR%Z#oQqPR#n!SQ!zfQ$f!rR%}$g",nodeNames:"⚠ Unit VariableName VariableName QueryCallee Comment StyleSheet RuleSet UniversalSelector TagSelector TagName NamespacedTagSelector NamespaceName TagName NestingSelector ClassSelector . ClassName PseudoClassSelector : :: PseudoClassName PseudoClassName ) ( ArgList ValueName ParenthesizedValue AtKeyword ; ] [ BracketedValue } { BracedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp CallExpression Callee IfExpression if ArgList IfBranch KeywordQuery FeatureQuery FeatureName BinaryQuery LogicOp ComparisonQuery ColorLiteral CompareOp UnaryQuery UnaryQueryOp ParenthesizedQuery SelectorQuery selector ParenthesizedSelector StyleQuery style ParenthesedQuery CallQuery ArgList PropertyName , PropertyName UnaryQuery ParenthesedQuery BinaryQuery ParenthesedQuery ParenthesedQuery StyleFeature PropertyName StyleRange PseudoQuery CallLiteral CallTag ParenthesizedContent PseudoClassName ArgList IdSelector IdName AttributeSelector AttributeName NamespacedAttribute NamespaceName AttributeName MatchOp MatchFlag ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp Block Declaration PropertyName Important ImportStatement import Layer layer LayerName layer MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList KeyframeSelector KeyframeRangeName SupportsStatement supports ScopeStatement scope to FontFeatureStatement font-feature-values FontName AtRule Styles",maxTerm:176,nodeProps:[["isolate",-2,5,38,""],["openedBy",23,"(",30,"[",33,"{"],["closedBy",24,")",31,"]",34,"}"]],propSources:[UP],skippedNodes:[0,5,130],repeatNodeCount:17,tokenData:"IO~R!bOX%ZX^&R^p%Zpq&Rqr)ers)vst+jtu/wuv%Zvw0qwx1Sxy2qyz3Sz{3X{|3r|}8e}!O8v!O!P9e!P!Q9|!Q![:u![!];p!]!^<l!^!_<}!_!`=y!`!a>^!a!b%Z!b!c?_!c!k%Z!k!lAl!l!u%Z!u!vAl!v!}%Z!}#OA}#O#P%Z#P#QB`#Q#R/w#R#]%Z#]#^Bq#^#g%Z#g#hAl#h#o%Z#o#pGU#p#qGg#q#rHO#r#sHa#s#y%Z#y#z&R#z$f%Z$f$g&R$g#BY%Z#BY#BZ&R#BZ$IS%Z$IS$I_&R$I_$I|%Z$I|$JO&R$JO$JT%Z$JT$JU&R$JU$KV%Z$KV$KW&R$KW&FU%Z&FU&FV&R&FV;'S%Z;'S;=`Hx<%lO%Z`%^SOy%jz;'S%j;'S;=`%{<%lO%j`%oS!r`Oy%jz;'S%j;'S;=`%{<%lO%j`&OP;=`<%l%j~&Wh$`~OX%jX^'r^p%jpq'rqy%jz#y%j#y#z'r#z$f%j$f$g'r$g#BY%j#BY#BZ'r#BZ$IS%j$IS$I_'r$I_$I|%j$I|$JO'r$JO$JT%j$JT$JU'r$JU$KV%j$KV$KW'r$KW&FU%j&FU&FV'r&FV;'S%j;'S;=`%{<%lO%j~'yh$`~!r`OX%jX^'r^p%jpq'rqy%jz#y%j#y#z'r#z$f%j$f$g'r$g#BY%j#BY#BZ'r#BZ$IS%j$IS$I_'r$I_$I|%j$I|$JO'r$JO$JT%j$JT$JU'r$JU$KV%j$KV$KW'r$KW&FU%j&FU&FV'r&FV;'S%j;'S;=`%{<%lO%jj)jS$uYOy%jz;'S%j;'S;=`%{<%lO%j~)yWOY)vZr)vrs*cs#O)v#O#P*h#P;'S)v;'S;=`+d<%lO)v~*hOv~~*kRO;'S)v;'S;=`*t;=`O)v~*wXOY)vZr)vrs*cs#O)v#O#P*h#P;'S)v;'S;=`+d;=`<%l)v<%lO)v~+gP;=`<%l)vj+maOy%jz}%j}!O,r!O!Q%j!Q![,r![!c%j!c!},r!}#O%j#O#P.O#P#R%j#R#S,r#S#T%j#T#o,r#o$g%j$g;'S,r;'S;=`/q<%lO,rj,ya$rY!r`Oy%jz}%j}!O,r!O!Q%j!Q![,r![!c%j!c!},r!}#O%j#O#P.O#P#R%j#R#S,r#S#T%j#T#o,r#o$g%j$g;'S,r;'S;=`/q<%lO,rj.TV!r`OY,rYZ%jZy,ryz.jz;'S,r;'S;=`/q<%lO,rY.oX$rY}!O.j!Q![.j!c!}.j#O#P/[#R#S.j#T#o.j$g;'S.j;'S;=`/k<%lO.jY/_SOY.jZ;'S.j;'S;=`/k<%lO.jY/nP;=`<%l.jj/tP;=`<%l,rd/zUOy%jz!_%j!_!`0^!`;'S%j;'S;=`%{<%lO%jd0eS!|S!r`Oy%jz;'S%j;'S;=`%{<%lO%jb0vS^QOy%jz;'S%j;'S;=`%{<%lO%j~1VWOY1SZw1Swx*cx#O1S#O#P1o#P;'S1S;'S;=`2k<%lO1S~1rRO;'S1S;'S;=`1{;=`O1S~2OXOY1SZw1Swx*cx#O1S#O#P1o#P;'S1S;'S;=`2k;=`<%l1S<%lO1S~2nP;=`<%l1Sj2vShYOy%jz;'S%j;'S;=`%{<%lO%j~3XOg~n3`UWQxWOy%jz!_%j!_!`0^!`;'S%j;'S;=`%{<%lO%jj3yWxW#SQOy%jz!O%j!O!P4c!P!Q%j!Q![7h![;'S%j;'S;=`%{<%lO%jj4hU!r`Oy%jz!Q%j!Q![4z![;'S%j;'S;=`%{<%lO%jj5RY!r`$kYOy%jz!Q%j!Q![4z![!g%j!g!h5q!h#X%j#X#Y5q#Y;'S%j;'S;=`%{<%lO%jj5vY!r`Oy%jz{%j{|6f|}%j}!O6f!O!Q%j!Q![6}![;'S%j;'S;=`%{<%lO%jj6kU!r`Oy%jz!Q%j!Q![6}![;'S%j;'S;=`%{<%lO%jj7UU!r`$kYOy%jz!Q%j!Q![6}![;'S%j;'S;=`%{<%lO%jj7o[!r`$kYOy%jz!O%j!O!P4z!P!Q%j!Q![7h![!g%j!g!h5q!h#X%j#X#Y5q#Y;'S%j;'S;=`%{<%lO%jj8jS!eYOy%jz;'S%j;'S;=`%{<%lO%jj8{WxWOy%jz!O%j!O!P4c!P!Q%j!Q![7h![;'S%j;'S;=`%{<%lO%jj9jU`YOy%jz!Q%j!Q![4z![;'S%j;'S;=`%{<%lO%j~:RTxWOy%jz{:b{;'S%j;'S;=`%{<%lO%j~:iS!r`$a~Oy%jz;'S%j;'S;=`%{<%lO%jj:z[$kYOy%jz!O%j!O!P4z!P!Q%j!Q![7h![!g%j!g!h5q!h#X%j#X#Y5q#Y;'S%j;'S;=`%{<%lO%jj;uUcYOy%jz![%j![!]<X!];'S%j;'S;=`%{<%lO%jj<`SdY!r`Oy%jz;'S%j;'S;=`%{<%lO%jj<qSmYOy%jz;'S%j;'S;=`%{<%lO%jh=SU!WWOy%jz!_%j!_!`=f!`;'S%j;'S;=`%{<%lO%jh=mS!WW!r`Oy%jz;'S%j;'S;=`%{<%lO%jl>QS!WW!|SOy%jz;'S%j;'S;=`%{<%lO%jj>eV#PQ!WWOy%jz!_%j!_!`=f!`!a>z!a;'S%j;'S;=`%{<%lO%jb?RS#PQ!r`Oy%jz;'S%j;'S;=`%{<%lO%jj?bYOy%jz}%j}!O@Q!O!c%j!c!}@o!}#T%j#T#o@o#o;'S%j;'S;=`%{<%lO%jj@VW!r`Oy%jz!c%j!c!}@o!}#T%j#T#o@o#o;'S%j;'S;=`%{<%lO%jj@v[lY!r`Oy%jz}%j}!O@o!O!Q%j!Q![@o![!c%j!c!}@o!}#T%j#T#o@o#o;'S%j;'S;=`%{<%lO%jhAqS!}WOy%jz;'S%j;'S;=`%{<%lO%jjBSSoYOy%jz;'S%j;'S;=`%{<%lO%jnBeSn^Oy%jz;'S%j;'S;=`%{<%lO%jjBvU!}WOy%jz#a%j#a#bCY#b;'S%j;'S;=`%{<%lO%jbC_U!r`Oy%jz#d%j#d#eCq#e;'S%j;'S;=`%{<%lO%jbCvU!r`Oy%jz#c%j#c#dDY#d;'S%j;'S;=`%{<%lO%jbD_U!r`Oy%jz#f%j#f#gDq#g;'S%j;'S;=`%{<%lO%jbDvU!r`Oy%jz#h%j#h#iEY#i;'S%j;'S;=`%{<%lO%jbE_U!r`Oy%jz#T%j#T#UEq#U;'S%j;'S;=`%{<%lO%jbEvU!r`Oy%jz#b%j#b#cFY#c;'S%j;'S;=`%{<%lO%jbF_U!r`Oy%jz#h%j#h#iFq#i;'S%j;'S;=`%{<%lO%jbFxS$tQ!r`Oy%jz;'S%j;'S;=`%{<%lO%jjGZSrYOy%jz;'S%j;'S;=`%{<%lO%jfGlU$gUOy%jz!_%j!_!`0^!`;'S%j;'S;=`%{<%lO%jjHTSqYOy%jz;'S%j;'S;=`%{<%lO%jfHfU#SQOy%jz!_%j!_!`0^!`;'S%j;'S;=`%{<%lO%j`H{P;=`<%l%Z",tokenizers:[QP,HP,WP,zP,1,2,3,4,new CP("m~RRYZ[z{a~~g~aO$c~~dP!P!Qg~lO$d~~",28,156)],topRules:{StyleSheet:[0,6],Styles:[1,129]},dynamicPrecedences:{97:1},specialized:[{term:172,get:(e,t)=>qP(e)<<1,external:qP},{term:150,get:e=>YP[e]||-1},{term:151,get:e=>XP[e]||-1},{term:4,get:e=>JP[e]||-1},{term:28,get:e=>GP[e]||-1},{term:149,get:e=>KP[e]||-1}],tokenPrec:2433});let eR=null;function tR(){if(!eR&&"object"==typeof document&&document.body){let{style:e}=document.body,t=[],n=new Set;for(let r in e)"cssText"!=r&&"cssFloat"!=r&&"string"==typeof e[r]&&(/[A-Z]/.test(r)&&(r=r.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())),n.has(r)||(t.push(r),n.add(r)));eR=t.sort().map(e=>({type:"property",label:e,apply:e+": "}))}return eR||[]}const nR=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(e=>({type:"class",label:e})),rR=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(e=>({type:"keyword",label:e})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(e=>({type:"constant",label:e}))),iR=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(e=>({type:"type",label:e})),oR=["@charset","@color-profile","@container","@counter-style","@font-face","@font-feature-values","@font-palette-values","@import","@keyframes","@layer","@media","@namespace","@page","@position-try","@property","@scope","@starting-style","@supports","@view-transition"].map(e=>({type:"keyword",label:e})),sR=/^(\w[\w-]*|-\w[\w-]*|)$/,aR=/^-(-[\w-]*)?$/;const lR=new TO,cR=["Declaration"];function dR(e){for(let t=e;;){if(t.type.isTop)return t;if(!(t=t.parent))return e}}function uR(e,t,n){if(t.to-t.from>4096){let r=lR.get(t);if(r)return r;let i=[],o=new Set,s=t.cursor(uO.IncludeAnonymous);if(s.firstChild())do{for(let t of uR(e,s.node,n))o.has(t.label)||(o.add(t.label),i.push(t))}while(s.nextSibling());return lR.set(t,i),i}{let r=[],i=new Set;return t.cursor().iterate(t=>{var o;if(n(t)&&t.matchContext(cR)&&":"==(null===(o=t.node.nextSibling)||void 0===o?void 0:o.name)){let n=e.sliceString(t.from,t.to);i.has(n)||(i.add(n),r.push({label:n,type:"variable"}))}}),r}}const pR=e=>t=>{let{state:n,pos:r}=t,i=h_(n).resolveInner(r,-1),o=i.type.isError&&i.from==i.to-1&&"-"==n.doc.sliceString(i.from,i.to);if("PropertyName"==i.name||(o||"TagName"==i.name)&&/^(Block|Styles)$/.test(i.resolve(i.to).name))return{from:i.from,options:tR(),validFor:sR};if("ValueName"==i.name)return{from:i.from,options:rR,validFor:sR};if("PseudoClassName"==i.name)return{from:i.from,options:nR,validFor:sR};if(e(i)||(t.explicit||o)&&function(e,t){var n;if(("("==e.name||e.type.isError)&&(e=e.parent||e),"ArgList"!=e.name)return!1;let r=null===(n=e.parent)||void 0===n?void 0:n.firstChild;return"Callee"==(null==r?void 0:r.name)&&"var"==t.sliceString(r.from,r.to)}(i,n.doc))return{from:e(i)||o?i.from:r,options:uR(n.doc,dR(i),e),validFor:aR};if("TagName"==i.name){for(let{parent:e}=i;e;e=e.parent)if("Block"==e.name)return{from:i.from,options:tR(),validFor:sR};return{from:i.from,options:iR,validFor:sR}}if("AtKeyword"==i.name)return{from:i.from,options:oR,validFor:sR};if(!t.explicit)return null;let s=i.resolve(r),a=s.childBefore(r);return a&&":"==a.name&&"PseudoClassSelector"==s.name?{from:r,options:nR,validFor:sR}:a&&":"==a.name&&"Declaration"==s.name||"ArgList"==s.name?{from:r,options:rR,validFor:sR}:"Block"==s.name||"Styles"==s.name?{from:r,options:tR(),validFor:sR}:null},hR=pR(e=>"VariableName"==e.name),fR=p_.define({name:"css",parser:ZP.configure({props:[T_.add({Declaration:L_()}),F_.add({"Block KeyframeList":function(e){let t=e.firstChild,n=e.lastChild;return t&&t.to<n.from?{from:t.to,to:n.type.isError?e.to:n.from}:null}})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function gR(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return mR(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?mR(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){a=!0,o=e},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}function mR(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var vR={class:"trp-custom-css-editor"},AR={key:0,class:"trp-field__label trp-primary-text-bold"};const bR={__name:"CustomCssAreaField",props:{label:{type:String,default:""},visible:{type:Boolean,default:!1},modelValue:{type:String,default:""},scopeSelector:{type:String,default:".trp-language-switcher"}},emits:["update:modelValue"],setup:function(e,t){var n=t.emit,r=e,i=n,o=nn(r.modelValue),s=nn(""),a=[new w_(fR,fR.data.of({autocomplete:hR}))],l=rn(null),c=(0,df.__)("Write custom CSS here...","translatepress-multilingual"),d=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:300;return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];clearTimeout(t),t=setTimeout(function(){e.apply(void 0,i)},n)}}(function(e){var t=g(e);s.value=t,i("update:modelValue",t)},300);xr(function(){return r.modelValue},function(e){e!==s.value&&e!==o.value&&(o.value=e)}),xr(o,function(e){return d(e)}),xr(s,function(e){p&&(p.textContent=e)});var u=function(e){var t=e.view;return l.value=t},p=null,h=function(){!p&&r.visible&&((p=document.createElement("style")).dataset.customCss="",p.textContent=g(o.value),document.head.appendChild(p))},f=function(){p&&(p.remove(),p=null)},g=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.scopeSelector,n=document.createElement("style");n.textContent=e,document.head.appendChild(n);var i=n.sheet;document.head.removeChild(n);var o,s=[],a=gR(i.cssRules);try{for(a.s();!(o=a.n()).done;){var l=o.value;if(l instanceof CSSStyleRule){var c=l.selectorText.split(",").map(function(e){return(e=e.trim()).startsWith(t)?e:"".concat(t," ").concat(e)}).join(", ");s.push("".concat(c," { ").concat(l.style.cssText," }"))}else if(l instanceof CSSMediaRule){var d,u=[],p=gR(l.cssRules);try{for(p.s();!(d=p.n()).done;){var h=d.value;if(h instanceof CSSStyleRule){var f=h.selectorText.split(",").map(function(e){return(e=e.trim()).startsWith(t)?e:"".concat(t," ").concat(e)}).join(", ");u.push("".concat(f," { ").concat(h.style.cssText," }"))}else u.push(h.cssText)}}catch(e){p.e(e)}finally{p.f()}s.push("@media ".concat(l.media.mediaText," {\n").concat(u.join("\n"),"\n}"))}else s.push(l.cssText)}}catch(e){a.e(e)}finally{a.f()}return s.join("\n")};return xr(function(){return r.visible},function(e){e?h():f()}),qi(function(){r.visible&&h()}),Xi(f),function(t,n){return pr((Ks(),ia("div",vR,[e.label?(Ks(),ia("label",AR,Ce(e.label),1)):Aa("",!0),pa(ln(dP),{modelValue:o.value,"onUpdate:modelValue":n[0]||(n[0]=function(e){return o.value=e}),placeholder:ln(c),style:{height:"250px",width:"80%",fontSize:"14px",fontFamily:"monospace"},"indent-with-tab":!0,"tab-size":2,extensions:a,onReady:u},null,8,["modelValue","placeholder"])],512)),[[Il,e.visible]])}}};var yR=n(714),CR={insert:"head",singleton:!1};uf()()(yR.A,CR);yR.A.locals;const xR=bR;var wR=["title"],kR=["disabled"],SR={class:"trp-checkbox-content"},OR={key:0,class:"trp-primary-text-bold"},_R=["innerHTML"];const BR={__name:"CheckboxField",props:{modelValue:{type:Boolean,required:!0},label:{type:String,default:""},description:{type:String,default:""},disabled:{type:Boolean,default:!1},title:{type:String,default:""}},emits:["update:modelValue"],setup:function(e,t){var n=t.emit,r=e,i=n,o="trp-checkbox-".concat(Math.random().toString(36).slice(2)),s=Ja({get:function(){return!0===r.modelValue},set:function(e){return i("update:modelValue",e)}});return function(t,n){return Ks(),ia("div",{class:"trp-settings-checkbox trp-settings-options-item",title:r.title},[pr(ua("input",{type:"checkbox",id:o,"onUpdate:modelValue":n[0]||(n[0]=function(e){return s.value=e}),disabled:r.disabled},null,8,kR),[[Lc,s.value]]),ua("label",{for:o,class:"trp-checkbox-label"},[ua("div",SR,[e.label?(Ks(),ia("span",OR,Ce(e.label),1)):Aa("",!0),e.description?(Ks(),ia("span",{key:1,class:"trp-description-text",innerHTML:e.description},null,8,_R)):Aa("",!0)])])],8,wR)}}};var ER=n(730),TR={insert:"head",singleton:!1};uf()()(ER.A,TR);ER.A.locals;const MR=(0,i().A)(BR,[["__scopeId","data-v-6b2a964c"]]);var DR={class:"trp-checkbox-group__wrapper"},PR={key:0,class:"trp-field__label trp-primary-text-bold"},RR=["value","checked","onChange"];const IR={__name:"CheckboxGroupField",props:{label:{type:String,default:""},modelValue:{type:Array,default:function(){return[]}},options:{type:Array,required:!0,validator:function(e){return e.every(function(e){return"value"in e&&"label"in e})}},columns:{type:Number,default:0}},emits:["update:modelValue"],setup:function(e,t){var n=t.emit,r=e,i=n,o=Ja(function(){return Array.isArray(r.modelValue)?r.modelValue:[]});return function(t,n){return Ks(),ia("div",DR,[e.label?(Ks(),ia("span",PR,Ce(e.label),1)):Aa("",!0),ua("div",{class:K(["trp-checkbox-group",{"trp-checkbox-group--grid":e.columns>0}]),style:U(e.columns>0?{"--trp-checkbox-columns":e.columns}:null)},[(Ks(!0),ia(qs,null,lo(e.options,function(e){return Ks(),ia("label",{key:e.value,class:"trp-checkbox-group__option"},[ua("input",{type:"checkbox",value:e.value,checked:o.value.includes(e.value),onChange:function(t){return n=e.value,r=t.target.checked,s=new Set(o.value),r?s.add(n):s.delete(n),void i("update:modelValue",Array.from(s));var n,r,s}},null,40,RR),ua("span",null,Ce(e.label),1)])}),128))],6)])}}};var NR=n(209),LR={insert:"head",singleton:!1};uf()()(NR.A,LR);NR.A.locals;const $R=(0,i().A)(IR,[["__scopeId","data-v-394252e9"]]);var FR={class:"trp-text-field"},jR={key:0,class:"trp-field__label trp-primary-text-bold"},VR={class:"trp-text-field__control"},WR=["value"],zR=["innerHTML"];const QR={__name:"TextField",props:{label:{type:String,default:""},modelValue:{type:String,default:""},description:{type:String,default:""}},emits:["update:modelValue"],setup:function(e,t){var n=t.emit,r=n;return function(t,n){return Ks(),ia("div",FR,[e.label?(Ks(),ia("label",jR,Ce(e.label),1)):Aa("",!0),ua("div",VR,[ua("input",{type:"text",class:"trp-text-input",value:e.modelValue,onInput:n[0]||(n[0]=function(e){return r("update:modelValue",e.target.value)})},null,40,WR),e.description?(Ks(),ia("span",{key:0,class:"trp-description-text",innerHTML:e.description},null,8,zR)):Aa("",!0)])])}}};var HR=n(39),qR={insert:"head",singleton:!1};uf()()(HR.A,qR);HR.A.locals;const UR=(0,i().A)(QR,[["__scopeId","data-v-1b99e2f0"]]);var YR={class:"trp-textarea-field"},XR={key:0,class:"trp-field__label trp-primary-text-bold"},JR={class:"trp-textarea-field__control"},GR=["value"],KR=["innerHTML"];const ZR={__name:"TextareaField",props:{label:{type:String,default:""},modelValue:{type:String,default:""},description:{type:String,default:""}},emits:["update:modelValue"],setup:function(e,t){var n=t.emit,r=n;return function(t,n){return Ks(),ia("div",YR,[e.label?(Ks(),ia("label",XR,Ce(e.label),1)):Aa("",!0),ua("div",JR,[ua("textarea",{class:"trp-textarea-input",value:e.modelValue,onInput:n[0]||(n[0]=function(e){return r("update:modelValue",e.target.value)})},null,40,GR),e.description?(Ks(),ia("span",{key:0,class:"trp-description-text",innerHTML:e.description},null,8,KR)):Aa("",!0)])])}}};var eI=n(489),tI={insert:"head",singleton:!1};uf()()(eI.A,tI);eI.A.locals;const nI=(0,i().A)(ZR,[["__scopeId","data-v-9d96a9c0"]]);var rI={class:"trp-select-field"},iI={key:0,class:"trp-field__label trp-primary-text-bold"},oI=["value"],sI=["value","disabled"];const aI={__name:"SelectField",props:{label:{type:String,default:""},modelValue:{type:String,default:""},options:{type:Array,required:!0,validator:function(e){return e.every(function(e){return"value"in e&&"label"in e&&(void 0===e.disabled||"boolean"==typeof e.disabled)})}}},emits:["update:modelValue"],setup:function(e,t){var n=t.emit,r=n;return function(t,n){return Ks(),ia("div",rI,[e.label?(Ks(),ia("label",iI,Ce(e.label),1)):Aa("",!0),ua("select",{class:"trp-select-field__control",value:e.modelValue,onChange:n[0]||(n[0]=function(e){return r("update:modelValue",e.target.value)})},[(Ks(!0),ia(qs,null,lo(e.options,function(e){return Ks(),ia("option",{key:e.value,value:e.value,disabled:e.disabled},Ce(e.label),9,sI)}),128))],40,oI)])}}};var lI=n(11),cI={insert:"head",singleton:!1};uf()()(lI.A,cI);lI.A.locals;const dI=(0,i().A)(aI,[["__scopeId","data-v-6a63fb72"]]);function uI(e){return function(e){if(Array.isArray(e))return pI(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return pI(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?pI(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function pI(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var hI={class:"trp-language-condition"},fI={class:"trp-language-condition__toggle-row"},gI={key:0,class:"trp-field__label trp-primary-text-bold"},mI=["aria-pressed"],vI={key:0,class:"trp-language-condition__body"},AI={class:"trp-language-condition__mode-wrap"},bI={class:"trp-language-condition__mode-label"},yI=["aria-label"],CI=["id"],xI=["aria-labelledby","aria-expanded","aria-controls","disabled"],wI=["id"],kI=["onClick"],SI=["src"],OI={class:"trp-language-condition__chips","aria-live":"polite"},_I=["onClick"],BI=["src"],EI={key:0,class:"trp-language-condition__empty"};const TI={__name:"LanguageConditionField",props:{label:{type:String,default:""},modelValue:{type:Boolean,default:!1},config:{type:Object,required:!0},modeKey:{type:String,default:"languageConditionMode"},languagesKey:{type:String,default:"languages"},defaultMode:{type:String,default:"include"},options:{type:Array,required:!0,validator:function(e){return e.every(function(e){return"value"in e&&"label"in e})}},includeLabel:{type:String,default:(0,df.__)("Include","translatepress-multilingual")},excludeLabel:{type:String,default:(0,df.__)("Exclude","translatepress-multilingual")},modeLabel:{type:String,default:(0,df.__)("Content Restriction Mode","translatepress-multilingual")},selectLabel:{type:String,default:(0,df.__)("Select language","translatepress-multilingual")},addLabel:{type:String,default:(0,df.__)("Add","translatepress-multilingual")},emptyLabel:{type:String,default:(0,df.__)("No languages selected","translatepress-multilingual")}},emits:["update:modelValue"],setup:function(e,t){var n=t.emit,r=e,i=n,o=nn(!1),s=nn(null);r.config[r.modeKey]||(r.config[r.modeKey]=r.defaultMode),Array.isArray(r.config[r.languagesKey])||(r.config[r.languagesKey]=[]);var a=Ja(function(){return Array.isArray(r.config[r.languagesKey])?r.config[r.languagesKey]:[]}),l=Ja(function(){return r.options.filter(function(e){return!a.value.includes(e.value)})}),c=Ja(function(){return a.value.map(function(e){return r.options.find(function(t){return t.value===e})}).filter(Boolean)}),d=Ja(function(){return"trp-language-condition-".concat(r.languagesKey)});function u(e){r.config[r.modeKey]=e}function p(){i("update:modelValue",!r.modelValue)}function h(e){s.value&&!s.value.contains(e.target)&&(o.value=!1)}function f(e){"Escape"===e.key&&(o.value=!1)}return qi(function(){document.addEventListener("pointerdown",h,!0),document.addEventListener("keyup",f)}),Xi(function(){document.removeEventListener("pointerdown",h,!0),document.removeEventListener("keyup",f)}),function(t,n){return Ks(),ia("div",hI,[ua("div",fI,[e.label?(Ks(),ia("span",gI,Ce(e.label),1)):Aa("",!0),ua("button",{type:"button",class:K(["trp-language-condition__toggle",{"is-active":e.modelValue}]),"aria-pressed":e.modelValue,onClick:p},uI(n[3]||(n[3]=[ua("span",{class:"trp-language-condition__toggle-knob"},null,-1)])),10,mI)]),e.modelValue?(Ks(),ia("div",vI,[ua("div",AI,[ua("span",bI,Ce(e.modeLabel),1),ua("div",{class:"trp-language-condition__mode",role:"group","aria-label":e.modeLabel},[ua("button",{type:"button",class:K({"is-active":"include"===e.config[e.modeKey]}),onClick:n[0]||(n[0]=function(e){return u("include")})},Ce(e.includeLabel),3),ua("button",{type:"button",class:K({"is-active":"exclude"===e.config[e.modeKey]}),onClick:n[1]||(n[1]=function(e){return u("exclude")})},Ce(e.excludeLabel),3)],8,yI)]),ua("span",{class:"trp-language-condition__select-label",id:"".concat(d.value,"-label")},Ce(e.selectLabel),9,CI),ua("div",{ref_key:"dropdownEl",ref:s,class:K(["trp-language-condition__dropdown",{"is-open":o.value}])},[ua("button",{type:"button",class:"trp-language-condition__dropdown-trigger","aria-labelledby":"".concat(d.value,"-label"),"aria-expanded":o.value,"aria-controls":d.value,disabled:0===l.value.length,onClick:n[2]||(n[2]=function(e){return o.value=!o.value})},[ua("span",null,Ce(e.selectLabel),1),n[4]||(n[4]=ua("span",{class:"trp-language-condition__dropdown-arrow","aria-hidden":"true"},null,-1))],8,xI),o.value?(Ks(),ia("div",{key:0,id:d.value,class:"trp-language-condition__dropdown-list",role:"listbox"},[(Ks(!0),ia(qs,null,lo(l.value,function(e){return Ks(),ia("button",{key:e.value,type:"button",class:"trp-language-condition__dropdown-option",role:"option",onClick:function(t){var n;(n=e.value)&&(r.config[r.languagesKey]=[].concat(uI(a.value),[n]),o.value=!1)}},[e.flagUrl?(Ks(),ia("img",{key:0,src:e.flagUrl,class:"trp-language-condition__flag","aria-hidden":"true",loading:"lazy",decoding:"async"},null,8,SI)):Aa("",!0),ua("span",null,Ce(e.label),1)],8,kI)}),128))],8,wI)):Aa("",!0)],2),ua("div",OI,[(Ks(!0),ia(qs,null,lo(c.value,function(e){return Ks(),ia("button",{key:e.value,type:"button",class:"trp-language-condition__chip",onClick:function(t){return n=e.value,void(r.config[r.languagesKey]=a.value.filter(function(e){return e!==n}));var n}},[e.flagUrl?(Ks(),ia("img",{key:0,src:e.flagUrl,class:"trp-language-condition__flag","aria-hidden":"true",loading:"lazy",decoding:"async"},null,8,BI)):Aa("",!0),ua("span",null,Ce(e.label),1),n[5]||(n[5]=ua("span",{"aria-hidden":"true"},"×",-1))],8,_I)}),128)),0===c.value.length?(Ks(),ia("span",EI,Ce(e.emptyLabel),1)):Aa("",!0)])])):Aa("",!0)])}}};var MI=n(468),DI={insert:"head",singleton:!1};uf()()(MI.A,DI);MI.A.locals;const PI=(0,i().A)(TI,[["__scopeId","data-v-dbb9ab6e"]]);var RI=["key","type","layout","visible","default"];function II(e){return II="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},II(e)}function NI(e){return function(e){if(Array.isArray(e))return LI(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return LI(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?LI(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function LI(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function $I(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function FI(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$I(Object(n),!0).forEach(function(t){jI(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$I(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function jI(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=II(e)||!e)return e;var n;if("undefined"!=typeof Symbol&&void 0!==(n=e[Symbol.toPrimitive])){var r=n.call(e,t||"default");if("object"!=II(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==II(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var VI={class:"trp-title"},WI={class:"trp-body"},zI={key:0,class:"trp-separator"};const QI={__name:"SettingsBox",props:{title:{type:String,required:!0},fields:{type:Array,required:!1,default:[]},collapsible:{type:Boolean,default:!1},scope:{type:String,default:""},config:{type:Object,default:null},components:{type:Object,default:function(){return{}}}},setup:function(e){var t={color:Jm,number:rv,toggle:cv,toggleStatus:gv,radio:Ov,quadNumber:Nv,customCss:xR,checkbox:MR,checkboxGroup:$R,text:UR,textarea:nI,select:dI,languageCondition:PI},n=e,r=n.config||gr(n.scope);if(!r)throw new Error('SettingsBox needs either a config prop or an injected scope. Scope: "'.concat(n.scope,'".'));var i=Ja(function(){return FI(FI({},t),n.components)}),o=nn(!n.collapsible),s=Wt({});function a(e){return!e.visible||e.visible(r)}function l(e){e.key;var t=e.type,i=(e.layout,e.visible,e.default,function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,RI));return"languageCondition"===t&&(i.config=r),"customCss"===t&&(i.visible=!0),"lCustomizer"===t&&(i.scope=n.scope),i}return n.fields.forEach(function(e){"separator"===e.type||s[e.key]||(void 0===r[e.key]&&void 0!==e.default&&(r[e.key]=e.default),s[e.key]=Ja({get:function(){return r[e.key]},set:function(t){return r[e.key]=t}}))}),function(e,t){return Ks(),ia("div",{class:K(["trp-settings-box",{"trp-collapsible":n.collapsible}])},[ua("header",{class:"trp-header",onClick:t[0]||(t[0]=function(e){return n.collapsible&&(o.value=!o.value)})},[ua("span",VI,Ce(n.title),1),n.collapsible?(Ks(),ia("svg",{key:0,class:K(["trp-chevron",{open:o.value}]),viewBox:"0 0 20 20",width:"20",height:"20"},NI(t[1]||(t[1]=[ua("path",{d:"M5 6L10 11L15 6L17 7L10 14L3 7L5 6Z",fill:"#9CA1A8"},null,-1)])),2)):Aa("",!0)]),pr(ua("section",WI,[e.$slots.default?uo(e.$slots,"default",{},void 0,void 0,0):Aa("",!0),(Ks(!0),ia(qs,null,lo(n.fields,function(e,t){return Ks(),ia(qs,{key:e.key||"".concat(e.type,"-").concat(t)},["separator"===e.type&&a(e)?(Ks(),ia("div",zI)):a(e)?(Ks(),oa(io(i.value[e.type]),xa({key:1,modelValue:s[e.key],"onUpdate:modelValue":function(t){return s[e.key]=t}},{ref_for:!0},l(e),{class:["trp-field",e.hasOwnProperty("layout")?"trp-field--column":"trp-field--row"]}),null,16,["modelValue","onUpdate:modelValue","class"])):Aa("",!0)],64)}),128)),uo(e.$slots,"end")],512),[[Il,o.value]])],2)}}};var HI=n(928),qI={insert:"head",singleton:!1};uf()()(HI.A,qI);HI.A.locals;const UI=(0,i().A)(QI,[["__scopeId","data-v-7483c948"]]);function YI(e){return function(e){if(Array.isArray(e))return XI(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return XI(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?XI(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function XI(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var JI={key:0,class:"trp-actions-overlay"},GI={class:"trp-settings-actions"},KI=["disabled"],ZI={key:1},eN={key:2},tN=["disabled","title"],nN={width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{"margin-right":"6px","vertical-align":"middle"}},rN={key:0,class:"trp-save-ls-error"},iN={key:0,class:"trp-revert-confirm"},oN={class:"trp-revert-text trp-primary-text"},sN={class:"trp-revert-actions"};const aN={__name:"SettingsActions",props:{persistenceKey:{type:String,default:"settingsPersistence"}},setup:function(e){var t=e,n=gr(t.persistenceKey);if(!n)throw new Error('SettingsActions could not find persistence provider "'.concat(t.persistenceKey,'".'));var r=n.save,i=n.revert,o=n.isDirty,s=n.saving,a=n.justSaved,l=n.errorMsg,c=nn(!1);function d(){c.value=!0}function u(){c.value=!1}function p(){i(),c.value=!1}var h={saving:(0,df.__)("Saving...","translatepress-multilingual"),saved:(0,df.__)("Saved!","translatepress-multilingual"),saveChanges:(0,df.__)("Save changes","translatepress-multilingual"),revertTitle:(0,df.__)("Revert to last saved values","translatepress-multilingual"),revertChanges:(0,df.__)("Revert changes","translatepress-multilingual"),revertConfirmText:(0,df.__)("Restoring will revert to the last saved version and discard your current edits.","translatepress-multilingual"),revertBtn:(0,df.__)("Revert","translatepress-multilingual"),cancelBtn:(0,df.__)("Keep editing","translatepress-multilingual")};return function(e,t){return Ks(),ia(qs,null,[(Ks(),oa(Ir,{to:"body"},[c.value?(Ks(),ia("div",JI)):Aa("",!0)])),ua("div",GI,[ua("button",{class:"trp-submit-btn",type:"button",disabled:!ln(o)||ln(s),onClick:t[0]||(t[0]=function(){return ln(r)&&ln(r).apply(void 0,arguments)})},[ln(s)?(Ks(),ia(qs,{key:0},[t[1]||(t[1]=ua("span",{class:"trp-save-spinner"},null,-1)),ua("span",null,Ce(h.saving),1)],64)):ln(a)?(Ks(),ia("span",ZI,Ce(h.saved),1)):(Ks(),ia("span",eN,Ce(h.saveChanges),1))],8,KI),ua("button",{class:"trp-button-secondary",type:"button",disabled:!ln(o)||ln(s),title:h.revertTitle,onClick:d},[(Ks(),ia("svg",nN,YI(t[2]||(t[2]=[ua("path",{d:"M7.1752 0.713867C10.7452 0.713867 13.3002 3.54187 13.3002 7.01387C13.3002 10.4859 10.7452 13.3139 7.1752 13.3139C4.9352 13.3139 2.9612 12.2009 1.7992 10.5209L3.6122 9.45687C4.3822 10.5069 5.6142 11.2139 7.0002 11.2139C9.3102 11.2139 11.2002 9.26087 11.2002 7.01387C11.2002 4.76687 9.3102 2.81387 7.0002 2.81387C5.6212 2.81387 4.3962 3.51387 3.6262 4.55687L4.9002 5.61387L0.700195 7.01387V2.11387L2.0232 3.21987C3.2062 1.70087 5.0752 0.713867 7.1752 0.713867Z",fill:"#2271B1"},null,-1)])))),ma(" "+Ce(h.revertChanges),1)],8,tN),ln(l)?(Ks(),ia("span",rN,Ce(ln(l)),1)):Aa("",!0)]),(Ks(),oa(Ir,{to:"body"},[pa(bl,{name:"fade"},{default:ur(function(){return[c.value?(Ks(),ia("div",iN,[ua("p",oN,Ce(h.revertConfirmText),1),ua("div",sN,[ua("button",{class:"trp-btn-revert trp-submit-btn",onClick:p},Ce(h.revertBtn),1),ua("span",{class:"trp-btn-cancel",onClick:u},Ce(h.cancelBtn),1)])])):Aa("",!0)]}),_:1})]))],64)}}};var lN=n(508),cN={insert:"head",singleton:!1};uf()()(lN.A,cN);lN.A.locals;const dN=(0,i().A)(aN,[["__scopeId","data-v-0d9f66ef"]]);function uN(e){return uN="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},uN(e)}function pN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function hN(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pN(Object(n),!0).forEach(function(t){fN(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pN(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function fN(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=uN(e)||!e)return e;var n;if("undefined"!=typeof Symbol&&void 0!==(n=e[Symbol.toPrimitive])){var r=n.call(e,t||"default");if("object"!=uN(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==uN(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var gN={class:"trp-preset-applier"},mN={key:0,class:"trp-confirmation-dialog"},vN=["innerHTML"],AN={class:"trp-primary-text trp-confirmation-overwrite-warning"},bN={class:"trp-dialog-actions"},yN=["onClick"];const CN={__name:"PresetApplier",props:{config:{type:Object,required:!0},presets:{type:Array,required:!0},previewComponent:{type:[Object,Function],required:!0},previewProps:{type:Object,default:function(){return{}}},previewConfigProp:{type:String,default:"config"},getPreviewStyle:{type:Function,default:null},getPreviewProps:{type:Function,default:null},applyPreset:{type:Function,default:null},labels:{type:Object,default:function(){return{}}}},setup:function(e){var t=e,n={confirmTitleHtml:(0,df.__)("Are you sure you want to apply the <strong>%s</strong> preset?","translatepress-multilingual"),confirmOverwrite:(0,df.__)("It will override your current settings.","translatepress-multilingual"),applyPreset:(0,df.__)("Apply preset","translatepress-multilingual"),cancel:(0,df.__)("Cancel","translatepress-multilingual"),applyPresetWithName:(0,df.__)("Apply %s preset","translatepress-multilingual")},r=Ja(function(){return hN(hN({},n),t.labels)}),i=nn(null);function o(e){return hN(hN({},t.config),e.settings||{})}function s(e){return t.getPreviewStyle?t.getPreviewStyle(e.settings||{},e):{}}function a(e){if(t.getPreviewProps)return t.getPreviewProps(o(e),e);var n=hN({},t.previewProps);return t.previewConfigProp&&(n[t.previewConfigProp]=o(e)),n}function l(e){return e.previewBackground||"#DBDBDB"}function c(){i.value=null}function d(){i.value&&(t.applyPreset?t.applyPreset(i.value,t.config):Object.assign(t.config,i.value.settings||{}),i.value=null)}return function(t,n){return Ks(),ia("div",gN,[(Ks(!0),ia(qs,null,lo(e.presets,function(t){return Ks(),ia("div",{key:t.id,class:"trp-preset-card",style:U(s(t))},[ua("div",{class:"trp-preview-rect",style:U({background:l(t)})},[(Ks(),oa(io(e.previewComponent),xa({ref_for:!0},a(t)),null,16)),i.value&&i.value.id===t.id?(Ks(),ia("div",mN,[ua("p",{class:"trp-primary-text",innerHTML:ln(df.sprintf)(r.value.confirmTitleHtml,t.name)},null,8,vN),ua("p",AN,Ce(r.value.confirmOverwrite),1),ua("div",bN,[ua("button",{type:"button",class:"trp-confirm-button",onClick:d},Ce(r.value.applyPreset),1),ua("button",{type:"button",class:"trp-description-text trp-cancel-button",onClick:c},Ce(r.value.cancel),1)])])):Aa("",!0)],4),ua("button",{type:"button",class:"trp-apply-btn",onClick:function(e){return function(e){i.value=e}(t)}},Ce(ln(df.sprintf)(r.value.applyPresetWithName,t.name)),9,yN)],4)}),128))])}}};var xN=n(771),wN={insert:"head",singleton:!1};uf()()(xN.A,wN);xN.A.locals;const kN=(0,i().A)(CN,[["__scopeId","data-v-62b01e94"]]);function SN(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,s,a=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ON(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ON(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ON(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function _N(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof a?r:a,c=Object.create(l.prototype);return BN(c,"_invoke",function(n,r,i){var o,a,l,c=0,d=i||[],u=!1,p={p:0,n:0,v:e,a:h,f:h.bind(e,4),d:function(t,n){return o=t,a=0,l=e,p.n=n,s}};function h(n,r){for(a=n,l=r,t=0;!u&&c&&!i&&t<d.length;t++){var i,o=d[t],h=p.p,f=o[2];n>3?(i=f===r)&&(l=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=e):o[0]<=h&&((i=n<2&&h<o[1])?(a=0,p.v=r,p.n=o[1]):h<f&&(i=n<3||o[0]>r||r>f)&&(o[4]=n,o[5]=r,p.n=f,a=0))}if(i||n>1)return s;throw u=!0,r}return function(i,d,f){if(c>1)throw TypeError("Generator is already running");for(u&&1===d&&h(d,f),a=d,l=f;(t=a<2?e:l)||!u;){o||(a?(a>1&&(p.n=a<3?-1:l),h(a,l)):p.v=l);try{if(c=2,o){if(a||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,a<2&&(a=0)}else 1===a&&(t=o.return)&&t.call(o),a<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=e}else if((t=(u=p.n<0)?l:n.call(r,p))!==s)break}catch(t){o=e,a=1,l=t}finally{c=1}}return{value:t,done:u}}}(n,i,o),!0),c}var s={};function a(){}function l(){}function c(){}t=Object.getPrototypeOf;var d=[][r]?t(t([][r]())):(BN(t={},r,function(){return this}),t),u=c.prototype=a.prototype=Object.create(d);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,BN(e,i,"GeneratorFunction")),e.prototype=Object.create(u),e}return l.prototype=c,BN(u,"constructor",c),BN(c,"constructor",l),l.displayName="GeneratorFunction",BN(c,i,"GeneratorFunction"),BN(u),BN(u,i,"Generator"),BN(u,r,function(){return this}),BN(u,"toString",function(){return"[object Generator]"}),(_N=function(){return{w:o,m:p}})()}function BN(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}BN=function(e,t,n,r){function o(t,n){BN(e,t,function(e){return this._invoke(t,n,e)})}t?i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(o("next",0),o("throw",1),o("return",2))},BN(e,t,n,r)}function EN(e,t,n,r,i,o,s){try{var a=e[o](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,i)}function TN(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function s(e){EN(o,r,i,s,a,"next",e)}function a(e){EN(o,r,i,s,a,"throw",e)}s(void 0)})}}var MN=(0,df.__)("Save failed","translatepress-multilingual");var DN=["src"],PN={key:1,class:"trp-language-item-name"},RN=["src"];const IN={__name:"LanguageItem",props:{language:{type:Object,required:!0},dropdown:{type:Boolean,default:!1},flagPos:String,nameMode:String,flagAspectRatio:String},setup:function(e){var t,n,r=e,i=gr("languageItemSettings"),o=(null===(t=window)||void 0===t||null===(t=t.tpLangSwitcherData)||void 0===t||null===(t=t.misc)||void 0===t?void 0:t.pluginUrl)||(null===(n=window)||void 0===n||null===(n=n.tpAldConfiguratorData)||void 0===n||null===(n=n.misc)||void 0===n?void 0:n.pluginUrl)||"",s=Ja(function(){var e,t;return null!==(e=null!==(t=r.flagPos)&&void 0!==t?t:null==i?void 0:i.value.flagPos)&&void 0!==e?e:"before"}),a=Ja(function(){var e,t;return null!==(e=null!==(t=r.nameMode)&&void 0!==t?t:null==i?void 0:i.value.nameMode)&&void 0!==e?e:"full"}),l=Ja(function(){return"hide"!==s.value}),c=Ja(function(){return"none"!==a.value}),d=Ja(function(){return"before"===s.value}),u=Ja(function(){return"after"===s.value}),p=Ja(function(){var e,t;return"square"===(null!==(e=r.flagAspectRatio)&&void 0!==e?e:null==i||null===(t=i.value.flagRatio)||void 0===t?void 0:t.value)?"1x1":"4x3"}),h=Ja(function(){var e,t,n;if(!l.value)return null;if(r.language.flagPath)return r.language.flagPath;var i=null!==(e=null!==(t=null!==(n=r.language.locale)&&void 0!==n?n:r.language.code)&&void 0!==t?t:r.language.slug)&&void 0!==e?e:"",s=String(i).trim();if(!s||!o)return null;var a=s.replace(/-/g,"_")+".svg";return"".concat(o,"assets/flags/").concat(p.value,"/").concat(encodeURIComponent(a))}),f=Ja(function(){return"short"===a.value?r.language.shortName:r.language.name});return function(t,n){return Ks(),ia("a",{class:K(["trp-language-item",{"trp-dropdown-item":e.dropdown}])},[d.value&&l.value?(Ks(),ia(qs,{key:0},[h.value?(Ks(),ia("img",{key:0,src:h.value,class:"trp-flag-image","aria-hidden":"true",loading:"lazy",decoding:"async"},null,8,DN)):Aa("",!0)],64)):Aa("",!0),c.value?(Ks(),ia("span",PN,Ce(f.value),1)):Aa("",!0),u.value&&l.value?(Ks(),ia(qs,{key:2},[h.value?(Ks(),ia("img",{key:0,src:h.value,class:"trp-flag-image","aria-hidden":"true",loading:"lazy",decoding:"async"},null,8,RN)):Aa("",!0)],64)):Aa("",!0)],2)}}};var NN=n(698),LN={insert:"head",singleton:!1};uf()()(NN.A,LN);NN.A.locals;const $N=(0,i().A)(IN,[["__scopeId","data-v-dbc28902"]]);function FN(e){return FN="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},FN(e)}function jN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function VN(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=FN(e)||!e)return e;var n;if("undefined"!=typeof Symbol&&void 0!==(n=e[Symbol.toPrimitive])){var r=n.call(e,t||"default");if("object"!=FN(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==FN(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function WN(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,s,a=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return zN(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?zN(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function zN(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var QN={class:"trp-language-switcher trp-ls-dropdown trp-shortcode-switcher trp-shortcode-anchor trp-open-on-hover trp-ald-language-selector","aria-hidden":"true",inert:""},HN={class:"trp-current-language-item__wrapper"},qN=["aria-label"],UN={class:"trp-language-switcher-inner"},YN={class:"trp-current-language-item__wrapper"},XN=["aria-label"];const JN={__name:"AldLanguageSelector",props:{languages:{type:[Array,Object],default:function(){return[]}},config:{type:Object,default:function(){return{}}},compact:{type:Boolean,default:!1},maxDropdownItems:{type:Number,default:2}},setup:function(e){var t=e,n=Ja(function(){var e;if(Array.isArray(t.languages))return t.languages;var n=(null===(e=t.languages)||void 0===e?void 0:e.published)||t.languages||{};return Object.entries(n).map(function(e){var t=WN(e,2);return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?jN(Object(n),!0).forEach(function(t){VN(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jN(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({code:t[0]},t[1])})}),r=Ja(function(){var e=n.value.filter(Boolean),r=Math.max(2,(t.compact?2:t.maxDropdownItems)+1);return e.length?e.slice(0,r):[{code:"en_US",name:(0,df.__)("English","translatepress-multilingual"),shortName:"EN"},{code:"es_ES",name:(0,df.__)("Spanish","translatepress-multilingual"),shortName:"ES"},{code:"fr_FR",name:(0,df.__)("French","translatepress-multilingual"),shortName:"FR"}].slice(0,r)}),i=Ja(function(){return r.value[0]}),o=Ja(function(){return r.value.slice(1)}),s=nn(!1),a="trp-ald-preview-language-list-".concat(Math.random().toString(36).slice(2,9)),l=(0,df.__)("Website language selector","translatepress-multilingual"),c=(0,df.__)("Change language","translatepress-multilingual"),d=(0,df.__)("Available languages","translatepress-multilingual"),u=Ja(function(){return!1===t.config.aldSwitcherShowFlags?"hide":"before"}),p=Ja(function(){return t.config.aldSwitcherLanguageNames||"full"}),h=Ja(function(){return t.config.aldSwitcherFlagShape||"rect"}),f=Ja(function(){var e,n,r;return{"--trp-ald-switcher-bg":t.config.aldSwitcherBackgroundColor||"#ffffff","--trp-ald-switcher-bg-hover":t.config.aldSwitcherBackgroundHoverColor||t.config.buttonBackgroundColor||"#143852","--trp-ald-switcher-text":t.config.aldSwitcherTextColor||t.config.textColor||"#143852","--trp-ald-switcher-text-hover":t.config.aldSwitcherTextHoverColor||t.config.buttonTextColor||"#ffffff","--trp-ald-switcher-border":t.config.aldSwitcherBorderColor||t.config.borderColor||"#14385233","--trp-ald-switcher-border-width":"".concat(null!==(e=t.config.aldSwitcherBorderWidth)&&void 0!==e?e:1,"px"),"--trp-ald-switcher-radius":"".concat(null!==(n=t.config.aldSwitcherBorderRadius)&&void 0!==n?n:5,"px"),"--flag-radius":"".concat(null!==(r=t.config.aldSwitcherFlagRadius)&&void 0!==r?r:2,"px"),"--aspect-ratio":"square"===h.value?"1/1":"4/3"}}),g=function(){s.value=!0},m=function(){s.value=!1},v=function(e){e.currentTarget.contains(e.relatedTarget)||m()},A=function(e){if("Enter"===e.key||" "===e.key)return e.preventDefault(),void(s.value=!s.value);if("ArrowDown"===e.key){e.preventDefault();var t=e.currentTarget;return g(),void requestAnimationFrame(function(){var e,n;null===(e=t.closest(".trp-ald-language-selector"))||void 0===e||null===(e=e.querySelector(".trp-switcher-dropdown-list .trp-language-item"))||void 0===e||null===(n=e.focus)||void 0===n||n.call(e,{preventScroll:!0})})}"Escape"===e.key&&(e.preventDefault(),m())},b=function(e){var t,n;"Escape"===e.key&&(e.preventDefault(),m(),null===(t=e.currentTarget.closest(".trp-ald-language-selector"))||void 0===t||null===(t=t.querySelector(".trp-ls-shortcode-current-language, .trp-language-item__current"))||void 0===t||null===(n=t.focus)||void 0===n||n.call(t,{preventScroll:!0}))};return function(e,n){return Ks(),ia("div",{class:K(["trp-shortcode-switcher__wrapper trp-ald-language-selector-wrapper",{"trp-ald-language-selector-wrapper--compact":t.compact}]),style:U(f.value),onMouseenter:g,onMouseleave:m,onFocusout:v},[ua("div",QN,[ua("div",HN,[i.value?(Ks(),oa($N,{key:0,language:i.value,dropdown:!1,class:"trp-language-item__default trp-language-item__current","flag-pos":u.value,"name-mode":p.value,"flag-aspect-ratio":h.value},null,8,["language","flag-pos","name-mode","flag-aspect-ratio"])):Aa("",!0),n[0]||(n[0]=ua("svg",{class:"trp-shortcode-arrow",width:"20",height:"20",viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false"},[ua("path",{d:"M5 8L10 13L15 8",stroke:"var(--text)","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1))])]),ua("div",{class:K(["trp-language-switcher trp-ls-dropdown trp-shortcode-switcher trp-shortcode-overlay trp-open-on-hover trp-ald-language-selector",{"is-open":s.value}]),role:"navigation","aria-label":ln(l)},[ua("div",UN,[ua("div",YN,[i.value?(Ks(),oa($N,{key:0,language:i.value,dropdown:!1,class:"trp-language-item__default trp-language-item__current",role:"button",tabindex:"0","aria-expanded":String(s.value),"aria-label":ln(c),"aria-controls":a,onKeydown:A,"flag-pos":u.value,"name-mode":p.value,"flag-aspect-ratio":h.value},null,8,["language","aria-expanded","aria-label","flag-pos","name-mode","flag-aspect-ratio"])):Aa("",!0),n[1]||(n[1]=ua("svg",{class:"trp-shortcode-arrow",width:"20",height:"20",viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false"},[ua("path",{d:"M5 8L10 13L15 8",stroke:"var(--text)","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1))]),ua("div",{id:a,class:"trp-switcher-dropdown-list",role:"listbox","aria-label":ln(d)},[(Ks(!0),ia(qs,null,lo(o.value,function(e){return Ks(),oa($N,{key:e.code,language:e,dropdown:!0,role:"option",tabindex:"0","aria-selected":"false",onKeydown:b,"flag-pos":u.value,"name-mode":p.value,"flag-aspect-ratio":h.value},null,8,["language","flag-pos","name-mode","flag-aspect-ratio"])}),128))],8,XN)])],10,qN)],38)}}};var GN=n(347),KN={insert:"head",singleton:!1};uf()()(GN.A,KN);GN.A.locals;const ZN=(0,i().A)(JN,[["__scopeId","data-v-7ee6f04c"]]);function eL(e){return function(e){if(Array.isArray(e))return tL(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return tL(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?tL(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tL(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var nL={key:0,class:"trp-ald-preview__empty"},rL={key:1,class:"trp-ald-preview__overlay"},iL=["innerHTML"],oL={class:"trp-ald-preview__controls"},sL={type:"button",class:"trp-ald-preview__button"},aL={type:"button",class:"trp-ald-preview__close"},lL={class:"trp-ald-preview__close-text"},cL={key:2,class:"trp-ald-preview__bar-stage"},dL=["innerHTML"],uL={class:"trp-ald-preview__bar-controls"},pL={type:"button",class:"trp-ald-preview__button"},hL=["aria-label"];const fL={__name:"PopupPreview",props:{config:{type:Object,required:!0},emptyPreviewText:{type:String,default:""},backgroundImage:{type:String,default:""},compact:{type:Boolean,default:!1},languages:{type:[Array,Object],default:function(){return[]}}},setup:function(e){var t=e,n=Ja(function(){var e;return{"--trp-ald-preview-bg":t.config.backgroundColor,"--trp-ald-preview-text":t.config.textColor,"--trp-ald-preview-button-bg":t.config.buttonBackgroundColor,"--trp-ald-preview-button-border":t.config.buttonBorderColor||t.config.buttonBackgroundColor,"--trp-ald-preview-button-hover":t.config.buttonHoverColor,"--trp-ald-preview-button-text":t.config.buttonTextColor,"--trp-ald-preview-button-hover-text":t.config.buttonHoverTextColor||t.config.buttonTextColor,"--trp-ald-preview-button-radius":"".concat(null!==(e=t.config.buttonBorderRadius)&&void 0!==e?e:3,"px"),"--trp-ald-preview-close":t.config.closeTextColor,"--trp-ald-preview-border":t.config.borderColor,"--trp-ald-preview-border-width":"".concat(t.config.borderWidth||0,"px"),"--trp-ald-preview-radius":"".concat(t.config.borderRadius||0,"px"),"--trp-ald-preview-overlay":t.config.overlayColor,"--trp-ald-preview-bg-image":t.backgroundImage}}),r=Ja(function(){return"hello_bar"===t.config.popup_type}),i=Ja(function(){return"popup"===t.config.popup_option}),o=(0,df.__)("Close","translatepress-multilingual"),s=nn(0),a=Ja(function(){return t.compact||!1===t.config.popupAnimationEnabled?"trp-ald-animation-none":"trp-ald-animation-".concat(t.config.popupAnimation||"fade")});return xr(function(){return[t.config.popupAnimationEnabled,t.config.popupAnimation,t.config.popup_type,t.config.popup_option]},function(){s.value+=1}),function(l,c){return Ks(),ia("div",{class:K(["trp-ald-preview",{"is-hello-bar":r.value,"is-compact":t.compact}]),style:U(n.value)},[i.value?r.value?(Ks(),ia("div",cL,[(Ks(),ia("div",{key:"bar-".concat(s.value),class:K(["trp-ald-preview__bar trp-ald-preview__animated",a.value])},[ua("div",{class:"trp-ald-preview__text",innerHTML:e.config.popup_textarea},null,8,dL),ua("div",uL,[pa(ZN,{languages:t.languages,config:t.config,compact:t.compact},null,8,["languages","config","compact"]),ua("button",pL,Ce(e.config.popup_textarea_button),1),ua("button",{type:"button",class:"trp-ald-preview__bar-close","aria-label":ln(o)},eL(c[1]||(c[1]=[ua("span",{class:"trp-ald-preview__bar-close-icon","aria-hidden":"true"},null,-1)])),8,hL)])],2))])):(Ks(),ia("div",rL,[(Ks(),ia("div",{key:"popup-".concat(s.value),class:K(["trp-ald-preview__popup trp-ald-preview__animated",a.value])},[ua("div",{class:"trp-ald-preview__text",innerHTML:e.config.popup_textarea},null,8,iL),ua("div",oL,[pa(ZN,{languages:t.languages,config:t.config,compact:t.compact},null,8,["languages","config","compact"]),ua("button",sL,Ce(e.config.popup_textarea_button),1)]),ua("button",aL,[c[0]||(c[0]=ua("span",{class:"trp-ald-preview__close-icon-before","aria-hidden":"true"},null,-1)),ua("span",lL,Ce(e.config.popup_textarea_close_button),1)])],2))])):(Ks(),ia("div",nL,Ce(e.emptyPreviewText),1))],6)}}};var gL=n(829),mL={insert:"head",singleton:!1};uf()()(gL.A,mL);gL.A.locals;const vL=(0,i().A)(fL,[["__scopeId","data-v-6b734473"]]);var AL=[{id:"default",name:(0,df.__)("Default","translatepress-multilingual"),settings:{backgroundColor:"#ffffff",textColor:"#143852",buttonBackgroundColor:"#143852",buttonBorderColor:"#143852",buttonHoverColor:"#0f2a3d",buttonTextColor:"#ffffff",buttonHoverTextColor:"#ffffff",closeTextColor:"#143852",aldSwitcherBackgroundColor:"#ffffff",aldSwitcherBackgroundHoverColor:"#143852",aldSwitcherTextColor:"#143852",aldSwitcherTextHoverColor:"#ffffff",aldSwitcherBorderColor:"#14385233",aldSwitcherBorderWidth:1,aldSwitcherBorderRadius:5,borderColor:"#1438521A",borderWidth:1,borderRadius:4,overlayColor:"#00000080",popupAnimationEnabled:!0,popupAnimation:"fade"}},{id:"minimal-light",name:(0,df.__)("Minimal Light","translatepress-multilingual"),settings:{backgroundColor:"#ffffff",textColor:"#1D2327",buttonBackgroundColor:"#1D2327",buttonBorderColor:"#1D2327",buttonHoverColor:"#3C434A",buttonTextColor:"#ffffff",buttonHoverTextColor:"#ffffff",closeTextColor:"#50575E",aldSwitcherBackgroundColor:"#ffffff",aldSwitcherBackgroundHoverColor:"#3C434A",aldSwitcherTextColor:"#1D2327",aldSwitcherTextHoverColor:"#ffffff",aldSwitcherBorderColor:"#DCDCDE",aldSwitcherBorderWidth:1,aldSwitcherBorderRadius:2,borderColor:"#DCDCDE",borderWidth:1,borderRadius:2,overlayColor:"#F0F0F199"}},{id:"dark-overlay",name:(0,df.__)("Dark Overlay","translatepress-multilingual"),settings:{backgroundColor:"#1D2327",textColor:"#ffffff",buttonBackgroundColor:"#2271B1",buttonBorderColor:"#2271B1",buttonHoverColor:"#135E96",buttonTextColor:"#ffffff",buttonHoverTextColor:"#ffffff",closeTextColor:"#C3C4C7",borderColor:"#3C434A",aldSwitcherBackgroundColor:"#ffffff",aldSwitcherBackgroundHoverColor:"#2271B1",aldSwitcherTextColor:"#1D2327",aldSwitcherTextHoverColor:"#ffffff",aldSwitcherBorderColor:"#6B7280",aldSwitcherBorderWidth:1,aldSwitcherBorderRadius:6,borderWidth:1,borderRadius:6,overlayColor:"#000000B3"}},{id:"brand-blue",name:(0,df.__)("Brand Blue","translatepress-multilingual"),settings:{backgroundColor:"#F6FBFF",textColor:"#143852",buttonBackgroundColor:"#2271B1",buttonBorderColor:"#0A7CC2",buttonHoverColor:"#135E96",buttonTextColor:"#ffffff",buttonHoverTextColor:"#ffffff",closeTextColor:"#2271B1",aldSwitcherBackgroundColor:"#ffffff",aldSwitcherBackgroundHoverColor:"#135E96",aldSwitcherTextColor:"#143852",aldSwitcherTextHoverColor:"#ffffff",aldSwitcherBorderColor:"#8BC5F0",aldSwitcherBorderWidth:1,aldSwitcherBorderRadius:8,borderColor:"#8BC5F0",borderWidth:1,borderRadius:8,overlayColor:"#14385266"}},{id:"bordered",name:(0,df.__)("Bordered","translatepress-multilingual"),settings:{backgroundColor:"#ffffff",textColor:"#143852",buttonBackgroundColor:"#ffffff",buttonBorderColor:"#0F2A3D",buttonHoverColor:"#143852",buttonTextColor:"#143852",buttonHoverTextColor:"#ffffff",closeTextColor:"#143852",aldSwitcherBackgroundColor:"#ffffff",aldSwitcherBackgroundHoverColor:"#0F2A3D",aldSwitcherTextColor:"#0F2A3D",aldSwitcherTextHoverColor:"#ffffff",aldSwitcherBorderColor:"#0F2A3D",aldSwitcherBorderWidth:1,aldSwitcherBorderRadius:3,borderColor:"#143852",borderWidth:2,borderRadius:0,overlayColor:"#FFFFFFCC"}},{id:"transparent",name:(0,df.__)("Transparent","translatepress-multilingual"),settings:{backgroundColor:"#FFFFFFE6",textColor:"#1D2327",buttonBackgroundColor:"#1D2327",buttonBorderColor:"#000000",buttonHoverColor:"#000000",buttonTextColor:"#ffffff",buttonHoverTextColor:"#ffffff",closeTextColor:"#50575E",aldSwitcherBackgroundColor:"#ffffff",aldSwitcherBackgroundHoverColor:"#000000",aldSwitcherTextColor:"#1D2327",aldSwitcherTextHoverColor:"#ffffff",aldSwitcherBorderColor:"#1D232733",aldSwitcherBorderWidth:1,aldSwitcherBorderRadius:8,borderColor:"#FFFFFF99",borderWidth:1,borderRadius:8,overlayColor:"#00000033"}}];function bL(e){return bL="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bL(e)}function yL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function CL(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yL(Object(n),!0).forEach(function(t){xL(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yL(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function xL(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=bL(e)||!e)return e;var n;if("undefined"!=typeof Symbol&&void 0!==(n=e[Symbol.toPrimitive])){var r=n.call(e,t||"default");if("object"!=bL(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==bL(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wL(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,s,a=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return kL(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?kL(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function kL(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var SL={class:"trp-ald-configurator"},OL={class:"trp-ald-configurator__main"},_L={class:"trp-ald-configurator__left"},BL={class:"trp-ald-sticky-box"},EL={class:"trp-ald-configurator__right"},TL=["innerHTML"],ML=["innerHTML"];const DL={__name:"App",setup:function(e){var t=window.tpAldConfiguratorData||{},n=Wt(t.config||{}),r=Ja(function(){var e;return"url(".concat((null===(e=t.misc)||void 0===e?void 0:e.pluginUrl)||"","assets/images/switcher-preview-bg.png)")}),i=Ja(function(){return t.languages||{}}),o=function(e,t){var n=t.action,r=t.nonce,i=t.extraBody,o=void 0===i?function(){return{}}:i,s=t.onSaved,a=void 0===s?null:s,l=nn({});qi(TN(_N().m(function t(){return _N().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,qn();case 1:l.value=structuredClone(Gt(e));case 2:return t.a(2)}},t)})));var c=Ja(function(){return JSON.stringify(e)!==JSON.stringify(l.value)}),d=nn(!1),u=nn(!1),p=nn("");function h(e){c.value&&(e.preventDefault(),e.returnValue="")}function f(){return f=TN(_N().m(function t(){var i,s,c,h;return _N().w(function(t){for(;;)switch(t.p=t.n){case 0:return d.value=!0,p.value="",t.p=1,(i=new FormData).append("action",n),i.append("nonce",r),i.append("config",JSON.stringify(e)),Object.entries(o()).forEach(function(e){var t=SN(e,2),n=t[0],r=t[1];i.append(n,r)}),t.n=2,fetch(ajaxurl,{method:"POST",credentials:"same-origin",body:i});case 2:if((s=t.v).ok){t.n=3;break}throw new Error("HTTP ".concat(s.status));case 3:return t.n=4,s.json();case 4:if(!(c=t.v)||!1!==c.success){t.n=5;break}throw new Error(c.data||MN);case 5:l.value=structuredClone(Gt(e)),"function"==typeof a&&a(c),u.value=!0,setTimeout(function(){u.value=!1},2e3),t.n=7;break;case 6:t.p=6,h=t.v,p.value=h.message||MN;case 7:return t.p=7,d.value=!1,t.f(7);case 8:return t.a(2)}},t,null,[[1,6,7,8]])})),f.apply(this,arguments)}return xr(c,function(e){e?window.addEventListener("beforeunload",h):window.removeEventListener("beforeunload",h)},{immediate:!0}),{save:function(){return f.apply(this,arguments)},revert:function(){Object.assign(e,structuredClone(Gt(l.value)))},saving:d,justSaved:u,errorMsg:p,isDirty:c}}(n,{action:"trp_ald_popup_config_save",nonce:t.nonce});fr("settingsPersistence",o);var s={preview:(0,df.__)("Popup Preview","translatepress-multilingual"),detectionMethod:(0,df.__)("User Language Detection Method","translatepress-multilingual"),notificationBehavior:(0,df.__)("Notification Behavior","translatepress-multilingual"),popupContent:(0,df.__)("Popup Content","translatepress-multilingual"),applyPreset:(0,df.__)("Apply a preset","translatepress-multilingual"),languageSwitcher:(0,df.__)("Language Switcher","translatepress-multilingual"),customizeDesign:(0,df.__)("Customize Design","translatepress-multilingual"),languageDetection:(0,df.__)("Language detection","translatepress-multilingual"),detectionDescription:(0,df.__)("Select how the language should be detected for first time visitors.<br>The visitor's last displayed language will be remembered through cookies.","translatepress-multilingual"),popupDisplay:(0,df.__)("Popup display","translatepress-multilingual"),popupLanguages:(0,df.__)("Conditionally display popup based on language","translatepress-multilingual"),contentRestrictionMode:(0,df.__)("Content Restriction Mode","translatepress-multilingual"),include:(0,df.__)("Include","translatepress-multilingual"),exclude:(0,df.__)("Exclude","translatepress-multilingual"),selectLanguage:(0,df.__)("Select language","translatepress-multilingual"),noLanguagesSelected:(0,df.__)("No languages selected","translatepress-multilingual"),popupType:(0,df.__)("Popup Type","translatepress-multilingual"),noPopupPreview:(0,df.__)("Visitors will be redirected directly when a different preferred language is detected.","translatepress-multilingual"),popupText:(0,df.__)("Popup Text","translatepress-multilingual"),buttonText:(0,df.__)("Button Text","translatepress-multilingual"),closeButtonText:(0,df.__)("Close Button Text","translatepress-multilingual"),backgroundColor:(0,df.__)("Background color","translatepress-multilingual"),textColor:(0,df.__)("Text color","translatepress-multilingual"),buttonBackgroundColor:(0,df.__)("Button background color","translatepress-multilingual"),buttonHoverColor:(0,df.__)("Button hover color","translatepress-multilingual"),buttonTextColor:(0,df.__)("Button text color","translatepress-multilingual"),buttonBorderRadius:(0,df.__)("Button border radius","translatepress-multilingual"),closeTextColor:(0,df.__)("Close icon color","translatepress-multilingual"),borderColor:(0,df.__)("Border color","translatepress-multilingual"),borderWidth:(0,df.__)("Border width","translatepress-multilingual"),borderRadius:(0,df.__)("Border radius","translatepress-multilingual"),overlayColor:(0,df.__)("Overlay color","translatepress-multilingual"),entranceAnimation:(0,df.__)("Entrance animation","translatepress-multilingual"),animation:(0,df.__)("Animation","translatepress-multilingual"),fade:(0,df.__)("Fade","translatepress-multilingual"),slideTop:(0,df.__)("Slide from top","translatepress-multilingual"),slideRight:(0,df.__)("Slide from right","translatepress-multilingual"),slideBottom:(0,df.__)("Slide from bottom","translatepress-multilingual"),slideLeft:(0,df.__)("Slide from left","translatepress-multilingual"),customCss:(0,df.__)("Enable custom CSS","translatepress-multilingual"),languageNames:(0,df.__)("Language names","translatepress-multilingual"),fullNames:(0,df.__)("Full names","translatepress-multilingual"),shortNames:(0,df.__)("Short names","translatepress-multilingual"),noNames:(0,df.__)("No names","translatepress-multilingual"),showFlags:(0,df.__)("Show flags","translatepress-multilingual"),flagShape:(0,df.__)("Flag shape","translatepress-multilingual"),rectangle:(0,df.__)("Rectangle (4:3)","translatepress-multilingual"),square:(0,df.__)("Square (1:1)","translatepress-multilingual"),flagRadius:(0,df.__)("Flag border radius","translatepress-multilingual"),switcherBackground:(0,df.__)("Switcher background","translatepress-multilingual"),switcherHoverBackground:(0,df.__)("Switcher hover background","translatepress-multilingual"),switcherText:(0,df.__)("Switcher text","translatepress-multilingual"),switcherHoverText:(0,df.__)("Switcher hover text","translatepress-multilingual"),switcherBorder:(0,df.__)("Switcher border","translatepress-multilingual"),switcherBorderWidth:(0,df.__)("Switcher border width","translatepress-multilingual"),switcherBorderRadius:(0,df.__)("Switcher border radius","translatepress-multilingual")},a=Ja(function(){return t.detectionOptions||[{value:"browser-ip",label:(0,df.__)("First by browser language, then IP address (recommended)","translatepress-multilingual")}]}),l=Ja(function(){return t.popupOptions||[{value:"popup",label:(0,df.__)("A popup appears asking the user if they want to be redirected","translatepress-multilingual")}]}),c=Ja(function(){return t.popupTypeOptions||[{value:"normal_popup",label:(0,df.__)("Pop-up window over the content","translatepress-multilingual")},{value:"hello_bar",label:(0,df.__)("Hello bar before the content","translatepress-multilingual")}]}),d=Ja(function(){var e,n,r=(null===(e=i.value)||void 0===e?void 0:e.published)||{},o=(null===(n=t.misc)||void 0===n?void 0:n.pluginUrl)||"";return Object.entries(r).map(function(e){var t=wL(e,2),n=t[0],r=t[1];return{value:n,label:r.name||n,flagUrl:r.flagPath||"".concat(o,"assets/flags/4x3/").concat(encodeURIComponent(String(n).replace(/-/g,"_")+".svg"))}})}),u=Ja(function(){return[{key:"popup_option",type:"radio",label:s.popupDisplay,options:l.value,layout:"column",visible:function(){return l.value.length>1}},{key:"popup_type",type:"radio",label:s.popupType,options:c.value,layout:"column",visible:function(e){return"popup"===e.popup_option}},{key:"popupLanguageConditionEnabled",type:"languageCondition",label:s.popupLanguages,default:!1,modeKey:"popupLanguageConditionMode",languagesKey:"popup_languages",options:d.value,modeLabel:s.contentRestrictionMode,includeLabel:s.include,excludeLabel:s.exclude,selectLabel:s.selectLanguage,emptyLabel:s.noLanguagesSelected,layout:"column",visible:function(e){return"popup"===e.popup_option}}]});function p(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n,r=CL({},e.settings||{});return"default"===e.id&&"hello_bar"===t.popup_type&&(r.borderWidth=0),r}function h(e,t){Object.assign(t,p(e,t))}function f(e,t){var n=CL(CL({},e),p(t,e));return{emptyPreviewText:s.noPopupPreview,backgroundImage:r.value,compact:!0,languages:i.value,config:n}}var g=Ja(function(){return[{key:"backgroundColor",type:"color",label:s.backgroundColor},{key:"textColor",type:"color",label:s.textColor},{key:"closeTextColor",type:"color",label:s.closeTextColor},{key:"borderColor",type:"color",label:s.borderColor},{key:"borderWidth",type:"number",label:s.borderWidth},{key:"borderRadius",type:"number",label:s.borderRadius},{key:"overlayColor",type:"color",label:s.overlayColor,visible:function(e){return"hello_bar"!==(null==e?void 0:e.popup_type)}},{type:"separator"},{key:"buttonBackgroundColor",type:"color",label:s.buttonBackgroundColor},{key:"buttonHoverColor",type:"color",label:s.buttonHoverColor},{key:"buttonTextColor",type:"color",label:s.buttonTextColor},{key:"buttonBorderRadius",type:"number",label:s.buttonBorderRadius},{type:"separator"},{key:"popupAnimationEnabled",type:"toggle",label:s.entranceAnimation,default:!0},{key:"popupAnimation",type:"select",label:s.animation,default:"fade",options:[{value:"fade",label:s.fade},{value:"slide_top",label:s.slideTop},{value:"slide_right",label:s.slideRight},{value:"slide_bottom",label:s.slideBottom},{value:"slide_left",label:s.slideLeft}],visible:function(e){return!1!==(null==e?void 0:e.popupAnimationEnabled)}},{type:"separator"},{key:"enableCustomCss",type:"toggle",label:s.customCss,default:!1},{key:"customCss",type:"customCss",label:"",scopeSelector:".trp-ald-custom-popup",visible:function(e){return!0===(null==e?void 0:e.enableCustomCss)}}]});return function(e,o){return Ks(),ia("div",SL,[ua("div",OL,[ua("div",_L,[ua("div",BL,[pa(UI,{title:s.preview,config:n},{default:ur(function(){return[pa(vL,{config:n,"empty-preview-text":s.noPopupPreview,"background-image":r.value,languages:i.value},null,8,["config","empty-preview-text","background-image","languages"])]}),_:1},8,["title","config"]),pa(dN)])]),ua("div",EL,[pa(UI,{title:s.notificationBehavior,config:n,fields:u.value},null,8,["title","config","fields"]),"popup"===n.popup_option?(Ks(),oa(UI,{key:0,title:s.popupContent,config:n,style:{"--trp-field-label-width":"160px"},fields:[{key:"popup_textarea",type:"textarea",label:s.popupText},{key:"popup_textarea_button",type:"text",label:s.buttonText},{key:"popup_textarea_close_button",type:"text",label:s.closeButtonText}]},null,8,["title","config","fields"])):Aa("",!0),"popup"===n.popup_option?(Ks(),oa(UI,{key:1,title:s.applyPreset,config:n},{default:ur(function(){return[pa(kN,{config:n,presets:ln(AL),"preview-component":vL,"apply-preset":h,"get-preview-props":f,"preview-props":{emptyPreviewText:s.noPopupPreview,backgroundImage:r.value,compact:!0,languages:i.value}},null,8,["config","presets","preview-props"])]}),_:1},8,["title","config"])):Aa("",!0),"popup"===n.popup_option?(Ks(),oa(UI,{key:2,title:s.languageSwitcher,config:n,collapsible:"",style:{"--trp-field-label-width":"190px"},fields:[{key:"aldSwitcherLanguageNames",type:"radio",label:s.languageNames,default:"full",options:[{value:"full",label:s.fullNames},{value:"short",label:s.shortNames},{value:"none",label:s.noNames}],layout:"column"},{key:"aldSwitcherShowFlags",type:"toggle",label:s.showFlags,default:!0,compact:!0},{key:"aldSwitcherFlagShape",type:"radio",label:s.flagShape,default:"rect",options:[{value:"rect",label:s.rectangle},{value:"square",label:s.square}],layout:"column",visible:function(e){return!1!==(null==e?void 0:e.aldSwitcherShowFlags)}},{key:"aldSwitcherFlagRadius",type:"number",label:s.flagRadius,default:2,visible:function(e){return!1!==(null==e?void 0:e.aldSwitcherShowFlags)}},{type:"separator"},{key:"aldSwitcherBackgroundColor",type:"color",label:s.switcherBackground},{key:"aldSwitcherBackgroundHoverColor",type:"color",label:s.switcherHoverBackground},{key:"aldSwitcherTextColor",type:"color",label:s.switcherText},{key:"aldSwitcherTextHoverColor",type:"color",label:s.switcherHoverText},{type:"separator"},{key:"aldSwitcherBorderColor",type:"color",label:s.switcherBorder},{key:"aldSwitcherBorderWidth",type:"number",label:s.switcherBorderWidth},{key:"aldSwitcherBorderRadius",type:"number",label:s.switcherBorderRadius}]},null,8,["title","config","fields"])):Aa("",!0),"popup"===n.popup_option?(Ks(),oa(UI,{key:3,title:s.customizeDesign,config:n,collapsible:"",style:{"--trp-field-label-width":"190px"},fields:g.value},null,8,["title","config","fields"])):Aa("",!0),pa(UI,{title:s.detectionMethod,config:n,collapsible:"",fields:[{key:"detection-method",type:"radio",label:s.languageDetection,options:a.value,columns:2,layout:"column"}]},{end:ur(function(){return[ua("span",{class:"trp-description-text",innerHTML:s.detectionDescription},null,8,TL),ln(t).ipWarningMessage?(Ks(),ia("div",{key:0,class:"trp-settings-warning",innerHTML:ln(t).ipWarningMessage},null,8,ML)):Aa("",!0)]}),_:1},8,["title","config","fields"])])])])}}};var PL=n(539),RL={insert:"head",singleton:!1};uf()()(PL.A,RL);PL.A.locals;const IL=(0,i().A)(DL,[["__scopeId","data-v-7445ae44"]]);var NL=document.getElementById("tp-ald-popup-configurator-root");NL&&od(IL).mount(NL)},877(e,t,n){"use strict";var r=n(627),i=n.n(r),o=n(798),s=n.n(o)()(i());s.push([e.id,':root{--vc-picker-bg:#f8f8f8;--vc-body-bg:#fff;--vc-input-bg:#fff;--vc-input-text:#333;--vc-input-label:#969696;--vc-input-border:#dadada;--vc-chrome-toggle-btn-highlighted:#eee;--vc-ps-bg:#dcdcdc;--vc-ps-title-bg-gradient-start:#f0f0f0;--vc-ps-title-bg-gradient-end:#d4d4d4;--vc-ps-title-border:#b1b1b1;--vc-ps-title-color:#4d4d4d;--vc-ps-slider-border:#b3b3b3;--vc-ps-slider-border-bottom:#f0f0f0;--vs-ps-picker-border-dark:#555;--vs-ps-picker-border-white:#fff;--vc-ps-btn-gradient-start:#fff;--vc-ps-btn-gradient-end:#e6e6e6;--vc-ps-btn-border:#878787;--vc-ps-btn-shadow:#eaeaea;--vc-ps-btn-color:#000;--vc-ps-preview-border:#000;--vc-ps-label:#000;--vc-ps-input-border:#888;--vc-ps-input-shadow-dark:rgba(0,0,0,.1);--vc-ps-input-shadow-light:#ececec;--vc-sketch-input-label:#222;--vc-sketch-presets-border:#eee;--vc-twitter-input-bg:#fff;--vc-twitter-input-border:#f0f0f0;--vc-twitter-input-color:#666;--vc-twitter-hash-bg:#f0f0f0;--vc-twitter-hash-color:#98a1a4}:root.dark{--vc-body-bg:#424242;--vc-picker-bg:#d0d0d0;--vc-input-bg:#2c2c2c;--vc-input-text:#d0d0d0;--vc-input-label:#bbb;--vc-input-border:#555;--vc-chrome-toggle-btn-highlighted:#5c5c5c;--vc-sketch-input-label:#bbb;--vc-sketch-presets-border:#5a5a5a;--vc-twitter-input-border:#383838;--vc-twitter-input-color:#bbb;--vc-twitter-hash-bg:#383838;--vc-twitter-hash-color:#a0acaf;--vc-twitter-input-bg:#555;--vc-ps-bg:#424242;--vc-ps-title-bg-gradient-start:#4e4e4e;--vc-ps-title-bg-gradient-end:#3a3a3a;--vc-ps-title-border:#5a5a5a;--vc-ps-title-color:#bbb;--vc-ps-slider-border:#5c5c5c;--vc-ps-slider-border-bottom:#4a4a4a;--vs-ps-picker-border-dark:#b8b8b8;--vs-ps-picker-border-white:#bbb;--vc-ps-btn-gradient-start:#505050;--vc-ps-btn-gradient-end:#3a3a3a;--vc-ps-btn-border:#6a6a6a;--vc-ps-btn-shadow:#2a2a2a;--vc-ps-btn-color:#bbb;--vc-ps-preview-border:#3a3a3a;--vc-ps-label:#bbb;--vc-ps-input-border:#666;--vc-ps-input-shadow-dark:rgba(0,0,0,.45);--vc-ps-input-shadow-light:#2d2d2d}.bg[data-v-4d048d6e]{cursor:crosshair;inset:0;position:absolute;touch-action:none}.white[data-v-4d048d6e]{background:linear-gradient(90deg,#fff,#fff0)}.black[data-v-4d048d6e]{background:linear-gradient(0deg,#000,#0000)}.picker-wrap[data-v-4d048d6e]{cursor:pointer;outline:none;position:absolute}.picker[data-v-4d048d6e]{border-radius:50%;box-shadow:0 0 0 1.6px var(--vc-picker-bg),inset 0 0 1px 1px #0000004d,0 0 1px 2px #0006;cursor:move;height:4px;transform:translate(-2px,-2px);width:4px}.vc-base-slider[data-v-972b0fad]{height:100%;position:relative;touch-action:none;width:100%}.background[data-v-972b0fad],.slider[data-v-972b0fad]{inset:0;position:absolute}.background[data-v-972b0fad]{overflow:hidden}.slider[data-v-972b0fad]{cursor:pointer;z-index:2}.picker-wrap[data-v-972b0fad]{outline:none;position:absolute;z-index:2}.picker[data-v-972b0fad]{background:var(--vc-picker-bg);border-radius:1px;box-shadow:0 0 2px #0009;cursor:pointer;height:8px;margin-top:1px;transform:translate(-2px);width:4px}.vc-hue-slider[data-v-5367c985]{cursor:crosshair;touch-action:none}.gradient[data-v-5367c985]{background:var(--2f44f39d);border-radius:2px;height:100%;width:100%}.vc-checkerboard[data-v-37d61ccd]{background-size:contain;inset:0;position:absolute}.vc-alpha-slider[data-v-07dd346b] .vc-checkerboard{border-radius:2px}.gradient[data-v-07dd346b]{inset:0;position:absolute}.vc-editable-input[data-v-9c267b2b]{position:relative}.vc-input-input[data-v-9c267b2b]{border:0;outline:none;padding:0;width:100%}.vc-input-label[data-v-9c267b2b]{text-transform:capitalize}.vc-chrome-picker[data-v-dfdde7e0]{border-radius:2px;box-shadow:0 0 2px #0000004d,0 4px 8px #0000004d;box-sizing:initial;font-family:Menlo,Consolas,Courier New,monospace;width:225px}.controls[data-v-dfdde7e0]{display:flex}.color-wrap[data-v-dfdde7e0]{position:relative;width:36px}.active-color[data-v-dfdde7e0]{border-radius:15px;height:30px;overflow:hidden;position:relative;width:30px;z-index:1}.color-wrap[data-v-dfdde7e0] .vc-checkerboard{background-size:auto;border-radius:15px;height:30px;width:30px}.sliders[data-v-dfdde7e0]{flex:1}.fieldsWrap[data-v-dfdde7e0]{display:flex;padding-top:16px}.fields[data-v-dfdde7e0]{display:flex;flex:1;margin-left:-6px}.field[data-v-dfdde7e0]{padding-left:6px;width:100%}.toggle-btn[data-v-dfdde7e0]{position:relative;text-align:right;width:32px}.toggle-icon[data-v-dfdde7e0]{color:var(--vc-input-text);cursor:pointer;margin-right:-4px;margin-top:12px;position:relative;z-index:2}.toggle-icon_highlighted[data-v-dfdde7e0]{background:var(--vc-chrome-toggle-btn-highlighted);border-radius:4px;height:28px;left:12px;position:absolute;top:10px;width:24px}.hue-wrap[data-v-dfdde7e0]{margin-bottom:8px}.alpha-wrap[data-v-dfdde7e0],.hue-wrap[data-v-dfdde7e0]{height:10px;position:relative}.alpha-wrap[data-v-dfdde7e0] .gradient,.hue-wrap[data-v-dfdde7e0] .container{border-radius:2px}.alpha-wrap[data-v-dfdde7e0] .picker,.hue-wrap[data-v-dfdde7e0] .picker{border-radius:6px;box-shadow:0 1px 4px #0000005e;height:12px;transform:translate(-6px,-2px);width:12px}.body[data-v-dfdde7e0]{background-color:var(--vc-body-bg);padding:16px 16px 12px}.saturation[data-v-dfdde7e0]{border-radius:2px 2px 0 0;overflow:hidden;padding-bottom:55%;position:relative;width:100%}.saturation[data-v-dfdde7e0] .picker{height:12px;transform:translate(-6px,-6px);width:12px}.fields[data-v-dfdde7e0] .vc-input-input{background-color:var(--vc-input-bg);border:none;border-radius:2px;box-shadow:inset 0 0 0 1px var(--vc-input-border);color:var(--vc-input-text);font-size:11px;height:21px;text-align:center;width:100%}.fields[data-v-dfdde7e0] .vc-input-label{color:var(--vc-input-label);display:block;font-size:11px;line-height:11px;margin-top:12px;text-align:center;text-transform:uppercase}.alpha-disabled[data-v-dfdde7e0] .active-color{height:18px;width:18px}.alpha-disabled[data-v-dfdde7e0] .color-wrap{width:30px}.alpha-disabled[data-v-dfdde7e0] .hue-wrap{margin-bottom:4px;margin-top:4px}.vc-compact-picker[data-v-91d11fa7]{background-color:var(--vc-body-bg);border-radius:2px;box-shadow:0 2px 10px #0000001f,0 2px 5px #00000029;box-sizing:border-box;padding-left:5px;padding-top:5px;width:245px}.colors[data-v-91d11fa7]{margin:0;overflow:hidden;padding:0}.color-item[data-v-91d11fa7]{cursor:pointer;float:left;height:15px;list-style:none;margin-bottom:5px;margin-right:5px;position:relative;width:15px}.color-item_white[data-v-91d11fa7]{box-shadow:inset 0 0 0 1px #ddd}.color-item_white .dot[data-v-91d11fa7]{background:#000}.dot[data-v-91d11fa7]{background:#fff;border-radius:50%;inset:5px;opacity:1;position:absolute}.vc-grayscale-picker[data-v-631223a5]{background-color:var(--vc-body-bg);border-radius:2px;box-shadow:0 2px 10px #0000001f,0 2px 5px #00000029;box-sizing:border-box;padding-left:5px;padding-top:5px;width:245px}.colors[data-v-631223a5]{margin:0;overflow:hidden;padding:0}.color-item[data-v-631223a5]{cursor:pointer;float:left;height:15px;list-style:none;margin-bottom:5px;margin-right:5px;position:relative;width:15px}.color-item_white[data-v-631223a5]{box-shadow:inset 0 0 0 1px #ddd}.color-item_white .dot[data-v-631223a5]{background:#000}.dot[data-v-631223a5]{background:#fff;border-radius:50%;inset:5px;opacity:1;position:absolute}.vc-material-picker[data-v-8f86229c]{background-color:var(--vc-body-bg);border-radius:2px;box-shadow:0 2px 10px #0000001f,0 2px 5px #00000029;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica Neue,Arial,sans-serif;height:98px;padding:16px;position:relative;width:98px}.vc-material-picker[data-v-8f86229c] .vc-input-input{background-color:var(--vc-body-bg);color:var(--vc-input-text);font-size:15px;height:30px;margin-top:12px;width:100%}.vc-material-picker[data-v-8f86229c] .vc-input-label{color:var(--vc-input-label);font-size:11px;left:0;position:absolute;top:0}.hex[data-v-8f86229c]{border-bottom-style:solid;border-bottom-width:2px}.rgb[data-v-8f86229c]{display:flex;margin-right:-10px;padding-top:11px}.color[data-v-8f86229c]{flex:1;padding-right:10px}.vc-photoshop-picker[data-v-b69df0e5]{background:var(--vc-ps-bg);border-radius:4px;box-shadow:0 0 0 1px #00000040,0 8px 16px #00000026;box-sizing:initial;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica Neue,Arial,sans-serif;width:513px}.fields_disabled[data-v-b69df0e5]{width:390px}.title[data-v-b69df0e5]{background-image:linear-gradient(-180deg,var(--vc-ps-title-bg-gradient-start) 0,var(--vc-ps-title-bg-gradient-end) 100%);border-bottom:1px solid var(--vc-ps-title-border);border-radius:4px 4px 0 0;box-shadow:inset 0 1px #fff3,inset 0 -1px #00000005;color:var(--vc-ps-title-color);font-size:13px;height:23px;line-height:24px;text-align:center}.body[data-v-b69df0e5]{display:flex;padding:15px}.saturation[data-v-b69df0e5]{border-bottom:2px solid var(--vc-ps-slider-border);border:2px solid var(--vc-ps-slider-border);border-bottom-color:var(--vc-ps-slider-border-bottom);height:256px;overflow:hidden;position:relative;width:256px}.saturation[data-v-b69df0e5] .picker{height:12px;transform:translate(-6px,-6px);width:12px}.hue[data-v-b69df0e5]{border-bottom:2px solid var(--vc-ps-slider-border);border:2px solid var(--vc-ps-slider-border);border-bottom-color:var(--vc-ps-slider-border-bottom);height:256px;margin-left:10px;width:19px}.hue-picker[data-v-b69df0e5]{position:relative}.hue-picker-left[data-v-b69df0e5],.hue-picker-right[data-v-b69df0e5]{border-color:transparent transparent transparent var(--vs-ps-picker-border-dark);border-style:solid;border-width:5px 0 5px 8px;cursor:pointer;height:0;position:absolute;width:0}.hue-picker-left[data-v-b69df0e5]:after,.hue-picker-right[data-v-b69df0e5]:after{border-color:transparent transparent transparent var(--vs-ps-picker-border-white);border-style:solid;border-width:4px 0 4px 6px;content:"";height:0;left:1px;position:absolute;top:1px;transform:translate(-8px,-5px);width:0}.hue-picker-left[data-v-b69df0e5]{transform:translate(-10px,-4px)}.hue-picker-right[data-v-b69df0e5]{transform:translate(21px,-4px) rotate(180deg)}.controls[data-v-b69df0e5]{display:flex;margin-left:10px;width:180px}.controls_fields_disabled[data-v-b69df0e5]{width:auto}.actions[data-v-b69df0e5]{flex:1;margin-left:20px}.action-btn[data-v-b69df0e5]{background-image:linear-gradient(-180deg,var(--vc-ps-btn-gradient-start) 0,var(--vc-ps-btn-gradient-end) 100%);border:1px solid var(--vc-ps-btn-border);border-radius:2px;box-shadow:0 1px 0 0 var(--vc-ps-btn-shadow);color:var(--vc-ps-btn-color);cursor:pointer;font-size:14px;height:20px;line-height:20px;margin-bottom:10px;text-align:center}.preview[data-v-b69df0e5]{width:60px}.preview-swatches[data-v-b69df0e5]{border-bottom:1px solid var(--vc-ps-slider-border);border:1px solid var(--vc-ps-slider-border);border-bottom-color:var(--vc-ps-slider-border-bottom);margin-bottom:2px;margin-top:1px}.preview-color[data-v-b69df0e5]{box-shadow:inset 1px 0 var(--vc-ps-preview-border),inset -1px 0 var(--vc-ps-preview-border),inset 0 1px var(--vc-ps-preview-border);height:34px}.preview-label[data-v-b69df0e5]{color:var(--vc-ps-label);font-size:14px;text-align:center}.fields[data-v-b69df0e5]{padding-bottom:9px;padding-top:5px;position:relative;width:80px}.fields[data-v-b69df0e5] .vc-input-input{background-color:var(--vc-input-bg);border:1px solid var(--vc-ps-input-border);box-shadow:inset 0 1px 1px var(--vc-ps-input-shadow-dark),0 1px 0 0 var(--vc-ps-input-shadow-light);color:var(--vc-ps-label);font-size:13px;height:18px;margin-bottom:5px;margin-left:40%;margin-right:10px;padding-left:3px;width:40%}.fields[data-v-b69df0e5] .vc-input-desc,.fields[data-v-b69df0e5] .vc-input-label{color:var(--vc-ps-label);font-size:13px;height:18px;line-height:22px;position:absolute;text-transform:uppercase;top:0}.fields[data-v-b69df0e5] .vc-input-label{left:0;width:34px}.fields[data-v-b69df0e5] .vc-input-desc{right:0;width:0}.fields-divider[data-v-b69df0e5]{height:5px}.hex[data-v-b69df0e5] .vc-input-input{border:1px solid var(--vc-ps-input-border);box-shadow:inset 0 1px 1px var(--vc-ps-input-shadow-dark),0 1px 0 0 var(--vc-ps-input-shadow-light);font-size:13px;height:18px;margin-bottom:6px;margin-left:20%;padding-left:3px;width:80%}.hex[data-v-b69df0e5] .vc-input-label{font-size:13px;height:18px;left:0;line-height:22px;position:absolute;text-transform:uppercase;top:0;width:14px}.vc-sketch-picker[data-v-fdb7d989]{background:var(--vc-body-bg);border-radius:4px;box-shadow:0 0 0 1px #00000026,0 8px 16px #00000026;box-sizing:initial;font-family:Menlo,Consolas,Courier New,monospace;padding:10px 10px 0;position:relative;width:200px}.saturation[data-v-fdb7d989]{overflow:hidden;padding-bottom:75%;position:relative;width:100%}.controls[data-v-fdb7d989]{display:flex}.sliders[data-v-fdb7d989]{flex:1;padding:4px 0}.alpha[data-v-fdb7d989] .gradient,.hue[data-v-fdb7d989] .container{border-radius:2px}.hue[data-v-fdb7d989]{height:10px;position:relative}.alpha[data-v-fdb7d989]{height:10px}.alpha[data-v-fdb7d989],.color[data-v-fdb7d989]{margin-top:4px;overflow:hidden;position:relative}.color[data-v-fdb7d989]{border-radius:2px;height:24px;margin-left:4px;width:24px}.active-color[data-v-fdb7d989]{box-shadow:inset 0 0 0 1px #00000026,inset 0 0 4px #00000040;inset:0;position:absolute;z-index:2}.color[data-v-fdb7d989] .vc-checkerboard{background-size:auto}.field[data-v-fdb7d989]{display:flex;padding-top:4px}.field[data-v-fdb7d989] .vc-input-input{background-color:var(--vc-input-bg);border:none;box-shadow:inset 0 0 0 1px var(--vc-input-border);color:var(--vc-input-text);font-size:10px;padding:4px 0 3px 10%;width:90%}.field[data-v-fdb7d989] .vc-input-label{color:var(--vc-sketch-input-label);display:block;font-size:11px;padding-bottom:4px;padding-top:3px;text-align:center}.field_single[data-v-fdb7d989]{flex:1;padding-left:6px}.field_double[data-v-fdb7d989]{flex:2}.presets[data-v-fdb7d989]{border-top:1px solid var(--vc-sketch-presets-border);margin-left:-10px;margin-right:-10px;padding-left:10px;padding-top:10px}.preset-color[data-v-fdb7d989]{cursor:pointer;display:inline-block;height:16px;margin:0 10px 10px 0;overflow:hidden;position:relative;vertical-align:top;width:16px}.preset-color[data-v-fdb7d989],.preset-color[data-v-fdb7d989] .vc-checkerboard{border-radius:3px;box-shadow:inset 0 0 0 1px #00000026}.alpha-disabled .color[data-v-fdb7d989]{height:10px}.vc-slider-picker[data-v-675d6988]{position:relative;width:410px}.hue[data-v-675d6988]{height:12px;position:relative}.alpha[data-v-675d6988] .picker,.hue[data-v-675d6988] .picker{border-radius:6px;box-shadow:0 1px 4px #0000005e;height:14px;transform:translate(-7px,-2px);width:14px}.alpha[data-v-675d6988]{height:12px;margin-top:20px;position:relative}.swatches[data-v-675d6988]{display:flex;margin-top:20px}.swatch[data-v-675d6988]{flex:1;margin-right:1px;width:20%}.swatch[data-v-675d6988]:first-child{margin-right:1px}.swatch:first-child .picker[data-v-675d6988]{border-radius:2px 0 0 2px}.swatch[data-v-675d6988]:last-child{margin-right:0}.swatch:last-child .picker[data-v-675d6988]{border-radius:0 2px 2px 0}.picker[data-v-675d6988]{cursor:pointer;height:12px}.swatch:nth-child(n) .picker_active[data-v-675d6988]{border-radius:3.6px/2px;transform:scaleY(1.8)}.picker_white[data-v-675d6988]{box-shadow:inset 0 0 0 1px #ddd}.picker_active.picker_white[data-v-675d6988]{box-shadow:inset 0 0 0 .6px #ddd}.vc-swatches-picker[data-v-3427cb2a]{background-color:var(--vc-body-bg);box-shadow:0 2px 10px #0000001f,0 2px 5px #00000029;height:240px;overflow-y:scroll;width:320px}.box[data-v-3427cb2a]{overflow:hidden;padding:16px 0 6px 16px}.colorGroup[data-v-3427cb2a]{float:left;margin-right:10px;padding-bottom:10px;width:40px}.color[data-v-3427cb2a]{border-radius:2px 2px 0 0;box-sizing:border-box;cursor:pointer;height:24px;margin-bottom:1px;overflow:hidden;width:40px}.color_white[data-v-3427cb2a]{border:1px solid #ddd}.picker[data-v-3427cb2a]{fill:#fff;display:block;margin-left:8px}.color_white .picker[data-v-3427cb2a]{fill:#333}.vc-twitter-picker[data-v-e74ac697]{background:var(--vc-body-bg);border:0 solid rgba(0,0,0,.25);border-radius:4px;box-shadow:0 1px 4px #00000040;position:relative}.triangle[data-v-e74ac697]{border-color:transparent transparent var(--vc-body-bg) transparent;border-style:solid;border-width:0 9px 10px;height:0;position:absolute;width:0}.triangle_shadow[data-v-e74ac697]{border-color:transparent transparent rgba(0,0,0,.1);border-style:solid;border-width:0 9px 10px;height:0;position:absolute;width:0}.body[data-v-e74ac697]{padding:15px 9px 9px 15px}.vc-twitter-picker[data-v-e74ac697] .vc-editable-input{position:relative}.vc-twitter-picker[data-v-e74ac697] .vc-input-input{background-color:var(--vc-twitter-input-bg);border:0;border-radius:0 4px 4px 0;box-shadow:inset 0 0 0 1px var(--vc-twitter-input-border);box-sizing:content-box;color:var(--vc-twitter-input-color);float:left;font-size:14px;height:28px;outline:none;padding:1px 1px 1px 8px;width:100px}.vc-twitter-picker[data-v-e74ac697] .vc-editable-input span{display:none}.hash[data-v-e74ac697]{align-items:center;background:var(--vc-twitter-hash-bg);border-radius:4px 0 0 4px;color:var(--vc-twitter-hash-color);display:flex;float:left;height:30px;justify-content:center;width:30px}.swatch[data-v-e74ac697]{border-radius:4px;cursor:pointer;float:left;height:30px;margin:0 6px 6px 0;outline:none;position:relative;width:30px}.clear[data-v-e74ac697]{clear:both}.tri_hide .triangle[data-v-e74ac697],.tri_hide .triangle_shadow[data-v-e74ac697]{display:none}.tri_top_left .triangle[data-v-e74ac697]{left:12px;top:-10px}.tri_top_left .triangle_shadow[data-v-e74ac697]{left:12px;top:-11px}.tri_top_right .triangle[data-v-e74ac697]{right:12px;top:-10px}.tri_top_right .triangle_shadow[data-v-e74ac697]{right:12px;top:-11px}.vc-hue-wrap[data-v-b3ac1ab2]{height:8px}.vc-hue-wrap[data-v-b3ac1ab2] .slider{border-radius:4px}.vc-hue-wrap[data-v-b3ac1ab2] .picker{background-color:var(--46ac36b6);border:2px solid #fff;border-radius:50%;box-shadow:none;height:20px;margin:0;transform:translate(-12px) translateY(-8px);width:20px}.vc-hsl-sliders[data-v-2e071f54]{font-family:Menlo,Consolas,Courier New,monospace;position:relative;width:100%}.slider-wrap[data-v-2e071f54]{display:flex;gap:12px;height:24px;margin-bottom:10px}.slider-wrap[data-v-2e071f54]:last-of-type{margin-bottom:0}.label[data-v-2e071f54]{color:var(--vc-input-text);display:block;font-size:12px;height:24px;line-height:24px;text-align:center;text-transform:uppercase}.vc-hsl-sliders[data-v-2e071f54] .vc-base-slider{height:14px;margin-top:5px}.vc-hsl-sliders[data-v-2e071f54] .background{border:1px solid var(--vc-input-border);border-radius:4px}.gradient[data-v-2e071f54]{height:100%;width:100%}.vc-hsl-sliders[data-v-2e071f54] .picker{border:2px solid #fff;border-radius:50%;box-shadow:none;height:20px;margin:0;transform:translate(-12px) translateY(-5px);width:20px}.h-slider[data-v-2e071f54] .picker{background-color:var(--41b5b6d0)}.l-slider[data-v-2e071f54] .picker,.s-slider[data-v-2e071f54] .picker{background-color:var(--05fbe691)}.vc-hsl-sliders[data-v-2e071f54] .vc-editable-input{border-bottom:1px solid var(--vc-input-border)}.vc-hsl-sliders[data-v-2e071f54] .vc-input-input{background:none;color:var(--vc-input-text);font-size:12px;text-align:center;width:50px}.vc-hsv-sliders[data-v-d6cfe1d9]{font-family:Menlo,Consolas,Courier New,monospace;position:relative;width:100%}.slider-wrap[data-v-d6cfe1d9]{display:flex;gap:12px;height:24px;margin-bottom:10px}.slider-wrap[data-v-d6cfe1d9]:last-of-type{margin-bottom:0}.label[data-v-d6cfe1d9]{color:var(--vc-input-text);display:block;font-size:12px;height:24px;line-height:24px;text-align:center;text-transform:uppercase}.vc-hsv-sliders[data-v-d6cfe1d9] .vc-base-slider{height:14px;margin-top:5px}.vc-hsv-sliders[data-v-d6cfe1d9] .background{border:1px solid var(--vc-input-border);border-radius:4px}.gradient[data-v-d6cfe1d9]{height:100%;width:100%}.vc-hsv-sliders[data-v-d6cfe1d9] .picker{border:2px solid #fff;border-radius:50%;box-shadow:none;height:20px;margin:0;transform:translate(-12px) translateY(-5px);width:20px}.h-slider[data-v-d6cfe1d9] .picker{background-color:var(--f666f450)}.b-slider[data-v-d6cfe1d9] .picker,.s-slider[data-v-d6cfe1d9] .picker{background-color:var(--46b90cce)}.vc-hsv-sliders[data-v-d6cfe1d9] .vc-editable-input{border-bottom:1px solid var(--vc-input-border)}.vc-hsv-sliders[data-v-d6cfe1d9] .vc-input-input{background:none;color:var(--vc-input-text);font-size:12px;text-align:center;width:50px}.vc-rgb-sliders[data-v-98b3b212]{font-family:Menlo,Consolas,Courier New,monospace;position:relative;width:100%}.slider-wrap[data-v-98b3b212]{display:flex;gap:12px;height:24px;margin-bottom:10px}.slider-wrap[data-v-98b3b212]:last-of-type{margin-bottom:0}.label[data-v-98b3b212]{color:var(--vc-input-text);display:block;font-size:12px;height:24px;line-height:24px;text-align:center;text-transform:uppercase}.vc-rgb-sliders[data-v-98b3b212] .vc-base-slider{height:14px;margin-top:5px}.vc-rgb-sliders[data-v-98b3b212] .background{border:1px solid var(--vc-input-border);border-radius:4px}.gradient[data-v-98b3b212]{height:100%;width:100%}.vc-rgb-sliders[data-v-98b3b212] .picker{border:2px solid #fff;border-radius:50%;box-shadow:none;height:20px;margin:0;transform:translate(-12px) translateY(-5px);width:20px}.slider-wrap[data-v-98b3b212]:not(.a-slider) .picker{background-color:var(--5f730604)}.vc-rgb-sliders[data-v-98b3b212] .vc-editable-input{border-bottom:1px solid var(--vc-input-border)}.vc-rgb-sliders[data-v-98b3b212] .vc-input-input{background:none;color:var(--vc-input-text);font-size:12px;text-align:center;width:50px}',"",{version:3,sources:["webpack://./node_modules/vue-color/dist/vue-color.css"],names:[],mappings:"AAAA,MAAM,sBAAuB,CAAC,iBAAkB,CAAC,kBAAmB,CAAC,oBAAqB,CAAC,wBAAyB,CAAC,yBAA0B,CAAC,uCAAwC,CAAC,kBAAmB,CAAC,uCAAwC,CAAC,qCAAsC,CAAC,4BAA6B,CAAC,2BAA4B,CAAC,6BAA8B,CAAC,oCAAqC,CAAC,+BAAgC,CAAC,gCAAiC,CAAC,+BAAgC,CAAC,gCAAiC,CAAC,0BAA2B,CAAC,0BAA2B,CAAC,sBAAuB,CAAC,2BAA4B,CAAC,kBAAmB,CAAC,yBAA0B,CAAC,wCAAyC,CAAC,kCAAmC,CAAC,4BAA6B,CAAC,+BAAgC,CAAC,0BAA2B,CAAC,iCAAkC,CAAC,6BAA8B,CAAC,4BAA6B,CAAC,+BAAgC,CAAC,WAAW,oBAAqB,CAAC,sBAAuB,CAAC,qBAAsB,CAAC,uBAAwB,CAAC,qBAAyB,CAAC,sBAA0B,CAAC,0CAA2C,CAAC,4BAAgC,CAAC,kCAAmC,CAAC,iCAAkC,CAAC,6BAAiC,CAAC,4BAA6B,CAAC,+BAAgC,CAAC,0BAA2B,CAAC,kBAAmB,CAAC,uCAAwC,CAAC,qCAAsC,CAAC,4BAA6B,CAAC,wBAA4B,CAAC,6BAA8B,CAAC,oCAAqC,CAAC,kCAAmC,CAAC,gCAAoC,CAAC,kCAAmC,CAAC,gCAAiC,CAAC,0BAA2B,CAAC,0BAA2B,CAAC,sBAA0B,CAAC,8BAA+B,CAAC,kBAAsB,CAAC,yBAA6B,CAAC,yCAA6C,CAAC,kCAAmC,CAAC,qBAAqB,gBAAgB,CAAmB,OAAO,CAAzB,iBAAiB,CAAS,iBAAiB,CAAC,wBAAwB,4CAA+C,CAAC,wBAAwB,2CAA6C,CAAC,8BAA8B,cAAc,CAAmB,YAAW,CAA7B,iBAA8B,CAAC,yBAAmJ,iBAAiB,CAA1G,wFAAwF,CAAzH,WAAW,CAAW,UAAU,CAA4G,8BAA6B,CAA7J,SAA8J,CAAC,iCAA8D,WAAW,CAAxC,iBAAiB,CAAwB,iBAAgB,CAAvC,UAAwC,CAAC,sDAAwE,OAAM,CAAxB,iBAAyB,CAAC,6BAA6B,eAAe,CAAC,yBAAyB,cAAc,CAAC,SAAS,CAAC,8BAA0D,YAAW,CAAvC,iBAAiB,CAAC,SAAsB,CAAC,yBAAwG,8BAA8B,CAAzE,iBAAiB,CAAC,wBAAwB,CAAgC,cAAc,CAAlH,UAAU,CAAC,cAAc,CAA0F,yBAAwB,CAArJ,SAAsJ,CAAC,gCAAgC,gBAAgB,CAAC,iBAAiB,CAAC,2BAAoE,0BAAyB,CAA3C,iBAAiB,CAA7B,WAAW,CAAtB,UAAmE,CAAC,kCAA4D,uBAAsB,CAA9B,OAAO,CAAzB,iBAAiD,CAAC,mDAAmD,iBAAiB,CAAC,2BAA6C,OAAM,CAAxB,iBAAyB,CAAC,oCAAoC,iBAAiB,CAAC,iCAAsD,QAAQ,CAAC,YAAW,CAA9B,SAAS,CAApB,UAA0C,CAAC,iCAAiC,yBAAyB,CAAC,mCAAkE,iBAAiB,CAAC,gDAAgD,CAArF,kBAAkB,CAAoE,gDAA+C,CAAjJ,WAAkJ,CAAC,2BAA2B,YAAY,CAAC,6BAA6B,iBAAiB,CAAC,UAAU,CAAC,+BAAwE,kBAAkB,CAA9B,WAAW,CAAoB,eAAe,CAA3E,iBAAiB,CAAC,UAAU,CAAgD,SAAS,CAAC,8CAAwF,oBAAmB,CAAtC,kBAAkB,CAA9B,WAAW,CAAtB,UAA8D,CAAC,0BAA0B,MAAM,CAAC,6BAA6B,YAAY,CAAC,gBAAgB,CAAC,yBAAyB,YAAY,CAAkB,MAAK,CAAtB,gBAAuB,CAAC,wBAAwB,gBAAgB,CAAC,UAAU,CAAC,6BAAyD,iBAAgB,CAAjC,gBAAgB,CAA3B,UAA6C,CAAC,8BAA2G,0BAAyB,CAAlD,cAAc,CAAhD,iBAAiB,CAAC,eAAe,CAAnD,iBAAiB,CAAkD,SAAoC,CAAC,0CAAsG,kDAAkD,CAAC,iBAAgB,CAAlG,WAAW,CAAU,SAAS,CAA3D,iBAAiB,CAAwB,QAAQ,CAA/B,UAA8G,CAAC,2BAAyD,iBAAiB,CAAC,wDAA9B,WAAW,CAA7B,iBAA0G,CAAC,6EAA6E,iBAAiB,CAAC,wEAA+F,iBAAiB,CAAgC,8BAA6B,CAA1F,WAAW,CAAmB,8BAA8B,CAAvE,UAAsG,CAAC,uBAA8C,kCAAiC,CAAxD,sBAAyD,CAAC,6BAA6E,yBAAyB,CAAC,eAAc,CAA7E,kBAAkB,CAAC,iBAAiB,CAA/C,UAAyF,CAAC,qCAAgD,WAAW,CAAC,8BAA6B,CAApD,UAAqD,CAAC,yCAAgJ,mCAAmC,CAAjG,WAAW,CAA7B,iBAAiB,CAAa,iDAAiD,CAAqC,0BAA0B,CAAC,cAAc,CAAzK,WAAW,CAA+J,iBAAgB,CAArM,UAAsM,CAAC,yCAAsF,2BAA2B,CAAxE,aAAa,CAAiB,cAAc,CAA6B,gBAAgB,CAA3E,eAAe,CAAsF,iBAAgB,CAAzC,wBAA0C,CAAC,+CAA0D,WAAU,CAArB,UAAsB,CAAC,6CAA6C,UAAU,CAAC,2CAA0D,iBAAgB,CAA/B,cAAgC,CAAC,oCAA6K,kCAAiC,CAA7H,iBAAiB,CAAuB,mDAAmD,CAAzE,qBAAqB,CAAxD,gBAAgB,CAAhC,eAAe,CAA3B,WAA2K,CAAC,yBAAmD,QAAO,CAAjC,eAAe,CAAC,SAAkB,CAAC,6BAAoI,cAAa,CAA7E,UAAU,CAAtB,WAAW,CAAtC,eAAe,CAAoD,iBAAiB,CAAlC,gBAAgB,CAAmB,iBAAiB,CAAtF,UAAqG,CAAC,mCAAmC,+BAA+B,CAAC,wCAAwC,eAAe,CAAC,sBAA8E,eAAc,CAA1C,iBAAiB,CAA3B,SAAS,CAAmB,SAAS,CAAvD,iBAAuE,CAAC,sCAA+K,kCAAiC,CAA7H,iBAAiB,CAAuB,mDAAmD,CAAzE,qBAAqB,CAApE,gBAAgB,CAAhC,eAAe,CAAkB,WAA0I,CAAC,yBAAmD,QAAO,CAAjC,eAAe,CAAC,SAAkB,CAAC,6BAAoI,cAAa,CAA7E,UAAU,CAAtB,WAAW,CAAtC,eAAe,CAAoD,iBAAiB,CAAlC,gBAAgB,CAAmB,iBAAiB,CAAtF,UAAqG,CAAC,mCAAmC,+BAA+B,CAAC,wCAAwC,eAAe,CAAC,sBAA8E,eAAc,CAA1C,iBAAiB,CAA3B,SAAS,CAAmB,SAAS,CAAvD,iBAAuE,CAAC,qCAAiK,kCAAkC,CAAxG,iBAAiB,CAAC,mDAAmD,CAAoC,qFAAoF,CAAtN,WAAW,CAAC,YAAY,CAArD,iBAAiB,CAAC,UAAkO,CAAC,qDAA4F,kCAAkC,CAAC,0BAA0B,CAAC,cAAa,CAAvG,WAAW,CAAC,eAAe,CAAtC,UAAmH,CAAC,qDAAmG,2BAA0B,CAAzC,cAAc,CAArB,MAAM,CAA9B,iBAAiB,CAAC,KAAuD,CAAC,sBAA8C,yBAAwB,CAAhD,uBAAiD,CAAC,sBAAsB,YAAY,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,wBAAwB,MAAM,CAAC,kBAAkB,CAAC,sCAAkD,0BAA0B,CAAC,iBAAiB,CAAC,mDAAmD,CAAC,kBAAkB,CAAC,qFAAoF,CAApN,WAAqN,CAAC,kCAAkC,WAAW,CAAC,wBAAoC,wHAAyH,CAAC,iDAAiD,CAAC,yBAAyB,CAAC,mDAAmD,CAAC,8BAA8B,CAAC,cAAc,CAAnT,WAAW,CAAyS,gBAAgB,CAAC,iBAAiB,CAAC,uBAAoC,YAAW,CAAxB,YAAyB,CAAC,6BAAwE,kDAA2C,CAAC,2CAAyD,CAAzD,qDAAyD,CAApI,YAAY,CAAyH,eAAc,CAAtI,iBAAiB,CAA1C,WAAgK,CAAC,qCAAgD,WAAW,CAAC,8BAA6B,CAApD,UAAqD,CAAC,sBAA+D,kDAA2C,CAAC,2CAAwD,CAAxD,qDAAwD,CAA7I,YAAY,CAAY,gBAAgB,CAA3B,UAAiI,CAAC,6BAA6B,iBAAiB,CAAC,qEAAsJ,gFAAgF,CAA9H,kBAAkB,CAAC,0BAA0B,CAAkF,cAAa,CAArJ,QAAQ,CAAlC,iBAAiB,CAAC,OAA8J,CAAC,iFAA2J,iFAAiF,CAA/H,kBAAkB,CAAC,0BAA0B,CAAzE,UAAU,CAAS,QAAQ,CAA2J,QAAQ,CAAlC,iBAAiB,CAAC,OAAO,CAAU,8BAA6B,CAAjN,OAAkN,CAAC,kCAAkC,+BAA+B,CAAC,mCAAmC,6CAA6C,CAAC,2BAAwD,YAAW,CAA5B,gBAAgB,CAA5B,WAAyC,CAAC,2CAA2C,UAAU,CAAC,0BAA2C,MAAK,CAAtB,gBAAuB,CAAC,6BAA4D,8GAA+G,CAAC,wCAAwC,CAAC,iBAAiB,CAAC,4CAA4C,CAAgB,4BAA4B,CAA3C,cAAc,CAA8B,cAAc,CAAjT,WAAW,CAAuS,gBAAgB,CAAtT,kBAAkB,CAAqS,iBAAiB,CAAC,0BAA0B,UAAU,CAAC,mCAAmC,kDAA2C,CAAC,2CAAyD,CAAzD,qDAAyD,CAAC,iBAAiB,CAAC,cAAc,CAAC,gCAA4C,mIAAkI,CAA9I,WAA+I,CAAC,gCAAgC,wBAAwB,CAAC,cAAc,CAAC,iBAAiB,CAAC,yBAAyC,kBAAkB,CAAlC,eAAe,CAA+B,iBAAgB,CAA3B,UAA4B,CAAC,yCAAmR,mCAAmC,CAAlL,0CAA0C,CAAC,mGAAmG,CAAqC,wBAAwB,CAAC,cAAa,CAA1S,WAAW,CAAmC,iBAAiB,CAAnD,eAAe,CAAC,iBAAiB,CAAmB,gBAAgB,CAA1F,SAAqT,CAAC,iFAAqH,wBAAwB,CAAC,cAAc,CAAnD,WAAW,CAAyC,gBAAgB,CAA5F,iBAAiB,CAA4E,wBAAuB,CAAlG,KAAmG,CAAC,yCAAyC,MAAM,CAAC,UAAU,CAAC,wCAAwC,OAAO,CAAC,OAAO,CAAC,iCAAiC,UAAU,CAAC,sCAA+G,0CAA0C,CAAC,mGAAmG,CAAC,cAAa,CAA3N,WAAW,CAAiB,iBAAiB,CAAjC,eAAe,CAAmB,gBAAgB,CAAxE,SAAsO,CAAC,sCAAyG,cAAc,CAAC,WAAW,CAArE,MAAM,CAAgE,gBAAe,CAA7G,iBAAiB,CAAyB,wBAAwB,CAAhD,KAAK,CAAQ,UAA+E,CAAC,mCAAwG,4BAA4B,CAAC,iBAAiB,CAAC,mDAAmD,CAArH,kBAAkB,CAAoG,gDAA+C,CAAzL,mBAAmB,CAAjD,iBAAiB,CAAC,WAAsM,CAAC,6BAA6E,eAAc,CAAnD,kBAAkB,CAAC,iBAAiB,CAA/C,UAA+D,CAAC,2BAA2B,YAAY,CAAC,0BAAwC,MAAK,CAAnB,aAAoB,CAAC,mEAAmE,iBAAiB,CAAC,sBAAwC,WAAU,CAA5B,iBAA6B,CAAC,wBAA0C,WAA0C,CAAC,gDAA/B,cAAc,CAAC,eAAc,CAA3D,iBAA8L,CAAjI,wBAAgG,iBAAiB,CAA9E,WAAW,CAAkC,eAAe,CAAvE,UAAyG,CAAC,+BAAyD,4DAA4D,CAApE,OAAO,CAAzB,iBAAiB,CAAsE,SAAS,CAAC,yCAAyC,oBAAoB,CAAC,wBAAwB,YAAY,CAAC,eAAe,CAAC,wCAAsI,mCAAmC,CAAjG,WAAW,CAAC,iDAAiD,CAAqC,0BAA0B,CAAC,cAAa,CAAhK,qBAAqB,CAA/B,SAA2K,CAAC,wCAAyF,kCAAkC,CAAnF,aAAa,CAAuE,cAAc,CAApE,kBAAkB,CAAlC,eAAe,CAAsE,iBAAiB,CAAC,+BAA+B,MAAM,CAAC,gBAAgB,CAAC,+BAA+B,MAAM,CAAC,0BAAkG,oDAAmD,CAAxG,iBAAiB,CAApC,kBAAkB,CAAmB,iBAAiB,CAAC,gBAAqE,CAAC,+BAAgJ,cAAc,CAA3E,oBAAoB,CAAmE,WAAW,CAA7E,oBAAoB,CAA3E,eAAe,CAAC,iBAAiB,CAA2C,kBAAkB,CAAgB,UAA2D,CAAC,+EAA5L,iBAAiB,CAAsI,oCAA2I,CAAC,wCAAwC,WAAW,CAAC,mCAAmC,iBAAiB,CAAC,WAAW,CAAC,sBAAsB,WAAW,CAAC,iBAAiB,CAAC,8DAAqF,iBAAiB,CAAC,8BAA8B,CAA5D,WAAW,CAAkD,8BAA6B,CAArG,UAAsG,CAAC,wBAAwB,WAAW,CAAmB,eAAc,CAAhC,iBAAiC,CAAC,2BAA2B,YAAY,CAAC,eAAe,CAAC,yBAA0C,MAAM,CAAvB,gBAAgB,CAAQ,SAAS,CAAC,qCAAqC,gBAAgB,CAAC,6CAA6C,yBAAyB,CAAC,oCAAoC,cAAc,CAAC,4CAA4C,yBAAyB,CAAC,yBAAyB,cAAc,CAAC,WAAW,CAAC,qDAA2E,uBAAsB,CAA5C,qBAA6C,CAAC,+BAA+B,+BAA+B,CAAC,6CAA6C,gCAAgC,CAAC,qCAAgF,kCAAkC,CAAC,mDAAkD,CAApH,YAAY,CAAC,iBAAiB,CAA1C,WAAiI,CAAC,sBAA8C,eAAc,CAAtC,uBAAuC,CAAC,6BAA4D,UAAU,CAAC,iBAAgB,CAA1D,mBAAmB,CAAC,UAAuC,CAAC,wBAAkP,yBAAwB,CAAlP,qBAAqB,CAA0C,cAAc,CAA5C,WAAW,CAAC,iBAAiB,CAAgB,eAAe,CAAvE,UAA6N,CAAC,8BAA8B,qBAAqB,CAAC,yBAAuC,SAAS,CAAvB,aAAa,CAAW,eAAe,CAAC,sCAAsC,SAAS,CAAC,oCAAsD,4BAA4B,CAAC,8BAA8B,CAAgC,iBAAgB,CAA/C,8BAA8B,CAA5G,iBAA8H,CAAC,2BAAiH,kEAAiE,CAAhH,kBAAkB,CAAC,uBAA2B,CAAzD,QAAU,CAAtC,iBAAiB,CAAC,OAAsI,CAAC,kCAAsG,mDAA+D,CAA/D,kBAA+D,CAA/D,uBAA+D,CAAzH,QAAU,CAAgH,iBAAgB,CAApJ,OAAqJ,CAAC,uBAAuB,yBAAyB,CAAC,uDAAuD,iBAAiB,CAAC,oDAAkP,2CAA2C,CAAhF,QAAU,CAAC,yBAAyB,CAArH,yDAAyD,CAAC,sBAAsB,CAAkF,mCAAmC,CAA7Q,UAAU,CAAoQ,cAAa,CAApQ,WAAW,CAAyB,YAAY,CAApC,uBAAuB,CAA/C,WAAiR,CAAC,4DAA4D,YAAY,CAAC,uBAA+C,kBAAkB,CAAyE,oCAAoC,CAA9D,yBAAyB,CAAsC,kCAAiC,CAA9K,YAAY,CAAvB,UAAU,CAAwD,WAAW,CAAlC,sBAAsB,CAAa,UAA4G,CAAC,yBAA2D,iBAAiB,CAAoB,cAAc,CAA9D,UAAU,CAAtB,WAAW,CAA8B,kBAAkB,CAAkC,YAAW,CAA7B,iBAAiB,CAAvG,UAAoH,CAAC,wBAAwB,UAAU,CAAC,iFAAiF,YAAY,CAAC,yCAAmD,SAAQ,CAAlB,SAAmB,CAAC,gDAA0D,SAAQ,CAAlB,SAAmB,CAAC,0CAAoD,UAAS,CAAnB,SAAoB,CAAC,iDAA2D,UAAS,CAAnB,SAAoB,CAAC,8BAA8B,UAAU,CAAC,sCAAsC,iBAAiB,CAAC,sCAA+H,gCAAgC,CAAvD,qBAAsB,CAAxD,iBAAiB,CAAC,eAAe,CAAtD,WAAW,CAAC,QAAQ,CAA2F,2CAA0C,CAApK,UAAqK,CAAC,iCAA8D,gDAA+C,CAA5E,iBAAiB,CAAC,UAA2D,CAAC,8BAA8B,YAAY,CAAC,QAAQ,CAAC,WAAW,CAAC,kBAAkB,CAAC,2CAA2C,eAAe,CAAC,wBAAkD,0BAA0B,CAApD,aAAa,CAAwC,cAAc,CAArD,WAAW,CAA2C,gBAAgB,CAA0B,iBAAgB,CAAzC,wBAA0C,CAAC,iDAAgE,WAAU,CAAzB,cAA0B,CAAC,6CAA+D,uCAAsC,CAAxD,iBAAyD,CAAC,2BAAsC,WAAU,CAArB,UAAsB,CAAC,yCAA2G,qBAAsB,CAAxD,iBAAiB,CAAC,eAAe,CAAtD,WAAW,CAAC,QAAQ,CAA0D,2CAA0C,CAAnI,UAAoI,CAAC,mCAAmC,gCAAgC,CAAC,sEAAsE,gCAAgC,CAAC,oDAAoD,8CAA8C,CAAC,iDAA4D,eAAe,CAAC,0BAA0B,CAAC,cAAc,CAAC,iBAAgB,CAArF,UAAsF,CAAC,iCAA8D,gDAA+C,CAA5E,iBAAiB,CAAC,UAA2D,CAAC,8BAA8B,YAAY,CAAC,QAAQ,CAAC,WAAW,CAAC,kBAAkB,CAAC,2CAA2C,eAAe,CAAC,wBAAkD,0BAA0B,CAApD,aAAa,CAAwC,cAAc,CAArD,WAAW,CAA2C,gBAAgB,CAA0B,iBAAgB,CAAzC,wBAA0C,CAAC,iDAAgE,WAAU,CAAzB,cAA0B,CAAC,6CAA+D,uCAAsC,CAAxD,iBAAyD,CAAC,2BAAsC,WAAU,CAArB,UAAsB,CAAC,yCAA2G,qBAAsB,CAAxD,iBAAiB,CAAC,eAAe,CAAtD,WAAW,CAAC,QAAQ,CAA0D,2CAA0C,CAAnI,UAAoI,CAAC,mCAAmC,gCAAgC,CAAC,sEAAsE,gCAAgC,CAAC,oDAAoD,8CAA8C,CAAC,iDAA4D,eAAe,CAAC,0BAA0B,CAAC,cAAc,CAAC,iBAAgB,CAArF,UAAsF,CAAC,iCAA8D,gDAA+C,CAA5E,iBAAiB,CAAC,UAA2D,CAAC,8BAA8B,YAAY,CAAC,QAAQ,CAAC,WAAW,CAAC,kBAAkB,CAAC,2CAA2C,eAAe,CAAC,wBAAkD,0BAA0B,CAApD,aAAa,CAAwC,cAAc,CAArD,WAAW,CAA2C,gBAAgB,CAA0B,iBAAgB,CAAzC,wBAA0C,CAAC,iDAAgE,WAAU,CAAzB,cAA0B,CAAC,6CAA+D,uCAAsC,CAAxD,iBAAyD,CAAC,2BAAsC,WAAU,CAArB,UAAsB,CAAC,yCAA2G,qBAAsB,CAAxD,iBAAiB,CAAC,eAAe,CAAtD,WAAW,CAAC,QAAQ,CAA0D,2CAA0C,CAAnI,UAAoI,CAAC,qDAAqD,gCAAgC,CAAC,oDAAoD,8CAA8C,CAAC,iDAA4D,eAAe,CAAC,0BAA0B,CAAC,cAAc,CAAC,iBAAgB,CAArF,UAAsF",sourcesContent:[':root{--vc-picker-bg: #f8f8f8;--vc-body-bg: #fff;--vc-input-bg: #fff;--vc-input-text: #333;--vc-input-label: #969696;--vc-input-border: #dadada;--vc-chrome-toggle-btn-highlighted: #eee;--vc-ps-bg: #dcdcdc;--vc-ps-title-bg-gradient-start: #f0f0f0;--vc-ps-title-bg-gradient-end: #d4d4d4;--vc-ps-title-border: #B1B1B1;--vc-ps-title-color: #4d4d4d;--vc-ps-slider-border: #b3b3b3;--vc-ps-slider-border-bottom: #f0f0f0;--vs-ps-picker-border-dark: #555;--vs-ps-picker-border-white: #fff;--vc-ps-btn-gradient-start: #fff;--vc-ps-btn-gradient-end: #e6e6e6;--vc-ps-btn-border: #878787;--vc-ps-btn-shadow: #EAEAEA;--vc-ps-btn-color: #000;--vc-ps-preview-border: #000;--vc-ps-label: #000;--vc-ps-input-border: #888;--vc-ps-input-shadow-dark: rgba(0,0,0,.1);--vc-ps-input-shadow-light: #ececec;--vc-sketch-input-label: #222;--vc-sketch-presets-border: #eee;--vc-twitter-input-bg: #fff;--vc-twitter-input-border: #f0f0f0;--vc-twitter-input-color: #666;--vc-twitter-hash-bg: #f0f0f0;--vc-twitter-hash-color: #98A1A4}:root.dark{--vc-body-bg: #424242;--vc-picker-bg: #d0d0d0;--vc-input-bg: #2c2c2c;--vc-input-text: #d0d0d0;--vc-input-label: #bbbbbb;--vc-input-border: #555555;--vc-chrome-toggle-btn-highlighted: #5c5c5c;--vc-sketch-input-label: #bbbbbb;--vc-sketch-presets-border: #5a5a5a;--vc-twitter-input-border: #383838;--vc-twitter-input-color: #bbbbbb;--vc-twitter-hash-bg: #383838;--vc-twitter-hash-color: #a0acaf;--vc-twitter-input-bg: #555;--vc-ps-bg: #424242;--vc-ps-title-bg-gradient-start: #4e4e4e;--vc-ps-title-bg-gradient-end: #3a3a3a;--vc-ps-title-border: #5a5a5a;--vc-ps-title-color: #bbbbbb;--vc-ps-slider-border: #5c5c5c;--vc-ps-slider-border-bottom: #4a4a4a;--vs-ps-picker-border-dark: #b8b8b8;--vs-ps-picker-border-white: #bbbbbb;--vc-ps-btn-gradient-start: #505050;--vc-ps-btn-gradient-end: #3a3a3a;--vc-ps-btn-border: #6a6a6a;--vc-ps-btn-shadow: #2a2a2a;--vc-ps-btn-color: #bbbbbb;--vc-ps-preview-border: #3a3a3a;--vc-ps-label: #bbbbbb;--vc-ps-input-border: #666666;--vc-ps-input-shadow-dark: rgba(0, 0, 0, .45);--vc-ps-input-shadow-light: #2d2d2d}.bg[data-v-4d048d6e]{cursor:crosshair;position:absolute;inset:0;touch-action:none}.white[data-v-4d048d6e]{background:linear-gradient(to right,#fff,#fff0)}.black[data-v-4d048d6e]{background:linear-gradient(to top,#000,#0000)}.picker-wrap[data-v-4d048d6e]{cursor:pointer;position:absolute;outline:none}.picker[data-v-4d048d6e]{cursor:move;width:4px;height:4px;box-shadow:0 0 0 1.6px var(--vc-picker-bg),inset 0 0 1px 1px #0000004d,0 0 1px 2px #0006;border-radius:50%;transform:translate(-2px,-2px)}.vc-base-slider[data-v-972b0fad]{position:relative;width:100%;height:100%;touch-action:none}.background[data-v-972b0fad],.slider[data-v-972b0fad]{position:absolute;inset:0}.background[data-v-972b0fad]{overflow:hidden}.slider[data-v-972b0fad]{cursor:pointer;z-index:2}.picker-wrap[data-v-972b0fad]{position:absolute;z-index:2;outline:none}.picker[data-v-972b0fad]{width:4px;height:8px;margin-top:1px;border-radius:1px;box-shadow:0 0 2px #0009;background:var(--vc-picker-bg);cursor:pointer;transform:translate(-2px)}.vc-hue-slider[data-v-5367c985]{cursor:crosshair;touch-action:none}.gradient[data-v-5367c985]{width:100%;height:100%;border-radius:2px;background:var(--2f44f39d)}.vc-checkerboard[data-v-37d61ccd]{position:absolute;inset:0;background-size:contain}.vc-alpha-slider[data-v-07dd346b] .vc-checkerboard{border-radius:2px}.gradient[data-v-07dd346b]{position:absolute;inset:0}.vc-editable-input[data-v-9c267b2b]{position:relative}.vc-input-input[data-v-9c267b2b]{width:100%;padding:0;border:0;outline:none}.vc-input-label[data-v-9c267b2b]{text-transform:capitalize}.vc-chrome-picker[data-v-dfdde7e0]{width:225px;box-sizing:initial;border-radius:2px;box-shadow:0 0 2px #0000004d,0 4px 8px #0000004d;font-family:Menlo,Consolas,Courier New,monospace}.controls[data-v-dfdde7e0]{display:flex}.color-wrap[data-v-dfdde7e0]{position:relative;width:36px}.active-color[data-v-dfdde7e0]{position:relative;width:30px;height:30px;border-radius:15px;overflow:hidden;z-index:1}.color-wrap[data-v-dfdde7e0] .vc-checkerboard{width:30px;height:30px;border-radius:15px;background-size:auto}.sliders[data-v-dfdde7e0]{flex:1}.fieldsWrap[data-v-dfdde7e0]{display:flex;padding-top:16px}.fields[data-v-dfdde7e0]{display:flex;margin-left:-6px;flex:1}.field[data-v-dfdde7e0]{padding-left:6px;width:100%}.toggle-btn[data-v-dfdde7e0]{width:32px;text-align:right;position:relative}.toggle-icon[data-v-dfdde7e0]{position:relative;margin-right:-4px;margin-top:12px;cursor:pointer;z-index:2;color:var(--vc-input-text)}.toggle-icon_highlighted[data-v-dfdde7e0]{position:absolute;width:24px;height:28px;top:10px;left:12px;background:var(--vc-chrome-toggle-btn-highlighted);border-radius:4px}.hue-wrap[data-v-dfdde7e0]{position:relative;height:10px;margin-bottom:8px}.alpha-wrap[data-v-dfdde7e0]{position:relative;height:10px}.hue-wrap[data-v-dfdde7e0] .container,.alpha-wrap[data-v-dfdde7e0] .gradient{border-radius:2px}.hue-wrap[data-v-dfdde7e0] .picker,.alpha-wrap[data-v-dfdde7e0] .picker{width:12px;height:12px;border-radius:6px;transform:translate(-6px,-2px);box-shadow:0 1px 4px #0000005e}.body[data-v-dfdde7e0]{padding:16px 16px 12px;background-color:var(--vc-body-bg)}.saturation[data-v-dfdde7e0]{width:100%;padding-bottom:55%;position:relative;border-radius:2px 2px 0 0;overflow:hidden}.saturation[data-v-dfdde7e0] .picker{width:12px;height:12px;transform:translate(-6px,-6px)}.fields[data-v-dfdde7e0] .vc-input-input{width:100%;height:21px;border-radius:2px;border:none;box-shadow:inset 0 0 0 1px var(--vc-input-border);background-color:var(--vc-input-bg);color:var(--vc-input-text);font-size:11px;text-align:center}.fields[data-v-dfdde7e0] .vc-input-label{display:block;margin-top:12px;font-size:11px;color:var(--vc-input-label);line-height:11px;text-transform:uppercase;text-align:center}.alpha-disabled[data-v-dfdde7e0] .active-color{width:18px;height:18px}.alpha-disabled[data-v-dfdde7e0] .color-wrap{width:30px}.alpha-disabled[data-v-dfdde7e0] .hue-wrap{margin-top:4px;margin-bottom:4px}.vc-compact-picker[data-v-91d11fa7]{width:245px;padding-top:5px;padding-left:5px;border-radius:2px;box-sizing:border-box;box-shadow:0 2px 10px #0000001f,0 2px 5px #00000029;background-color:var(--vc-body-bg)}.colors[data-v-91d11fa7]{overflow:hidden;padding:0;margin:0}.color-item[data-v-91d11fa7]{list-style:none;width:15px;height:15px;float:left;margin-right:5px;margin-bottom:5px;position:relative;cursor:pointer}.color-item_white[data-v-91d11fa7]{box-shadow:inset 0 0 0 1px #ddd}.color-item_white .dot[data-v-91d11fa7]{background:#000}.dot[data-v-91d11fa7]{position:absolute;inset:5px;border-radius:50%;opacity:1;background:#fff}.vc-grayscale-picker[data-v-631223a5]{padding-top:5px;padding-left:5px;width:245px;border-radius:2px;box-sizing:border-box;box-shadow:0 2px 10px #0000001f,0 2px 5px #00000029;background-color:var(--vc-body-bg)}.colors[data-v-631223a5]{overflow:hidden;padding:0;margin:0}.color-item[data-v-631223a5]{list-style:none;width:15px;height:15px;float:left;margin-right:5px;margin-bottom:5px;position:relative;cursor:pointer}.color-item_white[data-v-631223a5]{box-shadow:inset 0 0 0 1px #ddd}.color-item_white .dot[data-v-631223a5]{background:#000}.dot[data-v-631223a5]{position:absolute;inset:5px;border-radius:50%;opacity:1;background:#fff}.vc-material-picker[data-v-8f86229c]{position:relative;width:98px;height:98px;padding:16px;border-radius:2px;box-shadow:0 2px 10px #0000001f,0 2px 5px #00000029;background-color:var(--vc-body-bg);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica Neue,Arial,sans-serif}.vc-material-picker[data-v-8f86229c] .vc-input-input{width:100%;height:30px;margin-top:12px;background-color:var(--vc-body-bg);color:var(--vc-input-text);font-size:15px}.vc-material-picker[data-v-8f86229c] .vc-input-label{position:absolute;top:0;left:0;font-size:11px;color:var(--vc-input-label)}.hex[data-v-8f86229c]{border-bottom-width:2px;border-bottom-style:solid}.rgb[data-v-8f86229c]{display:flex;margin-right:-10px;padding-top:11px}.color[data-v-8f86229c]{flex:1;padding-right:10px}.vc-photoshop-picker[data-v-b69df0e5]{width:513px;background:var(--vc-ps-bg);border-radius:4px;box-shadow:0 0 0 1px #00000040,0 8px 16px #00000026;box-sizing:initial;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica Neue,Arial,sans-serif}.fields_disabled[data-v-b69df0e5]{width:390px}.title[data-v-b69df0e5]{height:23px;background-image:linear-gradient(-180deg,var(--vc-ps-title-bg-gradient-start) 0%,var(--vc-ps-title-bg-gradient-end) 100%);border-bottom:1px solid var(--vc-ps-title-border);border-radius:4px 4px 0 0;box-shadow:inset 0 1px #fff3,inset 0 -1px #00000005;color:var(--vc-ps-title-color);font-size:13px;line-height:24px;text-align:center}.body[data-v-b69df0e5]{padding:15px;display:flex}.saturation[data-v-b69df0e5]{width:256px;height:256px;position:relative;border:2px solid var(--vc-ps-slider-border);border-bottom:2px solid var(--vc-ps-slider-border-bottom);overflow:hidden}.saturation[data-v-b69df0e5] .picker{width:12px;height:12px;transform:translate(-6px,-6px)}.hue[data-v-b69df0e5]{height:256px;width:19px;margin-left:10px;border:2px solid var(--vc-ps-slider-border);border-bottom:2px solid var(--vc-ps-slider-border-bottom)}.hue-picker[data-v-b69df0e5]{position:relative}.hue-picker-left[data-v-b69df0e5],.hue-picker-right[data-v-b69df0e5]{position:absolute;width:0;height:0;border-style:solid;border-width:5px 0 5px 8px;border-color:transparent transparent transparent var(--vs-ps-picker-border-dark);cursor:pointer}.hue-picker-left[data-v-b69df0e5]:after,.hue-picker-right[data-v-b69df0e5]:after{content:"";width:0;height:0;border-style:solid;border-width:4px 0 4px 6px;border-color:transparent transparent transparent var(--vs-ps-picker-border-white);position:absolute;top:1px;left:1px;transform:translate(-8px,-5px)}.hue-picker-left[data-v-b69df0e5]{transform:translate(-10px,-4px)}.hue-picker-right[data-v-b69df0e5]{transform:translate(21px,-4px) rotate(180deg)}.controls[data-v-b69df0e5]{width:180px;margin-left:10px;display:flex}.controls_fields_disabled[data-v-b69df0e5]{width:auto}.actions[data-v-b69df0e5]{margin-left:20px;flex:1}.action-btn[data-v-b69df0e5]{height:20px;margin-bottom:10px;background-image:linear-gradient(-180deg,var(--vc-ps-btn-gradient-start) 0%,var(--vc-ps-btn-gradient-end) 100%);border:1px solid var(--vc-ps-btn-border);border-radius:2px;box-shadow:0 1px 0 0 var(--vc-ps-btn-shadow);cursor:pointer;color:var(--vc-ps-btn-color);font-size:14px;line-height:20px;text-align:center}.preview[data-v-b69df0e5]{width:60px}.preview-swatches[data-v-b69df0e5]{border:1px solid var(--vc-ps-slider-border);border-bottom:1px solid var(--vc-ps-slider-border-bottom);margin-bottom:2px;margin-top:1px}.preview-color[data-v-b69df0e5]{height:34px;box-shadow:inset 1px 0 var(--vc-ps-preview-border),inset -1px 0 var(--vc-ps-preview-border),inset 0 1px var(--vc-ps-preview-border)}.preview-label[data-v-b69df0e5]{color:var(--vc-ps-label);font-size:14px;text-align:center}.fields[data-v-b69df0e5]{padding-top:5px;padding-bottom:9px;width:80px;position:relative}.fields[data-v-b69df0e5] .vc-input-input{width:40%;height:18px;margin-left:40%;margin-right:10px;margin-bottom:5px;padding-left:3px;border:1px solid var(--vc-ps-input-border);box-shadow:inset 0 1px 1px var(--vc-ps-input-shadow-dark),0 1px 0 0 var(--vc-ps-input-shadow-light);background-color:var(--vc-input-bg);color:var(--vc-ps-label);font-size:13px}.fields[data-v-b69df0e5] .vc-input-label,.fields[data-v-b69df0e5] .vc-input-desc{position:absolute;top:0;height:18px;color:var(--vc-ps-label);font-size:13px;line-height:22px;text-transform:uppercase}.fields[data-v-b69df0e5] .vc-input-label{left:0;width:34px}.fields[data-v-b69df0e5] .vc-input-desc{right:0;width:0}.fields-divider[data-v-b69df0e5]{height:5px}.hex[data-v-b69df0e5] .vc-input-input{width:80%;height:18px;margin-left:20%;margin-bottom:6px;padding-left:3px;border:1px solid var(--vc-ps-input-border);box-shadow:inset 0 1px 1px var(--vc-ps-input-shadow-dark),0 1px 0 0 var(--vc-ps-input-shadow-light);font-size:13px}.hex[data-v-b69df0e5] .vc-input-label{position:absolute;top:0;left:0;width:14px;text-transform:uppercase;font-size:13px;height:18px;line-height:22px}.vc-sketch-picker[data-v-fdb7d989]{position:relative;width:200px;padding:10px 10px 0;box-sizing:initial;background:var(--vc-body-bg);border-radius:4px;box-shadow:0 0 0 1px #00000026,0 8px 16px #00000026;font-family:Menlo,Consolas,Courier New,monospace}.saturation[data-v-fdb7d989]{width:100%;padding-bottom:75%;position:relative;overflow:hidden}.controls[data-v-fdb7d989]{display:flex}.sliders[data-v-fdb7d989]{padding:4px 0;flex:1}.hue[data-v-fdb7d989] .container,.alpha[data-v-fdb7d989] .gradient{border-radius:2px}.hue[data-v-fdb7d989]{position:relative;height:10px}.alpha[data-v-fdb7d989]{position:relative;height:10px;margin-top:4px;overflow:hidden}.color[data-v-fdb7d989]{width:24px;height:24px;position:relative;margin-top:4px;margin-left:4px;border-radius:2px;overflow:hidden}.active-color[data-v-fdb7d989]{position:absolute;inset:0;box-shadow:inset 0 0 0 1px #00000026,inset 0 0 4px #00000040;z-index:2}.color[data-v-fdb7d989] .vc-checkerboard{background-size:auto}.field[data-v-fdb7d989]{display:flex;padding-top:4px}.field[data-v-fdb7d989] .vc-input-input{width:90%;padding:4px 0 3px 10%;border:none;box-shadow:inset 0 0 0 1px var(--vc-input-border);background-color:var(--vc-input-bg);color:var(--vc-input-text);font-size:10px}.field[data-v-fdb7d989] .vc-input-label{display:block;padding-top:3px;padding-bottom:4px;color:var(--vc-sketch-input-label);font-size:11px;text-align:center}.field_single[data-v-fdb7d989]{flex:1;padding-left:6px}.field_double[data-v-fdb7d989]{flex:2}.presets[data-v-fdb7d989]{margin-right:-10px;margin-left:-10px;padding-left:10px;padding-top:10px;border-top:1px solid var(--vc-sketch-presets-border)}.preset-color[data-v-fdb7d989]{border-radius:3px;overflow:hidden;position:relative;display:inline-block;margin:0 10px 10px 0;vertical-align:top;cursor:pointer;width:16px;height:16px;box-shadow:inset 0 0 0 1px #00000026}.preset-color[data-v-fdb7d989] .vc-checkerboard{box-shadow:inset 0 0 0 1px #00000026;border-radius:3px}.alpha-disabled .color[data-v-fdb7d989]{height:10px}.vc-slider-picker[data-v-675d6988]{position:relative;width:410px}.hue[data-v-675d6988]{height:12px;position:relative}.hue[data-v-675d6988] .picker,.alpha[data-v-675d6988] .picker{width:14px;height:14px;border-radius:6px;box-shadow:0 1px 4px #0000005e;transform:translate(-7px,-2px)}.alpha[data-v-675d6988]{height:12px;position:relative;margin-top:20px}.swatches[data-v-675d6988]{display:flex;margin-top:20px}.swatch[data-v-675d6988]{margin-right:1px;flex:1;width:20%}.swatch[data-v-675d6988]:first-child{margin-right:1px}.swatch:first-child .picker[data-v-675d6988]{border-radius:2px 0 0 2px}.swatch[data-v-675d6988]:last-child{margin-right:0}.swatch:last-child .picker[data-v-675d6988]{border-radius:0 2px 2px 0}.picker[data-v-675d6988]{cursor:pointer;height:12px}.swatch:nth-child(n) .picker_active[data-v-675d6988]{transform:scaleY(1.8);border-radius:3.6px/2px}.picker_white[data-v-675d6988]{box-shadow:inset 0 0 0 1px #ddd}.picker_active.picker_white[data-v-675d6988]{box-shadow:inset 0 0 0 .6px #ddd}.vc-swatches-picker[data-v-3427cb2a]{width:320px;height:240px;overflow-y:scroll;background-color:var(--vc-body-bg);box-shadow:0 2px 10px #0000001f,0 2px 5px #00000029}.box[data-v-3427cb2a]{padding:16px 0 6px 16px;overflow:hidden}.colorGroup[data-v-3427cb2a]{padding-bottom:10px;width:40px;float:left;margin-right:10px}.color[data-v-3427cb2a]{box-sizing:border-box;width:40px;height:24px;margin-bottom:1px;cursor:pointer;overflow:hidden;-ms-border-radius:2px 2px 0 0;-moz-border-radius:2px 2px 0 0;-o-border-radius:2px 2px 0 0;-webkit-border-radius:2px 2px 0 0;border-radius:2px 2px 0 0}.color_white[data-v-3427cb2a]{border:1px solid #ddd}.picker[data-v-3427cb2a]{display:block;fill:#fff;margin-left:8px}.color_white .picker[data-v-3427cb2a]{fill:#333}.vc-twitter-picker[data-v-e74ac697]{position:relative;background:var(--vc-body-bg);border:0 solid rgba(0,0,0,.25);box-shadow:0 1px 4px #00000040;border-radius:4px}.triangle[data-v-e74ac697]{position:absolute;width:0px;height:0px;border-style:solid;border-width:0 9px 10px 9px;border-color:transparent transparent var(--vc-body-bg) transparent}.triangle_shadow[data-v-e74ac697]{width:0px;height:0px;border-style:solid;border-width:0 9px 10px 9px;border-color:transparent transparent rgba(0,0,0,.1) transparent;position:absolute}.body[data-v-e74ac697]{padding:15px 9px 9px 15px}.vc-twitter-picker[data-v-e74ac697] .vc-editable-input{position:relative}.vc-twitter-picker[data-v-e74ac697] .vc-input-input{float:left;width:100px;height:28px;padding:1px 1px 1px 8px;outline:none;box-shadow:inset 0 0 0 1px var(--vc-twitter-input-border);box-sizing:content-box;border:0px;border-radius:0 4px 4px 0;background-color:var(--vc-twitter-input-bg);color:var(--vc-twitter-input-color);font-size:14px}.vc-twitter-picker[data-v-e74ac697] .vc-editable-input span{display:none}.hash[data-v-e74ac697]{float:left;display:flex;align-items:center;justify-content:center;height:30px;width:30px;border-radius:4px 0 0 4px;background:var(--vc-twitter-hash-bg);color:var(--vc-twitter-hash-color)}.swatch[data-v-e74ac697]{width:30px;height:30px;float:left;border-radius:4px;margin:0 6px 6px 0;cursor:pointer;position:relative;outline:none}.clear[data-v-e74ac697]{clear:both}.tri_hide .triangle[data-v-e74ac697],.tri_hide .triangle_shadow[data-v-e74ac697]{display:none}.tri_top_left .triangle[data-v-e74ac697]{top:-10px;left:12px}.tri_top_left .triangle_shadow[data-v-e74ac697]{top:-11px;left:12px}.tri_top_right .triangle[data-v-e74ac697]{top:-10px;right:12px}.tri_top_right .triangle_shadow[data-v-e74ac697]{top:-11px;right:12px}.vc-hue-wrap[data-v-b3ac1ab2]{height:8px}.vc-hue-wrap[data-v-b3ac1ab2] .slider{border-radius:4px}.vc-hue-wrap[data-v-b3ac1ab2] .picker{width:20px;height:20px;margin:0;border-radius:50%;box-shadow:none;border:2px white solid;background-color:var(--46ac36b6);transform:translate(-12px) translateY(-8px)}.vc-hsl-sliders[data-v-2e071f54]{position:relative;width:100%;font-family:Menlo,Consolas,Courier New,monospace}.slider-wrap[data-v-2e071f54]{display:flex;gap:12px;height:24px;margin-bottom:10px}.slider-wrap[data-v-2e071f54]:last-of-type{margin-bottom:0}.label[data-v-2e071f54]{display:block;height:24px;color:var(--vc-input-text);font-size:12px;line-height:24px;text-transform:uppercase;text-align:center}.vc-hsl-sliders[data-v-2e071f54] .vc-base-slider{margin-top:5px;height:14px}.vc-hsl-sliders[data-v-2e071f54] .background{border-radius:4px;border:1px solid var(--vc-input-border)}.gradient[data-v-2e071f54]{width:100%;height:100%}.vc-hsl-sliders[data-v-2e071f54] .picker{width:20px;height:20px;margin:0;border-radius:50%;box-shadow:none;border:2px white solid;transform:translate(-12px) translateY(-5px)}.h-slider[data-v-2e071f54] .picker{background-color:var(--41b5b6d0)}.s-slider[data-v-2e071f54] .picker,.l-slider[data-v-2e071f54] .picker{background-color:var(--05fbe691)}.vc-hsl-sliders[data-v-2e071f54] .vc-editable-input{border-bottom:1px solid var(--vc-input-border)}.vc-hsl-sliders[data-v-2e071f54] .vc-input-input{width:50px;background:none;color:var(--vc-input-text);font-size:12px;text-align:center}.vc-hsv-sliders[data-v-d6cfe1d9]{position:relative;width:100%;font-family:Menlo,Consolas,Courier New,monospace}.slider-wrap[data-v-d6cfe1d9]{display:flex;gap:12px;height:24px;margin-bottom:10px}.slider-wrap[data-v-d6cfe1d9]:last-of-type{margin-bottom:0}.label[data-v-d6cfe1d9]{display:block;height:24px;color:var(--vc-input-text);font-size:12px;line-height:24px;text-transform:uppercase;text-align:center}.vc-hsv-sliders[data-v-d6cfe1d9] .vc-base-slider{margin-top:5px;height:14px}.vc-hsv-sliders[data-v-d6cfe1d9] .background{border-radius:4px;border:1px solid var(--vc-input-border)}.gradient[data-v-d6cfe1d9]{width:100%;height:100%}.vc-hsv-sliders[data-v-d6cfe1d9] .picker{width:20px;height:20px;margin:0;border-radius:50%;box-shadow:none;border:2px white solid;transform:translate(-12px) translateY(-5px)}.h-slider[data-v-d6cfe1d9] .picker{background-color:var(--f666f450)}.s-slider[data-v-d6cfe1d9] .picker,.b-slider[data-v-d6cfe1d9] .picker{background-color:var(--46b90cce)}.vc-hsv-sliders[data-v-d6cfe1d9] .vc-editable-input{border-bottom:1px solid var(--vc-input-border)}.vc-hsv-sliders[data-v-d6cfe1d9] .vc-input-input{width:50px;background:none;color:var(--vc-input-text);font-size:12px;text-align:center}.vc-rgb-sliders[data-v-98b3b212]{position:relative;width:100%;font-family:Menlo,Consolas,Courier New,monospace}.slider-wrap[data-v-98b3b212]{display:flex;gap:12px;height:24px;margin-bottom:10px}.slider-wrap[data-v-98b3b212]:last-of-type{margin-bottom:0}.label[data-v-98b3b212]{display:block;height:24px;color:var(--vc-input-text);font-size:12px;line-height:24px;text-transform:uppercase;text-align:center}.vc-rgb-sliders[data-v-98b3b212] .vc-base-slider{margin-top:5px;height:14px}.vc-rgb-sliders[data-v-98b3b212] .background{border-radius:4px;border:1px solid var(--vc-input-border)}.gradient[data-v-98b3b212]{width:100%;height:100%}.vc-rgb-sliders[data-v-98b3b212] .picker{width:20px;height:20px;margin:0;border-radius:50%;box-shadow:none;border:2px white solid;transform:translate(-12px) translateY(-5px)}.slider-wrap[data-v-98b3b212]:not(.a-slider) .picker{background-color:var(--5f730604)}.vc-rgb-sliders[data-v-98b3b212] .vc-editable-input{border-bottom:1px solid var(--vc-input-border)}.vc-rgb-sliders[data-v-98b3b212] .vc-input-input{width:50px;background:none;color:var(--vc-input-text);font-size:12px;text-align:center}\n'],sourceRoot:""}]);const a=s;n.d(t,["A",0,a])},539(e,t,n){"use strict";var r=n(627),i=n.n(r),o=n(798),s=n.n(o)()(i());s.push([e.id,".trp-ald-configurator[data-v-7445ae44]{flex-direction:column;max-width:1280px}.trp-ald-configurator[data-v-7445ae44],.trp-ald-configurator__main[data-v-7445ae44]{display:flex;gap:16px;width:100%}.trp-ald-configurator__left[data-v-7445ae44]{min-width:0;width:40%}.trp-ald-configurator__right[data-v-7445ae44]{display:flex;flex-direction:column;gap:16px;min-width:0;width:60%}.trp-ald-sticky-box[data-v-7445ae44]{position:sticky;top:50px}.trp-ald-configurator[data-v-7445ae44] .trp-settings-warning{max-width:none;width:100%}","",{version:3,sources:["webpack://./assets/src/automatic-language-detection/App.vue"],names:[],mappings:"AAyWA,uCAEI,qBAAsB,CAEtB,gBAEJ,CAEA,oFAPI,YAAa,CAEb,QAAS,CAET,UAOJ,CAEA,6CACI,WAAY,CACZ,SACJ,CAEA,8CACI,YAAa,CACb,qBAAsB,CACtB,QAAS,CACT,WAAY,CACZ,SACJ,CAEA,qCACI,eAAgB,CAChB,QACJ,CAEA,6DAEI,cAAe,CADf,UAEJ",sourcesContent:["<script setup>\nimport { computed, provide, reactive } from 'vue'\nimport { __ } from '@wordpress/i18n'\n\nimport SettingsBox from '../shared/components/SettingsBox.vue'\nimport SettingsActions from '../shared/components/SettingsActions.vue'\nimport PresetApplier from '../shared/components/PresetApplier.vue'\nimport { useSettingsPersistence } from '../shared/composables/useSettingsPersistence'\nimport PopupPreview from './components/PopupPreview.vue'\nimport { popupPresets } from './presets/popupPresets'\n\nconst payload = window.tpAldConfiguratorData || {}\nconst cfg = reactive(payload.config || {})\nconst previewBgUrl = computed(() => `url(${payload.misc?.pluginUrl || ''}assets/images/switcher-preview-bg.png)`)\nconst languages = computed(() => payload.languages || {})\n\nconst persistence = useSettingsPersistence(cfg, {\n action: 'trp_ald_popup_config_save',\n nonce: payload.nonce,\n})\n\nprovide('settingsPersistence', persistence)\n\nconst T = {\n preview: __('Popup Preview', 'translatepress-multilingual'),\n detectionMethod: __('User Language Detection Method', 'translatepress-multilingual'),\n notificationBehavior: __('Notification Behavior', 'translatepress-multilingual'),\n popupContent: __('Popup Content', 'translatepress-multilingual'),\n applyPreset: __('Apply a preset', 'translatepress-multilingual'),\n languageSwitcher: __('Language Switcher', 'translatepress-multilingual'),\n customizeDesign: __('Customize Design', 'translatepress-multilingual'),\n languageDetection: __('Language detection', 'translatepress-multilingual'),\n detectionDescription: __(\"Select how the language should be detected for first time visitors.<br>The visitor's last displayed language will be remembered through cookies.\", 'translatepress-multilingual'),\n popupDisplay: __('Popup display', 'translatepress-multilingual'),\n popupLanguages: __('Conditionally display popup based on language', 'translatepress-multilingual'),\n contentRestrictionMode: __('Content Restriction Mode', 'translatepress-multilingual'),\n include: __('Include', 'translatepress-multilingual'),\n exclude: __('Exclude', 'translatepress-multilingual'),\n selectLanguage: __('Select language', 'translatepress-multilingual'),\n noLanguagesSelected: __('No languages selected', 'translatepress-multilingual'),\n popupType: __('Popup Type', 'translatepress-multilingual'),\n noPopupPreview: __('Visitors will be redirected directly when a different preferred language is detected.', 'translatepress-multilingual'),\n popupText: __('Popup Text', 'translatepress-multilingual'),\n buttonText: __('Button Text', 'translatepress-multilingual'),\n closeButtonText: __('Close Button Text', 'translatepress-multilingual'),\n backgroundColor: __('Background color', 'translatepress-multilingual'),\n textColor: __('Text color', 'translatepress-multilingual'),\n buttonBackgroundColor: __('Button background color', 'translatepress-multilingual'),\n buttonHoverColor: __('Button hover color', 'translatepress-multilingual'),\n buttonTextColor: __('Button text color', 'translatepress-multilingual'),\n buttonBorderRadius: __('Button border radius', 'translatepress-multilingual'),\n closeTextColor: __('Close icon color', 'translatepress-multilingual'),\n borderColor: __('Border color', 'translatepress-multilingual'),\n borderWidth: __('Border width', 'translatepress-multilingual'),\n borderRadius: __('Border radius', 'translatepress-multilingual'),\n overlayColor: __('Overlay color', 'translatepress-multilingual'),\n entranceAnimation: __('Entrance animation', 'translatepress-multilingual'),\n animation: __('Animation', 'translatepress-multilingual'),\n fade: __('Fade', 'translatepress-multilingual'),\n slideTop: __('Slide from top', 'translatepress-multilingual'),\n slideRight: __('Slide from right', 'translatepress-multilingual'),\n slideBottom: __('Slide from bottom', 'translatepress-multilingual'),\n slideLeft: __('Slide from left', 'translatepress-multilingual'),\n customCss: __('Enable custom CSS', 'translatepress-multilingual'),\n languageNames: __('Language names', 'translatepress-multilingual'),\n fullNames: __('Full names', 'translatepress-multilingual'),\n shortNames: __('Short names', 'translatepress-multilingual'),\n noNames: __('No names', 'translatepress-multilingual'),\n showFlags: __('Show flags', 'translatepress-multilingual'),\n flagShape: __('Flag shape', 'translatepress-multilingual'),\n rectangle: __('Rectangle (4:3)', 'translatepress-multilingual'),\n square: __('Square (1:1)', 'translatepress-multilingual'),\n flagRadius: __('Flag border radius', 'translatepress-multilingual'),\n switcherBackground: __('Switcher background', 'translatepress-multilingual'),\n switcherHoverBackground: __('Switcher hover background', 'translatepress-multilingual'),\n switcherText: __('Switcher text', 'translatepress-multilingual'),\n switcherHoverText: __('Switcher hover text', 'translatepress-multilingual'),\n switcherBorder: __('Switcher border', 'translatepress-multilingual'),\n switcherBorderWidth: __('Switcher border width', 'translatepress-multilingual'),\n switcherBorderRadius: __('Switcher border radius', 'translatepress-multilingual'),\n}\n\nconst detectionOptions = computed(() => payload.detectionOptions || [\n { value: 'browser-ip', label: __('First by browser language, then IP address (recommended)', 'translatepress-multilingual') },\n])\n\nconst popupOptions = computed(() => payload.popupOptions || [\n { value: 'popup', label: __('A popup appears asking the user if they want to be redirected', 'translatepress-multilingual') },\n])\n\nconst popupTypeOptions = computed(() => payload.popupTypeOptions || [\n { value: 'normal_popup', label: __('Pop-up window over the content', 'translatepress-multilingual') },\n { value: 'hello_bar', label: __('Hello bar before the content', 'translatepress-multilingual') },\n])\n\nconst languageOptions = computed(() => {\n const published = languages.value?.published || {}\n const pluginUrl = payload.misc?.pluginUrl || ''\n\n return Object.entries(published).map(([value, settings]) => ({\n value,\n label: settings.name || value,\n flagUrl: settings.flagPath || `${pluginUrl}assets/flags/4x3/${encodeURIComponent(String(value).replace(/-/g, '_') + '.svg')}`,\n }))\n})\n\nconst notificationBehaviorFields = computed(() => [\n {\n key: 'popup_option',\n type: 'radio',\n label: T.popupDisplay,\n options: popupOptions.value,\n layout: 'column',\n visible: () => popupOptions.value.length > 1\n },\n {\n key: 'popup_type',\n type: 'radio',\n label: T.popupType,\n options: popupTypeOptions.value,\n layout: 'column',\n visible: cfg => cfg.popup_option === 'popup'\n },\n {\n key: 'popupLanguageConditionEnabled',\n type: 'languageCondition',\n label: T.popupLanguages,\n default: false,\n modeKey: 'popupLanguageConditionMode',\n languagesKey: 'popup_languages',\n options: languageOptions.value,\n modeLabel: T.contentRestrictionMode,\n includeLabel: T.include,\n excludeLabel: T.exclude,\n selectLabel: T.selectLanguage,\n emptyLabel: T.noLanguagesSelected,\n layout: 'column',\n visible: cfg => cfg.popup_option === 'popup'\n }\n])\n\nfunction getPresetSettings(preset, targetConfig = cfg) {\n const settings = { ...(preset.settings || {}) }\n\n if (preset.id === 'default' && targetConfig.popup_type === 'hello_bar')\n settings.borderWidth = 0\n\n return settings\n}\n\nfunction applyPopupPreset(preset, targetConfig) {\n Object.assign(targetConfig, getPresetSettings(preset, targetConfig))\n}\n\nfunction getPresetPreviewProps(previewConfig, preset) {\n const nextConfig = {\n ...previewConfig,\n ...getPresetSettings(preset, previewConfig),\n }\n\n return {\n emptyPreviewText: T.noPopupPreview,\n backgroundImage: previewBgUrl.value,\n compact: true,\n languages: languages.value,\n config: nextConfig,\n }\n}\n\nconst customizeDesignFields = computed(() => [\n { key: 'backgroundColor', type: 'color', label: T.backgroundColor },\n { key: 'textColor', type: 'color', label: T.textColor },\n { key: 'closeTextColor', type: 'color', label: T.closeTextColor },\n { key: 'borderColor', type: 'color', label: T.borderColor },\n { key: 'borderWidth', type: 'number', label: T.borderWidth },\n { key: 'borderRadius', type: 'number', label: T.borderRadius },\n { key: 'overlayColor', type: 'color', label: T.overlayColor, visible: cfg => cfg?.popup_type !== 'hello_bar' },\n { type: 'separator' },\n { key: 'buttonBackgroundColor', type: 'color', label: T.buttonBackgroundColor },\n { key: 'buttonHoverColor', type: 'color', label: T.buttonHoverColor },\n { key: 'buttonTextColor', type: 'color', label: T.buttonTextColor },\n { key: 'buttonBorderRadius', type: 'number', label: T.buttonBorderRadius },\n { type: 'separator' },\n { key: 'popupAnimationEnabled', type: 'toggle', label: T.entranceAnimation, default: true },\n {\n key: 'popupAnimation',\n type: 'select',\n label: T.animation,\n default: 'fade',\n options: [\n { value: 'fade', label: T.fade },\n { value: 'slide_top', label: T.slideTop },\n { value: 'slide_right', label: T.slideRight },\n { value: 'slide_bottom', label: T.slideBottom },\n { value: 'slide_left', label: T.slideLeft }\n ],\n visible: cfg => cfg?.popupAnimationEnabled !== false\n },\n { type: 'separator' },\n { key: 'enableCustomCss', type: 'toggle', label: T.customCss, default: false },\n { key: 'customCss', type: 'customCss', label: '', scopeSelector: '.trp-ald-custom-popup', visible: cfg => cfg?.enableCustomCss === true }\n])\n<\/script>\n\n<template>\n <div class=\"trp-ald-configurator\">\n <div class=\"trp-ald-configurator__main\">\n <div class=\"trp-ald-configurator__left\">\n <div class=\"trp-ald-sticky-box\">\n <SettingsBox\n :title=\"T.preview\"\n :config=\"cfg\"\n >\n <PopupPreview\n :config=\"cfg\"\n :empty-preview-text=\"T.noPopupPreview\"\n :background-image=\"previewBgUrl\"\n :languages=\"languages\"\n />\n </SettingsBox>\n\n <SettingsActions />\n </div>\n </div>\n\n <div class=\"trp-ald-configurator__right\">\n\n <SettingsBox\n :title=\"T.notificationBehavior\"\n :config=\"cfg\"\n :fields=\"notificationBehaviorFields\"\n />\n\n <SettingsBox\n :title=\"T.popupContent\"\n :config=\"cfg\"\n v-if=\"cfg.popup_option === 'popup'\"\n :style=\"{ '--trp-field-label-width': '160px' }\"\n :fields=\"[\n {\n key: 'popup_textarea',\n type: 'textarea',\n label: T.popupText\n },\n {\n key: 'popup_textarea_button',\n type: 'text',\n label: T.buttonText\n },\n {\n key: 'popup_textarea_close_button',\n type: 'text',\n label: T.closeButtonText\n }\n ]\"\n />\n\n <SettingsBox\n :title=\"T.applyPreset\"\n :config=\"cfg\"\n v-if=\"cfg.popup_option === 'popup'\"\n >\n <PresetApplier\n :config=\"cfg\"\n :presets=\"popupPresets\"\n :preview-component=\"PopupPreview\"\n :apply-preset=\"applyPopupPreset\"\n :get-preview-props=\"getPresetPreviewProps\"\n :preview-props=\"{\n emptyPreviewText: T.noPopupPreview,\n backgroundImage: previewBgUrl,\n compact: true,\n languages\n }\"\n />\n </SettingsBox>\n\n <SettingsBox\n :title=\"T.languageSwitcher\"\n :config=\"cfg\"\n v-if=\"cfg.popup_option === 'popup'\"\n collapsible\n :style=\"{ '--trp-field-label-width': '190px' }\"\n :fields=\"[\n {\n key: 'aldSwitcherLanguageNames',\n type: 'radio',\n label: T.languageNames,\n default: 'full',\n options: [\n { value: 'full', label: T.fullNames },\n { value: 'short', label: T.shortNames },\n { value: 'none', label: T.noNames }\n ],\n layout: 'column'\n },\n { key: 'aldSwitcherShowFlags', type: 'toggle', label: T.showFlags, default: true, compact: true },\n {\n key: 'aldSwitcherFlagShape',\n type: 'radio',\n label: T.flagShape,\n default: 'rect',\n options: [\n { value: 'rect', label: T.rectangle },\n { value: 'square', label: T.square }\n ],\n layout: 'column',\n visible: cfg => cfg?.aldSwitcherShowFlags !== false\n },\n { key: 'aldSwitcherFlagRadius', type: 'number', label: T.flagRadius, default: 2, visible: cfg => cfg?.aldSwitcherShowFlags !== false },\n { type: 'separator' },\n { key: 'aldSwitcherBackgroundColor', type: 'color', label: T.switcherBackground },\n { key: 'aldSwitcherBackgroundHoverColor', type: 'color', label: T.switcherHoverBackground },\n { key: 'aldSwitcherTextColor', type: 'color', label: T.switcherText },\n { key: 'aldSwitcherTextHoverColor', type: 'color', label: T.switcherHoverText },\n { type: 'separator' },\n { key: 'aldSwitcherBorderColor', type: 'color', label: T.switcherBorder },\n { key: 'aldSwitcherBorderWidth', type: 'number', label: T.switcherBorderWidth },\n { key: 'aldSwitcherBorderRadius', type: 'number', label: T.switcherBorderRadius }\n ]\"\n />\n\n <SettingsBox\n :title=\"T.customizeDesign\"\n :config=\"cfg\"\n v-if=\"cfg.popup_option === 'popup'\"\n collapsible\n :style=\"{ '--trp-field-label-width': '190px' }\"\n :fields=\"customizeDesignFields\"\n />\n\n <SettingsBox\n :title=\"T.detectionMethod\"\n :config=\"cfg\"\n collapsible\n :fields=\"[\n {\n key: 'detection-method',\n type: 'radio',\n label: T.languageDetection,\n options: detectionOptions,\n columns: 2,\n layout: 'column'\n }\n ]\"\n >\n <template #end>\n <span class=\"trp-description-text\" v-html=\"T.detectionDescription\" />\n <div\n v-if=\"payload.ipWarningMessage\"\n class=\"trp-settings-warning\"\n v-html=\"payload.ipWarningMessage\"\n />\n </template>\n </SettingsBox>\n </div>\n </div>\n </div>\n</template>\n\n<style scoped>\n.trp-ald-configurator {\n display: flex;\n flex-direction: column;\n gap: 16px;\n max-width: 1280px;\n width: 100%;\n}\n\n.trp-ald-configurator__main {\n display: flex;\n gap: 16px;\n width: 100%;\n}\n\n.trp-ald-configurator__left {\n min-width: 0;\n width: 40%;\n}\n\n.trp-ald-configurator__right {\n display: flex;\n flex-direction: column;\n gap: 16px;\n min-width: 0;\n width: 60%;\n}\n\n.trp-ald-sticky-box {\n position: sticky;\n top: 50px;\n}\n\n.trp-ald-configurator :deep(.trp-settings-warning) {\n width: 100%;\n max-width: none;\n}\n</style>\n"],sourceRoot:""}]);const a=s;n.d(t,["A",0,a])},347(e,t,n){"use strict";var r=n(627),i=n.n(r),o=n(798),s=n.n(o)()(i());s.push([e.id,".trp-shortcode-switcher__wrapper[data-v-7ee6f04c]{--bg:var(--trp-ald-switcher-bg);--bg-hover:var(--trp-ald-switcher-bg-hover);--text:var(--trp-ald-switcher-text);--text-hover:var(--trp-ald-switcher-text-hover);--border-color:var(--trp-ald-switcher-border);--border:var(--trp-ald-switcher-border-width) solid var(--trp-ald-switcher-border);--border-radius:var(--trp-ald-switcher-radius);--font-size:14px;--flag-size:18px;--flag-radius:2px;--aspect-ratio:4/3;--transition-duration:0.2s;border:none;max-width:100%;position:relative;width:-moz-max-content;width:max-content}.trp-language-switcher[data-v-7ee6f04c]{background:var(--bg);border:var(--border);border-radius:var(--border-radius);box-shadow:0 10px 20px 0 #0000000d;box-sizing:border-box;display:inline-block;min-height:42px;overflow:hidden;padding:0;position:static;width:100%}.trp-shortcode-anchor[data-v-7ee6f04c]:not(.trp-opposite-button){visibility:hidden}.trp-shortcode-overlay[data-v-7ee6f04c]{left:0;position:absolute;top:0;z-index:5}.trp-language-switcher-inner[data-v-7ee6f04c]{display:flex;flex-direction:column}.trp-current-language-item__wrapper[data-v-7ee6f04c]:not(.trp-hide-arrow){align-items:center;display:flex;justify-content:space-between;padding-right:8px}.trp-switcher-dropdown-list[data-v-7ee6f04c]{display:flex;flex-direction:column;max-height:0;overflow:hidden;transition:max-height .2s ease-in-out;transition-duration:var(--transition-duration)}.trp-ls-dropdown.is-open .trp-switcher-dropdown-list[data-v-7ee6f04c],.trp-ls-dropdown[aria-expanded=true] .trp-switcher-dropdown-list[data-v-7ee6f04c],.trp-shortcode-switcher.trp-open-on-hover.is-open .trp-switcher-dropdown-list[data-v-7ee6f04c],.trp-shortcode-switcher[aria-expanded=true] .trp-switcher-dropdown-list[data-v-7ee6f04c]{max-height:calc(var(--trp-ald-preview-language-item-height, 40px)*var(--trp-ald-preview-dropdown-items, 2));overflow:hidden}.trp-shortcode-switcher.is-open .trp-shortcode-arrow[data-v-7ee6f04c]{transform:rotate(180deg)}.trp-shortcode-arrow[data-v-7ee6f04c]{flex:0 0 auto;pointer-events:none}.trp-ald-language-selector[data-v-7ee6f04c] .trp-language-item{box-sizing:border-box;min-height:40px;padding:0 8px;text-decoration:none}.trp-ald-language-selector[data-v-7ee6f04c] .trp-switcher-dropdown-list .trp-language-item{width:100%}.trp-ald-language-selector[data-v-7ee6f04c] .trp-language-item__current{flex:0 1 auto;min-width:0;width:auto}.trp-ald-language-selector[data-v-7ee6f04c] .trp-language-item:focus-visible,.trp-ald-language-selector[data-v-7ee6f04c] .trp-language-item:hover{background:var(--bg-hover);color:var(--text-hover)}.trp-ald-language-selector[data-v-7ee6f04c] .trp-language-item:focus-visible{outline:2px solid var(--text);outline-offset:-2px}.trp-ald-language-selector[data-v-7ee6f04c] .trp-language-item:focus-visible .trp-language-item-name,.trp-ald-language-selector[data-v-7ee6f04c] .trp-language-item:hover .trp-language-item-name{color:var(--text-hover)}.trp-ald-language-selector[data-v-7ee6f04c] .trp-language-item-name{max-width:105px}.trp-ald-language-selector-wrapper--compact[data-v-7ee6f04c]{--trp-ald-preview-dropdown-items:2}","",{version:3,sources:["webpack://./assets/src/automatic-language-detection/components/AldLanguageSelector.vue"],names:[],mappings:"AAoPA,kDAKI,+BAAgC,CAChC,2CAA4C,CAC5C,mCAAoC,CACpC,+CAAgD,CAChD,6CAA8C,CAC9C,kFAAmF,CACnF,8CAA+C,CAC/C,gBAAiB,CACjB,gBAAiB,CACjB,iBAAkB,CAClB,kBAAmB,CACnB,0BAA2B,CAZ3B,WAAY,CADZ,cAAe,CAFf,iBAAkB,CAClB,sBAAkB,CAAlB,iBAeJ,CAEA,wCASI,oBAAqB,CAFrB,oBAAqB,CACrB,kCAAmC,CAEnC,kCAAmC,CACnC,qBAAsB,CATtB,oBAAqB,CAGrB,eAAgB,CAFhB,eAAgB,CAGhB,SAAU,CALV,eAAgB,CAGhB,UAQJ,CAEA,iEACI,iBACJ,CAEA,wCAEI,MAAO,CADP,iBAAkB,CAElB,KAAM,CACN,SACJ,CAEA,8CACI,YAAa,CACb,qBACJ,CAEA,0EAEI,kBAAmB,CADnB,YAAa,CAGb,6BAA8B,CAD9B,iBAEJ,CAEA,6CACI,YAAa,CACb,qBAAsB,CACtB,YAAa,CACb,eAAgB,CAChB,qCAAuC,CACvC,8CACJ,CAEA,gVAII,2GAA8G,CAC9G,eACJ,CAEA,sEACI,wBACJ,CAEA,sCAEI,aAAc,CADd,mBAEJ,CAEA,+DACI,qBAAsB,CACtB,eAAgB,CAChB,aAAc,CACd,oBACJ,CAEA,2FACI,UACJ,CAEA,wEACI,aAAc,CAEd,WAAY,CADZ,UAEJ,CAEA,kJAEI,0BAA2B,CAC3B,uBACJ,CAEA,6EACI,6BAA8B,CAC9B,mBACJ,CAEA,kMAEI,uBACJ,CAEA,oEACI,eACJ,CAEA,6DACI,kCACJ",sourcesContent:['<script setup>\nimport { computed, ref } from \'vue\'\nimport { __ } from \'@wordpress/i18n\'\nimport LanguageItem from \'../../language-switcher/components/LanguageItem.vue\'\n\nconst props = defineProps({\n languages: {\n type: [Array, Object],\n default: () => [],\n },\n config: {\n type: Object,\n default: () => ({}),\n },\n compact: {\n type: Boolean,\n default: false,\n },\n maxDropdownItems: {\n type: Number,\n default: 2,\n },\n})\n\nconst languageList = computed(() => {\n if (Array.isArray(props.languages))\n return props.languages\n\n const published = props.languages?.published || props.languages || {}\n\n return Object.entries(published).map(([code, settings]) => ({\n code,\n ...settings,\n }))\n})\n\nconst displayedLanguages = computed(() => {\n const list = languageList.value.filter(Boolean)\n const maxLanguages = Math.max(2, (props.compact ? 2 : props.maxDropdownItems) + 1)\n\n if (list.length)\n return list.slice(0, maxLanguages)\n\n return [\n { code: \'en_US\', name: __(\'English\', \'translatepress-multilingual\'), shortName: \'EN\' },\n { code: \'es_ES\', name: __(\'Spanish\', \'translatepress-multilingual\'), shortName: \'ES\' },\n { code: \'fr_FR\', name: __(\'French\', \'translatepress-multilingual\'), shortName: \'FR\' },\n ].slice(0, maxLanguages)\n})\n\nconst currentLanguage = computed(() => displayedLanguages.value[0])\nconst otherLanguages = computed(() => displayedLanguages.value.slice(1))\nconst isOpen = ref(false)\nconst listId = `trp-ald-preview-language-list-${Math.random().toString(36).slice(2, 9)}`\nconst websiteLanguageSelectorLabel = __(\'Website language selector\', \'translatepress-multilingual\')\nconst changeLanguageLabel = __(\'Change language\', \'translatepress-multilingual\')\nconst availableLanguagesLabel = __(\'Available languages\', \'translatepress-multilingual\')\n\nconst flagPosition = computed(() => props.config.aldSwitcherShowFlags === false ? \'hide\' : \'before\')\nconst languageNameMode = computed(() => props.config.aldSwitcherLanguageNames || \'full\')\nconst flagShape = computed(() => props.config.aldSwitcherFlagShape || \'rect\')\n\nconst switcherStyles = computed(() => ({\n \'--trp-ald-switcher-bg\': props.config.aldSwitcherBackgroundColor || \'#ffffff\',\n \'--trp-ald-switcher-bg-hover\': props.config.aldSwitcherBackgroundHoverColor || props.config.buttonBackgroundColor || \'#143852\',\n \'--trp-ald-switcher-text\': props.config.aldSwitcherTextColor || props.config.textColor || \'#143852\',\n \'--trp-ald-switcher-text-hover\': props.config.aldSwitcherTextHoverColor || props.config.buttonTextColor || \'#ffffff\',\n \'--trp-ald-switcher-border\': props.config.aldSwitcherBorderColor || props.config.borderColor || \'#14385233\',\n \'--trp-ald-switcher-border-width\': `${props.config.aldSwitcherBorderWidth ?? 1}px`,\n \'--trp-ald-switcher-radius\': `${props.config.aldSwitcherBorderRadius ?? 5}px`,\n \'--flag-radius\': `${props.config.aldSwitcherFlagRadius ?? 2}px`,\n \'--aspect-ratio\': flagShape.value === \'square\' ? \'1/1\' : \'4/3\',\n}))\n\nconst openSwitcher = () => {\n isOpen.value = true\n}\n\nconst closeSwitcher = () => {\n isOpen.value = false\n}\n\nconst onFocusOut = (event) => {\n if (!event.currentTarget.contains(event.relatedTarget))\n closeSwitcher()\n}\n\nconst focusFirstOption = (target) => {\n target\n .closest(\'.trp-ald-language-selector\')\n ?.querySelector(\'.trp-switcher-dropdown-list .trp-language-item\')\n ?.focus?.({ preventScroll: true })\n}\n\nconst onCurrentKeydown = (event) => {\n if (event.key === \'Enter\' || event.key === \' \') {\n event.preventDefault()\n isOpen.value = !isOpen.value\n return\n }\n\n if (event.key === \'ArrowDown\') {\n event.preventDefault()\n const currentTarget = event.currentTarget\n openSwitcher()\n requestAnimationFrame(() => focusFirstOption(currentTarget))\n return\n }\n\n if (event.key === \'Escape\') {\n event.preventDefault()\n closeSwitcher()\n }\n}\n\nconst onOptionKeydown = (event) => {\n if (event.key === \'Escape\') {\n event.preventDefault()\n closeSwitcher()\n event.currentTarget\n .closest(\'.trp-ald-language-selector\')\n ?.querySelector(\'.trp-ls-shortcode-current-language, .trp-language-item__current\')\n ?.focus?.({ preventScroll: true })\n }\n}\n\n<\/script>\n\n<template>\n <div\n class="trp-shortcode-switcher__wrapper trp-ald-language-selector-wrapper"\n :class="{ \'trp-ald-language-selector-wrapper--compact\': props.compact }"\n :style="switcherStyles"\n @mouseenter="openSwitcher"\n @mouseleave="closeSwitcher"\n @focusout="onFocusOut"\n >\n <div\n class="trp-language-switcher trp-ls-dropdown trp-shortcode-switcher trp-shortcode-anchor trp-open-on-hover trp-ald-language-selector"\n aria-hidden="true"\n inert\n >\n <div class="trp-current-language-item__wrapper">\n <LanguageItem\n v-if="currentLanguage"\n :language="currentLanguage"\n :dropdown="false"\n class="trp-language-item__default trp-language-item__current"\n :flag-pos="flagPosition"\n :name-mode="languageNameMode"\n :flag-aspect-ratio="flagShape"\n />\n\n <svg\n class="trp-shortcode-arrow"\n width="20"\n height="20"\n viewBox="0 0 20 21"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n aria-hidden="true"\n focusable="false"\n >\n <path\n d="M5 8L10 13L15 8"\n stroke="var(--text)"\n stroke-width="2"\n stroke-linecap="round"\n stroke-linejoin="round"\n />\n </svg>\n </div>\n </div>\n\n <div\n class="trp-language-switcher trp-ls-dropdown trp-shortcode-switcher trp-shortcode-overlay trp-open-on-hover trp-ald-language-selector"\n :class="{ \'is-open\': isOpen }"\n role="navigation"\n :aria-label="websiteLanguageSelectorLabel"\n >\n <div class="trp-language-switcher-inner">\n <div class="trp-current-language-item__wrapper">\n <LanguageItem\n v-if="currentLanguage"\n :language="currentLanguage"\n :dropdown="false"\n class="trp-language-item__default trp-language-item__current"\n role="button"\n tabindex="0"\n :aria-expanded="String(isOpen)"\n :aria-label="changeLanguageLabel"\n :aria-controls="listId"\n @keydown="onCurrentKeydown"\n :flag-pos="flagPosition"\n :name-mode="languageNameMode"\n :flag-aspect-ratio="flagShape"\n />\n\n <svg\n class="trp-shortcode-arrow"\n width="20"\n height="20"\n viewBox="0 0 20 21"\n fill="none"\n xmlns="http://www.w3.org/2000/svg"\n aria-hidden="true"\n focusable="false"\n >\n <path\n d="M5 8L10 13L15 8"\n stroke="var(--text)"\n stroke-width="2"\n stroke-linecap="round"\n stroke-linejoin="round"\n />\n </svg>\n </div>\n\n <div\n :id="listId"\n class="trp-switcher-dropdown-list"\n role="listbox"\n :aria-label="availableLanguagesLabel"\n >\n <LanguageItem\n v-for="language in otherLanguages"\n :key="language.code"\n :language="language"\n :dropdown="true"\n role="option"\n tabindex="0"\n aria-selected="false"\n @keydown="onOptionKeydown"\n :flag-pos="flagPosition"\n :name-mode="languageNameMode"\n :flag-aspect-ratio="flagShape"\n />\n </div>\n </div>\n </div>\n </div>\n</template>\n\n<style scoped>\n.trp-shortcode-switcher__wrapper {\n position: relative;\n width: max-content;\n max-width: 100%;\n border: none;\n --bg: var(--trp-ald-switcher-bg);\n --bg-hover: var(--trp-ald-switcher-bg-hover);\n --text: var(--trp-ald-switcher-text);\n --text-hover: var(--trp-ald-switcher-text-hover);\n --border-color: var(--trp-ald-switcher-border);\n --border: var(--trp-ald-switcher-border-width) solid var(--trp-ald-switcher-border);\n --border-radius: var(--trp-ald-switcher-radius);\n --font-size: 14px;\n --flag-size: 18px;\n --flag-radius: 2px;\n --aspect-ratio: 4/3;\n --transition-duration: 0.2s;\n}\n\n.trp-language-switcher {\n position: static;\n display: inline-block;\n overflow: hidden;\n width: 100%;\n min-height: 42px;\n padding: 0;\n border: var(--border);\n border-radius: var(--border-radius);\n background: var(--bg);\n box-shadow: 0 10px 20px 0 #0000000D;\n box-sizing: border-box;\n}\n\n.trp-shortcode-anchor:not(.trp-opposite-button) {\n visibility: hidden;\n}\n\n.trp-shortcode-overlay {\n position: absolute;\n left: 0;\n top: 0;\n z-index: 5;\n}\n\n.trp-language-switcher-inner {\n display: flex;\n flex-direction: column;\n}\n\n.trp-current-language-item__wrapper:not(.trp-hide-arrow) {\n display: flex;\n align-items: center;\n padding-right: 8px;\n justify-content: space-between;\n}\n\n.trp-switcher-dropdown-list {\n display: flex;\n flex-direction: column;\n max-height: 0;\n overflow: hidden;\n transition: max-height 0.2s ease-in-out;\n transition-duration: var(--transition-duration);\n}\n\n.trp-ls-dropdown.is-open .trp-switcher-dropdown-list,\n.trp-ls-dropdown[aria-expanded="true"] .trp-switcher-dropdown-list,\n.trp-shortcode-switcher.trp-open-on-hover.is-open .trp-switcher-dropdown-list,\n.trp-shortcode-switcher[aria-expanded="true"] .trp-switcher-dropdown-list {\n max-height: calc(var(--trp-ald-preview-language-item-height, 40px) * var(--trp-ald-preview-dropdown-items, 2));\n overflow: hidden;\n}\n\n.trp-shortcode-switcher.is-open .trp-shortcode-arrow {\n transform: rotate(180deg);\n}\n\n.trp-shortcode-arrow {\n pointer-events: none;\n flex: 0 0 auto;\n}\n\n.trp-ald-language-selector :deep(.trp-language-item) {\n box-sizing: border-box;\n min-height: 40px;\n padding: 0 8px;\n text-decoration: none;\n}\n\n.trp-ald-language-selector :deep(.trp-switcher-dropdown-list .trp-language-item) {\n width: 100%;\n}\n\n.trp-ald-language-selector :deep(.trp-language-item__current) {\n flex: 0 1 auto;\n width: auto;\n min-width: 0;\n}\n\n.trp-ald-language-selector :deep(.trp-language-item:hover),\n.trp-ald-language-selector :deep(.trp-language-item:focus-visible) {\n background: var(--bg-hover);\n color: var(--text-hover);\n}\n\n.trp-ald-language-selector :deep(.trp-language-item:focus-visible) {\n outline: 2px solid var(--text);\n outline-offset: -2px;\n}\n\n.trp-ald-language-selector :deep(.trp-language-item:hover .trp-language-item-name),\n.trp-ald-language-selector :deep(.trp-language-item:focus-visible .trp-language-item-name) {\n color: var(--text-hover);\n}\n\n.trp-ald-language-selector :deep(.trp-language-item-name) {\n max-width: 105px;\n}\n\n.trp-ald-language-selector-wrapper--compact {\n --trp-ald-preview-dropdown-items: 2;\n}\n</style>\n'],sourceRoot:""}]);const a=s;n.d(t,["A",0,a])},829(e,t,n){"use strict";var r=n(627),i=n.n(r),o=n(798),s=n.n(o)()(i());s.push([e.id,'.trp-ald-preview[data-v-6b734473]{background-image:var(--trp-ald-preview-bg-image);background-position:50%;background-repeat:no-repeat;background-size:cover;border:1px solid #e2e2e4;border-radius:var(--trp-settings-radius-small);box-sizing:border-box;height:280px;overflow:hidden;width:100%}.trp-ald-preview__overlay[data-v-6b734473]{background:var(--trp-ald-preview-overlay);justify-content:center;padding:32px 20px}.trp-ald-preview__bar-stage[data-v-6b734473],.trp-ald-preview__overlay[data-v-6b734473]{align-items:flex-start;box-sizing:border-box;display:flex;height:100%}.trp-ald-preview__bar-stage[data-v-6b734473]{background:transparent}.trp-ald-preview__empty[data-v-6b734473]{align-items:center;color:#50575e;display:flex;justify-content:center;min-height:280px;padding:24px;text-align:center}.trp-ald-preview__bar[data-v-6b734473],.trp-ald-preview__popup[data-v-6b734473]{background:var(--trp-ald-preview-bg);border:var(--trp-ald-preview-border-width) solid var(--trp-ald-preview-border);border-radius:var(--trp-ald-preview-radius);box-shadow:0 4px 16px rgba(29,35,39,.18);box-sizing:border-box;color:var(--trp-ald-preview-text)}.trp-ald-preview__popup[data-v-6b734473]{max-width:100%;padding:24px;width:-moz-fit-content;width:fit-content}.trp-ald-preview:not(.is-compact) .trp-ald-preview__popup[data-v-6b734473]{display:flex;flex-direction:column;gap:12px}.trp-ald-preview__text[data-v-6b734473]{font-size:15px;line-height:1.5}.trp-ald-preview__controls[data-v-6b734473]{align-items:flex-start;display:flex;flex-wrap:wrap;gap:12px;margin-top:18px}.trp-ald-preview:not(.is-compact) .trp-ald-preview__controls[data-v-6b734473] .trp-ald-language-selector-wrapper{flex:0 1 auto;max-width:58%;min-width:0;width:-moz-max-content;width:max-content}.trp-ald-preview:not(.is-compact) .trp-ald-preview__close[data-v-6b734473],.trp-ald-preview:not(.is-compact) .trp-ald-preview__controls[data-v-6b734473]{margin-top:0}.trp-ald-preview__button[data-v-6b734473]{align-items:center;background:var(--trp-ald-preview-button-bg);border:1px solid var(--trp-ald-preview-button-border);border-radius:var(--trp-ald-preview-button-radius);box-sizing:border-box;color:var(--trp-ald-preview-button-text);cursor:pointer;display:inline-flex;height:auto;justify-content:center;line-height:1.25;min-height:42px;overflow-wrap:anywhere;padding:8px 16px;white-space:normal}.trp-ald-preview:not(.is-compact) .trp-ald-preview__button[data-v-6b734473]{box-sizing:border-box;flex:0 1 auto;max-width:100%;min-width:0;width:-moz-fit-content;width:fit-content}.trp-ald-preview__button[data-v-6b734473]:hover{background:var(--trp-ald-preview-button-hover);border-color:var(--trp-ald-preview-button-hover);color:var(--trp-ald-preview-button-hover-text)}.trp-ald-preview__bar-close[data-v-6b734473],.trp-ald-preview__close[data-v-6b734473]{background:transparent;border:0;color:var(--trp-ald-preview-close);cursor:pointer}.trp-ald-preview__close[data-v-6b734473]{align-items:center;color:var(--trp-ald-preview-close);display:inline-flex;font-size:14px;gap:4px;line-height:20px;margin-top:10px;padding:0;text-decoration:none;transition:opacity .2s ease}.trp-ald-preview__close[data-v-6b734473]:focus-visible,.trp-ald-preview__close[data-v-6b734473]:hover{opacity:.7}#tp-ald-popup-configurator-root .trp-ald-preview__close{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;box-shadow:none;min-height:0;padding:0}.trp-ald-preview__close-icon-before[data-v-6b734473]{align-items:center;color:transparent;display:inline-flex;flex:0 0 16px;height:20px;justify-content:center;width:16px}.trp-ald-preview__close-icon-before[data-v-6b734473]:before{-webkit-font-smoothing:antialiased;background:transparent;color:var(--trp-ald-preview-close);content:"\\f153";font:normal 16px/20px dashicons}.trp-ald-preview__close-text[data-v-6b734473]{color:var(--trp-ald-preview-close);text-decoration:underline}.trp-ald-preview__bar[data-v-6b734473]{align-items:stretch;border-radius:0;display:flex;flex-direction:column;gap:14px;min-height:76px;padding:18px;width:100%}.trp-ald-preview__animated[data-v-6b734473]{--trp-ald-preview-animation-distance:72px;animation-duration:.28s;animation-fill-mode:both;animation-timing-function:ease-out}.trp-ald-animation-none[data-v-6b734473]{animation:none}.trp-ald-animation-fade[data-v-6b734473]{animation-name:trp-ald-preview-fade-in-6b734473}.trp-ald-animation-slide_top[data-v-6b734473]{animation-name:trp-ald-preview-slide-from-top-6b734473}.trp-ald-animation-slide_right[data-v-6b734473]{animation-name:trp-ald-preview-slide-from-right-6b734473}.trp-ald-animation-slide_bottom[data-v-6b734473]{animation-name:trp-ald-preview-slide-from-bottom-6b734473}.trp-ald-animation-slide_left[data-v-6b734473]{animation-name:trp-ald-preview-slide-from-left-6b734473}@keyframes trp-ald-preview-fade-in-6b734473{0%{opacity:0}to{opacity:1}}@keyframes trp-ald-preview-slide-from-top-6b734473{0%{opacity:0;transform:translateY(calc(var(--trp-ald-preview-animation-distance)*-1))}to{opacity:1;transform:translateY(0)}}@keyframes trp-ald-preview-slide-from-right-6b734473{0%{opacity:0;transform:translateX(var(--trp-ald-preview-animation-distance))}to{opacity:1;transform:translateX(0)}}@keyframes trp-ald-preview-slide-from-bottom-6b734473{0%{opacity:0;transform:translateY(var(--trp-ald-preview-animation-distance))}to{opacity:1;transform:translateY(0)}}@keyframes trp-ald-preview-slide-from-left-6b734473{0%{opacity:0;transform:translateX(calc(var(--trp-ald-preview-animation-distance)*-1))}to{opacity:1;transform:translateX(0)}}.trp-ald-preview__bar .trp-ald-preview__text[data-v-6b734473]{width:100%}.trp-ald-preview__bar-controls[data-v-6b734473]{align-items:flex-start;display:flex;flex:0 0 auto;flex-wrap:wrap;gap:12px;min-width:0}.trp-ald-preview:not(.is-compact) .trp-ald-preview__bar-controls[data-v-6b734473] .trp-ald-language-selector-wrapper{flex:0 1 auto;min-width:0;width:-moz-max-content;width:max-content}.trp-ald-preview:not(.is-compact) .trp-ald-preview__bar-controls .trp-ald-preview__button[data-v-6b734473]{min-height:42px}.trp-ald-preview:not(.is-compact) .trp-ald-preview__bar-controls[data-v-6b734473] .trp-ald-language-selector{min-height:42px}.trp-ald-preview__bar-close[data-v-6b734473]{height:42px;min-height:42px;padding:0;width:40px}.trp-ald-preview__bar-close-icon[data-v-6b734473]:before{-webkit-font-smoothing:antialiased;background:transparent;color:var(--trp-ald-preview-close);content:"\\f153";font:normal 35px/40px dashicons}.trp-ald-preview.is-compact[data-v-6b734473]{border:0;border-radius:0;height:100%;min-height:0;overflow:visible;position:relative;width:100%}.trp-ald-preview.is-compact .trp-ald-preview__overlay[data-v-6b734473]{align-items:center;height:auto;inset:0;padding:8px;position:absolute}.trp-ald-preview.is-compact .trp-ald-preview__popup[data-v-6b734473]{display:flex;flex-direction:column;gap:3px;max-width:100%;padding:8px 10px;width:-moz-fit-content;width:fit-content}.trp-ald-preview.is-compact .trp-ald-preview__text[data-v-6b734473]{font-size:11px;line-height:1.2}.trp-ald-preview.is-compact .trp-ald-preview__controls[data-v-6b734473]{align-items:flex-start;display:flex;flex-direction:row;flex-wrap:wrap;gap:6px;margin-top:6px;min-width:0}.trp-ald-preview.is-compact .trp-ald-preview__button[data-v-6b734473]{align-items:center;box-sizing:border-box;display:inline-flex;flex:0 1 auto;font-size:11px;height:auto;justify-content:center;line-height:1.2;max-width:100%;min-height:30px;min-width:0;overflow:hidden;padding:0 8px;text-overflow:clip;width:-moz-fit-content;width:fit-content}.trp-ald-preview.is-compact[data-v-6b734473] .trp-ald-language-selector .trp-language-item-name{line-height:1.4}.trp-ald-preview.is-compact .trp-ald-preview__close[data-v-6b734473]{font-size:11px;line-height:16px;margin-top:4px}.trp-ald-preview.is-compact .trp-ald-preview__bar[data-v-6b734473]{gap:8px;min-height:62px;padding:10px}.trp-ald-preview.is-compact .trp-ald-preview__bar-controls[data-v-6b734473]{align-items:flex-start;gap:6px;width:100%}.trp-ald-preview.is-compact .trp-ald-preview__bar-close[data-v-6b734473]{flex:0 0 30px;height:30px;min-height:30px;width:30px}.trp-ald-preview.is-compact .trp-ald-preview__bar-close-icon[data-v-6b734473]:before{font:normal 24px/30px dashicons}@media (prefers-reduced-motion:reduce){.trp-ald-preview__animated[data-v-6b734473]{animation:none}}.trp-ald-preview.is-compact[data-v-6b734473] .trp-ald-language-selector-wrapper{--font-size:11px;--flag-size:14px;--trp-ald-preview-language-item-height:28px;flex:0 1 auto;max-width:100%;min-width:0;width:-moz-max-content;width:max-content}.trp-ald-preview.is-compact[data-v-6b734473] .trp-ald-language-selector{min-height:30px}.trp-ald-preview.is-compact[data-v-6b734473] .trp-ald-language-selector .trp-language-item{min-height:28px;padding:0 8px}',"",{version:3,sources:["webpack://./assets/src/automatic-language-detection/components/PopupPreview.vue"],names:[],mappings:"AAyGA,kCAKI,gDAAiD,CAGjD,uBAA2B,CAF3B,2BAA4B,CAC5B,qBAAsB,CAHtB,wBAAyB,CAMzB,8CAA+C,CAT/C,qBAAsB,CAEtB,YAAa,CAMb,eAAgB,CAPhB,UASJ,CAEA,2CAOI,yCAA0C,CAF1C,sBAAuB,CACvB,iBAEJ,CAEA,wFANI,sBAAuB,CAHvB,qBAAsB,CAEtB,YAAa,CADb,WAcJ,CANA,6CAKI,sBACJ,CAEA,yCAGI,kBAAmB,CAInB,aAAc,CALd,YAAa,CAEb,sBAAuB,CAHvB,gBAAiB,CAIjB,YAAa,CACb,iBAEJ,CAEA,gFAGI,oCAAqC,CAErC,8EAA+E,CAC/E,2CAA4C,CAC5C,wCAA6C,CAL7C,qBAAsB,CAEtB,iCAIJ,CAEA,yCAEI,cAAe,CACf,YAAa,CAFb,sBAAkB,CAAlB,iBAGJ,CAEA,2EACI,YAAa,CACb,qBAAsB,CACtB,QACJ,CAEA,wCACI,cAAe,CACf,eACJ,CAEA,4CAEI,sBAAuB,CADvB,YAAa,CAEb,cAAe,CACf,QAAS,CACT,eACJ,CAEA,iHACI,aAAc,CAGd,aAAc,CADd,WAAY,CADZ,sBAAkB,CAAlB,iBAGJ,CAEA,yJAEI,YACJ,CAEA,0CAGI,kBAAmB,CAOnB,2CAA4C,CAF5C,qDAAsD,CACtD,kDAAmD,CARnD,qBAAsB,CAUtB,wCAAyC,CACzC,cAAe,CAVf,mBAAoB,CAGpB,WAAY,CADZ,sBAAuB,CASvB,gBAAiB,CAPjB,eAAgB,CAShB,sBAAuB,CARvB,gBAAiB,CAOjB,kBAEJ,CAEA,4EACI,qBAAsB,CACtB,aAAc,CAGd,cAAe,CADf,WAAY,CADZ,sBAAkB,CAAlB,iBAGJ,CAEA,gDACI,8CAA+C,CAC/C,gDAAiD,CACjD,8CACJ,CAEA,sFAGI,sBAAuB,CACvB,QAAS,CAFT,kCAAmC,CAGnC,cACJ,CAEA,yCAEI,kBAAmB,CAInB,kCAAmC,CALnC,mBAAoB,CAMpB,cAAe,CAJf,OAAQ,CAKR,gBAAiB,CAJjB,eAAgB,CAChB,SAAU,CAIV,oBAAqB,CACrB,2BACJ,CAEA,sGAEI,UACJ,CAEA,wDAMI,uBAAgB,CAAhB,oBAAgB,CAAhB,eAAgB,CAHhB,sBAAuB,CACvB,QAAS,CACT,eAAgB,CAHhB,YAAa,CADb,SAMJ,CAEA,qDAEI,kBAAmB,CAKnB,iBAAkB,CANlB,mBAAoB,CAGpB,aAAc,CAEd,WAAY,CAHZ,sBAAuB,CAEvB,UAGJ,CAEA,4DAKI,kCAAmC,CADnC,sBAAuB,CADvB,kCAAmC,CAFnC,eAAgB,CAChB,+BAIJ,CAEA,8CAEI,kCAAmC,CADnC,yBAEJ,CAEA,uCAII,mBAAoB,CAIpB,eAAgB,CANhB,YAAa,CACb,qBAAsB,CAEtB,QAAS,CACT,eAAgB,CAChB,YAAa,CANb,UAQJ,CAEA,4CACI,yCAA0C,CAC1C,uBAAyB,CACzB,wBAAyB,CACzB,kCACJ,CAEA,yCACI,cACJ,CAEA,yCACI,+CACJ,CAEA,8CACI,sDACJ,CAEA,gDACI,wDACJ,CAEA,iDACI,yDACJ,CAEA,+CACI,uDACJ,CAEA,4CACI,GACI,SACJ,CACA,GACI,SACJ,CACJ,CAEA,mDACI,GACI,SAAU,CACV,wEACJ,CACA,GACI,SAAU,CACV,uBACJ,CACJ,CAEA,qDACI,GACI,SAAU,CACV,+DACJ,CACA,GACI,SAAU,CACV,uBACJ,CACJ,CAEA,sDACI,GACI,SAAU,CACV,+DACJ,CACA,GACI,SAAU,CACV,uBACJ,CACJ,CAEA,oDACI,GACI,SAAU,CACV,wEACJ,CACA,GACI,SAAU,CACV,uBACJ,CACJ,CAEA,8DACI,UACJ,CAEA,gDAEI,sBAAuB,CADvB,YAAa,CAGb,aAAc,CACd,cAAe,CAFf,QAAS,CAGT,WACJ,CAEA,qHACI,aAAc,CAEd,WAAY,CADZ,sBAAkB,CAAlB,iBAEJ,CAEA,2GACI,eACJ,CAEA,6GACI,eACJ,CAEA,6CAGI,WAAY,CACZ,eAAgB,CAHhB,SAAU,CACV,UAGJ,CAEA,yDAKI,kCAAmC,CADnC,sBAAuB,CADvB,kCAAmC,CAFnC,eAAgB,CAChB,+BAIJ,CAEA,6CAKI,QAAS,CACT,eAAgB,CAHhB,WAAY,CACZ,YAAa,CAGb,gBAAiB,CANjB,iBAAkB,CAClB,UAMJ,CAEA,uEAII,kBAAmB,CADnB,WAAY,CADZ,OAAQ,CAGR,WAAY,CAJZ,iBAKJ,CAEA,qEAII,YAAa,CACb,qBAAsB,CACtB,OAAQ,CAJR,cAAe,CACf,gBAAiB,CAFjB,sBAAkB,CAAlB,iBAMJ,CAEA,oEACI,cAAe,CACf,eACJ,CAEA,wEAII,sBAAuB,CAHvB,YAAa,CACb,kBAAmB,CACnB,cAAe,CAEf,OAAQ,CACR,cAAe,CACf,WACJ,CAEA,sEAGI,kBAAmB,CAFnB,qBAAsB,CACtB,mBAAoB,CAGpB,aAAc,CAOd,cAAe,CALf,WAAY,CAHZ,sBAAuB,CASvB,eAAgB,CALhB,cAAe,CAEf,eAAgB,CADhB,WAAY,CAKZ,eAAgB,CAHhB,aAAc,CAId,kBAAmB,CATnB,sBAAkB,CAAlB,iBAUJ,CAEA,gGACI,eACJ,CAEA,qEAEI,cAAe,CACf,gBAAiB,CAFjB,cAGJ,CAEA,mEAGI,OAAQ,CAFR,eAAgB,CAChB,YAEJ,CAEA,4EACI,sBAAuB,CACvB,OAAQ,CACR,UACJ,CAEA,yEACI,aAAc,CAEd,WAAY,CACZ,eAAgB,CAFhB,UAGJ,CAEA,qFACI,+BACJ,CAEA,uCACI,4CACI,cACJ,CACJ,CAEA,gFAKI,gBAAiB,CACjB,gBAAiB,CACjB,2CAA4C,CAN5C,aAAc,CAGd,cAAe,CADf,WAAY,CADZ,sBAAkB,CAAlB,iBAMJ,CAEA,wEACI,eACJ,CAEA,2FACI,eAAgB,CAChB,aACJ",sourcesContent:['<script setup>\nimport { computed, ref, watch } from \'vue\'\nimport { __ } from \'@wordpress/i18n\'\nimport AldLanguageSelector from \'./AldLanguageSelector.vue\'\n\nconst props = defineProps({\n config: { type: Object, required: true },\n emptyPreviewText: { type: String, default: \'\' },\n backgroundImage: { type: String, default: \'\' },\n compact: { type: Boolean, default: false },\n languages: { type: [Array, Object], default: () => [] },\n})\n\nconst previewStyles = computed(() => ({\n \'--trp-ald-preview-bg\': props.config.backgroundColor,\n \'--trp-ald-preview-text\': props.config.textColor,\n \'--trp-ald-preview-button-bg\': props.config.buttonBackgroundColor,\n \'--trp-ald-preview-button-border\': props.config.buttonBorderColor || props.config.buttonBackgroundColor,\n \'--trp-ald-preview-button-hover\': props.config.buttonHoverColor,\n \'--trp-ald-preview-button-text\': props.config.buttonTextColor,\n \'--trp-ald-preview-button-hover-text\': props.config.buttonHoverTextColor || props.config.buttonTextColor,\n \'--trp-ald-preview-button-radius\': `${props.config.buttonBorderRadius ?? 3}px`,\n \'--trp-ald-preview-close\': props.config.closeTextColor,\n \'--trp-ald-preview-border\': props.config.borderColor,\n \'--trp-ald-preview-border-width\': `${props.config.borderWidth || 0}px`,\n \'--trp-ald-preview-radius\': `${props.config.borderRadius || 0}px`,\n \'--trp-ald-preview-overlay\': props.config.overlayColor,\n \'--trp-ald-preview-bg-image\': props.backgroundImage,\n}))\n\nconst isHelloBar = computed(() => props.config.popup_type === \'hello_bar\')\nconst hasPopup = computed(() => props.config.popup_option === \'popup\')\nconst closeLabel = __(\'Close\', \'translatepress-multilingual\')\nconst animationKey = ref(0)\nconst animationClass = computed(() => {\n if (props.compact || props.config.popupAnimationEnabled === false)\n return \'trp-ald-animation-none\'\n\n return `trp-ald-animation-${props.config.popupAnimation || \'fade\'}`\n})\n\nwatch(\n () => [props.config.popupAnimationEnabled, props.config.popupAnimation, props.config.popup_type, props.config.popup_option],\n () => {\n animationKey.value += 1\n }\n)\n<\/script>\n\n<template>\n <div\n class="trp-ald-preview"\n :class="{ \'is-hello-bar\': isHelloBar, \'is-compact\': props.compact }"\n :style="previewStyles"\n >\n <div v-if="!hasPopup" class="trp-ald-preview__empty">\n {{ emptyPreviewText }}\n </div>\n\n <div v-else-if="!isHelloBar" class="trp-ald-preview__overlay">\n <div\n :key="`popup-${animationKey}`"\n class="trp-ald-preview__popup trp-ald-preview__animated"\n :class="animationClass"\n >\n <div class="trp-ald-preview__text" v-html="config.popup_textarea" />\n\n <div class="trp-ald-preview__controls">\n <AldLanguageSelector :languages="props.languages" :config="props.config" :compact="props.compact" />\n <button type="button" class="trp-ald-preview__button">\n {{ config.popup_textarea_button }}\n </button>\n </div>\n\n <button type="button" class="trp-ald-preview__close">\n <span class="trp-ald-preview__close-icon-before" aria-hidden="true" />\n <span class="trp-ald-preview__close-text">\n {{ config.popup_textarea_close_button }}\n </span>\n </button>\n </div>\n </div>\n\n <div v-else class="trp-ald-preview__bar-stage">\n <div\n :key="`bar-${animationKey}`"\n class="trp-ald-preview__bar trp-ald-preview__animated"\n :class="animationClass"\n >\n <div class="trp-ald-preview__text" v-html="config.popup_textarea" />\n <div class="trp-ald-preview__bar-controls">\n <AldLanguageSelector :languages="props.languages" :config="props.config" :compact="props.compact" />\n <button type="button" class="trp-ald-preview__button">\n {{ config.popup_textarea_button }}\n </button>\n <button type="button" class="trp-ald-preview__bar-close" :aria-label="closeLabel">\n <span class="trp-ald-preview__bar-close-icon" aria-hidden="true" />\n </button>\n </div>\n </div>\n </div>\n </div>\n</template>\n\n<style scoped>\n.trp-ald-preview {\n box-sizing: border-box;\n width: 100%;\n height: 280px;\n border: 1px solid #e2e2e4;\n background-image: var(--trp-ald-preview-bg-image);\n background-repeat: no-repeat;\n background-size: cover;\n background-position: center;\n overflow: hidden;\n border-radius: var(--trp-settings-radius-small);\n}\n\n.trp-ald-preview__overlay {\n box-sizing: border-box;\n height: 100%;\n display: flex;\n align-items: flex-start;\n justify-content: center;\n padding: 32px 20px;\n background: var(--trp-ald-preview-overlay);\n}\n\n.trp-ald-preview__bar-stage {\n box-sizing: border-box;\n height: 100%;\n display: flex;\n align-items: flex-start;\n background: transparent;\n}\n\n.trp-ald-preview__empty {\n min-height: 280px;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 24px;\n text-align: center;\n color: #50575e;\n}\n\n.trp-ald-preview__popup,\n.trp-ald-preview__bar {\n box-sizing: border-box;\n background: var(--trp-ald-preview-bg);\n color: var(--trp-ald-preview-text);\n border: var(--trp-ald-preview-border-width) solid var(--trp-ald-preview-border);\n border-radius: var(--trp-ald-preview-radius);\n box-shadow: 0 4px 16px rgba(29, 35, 39, 0.18);\n}\n\n.trp-ald-preview__popup {\n width: fit-content;\n max-width: 100%;\n padding: 24px;\n}\n\n.trp-ald-preview:not(.is-compact) .trp-ald-preview__popup {\n display: flex;\n flex-direction: column;\n gap: 12px;\n}\n\n.trp-ald-preview__text {\n font-size: 15px;\n line-height: 1.5;\n}\n\n.trp-ald-preview__controls {\n display: flex;\n align-items: flex-start;\n flex-wrap: wrap;\n gap: 12px;\n margin-top: 18px;\n}\n\n.trp-ald-preview:not(.is-compact) .trp-ald-preview__controls :deep(.trp-ald-language-selector-wrapper) {\n flex: 0 1 auto;\n width: max-content;\n min-width: 0;\n max-width: 58%;\n}\n\n.trp-ald-preview:not(.is-compact) .trp-ald-preview__controls,\n.trp-ald-preview:not(.is-compact) .trp-ald-preview__close {\n margin-top: 0;\n}\n\n.trp-ald-preview__button {\n box-sizing: border-box;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n height: auto;\n min-height: 42px;\n padding: 8px 16px;\n border: 1px solid var(--trp-ald-preview-button-border);\n border-radius: var(--trp-ald-preview-button-radius);\n background: var(--trp-ald-preview-button-bg);\n color: var(--trp-ald-preview-button-text);\n cursor: pointer;\n line-height: 1.25;\n white-space: normal;\n overflow-wrap: anywhere;\n}\n\n.trp-ald-preview:not(.is-compact) .trp-ald-preview__button {\n box-sizing: border-box;\n flex: 0 1 auto;\n width: fit-content;\n min-width: 0;\n max-width: 100%;\n}\n\n.trp-ald-preview__button:hover {\n background: var(--trp-ald-preview-button-hover);\n border-color: var(--trp-ald-preview-button-hover);\n color: var(--trp-ald-preview-button-hover-text);\n}\n\n.trp-ald-preview__close,\n.trp-ald-preview__bar-close {\n color: var(--trp-ald-preview-close);\n background: transparent;\n border: 0;\n cursor: pointer;\n}\n\n.trp-ald-preview__close {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n margin-top: 10px;\n padding: 0;\n color: var(--trp-ald-preview-close);\n font-size: 14px;\n line-height: 20px;\n text-decoration: none;\n transition: opacity 0.2s ease;\n}\n\n.trp-ald-preview__close:hover,\n.trp-ald-preview__close:focus-visible {\n opacity: 0.7;\n}\n\n:global(#tp-ald-popup-configurator-root .trp-ald-preview__close) {\n padding: 0;\n min-height: 0;\n background: transparent;\n border: 0;\n box-shadow: none;\n appearance: none;\n}\n\n.trp-ald-preview__close-icon-before {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex: 0 0 16px;\n width: 16px;\n height: 20px;\n color: transparent;\n}\n\n.trp-ald-preview__close-icon-before::before {\n content: "\\f153";\n font: normal 16px/20px dashicons;\n color: var(--trp-ald-preview-close);\n background: transparent;\n -webkit-font-smoothing: antialiased;\n}\n\n.trp-ald-preview__close-text {\n text-decoration: underline;\n color: var(--trp-ald-preview-close);\n}\n\n.trp-ald-preview__bar {\n width: 100%;\n display: flex;\n flex-direction: column;\n align-items: stretch;\n gap: 14px;\n min-height: 76px;\n padding: 18px;\n border-radius: 0;\n}\n\n.trp-ald-preview__animated {\n --trp-ald-preview-animation-distance: 72px;\n animation-duration: 0.28s;\n animation-fill-mode: both;\n animation-timing-function: ease-out;\n}\n\n.trp-ald-animation-none {\n animation: none;\n}\n\n.trp-ald-animation-fade {\n animation-name: trp-ald-preview-fade-in;\n}\n\n.trp-ald-animation-slide_top {\n animation-name: trp-ald-preview-slide-from-top;\n}\n\n.trp-ald-animation-slide_right {\n animation-name: trp-ald-preview-slide-from-right;\n}\n\n.trp-ald-animation-slide_bottom {\n animation-name: trp-ald-preview-slide-from-bottom;\n}\n\n.trp-ald-animation-slide_left {\n animation-name: trp-ald-preview-slide-from-left;\n}\n\n@keyframes trp-ald-preview-fade-in {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n@keyframes trp-ald-preview-slide-from-top {\n from {\n opacity: 0;\n transform: translateY(calc(-1 * var(--trp-ald-preview-animation-distance)));\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n\n@keyframes trp-ald-preview-slide-from-right {\n from {\n opacity: 0;\n transform: translateX(var(--trp-ald-preview-animation-distance));\n }\n to {\n opacity: 1;\n transform: translateX(0);\n }\n}\n\n@keyframes trp-ald-preview-slide-from-bottom {\n from {\n opacity: 0;\n transform: translateY(var(--trp-ald-preview-animation-distance));\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n\n@keyframes trp-ald-preview-slide-from-left {\n from {\n opacity: 0;\n transform: translateX(calc(-1 * var(--trp-ald-preview-animation-distance)));\n }\n to {\n opacity: 1;\n transform: translateX(0);\n }\n}\n\n.trp-ald-preview__bar .trp-ald-preview__text {\n width: 100%;\n}\n\n.trp-ald-preview__bar-controls {\n display: flex;\n align-items: flex-start;\n gap: 12px;\n flex: 0 0 auto;\n flex-wrap: wrap;\n min-width: 0;\n}\n\n.trp-ald-preview:not(.is-compact) .trp-ald-preview__bar-controls :deep(.trp-ald-language-selector-wrapper) {\n flex: 0 1 auto;\n width: max-content;\n min-width: 0;\n}\n\n.trp-ald-preview:not(.is-compact) .trp-ald-preview__bar-controls .trp-ald-preview__button {\n min-height: 42px;\n}\n\n.trp-ald-preview:not(.is-compact) .trp-ald-preview__bar-controls :deep(.trp-ald-language-selector) {\n min-height: 42px;\n}\n\n.trp-ald-preview__bar-close {\n padding: 0;\n width: 40px;\n height: 42px;\n min-height: 42px;\n}\n\n.trp-ald-preview__bar-close-icon::before {\n content: "\\f153";\n font: normal 35px/40px dashicons;\n color: var(--trp-ald-preview-close);\n background: transparent;\n -webkit-font-smoothing: antialiased;\n}\n\n.trp-ald-preview.is-compact {\n position: relative;\n width: 100%;\n height: 100%;\n min-height: 0;\n border: 0;\n border-radius: 0;\n overflow: visible;\n}\n\n.trp-ald-preview.is-compact .trp-ald-preview__overlay {\n position: absolute;\n inset: 0;\n height: auto;\n align-items: center;\n padding: 8px;\n}\n\n.trp-ald-preview.is-compact .trp-ald-preview__popup {\n width: fit-content;\n max-width: 100%;\n padding: 8px 10px;\n display: flex;\n flex-direction: column;\n gap: 3px;\n}\n\n.trp-ald-preview.is-compact .trp-ald-preview__text {\n font-size: 11px;\n line-height: 1.2;\n}\n\n.trp-ald-preview.is-compact .trp-ald-preview__controls {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n align-items: flex-start;\n gap: 6px;\n margin-top: 6px;\n min-width: 0;\n}\n\n.trp-ald-preview.is-compact .trp-ald-preview__button {\n box-sizing: border-box;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex: 0 1 auto;\n width: fit-content;\n height: auto;\n max-width: 100%;\n min-width: 0;\n min-height: 30px;\n padding: 0 8px;\n font-size: 11px;\n line-height: 1.2;\n overflow: hidden;\n text-overflow: clip;\n}\n\n.trp-ald-preview.is-compact :deep(.trp-ald-language-selector .trp-language-item-name) {\n line-height: 1.4;\n}\n\n.trp-ald-preview.is-compact .trp-ald-preview__close {\n margin-top: 4px;\n font-size: 11px;\n line-height: 16px;\n}\n\n.trp-ald-preview.is-compact .trp-ald-preview__bar {\n min-height: 62px;\n padding: 10px;\n gap: 8px;\n}\n\n.trp-ald-preview.is-compact .trp-ald-preview__bar-controls {\n align-items: flex-start;\n gap: 6px;\n width: 100%;\n}\n\n.trp-ald-preview.is-compact .trp-ald-preview__bar-close {\n flex: 0 0 30px;\n width: 30px;\n height: 30px;\n min-height: 30px;\n}\n\n.trp-ald-preview.is-compact .trp-ald-preview__bar-close-icon::before {\n font: normal 24px/30px dashicons;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .trp-ald-preview__animated {\n animation: none;\n }\n}\n\n.trp-ald-preview.is-compact :deep(.trp-ald-language-selector-wrapper) {\n flex: 0 1 auto;\n width: max-content;\n min-width: 0;\n max-width: 100%;\n --font-size: 11px;\n --flag-size: 14px;\n --trp-ald-preview-language-item-height: 28px;\n}\n\n.trp-ald-preview.is-compact :deep(.trp-ald-language-selector) {\n min-height: 30px;\n}\n\n.trp-ald-preview.is-compact :deep(.trp-ald-language-selector .trp-language-item) {\n min-height: 28px;\n padding: 0 8px;\n}\n</style>\n'],sourceRoot:""}]);const a=s;n.d(t,["A",0,a])},698(e,t,n){"use strict";var r=n(627),i=n.n(r),o=n(798),s=n.n(o)()(i());s.push([e.id,".trp-language-item[data-v-dbc28902]{align-items:center;color:var(--text);cursor:pointer;display:flex;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:var(--font-size,14px);gap:8px;line-height:1.2;min-height:19px;padding:5px 16px;width:100%}.trp-language-item__default[data-v-dbc28902]{pointer-events:none}.trp-language-item[data-v-dbc28902]:hover{background:var(--bg-hover);color:var(--text-hover)}.trp-flag-image[data-v-dbc28902]{aspect-ratio:var(--aspect-ratio,4/3);border-radius:var(--flag-radius,2px);height:auto;image-rendering:pixelated;width:var(--flag-size,18px)}.trp-language-item-name[data-v-dbc28902]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}","",{version:3,sources:["webpack://./assets/src/language-switcher/components/LanguageItem.vue"],names:[],mappings:"AAmGA,oCAEI,kBAAmB,CAMnB,iBAAkB,CAElB,cAAe,CATf,YAAa,CAIb,mHAAwH,CACxH,+BAAiC,CAHjC,OAAQ,CAIR,eAAgB,CAEhB,eAAgB,CALhB,gBAAiB,CAOjB,UACJ,CAEA,6CACI,mBACJ,CAEA,0CACI,0BAA2B,CAC3B,uBACJ,CAEA,iCAII,oCAAsC,CAHtC,oCAAsC,CACtC,WAAY,CACZ,yBAA0B,CAE1B,2BACJ,CAEA,yCAEI,eAAgB,CAChB,sBAAuB,CAFvB,kBAGJ",sourcesContent:['<script setup>\r\nimport { inject, computed } from \'vue\'\r\n\r\nconst props = defineProps( {\r\n language : {\r\n type : Object,\r\n required : true\r\n },\r\n dropdown : {\r\n type : Boolean,\r\n default : false\r\n },\r\n flagPos : String, // Inserted via injectedSettings\r\n nameMode : String, // Inserted via injectedSettings\r\n flagAspectRatio : String // Inserted via injectedSettings\r\n})\r\n\r\n// Injected global layout settings (optional override)\r\nconst injectedSettings = inject( \'languageItemSettings\' )\r\n\r\nconst pluginUrl = window?.tpLangSwitcherData?.misc?.pluginUrl || window?.tpAldConfiguratorData?.misc?.pluginUrl || \'\'\n\r\nconst finalFlagPos = computed( () =>\r\n props.flagPos ?? injectedSettings?.value.flagPos ?? \'before\'\r\n)\r\n\r\nconst finalNameMode = computed( () =>\r\n props.nameMode ?? injectedSettings?.value.nameMode ?? \'full\'\r\n)\r\n\r\nconst showFlag = computed( () => finalFlagPos.value !== \'hide\' )\r\nconst showName = computed( () => finalNameMode.value !== \'none\' )\r\n\r\nconst isFlagBefore = computed( () => finalFlagPos.value === \'before\' )\r\nconst isFlagAfter = computed( () => finalFlagPos.value === \'after\' )\r\n\r\nconst ratioFolder = computed(() => {\r\n const ratioSetting = props.flagAspectRatio ?? injectedSettings?.value.flagRatio?.value\r\n\r\n return ratioSetting === \'square\' ? \'1x1\' : \'4x3\'\r\n})\r\n\r\nconst flagUrl = computed(() => {\r\n if (!showFlag.value) return null\r\n\r\n // custom flag has priority\r\n if (props.language.flagPath) return props.language.flagPath\r\n\r\n const rawLocale =\r\n props.language.locale ??\r\n props.language.code ??\r\n props.language.slug ??\r\n \'\'\r\n const locale = String(rawLocale).trim()\r\n if (!locale || !pluginUrl) return null\r\n\r\n const file = locale.replace(/-/g, \'_\') + \'.svg\'\r\n return `${pluginUrl}assets/flags/${ratioFolder.value}/${encodeURIComponent(file)}`\r\n})\r\n\r\nconst displayName = computed( () =>\r\n finalNameMode.value === \'short\' ? props.language.shortName : props.language.name\r\n)\r\n<\/script>\r\n\r\n<template>\r\n <a\r\n class="trp-language-item"\r\n :class="{ \'trp-dropdown-item\': dropdown }"\r\n >\r\n <template v-if="isFlagBefore && showFlag">\r\n <img\r\n v-if="flagUrl"\r\n :src="flagUrl"\r\n class="trp-flag-image"\r\n aria-hidden="true"\r\n loading="lazy"\r\n decoding="async"\r\n />\r\n </template>\r\n\r\n <span v-if="showName" class="trp-language-item-name">\r\n {{ displayName }}\r\n </span>\r\n\r\n <template v-if="isFlagAfter && showFlag">\r\n <img\r\n v-if="flagUrl"\r\n :src="flagUrl"\r\n class="trp-flag-image"\r\n aria-hidden="true"\r\n loading="lazy"\r\n decoding="async"\r\n />\r\n </template>\r\n </a>\r\n</template>\r\n\r\n<style scoped>\r\n.trp-language-item {\r\n display: flex;\r\n align-items: center;\r\n gap: 8px;\r\n padding: 5px 16px;\r\n font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;\r\n font-size: var(--font-size, 14px);\r\n line-height: 1.2;\r\n color: var(--text);\r\n min-height: 19px;\r\n cursor: pointer;\r\n width: 100%;\r\n}\r\n\r\n.trp-language-item__default {\r\n pointer-events: none;\r\n}\r\n\r\n.trp-language-item:hover {\r\n background: var(--bg-hover);\r\n color: var(--text-hover);\r\n}\r\n\r\n.trp-flag-image {\r\n border-radius: var(--flag-radius, 2px);\r\n height: auto;\r\n image-rendering: pixelated;\r\n aspect-ratio: var(--aspect-ratio, 4/3);\r\n width: var(--flag-size, 18px);\r\n}\r\n\r\n.trp-language-item-name {\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n}\r\n</style>\r\n'],sourceRoot:""}]);const a=s;n.d(t,["A",0,a])},771(e,t,n){"use strict";var r=n(627),i=n.n(r),o=n(798),s=n.n(o)()(i());s.push([e.id,".trp-preset-applier[data-v-62b01e94]{display:grid;gap:16px;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr))}.trp-preset-card[data-v-62b01e94]{display:flex;flex-direction:column;gap:8px}.trp-preview-rect[data-v-62b01e94]{align-items:center;border-radius:var(--trp-settings-radius-high);display:flex;height:145px;justify-content:center;overflow:hidden;padding:0;position:relative;width:100%}.trp-apply-btn[data-v-62b01e94]{all:unset;align-items:center;box-sizing:border-box;color:var(--trp-settings-accent-color);cursor:pointer;display:block;font-size:var(--trp-settings-primary-font-size);font-weight:500;line-height:1.4;overflow-wrap:anywhere;padding:2px 0 1px;white-space:normal;width:100%}.trp-apply-btn[data-v-62b01e94]:hover{opacity:.8}.trp-confirm-button[data-v-62b01e94]{background:var(--trp-settings-accent-color);border:1px solid var(--trp-settings-accent-color);border-radius:var(--trp-settings-radius-medium);color:#fff;cursor:pointer;padding:5px 10px}.trp-confirm-button[data-v-62b01e94]:hover{background:transparent;color:var(--trp-settings-accent-color)}.trp-confirmation-dialog[data-v-62b01e94]{align-items:center;background:#fff;border:1px solid;border-radius:8px;bottom:0;box-sizing:border-box;display:flex;flex-direction:column;gap:8px;justify-content:center;left:0;overflow-y:auto;padding:12px;position:absolute;right:0;text-align:center;top:0;z-index:20}.trp-confirmation-dialog p[data-v-62b01e94]{margin:0}.trp-dialog-actions[data-v-62b01e94]{align-items:center;display:flex;gap:8px;justify-content:center}.trp-confirmation-overwrite-warning[data-v-62b01e94]{color:#c94f2d}.trp-cancel-button[data-v-62b01e94]{background:transparent;border:0;border-radius:var(--trp-settings-radius-medium);cursor:pointer;padding:5px 10px;transition:background-color .2s ease,color .2s ease}.trp-cancel-button[data-v-62b01e94]:hover{background:#f0f0f1;color:var(--trp-settings-accent-color)}.trp-cancel-button[data-v-62b01e94]:focus-visible{outline:2px solid var(--trp-settings-accent-color);outline-offset:2px}","",{version:3,sources:["webpack://./assets/src/shared/components/PresetApplier.vue"],names:[],mappings:"AAqKA,qCACI,YAAa,CACb,QAAS,CACT,kEACJ,CAEA,kCACI,YAAa,CACb,qBAAsB,CACtB,OACJ,CAEA,mCAOI,kBAAmB,CAHnB,6CAA8C,CAC9C,YAAa,CAHb,YAAa,CAIb,sBAAuB,CAGvB,eAAgB,CANhB,SAAU,CAKV,iBAAkB,CAPlB,UASJ,CAEA,gCACI,SAAU,CAGV,kBAAmB,CAFnB,qBAAsB,CAItB,sCAAuC,CAKvC,cAAe,CARf,aAAc,CAId,+CAAgD,CAChD,eAAgB,CAChB,eAAgB,CAIhB,sBAAuB,CAHvB,iBAAkB,CAElB,kBAAmB,CAPnB,UASJ,CAEA,sCACI,UACJ,CAEA,qCAII,2CAA4C,CAC5C,iDAAkD,CAHlD,+CAAgD,CAChD,UAAc,CAFd,cAAe,CAKf,gBACJ,CAEA,2CACI,sBAAuB,CACvB,sCACJ,CAEA,0CAII,kBAAmB,CAGnB,eAAgB,CAGhB,gBAAiB,CADjB,iBAAkB,CAMlB,QAAS,CAdT,qBAAsB,CACtB,YAAa,CACb,qBAAsB,CAGtB,OAAQ,CADR,sBAAuB,CAWvB,MAAO,CAEP,eAAgB,CAVhB,YAAa,CAIb,iBAAkB,CAElB,OAAQ,CAHR,iBAAkB,CAElB,KAAM,CAIN,UAEJ,CAEA,4CACI,QACJ,CAEA,qCAII,kBAAmB,CAHnB,YAAa,CACb,OAAQ,CACR,sBAEJ,CAEA,qDACI,aACJ,CAEA,oCACI,sBAAuB,CACvB,QAAS,CACT,+CAAgD,CAChD,cAAe,CACf,gBAAiB,CACjB,mDACJ,CAEA,0CACI,kBAAmB,CACnB,sCACJ,CAEA,kDACI,kDAAmD,CACnD,kBACJ",sourcesContent:['<script setup>\nimport { computed, ref } from \'vue\'\nimport { __, sprintf } from \'@wordpress/i18n\'\n\nconst props = defineProps({\n config: {\n type: Object,\n required: true,\n },\n presets: {\n type: Array,\n required: true,\n },\n previewComponent: {\n type: [Object, Function],\n required: true,\n },\n previewProps: {\n type: Object,\n default: () => ({}),\n },\n previewConfigProp: {\n type: String,\n default: \'config\',\n },\n getPreviewStyle: {\n type: Function,\n default: null,\n },\n getPreviewProps: {\n type: Function,\n default: null,\n },\n applyPreset: {\n type: Function,\n default: null,\n },\n labels: {\n type: Object,\n default: () => ({}),\n },\n})\n\nconst defaultLabels = {\n confirmTitleHtml: __(\'Are you sure you want to apply the <strong>%s</strong> preset?\', \'translatepress-multilingual\'),\n confirmOverwrite: __(\'It will override your current settings.\', \'translatepress-multilingual\'),\n applyPreset: __(\'Apply preset\', \'translatepress-multilingual\'),\n cancel: __(\'Cancel\', \'translatepress-multilingual\'),\n applyPresetWithName: __(\'Apply %s preset\', \'translatepress-multilingual\'),\n}\n\nconst labels = computed(() => ({\n ...defaultLabels,\n ...props.labels,\n}))\n\nconst confirmPreset = ref(null)\n\nfunction previewConfig(preset) {\n return {\n ...props.config,\n ...(preset.settings || {}),\n }\n}\n\nfunction previewStyle(preset) {\n return props.getPreviewStyle ? props.getPreviewStyle(preset.settings || {}, preset) : {}\n}\n\nfunction previewProps(preset) {\n if (props.getPreviewProps)\n return props.getPreviewProps(previewConfig(preset), preset)\n\n const nextProps = { ...props.previewProps }\n\n if (props.previewConfigProp)\n nextProps[props.previewConfigProp] = previewConfig(preset)\n\n return nextProps\n}\n\nfunction cardBackground(preset) {\n return preset.previewBackground || \'#DBDBDB\'\n}\n\nfunction requestApply(preset) {\n confirmPreset.value = preset\n}\n\nfunction cancelApply() {\n confirmPreset.value = null\n}\n\nfunction commitPreset() {\n if (!confirmPreset.value)\n return\n\n if (props.applyPreset)\n props.applyPreset(confirmPreset.value, props.config)\n else\n Object.assign(props.config, confirmPreset.value.settings || {})\n\n confirmPreset.value = null\n}\n<\/script>\n\n<template>\n <div class="trp-preset-applier">\n <div\n v-for="preset in presets"\n :key="preset.id"\n class="trp-preset-card"\n :style="previewStyle(preset)"\n >\n <div\n class="trp-preview-rect"\n :style="{ background: cardBackground(preset) }"\n >\n <component\n :is="previewComponent"\n v-bind="previewProps(preset)"\n />\n\n <div\n v-if="confirmPreset && confirmPreset.id === preset.id"\n class="trp-confirmation-dialog"\n >\n <p\n class="trp-primary-text"\n v-html="sprintf(labels.confirmTitleHtml, preset.name)"\n />\n <p class="trp-primary-text trp-confirmation-overwrite-warning">\n {{ labels.confirmOverwrite }}\n </p>\n <div class="trp-dialog-actions">\n <button\n type="button"\n class="trp-confirm-button"\n @click="commitPreset"\n >\n {{ labels.applyPreset }}\n </button>\n <button\n type="button"\n class="trp-description-text trp-cancel-button"\n @click="cancelApply"\n >\n {{ labels.cancel }}\n </button>\n </div>\n </div>\n </div>\n\n <button\n type="button"\n class="trp-apply-btn"\n @click="requestApply(preset)"\n >\n {{ sprintf(labels.applyPresetWithName, preset.name) }}\n </button>\n </div>\n </div>\n</template>\n\n<style scoped>\n.trp-preset-applier {\n display: grid;\n gap: 16px;\n grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));\n}\n\n.trp-preset-card {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.trp-preview-rect {\n width: 100%;\n height: 145px;\n padding: 0;\n border-radius: var(--trp-settings-radius-high);\n display: flex;\n justify-content: center;\n align-items: center;\n position: relative;\n overflow: hidden;\n}\n\n.trp-apply-btn {\n all: unset;\n box-sizing: border-box;\n display: block;\n align-items: center;\n width: 100%;\n color: var(--trp-settings-accent-color);\n font-size: var(--trp-settings-primary-font-size);\n font-weight: 500;\n line-height: 1.4;\n padding: 2px 0 1px;\n cursor: pointer;\n white-space: normal;\n overflow-wrap: anywhere;\n}\n\n.trp-apply-btn:hover {\n opacity: 0.8;\n}\n\n.trp-confirm-button {\n cursor: pointer;\n border-radius: var(--trp-settings-radius-medium);\n color: #ffffff;\n background: var(--trp-settings-accent-color);\n border: 1px solid var(--trp-settings-accent-color);\n padding: 5px 10px;\n}\n\n.trp-confirm-button:hover {\n background: transparent;\n color: var(--trp-settings-accent-color);\n}\n\n.trp-confirmation-dialog {\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 8px;\n background: #fff;\n padding: 12px;\n border-radius: 8px;\n border: 1px solid;\n text-align: center;\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 20;\n overflow-y: auto;\n}\n\n.trp-confirmation-dialog p {\n margin: 0;\n}\n\n.trp-dialog-actions {\n display: flex;\n gap: 8px;\n justify-content: center;\n align-items: center;\n}\n\n.trp-confirmation-overwrite-warning {\n color: #C94F2D;\n}\n\n.trp-cancel-button {\n background: transparent;\n border: 0;\n border-radius: var(--trp-settings-radius-medium);\n cursor: pointer;\n padding: 5px 10px;\n transition: background-color 0.2s ease, color 0.2s ease;\n}\n\n.trp-cancel-button:hover {\n background: #f0f0f1;\n color: var(--trp-settings-accent-color);\n}\n\n.trp-cancel-button:focus-visible {\n outline: 2px solid var(--trp-settings-accent-color);\n outline-offset: 2px;\n}\n</style>\n'],sourceRoot:""}]);const a=s;n.d(t,["A",0,a])},508(e,t,n){"use strict";var r=n(627),i=n.n(r),o=n(798),s=n.n(o)()(i());s.push([e.id,".trp-actions-overlay[data-v-0d9f66ef]{backdrop-filter:blur(2px);background:rgba(0,0,0,.35);inset:0;position:fixed;z-index:1000}.trp-revert-confirm[data-v-0d9f66ef]{background:#fff;border:1px solid #e2e2e4;border-radius:8px;left:50%;max-width:350px;padding:15px;position:fixed;top:50%;transform:translate(-50%,-50%);z-index:10001}.trp-revert-actions[data-v-0d9f66ef]{align-items:center;display:flex;justify-content:center}.trp-revert-text[data-v-0d9f66ef]{text-align:center}.trp-btn-revert[data-v-0d9f66ef]{margin-right:10px}.trp-btn-cancel[data-v-0d9f66ef]{cursor:pointer}.trp-btn-cancel[data-v-0d9f66ef]:hover{opacity:.8}.trp-settings-actions[data-v-0d9f66ef]{align-items:center;display:flex;gap:12px;margin-top:24px}.trp-button-secondary[data-v-0d9f66ef]{height:40px}.trp-button-secondary:hover svg path[data-v-0d9f66ef]{fill:#fff}.trp-submit-btn[data-v-0d9f66ef]{align-items:center;display:flex;gap:8px}.trp-button-secondary[data-v-0d9f66ef]:disabled,.trp-submit-btn[data-v-0d9f66ef]:disabled{opacity:.8;pointer-events:none}.trp-save-spinner[data-v-0d9f66ef]{animation:spin-0d9f66ef .6s linear infinite;border:2px solid hsla(0,0%,100%,.3);border-radius:50%;border-top-color:#fff;display:inline-block;height:14px;width:14px}@keyframes spin-0d9f66ef{to{transform:rotate(1turn)}}.trp-save-ls-error[data-v-0d9f66ef]{color:#c00;font-size:13px;margin-left:12px}","",{version:3,sources:["webpack://./assets/src/shared/components/SettingsActions.vue"],names:[],mappings:"AAoHA,sCAII,yBAAyB,CADzB,0BAA0B,CAD1B,OAAQ,CADR,cAAe,CAIf,YACJ,CAEA,qCAGI,eAAmB,CACnB,wBAAyB,CACzB,iBAAkB,CAGlB,QAAS,CAFT,eAAgB,CAIhB,YAAa,CATb,cAAe,CAMf,OAAQ,CAER,8BAAgC,CAPhC,aASJ,CAEA,qCAGI,kBAAmB,CAFnB,YAAa,CACb,sBAEJ,CAEA,kCACI,iBACJ,CAEA,iCACI,iBACJ,CAEA,iCACI,cACJ,CAEA,uCACI,UACJ,CAEA,uCAEI,kBAAmB,CADnB,YAAa,CAEb,QAAS,CACT,eACJ,CAEA,uCACI,WACJ,CAEA,sDACI,SACJ,CAEA,iCAEI,kBAAmB,CADnB,YAAa,CAEb,OACJ,CAEA,0FACI,UAAY,CACZ,mBACJ,CAEA,mCAQI,2CAAoC,CAFpC,mCAAyB,CACzB,iBAAkB,CADlB,qBAAyB,CAHzB,oBAAqB,CADrB,WAAY,CADZ,UAQJ,CAEA,yBACI,GAAK,uBAA2B,CACpC,CAEA,oCACI,UAAW,CACX,cAAe,CACf,gBACJ",sourcesContent:['<script setup>\nimport { inject, ref } from "vue"\nimport { __ } from "@wordpress/i18n"\n\nconst props = defineProps({\n persistenceKey: { type: String, default: \'settingsPersistence\' }\n})\n\nconst persistence = inject(props.persistenceKey)\n\nif (!persistence) {\n throw new Error(`SettingsActions could not find persistence provider "${props.persistenceKey}".`)\n}\n\nconst { save, revert, isDirty, saving, justSaved, errorMsg } = persistence\n\r\nconst confirmRevert = ref(false)\r\n\r\nfunction askRevert () {\r\n confirmRevert.value = true\r\n}\r\nfunction cancelRevert () {\r\n confirmRevert.value = false\r\n}\r\nfunction doRevert () {\r\n revert()\r\n confirmRevert.value = false\r\n}\r\n\r\nconst T = {\n saving: __(\'Saving...\', \'translatepress-multilingual\'),\n saved: __(\'Saved!\', \'translatepress-multilingual\'),\n saveChanges: __(\'Save changes\', \'translatepress-multilingual\'),\n revertTitle: __(\'Revert to last saved values\', \'translatepress-multilingual\'),\n revertChanges: __(\'Revert changes\', \'translatepress-multilingual\'),\n revertConfirmText: __(\'Restoring will revert to the last saved version and discard your current edits.\', \'translatepress-multilingual\'),\n revertBtn: __(\'Revert\', \'translatepress-multilingual\'),\n cancelBtn: __(\'Keep editing\', \'translatepress-multilingual\'),\n}\r\n<\/script>\r\n\r\n<template>\r\n <teleport to="body">\r\n <div\r\n v-if="confirmRevert"\r\n class="trp-actions-overlay"\r\n />\r\n </teleport>\r\n\r\n <div class="trp-settings-actions">\r\n <button\n class="trp-submit-btn"\n type="button"\n :disabled="!isDirty || saving"\n @click="save"\n >\n <template v-if="saving">\r\n <span class="trp-save-spinner" />\r\n <span>{{ T.saving }}</span>\r\n </template>\r\n\r\n <template v-else-if="justSaved">\r\n <span>{{ T.saved }}</span>\r\n </template>\r\n\r\n <template v-else>\r\n <span>{{ T.saveChanges }}</span>\r\n </template>\r\n </button>\r\n\r\n <button\n class="trp-button-secondary"\n type="button"\n :disabled="!isDirty || saving"\n :title="T.revertTitle"\n @click="askRevert"\n >\r\n <svg\r\n width="14" height="14"\r\n viewBox="0 0 14 14"\r\n fill="none"\r\n xmlns="http://www.w3.org/2000/svg"\r\n style="margin-right: 6px; vertical-align: middle;"\r\n >\r\n <path\r\n d="M7.1752 0.713867C10.7452 0.713867 13.3002 3.54187 13.3002 7.01387C13.3002 10.4859 10.7452 13.3139 7.1752 13.3139C4.9352 13.3139 2.9612 12.2009 1.7992 10.5209L3.6122 9.45687C4.3822 10.5069 5.6142 11.2139 7.0002 11.2139C9.3102 11.2139 11.2002 9.26087 11.2002 7.01387C11.2002 4.76687 9.3102 2.81387 7.0002 2.81387C5.6212 2.81387 4.3962 3.51387 3.6262 4.55687L4.9002 5.61387L0.700195 7.01387V2.11387L2.0232 3.21987C3.2062 1.70087 5.0752 0.713867 7.1752 0.713867Z"\r\n fill="#2271B1"\r\n />\r\n </svg>\r\n {{ T.revertChanges }}\r\n </button>\r\n\r\n <span v-if="errorMsg" class="trp-save-ls-error">{{ errorMsg }}</span>\r\n </div>\r\n\r\n <teleport to="body">\r\n <transition name="fade">\r\n <div v-if="confirmRevert" class="trp-revert-confirm">\r\n <p class="trp-revert-text trp-primary-text">\r\n {{ T.revertConfirmText }}\r\n </p>\r\n\r\n <div class="trp-revert-actions">\r\n <button class="trp-btn-revert trp-submit-btn" @click="doRevert">\r\n {{ T.revertBtn }}\r\n </button>\r\n <span class="trp-btn-cancel" @click="cancelRevert">\r\n {{ T.cancelBtn }}\r\n </span>\r\n </div>\r\n </div>\r\n </transition>\r\n </teleport>\r\n</template>\r\n\r\n<style scoped>\r\n.trp-actions-overlay {\r\n position: fixed;\r\n inset: 0;\r\n background:rgba(0,0,0,.35);\r\n backdrop-filter:blur(2px);\r\n z-index:1000\r\n}\r\n\r\n.trp-revert-confirm {\r\n position: fixed;\r\n z-index: 10001;\r\n background: #FFFFFF;\r\n border: 1px solid #e2e2e4;\r\n border-radius: 8px;\r\n max-width: 350px;\r\n top: 50%;\r\n left: 50%;\r\n transform: translate(-50%, -50%);\r\n padding: 15px;\r\n}\r\n\r\n.trp-revert-actions {\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n}\r\n\r\n.trp-revert-text {\r\n text-align: center;\r\n}\r\n\r\n.trp-btn-revert {\r\n margin-right: 10px;\r\n}\r\n\r\n.trp-btn-cancel {\r\n cursor: pointer;\r\n}\r\n\r\n.trp-btn-cancel:hover {\r\n opacity: 0.8;\r\n}\r\n\r\n.trp-settings-actions {\r\n display: flex;\r\n align-items: center;\r\n gap: 12px;\r\n margin-top: 24px;\r\n}\r\n\r\n.trp-button-secondary {\r\n height: 40px;\r\n}\r\n\r\n.trp-button-secondary:hover svg path {\r\n fill: white;\r\n}\r\n\r\n.trp-submit-btn {\r\n display: flex;\r\n align-items: center;\r\n gap: 8px;\r\n}\r\n\r\n.trp-submit-btn:disabled, .trp-button-secondary:disabled {\r\n opacity: 0.8;\r\n pointer-events: none;\r\n}\r\n\r\n.trp-save-spinner {\r\n width: 14px;\r\n height: 14px;\r\n display: inline-block;\r\n\r\n border: 2px solid rgba(255, 255, 255, 0.3); /* outer ring (faded) */\r\n border-top-color: #ffffff; /* spinning top highlight */\r\n border-radius: 50%;\r\n animation: spin 0.6s linear infinite;\r\n}\r\n\r\n@keyframes spin {\r\n to { transform: rotate(360deg); }\r\n}\r\n\r\n.trp-save-ls-error {\r\n color: #c00;\r\n font-size: 13px;\r\n margin-left: 12px;\r\n}\r\n</style>\r\n'],sourceRoot:""}]);const a=s;n.d(t,["A",0,a])},928(e,t,n){"use strict";var r=n(627),i=n.n(r),o=n(798),s=n.n(o)()(i());s.push([e.id,".trp-settings-box[data-v-7483c948]{background:#fff;border:1px solid #e2e2e4;border-radius:2px;box-sizing:border-box;display:flex;flex-direction:column;gap:24px;padding:24px}.trp-header[data-v-7483c948]{display:flex;justify-content:space-between}.trp-settings-box.trp-collapsible .trp-header[data-v-7483c948]{cursor:pointer}.trp-title[data-v-7483c948]{color:var(--trp-settings-primary-color);font-size:16px;font-weight:590}.trp-chevron[data-v-7483c948]{transition:transform .2s ease}.trp-chevron.open[data-v-7483c948]{transform:rotate(180deg)}.trp-body[data-v-7483c948]{display:flex;flex-direction:column;gap:24px}.trp-separator[data-v-7483c948]{background:var(--trp-settings-light-gray-border-color);height:1px;width:100%}","",{version:3,sources:["webpack://./assets/src/shared/components/SettingsBox.vue"],names:[],mappings:"AAyIA,mCAMI,eAAgB,CAChB,wBAAyB,CACzB,iBAAkB,CAPlB,qBAAsB,CACtB,YAAa,CACb,qBAAsB,CAEtB,QAAS,CADT,YAKJ,CAEA,6BACI,YAAa,CACb,6BACJ,CAEA,+DACI,cACJ,CAEA,4BAEI,uCAAwC,CACxC,cAAe,CAFf,eAGJ,CAEA,8BACI,6BACJ,CAEA,mCACI,wBACJ,CAEA,2BACI,YAAa,CACb,qBAAsB,CACtB,QACJ,CAEA,gCAGI,sDAAuD,CAFvD,UAAW,CACX,UAEJ",sourcesContent:['<script setup>\nimport { ref, computed, reactive, inject } from \'vue\'\n\nimport ColorField from \'./fields/ColorField.vue\'\nimport NumberField from \'./fields/NumberField.vue\'\nimport ToggleField from \'./fields/ToggleField.vue\'\nimport ToggleStatusField from \'./fields/ToggleStatusField.vue\'\nimport RadioGroupField from \'./fields/RadioGroupField.vue\'\nimport QuadRadiusField from \'./fields/QuadRadiusField.vue\'\nimport CustomCssAreaField from \'./fields/CustomCssAreaField.vue\'\nimport CheckboxField from \'./fields/CheckboxField.vue\'\nimport CheckboxGroupField from \'./fields/CheckboxGroupField.vue\'\nimport TextField from \'./fields/TextField.vue\'\nimport TextareaField from \'./fields/TextareaField.vue\'\nimport SelectField from \'./fields/SelectField.vue\'\nimport LanguageConditionField from \'./fields/LanguageConditionField.vue\'\n\nconst baseComponentMap = {\n color : ColorField,\n number : NumberField,\n toggle : ToggleField,\n toggleStatus : ToggleStatusField,\n radio : RadioGroupField,\n quadNumber : QuadRadiusField,\n customCss : CustomCssAreaField,\n checkbox : CheckboxField,\n checkboxGroup : CheckboxGroupField,\n text : TextField,\n textarea : TextareaField,\n select : SelectField,\n languageCondition : LanguageConditionField,\n}\n\nconst props = defineProps( {\n title : { type: String, required: true },\n fields : { type: Array, required: false, default: [] }, // [{ fields:[{key,type,label,...}] }]\n collapsible : { type: Boolean, default: false },\n scope : { type: String, default: \'\' },\n config : { type: Object, default: null },\n components : { type: Object, default: () => ({}) },\n})\n\nconst cfg = props.config || inject(props.scope)\n\nif (!cfg) {\n throw new Error(`SettingsBox needs either a config prop or an injected scope. Scope: "${props.scope}".`)\n}\n\nconst componentMap = computed(() => ({\n ...baseComponentMap,\n ...props.components\n}))\n\nconst open = ref( !props.collapsible )\n\nconst bindings = reactive({})\n\nprops.fields.forEach(field => {\n if (field.type === \'separator\' || bindings[field.key]) return;\n\n if (cfg[field.key] === undefined && field.default !== undefined)\n cfg[field.key] = field.default\n\n bindings[field.key] = computed({\n get: () => cfg[field.key],\n set: val => cfg[field.key] = val\n })\n})\n\nfunction isFieldVisible(field) {\n return field.visible ? field.visible(cfg) : true\n}\n\nfunction getFieldProps(field) {\n const {\n key: _key,\n type,\n layout: _layout,\n visible: _visible,\n default: _defaultValue,\n ...componentProps\n } = field\n\n if (type === \'languageCondition\')\n componentProps.config = cfg\n\n if (type === \'customCss\')\n componentProps.visible = true\n\n if (type === \'lCustomizer\')\n componentProps.scope = props.scope\n\n return componentProps\n}\n<\/script>\n\n<template>\n <div\n class="trp-settings-box"\n :class="{ \'trp-collapsible\': props.collapsible }"\n >\n <header class="trp-header" @click="props.collapsible && (open = !open)">\n <span class="trp-title">{{ props.title }}</span>\n <svg\n v-if="props.collapsible"\n class="trp-chevron"\n :class="{ open }"\n viewBox="0 0 20 20"\n width="20" height="20"\n >\n <path d="M5 6L10 11L15 6L17 7L10 14L3 7L5 6Z" fill="#9CA1A8"/>\n </svg>\n </header>\n\n <section v-show="open" class="trp-body">\n <slot v-if="$slots.default" /> \x3c!-- In case a component is injected inside SettingsBox, it will be directly rendered - bypassing the routing system. --\x3e\n\n <template v-for="(field, index) in props.fields" :key="field.key || `${field.type}-${index}`">\n <div v-if="field.type === \'separator\' && isFieldVisible(field)" class="trp-separator" />\n <component\n v-else-if="isFieldVisible(field)"\n :is="componentMap[field.type]"\n v-model="bindings[field.key]"\n v-bind="getFieldProps(field)"\n :class="[\n \'trp-field\',\n field.hasOwnProperty(\'layout\') ? \'trp-field--column\' : \'trp-field--row\'\n ]"\n />\n </template>\n\n <slot name="end" />\n </section>\n </div>\n</template>\n\n<style scoped>\n.trp-settings-box {\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n padding: 24px;\n gap: 24px;\n background: #fff;\n border: 1px solid #e2e2e4;\n border-radius: 2px;\n}\n\n.trp-header {\n display: flex;\n justify-content: space-between;\n}\n\n.trp-settings-box.trp-collapsible .trp-header {\n cursor: pointer;\n}\n\n.trp-title {\n font-weight: 590;\n color: var(--trp-settings-primary-color);\n font-size: 16px;\n}\n\n.trp-chevron {\n transition: transform .2s ease;\n}\n\n.trp-chevron.open {\n transform: rotate(180deg);\n}\n\n.trp-body {\n display: flex;\n flex-direction: column;\n gap: 24px;\n}\n\n.trp-separator {\n height: 1px;\n width: 100%;\n background: var(--trp-settings-light-gray-border-color);\n}\n\n</style>\n'],sourceRoot:""}]);const a=s;n.d(t,["A",0,a])},730(e,t,n){"use strict";var r=n(627),i=n.n(r),o=n(798),s=n.n(o)()(i());s.push([e.id,".trp-description-text[data-v-6b2a964c]{line-height:150%}.trp-settings-checkbox input[data-v-6b2a964c]:disabled{background:var(--trp-settings-disabled-color);border:none!important;pointer-events:none}","",{version:3,sources:["webpack://./assets/src/shared/components/fields/CheckboxField.vue"],names:[],mappings:"AA6DA,uCACI,gBACJ,CACA,uDAEI,6CAA8C,CAC9C,qBAAuB,CAFvB,mBAGJ",sourcesContent:['<script setup>\r\nimport { computed } from \'vue\'\r\n\r\n/**\r\n * A simple checkbox field for the settings UI.\r\n *\r\n * Props\r\n * - modelValue (Boolean) – bound value (true = checked)\r\n * - label (String) – bold label text\r\n * - description (String) – secondary text (HTML allowed)\r\n *\r\n * Emits\r\n * - update:modelValue\r\n */\r\nconst props = defineProps({\r\n modelValue : { type: Boolean, required: true },\r\n label : { type: String, default: \'\' },\r\n description : { type: String, default: \'\' },\r\n disabled : { type: Boolean, default: false },\r\n title : { type: String, default: \'\' }\r\n})\r\n\r\nconst emit = defineEmits([\'update:modelValue\'])\r\n\r\n/* A stable unique ID so the <label> is associated with the <input>. */\r\nconst inputId = `trp-checkbox-${Math.random().toString(36).slice(2)}`\r\n\r\n/* Computed wrapper to keep SettingsBox’s two-way binding contract intact. */\r\nconst checked = computed({\r\n get: () => props.modelValue === true,\r\n set: (val) => emit(\'update:modelValue\', val)\r\n})\r\n\r\n<\/script>\r\n\r\n<template>\r\n <div\r\n class="trp-settings-checkbox trp-settings-options-item"\r\n :title="props.title"\r\n >\r\n <input\r\n type="checkbox"\r\n :id="inputId"\r\n v-model="checked"\r\n :disabled="props.disabled"\r\n />\r\n\r\n <label :for="inputId" class="trp-checkbox-label">\r\n <div class="trp-checkbox-content">\r\n <span v-if="label" class="trp-primary-text-bold">{{ label }}</span>\r\n <span\r\n v-if="description"\r\n class="trp-description-text"\r\n v-html="description"\r\n />\r\n </div>\r\n </label>\r\n </div>\r\n</template>\r\n\r\n<style scoped>\r\n.trp-description-text {\r\n line-height: 150%;\r\n}\r\n.trp-settings-checkbox input:disabled {\r\n pointer-events: none;\r\n background: var(--trp-settings-disabled-color);\r\n border: none !important;\r\n}\r\n</style>\r\n'],sourceRoot:""}]);const a=s;n.d(t,["A",0,a])},209(e,t,n){"use strict";var r=n(627),i=n.n(r),o=n(798),s=n.n(o)()(i());s.push([e.id,".trp-checkbox-group__wrapper[data-v-394252e9]{gap:16px}.trp-checkbox-group[data-v-394252e9]{align-items:flex-start;display:flex;flex-wrap:wrap;gap:14px 24px}.trp-checkbox-group--grid[data-v-394252e9]{display:grid;grid-template-columns:repeat(var(--trp-checkbox-columns),minmax(0,1fr))}.trp-checkbox-group__option[data-v-394252e9]{align-items:flex-start;cursor:pointer;display:inline-flex;gap:8px;line-height:20px;min-width:0}.trp-checkbox-group__option input[data-v-394252e9]{flex:0 0 20px;height:20px;margin:0;width:20px}","",{version:3,sources:["webpack://./assets/src/shared/components/fields/CheckboxGroupField.vue"],names:[],mappings:"AAyDA,8CACI,QACJ,CAEA,qCAII,sBAAuB,CAHvB,YAAa,CACb,cAAe,CACf,aAEJ,CAEA,2CACI,YAAa,CACb,uEACJ,CAEA,6CAEI,sBAAuB,CAIvB,cAAe,CALf,mBAAoB,CAEpB,OAAQ,CAER,gBAAiB,CADjB,WAGJ,CAEA,mDACI,aAAc,CAEd,WAAY,CACZ,QAAS,CAFT,UAGJ",sourcesContent:['<script setup>\nimport { computed } from \'vue\'\n\nconst props = defineProps({\n label: { type: String, default: \'\' },\n modelValue: { type: Array, default: () => [] },\n options: {\n type: Array,\n required: true,\n validator: arr => arr.every(o => \'value\' in o && \'label\' in o)\n },\n columns: { type: Number, default: 0 },\n})\n\nconst emit = defineEmits([\'update:modelValue\'])\n\nconst selected = computed(() => Array.isArray(props.modelValue) ? props.modelValue : [])\n\nfunction toggleValue(value, checked) {\n const next = new Set(selected.value)\n\n if (checked)\n next.add(value)\n else\n next.delete(value)\n\n emit(\'update:modelValue\', Array.from(next))\n}\n<\/script>\n\n<template>\n <div class="trp-checkbox-group__wrapper">\n <span v-if="label" class="trp-field__label trp-primary-text-bold">{{ label }}</span>\n\n <div\n class="trp-checkbox-group"\n :class="{ \'trp-checkbox-group--grid\': columns > 0 }"\n :style="columns > 0 ? { \'--trp-checkbox-columns\': columns } : null"\n >\n <label\n v-for="option in options"\n :key="option.value"\n class="trp-checkbox-group__option"\n >\n <input\n type="checkbox"\n :value="option.value"\n :checked="selected.includes(option.value)"\n @change="event => toggleValue(option.value, event.target.checked)"\n />\n <span>{{ option.label }}</span>\n </label>\n </div>\n </div>\n</template>\n\n<style scoped>\n.trp-checkbox-group__wrapper {\n gap: 16px;\n}\n\n.trp-checkbox-group {\n display: flex;\n flex-wrap: wrap;\n gap: 14px 24px;\n align-items: flex-start;\n}\n\n.trp-checkbox-group--grid {\n display: grid;\n grid-template-columns: repeat(var(--trp-checkbox-columns), minmax(0, 1fr));\n}\n\n.trp-checkbox-group__option {\n display: inline-flex;\n align-items: flex-start;\n gap: 8px;\n min-width: 0;\n line-height: 20px;\n cursor: pointer;\n}\n\n.trp-checkbox-group__option input {\n flex: 0 0 20px;\n width: 20px;\n height: 20px;\n margin: 0;\n}\n</style>\n'],sourceRoot:""}]);const a=s;n.d(t,["A",0,a])},252(e,t,n){"use strict";var r=n(627),i=n.n(r),o=n(798),s=n.n(o)()(i());s.push([e.id,".trp-color__wrapper[data-v-f6dd67f8]{align-items:center;display:flex;gap:8px;position:relative}.trp-color--picking[data-v-f6dd67f8]{-webkit-user-select:none;-moz-user-select:none;user-select:none}.trp-color-input[data-v-f6dd67f8]{border:1px solid #e2e2e4;border-radius:5px;cursor:pointer;height:29px;width:53px}.trp-color-input[data-v-f6dd67f8]:focus-visible{outline:2px solid var(--trp-settings-accent-color)}.trp-color__popover[data-v-f6dd67f8]{left:0;position:absolute;top:calc(100% + 4px);z-index:1000}.trp-color-code[data-v-f6dd67f8]{text-transform:uppercase}","",{version:3,sources:["webpack://./assets/src/shared/components/fields/ColorField.vue"],names:[],mappings:"AAuFA,qCAGI,kBAAmB,CADnB,YAAa,CAEb,OAAQ,CAHR,iBAIJ,CAEA,qCACI,wBAAiB,CAAjB,qBAAiB,CAAjB,gBACJ,CAEA,kCAGI,wBAAyB,CACzB,iBAAkB,CAClB,cAAe,CAHf,WAAY,CADZ,UAKJ,CAEA,gDACI,kDACJ,CAEA,qCAGI,MAAO,CAFP,iBAAkB,CAClB,oBAAqB,CAErB,YACJ,CAEA,iCACI,wBACJ",sourcesContent:['<script setup>\r\nimport { ref, computed, onMounted, onBeforeUnmount } from \'vue\'\nimport { __ } from \'@wordpress/i18n\'\nimport \'vue-color/style.css\'\nimport { ChromePicker, tinycolor } from \'vue-color\'\r\n\r\nconst props = defineProps({\r\n label : { type: String, default: \'\' },\r\n modelValue : { type: String, required: true }\r\n})\r\nconst emit = defineEmits([\'update:modelValue\'])\nconst openColourPickerLabel = __(\'Open colour picker\', \'translatepress-multilingual\')\n\r\n// picker visibility + refs for click-outside\r\nconst showPicker = ref(false)\r\nconst swatchRef = ref(null)\r\nconst pickerRef = ref(null)\r\n\r\nfunction togglePicker() {\r\n showPicker.value = !showPicker.value\r\n}\r\nfunction onClickOutside(e) {\r\n if (\r\n swatchRef.value && !swatchRef.value.contains(e.target) &&\r\n pickerRef.value && !pickerRef.value.contains(e.target)\r\n ) {\r\n showPicker.value = false\r\n }\r\n}\r\n\r\nonMounted(() => document.addEventListener(\'mousedown\', onClickOutside))\r\nonBeforeUnmount(() => document.removeEventListener(\'mousedown\', onClickOutside))\r\n\r\nconst tinyColorModel = computed({\r\n get() {\r\n return tinycolor(props.modelValue)\r\n },\r\n set(tc) {\r\n // ensure we handle both hex-only and hex+alpha\r\n const c = tinycolor(tc)\r\n const hex = c.toHexString().toUpperCase()\r\n const alpha = Math.round(c.getAlpha() * 255)\r\n .toString(16)\r\n .padStart(2,\'0\')\r\n .toUpperCase()\r\n\r\n const out = alpha === \'FF\' ? hex : `${hex}${alpha}`\r\n\r\n emit(\'update:modelValue\', out)\r\n }\r\n})\r\n<\/script>\r\n\r\n<template>\r\n <div :class="{ \'trp-color--picking\': showPicker }">\r\n <span v-if="label" class="trp-field__label trp-primary-text-bold">\r\n {{ label }}\r\n </span>\r\n <div class="trp-color__wrapper">\r\n <div\r\n class="trp-color-input"\r\n :style="{ background: modelValue }"\r\n ref="swatchRef"\r\n @click="togglePicker"\r\n @keydown.enter.space="togglePicker"\r\n role="button"\r\n :aria-label="openColourPickerLabel"\n tabindex="0"\r\n />\r\n\r\n <span class="trp-color-code trp-primary-text">\r\n {{ modelValue.toUpperCase() }}\r\n </span>\r\n\r\n <div\r\n v-if="showPicker"\r\n class="trp-color__popover"\r\n ref="pickerRef"\r\n @mousedown.stop\r\n >\r\n <ChromePicker v-model:tinyColor="tinyColorModel" />\r\n </div>\r\n </div>\r\n </div>\r\n</template>\r\n\r\n<style scoped>\r\n.trp-color__wrapper {\r\n position: relative;\r\n display: flex;\r\n align-items: center;\r\n gap: 8px;\r\n}\r\n\r\n.trp-color--picking {\r\n user-select: none;\r\n}\r\n\r\n.trp-color-input {\r\n width: 53px;\r\n height: 29px;\r\n border: 1px solid #E2E2E4;\r\n border-radius: 5px;\r\n cursor: pointer;\r\n}\r\n\r\n.trp-color-input:focus-visible {\r\n outline: 2px solid var(--trp-settings-accent-color);\r\n}\r\n\r\n.trp-color__popover {\r\n position: absolute;\r\n top: calc(100% + 4px);\r\n left: 0;\r\n z-index: 1000;\r\n}\r\n\r\n.trp-color-code {\r\n text-transform: uppercase;\r\n}\r\n</style>\r\n'],sourceRoot:""}]);const a=s;n.d(t,["A",0,a])},714(e,t,n){"use strict";var r=n(627),i=n.n(r),o=n(798),s=n.n(o)()(i());s.push([e.id,".cm-focused{outline:none!important}.cm-editor{border:1px solid var(--trp-settings-light-gray-border-color,#ccc);border-radius:8px}.cm-gutters{border-radius:8px 0 0 8px}","",{version:3,sources:["webpack://./assets/src/shared/components/fields/CustomCssAreaField.vue"],names:[],mappings:"AAwJA,YACI,sBACJ,CAEA,WACI,iEAAmE,CACnE,iBACJ,CAEA,YACI,yBACJ",sourcesContent:["<script setup>\nimport { ref, watch, onMounted, onBeforeUnmount, shallowRef } from 'vue'\nimport { __ } from '@wordpress/i18n'\nimport { Codemirror } from 'vue-codemirror'\nimport { css } from '@codemirror/lang-css'\n\nimport debounce from '../../composables/utils/debounce'\n\nconst props = defineProps({\n label: { type: String, default: '' },\n visible: { type: Boolean, default: false },\n modelValue: { type: String, default: '' },\n scopeSelector: { type: String, default: '.trp-language-switcher' }\n})\nconst emit = defineEmits(['update:modelValue'])\n\nconst rawCss = ref(props.modelValue)\nconst scopedCss = ref('')\nconst extensions = [css()]\nconst view = shallowRef(null)\nconst placeholder = __('Write custom CSS here...', 'translatepress-multilingual')\n\nconst debouncedEmit = debounce( ( v) => {\n const scoped = scopeCustomCss(v)\n scopedCss.value = scoped\n emit('update:modelValue', scoped)\n}, 300)\n\nwatch(() => props.modelValue, v => {\n if (v !== scopedCss.value && v !== rawCss.value) {\n rawCss.value = v\n }\n})\n\nwatch(rawCss, v => debouncedEmit(v))\n\nwatch(scopedCss, v => {\n if (styleEl) {\n styleEl.textContent = v\n }\n})\n\nconst handleReady = ({ view: v }) => (view.value = v)\n\n/* Live <style> injection only when visible === true */\nlet styleEl = null\n\nconst injectStyle = () => {\n if (styleEl || !props.visible) return\n styleEl = document.createElement('style')\n styleEl.dataset.customCss = ''\n styleEl.textContent = scopeCustomCss(rawCss.value)\n document.head.appendChild(styleEl)\n}\n\nconst removeStyle = () => {\n if (styleEl) {\n styleEl.remove()\n styleEl = null\n }\n}\n\nconst scopeCustomCss = (css, scopeSelector = props.scopeSelector) => {\n // Parse into a temporary stylesheet via the browser’s CSSOM\n const styleEl = document.createElement('style');\n styleEl.textContent = css;\n document.head.appendChild(styleEl);\n const sheet = styleEl.sheet;\n document.head.removeChild(styleEl);\n\n const output = [];\n\n for (const rule of sheet.cssRules) {\n // Root-level style rules\n if (rule instanceof CSSStyleRule) {\n const scoped = rule.selectorText\n .split(',')\n .map(sel => {\n sel = sel.trim();\n // If already scoped, leave it\n if (sel.startsWith(scopeSelector))\n return sel;\n\n // Otherwise prefix\n return `${scopeSelector} ${sel}`\n })\n .join(', ')\n output.push(`${scoped} { ${rule.style.cssText} }`)\n }\n\n // @media blocks\n else if (rule instanceof CSSMediaRule) {\n const inner = [];\n for (const child of rule.cssRules) {\n if (child instanceof CSSStyleRule) {\n const scoped = child.selectorText\n .split(',')\n .map(sel => {\n sel = sel.trim()\n return sel.startsWith(scopeSelector)\n ? sel\n : `${scopeSelector} ${sel}`\n })\n .join(', ')\n inner.push(`${scoped} { ${child.style.cssText} }`)\n } else {\n // e.g. nested @supports, @keyframes inside @media\n inner.push(child.cssText)\n }\n }\n output.push(`@media ${rule.media.mediaText} {\\n${inner.join('\\n')}\\n}`)\n }\n\n // Everything else (import, keyframes, supports)\n else\n output.push(rule.cssText)\n }\n\n return output.join('\\n')\n}\n\n// Track visibility changes\nwatch(() => props.visible, (visible) => {\n if (visible) injectStyle()\n else removeStyle()\n})\n\nonMounted(() => {\n if (props.visible) injectStyle()\n})\nonBeforeUnmount(removeStyle)\n<\/script>\n\n<template>\n <div class=\"trp-custom-css-editor\" v-show=\"visible\">\n <label v-if=\"label\" class=\"trp-field__label trp-primary-text-bold\">\n {{ label }}\n </label>\n\n <Codemirror\n v-model=\"rawCss\"\n :placeholder=\"placeholder\"\n :style=\"{ height: '250px', width: '80%', fontSize: '14px', fontFamily: 'monospace' }\"\n :indent-with-tab=\"true\"\n :tab-size=\"2\"\n :extensions=\"extensions\"\n @ready=\"handleReady\"\n />\n </div>\n</template>\n\n<style >\n.cm-focused {\n outline: none !important;\n}\n\n.cm-editor {\n border: 1px solid var(--trp-settings-light-gray-border-color, #ccc);\n border-radius: 8px;\n}\n\n.cm-gutters {\n border-radius: 8px 0 0 8px;\n}\n</style>\n"],sourceRoot:""}]);const a=s;n.d(t,["A",0,a])},468(e,t,n){"use strict";var r=n(627),i=n.n(r),o=n(798),s=n.n(o)()(i());s.push([e.id,".trp-language-condition[data-v-dbb9ab6e]{display:flex;flex-direction:column;gap:14px;width:100%}.trp-language-condition__toggle-row[data-v-dbb9ab6e]{align-items:center;display:flex;gap:16px;width:100%}.trp-language-condition__toggle[data-v-dbb9ab6e]{background:#fff;border:1px solid #949494;border-radius:28px;cursor:pointer;height:19px;padding:0;position:relative;width:36px}.trp-language-condition__toggle.is-active[data-v-dbb9ab6e]{background:var(--trp-settings-accent-color,#0073aa);border-color:var(--trp-settings-accent-color,#0073aa)}.trp-language-condition__toggle-knob[data-v-dbb9ab6e]{background:#949494;border-radius:50%;height:13px;left:4px;position:absolute;top:2px;transition:transform .2s ease-in-out;width:13px}.trp-language-condition__toggle.is-active .trp-language-condition__toggle-knob[data-v-dbb9ab6e]{background:#fff;transform:translateX(14px)}.trp-language-condition__body[data-v-dbb9ab6e]{display:flex;flex-direction:column;gap:12px;width:100%}.trp-language-condition__mode-wrap[data-v-dbb9ab6e]{display:flex;flex-direction:column;gap:8px}.trp-language-condition__mode-label[data-v-dbb9ab6e],.trp-language-condition__select-label[data-v-dbb9ab6e]{color:var(--trp-settings-primary-color);font-weight:590}.trp-language-condition__mode[data-v-dbb9ab6e]{align-self:flex-start;background:#fff;border:1px solid var(--trp-settings-light-gray-border-color);border-radius:4px;display:inline-flex;padding:2px}.trp-language-condition__mode button[data-v-dbb9ab6e]{background:transparent;border:0;border-radius:2px;color:var(--trp-settings-primary-color);cursor:pointer;min-height:30px;padding:0 12px}.trp-language-condition__mode button.is-active[data-v-dbb9ab6e]{background:var(--trp-settings-accent-color,#0073aa);color:#fff}.trp-language-condition__dropdown[data-v-dbb9ab6e]{position:relative;width:min(100%,260px)}.trp-language-condition__dropdown-trigger[data-v-dbb9ab6e]{align-items:center;background:#fff;border:1px solid #8c8f94;border-radius:4px;color:#2c3338;cursor:pointer;display:flex;gap:12px;justify-content:space-between;min-height:36px;padding:0 10px;text-align:left;width:100%}.trp-language-condition__dropdown-trigger[data-v-dbb9ab6e]:disabled{cursor:default;opacity:.7}.trp-language-condition__dropdown-arrow[data-v-dbb9ab6e]{border-left:4px solid transparent;border-right:4px solid transparent;border-top:5px solid #50575e;height:0;transition:transform .2s ease-in-out;width:0}.trp-language-condition__dropdown.is-open .trp-language-condition__dropdown-arrow[data-v-dbb9ab6e]{transform:rotate(180deg)}.trp-language-condition__dropdown-list[data-v-dbb9ab6e]{background:#fff;border:1px solid var(--trp-settings-light-gray-border-color);border-radius:4px;box-shadow:0 8px 18px rgba(29,35,39,.12);left:0;max-height:180px;overflow-y:auto;padding:4px;position:absolute;right:0;top:calc(100% + 4px);z-index:20}.trp-language-condition__dropdown-option[data-v-dbb9ab6e]{align-items:center;background:transparent;border:0;border-radius:2px;color:var(--trp-settings-primary-color);cursor:pointer;display:flex;gap:8px;min-height:34px;padding:0 8px;text-align:left;width:100%}.trp-language-condition__dropdown-option[data-v-dbb9ab6e]:focus,.trp-language-condition__dropdown-option[data-v-dbb9ab6e]:hover{background:#f0f6fc}.trp-language-condition__chips[data-v-dbb9ab6e]{display:flex;flex-wrap:wrap;gap:8px;min-height:30px}.trp-language-condition__chip[data-v-dbb9ab6e]{align-items:center;background:#f6f7f7;border:1px solid var(--trp-settings-light-gray-border-color);border-radius:4px;color:var(--trp-settings-primary-color);cursor:pointer;display:inline-flex;gap:8px;min-height:28px;padding:0 10px}.trp-language-condition__flag[data-v-dbb9ab6e]{aspect-ratio:4/3;border-radius:2px;flex:0 0 auto;height:auto;-o-object-fit:cover;object-fit:cover;width:18px}.trp-language-condition__empty[data-v-dbb9ab6e]{color:#646970;line-height:30px}","",{version:3,sources:["webpack://./assets/src/shared/components/fields/LanguageConditionField.vue"],names:[],mappings:"AA8MA,yCACI,YAAa,CACb,qBAAsB,CACtB,QAAS,CACT,UACJ,CAEA,qDAEI,kBAAmB,CADnB,YAAa,CAEb,QAAS,CACT,UACJ,CAEA,iDAOI,eAAgB,CAFhB,wBAAyB,CACzB,kBAAmB,CAEnB,cAAe,CALf,WAAY,CACZ,SAAU,CAHV,iBAAkB,CAClB,UAOJ,CAEA,2DACI,mDAAqD,CACrD,qDACJ,CAEA,sDAOI,kBAAmB,CADnB,iBAAkB,CADlB,WAAY,CAHZ,QAAS,CADT,iBAAkB,CAElB,OAAQ,CAKR,oCAAsC,CAJtC,UAKJ,CAEA,gGAEI,eAAgB,CADhB,0BAEJ,CAEA,+CACI,YAAa,CACb,qBAAsB,CACtB,QAAS,CACT,UACJ,CAEA,oDACI,YAAa,CACb,qBAAsB,CACtB,OACJ,CAEA,4GAGI,uCAAwC,CADxC,eAEJ,CAEA,+CAEI,qBAAsB,CAItB,eAAgB,CAFhB,4DAA6D,CAC7D,iBAAkB,CAJlB,mBAAoB,CAEpB,WAIJ,CAEA,sDAKI,sBAAuB,CAFvB,QAAS,CACT,iBAAkB,CAElB,uCAAwC,CACxC,cAAe,CANf,eAAgB,CAChB,cAMJ,CAEA,gEACI,mDAAqD,CACrD,UACJ,CAEA,mDACI,iBAAkB,CAClB,qBACJ,CAEA,2DAEI,kBAAmB,CAQnB,eAAgB,CAFhB,wBAAyB,CACzB,iBAAkB,CAElB,aAAc,CACd,cAAe,CAXf,YAAa,CAGb,QAAS,CADT,6BAA8B,CAG9B,eAAgB,CAChB,cAAe,CAMf,eAAgB,CARhB,UASJ,CAEA,oEAEI,cAAe,CADf,UAEJ,CAEA,yDAGI,iCAAkC,CAClC,kCAAmC,CACnC,4BAA6B,CAH7B,QAAS,CAIT,oCAAsC,CALtC,OAMJ,CAEA,mGACI,wBACJ,CAEA,wDAWI,eAAgB,CAFhB,4DAA6D,CAC7D,iBAAkB,CAElB,wCAA6C,CAR7C,MAAO,CAEP,gBAAiB,CACjB,eAAgB,CAChB,WAAY,CAPZ,iBAAkB,CAIlB,OAAQ,CAFR,oBAAqB,CADrB,UAWJ,CAEA,0DAEI,kBAAmB,CAOnB,sBAAuB,CAFvB,QAAS,CACT,iBAAkB,CAElB,uCAAwC,CACxC,cAAe,CAVf,YAAa,CAEb,OAAQ,CAER,eAAgB,CAChB,aAAc,CAMd,eAAgB,CARhB,UASJ,CAEA,gIAEI,kBACJ,CAEA,gDACI,YAAa,CACb,cAAe,CACf,OAAQ,CACR,eACJ,CAEA,+CAEI,kBAAmB,CAMnB,kBAAmB,CAFnB,4DAA6D,CAC7D,iBAAkB,CAElB,uCAAwC,CACxC,cAAe,CATf,mBAAoB,CAEpB,OAAQ,CACR,eAAgB,CAChB,cAMJ,CAEA,+CAEI,gBAAmB,CAEnB,iBAAkB,CAElB,aAAc,CAHd,WAAY,CAEZ,mBAAiB,CAAjB,gBAAiB,CAJjB,UAMJ,CAEA,gDACI,aAAc,CACd,gBACJ",sourcesContent:['<script setup>\nimport { computed, ref, onMounted, onBeforeUnmount } from \'vue\'\nimport { __ } from \'@wordpress/i18n\'\n\nconst props = defineProps({\n label: { type: String, default: \'\' },\n modelValue: { type: Boolean, default: false },\n config: { type: Object, required: true },\n modeKey: { type: String, default: \'languageConditionMode\' },\n languagesKey: { type: String, default: \'languages\' },\n defaultMode: { type: String, default: \'include\' },\n options: {\n type: Array,\n required: true,\n validator: arr => arr.every(o => \'value\' in o && \'label\' in o)\n },\n includeLabel: { type: String, default: __(\'Include\', \'translatepress-multilingual\') },\n excludeLabel: { type: String, default: __(\'Exclude\', \'translatepress-multilingual\') },\n modeLabel: { type: String, default: __(\'Content Restriction Mode\', \'translatepress-multilingual\') },\n selectLabel: { type: String, default: __(\'Select language\', \'translatepress-multilingual\') },\n addLabel: { type: String, default: __(\'Add\', \'translatepress-multilingual\') },\n emptyLabel: { type: String, default: __(\'No languages selected\', \'translatepress-multilingual\') },\n})\n\nconst emit = defineEmits([\'update:modelValue\'])\nconst isDropdownOpen = ref(false)\nconst dropdownEl = ref(null)\n\nif (!props.config[props.modeKey])\n props.config[props.modeKey] = props.defaultMode\n\nif (!Array.isArray(props.config[props.languagesKey]))\n props.config[props.languagesKey] = []\n\nconst selected = computed(() => Array.isArray(props.config[props.languagesKey]) ? props.config[props.languagesKey] : [])\n\nconst availableOptions = computed(() => props.options.filter(option => !selected.value.includes(option.value)))\n\nconst selectedOptions = computed(() => selected.value\n .map(value => props.options.find(option => option.value === value))\n .filter(Boolean)\n)\n\nconst selectId = computed(() => `trp-language-condition-${props.languagesKey}`)\n\nfunction setMode(mode) {\n props.config[props.modeKey] = mode\n}\n\nfunction toggleCondition() {\n emit(\'update:modelValue\', !props.modelValue)\n}\n\nfunction addLanguage(value) {\n\n if (!value)\n return\n\n props.config[props.languagesKey] = [...selected.value, value]\n isDropdownOpen.value = false\n}\n\nfunction removeLanguage(value) {\n props.config[props.languagesKey] = selected.value.filter(item => item !== value)\n}\n\nfunction closeDropdown(event) {\n if (dropdownEl.value && !dropdownEl.value.contains(event.target))\n isDropdownOpen.value = false\n}\n\nfunction closeOnEscape(event) {\n if (event.key === \'Escape\')\n isDropdownOpen.value = false\n}\n\nonMounted(() => {\n document.addEventListener(\'pointerdown\', closeDropdown, true)\n document.addEventListener(\'keyup\', closeOnEscape)\n})\n\nonBeforeUnmount(() => {\n document.removeEventListener(\'pointerdown\', closeDropdown, true)\n document.removeEventListener(\'keyup\', closeOnEscape)\n})\n<\/script>\n\n<template>\n <div class="trp-language-condition">\n <div class="trp-language-condition__toggle-row">\n <span v-if="label" class="trp-field__label trp-primary-text-bold">\n {{ label }}\n </span>\n\n <button\n type="button"\n class="trp-language-condition__toggle"\n :class="{ \'is-active\': modelValue }"\n :aria-pressed="modelValue"\n @click="toggleCondition"\n >\n <span class="trp-language-condition__toggle-knob" />\n </button>\n </div>\n\n <div v-if="modelValue" class="trp-language-condition__body">\n <div class="trp-language-condition__mode-wrap">\n <span class="trp-language-condition__mode-label">\n {{ modeLabel }}\n </span>\n\n <div class="trp-language-condition__mode" role="group" :aria-label="modeLabel">\n <button\n type="button"\n :class="{ \'is-active\': config[modeKey] === \'include\' }"\n @click="setMode(\'include\')"\n >\n {{ includeLabel }}\n </button>\n <button\n type="button"\n :class="{ \'is-active\': config[modeKey] === \'exclude\' }"\n @click="setMode(\'exclude\')"\n >\n {{ excludeLabel }}\n </button>\n </div>\n </div>\n\n <span class="trp-language-condition__select-label" :id="`${selectId}-label`">\n {{ selectLabel }}\n </span>\n\n <div\n ref="dropdownEl"\n class="trp-language-condition__dropdown"\n :class="{ \'is-open\': isDropdownOpen }"\n >\n <button\n type="button"\n class="trp-language-condition__dropdown-trigger"\n :aria-labelledby="`${selectId}-label`"\n :aria-expanded="isDropdownOpen"\n :aria-controls="selectId"\n :disabled="availableOptions.length === 0"\n @click="isDropdownOpen = !isDropdownOpen"\n >\n <span>{{ selectLabel }}</span>\n <span class="trp-language-condition__dropdown-arrow" aria-hidden="true" />\n </button>\n\n <div\n v-if="isDropdownOpen"\n :id="selectId"\n class="trp-language-condition__dropdown-list"\n role="listbox"\n >\n <button\n v-for="option in availableOptions"\n :key="option.value"\n type="button"\n class="trp-language-condition__dropdown-option"\n role="option"\n @click="addLanguage(option.value)"\n >\n <img\n v-if="option.flagUrl"\n :src="option.flagUrl"\n class="trp-language-condition__flag"\n aria-hidden="true"\n loading="lazy"\n decoding="async"\n />\n <span>{{ option.label }}</span>\n </button>\n </div>\n </div>\n\n <div class="trp-language-condition__chips" aria-live="polite">\n <button\n v-for="option in selectedOptions"\n :key="option.value"\n type="button"\n class="trp-language-condition__chip"\n @click="removeLanguage(option.value)"\n >\n <img\n v-if="option.flagUrl"\n :src="option.flagUrl"\n class="trp-language-condition__flag"\n aria-hidden="true"\n loading="lazy"\n decoding="async"\n />\n <span>{{ option.label }}</span>\n <span aria-hidden="true">×</span>\n </button>\n <span v-if="selectedOptions.length === 0" class="trp-language-condition__empty">\n {{ emptyLabel }}\n </span>\n </div>\n </div>\n </div>\n</template>\n\n<style scoped>\n.trp-language-condition {\n display: flex;\n flex-direction: column;\n gap: 14px;\n width: 100%;\n}\n\n.trp-language-condition__toggle-row {\n display: flex;\n align-items: center;\n gap: 16px;\n width: 100%;\n}\n\n.trp-language-condition__toggle {\n position: relative;\n width: 36px;\n height: 19px;\n padding: 0;\n border: 1px solid #949494;\n border-radius: 28px;\n background: #fff;\n cursor: pointer;\n}\n\n.trp-language-condition__toggle.is-active {\n background: var(--trp-settings-accent-color, #0073aa);\n border-color: var(--trp-settings-accent-color, #0073aa);\n}\n\n.trp-language-condition__toggle-knob {\n position: absolute;\n left: 4px;\n top: 2px;\n width: 13px;\n height: 13px;\n border-radius: 50%;\n background: #949494;\n transition: transform 0.2s ease-in-out;\n}\n\n.trp-language-condition__toggle.is-active .trp-language-condition__toggle-knob {\n transform: translateX(14px);\n background: #fff;\n}\n\n.trp-language-condition__body {\n display: flex;\n flex-direction: column;\n gap: 12px;\n width: 100%;\n}\n\n.trp-language-condition__mode-wrap {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.trp-language-condition__mode-label,\n.trp-language-condition__select-label {\n font-weight: 590;\n color: var(--trp-settings-primary-color);\n}\n\n.trp-language-condition__mode {\n display: inline-flex;\n align-self: flex-start;\n padding: 2px;\n border: 1px solid var(--trp-settings-light-gray-border-color);\n border-radius: 4px;\n background: #fff;\n}\n\n.trp-language-condition__mode button {\n min-height: 30px;\n padding: 0 12px;\n border: 0;\n border-radius: 2px;\n background: transparent;\n color: var(--trp-settings-primary-color);\n cursor: pointer;\n}\n\n.trp-language-condition__mode button.is-active {\n background: var(--trp-settings-accent-color, #0073aa);\n color: #fff;\n}\n\n.trp-language-condition__dropdown {\n position: relative;\n width: min(100%, 260px);\n}\n\n.trp-language-condition__dropdown-trigger {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n width: 100%;\n min-height: 36px;\n padding: 0 10px;\n border: 1px solid #8c8f94;\n border-radius: 4px;\n background: #fff;\n color: #2c3338;\n cursor: pointer;\n text-align: left;\n}\n\n.trp-language-condition__dropdown-trigger:disabled {\n opacity: 0.7;\n cursor: default;\n}\n\n.trp-language-condition__dropdown-arrow {\n width: 0;\n height: 0;\n border-left: 4px solid transparent;\n border-right: 4px solid transparent;\n border-top: 5px solid #50575e;\n transition: transform 0.2s ease-in-out;\n}\n\n.trp-language-condition__dropdown.is-open .trp-language-condition__dropdown-arrow {\n transform: rotate(180deg);\n}\n\n.trp-language-condition__dropdown-list {\n position: absolute;\n z-index: 20;\n top: calc(100% + 4px);\n left: 0;\n right: 0;\n max-height: 180px;\n overflow-y: auto;\n padding: 4px;\n border: 1px solid var(--trp-settings-light-gray-border-color);\n border-radius: 4px;\n background: #fff;\n box-shadow: 0 8px 18px rgba(29, 35, 39, 0.12);\n}\n\n.trp-language-condition__dropdown-option {\n display: flex;\n align-items: center;\n gap: 8px;\n width: 100%;\n min-height: 34px;\n padding: 0 8px;\n border: 0;\n border-radius: 2px;\n background: transparent;\n color: var(--trp-settings-primary-color);\n cursor: pointer;\n text-align: left;\n}\n\n.trp-language-condition__dropdown-option:hover,\n.trp-language-condition__dropdown-option:focus {\n background: #f0f6fc;\n}\n\n.trp-language-condition__chips {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n min-height: 30px;\n}\n\n.trp-language-condition__chip {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n min-height: 28px;\n padding: 0 10px;\n border: 1px solid var(--trp-settings-light-gray-border-color);\n border-radius: 4px;\n background: #f6f7f7;\n color: var(--trp-settings-primary-color);\n cursor: pointer;\n}\n\n.trp-language-condition__flag {\n width: 18px;\n aspect-ratio: 4 / 3;\n height: auto;\n border-radius: 2px;\n object-fit: cover;\n flex: 0 0 auto;\n}\n\n.trp-language-condition__empty {\n color: #646970;\n line-height: 30px;\n}\n</style>\n'],sourceRoot:""}]);const a=s;n.d(t,["A",0,a])},921(e,t,n){"use strict";var r=n(627),i=n.n(r),o=n(798),s=n.n(o)()(i());s.push([e.id,".trp-number-input[data-v-a8788afe]::-webkit-inner-spin-button,.trp-number-input[data-v-a8788afe]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.trp-number-input[type=number][data-v-a8788afe]{-moz-appearance:textfield}.trp-number__wrapper[data-v-a8788afe]{align-items:center;display:flex;flex-direction:row;gap:10px}.trp-number-input[data-v-a8788afe]{border:1px solid #c3c4c7;border-radius:5px;height:40px;text-align:center;width:53px}","",{version:3,sources:["webpack://./assets/src/shared/components/fields/NumberField.vue"],names:[],mappings:"AAiCA,4HAEI,uBAAwB,CACxB,QACJ,CAGA,gDACI,yBACJ,CAEA,sCAII,kBAAmB,CAHnB,YAAa,CACb,kBAAmB,CACnB,QAEJ,CAEA,mCAGI,wBAAyB,CACzB,iBAAkB,CAFlB,WAAY,CAGZ,iBAAkB,CAJlB,UAKJ",sourcesContent:['<script setup>\r\nconst props = defineProps({\r\n label : { type: String, default: \'\' },\r\n modelValue : { type: [Number, null], default: null },\r\n min : { type: Number, default: 0, required: false },\r\n})\r\n\r\nconst emit = defineEmits([\'update:modelValue\'])\r\n\r\nfunction onInput (e) {\r\n const val = e.target.value\r\n emit(\'update:modelValue\', val === \'\' ? props.min : Number(val))\r\n}\r\n<\/script>\r\n\r\n<template>\r\n <div>\r\n <span v-if="label" class="trp-field__label trp-primary-text-bold">{{ label }}</span>\r\n <div class="trp-number__wrapper">\r\n <input\r\n type="number"\r\n class="trp-number-input"\r\n :value="modelValue ?? \'\'"\r\n :min="min"\r\n @input="onInput"\r\n />\r\n <span class="trp-primary-text">px</span>\r\n </div>\r\n </div>\r\n</template>\r\n\r\n<style scoped>\r\n/* Remove arrows in Chrome, Safari, Edge */\r\n.trp-number-input::-webkit-outer-spin-button,\r\n.trp-number-input::-webkit-inner-spin-button {\r\n -webkit-appearance: none;\r\n margin: 0;\r\n}\r\n\r\n/* Remove arrows in Firefox */\r\n.trp-number-input[type=\'number\'] {\r\n -moz-appearance: textfield;\r\n}\r\n\r\n.trp-number__wrapper {\r\n display: flex;\r\n flex-direction: row;\r\n gap: 10px;\r\n align-items: center;\r\n}\r\n\r\n.trp-number-input {\r\n width: 53px;\r\n height: 40px;\r\n border: 1px solid #C3C4C7;\r\n border-radius: 5px;\r\n text-align: center;\r\n}\r\n</style>\r\n'],sourceRoot:""}]);const a=s;n.d(t,["A",0,a])},332(e,t,n){"use strict";var r=n(627),i=n.n(r),o=n(798),s=n.n(o)()(i());s.push([e.id,".trp-quad-grid[data-v-f8e660d6]{display:grid;gap:12px 24px;grid-template-columns:repeat(2,max-content)}.trp-quad-radius-corner[data-v-f8e660d6]{align-items:center;display:flex;flex-direction:row;gap:8px}.trp-corner-label[data-v-f8e660d6]{min-width:90px}","",{version:3,sources:["webpack://./assets/src/shared/components/fields/QuadRadiusField.vue"],names:[],mappings:"AAyDA,gCACI,YAAa,CAEb,aAAc,CADd,2CAEJ,CAEA,yCAGI,kBAAmB,CAFnB,YAAa,CACb,kBAAmB,CAEnB,OACJ,CAEA,mCACI,cACJ",sourcesContent:["<script setup>\r\nimport { computed } from 'vue'\nimport { __ } from '@wordpress/i18n'\nimport NumberField from './NumberField.vue'\n\r\n/*\r\n v-model expects an array: [ topLeft, topRight, bottomLeft, bottomRight ]\r\n*/\r\nconst props = defineProps( {\r\n label : { type : String, default : '' },\r\n modelValue : { type : Array, required : true }\r\n})\r\nconst emit = defineEmits( [ 'update:modelValue' ] )\r\n\r\n/* build four computed bindings that proxy into the array */\r\n// each binding is a ComputedRef<number>\r\nconst bindings = Array.from( { length : 4 }, ( _, i ) =>\r\n computed( {\r\n get : () => props.modelValue[ i ] ?? 0,\r\n set : val => {\r\n const next = [ ...props.modelValue ]\r\n\r\n next[ i ] = val\r\n emit( 'update:modelValue', next )\r\n }\r\n })\r\n)\r\n\r\nconst cornerLabels = [\n __('Top Left', 'translatepress-multilingual'),\n __('Top Right', 'translatepress-multilingual'),\n __('Bottom Left', 'translatepress-multilingual'),\n __('Bottom Right', 'translatepress-multilingual'),\n]\n<\/script>\r\n\r\n<template>\r\n <div class=\"trp-field trp-field--column\">\r\n <span class=\"trp-field__label trp-primary-text-bold\">{{ label }}</span>\r\n <div class=\"trp-quad-grid\">\r\n <div\r\n v-for=\"(cornerLabel, idx) in cornerLabels\"\r\n :key=\"idx\"\r\n class=\"trp-quad-radius-corner\"\r\n >\r\n <span class=\"trp-primary-text trp-corner-label\">{{ cornerLabel }}</span>\r\n <NumberField\r\n :modelValue=\"bindings[idx].value\"\r\n @update:modelValue=\"val => bindings[idx].value = val\"\r\n :label=\"''\"\r\n />\r\n </div>\r\n </div>\r\n </div>\r\n</template>\r\n\r\n<style scoped>\r\n.trp-quad-grid {\r\n display: grid;\r\n grid-template-columns: repeat(2, max-content);\r\n gap: 12px 24px;\r\n}\r\n\r\n.trp-quad-radius-corner {\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n gap: 8px;\r\n}\r\n\r\n.trp-corner-label{\r\n min-width: 90px;\r\n}\r\n\r\n</style>\r\n"],sourceRoot:""}]);const a=s;n.d(t,["A",0,a])},846(e,t,n){"use strict";var r=n(627),i=n.n(r),o=n(798),s=n.n(o)()(i());s.push([e.id,".trp-radio-group__wrapper[data-v-13e4f2c2]{gap:16px}.trp-radio-group[data-v-13e4f2c2]{align-items:flex-start;display:flex;flex-wrap:wrap;gap:16px}.trp-radio-group--grid[data-v-13e4f2c2]{-moz-column-gap:24px;column-gap:24px;display:grid;grid-template-columns:repeat(var(--trp-radio-columns),minmax(0,1fr));row-gap:14px}.trp-radio-label[data-v-13e4f2c2]{align-items:flex-start;cursor:pointer;display:inline-flex;gap:8px;line-height:20px}.trp-lc-custom-number[data-v-13e4f2c2]{margin-left:8px}.trp-radio-option[data-v-13e4f2c2]{align-items:flex-start;cursor:pointer;display:flex;line-height:20px;min-width:140px}.trp-radio-group--grid .trp-radio-option[data-v-13e4f2c2]{min-width:0}.trp-radio-option.is-disabled[data-v-13e4f2c2]{opacity:.5}.trp-radio-option.is-disabled input[data-v-13e4f2c2]{background:var(--trp-settings-disabled-color);pointer-events:none}.trp-radio-option input[data-v-13e4f2c2]{background:#fff;border:1px solid var(--trp-settings-medium-gray-border-color);flex:0 0 20px;height:20px;margin:0;position:relative;width:20px}.trp-radio-option input[data-v-13e4f2c2]:checked:before{background-color:var(--trp-settings-accent-color);height:10px;left:50%;margin:0;position:absolute;top:50%;transform:translate(-50%,-50%);width:10px}","",{version:3,sources:["webpack://./assets/src/shared/components/fields/RadioGroupField.vue"],names:[],mappings:"AAyGA,2CACI,QACJ,CAEA,kCAII,sBAAuB,CAHvB,YAAY,CAEZ,cAAe,CADf,QAGJ,CAEA,wCAGI,oBAAgB,CAAhB,eAAgB,CAFhB,YAAa,CACb,oEAAuE,CAEvE,YACJ,CAEA,kCAEI,sBAAuB,CAEvB,cAAe,CAHf,mBAAoB,CAEpB,OAAQ,CAER,gBACJ,CAEA,uCACI,eACJ,CAEA,mCAKI,sBAAuB,CAJvB,cAAe,CAGf,YAAa,CAFb,gBAAiB,CACjB,eAGJ,CAEA,0DACI,WACJ,CAEA,+CACI,UACJ,CAEA,qDAEI,6CAA8C,CAD9C,mBAEJ,CAEA,yCAEI,eAAgB,CADhB,6DAA8D,CAI9D,aAAc,CADd,WAAY,CAEZ,QAAS,CACT,iBAAkB,CAJlB,UAKJ,CAEA,wDAQI,iDAAkD,CALlD,WAAY,CAEZ,QAAS,CAET,QAAS,CANT,iBAAkB,CAGlB,OAAQ,CAER,8BAAgC,CAJhC,UAOJ",sourcesContent:["<script setup>\r\nimport { computed, ref, watch } from 'vue'\nimport { __ } from '@wordpress/i18n'\n\r\nimport NumberField from './NumberField.vue'\r\n\r\nconst props = defineProps({\r\n label: { type: String, required: false, default: '' },\r\n modelValue: { type: String, required: true },\r\n options: {\n type: Array,\n required: true,\n validator: arr => arr.every(o =>\r\n 'value' in o && 'label' in o &&\r\n (o.disabled === undefined || typeof o.disabled === 'boolean') &&\r\n (o.title === undefined || typeof o.title === 'string')\r\n )\n },\n columns: { type: Number, default: 0 },\n customValue: { type: [Number, String] }, // (optional) a number v-model. If parent binds this prop, then “Custom” is automatically injected as an extra option.\n})\n\r\nconst emit = defineEmits(['update:modelValue', 'update:customValue'])\r\n\r\nconst localCustom = ref(props.customValue)\r\n\r\n// Sync parent -> localCustom whenever customValue prop changes\r\nwatch(\r\n () => props.customValue,\r\n (newVal) => {\r\n if (newVal !== localCustom.value) {\r\n localCustom.value = newVal\r\n }\r\n }\r\n)\r\n\r\n// Sync localCustom -> parent via update:customValue\r\nwatch(localCustom, (newVal) => {\r\n emit('update:customValue', newVal)\r\n})\r\n\r\nconst shouldShowCustom = computed(() => props.customValue !== undefined)\r\n\r\n/** Build the array of options we actually render.\r\n * If shouldShowCustom is true, append { value: 'custom', label: 'Custom' }\r\n * unless the user already provided an option whose value is \"custom\".\r\n */\r\nconst displayedOptions = computed(() => {\r\n if (!shouldShowCustom.value)\r\n return props.options\r\n\r\n // If parent’s options already include value = 'custom', don’t duplicate\r\n const hasCustomAlready = props.options.some(o => o.value === 'custom')\r\n\r\n if (hasCustomAlready)\r\n return props.options\r\n\r\n return [\r\n ...props.options,\r\n { value: 'custom', label: __('Custom', 'translatepress-multilingual') }\n ]\r\n})\r\n<\/script>\r\n\r\n<template>\r\n <div class=\"trp-radio-group__wrapper\">\r\n <span v-if=\"label\" class=\"trp-field__label trp-primary-text-bold\">{{ label }}</span>\r\n\r\n <div\n class=\"trp-radio-group\"\n :class=\"{ 'trp-radio-group--grid': columns > 0 }\"\n :style=\"columns > 0 ? { '--trp-radio-columns': columns } : null\"\n >\n <div\r\n v-for=\"opt in displayedOptions\"\r\n :key=\"opt.value\"\r\n :class=\"['trp-radio-option', { 'is-disabled': opt.disabled }]\"\r\n :title=\"opt.title\"\r\n >\r\n <label class=\"trp-radio-label\">\r\n <input\r\n type=\"radio\"\r\n :name=\"label || 'radio-group'\"\r\n :value=\"opt.value\"\r\n :checked=\"modelValue === opt.value\"\r\n :disabled=\"opt.disabled\"\r\n @change=\"() => emit('update:modelValue', opt.value)\"\r\n />\r\n <span>{{ opt.label }}</span>\r\n </label>\r\n\r\n <NumberField\r\n v-if=\"shouldShowCustom && opt.value === 'custom' && modelValue === 'custom'\"\r\n class=\"trp-lc-custom-number\"\r\n v-model=\"localCustom\"\r\n :label=\"''\"\r\n :min=\"0\"\r\n />\r\n </div>\r\n\r\n </div>\r\n </div>\r\n</template>\r\n\r\n<style scoped>\n.trp-radio-group__wrapper {\n gap: 16px;\n}\n\n.trp-radio-group {\n display:flex;\n gap:16px;\n flex-wrap: wrap;\n align-items: flex-start;\n}\n\n.trp-radio-group--grid {\n display: grid;\n grid-template-columns: repeat(var(--trp-radio-columns), minmax(0, 1fr));\n column-gap: 24px;\n row-gap: 14px;\n}\n\n.trp-radio-label {\n display: inline-flex;\n align-items: flex-start;\n gap: 8px;\n cursor: pointer;\n line-height: 20px;\n}\n\r\n.trp-lc-custom-number {\r\n margin-left: 8px;\r\n}\r\n\r\n.trp-radio-option {\n cursor: pointer;\n line-height: 20px;\n min-width: 140px;\n display: flex;\n align-items: flex-start;\n}\n\n.trp-radio-group--grid .trp-radio-option {\n min-width: 0;\n}\n\r\n.trp-radio-option.is-disabled {\r\n opacity: 0.5;\r\n}\r\n\r\n.trp-radio-option.is-disabled input {\r\n pointer-events: none;\r\n background: var(--trp-settings-disabled-color);\r\n}\r\n\r\n.trp-radio-option input {\n border: 1px solid var(--trp-settings-medium-gray-border-color);\n background: #fff;\n width: 20px;\n height: 20px;\n flex: 0 0 20px;\n margin: 0;\n position: relative;\n}\n\r\n.trp-radio-option input:checked:before {\r\n position: absolute;\r\n width: 10px;\r\n height: 10px;\r\n top: 50%;\r\n left: 50%;\r\n transform: translate(-50%, -50%);\r\n margin: 0;\r\n background-color: var(--trp-settings-accent-color);\r\n}\r\n</style>\r\n"],sourceRoot:""}]);const a=s;n.d(t,["A",0,a])},11(e,t,n){"use strict";var r=n(627),i=n.n(r),o=n(798),s=n.n(o)()(i());s.push([e.id,".trp-select-field[data-v-6a63fb72]{align-items:center}.trp-select-field__control[data-v-6a63fb72]{background-color:#fff;border:1px solid #c3c4c7;border-radius:5px;box-sizing:border-box;color:var(--trp-settings-primary-color);min-height:40px;padding:0 32px 0 10px;width:min(100%,260px)}","",{version:3,sources:["webpack://./assets/src/shared/components/fields/SelectField.vue"],names:[],mappings:"AA0CA,mCACI,kBACJ,CAEA,4CAQI,qBAAyB,CAJzB,wBAAyB,CACzB,iBAAkB,CAJlB,qBAAsB,CAMtB,uCAAwC,CAJxC,eAAgB,CAGhB,qBAAsB,CAJtB,qBAOJ",sourcesContent:['<script setup>\nconst props = defineProps({\n label: { type: String, default: \'\' },\n modelValue: { type: String, default: \'\' },\n options: {\n type: Array,\n required: true,\n validator: arr => arr.every(option =>\n \'value\' in option &&\n \'label\' in option &&\n (option.disabled === undefined || typeof option.disabled === \'boolean\')\n )\n },\n})\n\nconst emit = defineEmits([\'update:modelValue\'])\n<\/script>\n\n<template>\n <div class="trp-select-field">\n <label v-if="label" class="trp-field__label trp-primary-text-bold">\n {{ label }}\n </label>\n\n <select\n class="trp-select-field__control"\n :value="modelValue"\n @change="event => emit(\'update:modelValue\', event.target.value)"\n >\n <option\n v-for="option in options"\n :key="option.value"\n :value="option.value"\n :disabled="option.disabled"\n >\n {{ option.label }}\n </option>\n </select>\n </div>\n</template>\n\n<style scoped>\n.trp-select-field {\n align-items: center;\n}\n\n.trp-select-field__control {\n box-sizing: border-box;\n width: min(100%, 260px);\n min-height: 40px;\n border: 1px solid #C3C4C7;\n border-radius: 5px;\n padding: 0 32px 0 10px;\n color: var(--trp-settings-primary-color);\n background-color: #ffffff;\n}\n</style>\n'],sourceRoot:""}]);const a=s;n.d(t,["A",0,a])},39(e,t,n){"use strict";var r=n(627),i=n.n(r),o=n(798),s=n.n(o)()(i());s.push([e.id,".trp-text-field[data-v-1b99e2f0]{align-items:flex-start}.trp-text-field .trp-field__label[data-v-1b99e2f0]{padding-top:10px}.trp-text-field__control[data-v-1b99e2f0]{display:flex;flex-direction:column;gap:8px;width:min(100%,520px)}.trp-text-input[data-v-1b99e2f0]{border:1px solid #c3c4c7;border-radius:5px;min-height:40px;padding:0 10px}","",{version:3,sources:["webpack://./assets/src/shared/components/fields/TextField.vue"],names:[],mappings:"AAkCA,iCACI,sBACJ,CAEA,mDACI,gBACJ,CAEA,0CACI,YAAa,CACb,qBAAsB,CACtB,OAAQ,CACR,qBACJ,CAEA,iCAEI,wBAAyB,CACzB,iBAAkB,CAFlB,eAAgB,CAGhB,cACJ",sourcesContent:['<script setup>\nconst props = defineProps({\n label: { type: String, default: \'\' },\n modelValue: { type: String, default: \'\' },\n description: { type: String, default: \'\' },\n})\n\nconst emit = defineEmits([\'update:modelValue\'])\n<\/script>\n\n<template>\n <div class="trp-text-field">\n <label v-if="label" class="trp-field__label trp-primary-text-bold">\n {{ label }}\n </label>\n\n <div class="trp-text-field__control">\n <input\n type="text"\n class="trp-text-input"\n :value="modelValue"\n @input="event => emit(\'update:modelValue\', event.target.value)"\n />\n\n <span\n v-if="description"\n class="trp-description-text"\n v-html="description"\n />\n </div>\n </div>\n</template>\n\n<style scoped>\n.trp-text-field {\n align-items: flex-start;\n}\n\n.trp-text-field .trp-field__label {\n padding-top: 10px;\n}\n\n.trp-text-field__control {\n display: flex;\n flex-direction: column;\n gap: 8px;\n width: min(100%, 520px);\n}\n\n.trp-text-input {\n min-height: 40px;\n border: 1px solid #C3C4C7;\n border-radius: 5px;\n padding: 0 10px;\n}\n</style>\n'],sourceRoot:""}]);const a=s;n.d(t,["A",0,a])},489(e,t,n){"use strict";var r=n(627),i=n.n(r),o=n(798),s=n.n(o)()(i());s.push([e.id,".trp-textarea-field[data-v-9d96a9c0]{align-items:flex-start}.trp-textarea-field .trp-field__label[data-v-9d96a9c0]{padding-top:10px}.trp-textarea-field__control[data-v-9d96a9c0]{display:flex;flex-direction:column;gap:8px;width:min(100%,520px)}.trp-textarea-input[data-v-9d96a9c0]{border:1px solid #c3c4c7;border-radius:5px;min-height:96px;padding:10px;resize:vertical}","",{version:3,sources:["webpack://./assets/src/shared/components/fields/TextareaField.vue"],names:[],mappings:"AAiCA,qCACI,sBACJ,CAEA,uDACI,gBACJ,CAEA,8CACI,YAAa,CACb,qBAAsB,CACtB,OAAQ,CACR,qBACJ,CAEA,qCAEI,wBAAyB,CACzB,iBAAkB,CAFlB,eAAgB,CAGhB,YAAa,CACb,eACJ",sourcesContent:['<script setup>\nconst props = defineProps({\n label: { type: String, default: \'\' },\n modelValue: { type: String, default: \'\' },\n description: { type: String, default: \'\' },\n})\n\nconst emit = defineEmits([\'update:modelValue\'])\n<\/script>\n\n<template>\n <div class="trp-textarea-field">\n <label v-if="label" class="trp-field__label trp-primary-text-bold">\n {{ label }}\n </label>\n\n <div class="trp-textarea-field__control">\n <textarea\n class="trp-textarea-input"\n :value="modelValue"\n @input="event => emit(\'update:modelValue\', event.target.value)"\n />\n\n <span\n v-if="description"\n class="trp-description-text"\n v-html="description"\n />\n </div>\n </div>\n</template>\n\n<style scoped>\n.trp-textarea-field {\n align-items: flex-start;\n}\n\n.trp-textarea-field .trp-field__label {\n padding-top: 10px;\n}\n\n.trp-textarea-field__control {\n display: flex;\n flex-direction: column;\n gap: 8px;\n width: min(100%, 520px);\n}\n\n.trp-textarea-input {\n min-height: 96px;\n border: 1px solid #C3C4C7;\n border-radius: 5px;\n padding: 10px;\n resize: vertical;\n}\n</style>\n'],sourceRoot:""}]);const a=s;n.d(t,["A",0,a])},350(e,t,n){"use strict";var r=n(627),i=n.n(r),o=n(798),s=n.n(o)()(i());s.push([e.id,'.trp-toggle-wrapper[data-v-6399655e]{align-items:center;display:flex}.trp-toggle-wrapper.trp-toggle-wrapper--compact[data-v-6399655e]{gap:8px}.trp-toggle-wrapper--compact .trp-field__label[data-v-6399655e]{width:auto}.trp-toggle-inner[data-v-6399655e]{cursor:pointer;display:inline-block;height:19px;position:relative;width:36px}.trp-toggle-input[data-v-6399655e]{height:0;opacity:0;position:absolute;width:0}.trp-toggle-slider[data-v-6399655e]{border:1px solid #949494;border-radius:28px;cursor:pointer;display:inline-block;height:17px;position:relative;transition:background-color .3s ease;width:34px}.trp-toggle-slider[data-v-6399655e]:before{background-color:#949494;border-radius:50%;content:"";height:13px;left:4px;position:absolute;top:2px;transition:transform .2s ease-in-out;width:13px}.trp-toggle-input:checked+.trp-toggle-slider[data-v-6399655e]{background-color:var(--trp-settings-accent-color,#0073aa);border-color:var(--trp-settings-accent-color)}.trp-toggle-input:checked+.trp-toggle-slider[data-v-6399655e]:before{background-color:#fff;transform:translateX(14px)}',"",{version:3,sources:["webpack://./assets/src/shared/components/fields/ToggleField.vue"],names:[],mappings:"AA6BA,qCAEI,kBAAmB,CADnB,YAEJ,CAEA,iEACI,OACJ,CAEA,gEACI,UACJ,CAEA,mCAGI,cAAe,CADf,oBAAqB,CAGrB,WAAY,CAJZ,iBAAkB,CAGlB,UAEJ,CAEA,mCAII,QAAS,CAFT,SAAU,CADV,iBAAkB,CAElB,OAEJ,CAEA,oCAOI,wBAAyB,CAFzB,kBAAmB,CAGnB,cAAe,CAPf,oBAAqB,CAGrB,WAAY,CAFZ,iBAAkB,CAIlB,oCAAsC,CAHtC,UAMJ,CAEA,2CAOI,wBAAyB,CACzB,iBAAkB,CAPlB,UAAW,CAKX,WAAY,CAHZ,QAAS,CADT,iBAAkB,CAElB,OAAQ,CAKR,oCAAsC,CAJtC,UAKJ,CAEA,8DACI,yDAA2D,CAC3D,6CACJ,CAEA,qEAEI,qBAAuB,CADvB,0BAEJ",sourcesContent:['<script setup>\r\nconst props = defineProps({\n modelValue: Boolean,\n label: { type: String, default: \'\' },\n compact: { type: Boolean, default: false }\n})\n\r\nconst emit = defineEmits([\'update:modelValue\'])\r\n<\/script>\r\n\r\n<template>\r\n <div class="trp-toggle-wrapper" :class="{ \'trp-toggle-wrapper--compact\': compact }">\n <span v-if="label" class="trp-field__label trp-primary-text-bold">\r\n {{ label }}\r\n </span>\r\n\r\n <div class="trp-toggle-inner" @click="emit(\'update:modelValue\', !modelValue)">\r\n <input\r\n type="checkbox"\r\n class="trp-toggle-input"\r\n :checked="modelValue"\r\n readonly\r\n />\r\n <span class="trp-toggle-slider" />\r\n </div>\r\n </div>\r\n</template>\r\n\r\n<style scoped>\r\n.trp-toggle-wrapper {\n display: flex;\n align-items: center;\n}\n\n.trp-toggle-wrapper.trp-toggle-wrapper--compact {\n gap: 8px;\n}\n\n.trp-toggle-wrapper--compact .trp-field__label {\n width: auto;\n}\n\r\n.trp-toggle-inner {\r\n position: relative;\r\n display: inline-block;\r\n cursor: pointer;\r\n width: 36px;\r\n height: 19px;\r\n}\r\n\r\n.trp-toggle-input {\r\n position: absolute;\r\n opacity: 0;\r\n width: 0;\r\n height: 0;\r\n}\r\n\r\n.trp-toggle-slider {\r\n display: inline-block;\r\n position: relative;\r\n width: 34px;\r\n height: 17px;\r\n border-radius: 28px;\r\n transition: background-color 0.3s ease;\r\n border: 1px solid #949494;\r\n cursor: pointer;\r\n}\r\n\r\n.trp-toggle-slider::before {\r\n content: \'\';\r\n position: absolute;\r\n left: 4px;\r\n top: 2px;\r\n width: 13px;\r\n height: 13px;\r\n background-color: #949494;\r\n border-radius: 50%;\r\n transition: transform 0.2s ease-in-out;\r\n}\r\n\r\n.trp-toggle-input:checked + .trp-toggle-slider {\r\n background-color: var(--trp-settings-accent-color, #0073aa);\r\n border-color: var(--trp-settings-accent-color);\r\n}\r\n\r\n.trp-toggle-input:checked + .trp-toggle-slider::before {\r\n transform: translateX(14px);\r\n background-color: white;\r\n}\r\n</style>\r\n'],sourceRoot:""}]);const a=s;n.d(t,["A",0,a])},954(e,t,n){"use strict";var r=n(627),i=n.n(r),o=n(798),s=n.n(o)()(i());s.push([e.id,".trp-toggle-status-field[data-v-6e6b5f68]{align-items:center;display:flex;gap:10px}","",{version:3,sources:["webpack://./assets/src/shared/components/fields/ToggleStatusField.vue"],names:[],mappings:"AA+BA,0CAAyC,kBAAkB,CAAhC,YAAY,CAAsB,QAAU",sourcesContent:["<template>\r\n <div class=\"trp-toggle-status-field\">\r\n <ToggleField\r\n v-model=\"inputValue\"\r\n :label=\"''\"\r\n />\r\n <span class=\"trp-primary-text\">\r\n {{ modelValue ? onText : offText }}\r\n </span>\r\n </div>\r\n</template>\r\n\r\n<script setup>\r\nimport ToggleField from './ToggleField.vue'\nimport { computed } from \"vue\"\nimport { __ } from '@wordpress/i18n'\n\r\nconst props = defineProps({\r\n modelValue: Boolean,\r\n onText: { type: String, default: __('Enabled', 'translatepress-multilingual') },\n offText: { type: String, default: __('Disabled', 'translatepress-multilingual') }\n})\r\nconst emit = defineEmits(['update:modelValue'])\r\n\r\nconst inputValue = computed({\r\n get: () => props.modelValue,\r\n set: val => emit('update:modelValue', val)\r\n});\r\n<\/script>\r\n\r\n<style scoped>\r\n.trp-toggle-status-field { display:flex; align-items:center; gap:10px; }\r\n</style>\r\n"],sourceRoot:""}]);const a=s;n.d(t,["A",0,a])},798(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n=e(t);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n}).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var i={};if(r)for(var o=0;o<this.length;o++){var s=this[o][0];null!=s&&(i[s]=!0)}for(var a=0;a<e.length;a++){var l=[].concat(e[a]);r&&i[l[0]]||(n&&(l[2]?l[2]="".concat(n," and ").concat(l[2]):l[2]=n),t.push(l))}},t}},627(e){"use strict";function t(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return n(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}e.exports=function(e){var n=t(e,4),r=n[1],i=n[3];if(!i)return r;if("function"==typeof btoa){var o=btoa(unescape(encodeURIComponent(JSON.stringify(i)))),s="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(o),a="/*# ".concat(s," */"),l=i.sources.map(function(e){return"/*# sourceURL=".concat(i.sourceRoot||"").concat(e," */")});return[r].concat(l).concat([a]).join("\n")}return[r].join("\n")}},327(){},606(e){var t,n,r=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(e){n=o}}();var a,l=[],c=!1,d=-1;function u(){c&&a&&(c=!1,a.length?l=a.concat(l):d=-1,l.length&&p())}function p(){if(!c){var e=s(u);c=!0;for(var t=l.length;t;){for(a=l,l=[];++d<t;)a&&a[d].run();d=-1,t=l.length}a=null,c=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===o||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{return n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function f(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new h(e,t)),1!==l.length||c||s(p)},h.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=f,r.addListener=f,r.once=f,r.off=f,r.removeListener=f,r.removeAllListeners=f,r.emit=f,r.prependListener=f,r.prependOnceListener=f,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}}};const t={};function n(r){const i=t[r];if(void 0!==i)return i.exports;const o=t[r]={id:r,exports:{}};return e[r](o,o.exports,n),o.exports}n.m=e,(()=>{const e=[];n.O=(t,r,i)=>{if(!r){for(var o=0;o<e.length;o++){let[r,i]=e[o],a=!0;for(var s=0;s<r.length;s++)n.O.j(r[s])?r.splice(s--,1):a=!1;if(a){e.splice(o--,1);const n=i();void 0!==n&&(t=n)}}return t}e.push([r,i])}})(),n.n=e=>{const t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.cw=e=>{var t;return()=>{if(e){var n=e;e=0,t={exports:{}},n.call(t.exports,t,t.exports)}return t.exports}},n.d=(e,t)=>{if(Array.isArray(t))for(var r=0;r<t.length;){var i=t[r++],o=t[r++],s=o?{enumerable:!0,get:o}:{enumerable:!0,value:t[r++]};n.o(e,i)||Object.defineProperty(e,i,s)}else for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{Object.defineProperties(e,{[Symbol.toStringTag]:{value:"Module"},__esModule:{value:!0}})},(()=>{const e={457:0,342:0};n.O.j=t=>0===e[t];const t=(t,r)=>{let[i,o,s]=r;var a,l,c=0;if(i.some(t=>0!==e[t])){for(a in o)n.o(o,a)&&(n.m[a]=o[a]);if(s)var d=s(n)}for(t&&t(r);c<i.length;c++)l=i[c],n.o(e,l)&&e[l]&&e[l][0](),e[l]=0;return n.O(d)},r=Array.isArray(self.webpackChunktranslatepress_multilingual)?self.webpackChunktranslatepress_multilingual:self.webpackChunktranslatepress_multilingual=[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})(),n.nc=void 0,n.O(void 0,[342],()=>n(983));let r=n.O(void 0,[342],()=>n(327));r=n.O(r)})();
//# sourceMappingURL=trp-ald-popup-configurator.js.map