(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))n(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const c of s.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&n(c)}).observe(document,{childList:!0,subtree:!0});function i(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerpolicy&&(s.referrerPolicy=r.referrerpolicy),r.crossorigin==="use-credentials"?s.credentials="include":r.crossorigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(r){if(r.ep)return;r.ep=!0;const s=i(r);fetch(r.href,s)}})();/**
* @vue/shared v3.5.8
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**//*! #__NO_SIDE_EFFECTS__ */function nr(e){const t=Object.create(null);for(const i of e.split(","))t[i]=1;return i=>i in t}const Ve={},Pr=[],fi=()=>{},py=()=>!1,qs=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),kc=e=>e.startsWith("onUpdate:"),et=Object.assign,Pc=(e,t)=>{const i=e.indexOf(t);i>-1&&e.splice(i,1)},gy=Object.prototype.hasOwnProperty,ze=(e,t)=>gy.call(e,t),we=Array.isArray,Lr=e=>Yr(e)==="[object Map]",rr=e=>Yr(e)==="[object Set]",ju=e=>Yr(e)==="[object Date]",my=e=>Yr(e)==="[object RegExp]",Te=e=>typeof e=="function",qe=e=>typeof e=="string",Di=e=>typeof e=="symbol",Xe=e=>e!==null&&typeof e=="object",Lc=e=>(Xe(e)||Te(e))&&Te(e.then)&&Te(e.catch),np=Object.prototype.toString,Yr=e=>np.call(e),vy=e=>Yr(e).slice(8,-1),Gn=e=>Yr(e)==="[object Object]",Rc=e=>qe(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Rr=nr(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),ba=e=>{const t=Object.create(null);return i=>t[i]||(t[i]=e(i))},yy=/-(\w)/g,Wt=ba(e=>e.replace(yy,(t,i)=>i?i.toUpperCase():"")),by=/\B([A-Z])/g,Ht=ba(e=>e.replace(by,"-$1").toLowerCase()),_a=ba(e=>e.charAt(0).toUpperCase()+e.slice(1)),Io=ba(e=>e?`on${_a(e)}`:""),Vt=(e,t)=>!Object.is(e,t),Ir=(e,...t)=>{for(let i=0;i<e.length;i++)e[i](...t)},rp=(e,t,i,n=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:i})},qo=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Ko=e=>{const t=qe(e)?Number(e):NaN;return isNaN(t)?e:t};let Gu;const Ic=()=>Gu||(Gu=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),_y="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",wy=nr(_y);function dt(e){if(we(e)){const t={};for(let i=0;i<e.length;i++){const n=e[i],r=qe(n)?xy(n):dt(n);if(r)for(const s in r)t[s]=r[s]}return t}else if(qe(e)||Xe(e))return e}const Sy=/;(?![^(]*\))/g,Ay=/:([^]+)/,Cy=/\/\*[^]*?\*\//g;function xy(e){const t={};return e.replace(Cy,"").split(Sy).forEach(i=>{if(i){const n=i.split(Ay);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function Ty(e){let t="";if(!e||qe(e))return t;for(const i in e){const n=e[i];if(qe(n)||typeof n=="number"){const r=i.startsWith("--")?i:Ht(i);t+=`${r}:${n};`}}return t}function Ue(e){let t="";if(qe(e))t=e;else if(we(e))for(let i=0;i<e.length;i++){const n=Ue(e[i]);n&&(t+=n+" ")}else if(Xe(e))for(const i in e)e[i]&&(t+=i+" ");return t.trim()}function Bl(e){if(!e)return null;let{class:t,style:i}=e;return t&&!qe(t)&&(e.class=Ue(t)),i&&(e.style=dt(i)),e}const sp="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",$y=nr(sp),qu=nr(sp+",async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");function Oc(e){return!!e||e===""}const My=nr("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"),Ey=nr("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 ky(e){if(e==null)return!1;const t=typeof e;return t==="string"||t==="number"||t==="boolean"}const Py=/[ !"#$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g;function Ly(e,t){return e.replace(Py,i=>t?i==='"'?'\\\\\\"':`\\\\${i}`:`\\${i}`)}function Ry(e,t){if(e.length!==t.length)return!1;let i=!0;for(let n=0;i&&n<e.length;n++)i=kn(e[n],t[n]);return i}function kn(e,t){if(e===t)return!0;let i=ju(e),n=ju(t);if(i||n)return i&&n?e.getTime()===t.getTime():!1;if(i=Di(e),n=Di(t),i||n)return e===t;if(i=we(e),n=we(t),i||n)return i&&n?Ry(e,t):!1;if(i=Xe(e),n=Xe(t),i||n){if(!i||!n)return!1;const r=Object.keys(e).length,s=Object.keys(t).length;if(r!==s)return!1;for(const c in e){const u=e.hasOwnProperty(c),o=t.hasOwnProperty(c);if(u&&!o||!u&&o||!kn(e[c],t[c]))return!1}}return String(e)===String(t)}function wa(e,t){return e.findIndex(i=>kn(i,t))}const op=e=>!!(e&&e.__v_isRef===!0),be=e=>qe(e)?e:e==null?"":we(e)||Xe(e)&&(e.toString===np||!Te(e.toString))?op(e)?be(e.value):JSON.stringify(e,ap,2):String(e),ap=(e,t)=>op(t)?ap(e,t.value):Lr(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((i,[n,r],s)=>(i[Ka(n,s)+" =>"]=r,i),{})}:rr(t)?{[`Set(${t.size})`]:[...t.values()].map(i=>Ka(i))}:Di(t)?Ka(t):Xe(t)&&!we(t)&&!Gn(t)?String(t):t,Ka=(e,t="")=>{var i;return Di(e)?`Symbol(${(i=e.description)!=null?i:t})`:e};/**
* @vue/reactivity v3.5.8
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let Bt;class lp{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Bt,!t&&Bt&&(this.index=(Bt.scopes||(Bt.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,i;if(this.scopes)for(t=0,i=this.scopes.length;t<i;t++)this.scopes[t].pause();for(t=0,i=this.effects.length;t<i;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,i;if(this.scopes)for(t=0,i=this.scopes.length;t<i;t++)this.scopes[t].resume();for(t=0,i=this.effects.length;t<i;t++)this.effects[t].resume()}}run(t){if(this._active){const i=Bt;try{return Bt=this,t()}finally{Bt=i}}}on(){Bt=this}off(){Bt=this.parent}stop(t){if(this._active){let i,n;for(i=0,n=this.effects.length;i<n;i++)this.effects[i].stop();for(i=0,n=this.cleanups.length;i<n;i++)this.cleanups[i]();if(this.scopes)for(i=0,n=this.scopes.length;i<n;i++)this.scopes[i].stop(!0);if(!this.detached&&this.parent&&!t){const r=this.parent.scopes.pop();r&&r!==this&&(this.parent.scopes[this.index]=r,r.index=this.index)}this.parent=void 0,this._active=!1}}}function Sa(e){return new lp(e)}function cp(){return Bt}function Iy(e,t=!1){Bt&&Bt.cleanups.push(e)}let Qe;const Ya=new WeakSet;class Yo{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Bt&&Bt.active&&Bt.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Ya.has(this)&&(Ya.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||hp(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Ku(this),dp(this);const t=Qe,i=_i;Qe=this,_i=!0;try{return this.fn()}finally{fp(this),Qe=t,_i=i,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Fc(t);this.deps=this.depsTail=void 0,Ku(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Ya.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Vl(this)&&this.run()}get dirty(){return Vl(this)}}let up=0,ws;function hp(e){e.flags|=8,e.next=ws,ws=e}function Nc(){up++}function Dc(){if(--up>0)return;let e;for(;ws;){let t=ws;for(ws=void 0;t;){const i=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(n){e||(e=n)}t=i}}if(e)throw e}function dp(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function fp(e,t=!1){let i,n=e.depsTail,r=n;for(;r;){const s=r.prevDep;r.version===-1?(r===n&&(n=s),Fc(r,t),Oy(r)):i=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=s}e.deps=i,e.depsTail=n}function Vl(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(pp(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function pp(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===ks))return;e.globalVersion=ks;const t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&e.deps&&!Vl(e)){e.flags&=-3;return}const i=Qe,n=_i;Qe=e,_i=!0;try{dp(e);const r=e.fn(e._value);(t.version===0||Vt(r,e._value))&&(e._value=r,t.version++)}catch(r){throw t.version++,r}finally{Qe=i,_i=n,fp(e,!0),e.flags&=-3}}function Fc(e,t=!1){const{dep:i,prevSub:n,nextSub:r}=e;if(n&&(n.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=n,e.nextSub=void 0),i.subs===e&&(i.subs=n),!i.subs)if(i.computed){i.computed.flags&=-5;for(let s=i.computed.deps;s;s=s.nextDep)Fc(s,!0)}else i.map&&!t&&(i.map.delete(i.key),i.map.size||Ps.delete(i.target))}function Oy(e){const{prevDep:t,nextDep:i}=e;t&&(t.nextDep=i,e.prevDep=void 0),i&&(i.prevDep=t,e.nextDep=void 0)}function b3(e,t){e.effect instanceof Yo&&(e=e.effect.fn);const i=new Yo(e);t&&et(i,t);try{i.run()}catch(r){throw i.stop(),r}const n=i.run.bind(i);return n.effect=i,n}function _3(e){e.effect.stop()}let _i=!0;const gp=[];function sn(){gp.push(_i),_i=!1}function on(){const e=gp.pop();_i=e===void 0?!0:e}function Ku(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const i=Qe;Qe=void 0;try{t()}finally{Qe=i}}}let ks=0;class Ny{constructor(t,i){this.sub=t,this.dep=i,this.version=i.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Aa{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.target=void 0,this.map=void 0,this.key=void 0}track(t){if(!Qe||!_i||Qe===this.computed)return;let i=this.activeLink;if(i===void 0||i.sub!==Qe)i=this.activeLink=new Ny(Qe,this),Qe.deps?(i.prevDep=Qe.depsTail,Qe.depsTail.nextDep=i,Qe.depsTail=i):Qe.deps=Qe.depsTail=i,Qe.flags&4&&mp(i);else if(i.version===-1&&(i.version=this.version,i.nextDep)){const n=i.nextDep;n.prevDep=i.prevDep,i.prevDep&&(i.prevDep.nextDep=n),i.prevDep=Qe.depsTail,i.nextDep=void 0,Qe.depsTail.nextDep=i,Qe.depsTail=i,Qe.deps===i&&(Qe.deps=n)}return i}trigger(t){this.version++,ks++,this.notify(t)}notify(t){Nc();try{for(let i=this.subs;i;i=i.prevSub)i.sub.notify()&&i.sub.dep.notify()}finally{Dc()}}}function mp(e){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let n=t.deps;n;n=n.nextDep)mp(n)}const i=e.dep.subs;i!==e&&(e.prevSub=i,i&&(i.nextSub=e)),e.dep.subs=e}const Ps=new WeakMap,qn=Symbol(""),zl=Symbol(""),Ls=Symbol("");function It(e,t,i){if(_i&&Qe){let n=Ps.get(e);n||Ps.set(e,n=new Map);let r=n.get(i);r||(n.set(i,r=new Aa),r.target=e,r.map=n,r.key=i),r.track()}}function Zi(e,t,i,n,r,s){const c=Ps.get(e);if(!c){ks++;return}const u=o=>{o&&o.trigger()};if(Nc(),t==="clear")c.forEach(u);else{const o=we(e),h=o&&Rc(i);if(o&&i==="length"){const a=Number(n);c.forEach((l,f)=>{(f==="length"||f===Ls||!Di(f)&&f>=a)&&u(l)})}else switch(i!==void 0&&u(c.get(i)),h&&u(c.get(Ls)),t){case"add":o?h&&u(c.get("length")):(u(c.get(qn)),Lr(e)&&u(c.get(zl)));break;case"delete":o||(u(c.get(qn)),Lr(e)&&u(c.get(zl)));break;case"set":Lr(e)&&u(c.get(qn));break}}Dc()}function Dy(e,t){var i;return(i=Ps.get(e))==null?void 0:i.get(t)}function hr(e){const t=Fe(e);return t===e?t:(It(t,"iterate",Ls),pi(e)?t:t.map(Lt))}function Ca(e){return It(e=Fe(e),"iterate",Ls),e}const Fy={__proto__:null,[Symbol.iterator](){return Xa(this,Symbol.iterator,Lt)},concat(...e){return hr(this).concat(...e.map(t=>we(t)?hr(t):t))},entries(){return Xa(this,"entries",e=>(e[1]=Lt(e[1]),e))},every(e,t){return Ui(this,"every",e,t,void 0,arguments)},filter(e,t){return Ui(this,"filter",e,t,i=>i.map(Lt),arguments)},find(e,t){return Ui(this,"find",e,t,Lt,arguments)},findIndex(e,t){return Ui(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Ui(this,"findLast",e,t,Lt,arguments)},findLastIndex(e,t){return Ui(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Ui(this,"forEach",e,t,void 0,arguments)},includes(...e){return Qa(this,"includes",e)},indexOf(...e){return Qa(this,"indexOf",e)},join(e){return hr(this).join(e)},lastIndexOf(...e){return Qa(this,"lastIndexOf",e)},map(e,t){return Ui(this,"map",e,t,void 0,arguments)},pop(){return ns(this,"pop")},push(...e){return ns(this,"push",e)},reduce(e,...t){return Yu(this,"reduce",e,t)},reduceRight(e,...t){return Yu(this,"reduceRight",e,t)},shift(){return ns(this,"shift")},some(e,t){return Ui(this,"some",e,t,void 0,arguments)},splice(...e){return ns(this,"splice",e)},toReversed(){return hr(this).toReversed()},toSorted(e){return hr(this).toSorted(e)},toSpliced(...e){return hr(this).toSpliced(...e)},unshift(...e){return ns(this,"unshift",e)},values(){return Xa(this,"values",Lt)}};function Xa(e,t,i){const n=Ca(e),r=n[t]();return n!==e&&!pi(e)&&(r._next=r.next,r.next=()=>{const s=r._next();return s.value&&(s.value=i(s.value)),s}),r}const By=Array.prototype;function Ui(e,t,i,n,r,s){const c=Ca(e),u=c!==e&&!pi(e),o=c[t];if(o!==By[t]){const l=o.apply(e,s);return u?Lt(l):l}let h=i;c!==e&&(u?h=function(l,f){return i.call(this,Lt(l),f,e)}:i.length>2&&(h=function(l,f){return i.call(this,l,f,e)}));const a=o.call(c,h,n);return u&&r?r(a):a}function Yu(e,t,i,n){const r=Ca(e);let s=i;return r!==e&&(pi(e)?i.length>3&&(s=function(c,u,o){return i.call(this,c,u,o,e)}):s=function(c,u,o){return i.call(this,c,Lt(u),o,e)}),r[t](s,...n)}function Qa(e,t,i){const n=Fe(e);It(n,"iterate",Ls);const r=n[t](...i);return(r===-1||r===!1)&&Vc(i[0])?(i[0]=Fe(i[0]),n[t](...i)):r}function ns(e,t,i=[]){sn(),Nc();const n=Fe(e)[t].apply(e,i);return Dc(),on(),n}const Vy=nr("__proto__,__v_isRef,__isVue"),vp=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Di));function zy(e){Di(e)||(e=String(e));const t=Fe(this);return It(t,"has",e),t.hasOwnProperty(e)}class yp{constructor(t=!1,i=!1){this._isReadonly=t,this._isShallow=i}get(t,i,n){const r=this._isReadonly,s=this._isShallow;if(i==="__v_isReactive")return!r;if(i==="__v_isReadonly")return r;if(i==="__v_isShallow")return s;if(i==="__v_raw")return n===(r?s?Cp:Ap:s?Sp:wp).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(n)?t:void 0;const c=we(t);if(!r){let o;if(c&&(o=Fy[i]))return o;if(i==="hasOwnProperty")return zy}const u=Reflect.get(t,i,at(t)?t:n);return(Di(i)?vp.has(i):Vy(i))||(r||It(t,"get",i),s)?u:at(u)?c&&Rc(i)?u:u.value:Xe(u)?r?xp(u):sr(u):u}}class bp extends yp{constructor(t=!1){super(!1,t)}set(t,i,n,r){let s=t[i];if(!this._isShallow){const o=Xn(s);if(!pi(n)&&!Xn(n)&&(s=Fe(s),n=Fe(n)),!we(t)&&at(s)&&!at(n))return o?!1:(s.value=n,!0)}const c=we(t)&&Rc(i)?Number(i)<t.length:ze(t,i),u=Reflect.set(t,i,n,at(t)?t:r);return t===Fe(r)&&(c?Vt(n,s)&&Zi(t,"set",i,n):Zi(t,"add",i,n)),u}deleteProperty(t,i){const n=ze(t,i);t[i];const r=Reflect.deleteProperty(t,i);return r&&n&&Zi(t,"delete",i,void 0),r}has(t,i){const n=Reflect.has(t,i);return(!Di(i)||!vp.has(i))&&It(t,"has",i),n}ownKeys(t){return It(t,"iterate",we(t)?"length":qn),Reflect.ownKeys(t)}}class _p extends yp{constructor(t=!1){super(!0,t)}set(t,i){return!0}deleteProperty(t,i){return!0}}const Hy=new bp,Uy=new _p,Wy=new bp(!0),jy=new _p(!0),Bc=e=>e,xa=e=>Reflect.getPrototypeOf(e);function co(e,t,i=!1,n=!1){e=e.__v_raw;const r=Fe(e),s=Fe(t);i||(Vt(t,s)&&It(r,"get",t),It(r,"get",s));const{has:c}=xa(r),u=n?Bc:i?Hc:Lt;if(c.call(r,t))return u(e.get(t));if(c.call(r,s))return u(e.get(s));e!==r&&e.get(t)}function uo(e,t=!1){const i=this.__v_raw,n=Fe(i),r=Fe(e);return t||(Vt(e,r)&&It(n,"has",e),It(n,"has",r)),e===r?i.has(e):i.has(e)||i.has(r)}function ho(e,t=!1){return e=e.__v_raw,!t&&It(Fe(e),"iterate",qn),Reflect.get(e,"size",e)}function Xu(e,t=!1){!t&&!pi(e)&&!Xn(e)&&(e=Fe(e));const i=Fe(this);return xa(i).has.call(i,e)||(i.add(e),Zi(i,"add",e,e)),this}function Qu(e,t,i=!1){!i&&!pi(t)&&!Xn(t)&&(t=Fe(t));const n=Fe(this),{has:r,get:s}=xa(n);let c=r.call(n,e);c||(e=Fe(e),c=r.call(n,e));const u=s.call(n,e);return n.set(e,t),c?Vt(t,u)&&Zi(n,"set",e,t):Zi(n,"add",e,t),this}function Ju(e){const t=Fe(this),{has:i,get:n}=xa(t);let r=i.call(t,e);r||(e=Fe(e),r=i.call(t,e)),n&&n.call(t,e);const s=t.delete(e);return r&&Zi(t,"delete",e,void 0),s}function Zu(){const e=Fe(this),t=e.size!==0,i=e.clear();return t&&Zi(e,"clear",void 0,void 0),i}function fo(e,t){return function(n,r){const s=this,c=s.__v_raw,u=Fe(c),o=t?Bc:e?Hc:Lt;return!e&&It(u,"iterate",qn),c.forEach((h,a)=>n.call(r,o(h),o(a),s))}}function po(e,t,i){return function(...n){const r=this.__v_raw,s=Fe(r),c=Lr(s),u=e==="entries"||e===Symbol.iterator&&c,o=e==="keys"&&c,h=r[e](...n),a=i?Bc:t?Hc:Lt;return!t&&It(s,"iterate",o?zl:qn),{next(){const{value:l,done:f}=h.next();return f?{value:l,done:f}:{value:u?[a(l[0]),a(l[1])]:a(l),done:f}},[Symbol.iterator](){return this}}}}function un(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Gy(){const e={get(s){return co(this,s)},get size(){return ho(this)},has:uo,add:Xu,set:Qu,delete:Ju,clear:Zu,forEach:fo(!1,!1)},t={get(s){return co(this,s,!1,!0)},get size(){return ho(this)},has:uo,add(s){return Xu.call(this,s,!0)},set(s,c){return Qu.call(this,s,c,!0)},delete:Ju,clear:Zu,forEach:fo(!1,!0)},i={get(s){return co(this,s,!0)},get size(){return ho(this,!0)},has(s){return uo.call(this,s,!0)},add:un("add"),set:un("set"),delete:un("delete"),clear:un("clear"),forEach:fo(!0,!1)},n={get(s){return co(this,s,!0,!0)},get size(){return ho(this,!0)},has(s){return uo.call(this,s,!0)},add:un("add"),set:un("set"),delete:un("delete"),clear:un("clear"),forEach:fo(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(s=>{e[s]=po(s,!1,!1),i[s]=po(s,!0,!1),t[s]=po(s,!1,!0),n[s]=po(s,!0,!0)}),[e,i,t,n]}const[qy,Ky,Yy,Xy]=Gy();function Ta(e,t){const i=t?e?Xy:Yy:e?Ky:qy;return(n,r,s)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?n:Reflect.get(ze(i,r)&&r in n?i:n,r,s)}const Qy={get:Ta(!1,!1)},Jy={get:Ta(!1,!0)},Zy={get:Ta(!0,!1)},eb={get:Ta(!0,!0)},wp=new WeakMap,Sp=new WeakMap,Ap=new WeakMap,Cp=new WeakMap;function tb(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function ib(e){return e.__v_skip||!Object.isExtensible(e)?0:tb(vy(e))}function sr(e){return Xn(e)?e:$a(e,!1,Hy,Qy,wp)}function nb(e){return $a(e,!1,Wy,Jy,Sp)}function xp(e){return $a(e,!0,Uy,Zy,Ap)}function w3(e){return $a(e,!0,jy,eb,Cp)}function $a(e,t,i,n,r){if(!Xe(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const s=r.get(e);if(s)return s;const c=ib(e);if(c===0)return e;const u=new Proxy(e,c===2?n:i);return r.set(e,u),u}function en(e){return Xn(e)?en(e.__v_raw):!!(e&&e.__v_isReactive)}function Xn(e){return!!(e&&e.__v_isReadonly)}function pi(e){return!!(e&&e.__v_isShallow)}function Vc(e){return e?!!e.__v_raw:!1}function Fe(e){const t=e&&e.__v_raw;return t?Fe(t):e}function zc(e){return!ze(e,"__v_skip")&&Object.isExtensible(e)&&rp(e,"__v_skip",!0),e}const Lt=e=>Xe(e)?sr(e):e,Hc=e=>Xe(e)?xp(e):e;function at(e){return e?e.__v_isRef===!0:!1}function oi(e){return Tp(e,!1)}function Ma(e){return Tp(e,!0)}function Tp(e,t){return at(e)?e:new rb(e,t)}class rb{constructor(t,i){this.dep=new Aa,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=i?t:Fe(t),this._value=i?t:Lt(t),this.__v_isShallow=i}get value(){return this.dep.track(),this._value}set value(t){const i=this._rawValue,n=this.__v_isShallow||pi(t)||Xn(t);t=n?t:Fe(t),Vt(t,i)&&(this._rawValue=t,this._value=n?t:Lt(t),this.dep.trigger())}}function S3(e){e.dep&&e.dep.trigger()}function Tn(e){return at(e)?e.value:e}function A3(e){return Te(e)?e():Tn(e)}const sb={get:(e,t,i)=>t==="__v_raw"?e:Tn(Reflect.get(e,t,i)),set:(e,t,i,n)=>{const r=e[t];return at(r)&&!at(i)?(r.value=i,!0):Reflect.set(e,t,i,n)}};function $p(e){return en(e)?e:new Proxy(e,sb)}class ob{constructor(t){this.__v_isRef=!0,this._value=void 0;const i=this.dep=new Aa,{get:n,set:r}=t(i.track.bind(i),i.trigger.bind(i));this._get=n,this._set=r}get value(){return this._value=this._get()}set value(t){this._set(t)}}function ab(e){return new ob(e)}function lb(e){const t=we(e)?new Array(e.length):{};for(const i in e)t[i]=Mp(e,i);return t}class cb{constructor(t,i,n){this._object=t,this._key=i,this._defaultValue=n,this.__v_isRef=!0,this._value=void 0}get value(){const t=this._object[this._key];return this._value=t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return Dy(Fe(this._object),this._key)}}class ub{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function C3(e,t,i){return at(e)?e:Te(e)?new ub(e):Xe(e)&&arguments.length>1?Mp(e,t,i):oi(e)}function Mp(e,t,i){const n=e[t];return at(n)?n:new cb(e,t,i)}class hb{constructor(t,i,n){this.fn=t,this.setter=i,this._value=void 0,this.dep=new Aa(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=ks-1,this.effect=this,this.__v_isReadonly=!i,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&Qe!==this)return hp(this),!0}get value(){const t=this.dep.track();return pp(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function db(e,t,i=!1){let n,r;return Te(e)?n=e:(n=e.get,r=e.set),new hb(n,r,i)}const x3={GET:"get",HAS:"has",ITERATE:"iterate"},T3={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},go={},Xo=new WeakMap;let bn;function $3(){return bn}function fb(e,t=!1,i=bn){if(i){let n=Xo.get(i);n||Xo.set(i,n=[]),n.push(e)}}function pb(e,t,i=Ve){const{immediate:n,deep:r,once:s,scheduler:c,augmentJob:u,call:o}=i,h=b=>r?b:pi(b)||r===!1||r===0?Xi(b,1):Xi(b);let a,l,f,d,p=!1,g=!1;if(at(e)?(l=()=>e.value,p=pi(e)):en(e)?(l=()=>h(e),p=!0):we(e)?(g=!0,p=e.some(b=>en(b)||pi(b)),l=()=>e.map(b=>{if(at(b))return b.value;if(en(b))return h(b);if(Te(b))return o?o(b,2):b()})):Te(e)?t?l=o?()=>o(e,2):e:l=()=>{if(f){sn();try{f()}finally{on()}}const b=bn;bn=a;try{return o?o(e,3,[d]):e(d)}finally{bn=b}}:l=fi,t&&r){const b=l,_=r===!0?1/0:r;l=()=>Xi(b(),_)}const m=cp(),v=()=>{a.stop(),m&&Pc(m.effects,a)};if(s&&t){const b=t;t=(..._)=>{b(..._),v()}}let y=g?new Array(e.length).fill(go):go;const S=b=>{if(!(!(a.flags&1)||!a.dirty&&!b))if(t){const _=a.run();if(r||p||(g?_.some((w,E)=>Vt(w,y[E])):Vt(_,y))){f&&f();const w=bn;bn=a;try{const E=[_,y===go?void 0:g&&y[0]===go?[]:y,d];o?o(t,3,E):t(...E),y=_}finally{bn=w}}}else a.run()};return u&&u(S),a=new Yo(l),a.scheduler=c?()=>c(S,!1):S,d=b=>fb(b,!1,a),f=a.onStop=()=>{const b=Xo.get(a);if(b){if(o)o(b,4);else for(const _ of b)_();Xo.delete(a)}},t?n?S(!0):y=a.run():c?c(S.bind(null,!0),!0):a.run(),v.pause=a.pause.bind(a),v.resume=a.resume.bind(a),v.stop=v,v}function Xi(e,t=1/0,i){if(t<=0||!Xe(e)||e.__v_skip||(i=i||new Set,i.has(e)))return e;if(i.add(e),t--,at(e))Xi(e.value,t,i);else if(we(e))for(let n=0;n<e.length;n++)Xi(e[n],t,i);else if(rr(e)||Lr(e))e.forEach(n=>{Xi(n,t,i)});else if(Gn(e)){for(const n in e)Xi(e[n],t,i);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&Xi(e[n],t,i)}return e}/**
* @vue/runtime-core v3.5.8
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/const Kn=[];function gb(e){Kn.push(e)}function mb(){Kn.pop()}let Ja=!1;function mn(e,...t){if(Ja)return;Ja=!0,sn();const i=Kn.length?Kn[Kn.length-1].component:null,n=i&&i.appContext.config.warnHandler,r=vb();if(n)Xr(n,i,11,[e+t.map(s=>{var c,u;return(u=(c=s.toString)==null?void 0:c.call(s))!=null?u:JSON.stringify(s)}).join(""),i&&i.proxy,r.map(({vnode:s})=>`at <${wg(i,s.type)}>`).join(`
`),r]);else{const s=[`[Vue warn]: ${e}`,...t];r.length&&s.push(`
`,...yb(r)),console.warn(...s)}on(),Ja=!1}function vb(){let e=Kn[Kn.length-1];if(!e)return[];const t=[];for(;e;){const i=t[0];i&&i.vnode===e?i.recurseCount++:t.push({vnode:e,recurseCount:0});const n=e.component&&e.component.parent;e=n&&n.vnode}return t}function yb(e){const t=[];return e.forEach((i,n)=>{t.push(...n===0?[]:[`
`],...bb(i))}),t}function bb({vnode:e,recurseCount:t}){const i=t>0?`... (${t} recursive calls)`:"",n=e.component?e.component.parent==null:!1,r=` at <${wg(e.component,e.type,n)}`,s=">"+i;return e.props?[r,..._b(e.props),s]:[r+s]}function _b(e){const t=[],i=Object.keys(e);return i.slice(0,3).forEach(n=>{t.push(...Ep(n,e[n]))}),i.length>3&&t.push(" ..."),t}function Ep(e,t,i){return qe(t)?(t=JSON.stringify(t),i?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?i?t:[`${e}=${t}`]:at(t)?(t=Ep(e,Fe(t.value),!0),i?t:[`${e}=Ref<`,t,">"]):Te(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=Fe(t),i?t:[`${e}=`,t])}function M3(e,t){}const E3={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"},wb={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 Xr(e,t,i,n){try{return n?e(...n):e()}catch(r){Qr(r,t,i)}}function Ai(e,t,i,n){if(Te(e)){const r=Xr(e,t,i,n);return r&&Lc(r)&&r.catch(s=>{Qr(s,t,i)}),r}if(we(e)){const r=[];for(let s=0;s<e.length;s++)r.push(Ai(e[s],t,i,n));return r}}function Qr(e,t,i,n=!0){const r=t?t.vnode:null,{errorHandler:s,throwUnhandledErrorInProduction:c}=t&&t.appContext.config||Ve;if(t){let u=t.parent;const o=t.proxy,h=`https://vuejs.org/error-reference/#runtime-${i}`;for(;u;){const a=u.ec;if(a){for(let l=0;l<a.length;l++)if(a[l](e,o,h)===!1)return}u=u.parent}if(s){sn(),Xr(s,null,10,[e,o,h]),on();return}}Sb(e,i,r,n,c)}function Sb(e,t,i,n=!0,r=!1){if(r)throw e;console.error(e)}let Rs=!1,Hl=!1;const zt=[];let ki=0;const Or=[];let _n=null,_r=0;const kp=Promise.resolve();let Uc=null;function tn(e){const t=Uc||kp;return e?t.then(this?e.bind(this):e):t}function Ab(e){let t=Rs?ki+1:0,i=zt.length;for(;t<i;){const n=t+i>>>1,r=zt[n],s=Is(r);s<e||s===e&&r.flags&2?t=n+1:i=n}return t}function Wc(e){if(!(e.flags&1)){const t=Is(e),i=zt[zt.length-1];!i||!(e.flags&2)&&t>=Is(i)?zt.push(e):zt.splice(Ab(t),0,e),e.flags|=1,Pp()}}function Pp(){!Rs&&!Hl&&(Hl=!0,Uc=kp.then(Lp))}function Ul(e){we(e)?Or.push(...e):_n&&e.id===-1?_n.splice(_r+1,0,e):e.flags&1||(Or.push(e),e.flags|=1),Pp()}function eh(e,t,i=Rs?ki+1:0){for(;i<zt.length;i++){const n=zt[i];if(n&&n.flags&2){if(e&&n.id!==e.uid)continue;zt.splice(i,1),i--,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function Qo(e){if(Or.length){const t=[...new Set(Or)].sort((i,n)=>Is(i)-Is(n));if(Or.length=0,_n){_n.push(...t);return}for(_n=t,_r=0;_r<_n.length;_r++){const i=_n[_r];i.flags&4&&(i.flags&=-2),i.flags&8||i(),i.flags&=-2}_n=null,_r=0}}const Is=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Lp(e){Hl=!1,Rs=!0;const t=fi;try{for(ki=0;ki<zt.length;ki++){const i=zt[ki];i&&!(i.flags&8)&&(i.flags&4&&(i.flags&=-2),Xr(i,i.i,i.i?15:14),i.flags&4||(i.flags&=-2))}}finally{for(;ki<zt.length;ki++){const i=zt[ki];i&&(i.flags&=-2)}ki=0,zt.length=0,Qo(),Rs=!1,Uc=null,(zt.length||Or.length)&&Lp()}}let wr,mo=[];function Rp(e,t){var i,n;wr=e,wr?(wr.enabled=!0,mo.forEach(({event:r,args:s})=>wr.emit(r,...s)),mo=[]):typeof window<"u"&&window.HTMLElement&&!((n=(i=window.navigator)==null?void 0:i.userAgent)!=null&&n.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(s=>{Rp(s,t)}),setTimeout(()=>{wr||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,mo=[])},3e3)):mo=[]}let yt=null,Ea=null;function Os(e){const t=yt;return yt=e,Ea=e&&e.type.__scopeId||null,t}function k3(e){Ea=e}function P3(){Ea=null}const L3=e=>De;function De(e,t=yt,i){if(!t||e._n)return e;const n=(...r)=>{n._d&&gh(-1);const s=Os(t);let c;try{c=e(...r)}finally{Os(s),n._d&&gh(1)}return c};return n._n=!0,n._c=!0,n._d=!0,n}function St(e,t){if(yt===null)return e;const i=Js(yt),n=e.dirs||(e.dirs=[]);for(let r=0;r<t.length;r++){let[s,c,u,o=Ve]=t[r];s&&(Te(s)&&(s={mounted:s,updated:s}),s.deep&&Xi(c),n.push({dir:s,instance:i,value:c,oldValue:void 0,arg:u,modifiers:o}))}return e}function Ri(e,t,i,n){const r=e.dirs,s=t&&t.dirs;for(let c=0;c<r.length;c++){const u=r[c];s&&(u.oldValue=s[c].value);let o=u.dir[n];o&&(sn(),Ai(o,i,8,[e.el,u,e,t]),on())}}const Ip=Symbol("_vte"),Op=e=>e.__isTeleport,Ss=e=>e&&(e.disabled||e.disabled===""),Cb=e=>e&&(e.defer||e.defer===""),th=e=>typeof SVGElement<"u"&&e instanceof SVGElement,ih=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Wl=(e,t)=>{const i=e&&e.to;return qe(i)?t?t(i):null:i},xb={name:"Teleport",__isTeleport:!0,process(e,t,i,n,r,s,c,u,o,h){const{mc:a,pc:l,pbc:f,o:{insert:d,querySelector:p,createText:g,createComment:m}}=h,v=Ss(t.props);let{shapeFlag:y,children:S,dynamicChildren:b}=t;if(e==null){const _=t.el=g(""),w=t.anchor=g("");d(_,i,n),d(w,i,n);const E=($,C)=>{y&16&&(r&&r.isCE&&(r.ce._teleportTarget=$),a(S,$,C,r,s,c,u,o))},T=()=>{const $=t.target=Wl(t.props,p),C=Np($,t,g,d);$&&(c!=="svg"&&th($)?c="svg":c!=="mathml"&&ih($)&&(c="mathml"),v||(E($,C),Oo(t)))};v&&(E(i,w),Oo(t)),Cb(t.props)?_t(T,s):T()}else{t.el=e.el,t.targetStart=e.targetStart;const _=t.anchor=e.anchor,w=t.target=e.target,E=t.targetAnchor=e.targetAnchor,T=Ss(e.props),$=T?i:w,C=T?_:E;if(c==="svg"||th(w)?c="svg":(c==="mathml"||ih(w))&&(c="mathml"),b?(f(e.dynamicChildren,b,$,r,s,c,u),iu(e,t,!0)):o||l(e,t,$,C,r,s,c,u,!1),v)T?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):vo(t,i,_,h,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const x=t.target=Wl(t.props,p);x&&vo(t,x,null,h,0)}else T&&vo(t,w,E,h,1);Oo(t)}},remove(e,t,i,{um:n,o:{remove:r}},s){const{shapeFlag:c,children:u,anchor:o,targetStart:h,targetAnchor:a,target:l,props:f}=e;if(l&&(r(h),r(a)),s&&r(o),c&16){const d=s||!Ss(f);for(let p=0;p<u.length;p++){const g=u[p];n(g,t,i,d,!!g.dynamicChildren)}}},move:vo,hydrate:Tb};function vo(e,t,i,{o:{insert:n},m:r},s=2){s===0&&n(e.targetAnchor,t,i);const{el:c,anchor:u,shapeFlag:o,children:h,props:a}=e,l=s===2;if(l&&n(c,t,i),(!l||Ss(a))&&o&16)for(let f=0;f<h.length;f++)r(h[f],t,i,2);l&&n(u,t,i)}function Tb(e,t,i,n,r,s,{o:{nextSibling:c,parentNode:u,querySelector:o,insert:h,createText:a}},l){const f=t.target=Wl(t.props,o);if(f){const d=f._lpa||f.firstChild;if(t.shapeFlag&16)if(Ss(t.props))t.anchor=l(c(e),t,u(e),i,n,r,s),t.targetStart=d,t.targetAnchor=d&&c(d);else{t.anchor=c(e);let p=d;for(;p;){if(p&&p.nodeType===8){if(p.data==="teleport start anchor")t.targetStart=p;else if(p.data==="teleport anchor"){t.targetAnchor=p,f._lpa=t.targetAnchor&&c(t.targetAnchor);break}}p=c(p)}t.targetAnchor||Np(f,t,a,h),l(d&&c(d),t,f,i,n,r,s)}Oo(t)}return t.anchor&&c(t.anchor)}const or=xb;function Oo(e){const t=e.ctx;if(t&&t.ut){let i=e.targetStart;for(;i&&i!==e.targetAnchor;)i.nodeType===1&&i.setAttribute("data-v-owner",t.uid),i=i.nextSibling;t.ut()}}function Np(e,t,i,n){const r=t.targetStart=i(""),s=t.targetAnchor=i("");return r[Ip]=s,e&&(n(r,e),n(s,e)),s}const wn=Symbol("_leaveCb"),yo=Symbol("_enterCb");function Dp(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Ys(()=>{e.isMounted=!0}),Yc(()=>{e.isUnmounting=!0}),e}const li=[Function,Array],Fp={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:li,onEnter:li,onAfterEnter:li,onEnterCancelled:li,onBeforeLeave:li,onLeave:li,onAfterLeave:li,onLeaveCancelled:li,onBeforeAppear:li,onAppear:li,onAfterAppear:li,onAppearCancelled:li},Bp=e=>{const t=e.subTree;return t.component?Bp(t.component):t},$b={name:"BaseTransition",props:Fp,setup(e,{slots:t}){const i=Ot(),n=Dp();return()=>{const r=t.default&&jc(t.default(),!0);if(!r||!r.length)return;const s=Vp(r),c=Fe(e),{mode:u}=c;if(n.isLeaving)return Za(s);const o=nh(s);if(!o)return Za(s);let h=Ns(o,c,n,i,f=>h=f);o.type!==gt&&Pn(o,h);const a=i.subTree,l=a&&nh(a);if(l&&l.type!==gt&&!vi(o,l)&&Bp(i).type!==gt){const f=Ns(l,c,n,i);if(Pn(l,f),u==="out-in"&&o.type!==gt)return n.isLeaving=!0,f.afterLeave=()=>{n.isLeaving=!1,i.job.flags&8||i.update(),delete f.afterLeave},Za(s);u==="in-out"&&o.type!==gt&&(f.delayLeave=(d,p,g)=>{const m=zp(n,l);m[String(l.key)]=l,d[wn]=()=>{p(),d[wn]=void 0,delete h.delayedLeave},h.delayedLeave=g})}return s}}};function Vp(e){let t=e[0];if(e.length>1){for(const i of e)if(i.type!==gt){t=i;break}}return t}const Mb=$b;function zp(e,t){const{leavingVNodes:i}=e;let n=i.get(t.type);return n||(n=Object.create(null),i.set(t.type,n)),n}function Ns(e,t,i,n,r){const{appear:s,mode:c,persisted:u=!1,onBeforeEnter:o,onEnter:h,onAfterEnter:a,onEnterCancelled:l,onBeforeLeave:f,onLeave:d,onAfterLeave:p,onLeaveCancelled:g,onBeforeAppear:m,onAppear:v,onAfterAppear:y,onAppearCancelled:S}=t,b=String(e.key),_=zp(i,e),w=($,C)=>{$&&Ai($,n,9,C)},E=($,C)=>{const x=C[1];w($,C),we($)?$.every(L=>L.length<=1)&&x():$.length<=1&&x()},T={mode:c,persisted:u,beforeEnter($){let C=o;if(!i.isMounted)if(s)C=m||o;else return;$[wn]&&$[wn](!0);const x=_[b];x&&vi(e,x)&&x.el[wn]&&x.el[wn](),w(C,[$])},enter($){let C=h,x=a,L=l;if(!i.isMounted)if(s)C=v||h,x=y||a,L=S||l;else return;let M=!1;const A=$[yo]=k=>{M||(M=!0,k?w(L,[$]):w(x,[$]),T.delayedLeave&&T.delayedLeave(),$[yo]=void 0)};C?E(C,[$,A]):A()},leave($,C){const x=String(e.key);if($[yo]&&$[yo](!0),i.isUnmounting)return C();w(f,[$]);let L=!1;const M=$[wn]=A=>{L||(L=!0,C(),A?w(g,[$]):w(p,[$]),$[wn]=void 0,_[x]===e&&delete _[x])};_[x]=e,d?E(d,[$,M]):M()},clone($){const C=Ns($,t,i,n,r);return r&&r(C),C}};return T}function Za(e){if(Ks(e))return e=nn(e),e.children=null,e}function nh(e){if(!Ks(e))return Op(e.type)&&e.children?Vp(e.children):e;const{shapeFlag:t,children:i}=e;if(i){if(t&16)return i[0];if(t&32&&Te(i.default))return i.default()}}function Pn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Pn(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function jc(e,t=!1,i){let n=[],r=0;for(let s=0;s<e.length;s++){let c=e[s];const u=i==null?c.key:String(i)+String(c.key!=null?c.key:s);c.type===Oe?(c.patchFlag&128&&r++,n=n.concat(jc(c.children,t,u))):(t||c.type!==gt)&&n.push(u!=null?nn(c,{key:u}):c)}if(r>1)for(let s=0;s<n.length;s++)n[s].patchFlag=-2;return n}/*! #__NO_SIDE_EFFECTS__ */function ar(e,t){return Te(e)?(()=>et({name:e.name},t,{setup:e}))():e}function R3(){const e=Ot();if(e)return(e.appContext.config.idPrefix||"v")+"-"+e.ids[0]+e.ids[1]++}function Gc(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function I3(e){const t=Ot(),i=Ma(null);if(t){const r=t.refs===Ve?t.refs={}:t.refs;Object.defineProperty(r,e,{enumerable:!0,get:()=>i.value,set:s=>i.value=s})}return i}function Jo(e,t,i,n,r=!1){if(we(e)){e.forEach((p,g)=>Jo(p,t&&(we(t)?t[g]:t),i,n,r));return}if($n(n)&&!r)return;const s=n.shapeFlag&4?Js(n.component):n.el,c=r?null:s,{i:u,r:o}=e,h=t&&t.r,a=u.refs===Ve?u.refs={}:u.refs,l=u.setupState,f=Fe(l),d=l===Ve?()=>!1:p=>ze(f,p);if(h!=null&&h!==o&&(qe(h)?(a[h]=null,d(h)&&(l[h]=null)):at(h)&&(h.value=null)),Te(o))Xr(o,u,12,[c,a]);else{const p=qe(o),g=at(o);if(p||g){const m=()=>{if(e.f){const v=p?d(o)?l[o]:a[o]:o.value;r?we(v)&&Pc(v,s):we(v)?v.includes(s)||v.push(s):p?(a[o]=[s],d(o)&&(l[o]=a[o])):(o.value=[s],e.k&&(a[e.k]=o.value))}else p?(a[o]=c,d(o)&&(l[o]=c)):g&&(o.value=c,e.k&&(a[e.k]=c))};c?(m.id=-1,_t(m,i)):m()}}}let rh=!1;const Fn=()=>{rh||(console.error("Hydration completed but contains mismatches."),rh=!0)},Eb=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",kb=e=>e.namespaceURI.includes("MathML"),bo=e=>{if(e.nodeType===1){if(Eb(e))return"svg";if(kb(e))return"mathml"}},jn=e=>e.nodeType===8;function Pb(e){const{mt:t,p:i,o:{patchProp:n,createText:r,nextSibling:s,parentNode:c,remove:u,insert:o,createComment:h}}=e,a=(S,b)=>{if(!b.hasChildNodes()){__VUE_PROD_HYDRATION_MISMATCH_DETAILS__&&mn("Attempting to hydrate existing markup but container is empty. Performing full mount instead."),i(null,S,b),Qo(),b._vnode=S;return}l(b.firstChild,S,null,null,null),Qo(),b._vnode=S},l=(S,b,_,w,E,T=!1)=>{T=T||!!b.dynamicChildren;const $=jn(S)&&S.data==="[",C=()=>g(S,b,_,w,E,$),{type:x,ref:L,shapeFlag:M,patchFlag:A}=b;let k=S.nodeType;b.el=S,A===-2&&(T=!1,b.dynamicChildren=null);let P=null;switch(x){case Mn:k!==3?b.children===""?(o(b.el=r(""),c(S),S),P=S):P=C():(S.data!==b.children&&(__VUE_PROD_HYDRATION_MISMATCH_DETAILS__&&mn("Hydration text mismatch in",S.parentNode,`
  - rendered on server: ${JSON.stringify(S.data)}
  - expected on client: ${JSON.stringify(b.children)}`),Fn(),S.data=b.children),P=s(S));break;case gt:y(S)?(P=s(S),v(b.el=S.content.firstChild,S,_)):k!==8||$?P=C():P=s(S);break;case Dr:if($&&(S=s(S),k=S.nodeType),k===1||k===3){P=S;const O=!b.children.length;for(let N=0;N<b.staticCount;N++)O&&(b.children+=P.nodeType===1?P.outerHTML:P.data),N===b.staticCount-1&&(b.anchor=P),P=s(P);return $?s(P):P}else C();break;case Oe:$?P=p(S,b,_,w,E,T):P=C();break;default:if(M&1)(k!==1||b.type.toLowerCase()!==S.tagName.toLowerCase())&&!y(S)?P=C():P=f(S,b,_,w,E,T);else if(M&6){b.slotScopeIds=E;const O=c(S);if($?P=m(S):jn(S)&&S.data==="teleport start"?P=m(S,S.data,"teleport end"):P=s(S),t(b,O,null,_,w,bo(O),T),$n(b)){let N;$?(N=ve(Oe),N.anchor=P?P.previousSibling:O.lastChild):N=S.nodeType===3?He(""):ve("div"),N.el=S,b.component.subTree=N}}else M&64?k!==8?P=C():P=b.type.hydrate(S,b,_,w,E,T,e,d):M&128?P=b.type.hydrate(S,b,_,w,bo(c(S)),E,T,e,l):__VUE_PROD_HYDRATION_MISMATCH_DETAILS__&&mn("Invalid HostVNode type:",x,`(${typeof x})`)}return L!=null&&Jo(L,null,w,b),P},f=(S,b,_,w,E,T)=>{T=T||!!b.dynamicChildren;const{type:$,props:C,patchFlag:x,shapeFlag:L,dirs:M,transition:A}=b,k=$==="input"||$==="option";if(k||x!==-1){M&&Ri(b,null,_,"created");let P=!1;if(y(S)){P=og(w,A)&&_&&_.vnode.props&&_.vnode.props.appear;const N=S.content.firstChild;P&&A.beforeEnter(N),v(N,S,_),b.el=S=N}if(L&16&&!(C&&(C.innerHTML||C.textContent))){let N=d(S.firstChild,b,S,_,w,E,T),D=!1;for(;N;){gs(S,1)||(__VUE_PROD_HYDRATION_MISMATCH_DETAILS__&&!D&&(mn("Hydration children mismatch on",S,`
Server rendered element contains more child nodes than client vdom.`),D=!0),Fn());const B=N;N=N.nextSibling,u(B)}}else if(L&8){let N=b.children;N[0]===`
`&&(S.tagName==="PRE"||S.tagName==="TEXTAREA")&&(N=N.slice(1)),S.textContent!==N&&(gs(S,0)||(__VUE_PROD_HYDRATION_MISMATCH_DETAILS__&&mn("Hydration text content mismatch on",S,`
  - rendered on server: ${S.textContent}
  - expected on client: ${b.children}`),Fn()),S.textContent=b.children)}if(C){if(__VUE_PROD_HYDRATION_MISMATCH_DETAILS__||k||!T||x&48){const N=S.tagName.includes("-");for(const D in C)__VUE_PROD_HYDRATION_MISMATCH_DETAILS__&&!(M&&M.some(B=>B.dir.created))&&Lb(S,D,C[D],b,_)&&Fn(),(k&&(D.endsWith("value")||D==="indeterminate")||qs(D)&&!Rr(D)||D[0]==="."||N)&&n(S,D,null,C[D],void 0,_)}else if(C.onClick)n(S,"onClick",null,C.onClick,void 0,_);else if(x&4&&en(C.style))for(const N in C.style)C.style[N]}let O;(O=C&&C.onVnodeBeforeMount)&&Yt(O,_,b),M&&Ri(b,null,_,"beforeMount"),((O=C&&C.onVnodeMounted)||M||P)&&dg(()=>{O&&Yt(O,_,b),P&&A.enter(S),M&&Ri(b,null,_,"mounted")},w)}return S.nextSibling},d=(S,b,_,w,E,T,$)=>{$=$||!!b.dynamicChildren;const C=b.children,x=C.length;let L=!1;for(let M=0;M<x;M++){const A=$?C[M]:C[M]=Xt(C[M]),k=A.type===Mn;S?(k&&!$&&M+1<x&&Xt(C[M+1]).type===Mn&&(o(r(S.data.slice(A.children.length)),_,s(S)),S.data=A.children),S=l(S,A,w,E,T,$)):k&&!A.children?o(A.el=r(""),_):(gs(_,1)||(__VUE_PROD_HYDRATION_MISMATCH_DETAILS__&&!L&&(mn("Hydration children mismatch on",_,`
Server rendered element contains fewer child nodes than client vdom.`),L=!0),Fn()),i(null,A,_,null,w,E,bo(_),T))}return S},p=(S,b,_,w,E,T)=>{const{slotScopeIds:$}=b;$&&(E=E?E.concat($):$);const C=c(S),x=d(s(S),b,C,_,w,E,T);return x&&jn(x)&&x.data==="]"?s(b.anchor=x):(Fn(),o(b.anchor=h("]"),C,x),x)},g=(S,b,_,w,E,T)=>{if(gs(S.parentElement,1)||(__VUE_PROD_HYDRATION_MISMATCH_DETAILS__&&mn(`Hydration node mismatch:
- rendered on server:`,S,S.nodeType===3?"(text)":jn(S)&&S.data==="["?"(start of fragment)":"",`
- expected on client:`,b.type),Fn()),b.el=null,T){const x=m(S);for(;;){const L=s(S);if(L&&L!==x)u(L);else break}}const $=s(S),C=c(S);return u(S),i(null,b,C,$,_,w,bo(C),E),$},m=(S,b="[",_="]")=>{let w=0;for(;S;)if(S=s(S),S&&jn(S)&&(S.data===b&&w++,S.data===_)){if(w===0)return s(S);w--}return S},v=(S,b,_)=>{const w=b.parentNode;w&&w.replaceChild(S,b);let E=_;for(;E;)E.vnode.el===b&&(E.vnode.el=E.subTree.el=S),E=E.parent},y=S=>S.nodeType===1&&S.tagName==="TEMPLATE";return[a,l]}function Lb(e,t,i,n,r){let s,c,u,o;if(t==="class")u=e.getAttribute("class"),o=Ue(i),Rb(sh(u||""),sh(o))||(s=2,c="class");else if(t==="style"){u=e.getAttribute("style")||"",o=qe(i)?i:Ty(dt(i));const h=oh(u),a=oh(o);if(n.dirs)for(const{dir:l,value:f}of n.dirs)l.name==="show"&&!f&&a.set("display","none");r&&Hp(r,n,a),Ib(h,a)||(s=3,c="style")}else(e instanceof SVGElement&&Ey(t)||e instanceof HTMLElement&&(qu(t)||My(t)))&&(qu(t)?(u=e.hasAttribute(t),o=Oc(i)):i==null?(u=e.hasAttribute(t),o=!1):(e.hasAttribute(t)?u=e.getAttribute(t):t==="value"&&e.tagName==="TEXTAREA"?u=e.value:u=!1,o=ky(i)?String(i):!1),u!==o&&(s=4,c=t));if(s!=null&&!gs(e,s)){const h=f=>f===!1?"(not rendered)":`${c}="${f}"`,a=`Hydration ${Up[s]} mismatch on`,l=`
  - rendered on server: ${h(u)}
  - expected on client: ${h(o)}
  Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead.
  You should fix the source of the mismatch.`;return mn(a,e,l),!0}return!1}function sh(e){return new Set(e.trim().split(/\s+/))}function Rb(e,t){if(e.size!==t.size)return!1;for(const i of e)if(!t.has(i))return!1;return!0}function oh(e){const t=new Map;for(const i of e.split(";")){let[n,r]=i.split(":");n=n.trim(),r=r&&r.trim(),n&&r&&t.set(n,r)}return t}function Ib(e,t){if(e.size!==t.size)return!1;for(const[i,n]of e)if(n!==t.get(i))return!1;return!0}function Hp(e,t,i){const n=e.subTree;if(e.getCssVars&&(t===n||n&&n.type===Oe&&n.children.includes(t))){const r=e.getCssVars();for(const s in r)i.set(`--${Ly(s,!1)}`,String(r[s]))}t===n&&e.parent&&Hp(e.parent,e.vnode,i)}const ah="data-allow-mismatch",Up={[0]:"text",[1]:"children",[2]:"class",[3]:"style",[4]:"attribute"};function gs(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute(ah);)e=e.parentElement;const i=e&&e.getAttribute(ah);if(i==null)return!1;if(i==="")return!0;{const n=i.split(",");return t===0&&n.includes("children")?!0:i.split(",").includes(Up[t])}}const O3=(e=1e4)=>t=>{const i=requestIdleCallback(t,{timeout:e});return()=>cancelIdleCallback(i)};function Ob(e){const{top:t,left:i,bottom:n,right:r}=e.getBoundingClientRect(),{innerHeight:s,innerWidth:c}=window;return(t>0&&t<s||n>0&&n<s)&&(i>0&&i<c||r>0&&r<c)}const N3=e=>(t,i)=>{const n=new IntersectionObserver(r=>{for(const s of r)if(!!s.isIntersecting){n.disconnect(),t();break}},e);return i(r=>{if(r instanceof Element){if(Ob(r))return t(),n.disconnect(),!1;n.observe(r)}}),()=>n.disconnect()},D3=e=>t=>{if(e){const i=matchMedia(e);if(i.matches)t();else return i.addEventListener("change",t,{once:!0}),()=>i.removeEventListener("change",t)}},F3=(e=[])=>(t,i)=>{qe(e)&&(e=[e]);let n=!1;const r=c=>{n||(n=!0,s(),t(),c.target.dispatchEvent(new c.constructor(c.type,c)))},s=()=>{i(c=>{for(const u of e)c.removeEventListener(u,r)})};return i(c=>{for(const u of e)c.addEventListener(u,r,{once:!0})}),s};function Nb(e,t){if(jn(e)&&e.data==="["){let i=1,n=e.nextSibling;for(;n;){if(n.nodeType===1){if(t(n)===!1)break}else if(jn(n))if(n.data==="]"){if(--i===0)break}else n.data==="["&&i++;n=n.nextSibling}}else t(e)}const $n=e=>!!e.type.__asyncLoader;/*! #__NO_SIDE_EFFECTS__ */function B3(e){Te(e)&&(e={loader:e});const{loader:t,loadingComponent:i,errorComponent:n,delay:r=200,hydrate:s,timeout:c,suspensible:u=!0,onError:o}=e;let h=null,a,l=0;const f=()=>(l++,h=null,d()),d=()=>{let p;return h||(p=h=t().catch(g=>{if(g=g instanceof Error?g:new Error(String(g)),o)return new Promise((m,v)=>{o(g,()=>m(f()),()=>v(g),l+1)});throw g}).then(g=>p!==h&&h?h:(g&&(g.__esModule||g[Symbol.toStringTag]==="Module")&&(g=g.default),a=g,g)))};return ar({name:"AsyncComponentWrapper",__asyncLoader:d,__asyncHydrate(p,g,m){const v=s?()=>{const y=s(m,S=>Nb(p,S));y&&(g.bum||(g.bum=[])).push(y)}:m;a?v():d().then(()=>!g.isUnmounted&&v())},get __asyncResolved(){return a},setup(){const p=mt;if(Gc(p),a)return()=>el(a,p);const g=S=>{h=null,Qr(S,p,13,!n)};if(u&&p.suspense||Qs)return d().then(S=>()=>el(S,p)).catch(S=>(g(S),()=>n?ve(n,{error:S}):null));const m=oi(!1),v=oi(),y=oi(!!r);return r&&setTimeout(()=>{y.value=!1},r),c!=null&&setTimeout(()=>{if(!m.value&&!v.value){const S=new Error(`Async component timed out after ${c}ms.`);g(S),v.value=S}},c),d().then(()=>{m.value=!0,p.parent&&Ks(p.parent.vnode)&&p.parent.update()}).catch(S=>{g(S),v.value=S}),()=>{if(m.value&&a)return el(a,p);if(v.value&&n)return ve(n,{error:v.value});if(i&&!y.value)return ve(i)}}})}function el(e,t){const{ref:i,props:n,children:r,ce:s}=t.vnode,c=ve(e,n,r);return c.ref=i,c.ce=s,delete t.vnode.ce,c}const Ks=e=>e.type.__isKeepAlive,Db={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const i=Ot(),n=i.ctx;if(!n.renderer)return()=>{const y=t.default&&t.default();return y&&y.length===1?y[0]:y};const r=new Map,s=new Set;let c=null;const u=i.suspense,{renderer:{p:o,m:h,um:a,o:{createElement:l}}}=n,f=l("div");n.activate=(y,S,b,_,w)=>{const E=y.component;h(y,S,b,0,u),o(E.vnode,y,S,b,E,u,_,y.slotScopeIds,w),_t(()=>{E.isDeactivated=!1,E.a&&Ir(E.a);const T=y.props&&y.props.onVnodeMounted;T&&Yt(T,E.parent,y)},u)},n.deactivate=y=>{const S=y.component;ea(S.m),ea(S.a),h(y,f,null,1,u),_t(()=>{S.da&&Ir(S.da);const b=y.props&&y.props.onVnodeUnmounted;b&&Yt(b,S.parent,y),S.isDeactivated=!0},u)};function d(y){tl(y),a(y,i,u,!0)}function p(y){r.forEach((S,b)=>{const _=sa(S.type);_&&!y(_)&&g(b)})}function g(y){const S=r.get(y);S&&(!c||!vi(S,c))?d(S):c&&tl(c),r.delete(y),s.delete(y)}wi(()=>[e.include,e.exclude],([y,S])=>{y&&p(b=>ms(y,b)),S&&p(b=>!ms(S,b))},{flush:"post",deep:!0});let m=null;const v=()=>{m!=null&&(ta(i.subTree.type)?_t(()=>{r.set(m,_o(i.subTree))},i.subTree.suspense):r.set(m,_o(i.subTree)))};return Ys(v),Kc(v),Yc(()=>{r.forEach(y=>{const{subTree:S,suspense:b}=i,_=_o(S);if(y.type===_.type&&y.key===_.key){tl(_);const w=_.component.da;w&&_t(w,b);return}d(y)})}),()=>{if(m=null,!t.default)return c=null;const y=t.default(),S=y[0];if(y.length>1)return c=null,y;if(!Jn(S)||!(S.shapeFlag&4)&&!(S.shapeFlag&128))return c=null,S;let b=_o(S);if(b.type===gt)return c=null,b;const _=b.type,w=sa($n(b)?b.type.__asyncResolved||{}:_),{include:E,exclude:T,max:$}=e;if(E&&(!w||!ms(E,w))||T&&w&&ms(T,w))return b.shapeFlag&=-257,c=b,S;const C=b.key==null?_:b.key,x=r.get(C);return b.el&&(b=nn(b),S.shapeFlag&128&&(S.ssContent=b)),m=C,x?(b.el=x.el,b.component=x.component,b.transition&&Pn(b,b.transition),b.shapeFlag|=512,s.delete(C),s.add(C)):(s.add(C),$&&s.size>parseInt($,10)&&g(s.values().next().value)),b.shapeFlag|=256,c=b,ta(S.type)?S:b}}},V3=Db;function ms(e,t){return we(e)?e.some(i=>ms(i,t)):qe(e)?e.split(",").includes(t):my(e)?(e.lastIndex=0,e.test(t)):!1}function Fb(e,t){Wp(e,"a",t)}function Bb(e,t){Wp(e,"da",t)}function Wp(e,t,i=mt){const n=e.__wdc||(e.__wdc=()=>{let r=i;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(ka(t,n,i),i){let r=i.parent;for(;r&&r.parent;)Ks(r.parent.vnode)&&Vb(n,t,i,r),r=r.parent}}function Vb(e,t,i,n){const r=ka(t,e,n,!0);Pa(()=>{Pc(n[t],r)},i)}function tl(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function _o(e){return e.shapeFlag&128?e.ssContent:e}function ka(e,t,i=mt,n=!1){if(i){const r=i[e]||(i[e]=[]),s=t.__weh||(t.__weh=(...c)=>{sn();const u=Zn(i),o=Ai(t,i,e,c);return u(),on(),o});return n?r.unshift(s):r.push(s),s}}const an=e=>(t,i=mt)=>{(!Qs||e==="sp")&&ka(e,(...n)=>t(...n),i)},qc=an("bm"),Ys=an("m"),zb=an("bu"),Kc=an("u"),Yc=an("bum"),Pa=an("um"),Hb=an("sp"),Ub=an("rtg"),Wb=an("rtc");function jb(e,t=mt){ka("ec",e,t)}const Xc="components",Gb="directives";function Ae(e,t){return Jc(Xc,e,!0,t)||e}const jp=Symbol.for("v-ndc");function Qc(e){return qe(e)?Jc(Xc,e,!1)||e:e||jp}function Gp(e){return Jc(Gb,e)}function Jc(e,t,i=!0,n=!1){const r=yt||mt;if(r){const s=r.type;if(e===Xc){const u=sa(s,!1);if(u&&(u===t||u===Wt(t)||u===_a(Wt(t))))return s}const c=lh(r[e]||s[e],t)||lh(r.appContext[e],t);return!c&&n?s:c}}function lh(e,t){return e&&(e[t]||e[Wt(t)]||e[_a(Wt(t))])}function lr(e,t,i,n){let r;const s=i&&i[n],c=we(e);if(c||qe(e)){const u=c&&en(e);let o=!1;u&&(o=!pi(e),e=Ca(e)),r=new Array(e.length);for(let h=0,a=e.length;h<a;h++)r[h]=t(o?Lt(e[h]):e[h],h,void 0,s&&s[h])}else if(typeof e=="number"){r=new Array(e);for(let u=0;u<e;u++)r[u]=t(u+1,u,void 0,s&&s[u])}else if(Xe(e))if(e[Symbol.iterator])r=Array.from(e,(u,o)=>t(u,o,void 0,s&&s[o]));else{const u=Object.keys(e);r=new Array(u.length);for(let o=0,h=u.length;o<h;o++){const a=u[o];r[o]=t(e[a],a,o,s&&s[o])}}else r=[];return i&&(i[n]=r),r}function z3(e,t){for(let i=0;i<t.length;i++){const n=t[i];if(we(n))for(let r=0;r<n.length;r++)e[n[r].name]=n[r].fn;else n&&(e[n.name]=n.key?(...r)=>{const s=n.fn(...r);return s&&(s.key=n.key),s}:n.fn)}return e}function ft(e,t,i={},n,r){if(yt.ce||yt.parent&&$n(yt.parent)&&yt.parent.ce)return t!=="default"&&(i.name=t),ee(),Se(Oe,null,[ve("slot",i,n&&n())],64);let s=e[t];s&&s._c&&(s._d=!1),ee();const c=s&&Zc(s(i)),u=Se(Oe,{key:(i.key||c&&c.key||`_${t}`)+(!c&&n?"_fb":"")},c||(n?n():[]),c&&e._===1?64:-2);return!r&&u.scopeId&&(u.slotScopeIds=[u.scopeId+"-s"]),s&&s._c&&(s._d=!0),u}function Zc(e){return e.some(t=>Jn(t)?!(t.type===gt||t.type===Oe&&!Zc(t.children)):!0)?e:null}function mi(e,t){const i={};for(const n in e)i[t&&/[A-Z]/.test(n)?`on:${n}`:Io(n)]=e[n];return i}const jl=e=>e?vg(e)?Js(e):jl(e.parent):null,As=et(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=>jl(e.parent),$root:e=>jl(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>eu(e),$forceUpdate:e=>e.f||(e.f=()=>{Wc(e.update)}),$nextTick:e=>e.n||(e.n=tn.bind(e.proxy)),$watch:e=>m0.bind(e)}),il=(e,t)=>e!==Ve&&!e.__isScriptSetup&&ze(e,t),Gl={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:i,setupState:n,data:r,props:s,accessCache:c,type:u,appContext:o}=e;let h;if(t[0]!=="$"){const d=c[t];if(d!==void 0)switch(d){case 1:return n[t];case 2:return r[t];case 4:return i[t];case 3:return s[t]}else{if(il(n,t))return c[t]=1,n[t];if(r!==Ve&&ze(r,t))return c[t]=2,r[t];if((h=e.propsOptions[0])&&ze(h,t))return c[t]=3,s[t];if(i!==Ve&&ze(i,t))return c[t]=4,i[t];ql&&(c[t]=0)}}const a=As[t];let l,f;if(a)return t==="$attrs"&&It(e.attrs,"get",""),a(e);if((l=u.__cssModules)&&(l=l[t]))return l;if(i!==Ve&&ze(i,t))return c[t]=4,i[t];if(f=o.config.globalProperties,ze(f,t))return f[t]},set({_:e},t,i){const{data:n,setupState:r,ctx:s}=e;return il(r,t)?(r[t]=i,!0):n!==Ve&&ze(n,t)?(n[t]=i,!0):ze(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(s[t]=i,!0)},has({_:{data:e,setupState:t,accessCache:i,ctx:n,appContext:r,propsOptions:s}},c){let u;return!!i[c]||e!==Ve&&ze(e,c)||il(t,c)||(u=s[0])&&ze(u,c)||ze(n,c)||ze(As,c)||ze(r.config.globalProperties,c)},defineProperty(e,t,i){return i.get!=null?e._.accessCache[t]=0:ze(i,"value")&&this.set(e,t,i.value,null),Reflect.defineProperty(e,t,i)}},qb=et({},Gl,{get(e,t){if(t!==Symbol.unscopables)return Gl.get(e,t,e)},has(e,t){return t[0]!=="_"&&!wy(t)}});function H3(){return null}function U3(){return null}function W3(e){}function j3(e){}function G3(){return null}function q3(){}function K3(e,t){return null}function Y3(){return qp().slots}function X3(){return qp().attrs}function qp(){const e=Ot();return e.setupContext||(e.setupContext=_g(e))}function Ds(e){return we(e)?e.reduce((t,i)=>(t[i]=null,t),{}):e}function Q3(e,t){const i=Ds(e);for(const n in t){if(n.startsWith("__skip"))continue;let r=i[n];r?we(r)||Te(r)?r=i[n]={type:r,default:t[n]}:r.default=t[n]:r===null&&(r=i[n]={default:t[n]}),r&&t[`__skip_${n}`]&&(r.skipFactory=!0)}return i}function J3(e,t){return!e||!t?e||t:we(e)&&we(t)?e.concat(t):et({},Ds(e),Ds(t))}function Z3(e,t){const i={};for(const n in e)t.includes(n)||Object.defineProperty(i,n,{enumerable:!0,get:()=>e[n]});return i}function eB(e){const t=Ot();let i=e();return Jl(),Lc(i)&&(i=i.catch(n=>{throw Zn(t),n})),[i,()=>Zn(t)]}let ql=!0;function Kb(e){const t=eu(e),i=e.proxy,n=e.ctx;ql=!1,t.beforeCreate&&ch(t.beforeCreate,e,"bc");const{data:r,computed:s,methods:c,watch:u,provide:o,inject:h,created:a,beforeMount:l,mounted:f,beforeUpdate:d,updated:p,activated:g,deactivated:m,beforeDestroy:v,beforeUnmount:y,destroyed:S,unmounted:b,render:_,renderTracked:w,renderTriggered:E,errorCaptured:T,serverPrefetch:$,expose:C,inheritAttrs:x,components:L,directives:M,filters:A}=t;if(h&&Yb(h,n,null),c)for(const O in c){const N=c[O];Te(N)&&(n[O]=N.bind(i))}if(r){const O=r.call(i,i);Xe(O)&&(e.data=sr(O))}if(ql=!0,s)for(const O in s){const N=s[O],D=Te(N)?N.bind(i,i):Te(N.get)?N.get.bind(i,i):fi,B=!Te(N)&&Te(N.set)?N.set.bind(i):fi,U=ot({get:D,set:B});Object.defineProperty(n,O,{enumerable:!0,configurable:!0,get:()=>U.value,set:q=>U.value=q})}if(u)for(const O in u)Kp(u[O],n,i,O);if(o){const O=Te(o)?o.call(i):o;Reflect.ownKeys(O).forEach(N=>{No(N,O[N])})}a&&ch(a,e,"c");function P(O,N){we(N)?N.forEach(D=>O(D.bind(i))):N&&O(N.bind(i))}if(P(qc,l),P(Ys,f),P(zb,d),P(Kc,p),P(Fb,g),P(Bb,m),P(jb,T),P(Wb,w),P(Ub,E),P(Yc,y),P(Pa,b),P(Hb,$),we(C))if(C.length){const O=e.exposed||(e.exposed={});C.forEach(N=>{Object.defineProperty(O,N,{get:()=>i[N],set:D=>i[N]=D})})}else e.exposed||(e.exposed={});_&&e.render===fi&&(e.render=_),x!=null&&(e.inheritAttrs=x),L&&(e.components=L),M&&(e.directives=M),$&&Gc(e)}function Yb(e,t,i=fi){we(e)&&(e=Kl(e));for(const n in e){const r=e[n];let s;Xe(r)?"default"in r?s=Qt(r.from||n,r.default,!0):s=Qt(r.from||n):s=Qt(r),at(s)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>s.value,set:c=>s.value=c}):t[n]=s}}function ch(e,t,i){Ai(we(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,i)}function Kp(e,t,i,n){let r=n.includes(".")?lg(i,n):()=>i[n];if(qe(e)){const s=t[e];Te(s)&&wi(r,s)}else if(Te(e))wi(r,e.bind(i));else if(Xe(e))if(we(e))e.forEach(s=>Kp(s,t,i,n));else{const s=Te(e.handler)?e.handler.bind(i):t[e.handler];Te(s)&&wi(r,s,e)}}function eu(e){const t=e.type,{mixins:i,extends:n}=t,{mixins:r,optionsCache:s,config:{optionMergeStrategies:c}}=e.appContext,u=s.get(t);let o;return u?o=u:!r.length&&!i&&!n?o=t:(o={},r.length&&r.forEach(h=>Zo(o,h,c,!0)),Zo(o,t,c)),Xe(t)&&s.set(t,o),o}function Zo(e,t,i,n=!1){const{mixins:r,extends:s}=t;s&&Zo(e,s,i,!0),r&&r.forEach(c=>Zo(e,c,i,!0));for(const c in t)if(!(n&&c==="expose")){const u=Xb[c]||i&&i[c];e[c]=u?u(e[c],t[c]):t[c]}return e}const Xb={data:uh,props:hh,emits:hh,methods:vs,computed:vs,beforeCreate:Nt,created:Nt,beforeMount:Nt,mounted:Nt,beforeUpdate:Nt,updated:Nt,beforeDestroy:Nt,beforeUnmount:Nt,destroyed:Nt,unmounted:Nt,activated:Nt,deactivated:Nt,errorCaptured:Nt,serverPrefetch:Nt,components:vs,directives:vs,watch:Jb,provide:uh,inject:Qb};function uh(e,t){return t?e?function(){return et(Te(e)?e.call(this,this):e,Te(t)?t.call(this,this):t)}:t:e}function Qb(e,t){return vs(Kl(e),Kl(t))}function Kl(e){if(we(e)){const t={};for(let i=0;i<e.length;i++)t[e[i]]=e[i];return t}return e}function Nt(e,t){return e?[...new Set([].concat(e,t))]:t}function vs(e,t){return e?et(Object.create(null),e,t):t}function hh(e,t){return e?we(e)&&we(t)?[...new Set([...e,...t])]:et(Object.create(null),Ds(e),Ds(t!=null?t:{})):t}function Jb(e,t){if(!e)return t;if(!t)return e;const i=et(Object.create(null),e);for(const n in t)i[n]=Nt(e[n],t[n]);return i}function Yp(){return{app:null,config:{isNativeTag:py,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 Zb=0;function e0(e,t){return function(n,r=null){Te(n)||(n=et({},n)),r!=null&&!Xe(r)&&(r=null);const s=Yp(),c=new WeakSet,u=[];let o=!1;const h=s.app={_uid:Zb++,_component:n,_props:r,_container:null,_context:s,_instance:null,version:D0,get config(){return s.config},set config(a){},use(a,...l){return c.has(a)||(a&&Te(a.install)?(c.add(a),a.install(h,...l)):Te(a)&&(c.add(a),a(h,...l))),h},mixin(a){return s.mixins.includes(a)||s.mixins.push(a),h},component(a,l){return l?(s.components[a]=l,h):s.components[a]},directive(a,l){return l?(s.directives[a]=l,h):s.directives[a]},mount(a,l,f){if(!o){const d=h._ceVNode||ve(n,r);return d.appContext=s,f===!0?f="svg":f===!1&&(f=void 0),l&&t?t(d,a):e(d,a,f),o=!0,h._container=a,a.__vue_app__=h,Js(d.component)}},onUnmount(a){u.push(a)},unmount(){o&&(Ai(u,h._instance,16),e(null,h._container),delete h._container.__vue_app__)},provide(a,l){return s.provides[a]=l,h},runWithContext(a){const l=Yn;Yn=h;try{return a()}finally{Yn=l}}};return h}}let Yn=null;function No(e,t){if(mt){let i=mt.provides;const n=mt.parent&&mt.parent.provides;n===i&&(i=mt.provides=Object.create(n)),i[e]=t}}function Qt(e,t,i=!1){const n=mt||yt;if(n||Yn){const r=Yn?Yn._context.provides:n?n.parent==null?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides:void 0;if(r&&e in r)return r[e];if(arguments.length>1)return i&&Te(t)?t.call(n&&n.proxy):t}}function t0(){return!!(mt||yt||Yn)}const Xp={},Qp=()=>Object.create(Xp),Jp=e=>Object.getPrototypeOf(e)===Xp;function i0(e,t,i,n=!1){const r={},s=Qp();e.propsDefaults=Object.create(null),Zp(e,t,r,s);for(const c in e.propsOptions[0])c in r||(r[c]=void 0);i?e.props=n?r:nb(r):e.type.props?e.props=r:e.props=s,e.attrs=s}function n0(e,t,i,n){const{props:r,attrs:s,vnode:{patchFlag:c}}=e,u=Fe(r),[o]=e.propsOptions;let h=!1;if((n||c>0)&&!(c&16)){if(c&8){const a=e.vnode.dynamicProps;for(let l=0;l<a.length;l++){let f=a[l];if(La(e.emitsOptions,f))continue;const d=t[f];if(o)if(ze(s,f))d!==s[f]&&(s[f]=d,h=!0);else{const p=Wt(f);r[p]=Yl(o,u,p,d,e,!1)}else d!==s[f]&&(s[f]=d,h=!0)}}}else{Zp(e,t,r,s)&&(h=!0);let a;for(const l in u)(!t||!ze(t,l)&&((a=Ht(l))===l||!ze(t,a)))&&(o?i&&(i[l]!==void 0||i[a]!==void 0)&&(r[l]=Yl(o,u,l,void 0,e,!0)):delete r[l]);if(s!==u)for(const l in s)(!t||!ze(t,l)&&!0)&&(delete s[l],h=!0)}h&&Zi(e.attrs,"set","")}function Zp(e,t,i,n){const[r,s]=e.propsOptions;let c=!1,u;if(t)for(let o in t){if(Rr(o))continue;const h=t[o];let a;r&&ze(r,a=Wt(o))?!s||!s.includes(a)?i[a]=h:(u||(u={}))[a]=h:La(e.emitsOptions,o)||(!(o in n)||h!==n[o])&&(n[o]=h,c=!0)}if(s){const o=Fe(i),h=u||Ve;for(let a=0;a<s.length;a++){const l=s[a];i[l]=Yl(r,o,l,h[l],e,!ze(h,l))}}return c}function Yl(e,t,i,n,r,s){const c=e[i];if(c!=null){const u=ze(c,"default");if(u&&n===void 0){const o=c.default;if(c.type!==Function&&!c.skipFactory&&Te(o)){const{propsDefaults:h}=r;if(i in h)n=h[i];else{const a=Zn(r);n=h[i]=o.call(null,t),a()}}else n=o;r.ce&&r.ce._setProp(i,n)}c[0]&&(s&&!u?n=!1:c[1]&&(n===""||n===Ht(i))&&(n=!0))}return n}const r0=new WeakMap;function eg(e,t,i=!1){const n=i?r0:t.propsCache,r=n.get(e);if(r)return r;const s=e.props,c={},u=[];let o=!1;if(!Te(e)){const a=l=>{o=!0;const[f,d]=eg(l,t,!0);et(c,f),d&&u.push(...d)};!i&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}if(!s&&!o)return Xe(e)&&n.set(e,Pr),Pr;if(we(s))for(let a=0;a<s.length;a++){const l=Wt(s[a]);dh(l)&&(c[l]=Ve)}else if(s)for(const a in s){const l=Wt(a);if(dh(l)){const f=s[a],d=c[l]=we(f)||Te(f)?{type:f}:et({},f),p=d.type;let g=!1,m=!0;if(we(p))for(let v=0;v<p.length;++v){const y=p[v],S=Te(y)&&y.name;if(S==="Boolean"){g=!0;break}else S==="String"&&(m=!1)}else g=Te(p)&&p.name==="Boolean";d[0]=g,d[1]=m,(g||ze(d,"default"))&&u.push(l)}}const h=[c,u];return Xe(e)&&n.set(e,h),h}function dh(e){return e[0]!=="$"&&!Rr(e)}const tg=e=>e[0]==="_"||e==="$stable",tu=e=>we(e)?e.map(Xt):[Xt(e)],s0=(e,t,i)=>{if(t._n)return t;const n=De((...r)=>tu(t(...r)),i);return n._c=!1,n},ig=(e,t,i)=>{const n=e._ctx;for(const r in e){if(tg(r))continue;const s=e[r];if(Te(s))t[r]=s0(r,s,n);else if(s!=null){const c=tu(s);t[r]=()=>c}}},ng=(e,t)=>{const i=tu(t);e.slots.default=()=>i},rg=(e,t,i)=>{for(const n in t)(i||n!=="_")&&(e[n]=t[n])},o0=(e,t,i)=>{const n=e.slots=Qp();if(e.vnode.shapeFlag&32){const r=t._;r?(rg(n,t,i),i&&rp(n,"_",r,!0)):ig(t,n)}else t&&ng(e,t)},a0=(e,t,i)=>{const{vnode:n,slots:r}=e;let s=!0,c=Ve;if(n.shapeFlag&32){const u=t._;u?i&&u===1?s=!1:rg(r,t,i):(s=!t.$stable,ig(t,r)),c=t}else t&&(ng(e,t),c={default:1});if(s)for(const u in r)!tg(u)&&c[u]==null&&delete r[u]};function l0(){typeof __VUE_PROD_HYDRATION_MISMATCH_DETAILS__!="boolean"&&(Ic().__VUE_PROD_HYDRATION_MISMATCH_DETAILS__=!1)}const _t=dg;function c0(e){return sg(e)}function u0(e){return sg(e,Pb)}function sg(e,t){l0();const i=Ic();i.__VUE__=!0;const{insert:n,remove:r,patchProp:s,createElement:c,createText:u,createComment:o,setText:h,setElementText:a,parentNode:l,nextSibling:f,setScopeId:d=fi,insertStaticContent:p}=e,g=(I,R,F,G=null,X=null,re=null,he=void 0,le=null,fe=!!R.dynamicChildren)=>{if(I===R)return;I&&!vi(I,R)&&(G=W(I),q(I,X,re,!0),I=null),R.patchFlag===-2&&(fe=!1,R.dynamicChildren=null);const{type:oe,ref:Z,shapeFlag:te}=R;switch(oe){case Mn:m(I,R,F,G);break;case gt:v(I,R,F,G);break;case Dr:I==null&&y(R,F,G,he);break;case Oe:L(I,R,F,G,X,re,he,le,fe);break;default:te&1?_(I,R,F,G,X,re,he,le,fe):te&6?M(I,R,F,G,X,re,he,le,fe):(te&64||te&128)&&oe.process(I,R,F,G,X,re,he,le,fe,ne)}Z!=null&&X&&Jo(Z,I&&I.ref,re,R||I,!R)},m=(I,R,F,G)=>{if(I==null)n(R.el=u(R.children),F,G);else{const X=R.el=I.el;R.children!==I.children&&h(X,R.children)}},v=(I,R,F,G)=>{I==null?n(R.el=o(R.children||""),F,G):R.el=I.el},y=(I,R,F,G)=>{[I.el,I.anchor]=p(I.children,R,F,G,I.el,I.anchor)},S=({el:I,anchor:R},F,G)=>{let X;for(;I&&I!==R;)X=f(I),n(I,F,G),I=X;n(R,F,G)},b=({el:I,anchor:R})=>{let F;for(;I&&I!==R;)F=f(I),r(I),I=F;r(R)},_=(I,R,F,G,X,re,he,le,fe)=>{R.type==="svg"?he="svg":R.type==="math"&&(he="mathml"),I==null?w(R,F,G,X,re,he,le,fe):$(I,R,X,re,he,le,fe)},w=(I,R,F,G,X,re,he,le)=>{let fe,oe;const{props:Z,shapeFlag:te,transition:z,dirs:J}=I;if(fe=I.el=c(I.type,re,Z&&Z.is,Z),te&8?a(fe,I.children):te&16&&T(I.children,fe,null,G,X,nl(I,re),he,le),J&&Ri(I,null,G,"created"),E(fe,I,I.scopeId,he,G),Z){for(const ge in Z)ge!=="value"&&!Rr(ge)&&s(fe,ge,null,Z[ge],re,G);"value"in Z&&s(fe,"value",null,Z.value,re),(oe=Z.onVnodeBeforeMount)&&Yt(oe,G,I)}J&&Ri(I,null,G,"beforeMount");const ue=og(X,z);ue&&z.beforeEnter(fe),n(fe,R,F),((oe=Z&&Z.onVnodeMounted)||ue||J)&&_t(()=>{oe&&Yt(oe,G,I),ue&&z.enter(fe),J&&Ri(I,null,G,"mounted")},X)},E=(I,R,F,G,X)=>{if(F&&d(I,F),G)for(let re=0;re<G.length;re++)d(I,G[re]);if(X){let re=X.subTree;if(R===re||ta(re.type)&&(re.ssContent===R||re.ssFallback===R)){const he=X.vnode;E(I,he,he.scopeId,he.slotScopeIds,X.parent)}}},T=(I,R,F,G,X,re,he,le,fe=0)=>{for(let oe=fe;oe<I.length;oe++){const Z=I[oe]=le?Sn(I[oe]):Xt(I[oe]);g(null,Z,R,F,G,X,re,he,le)}},$=(I,R,F,G,X,re,he)=>{const le=R.el=I.el;let{patchFlag:fe,dynamicChildren:oe,dirs:Z}=R;fe|=I.patchFlag&16;const te=I.props||Ve,z=R.props||Ve;let J;if(F&&Bn(F,!1),(J=z.onVnodeBeforeUpdate)&&Yt(J,F,R,I),Z&&Ri(R,I,F,"beforeUpdate"),F&&Bn(F,!0),(te.innerHTML&&z.innerHTML==null||te.textContent&&z.textContent==null)&&a(le,""),oe?C(I.dynamicChildren,oe,le,F,G,nl(R,X),re):he||N(I,R,le,null,F,G,nl(R,X),re,!1),fe>0){if(fe&16)x(le,te,z,F,X);else if(fe&2&&te.class!==z.class&&s(le,"class",null,z.class,X),fe&4&&s(le,"style",te.style,z.style,X),fe&8){const ue=R.dynamicProps;for(let ge=0;ge<ue.length;ge++){const Ce=ue[ge],Ie=te[Ce],Me=z[Ce];(Me!==Ie||Ce==="value")&&s(le,Ce,Ie,Me,X,F)}}fe&1&&I.children!==R.children&&a(le,R.children)}else!he&&oe==null&&x(le,te,z,F,X);((J=z.onVnodeUpdated)||Z)&&_t(()=>{J&&Yt(J,F,R,I),Z&&Ri(R,I,F,"updated")},G)},C=(I,R,F,G,X,re,he)=>{for(let le=0;le<R.length;le++){const fe=I[le],oe=R[le],Z=fe.el&&(fe.type===Oe||!vi(fe,oe)||fe.shapeFlag&70)?l(fe.el):F;g(fe,oe,Z,null,G,X,re,he,!0)}},x=(I,R,F,G,X)=>{if(R!==F){if(R!==Ve)for(const re in R)!Rr(re)&&!(re in F)&&s(I,re,R[re],null,X,G);for(const re in F){if(Rr(re))continue;const he=F[re],le=R[re];he!==le&&re!=="value"&&s(I,re,le,he,X,G)}"value"in F&&s(I,"value",R.value,F.value,X)}},L=(I,R,F,G,X,re,he,le,fe)=>{const oe=R.el=I?I.el:u(""),Z=R.anchor=I?I.anchor:u("");let{patchFlag:te,dynamicChildren:z,slotScopeIds:J}=R;J&&(le=le?le.concat(J):J),I==null?(n(oe,F,G),n(Z,F,G),T(R.children||[],F,Z,X,re,he,le,fe)):te>0&&te&64&&z&&I.dynamicChildren?(C(I.dynamicChildren,z,F,X,re,he,le),(R.key!=null||X&&R===X.subTree)&&iu(I,R,!0)):N(I,R,F,Z,X,re,he,le,fe)},M=(I,R,F,G,X,re,he,le,fe)=>{R.slotScopeIds=le,I==null?R.shapeFlag&512?X.ctx.activate(R,F,G,he,fe):A(R,F,G,X,re,he,fe):k(I,R,fe)},A=(I,R,F,G,X,re,he)=>{const le=I.component=mg(I,G,X);if(Ks(I)&&(le.ctx.renderer=ne),yg(le,!1,he),le.asyncDep){if(X&&X.registerDep(le,P,he),!I.el){const fe=le.subTree=ve(gt);v(null,fe,R,F)}}else P(le,I,R,F,X,re,he)},k=(I,R,F)=>{const G=R.component=I.component;if(w0(I,R,F))if(G.asyncDep&&!G.asyncResolved){O(G,R,F);return}else G.next=R,G.update();else R.el=I.el,G.vnode=R},P=(I,R,F,G,X,re,he)=>{const le=()=>{if(I.isMounted){let{next:te,bu:z,u:J,parent:ue,vnode:ge}=I;{const tt=ag(I);if(tt){te&&(te.el=ge.el,O(I,te,he)),tt.asyncDep.then(()=>{I.isUnmounted||le()});return}}let Ce=te,Ie;Bn(I,!1),te?(te.el=ge.el,O(I,te,he)):te=ge,z&&Ir(z),(Ie=te.props&&te.props.onVnodeBeforeUpdate)&&Yt(Ie,ue,te,ge),Bn(I,!0);const Me=Do(I),Re=I.subTree;I.subTree=Me,g(Re,Me,l(Re.el),W(Re),I,X,re),te.el=Me.el,Ce===null&&nu(I,Me.el),J&&_t(J,X),(Ie=te.props&&te.props.onVnodeUpdated)&&_t(()=>Yt(Ie,ue,te,ge),X)}else{let te;const{el:z,props:J}=R,{bm:ue,m:ge,parent:Ce,root:Ie,type:Me}=I,Re=$n(R);if(Bn(I,!1),ue&&Ir(ue),!Re&&(te=J&&J.onVnodeBeforeMount)&&Yt(te,Ce,R),Bn(I,!0),z&&_e){const tt=()=>{I.subTree=Do(I),_e(z,I.subTree,I,X,null)};Re&&Me.__asyncHydrate?Me.__asyncHydrate(z,I,tt):tt()}else{Ie.ce&&Ie.ce._injectChildStyle(Me);const tt=I.subTree=Do(I);g(null,tt,F,G,I,X,re),R.el=tt.el}if(ge&&_t(ge,X),!Re&&(te=J&&J.onVnodeMounted)){const tt=R;_t(()=>Yt(te,Ce,tt),X)}(R.shapeFlag&256||Ce&&$n(Ce.vnode)&&Ce.vnode.shapeFlag&256)&&I.a&&_t(I.a,X),I.isMounted=!0,R=F=G=null}};I.scope.on();const fe=I.effect=new Yo(le);I.scope.off();const oe=I.update=fe.run.bind(fe),Z=I.job=fe.runIfDirty.bind(fe);Z.i=I,Z.id=I.uid,fe.scheduler=()=>Wc(Z),Bn(I,!0),oe()},O=(I,R,F)=>{R.component=I;const G=I.vnode.props;I.vnode=R,I.next=null,n0(I,R.props,G,F),a0(I,R.children,F),sn(),eh(I),on()},N=(I,R,F,G,X,re,he,le,fe=!1)=>{const oe=I&&I.children,Z=I?I.shapeFlag:0,te=R.children,{patchFlag:z,shapeFlag:J}=R;if(z>0){if(z&128){B(oe,te,F,G,X,re,he,le,fe);return}else if(z&256){D(oe,te,F,G,X,re,he,le,fe);return}}J&8?(Z&16&&ie(oe,X,re),te!==oe&&a(F,te)):Z&16?J&16?B(oe,te,F,G,X,re,he,le,fe):ie(oe,X,re,!0):(Z&8&&a(F,""),J&16&&T(te,F,G,X,re,he,le,fe))},D=(I,R,F,G,X,re,he,le,fe)=>{I=I||Pr,R=R||Pr;const oe=I.length,Z=R.length,te=Math.min(oe,Z);let z;for(z=0;z<te;z++){const J=R[z]=fe?Sn(R[z]):Xt(R[z]);g(I[z],J,F,null,X,re,he,le,fe)}oe>Z?ie(I,X,re,!0,!1,te):T(R,F,G,X,re,he,le,fe,te)},B=(I,R,F,G,X,re,he,le,fe)=>{let oe=0;const Z=R.length;let te=I.length-1,z=Z-1;for(;oe<=te&&oe<=z;){const J=I[oe],ue=R[oe]=fe?Sn(R[oe]):Xt(R[oe]);if(vi(J,ue))g(J,ue,F,null,X,re,he,le,fe);else break;oe++}for(;oe<=te&&oe<=z;){const J=I[te],ue=R[z]=fe?Sn(R[z]):Xt(R[z]);if(vi(J,ue))g(J,ue,F,null,X,re,he,le,fe);else break;te--,z--}if(oe>te){if(oe<=z){const J=z+1,ue=J<Z?R[J].el:G;for(;oe<=z;)g(null,R[oe]=fe?Sn(R[oe]):Xt(R[oe]),F,ue,X,re,he,le,fe),oe++}}else if(oe>z)for(;oe<=te;)q(I[oe],X,re,!0),oe++;else{const J=oe,ue=oe,ge=new Map;for(oe=ue;oe<=z;oe++){const ii=R[oe]=fe?Sn(R[oe]):Xt(R[oe]);ii.key!=null&&ge.set(ii.key,oe)}let Ce,Ie=0;const Me=z-ue+1;let Re=!1,tt=0;const Ti=new Array(Me);for(oe=0;oe<Me;oe++)Ti[oe]=0;for(oe=J;oe<=te;oe++){const ii=I[oe];if(Ie>=Me){q(ii,X,re,!0);continue}let $i;if(ii.key!=null)$i=ge.get(ii.key);else for(Ce=ue;Ce<=z;Ce++)if(Ti[Ce-ue]===0&&vi(ii,R[Ce])){$i=Ce;break}$i===void 0?q(ii,X,re,!0):(Ti[$i-ue]=oe+1,$i>=tt?tt=$i:Re=!0,g(ii,R[$i],F,null,X,re,he,le,fe),Ie++)}const is=Re?h0(Ti):Pr;for(Ce=is.length-1,oe=Me-1;oe>=0;oe--){const ii=ue+oe,$i=R[ii],Wu=ii+1<Z?R[ii+1].el:G;Ti[oe]===0?g(null,$i,F,Wu,X,re,he,le,fe):Re&&(Ce<0||oe!==is[Ce]?U($i,F,Wu,2):Ce--)}}},U=(I,R,F,G,X=null)=>{const{el:re,type:he,transition:le,children:fe,shapeFlag:oe}=I;if(oe&6){U(I.component.subTree,R,F,G);return}if(oe&128){I.suspense.move(R,F,G);return}if(oe&64){he.move(I,R,F,ne);return}if(he===Oe){n(re,R,F);for(let te=0;te<fe.length;te++)U(fe[te],R,F,G);n(I.anchor,R,F);return}if(he===Dr){S(I,R,F);return}if(G!==2&&oe&1&&le)if(G===0)le.beforeEnter(re),n(re,R,F),_t(()=>le.enter(re),X);else{const{leave:te,delayLeave:z,afterLeave:J}=le,ue=()=>n(re,R,F),ge=()=>{te(re,()=>{ue(),J&&J()})};z?z(re,ue,ge):ge()}else n(re,R,F)},q=(I,R,F,G=!1,X=!1)=>{const{type:re,props:he,ref:le,children:fe,dynamicChildren:oe,shapeFlag:Z,patchFlag:te,dirs:z,cacheIndex:J}=I;if(te===-2&&(X=!1),le!=null&&Jo(le,null,F,I,!0),J!=null&&(R.renderCache[J]=void 0),Z&256){R.ctx.deactivate(I);return}const ue=Z&1&&z,ge=!$n(I);let Ce;if(ge&&(Ce=he&&he.onVnodeBeforeUnmount)&&Yt(Ce,R,I),Z&6)Y(I.component,F,G);else{if(Z&128){I.suspense.unmount(F,G);return}ue&&Ri(I,null,R,"beforeUnmount"),Z&64?I.type.remove(I,R,F,ne,G):oe&&!oe.hasOnce&&(re!==Oe||te>0&&te&64)?ie(oe,R,F,!1,!0):(re===Oe&&te&384||!X&&Z&16)&&ie(fe,R,F),G&&H(I)}(ge&&(Ce=he&&he.onVnodeUnmounted)||ue)&&_t(()=>{Ce&&Yt(Ce,R,I),ue&&Ri(I,null,R,"unmounted")},F)},H=I=>{const{type:R,el:F,anchor:G,transition:X}=I;if(R===Oe){j(F,G);return}if(R===Dr){b(I);return}const re=()=>{r(F),X&&!X.persisted&&X.afterLeave&&X.afterLeave()};if(I.shapeFlag&1&&X&&!X.persisted){const{leave:he,delayLeave:le}=X,fe=()=>he(F,re);le?le(I.el,re,fe):fe()}else re()},j=(I,R)=>{let F;for(;I!==R;)F=f(I),r(I),I=F;r(R)},Y=(I,R,F)=>{const{bum:G,scope:X,job:re,subTree:he,um:le,m:fe,a:oe}=I;ea(fe),ea(oe),G&&Ir(G),X.stop(),re&&(re.flags|=8,q(he,I,R,F)),le&&_t(le,R),_t(()=>{I.isUnmounted=!0},R),R&&R.pendingBranch&&!R.isUnmounted&&I.asyncDep&&!I.asyncResolved&&I.suspenseId===R.pendingId&&(R.deps--,R.deps===0&&R.resolve())},ie=(I,R,F,G=!1,X=!1,re=0)=>{for(let he=re;he<I.length;he++)q(I[he],R,F,G,X)},W=I=>{if(I.shapeFlag&6)return W(I.component.subTree);if(I.shapeFlag&128)return I.suspense.next();const R=f(I.anchor||I.el),F=R&&R[Ip];return F?f(F):R};let K=!1;const Q=(I,R,F)=>{I==null?R._vnode&&q(R._vnode,null,null,!0):g(R._vnode||null,I,R,null,null,null,F),R._vnode=I,K||(K=!0,eh(),Qo(),K=!1)},ne={p:g,um:q,m:U,r:H,mt:A,mc:T,pc:N,pbc:C,n:W,o:e};let de,_e;return t&&([de,_e]=t(ne)),{render:Q,hydrate:de,createApp:e0(Q,de)}}function nl({type:e,props:t},i){return i==="svg"&&e==="foreignObject"||i==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:i}function Bn({effect:e,job:t},i){i?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function og(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function iu(e,t,i=!1){const n=e.children,r=t.children;if(we(n)&&we(r))for(let s=0;s<n.length;s++){const c=n[s];let u=r[s];u.shapeFlag&1&&!u.dynamicChildren&&((u.patchFlag<=0||u.patchFlag===32)&&(u=r[s]=Sn(r[s]),u.el=c.el),!i&&u.patchFlag!==-2&&iu(c,u)),u.type===Mn&&(u.el=c.el)}}function h0(e){const t=e.slice(),i=[0];let n,r,s,c,u;const o=e.length;for(n=0;n<o;n++){const h=e[n];if(h!==0){if(r=i[i.length-1],e[r]<h){t[n]=r,i.push(n);continue}for(s=0,c=i.length-1;s<c;)u=s+c>>1,e[i[u]]<h?s=u+1:c=u;h<e[i[s]]&&(s>0&&(t[n]=i[s-1]),i[s]=n)}}for(s=i.length,c=i[s-1];s-- >0;)i[s]=c,c=t[c];return i}function ag(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:ag(t)}function ea(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}const d0=Symbol.for("v-scx"),f0=()=>Qt(d0);function tB(e,t){return Xs(e,null,t)}function p0(e,t){return Xs(e,null,{flush:"post"})}function g0(e,t){return Xs(e,null,{flush:"sync"})}function wi(e,t,i){return Xs(e,t,i)}function Xs(e,t,i=Ve){const{immediate:n,deep:r,flush:s,once:c}=i,u=et({},i);let o;if(Qs)if(s==="sync"){const f=f0();o=f.__watcherHandles||(f.__watcherHandles=[])}else if(!t||n)u.once=!0;else{const f=()=>{};return f.stop=fi,f.resume=fi,f.pause=fi,f}const h=mt;u.call=(f,d,p)=>Ai(f,h,d,p);let a=!1;s==="post"?u.scheduler=f=>{_t(f,h&&h.suspense)}:s!=="sync"&&(a=!0,u.scheduler=(f,d)=>{d?f():Wc(f)}),u.augmentJob=f=>{t&&(f.flags|=4),a&&(f.flags|=2,h&&(f.id=h.uid,f.i=h))};const l=pb(e,t,u);return o&&o.push(l),l}function m0(e,t,i){const n=this.proxy,r=qe(e)?e.includes(".")?lg(n,e):()=>n[e]:e.bind(n,n);let s;Te(t)?s=t:(s=t.handler,i=t);const c=Zn(this),u=Xs(r,s.bind(n),i);return c(),u}function lg(e,t){const i=t.split(".");return()=>{let n=e;for(let r=0;r<i.length&&n;r++)n=n[i[r]];return n}}function iB(e,t,i=Ve){const n=Ot(),r=Wt(t),s=Ht(t),c=cg(e,t),u=ab((o,h)=>{let a,l=Ve,f;return g0(()=>{const d=e[t];Vt(a,d)&&(a=d,h())}),{get(){return o(),i.get?i.get(a):a},set(d){const p=i.set?i.set(d):d;if(!Vt(p,a)&&!(l!==Ve&&Vt(d,l)))return;const g=n.vnode.props;g&&(t in g||r in g||s in g)&&(`onUpdate:${t}`in g||`onUpdate:${r}`in g||`onUpdate:${s}`in g)||(a=d,h()),n.emit(`update:${t}`,p),Vt(d,p)&&Vt(d,l)&&!Vt(p,f)&&h(),l=d,f=p}}});return u[Symbol.iterator]=()=>{let o=0;return{next(){return o<2?{value:o++?c||Ve:u,done:!1}:{done:!0}}}},u}const cg=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Wt(t)}Modifiers`]||e[`${Ht(t)}Modifiers`];function v0(e,t,...i){if(e.isUnmounted)return;const n=e.vnode.props||Ve;let r=i;const s=t.startsWith("update:"),c=s&&cg(n,t.slice(7));c&&(c.trim&&(r=i.map(a=>qe(a)?a.trim():a)),c.number&&(r=i.map(qo)));let u,o=n[u=Io(t)]||n[u=Io(Wt(t))];!o&&s&&(o=n[u=Io(Ht(t))]),o&&Ai(o,e,6,r);const h=n[u+"Once"];if(h){if(!e.emitted)e.emitted={};else if(e.emitted[u])return;e.emitted[u]=!0,Ai(h,e,6,r)}}function ug(e,t,i=!1){const n=t.emitsCache,r=n.get(e);if(r!==void 0)return r;const s=e.emits;let c={},u=!1;if(!Te(e)){const o=h=>{const a=ug(h,t,!0);a&&(u=!0,et(c,a))};!i&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}return!s&&!u?(Xe(e)&&n.set(e,null),null):(we(s)?s.forEach(o=>c[o]=null):et(c,s),Xe(e)&&n.set(e,c),c)}function La(e,t){return!e||!qs(t)?!1:(t=t.slice(2).replace(/Once$/,""),ze(e,t[0].toLowerCase()+t.slice(1))||ze(e,Ht(t))||ze(e,t))}function Do(e){const{type:t,vnode:i,proxy:n,withProxy:r,propsOptions:[s],slots:c,attrs:u,emit:o,render:h,renderCache:a,props:l,data:f,setupState:d,ctx:p,inheritAttrs:g}=e,m=Os(e);let v,y;try{if(i.shapeFlag&4){const b=r||n,_=b;v=Xt(h.call(_,b,a,l,d,f,p)),y=u}else{const b=t;v=Xt(b.length>1?b(l,{attrs:u,slots:c,emit:o}):b(l,null)),y=t.props?u:b0(u)}}catch(b){Cs.length=0,Qr(b,e,1),v=ve(gt)}let S=v;if(y&&g!==!1){const b=Object.keys(y),{shapeFlag:_}=S;b.length&&_&7&&(s&&b.some(kc)&&(y=_0(y,s)),S=nn(S,y,!1,!0))}return i.dirs&&(S=nn(S,null,!1,!0),S.dirs=S.dirs?S.dirs.concat(i.dirs):i.dirs),i.transition&&Pn(S,i.transition),v=S,Os(m),v}function y0(e,t=!0){let i;for(let n=0;n<e.length;n++){const r=e[n];if(Jn(r)){if(r.type!==gt||r.children==="v-if"){if(i)return;i=r}}else return}return i}const b0=e=>{let t;for(const i in e)(i==="class"||i==="style"||qs(i))&&((t||(t={}))[i]=e[i]);return t},_0=(e,t)=>{const i={};for(const n in e)(!kc(n)||!(n.slice(9)in t))&&(i[n]=e[n]);return i};function w0(e,t,i){const{props:n,children:r,component:s}=e,{props:c,children:u,patchFlag:o}=t,h=s.emitsOptions;if(t.dirs||t.transition)return!0;if(i&&o>=0){if(o&1024)return!0;if(o&16)return n?fh(n,c,h):!!c;if(o&8){const a=t.dynamicProps;for(let l=0;l<a.length;l++){const f=a[l];if(c[f]!==n[f]&&!La(h,f))return!0}}}else return(r||u)&&(!u||!u.$stable)?!0:n===c?!1:n?c?fh(n,c,h):!0:!!c;return!1}function fh(e,t,i){const n=Object.keys(t);if(n.length!==Object.keys(e).length)return!0;for(let r=0;r<n.length;r++){const s=n[r];if(t[s]!==e[s]&&!La(i,s))return!0}return!1}function nu({vnode:e,parent:t},i){for(;t;){const n=t.subTree;if(n.suspense&&n.suspense.activeBranch===e&&(n.el=e.el),n===e)(e=t.vnode).el=i,t=t.parent;else break}}const ta=e=>e.__isSuspense;let Xl=0;const S0={name:"Suspense",__isSuspense:!0,process(e,t,i,n,r,s,c,u,o,h){if(e==null)A0(t,i,n,r,s,c,u,o,h);else{if(s&&s.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}C0(e,t,i,n,r,c,u,o,h)}},hydrate:x0,normalize:T0},nB=S0;function Fs(e,t){const i=e.props&&e.props[t];Te(i)&&i()}function A0(e,t,i,n,r,s,c,u,o){const{p:h,o:{createElement:a}}=o,l=a("div"),f=e.suspense=hg(e,r,n,t,l,i,s,c,u,o);h(null,f.pendingBranch=e.ssContent,l,null,n,f,s,c),f.deps>0?(Fs(e,"onPending"),Fs(e,"onFallback"),h(null,e.ssFallback,t,i,n,null,s,c),Nr(f,e.ssFallback)):f.resolve(!1,!0)}function C0(e,t,i,n,r,s,c,u,{p:o,um:h,o:{createElement:a}}){const l=t.suspense=e.suspense;l.vnode=t,t.el=e.el;const f=t.ssContent,d=t.ssFallback,{activeBranch:p,pendingBranch:g,isInFallback:m,isHydrating:v}=l;if(g)l.pendingBranch=f,vi(f,g)?(o(g,f,l.hiddenContainer,null,r,l,s,c,u),l.deps<=0?l.resolve():m&&(v||(o(p,d,i,n,r,null,s,c,u),Nr(l,d)))):(l.pendingId=Xl++,v?(l.isHydrating=!1,l.activeBranch=g):h(g,r,l),l.deps=0,l.effects.length=0,l.hiddenContainer=a("div"),m?(o(null,f,l.hiddenContainer,null,r,l,s,c,u),l.deps<=0?l.resolve():(o(p,d,i,n,r,null,s,c,u),Nr(l,d))):p&&vi(f,p)?(o(p,f,i,n,r,l,s,c,u),l.resolve(!0)):(o(null,f,l.hiddenContainer,null,r,l,s,c,u),l.deps<=0&&l.resolve()));else if(p&&vi(f,p))o(p,f,i,n,r,l,s,c,u),Nr(l,f);else if(Fs(t,"onPending"),l.pendingBranch=f,f.shapeFlag&512?l.pendingId=f.component.suspenseId:l.pendingId=Xl++,o(null,f,l.hiddenContainer,null,r,l,s,c,u),l.deps<=0)l.resolve();else{const{timeout:y,pendingId:S}=l;y>0?setTimeout(()=>{l.pendingId===S&&l.fallback(d)},y):y===0&&l.fallback(d)}}function hg(e,t,i,n,r,s,c,u,o,h,a=!1){const{p:l,m:f,um:d,n:p,o:{parentNode:g,remove:m}}=h;let v;const y=$0(e);y&&t&&t.pendingBranch&&(v=t.pendingId,t.deps++);const S=e.props?Ko(e.props.timeout):void 0,b=s,_={vnode:e,parent:t,parentComponent:i,namespace:c,container:n,hiddenContainer:r,deps:0,pendingId:Xl++,timeout:typeof S=="number"?S:-1,activeBranch:null,pendingBranch:null,isInFallback:!a,isHydrating:a,isUnmounted:!1,effects:[],resolve(w=!1,E=!1){const{vnode:T,activeBranch:$,pendingBranch:C,pendingId:x,effects:L,parentComponent:M,container:A}=_;let k=!1;_.isHydrating?_.isHydrating=!1:w||(k=$&&C.transition&&C.transition.mode==="out-in",k&&($.transition.afterLeave=()=>{x===_.pendingId&&(f(C,A,s===b?p($):s,0),Ul(L))}),$&&(g($.el)===A&&(s=p($)),d($,M,_,!0)),k||f(C,A,s,0)),Nr(_,C),_.pendingBranch=null,_.isInFallback=!1;let P=_.parent,O=!1;for(;P;){if(P.pendingBranch){P.effects.push(...L),O=!0;break}P=P.parent}!O&&!k&&Ul(L),_.effects=[],y&&t&&t.pendingBranch&&v===t.pendingId&&(t.deps--,t.deps===0&&!E&&t.resolve()),Fs(T,"onResolve")},fallback(w){if(!_.pendingBranch)return;const{vnode:E,activeBranch:T,parentComponent:$,container:C,namespace:x}=_;Fs(E,"onFallback");const L=p(T),M=()=>{!_.isInFallback||(l(null,w,C,L,$,null,x,u,o),Nr(_,w))},A=w.transition&&w.transition.mode==="out-in";A&&(T.transition.afterLeave=M),_.isInFallback=!0,d(T,$,null,!0),A||M()},move(w,E,T){_.activeBranch&&f(_.activeBranch,w,E,T),_.container=w},next(){return _.activeBranch&&p(_.activeBranch)},registerDep(w,E,T){const $=!!_.pendingBranch;$&&_.deps++;const C=w.vnode.el;w.asyncDep.catch(x=>{Qr(x,w,0)}).then(x=>{if(w.isUnmounted||_.isUnmounted||_.pendingId!==w.suspenseId)return;w.asyncResolved=!0;const{vnode:L}=w;Zl(w,x,!1),C&&(L.el=C);const M=!C&&w.subTree.el;E(w,L,g(C||w.subTree.el),C?null:p(w.subTree),_,c,T),M&&m(M),nu(w,L.el),$&&--_.deps===0&&_.resolve()})},unmount(w,E){_.isUnmounted=!0,_.activeBranch&&d(_.activeBranch,i,w,E),_.pendingBranch&&d(_.pendingBranch,i,w,E)}};return _}function x0(e,t,i,n,r,s,c,u,o){const h=t.suspense=hg(t,n,i,e.parentNode,document.createElement("div"),null,r,s,c,u,!0),a=o(e,h.pendingBranch=t.ssContent,i,h,s,c);return h.deps===0&&h.resolve(!1,!0),a}function T0(e){const{shapeFlag:t,children:i}=e,n=t&32;e.ssContent=ph(n?i.default:i),e.ssFallback=n?ph(i.fallback):ve(gt)}function ph(e){let t;if(Te(e)){const i=Qn&&e._c;i&&(e._d=!1,ee()),e=e(),i&&(e._d=!0,t=Rt,fg())}return we(e)&&(e=y0(e)),e=Xt(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(i=>i!==e)),e}function dg(e,t){t&&t.pendingBranch?we(e)?t.effects.push(...e):t.effects.push(e):Ul(e)}function Nr(e,t){e.activeBranch=t;const{vnode:i,parentComponent:n}=e;let r=t.el;for(;!r&&t.component;)t=t.component.subTree,r=t.el;i.el=r,n&&n.subTree===i&&(n.vnode.el=r,nu(n,r))}function $0(e){const t=e.props&&e.props.suspensible;return t!=null&&t!==!1}const Oe=Symbol.for("v-fgt"),Mn=Symbol.for("v-txt"),gt=Symbol.for("v-cmt"),Dr=Symbol.for("v-stc"),Cs=[];let Rt=null;function ee(e=!1){Cs.push(Rt=e?null:[])}function fg(){Cs.pop(),Rt=Cs[Cs.length-1]||null}let Qn=1;function gh(e){Qn+=e,e<0&&Rt&&(Rt.hasOnce=!0)}function pg(e){return e.dynamicChildren=Qn>0?Rt||Pr:null,fg(),Qn>0&&Rt&&Rt.push(e),e}function ae(e,t,i,n,r,s){return pg(se(e,t,i,n,r,s,!0))}function Se(e,t,i,n,r){return pg(ve(e,t,i,n,r,!0))}function Jn(e){return e?e.__v_isVNode===!0:!1}function vi(e,t){return e.type===t.type&&e.key===t.key}function rB(e){}const gg=({key:e})=>e!=null?e:null,Fo=({ref:e,ref_key:t,ref_for:i})=>(typeof e=="number"&&(e=""+e),e!=null?qe(e)||at(e)||Te(e)?{i:yt,r:e,k:t,f:!!i}:e:null);function se(e,t=null,i=null,n=0,r=null,s=e===Oe?0:1,c=!1,u=!1){const o={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&gg(t),ref:t&&Fo(t),scopeId:Ea,slotScopeIds:null,children:i,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:s,patchFlag:n,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:yt};return u?(ru(o,i),s&128&&e.normalize(o)):i&&(o.shapeFlag|=qe(i)?8:16),Qn>0&&!c&&Rt&&(o.patchFlag>0||s&6)&&o.patchFlag!==32&&Rt.push(o),o}const ve=M0;function M0(e,t=null,i=null,n=0,r=null,s=!1){if((!e||e===jp)&&(e=gt),Jn(e)){const u=nn(e,t,!0);return i&&ru(u,i),Qn>0&&!s&&Rt&&(u.shapeFlag&6?Rt[Rt.indexOf(e)]=u:Rt.push(u)),u.patchFlag=-2,u}if(O0(e)&&(e=e.__vccOpts),t){t=ia(t);let{class:u,style:o}=t;u&&!qe(u)&&(t.class=Ue(u)),Xe(o)&&(Vc(o)&&!we(o)&&(o=et({},o)),t.style=dt(o))}const c=qe(e)?1:ta(e)?128:Op(e)?64:Xe(e)?4:Te(e)?2:0;return se(e,t,i,n,r,c,s,!0)}function ia(e){return e?Vc(e)||Jp(e)?et({},e):e:null}function nn(e,t,i=!1,n=!1){const{props:r,ref:s,patchFlag:c,children:u,transition:o}=e,h=t?ut(r||{},t):r,a={__v_isVNode:!0,__v_skip:!0,type:e.type,props:h,key:h&&gg(h),ref:t&&t.ref?i&&s?we(s)?s.concat(Fo(t)):[s,Fo(t)]:Fo(t):s,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:u,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Oe?c===-1?16:c|16:c,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:o,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&nn(e.ssContent),ssFallback:e.ssFallback&&nn(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return o&&n&&Pn(a,o.clone(a)),a}function He(e=" ",t=0){return ve(Mn,null,e,t)}function sB(e,t){const i=ve(Dr,null,e);return i.staticCount=t,i}function xe(e="",t=!1){return t?(ee(),Se(gt,null,e)):ve(gt,null,e)}function Xt(e){return e==null||typeof e=="boolean"?ve(gt):we(e)?ve(Oe,null,e.slice()):typeof e=="object"?Sn(e):ve(Mn,null,String(e))}function Sn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:nn(e)}function ru(e,t){let i=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(we(t))i=16;else if(typeof t=="object")if(n&65){const r=t.default;r&&(r._c&&(r._d=!1),ru(e,r()),r._c&&(r._d=!0));return}else{i=32;const r=t._;!r&&!Jp(t)?t._ctx=yt:r===3&&yt&&(yt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Te(t)?(t={default:t,_ctx:yt},i=32):(t=String(t),n&64?(i=16,t=[He(t)]):i=8);e.children=t,e.shapeFlag|=i}function ut(...e){const t={};for(let i=0;i<e.length;i++){const n=e[i];for(const r in n)if(r==="class")t.class!==n.class&&(t.class=Ue([t.class,n.class]));else if(r==="style")t.style=dt([t.style,n.style]);else if(qs(r)){const s=t[r],c=n[r];c&&s!==c&&!(we(s)&&s.includes(c))&&(t[r]=s?[].concat(s,c):c)}else r!==""&&(t[r]=n[r])}return t}function Yt(e,t,i,n=null){Ai(e,t,7,[i,n])}const E0=Yp();let k0=0;function mg(e,t,i){const n=e.type,r=(t?t.appContext:e.appContext)||E0,s={uid:k0++,vnode:e,type:n,parent:t,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new lp(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(r.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:eg(n,r),emitsOptions:ug(n,r),emit:null,emitted:null,propsDefaults:Ve,inheritAttrs:n.inheritAttrs,ctx:Ve,data:Ve,props:Ve,attrs:Ve,slots:Ve,refs:Ve,setupState:Ve,setupContext:null,suspense:i,suspenseId:i?i.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 s.ctx={_:s},s.root=t?t.root:s,s.emit=v0.bind(null,s),e.ce&&e.ce(s),s}let mt=null;const Ot=()=>mt||yt;let na,Ql;{const e=Ic(),t=(i,n)=>{let r;return(r=e[i])||(r=e[i]=[]),r.push(n),s=>{r.length>1?r.forEach(c=>c(s)):r[0](s)}};na=t("__VUE_INSTANCE_SETTERS__",i=>mt=i),Ql=t("__VUE_SSR_SETTERS__",i=>Qs=i)}const Zn=e=>{const t=mt;return na(e),e.scope.on(),()=>{e.scope.off(),na(t)}},Jl=()=>{mt&&mt.scope.off(),na(null)};function vg(e){return e.vnode.shapeFlag&4}let Qs=!1;function yg(e,t=!1,i=!1){t&&Ql(t);const{props:n,children:r}=e.vnode,s=vg(e);i0(e,n,s,t),o0(e,r,i);const c=s?P0(e,t):void 0;return t&&Ql(!1),c}function P0(e,t){const i=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Gl);const{setup:n}=i;if(n){const r=e.setupContext=n.length>1?_g(e):null,s=Zn(e);sn();const c=Xr(n,e,0,[e.props,r]);if(on(),s(),Lc(c)){if($n(e)||Gc(e),c.then(Jl,Jl),t)return c.then(u=>{Zl(e,u,t)}).catch(u=>{Qr(u,e,0)});e.asyncDep=c}else Zl(e,c,t)}else bg(e,t)}function Zl(e,t,i){Te(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Xe(t)&&(e.setupState=$p(t)),bg(e,i)}let ra,ec;function oB(e){ra=e,ec=t=>{t.render._rc&&(t.withProxy=new Proxy(t.ctx,qb))}}const aB=()=>!ra;function bg(e,t,i){const n=e.type;if(!e.render){if(!t&&ra&&!n.render){const r=n.template||eu(e).template;if(r){const{isCustomElement:s,compilerOptions:c}=e.appContext.config,{delimiters:u,compilerOptions:o}=n,h=et(et({isCustomElement:s,delimiters:u},c),o);n.render=ra(r,h)}}e.render=n.render||fi,ec&&ec(e)}{const r=Zn(e);sn();try{Kb(e)}finally{on(),r()}}}const L0={get(e,t){return It(e,"get",""),e[t]}};function _g(e){const t=i=>{e.exposed=i||{}};return{attrs:new Proxy(e.attrs,L0),slots:e.slots,emit:e.emit,expose:t}}function Js(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy($p(zc(e.exposed)),{get(t,i){if(i in t)return t[i];if(i in As)return As[i](e)},has(t,i){return i in t||i in As}})):e.proxy}const R0=/(?:^|[-_])(\w)/g,I0=e=>e.replace(R0,t=>t.toUpperCase()).replace(/[-_]/g,"");function sa(e,t=!0){return Te(e)?e.displayName||e.name:e.name||t&&e.__name}function wg(e,t,i=!1){let n=sa(t);if(!n&&t.__file){const r=t.__file.match(/([^/\\]+)\.\w+$/);r&&(n=r[1])}if(!n&&e&&e.parent){const r=s=>{for(const c in s)if(s[c]===t)return c};n=r(e.components||e.parent.type.components)||r(e.appContext.components)}return n?I0(n):i?"App":"Anonymous"}function O0(e){return Te(e)&&"__vccOpts"in e}const ot=(e,t)=>db(e,t,Qs);function Zs(e,t,i){const n=arguments.length;return n===2?Xe(t)&&!we(t)?Jn(t)?ve(e,null,[t]):ve(e,t):ve(e,null,t):(n>3?i=Array.prototype.slice.call(arguments,2):n===3&&Jn(i)&&(i=[i]),ve(e,t,i))}function lB(){}function cB(e,t,i,n){const r=i[n];if(r&&N0(r,e))return r;const s=t();return s.memo=e.slice(),s.cacheIndex=n,i[n]=s}function N0(e,t){const i=e.memo;if(i.length!=t.length)return!1;for(let n=0;n<i.length;n++)if(Vt(i[n],t[n]))return!1;return Qn>0&&Rt&&Rt.push(e),!0}const D0="3.5.8",uB=fi,hB=wb,dB=wr,fB=Rp,F0={createComponentInstance:mg,setupComponent:yg,renderComponentRoot:Do,setCurrentRenderingInstance:Os,isVNode:Jn,normalizeVNode:Xt,getComponentPublicInstance:Js,ensureValidVNode:Zc,pushWarningContext:gb,popWarningContext:mb},pB=F0,gB=null,mB=null,vB=null;/**
* @vue/runtime-dom v3.5.8
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let tc;const mh=typeof window<"u"&&window.trustedTypes;if(mh)try{tc=mh.createPolicy("vue",{createHTML:e=>e})}catch{}const Sg=tc?e=>tc.createHTML(e):e=>e,B0="http://www.w3.org/2000/svg",V0="http://www.w3.org/1998/Math/MathML",Ki=typeof document<"u"?document:null,vh=Ki&&Ki.createElement("template"),z0={insert:(e,t,i)=>{t.insertBefore(e,i||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,i,n)=>{const r=t==="svg"?Ki.createElementNS(B0,e):t==="mathml"?Ki.createElementNS(V0,e):i?Ki.createElement(e,{is:i}):Ki.createElement(e);return e==="select"&&n&&n.multiple!=null&&r.setAttribute("multiple",n.multiple),r},createText:e=>Ki.createTextNode(e),createComment:e=>Ki.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Ki.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,i,n,r,s){const c=i?i.previousSibling:t.lastChild;if(r&&(r===s||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),i),!(r===s||!(r=r.nextSibling)););else{vh.innerHTML=Sg(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const u=vh.content;if(n==="svg"||n==="mathml"){const o=u.firstChild;for(;o.firstChild;)u.appendChild(o.firstChild);u.removeChild(o)}t.insertBefore(u,i)}return[c?c.nextSibling:t.firstChild,i?i.previousSibling:t.lastChild]}},hn="transition",rs="animation",Vr=Symbol("_vtc"),Ag={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},Cg=et({},Fp,Ag),H0=e=>(e.displayName="Transition",e.props=Cg,e),yB=H0((e,{slots:t})=>Zs(Mb,xg(e),t)),Vn=(e,t=[])=>{we(e)?e.forEach(i=>i(...t)):e&&e(...t)},yh=e=>e?we(e)?e.some(t=>t.length>1):e.length>1:!1;function xg(e){const t={};for(const L in e)L in Ag||(t[L]=e[L]);if(e.css===!1)return t;const{name:i="v",type:n,duration:r,enterFromClass:s=`${i}-enter-from`,enterActiveClass:c=`${i}-enter-active`,enterToClass:u=`${i}-enter-to`,appearFromClass:o=s,appearActiveClass:h=c,appearToClass:a=u,leaveFromClass:l=`${i}-leave-from`,leaveActiveClass:f=`${i}-leave-active`,leaveToClass:d=`${i}-leave-to`}=e,p=U0(r),g=p&&p[0],m=p&&p[1],{onBeforeEnter:v,onEnter:y,onEnterCancelled:S,onLeave:b,onLeaveCancelled:_,onBeforeAppear:w=v,onAppear:E=y,onAppearCancelled:T=S}=t,$=(L,M,A)=>{vn(L,M?a:u),vn(L,M?h:c),A&&A()},C=(L,M)=>{L._isLeaving=!1,vn(L,l),vn(L,d),vn(L,f),M&&M()},x=L=>(M,A)=>{const k=L?E:y,P=()=>$(M,L,A);Vn(k,[M,P]),bh(()=>{vn(M,L?o:s),qi(M,L?a:u),yh(k)||_h(M,n,g,P)})};return et(t,{onBeforeEnter(L){Vn(v,[L]),qi(L,s),qi(L,c)},onBeforeAppear(L){Vn(w,[L]),qi(L,o),qi(L,h)},onEnter:x(!1),onAppear:x(!0),onLeave(L,M){L._isLeaving=!0;const A=()=>C(L,M);qi(L,l),qi(L,f),$g(),bh(()=>{!L._isLeaving||(vn(L,l),qi(L,d),yh(b)||_h(L,n,m,A))}),Vn(b,[L,A])},onEnterCancelled(L){$(L,!1),Vn(S,[L])},onAppearCancelled(L){$(L,!0),Vn(T,[L])},onLeaveCancelled(L){C(L),Vn(_,[L])}})}function U0(e){if(e==null)return null;if(Xe(e))return[rl(e.enter),rl(e.leave)];{const t=rl(e);return[t,t]}}function rl(e){return Ko(e)}function qi(e,t){t.split(/\s+/).forEach(i=>i&&e.classList.add(i)),(e[Vr]||(e[Vr]=new Set)).add(t)}function vn(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.remove(n));const i=e[Vr];i&&(i.delete(t),i.size||(e[Vr]=void 0))}function bh(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let W0=0;function _h(e,t,i,n){const r=e._endId=++W0,s=()=>{r===e._endId&&n()};if(i!=null)return setTimeout(s,i);const{type:c,timeout:u,propCount:o}=Tg(e,t);if(!c)return n();const h=c+"end";let a=0;const l=()=>{e.removeEventListener(h,f),s()},f=d=>{d.target===e&&++a>=o&&l()};setTimeout(()=>{a<o&&l()},u+1),e.addEventListener(h,f)}function Tg(e,t){const i=window.getComputedStyle(e),n=p=>(i[p]||"").split(", "),r=n(`${hn}Delay`),s=n(`${hn}Duration`),c=wh(r,s),u=n(`${rs}Delay`),o=n(`${rs}Duration`),h=wh(u,o);let a=null,l=0,f=0;t===hn?c>0&&(a=hn,l=c,f=s.length):t===rs?h>0&&(a=rs,l=h,f=o.length):(l=Math.max(c,h),a=l>0?c>h?hn:rs:null,f=a?a===hn?s.length:o.length:0);const d=a===hn&&/\b(transform|all)(,|$)/.test(n(`${hn}Property`).toString());return{type:a,timeout:l,propCount:f,hasTransform:d}}function wh(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((i,n)=>Sh(i)+Sh(e[n])))}function Sh(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function $g(){return document.body.offsetHeight}function j0(e,t,i){const n=e[Vr];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):i?e.setAttribute("class",t):e.className=t}const oa=Symbol("_vod"),Mg=Symbol("_vsh"),Ra={beforeMount(e,{value:t},{transition:i}){e[oa]=e.style.display==="none"?"":e.style.display,i&&t?i.beforeEnter(e):ss(e,t)},mounted(e,{value:t},{transition:i}){i&&t&&i.enter(e)},updated(e,{value:t,oldValue:i},{transition:n}){!t!=!i&&(n?t?(n.beforeEnter(e),ss(e,!0),n.enter(e)):n.leave(e,()=>{ss(e,!1)}):ss(e,t))},beforeUnmount(e,{value:t}){ss(e,t)}};function ss(e,t){e.style.display=t?e[oa]:"none",e[Mg]=!t}function G0(){Ra.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}}}const Eg=Symbol("");function bB(e){const t=Ot();if(!t)return;const i=t.ut=(r=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(s=>aa(s,r))},n=()=>{const r=e(t.proxy);t.ce?aa(t.ce,r):ic(t.subTree,r),i(r)};qc(()=>{p0(n)}),Ys(()=>{const r=new MutationObserver(n);r.observe(t.subTree.el.parentNode,{childList:!0}),Pa(()=>r.disconnect())})}function ic(e,t){if(e.shapeFlag&128){const i=e.suspense;e=i.activeBranch,i.pendingBranch&&!i.isHydrating&&i.effects.push(()=>{ic(i.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)aa(e.el,t);else if(e.type===Oe)e.children.forEach(i=>ic(i,t));else if(e.type===Dr){let{el:i,anchor:n}=e;for(;i&&(aa(i,t),i!==n);)i=i.nextSibling}}function aa(e,t){if(e.nodeType===1){const i=e.style;let n="";for(const r in t)i.setProperty(`--${r}`,t[r]),n+=`--${r}: ${t[r]};`;i[Eg]=n}}const q0=/(^|;)\s*display\s*:/;function K0(e,t,i){const n=e.style,r=qe(i);let s=!1;if(i&&!r){if(t)if(qe(t))for(const c of t.split(";")){const u=c.slice(0,c.indexOf(":")).trim();i[u]==null&&Bo(n,u,"")}else for(const c in t)i[c]==null&&Bo(n,c,"");for(const c in i)c==="display"&&(s=!0),Bo(n,c,i[c])}else if(r){if(t!==i){const c=n[Eg];c&&(i+=";"+c),n.cssText=i,s=q0.test(i)}}else t&&e.removeAttribute("style");oa in e&&(e[oa]=s?n.display:"",e[Mg]&&(n.display="none"))}const Ah=/\s*!important$/;function Bo(e,t,i){if(we(i))i.forEach(n=>Bo(e,t,n));else if(i==null&&(i=""),t.startsWith("--"))e.setProperty(t,i);else{const n=Y0(e,t);Ah.test(i)?e.setProperty(Ht(n),i.replace(Ah,""),"important"):e[n]=i}}const Ch=["Webkit","Moz","ms"],sl={};function Y0(e,t){const i=sl[t];if(i)return i;let n=Wt(t);if(n!=="filter"&&n in e)return sl[t]=n;n=_a(n);for(let r=0;r<Ch.length;r++){const s=Ch[r]+n;if(s in e)return sl[t]=s}return t}const xh="http://www.w3.org/1999/xlink";function Th(e,t,i,n,r,s=$y(t)){n&&t.startsWith("xlink:")?i==null?e.removeAttributeNS(xh,t.slice(6,t.length)):e.setAttributeNS(xh,t,i):i==null||s&&!Oc(i)?e.removeAttribute(t):e.setAttribute(t,s?"":Di(i)?String(i):i)}function X0(e,t,i,n){if(t==="innerHTML"||t==="textContent"){i!=null&&(e[t]=t==="innerHTML"?Sg(i):i);return}const r=e.tagName;if(t==="value"&&r!=="PROGRESS"&&!r.includes("-")){const c=r==="OPTION"?e.getAttribute("value")||"":e.value,u=i==null?e.type==="checkbox"?"on":"":String(i);(c!==u||!("_value"in e))&&(e.value=u),i==null&&e.removeAttribute(t),e._value=i;return}let s=!1;if(i===""||i==null){const c=typeof e[t];c==="boolean"?i=Oc(i):i==null&&c==="string"?(i="",s=!0):c==="number"&&(i=0,s=!0)}try{e[t]=i}catch{}s&&e.removeAttribute(t)}function Qi(e,t,i,n){e.addEventListener(t,i,n)}function Q0(e,t,i,n){e.removeEventListener(t,i,n)}const $h=Symbol("_vei");function J0(e,t,i,n,r=null){const s=e[$h]||(e[$h]={}),c=s[t];if(n&&c)c.value=n;else{const[u,o]=Z0(t);if(n){const h=s[t]=i_(n,r);Qi(e,u,h,o)}else c&&(Q0(e,u,c,o),s[t]=void 0)}}const Mh=/(?:Once|Passive|Capture)$/;function Z0(e){let t;if(Mh.test(e)){t={};let n;for(;n=e.match(Mh);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Ht(e.slice(2)),t]}let ol=0;const e_=Promise.resolve(),t_=()=>ol||(e_.then(()=>ol=0),ol=Date.now());function i_(e,t){const i=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=i.attached)return;Ai(n_(n,i.value),t,5,[n])};return i.value=e,i.attached=t_(),i}function n_(e,t){if(we(t)){const i=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{i.call(e),e._stopped=!0},t.map(n=>r=>!r._stopped&&n&&n(r))}else return t}const Eh=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,r_=(e,t,i,n,r,s)=>{const c=r==="svg";t==="class"?j0(e,n,c):t==="style"?K0(e,i,n):qs(t)?kc(t)||J0(e,t,i,n,s):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):s_(e,t,n,c))?(X0(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Th(e,t,n,c,s,t!=="value")):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),Th(e,t,n,c))};function s_(e,t,i,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&Eh(t)&&Te(i));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return Eh(t)&&qe(i)?!1:!!(t in e||e._isVueCE&&(/[A-Z]/.test(t)||!qe(i)))}const kh={};/*! #__NO_SIDE_EFFECTS__ */function o_(e,t,i){const n=ar(e,t);Gn(n)&&et(n,t);class r extends su{constructor(c){super(n,c,i)}}return r.def=n,r}/*! #__NO_SIDE_EFFECTS__ */const _B=(e,t)=>o_(e,t,S_),a_=typeof HTMLElement<"u"?HTMLElement:class{};class su extends a_{constructor(t,i={},n=nc){super(),this._def=t,this._props=i,this._createApp=n,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._ob=null,this.shadowRoot&&n!==nc?this._root=this.shadowRoot:t.shadowRoot!==!1?(this.attachShadow({mode:"open"}),this._root=this.shadowRoot):this._root=this,this._def.__asyncLoader||this._resolveProps(this._def)}connectedCallback(){if(!this.isConnected)return;this.shadowRoot||this._parseSlots(),this._connected=!0;let t=this;for(;t=t&&(t.parentNode||t.host);)if(t instanceof su){this._parent=t;break}this._instance||(this._resolved?(this._setParent(),this._update()):t&&t._pendingResolve?this._pendingResolve=t._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(t=this._parent){t&&(this._instance.parent=t._instance,this._instance.provides=t._instance.provides)}disconnectedCallback(){this._connected=!1,tn(()=>{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)})}_resolveDef(){if(this._pendingResolve)return;for(let n=0;n<this.attributes.length;n++)this._setAttr(this.attributes[n].name);this._ob=new MutationObserver(n=>{for(const r of n)this._setAttr(r.attributeName)}),this._ob.observe(this,{attributes:!0});const t=(n,r=!1)=>{this._resolved=!0,this._pendingResolve=void 0;const{props:s,styles:c}=n;let u;if(s&&!we(s))for(const o in s){const h=s[o];(h===Number||h&&h.type===Number)&&(o in this._props&&(this._props[o]=Ko(this._props[o])),(u||(u=Object.create(null)))[Wt(o)]=!0)}this._numberProps=u,r&&this._resolveProps(n),this.shadowRoot&&this._applyStyles(c),this._mount(n)},i=this._def.__asyncLoader;i?this._pendingResolve=i().then(n=>t(this._def=n,!0)):t(this._def)}_mount(t){this._app=this._createApp(t),t.configureApp&&t.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);const i=this._instance&&this._instance.exposed;if(!!i)for(const n in i)ze(this,n)||Object.defineProperty(this,n,{get:()=>Tn(i[n])})}_resolveProps(t){const{props:i}=t,n=we(i)?i:Object.keys(i||{});for(const r of Object.keys(this))r[0]!=="_"&&n.includes(r)&&this._setProp(r,this[r]);for(const r of n.map(Wt))Object.defineProperty(this,r,{get(){return this._getProp(r)},set(s){this._setProp(r,s,!0,!0)}})}_setAttr(t){if(t.startsWith("data-v-"))return;const i=this.hasAttribute(t);let n=i?this.getAttribute(t):kh;const r=Wt(t);i&&this._numberProps&&this._numberProps[r]&&(n=Ko(n)),this._setProp(r,n,!1,!0)}_getProp(t){return this._props[t]}_setProp(t,i,n=!0,r=!1){i!==this._props[t]&&(i===kh?delete this._props[t]:(this._props[t]=i,t==="key"&&this._app&&(this._app._ceVNode.key=i)),r&&this._instance&&this._update(),n&&(i===!0?this.setAttribute(Ht(t),""):typeof i=="string"||typeof i=="number"?this.setAttribute(Ht(t),i+""):i||this.removeAttribute(Ht(t))))}_update(){w_(this._createVNode(),this._root)}_createVNode(){const t={};this.shadowRoot||(t.onVnodeMounted=t.onVnodeUpdated=this._renderSlots.bind(this));const i=ve(this._def,et(t,this._props));return this._instance||(i.ce=n=>{this._instance=n,n.ce=this,n.isCE=!0;const r=(s,c)=>{this.dispatchEvent(new CustomEvent(s,Gn(c[0])?et({detail:c},c[0]):{detail:c}))};n.emit=(s,...c)=>{r(s,c),Ht(s)!==s&&r(Ht(s),c)},this._setParent()}),i}_applyStyles(t,i){if(!t)return;if(i){if(i===this._def||this._styleChildren.has(i))return;this._styleChildren.add(i)}const n=this._nonce;for(let r=t.length-1;r>=0;r--){const s=document.createElement("style");n&&s.setAttribute("nonce",n),s.textContent=t[r],this.shadowRoot.prepend(s)}}_parseSlots(){const t=this._slots={};let i;for(;i=this.firstChild;){const n=i.nodeType===1&&i.getAttribute("slot")||"default";(t[n]||(t[n]=[])).push(i),this.removeChild(i)}}_renderSlots(){const t=(this._teleportTarget||this).querySelectorAll("slot"),i=this._instance.type.__scopeId;for(let n=0;n<t.length;n++){const r=t[n],s=r.getAttribute("name")||"default",c=this._slots[s],u=r.parentNode;if(c)for(const o of c){if(i&&o.nodeType===1){const h=i+"-s",a=document.createTreeWalker(o,1);o.setAttribute(h,"");let l;for(;l=a.nextNode();)l.setAttribute(h,"")}u.insertBefore(o,r)}else for(;r.firstChild;)u.insertBefore(r.firstChild,r);u.removeChild(r)}}_injectChildStyle(t){this._applyStyles(t.styles,t)}_removeChildStyle(t){}}function l_(e){const t=Ot(),i=t&&t.ce;return i||null}function wB(){const e=l_();return e&&e.shadowRoot}function SB(e="$style"){{const t=Ot();if(!t)return Ve;const i=t.type.__cssModules;if(!i)return Ve;const n=i[e];return n||Ve}}const kg=new WeakMap,Pg=new WeakMap,la=Symbol("_moveCb"),Ph=Symbol("_enterCb"),c_=e=>(delete e.props.mode,e),u_=c_({name:"TransitionGroup",props:et({},Cg,{tag:String,moveClass:String}),setup(e,{slots:t}){const i=Ot(),n=Dp();let r,s;return Kc(()=>{if(!r.length)return;const c=e.moveClass||`${e.name||"v"}-move`;if(!p_(r[0].el,i.vnode.el,c))return;r.forEach(h_),r.forEach(d_);const u=r.filter(f_);$g(),u.forEach(o=>{const h=o.el,a=h.style;qi(h,c),a.transform=a.webkitTransform=a.transitionDuration="";const l=h[la]=f=>{f&&f.target!==h||(!f||/transform$/.test(f.propertyName))&&(h.removeEventListener("transitionend",l),h[la]=null,vn(h,c))};h.addEventListener("transitionend",l)})}),()=>{const c=Fe(e),u=xg(c);let o=c.tag||Oe;if(r=[],s)for(let h=0;h<s.length;h++){const a=s[h];a.el&&a.el instanceof Element&&(r.push(a),Pn(a,Ns(a,u,n,i)),kg.set(a,a.el.getBoundingClientRect()))}s=t.default?jc(t.default()):[];for(let h=0;h<s.length;h++){const a=s[h];a.key!=null&&Pn(a,Ns(a,u,n,i))}return ve(o,null,s)}}}),AB=u_;function h_(e){const t=e.el;t[la]&&t[la](),t[Ph]&&t[Ph]()}function d_(e){Pg.set(e,e.el.getBoundingClientRect())}function f_(e){const t=kg.get(e),i=Pg.get(e),n=t.left-i.left,r=t.top-i.top;if(n||r){const s=e.el.style;return s.transform=s.webkitTransform=`translate(${n}px,${r}px)`,s.transitionDuration="0s",e}}function p_(e,t,i){const n=e.cloneNode(),r=e[Vr];r&&r.forEach(u=>{u.split(/\s+/).forEach(o=>o&&n.classList.remove(o))}),i.split(/\s+/).forEach(u=>u&&n.classList.add(u)),n.style.display="none";const s=t.nodeType===1?t:t.parentNode;s.appendChild(n);const{hasTransform:c}=Tg(n);return s.removeChild(n),c}const Ln=e=>{const t=e.props["onUpdate:modelValue"]||!1;return we(t)?i=>Ir(t,i):t};function g_(e){e.target.composing=!0}function Lh(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const gi=Symbol("_assign"),Fi={created(e,{modifiers:{lazy:t,trim:i,number:n}},r){e[gi]=Ln(r);const s=n||r.props&&r.props.type==="number";Qi(e,t?"change":"input",c=>{if(c.target.composing)return;let u=e.value;i&&(u=u.trim()),s&&(u=qo(u)),e[gi](u)}),i&&Qi(e,"change",()=>{e.value=e.value.trim()}),t||(Qi(e,"compositionstart",g_),Qi(e,"compositionend",Lh),Qi(e,"change",Lh))},mounted(e,{value:t}){e.value=t==null?"":t},beforeUpdate(e,{value:t,oldValue:i,modifiers:{lazy:n,trim:r,number:s}},c){if(e[gi]=Ln(c),e.composing)return;const u=(s||e.type==="number")&&!/^0\d/.test(e.value)?qo(e.value):e.value,o=t==null?"":t;u!==o&&(document.activeElement===e&&e.type!=="range"&&(n&&t===i||r&&e.value.trim()===o)||(e.value=o))}},Bs={deep:!0,created(e,t,i){e[gi]=Ln(i),Qi(e,"change",()=>{const n=e._modelValue,r=zr(e),s=e.checked,c=e[gi];if(we(n)){const u=wa(n,r),o=u!==-1;if(s&&!o)c(n.concat(r));else if(!s&&o){const h=[...n];h.splice(u,1),c(h)}}else if(rr(n)){const u=new Set(n);s?u.add(r):u.delete(r),c(u)}else c(Lg(e,s))})},mounted:Rh,beforeUpdate(e,t,i){e[gi]=Ln(i),Rh(e,t,i)}};function Rh(e,{value:t,oldValue:i},n){e._modelValue=t;let r;we(t)?r=wa(t,n.props.value)>-1:rr(t)?r=t.has(n.props.value):r=kn(t,Lg(e,!0)),e.checked!==r&&(e.checked=r)}const ou={created(e,{value:t},i){e.checked=kn(t,i.props.value),e[gi]=Ln(i),Qi(e,"change",()=>{e[gi](zr(e))})},beforeUpdate(e,{value:t,oldValue:i},n){e[gi]=Ln(n),t!==i&&(e.checked=kn(t,n.props.value))}},m_={deep:!0,created(e,{value:t,modifiers:{number:i}},n){const r=rr(t);Qi(e,"change",()=>{const s=Array.prototype.filter.call(e.options,c=>c.selected).map(c=>i?qo(zr(c)):zr(c));e[gi](e.multiple?r?new Set(s):s:s[0]),e._assigning=!0,tn(()=>{e._assigning=!1})}),e[gi]=Ln(n)},mounted(e,{value:t,modifiers:{number:i}}){Ih(e,t)},beforeUpdate(e,t,i){e[gi]=Ln(i)},updated(e,{value:t,modifiers:{number:i}}){e._assigning||Ih(e,t)}};function Ih(e,t,i){const n=e.multiple,r=we(t);if(!(n&&!r&&!rr(t))){for(let s=0,c=e.options.length;s<c;s++){const u=e.options[s],o=zr(u);if(n)if(r){const h=typeof o;h==="string"||h==="number"?u.selected=t.some(a=>String(a)===String(o)):u.selected=wa(t,o)>-1}else u.selected=t.has(o);else if(kn(zr(u),t)){e.selectedIndex!==s&&(e.selectedIndex=s);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function zr(e){return"_value"in e?e._value:e.value}function Lg(e,t){const i=t?"_trueValue":"_falseValue";return i in e?e[i]:t}const au={created(e,t,i){wo(e,t,i,null,"created")},mounted(e,t,i){wo(e,t,i,null,"mounted")},beforeUpdate(e,t,i,n){wo(e,t,i,n,"beforeUpdate")},updated(e,t,i,n){wo(e,t,i,n,"updated")}};function Rg(e,t){switch(e){case"SELECT":return m_;case"TEXTAREA":return Fi;default:switch(t){case"checkbox":return Bs;case"radio":return ou;default:return Fi}}}function wo(e,t,i,n,r){const c=Rg(e.tagName,i.props&&i.props.type)[r];c&&c(e,t,i,n)}function v_(){Fi.getSSRProps=({value:e})=>({value:e}),ou.getSSRProps=({value:e},t)=>{if(t.props&&kn(t.props.value,e))return{checked:!0}},Bs.getSSRProps=({value:e},t)=>{if(we(e)){if(t.props&&wa(e,t.props.value)>-1)return{checked:!0}}else if(rr(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},au.getSSRProps=(e,t)=>{if(typeof t.type!="string")return;const i=Rg(t.type.toUpperCase(),t.props&&t.props.type);if(i.getSSRProps)return i.getSSRProps(e,t)}}const y_=["ctrl","shift","alt","meta"],b_={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&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>y_.some(i=>e[`${i}Key`]&&!t.includes(i))},Je=(e,t)=>{const i=e._withMods||(e._withMods={}),n=t.join(".");return i[n]||(i[n]=(r,...s)=>{for(let c=0;c<t.length;c++){const u=b_[t[c]];if(u&&u(r,t))return}return e(r,...s)})},__={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Cn=(e,t)=>{const i=e._withKeys||(e._withKeys={}),n=t.join(".");return i[n]||(i[n]=r=>{if(!("key"in r))return;const s=Ht(r.key);if(t.some(c=>c===s||__[c]===s))return e(r)})},Ig=et({patchProp:r_},z0);let xs,Oh=!1;function Og(){return xs||(xs=c0(Ig))}function Ng(){return xs=Oh?xs:u0(Ig),Oh=!0,xs}const w_=(...e)=>{Og().render(...e)},CB=(...e)=>{Ng().hydrate(...e)},nc=(...e)=>{const t=Og().createApp(...e),{mount:i}=t;return t.mount=n=>{const r=Fg(n);if(!r)return;const s=t._component;!Te(s)&&!s.render&&!s.template&&(s.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const c=i(r,!1,Dg(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),c},t},S_=(...e)=>{const t=Ng().createApp(...e),{mount:i}=t;return t.mount=n=>{const r=Fg(n);if(r)return i(r,!0,Dg(r))},t};function Dg(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Fg(e){return qe(e)?document.querySelector(e):e}let Nh=!1;const xB=()=>{Nh||(Nh=!0,v_(),G0())};var A_=!1;function C_(){return Bg().__VUE_DEVTOOLS_GLOBAL_HOOK__}function Bg(){return typeof navigator<"u"&&typeof window<"u"?window:typeof global<"u"?global:{}}const x_=typeof Proxy=="function",T_="devtools-plugin:setup",$_="plugin:settings:set";let dr,rc;function M_(){var e;return dr!==void 0||(typeof window<"u"&&window.performance?(dr=!0,rc=window.performance):typeof global<"u"&&((e=global.perf_hooks)===null||e===void 0?void 0:e.performance)?(dr=!0,rc=global.perf_hooks.performance):dr=!1),dr}function E_(){return M_()?rc.now():Date.now()}class k_{constructor(t,i){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=t,this.hook=i;const n={};if(t.settings)for(const c in t.settings){const u=t.settings[c];n[c]=u.defaultValue}const r=`__vue-devtools-plugin-settings__${t.id}`;let s=Object.assign({},n);try{const c=localStorage.getItem(r),u=JSON.parse(c);Object.assign(s,u)}catch{}this.fallbacks={getSettings(){return s},setSettings(c){try{localStorage.setItem(r,JSON.stringify(c))}catch{}s=c},now(){return E_()}},i&&i.on($_,(c,u)=>{c===this.plugin.id&&this.fallbacks.setSettings(u)}),this.proxiedOn=new Proxy({},{get:(c,u)=>this.target?this.target.on[u]:(...o)=>{this.onQueue.push({method:u,args:o})}}),this.proxiedTarget=new Proxy({},{get:(c,u)=>this.target?this.target[u]:u==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(u)?(...o)=>(this.targetQueue.push({method:u,args:o,resolve:()=>{}}),this.fallbacks[u](...o)):(...o)=>new Promise(h=>{this.targetQueue.push({method:u,args:o,resolve:h})})})}async setRealTarget(t){this.target=t;for(const i of this.onQueue)this.target.on[i.method](...i.args);for(const i of this.targetQueue)i.resolve(await this.target[i.method](...i.args))}}function P_(e,t){const i=e,n=Bg(),r=C_(),s=x_&&i.enableEarlyProxy;if(r&&(n.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!s))r.emit(T_,e,t);else{const c=s?new k_(i,r):null;(n.__VUE_DEVTOOLS_PLUGINS__=n.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:i,setupFn:t,proxy:c}),c&&t(c.proxiedTarget)}}/*!
 * pinia v2.1.7
 * (c) 2023 Eduardo San Martin Morote
 * @license MIT
 */let Vg;const Ia=e=>Vg=e,zg=Symbol();function sc(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var Ts;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(Ts||(Ts={}));function L_(){const e=Sa(!0),t=e.run(()=>oi({}));let i=[],n=[];const r=zc({install(s){Ia(r),r._a=s,s.provide(zg,r),s.config.globalProperties.$pinia=r,n.forEach(c=>i.push(c)),n=[]},use(s){return!this._a&&!A_?n.push(s):i.push(s),this},_p:i,_a:null,_e:e,_s:new Map,state:t});return r}const Hg=()=>{};function Dh(e,t,i,n=Hg){e.push(t);const r=()=>{const s=e.indexOf(t);s>-1&&(e.splice(s,1),n())};return!i&&cp()&&Iy(r),r}function fr(e,...t){e.slice().forEach(i=>{i(...t)})}const R_=e=>e();function oc(e,t){e instanceof Map&&t instanceof Map&&t.forEach((i,n)=>e.set(n,i)),e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const i in t){if(!t.hasOwnProperty(i))continue;const n=t[i],r=e[i];sc(r)&&sc(n)&&e.hasOwnProperty(i)&&!at(n)&&!en(n)?e[i]=oc(r,n):e[i]=n}return e}const I_=Symbol();function O_(e){return!sc(e)||!e.hasOwnProperty(I_)}const{assign:yn}=Object;function N_(e){return!!(at(e)&&e.effect)}function D_(e,t,i,n){const{state:r,actions:s,getters:c}=t,u=i.state.value[e];let o;function h(){u||(i.state.value[e]=r?r():{});const a=lb(i.state.value[e]);return yn(a,s,Object.keys(c||{}).reduce((l,f)=>(l[f]=zc(ot(()=>{Ia(i);const d=i._s.get(e);return c[f].call(d,d)})),l),{}))}return o=Ug(e,h,t,i,n,!0),o}function Ug(e,t,i={},n,r,s){let c;const u=yn({actions:{}},i),o={deep:!0};let h,a,l=[],f=[],d;const p=n.state.value[e];!s&&!p&&(n.state.value[e]={}),oi({});let g;function m(T){let $;h=a=!1,typeof T=="function"?(T(n.state.value[e]),$={type:Ts.patchFunction,storeId:e,events:d}):(oc(n.state.value[e],T),$={type:Ts.patchObject,payload:T,storeId:e,events:d});const C=g=Symbol();tn().then(()=>{g===C&&(h=!0)}),a=!0,fr(l,$,n.state.value[e])}const v=s?function(){const{state:$}=i,C=$?$():{};this.$patch(x=>{yn(x,C)})}:Hg;function y(){c.stop(),l=[],f=[],n._s.delete(e)}function S(T,$){return function(){Ia(n);const C=Array.from(arguments),x=[],L=[];function M(P){x.push(P)}function A(P){L.push(P)}fr(f,{args:C,name:T,store:_,after:M,onError:A});let k;try{k=$.apply(this&&this.$id===e?this:_,C)}catch(P){throw fr(L,P),P}return k instanceof Promise?k.then(P=>(fr(x,P),P)).catch(P=>(fr(L,P),Promise.reject(P))):(fr(x,k),k)}}const b={_p:n,$id:e,$onAction:Dh.bind(null,f),$patch:m,$reset:v,$subscribe(T,$={}){const C=Dh(l,T,$.detached,()=>x()),x=c.run(()=>wi(()=>n.state.value[e],L=>{($.flush==="sync"?a:h)&&T({storeId:e,type:Ts.direct,events:d},L)},yn({},o,$)));return C},$dispose:y},_=sr(b);n._s.set(e,_);const E=(n._a&&n._a.runWithContext||R_)(()=>n._e.run(()=>(c=Sa()).run(t)));for(const T in E){const $=E[T];if(at($)&&!N_($)||en($))s||(p&&O_($)&&(at($)?$.value=p[T]:oc($,p[T])),n.state.value[e][T]=$);else if(typeof $=="function"){const C=S(T,$);E[T]=C,u.actions[T]=$}}return yn(_,E),yn(Fe(_),E),Object.defineProperty(_,"$state",{get:()=>n.state.value[e],set:T=>{m($=>{yn($,T)})}}),n._p.forEach(T=>{yn(_,c.run(()=>T({store:_,app:n._a,pinia:n,options:u})))}),p&&s&&i.hydrate&&i.hydrate(_.$state,p),h=!0,a=!0,_}function F_(e,t,i){let n,r;const s=typeof t=="function";typeof e=="string"?(n=e,r=s?i:t):(r=e,n=e.id);function c(u,o){const h=t0();return u=u||(h?Qt(zg,null):null),u&&Ia(u),u=Vg,u._s.has(n)||(s?Ug(n,t,r,u):D_(n,r,u)),u._s.get(n)}return c.$id=n,c}let B_="Store";function TB(...e){return e.reduce((t,i)=>(t[i.$id+B_]=function(){return i(this.$pinia)},t),{})}function Wg(e,t){return Array.isArray(t)?t.reduce((i,n)=>(i[n]=function(){return e(this.$pinia)[n]},i),{}):Object.keys(t).reduce((i,n)=>(i[n]=function(){const r=e(this.$pinia),s=t[n];return typeof s=="function"?s.call(this,r):r[s]},i),{})}function jg(e,t){return Array.isArray(t)?t.reduce((i,n)=>(i[n]={get(){return e(this.$pinia)[n]},set(r){return e(this.$pinia)[n]=r}},i),{}):Object.keys(t).reduce((i,n)=>(i[n]={get(){return e(this.$pinia)[t[n]]},set(r){return e(this.$pinia)[t[n]]=r}},i),{})}/*!
  * shared v9.9.0
  * (c) 2024 kazuya kawaguchi
  * Released under the MIT License.
  */const ca=typeof window<"u",ln=(e,t=!1)=>t?Symbol.for(e):Symbol(e),V_=(e,t,i)=>z_({l:e,k:t,s:i}),z_=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),vt=e=>typeof e=="number"&&isFinite(e),H_=e=>qg(e)==="[object Date]",Rn=e=>qg(e)==="[object RegExp]",Oa=e=>Pe(e)&&Object.keys(e).length===0,kt=Object.assign;let Fh;const Ji=()=>Fh||(Fh=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Bh(e){return e.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}const U_=Object.prototype.hasOwnProperty;function ua(e,t){return U_.call(e,t)}const it=Array.isArray,Ze=e=>typeof e=="function",me=e=>typeof e=="string",Ne=e=>typeof e=="boolean",Ge=e=>e!==null&&typeof e=="object",W_=e=>Ge(e)&&Ze(e.then)&&Ze(e.catch),Gg=Object.prototype.toString,qg=e=>Gg.call(e),Pe=e=>{if(!Ge(e))return!1;const t=Object.getPrototypeOf(e);return t===null||t.constructor===Object},j_=e=>e==null?"":it(e)||Pe(e)&&e.toString===Gg?JSON.stringify(e,null,2):String(e);function G_(e,t=""){return e.reduce((i,n,r)=>r===0?i+n:i+t+n,"")}function lu(e){let t=e;return()=>++t}function q_(e,t){typeof console<"u"&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const So=e=>!Ge(e)||it(e);function Vo(e,t){if(So(e)||So(t))throw new Error("Invalid value");const i=[{src:e,des:t}];for(;i.length;){const{src:n,des:r}=i.pop();Object.keys(n).forEach(s=>{So(n[s])||So(r[s])?r[s]=n[s]:i.push({src:n[s],des:r[s]})})}}/*!
  * message-compiler v9.9.0
  * (c) 2024 kazuya kawaguchi
  * Released under the MIT License.
  */function K_(e,t,i){return{line:e,column:t,offset:i}}function ac(e,t,i){const n={start:e,end:t};return i!=null&&(n.source=i),n}const Y_=/\{([0-9a-zA-Z]+)\}/g;function X_(e,...t){return t.length===1&&Q_(t[0])&&(t=t[0]),(!t||!t.hasOwnProperty)&&(t={}),e.replace(Y_,(i,n)=>t.hasOwnProperty(n)?t[n]:"")}const Kg=Object.assign,Vh=e=>typeof e=="string",Q_=e=>e!==null&&typeof e=="object";function Yg(e,t=""){return e.reduce((i,n,r)=>r===0?i+n:i+t+n,"")}const Ee={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14,UNHANDLED_CODEGEN_NODE_TYPE:15,UNHANDLED_MINIFIER_NODE_TYPE:16,__EXTEND_POINT__:17},J_={[Ee.EXPECTED_TOKEN]:"Expected token: '{0}'",[Ee.INVALID_TOKEN_IN_PLACEHOLDER]:"Invalid token in placeholder: '{0}'",[Ee.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]:"Unterminated single quote in placeholder",[Ee.UNKNOWN_ESCAPE_SEQUENCE]:"Unknown escape sequence: \\{0}",[Ee.INVALID_UNICODE_ESCAPE_SEQUENCE]:"Invalid unicode escape sequence: {0}",[Ee.UNBALANCED_CLOSING_BRACE]:"Unbalanced closing brace",[Ee.UNTERMINATED_CLOSING_BRACE]:"Unterminated closing brace",[Ee.EMPTY_PLACEHOLDER]:"Empty placeholder",[Ee.NOT_ALLOW_NEST_PLACEHOLDER]:"Not allowed nest placeholder",[Ee.INVALID_LINKED_FORMAT]:"Invalid linked format",[Ee.MUST_HAVE_MESSAGES_IN_PLURAL]:"Plural must have messages",[Ee.UNEXPECTED_EMPTY_LINKED_MODIFIER]:"Unexpected empty linked modifier",[Ee.UNEXPECTED_EMPTY_LINKED_KEY]:"Unexpected empty linked key",[Ee.UNEXPECTED_LEXICAL_ANALYSIS]:"Unexpected lexical analysis in token: '{0}'",[Ee.UNHANDLED_CODEGEN_NODE_TYPE]:"unhandled codegen node type: '{0}'",[Ee.UNHANDLED_MINIFIER_NODE_TYPE]:"unhandled mimifier node type: '{0}'"};function Jr(e,t,i={}){const{domain:n,messages:r,args:s}=i,c=X_((r||J_)[e]||"",...s||[]),u=new SyntaxError(String(c));return u.code=e,t&&(u.location=t),u.domain=n,u}function Z_(e){throw e}const Wi=" ",ew="\r",Dt=`
`,tw=String.fromCharCode(8232),iw=String.fromCharCode(8233);function nw(e){const t=e;let i=0,n=1,r=1,s=0;const c=E=>t[E]===ew&&t[E+1]===Dt,u=E=>t[E]===Dt,o=E=>t[E]===iw,h=E=>t[E]===tw,a=E=>c(E)||u(E)||o(E)||h(E),l=()=>i,f=()=>n,d=()=>r,p=()=>s,g=E=>c(E)||o(E)||h(E)?Dt:t[E],m=()=>g(i),v=()=>g(i+s);function y(){return s=0,a(i)&&(n++,r=0),c(i)&&i++,i++,r++,t[i]}function S(){return c(i+s)&&s++,s++,t[i+s]}function b(){i=0,n=1,r=1,s=0}function _(E=0){s=E}function w(){const E=i+s;for(;E!==i;)y();s=0}return{index:l,line:f,column:d,peekOffset:p,charAt:g,currentChar:m,currentPeek:v,next:y,peek:S,reset:b,resetPeek:_,skipToPeek:w}}const dn=void 0,rw=".",zh="'",sw="tokenizer";function ow(e,t={}){const i=t.location!==!1,n=nw(e),r=()=>n.index(),s=()=>K_(n.line(),n.column(),n.index()),c=s(),u=r(),o={currentType:14,offset:u,startLoc:c,endLoc:c,lastType:14,lastOffset:u,lastStartLoc:c,lastEndLoc:c,braceNest:0,inLinked:!1,text:""},h=()=>o,{onError:a}=t;function l(I,R,F,...G){const X=h();if(R.column+=F,R.offset+=F,a){const re=i?ac(X.startLoc,R):null,he=Jr(I,re,{domain:sw,args:G});a(he)}}function f(I,R,F){I.endLoc=s(),I.currentType=R;const G={type:R};return i&&(G.loc=ac(I.startLoc,I.endLoc)),F!=null&&(G.value=F),G}const d=I=>f(I,14);function p(I,R){return I.currentChar()===R?(I.next(),R):(l(Ee.EXPECTED_TOKEN,s(),0,R),"")}function g(I){let R="";for(;I.currentPeek()===Wi||I.currentPeek()===Dt;)R+=I.currentPeek(),I.peek();return R}function m(I){const R=g(I);return I.skipToPeek(),R}function v(I){if(I===dn)return!1;const R=I.charCodeAt(0);return R>=97&&R<=122||R>=65&&R<=90||R===95}function y(I){if(I===dn)return!1;const R=I.charCodeAt(0);return R>=48&&R<=57}function S(I,R){const{currentType:F}=R;if(F!==2)return!1;g(I);const G=v(I.currentPeek());return I.resetPeek(),G}function b(I,R){const{currentType:F}=R;if(F!==2)return!1;g(I);const G=I.currentPeek()==="-"?I.peek():I.currentPeek(),X=y(G);return I.resetPeek(),X}function _(I,R){const{currentType:F}=R;if(F!==2)return!1;g(I);const G=I.currentPeek()===zh;return I.resetPeek(),G}function w(I,R){const{currentType:F}=R;if(F!==8)return!1;g(I);const G=I.currentPeek()===".";return I.resetPeek(),G}function E(I,R){const{currentType:F}=R;if(F!==9)return!1;g(I);const G=v(I.currentPeek());return I.resetPeek(),G}function T(I,R){const{currentType:F}=R;if(!(F===8||F===12))return!1;g(I);const G=I.currentPeek()===":";return I.resetPeek(),G}function $(I,R){const{currentType:F}=R;if(F!==10)return!1;const G=()=>{const re=I.currentPeek();return re==="{"?v(I.peek()):re==="@"||re==="%"||re==="|"||re===":"||re==="."||re===Wi||!re?!1:re===Dt?(I.peek(),G()):v(re)},X=G();return I.resetPeek(),X}function C(I){g(I);const R=I.currentPeek()==="|";return I.resetPeek(),R}function x(I){const R=g(I),F=I.currentPeek()==="%"&&I.peek()==="{";return I.resetPeek(),{isModulo:F,hasSpace:R.length>0}}function L(I,R=!0){const F=(X=!1,re="",he=!1)=>{const le=I.currentPeek();return le==="{"?re==="%"?!1:X:le==="@"||!le?re==="%"?!0:X:le==="%"?(I.peek(),F(X,"%",!0)):le==="|"?re==="%"||he?!0:!(re===Wi||re===Dt):le===Wi?(I.peek(),F(!0,Wi,he)):le===Dt?(I.peek(),F(!0,Dt,he)):!0},G=F();return R&&I.resetPeek(),G}function M(I,R){const F=I.currentChar();return F===dn?dn:R(F)?(I.next(),F):null}function A(I){return M(I,F=>{const G=F.charCodeAt(0);return G>=97&&G<=122||G>=65&&G<=90||G>=48&&G<=57||G===95||G===36})}function k(I){return M(I,F=>{const G=F.charCodeAt(0);return G>=48&&G<=57})}function P(I){return M(I,F=>{const G=F.charCodeAt(0);return G>=48&&G<=57||G>=65&&G<=70||G>=97&&G<=102})}function O(I){let R="",F="";for(;R=k(I);)F+=R;return F}function N(I){m(I);const R=I.currentChar();return R!=="%"&&l(Ee.EXPECTED_TOKEN,s(),0,R),I.next(),"%"}function D(I){let R="";for(;;){const F=I.currentChar();if(F==="{"||F==="}"||F==="@"||F==="|"||!F)break;if(F==="%")if(L(I))R+=F,I.next();else break;else if(F===Wi||F===Dt)if(L(I))R+=F,I.next();else{if(C(I))break;R+=F,I.next()}else R+=F,I.next()}return R}function B(I){m(I);let R="",F="";for(;R=A(I);)F+=R;return I.currentChar()===dn&&l(Ee.UNTERMINATED_CLOSING_BRACE,s(),0),F}function U(I){m(I);let R="";return I.currentChar()==="-"?(I.next(),R+=`-${O(I)}`):R+=O(I),I.currentChar()===dn&&l(Ee.UNTERMINATED_CLOSING_BRACE,s(),0),R}function q(I){m(I),p(I,"'");let R="",F="";const G=re=>re!==zh&&re!==Dt;for(;R=M(I,G);)R==="\\"?F+=H(I):F+=R;const X=I.currentChar();return X===Dt||X===dn?(l(Ee.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,s(),0),X===Dt&&(I.next(),p(I,"'")),F):(p(I,"'"),F)}function H(I){const R=I.currentChar();switch(R){case"\\":case"'":return I.next(),`\\${R}`;case"u":return j(I,R,4);case"U":return j(I,R,6);default:return l(Ee.UNKNOWN_ESCAPE_SEQUENCE,s(),0,R),""}}function j(I,R,F){p(I,R);let G="";for(let X=0;X<F;X++){const re=P(I);if(!re){l(Ee.INVALID_UNICODE_ESCAPE_SEQUENCE,s(),0,`\\${R}${G}${I.currentChar()}`);break}G+=re}return`\\${R}${G}`}function Y(I){m(I);let R="",F="";const G=X=>X!=="{"&&X!=="}"&&X!==Wi&&X!==Dt;for(;R=M(I,G);)F+=R;return F}function ie(I){let R="",F="";for(;R=A(I);)F+=R;return F}function W(I){const R=(F=!1,G)=>{const X=I.currentChar();return X==="{"||X==="%"||X==="@"||X==="|"||X==="("||X===")"||!X||X===Wi?G:X===Dt||X===rw?(G+=X,I.next(),R(F,G)):(G+=X,I.next(),R(!0,G))};return R(!1,"")}function K(I){m(I);const R=p(I,"|");return m(I),R}function Q(I,R){let F=null;switch(I.currentChar()){case"{":return R.braceNest>=1&&l(Ee.NOT_ALLOW_NEST_PLACEHOLDER,s(),0),I.next(),F=f(R,2,"{"),m(I),R.braceNest++,F;case"}":return R.braceNest>0&&R.currentType===2&&l(Ee.EMPTY_PLACEHOLDER,s(),0),I.next(),F=f(R,3,"}"),R.braceNest--,R.braceNest>0&&m(I),R.inLinked&&R.braceNest===0&&(R.inLinked=!1),F;case"@":return R.braceNest>0&&l(Ee.UNTERMINATED_CLOSING_BRACE,s(),0),F=ne(I,R)||d(R),R.braceNest=0,F;default:let X=!0,re=!0,he=!0;if(C(I))return R.braceNest>0&&l(Ee.UNTERMINATED_CLOSING_BRACE,s(),0),F=f(R,1,K(I)),R.braceNest=0,R.inLinked=!1,F;if(R.braceNest>0&&(R.currentType===5||R.currentType===6||R.currentType===7))return l(Ee.UNTERMINATED_CLOSING_BRACE,s(),0),R.braceNest=0,de(I,R);if(X=S(I,R))return F=f(R,5,B(I)),m(I),F;if(re=b(I,R))return F=f(R,6,U(I)),m(I),F;if(he=_(I,R))return F=f(R,7,q(I)),m(I),F;if(!X&&!re&&!he)return F=f(R,13,Y(I)),l(Ee.INVALID_TOKEN_IN_PLACEHOLDER,s(),0,F.value),m(I),F;break}return F}function ne(I,R){const{currentType:F}=R;let G=null;const X=I.currentChar();switch((F===8||F===9||F===12||F===10)&&(X===Dt||X===Wi)&&l(Ee.INVALID_LINKED_FORMAT,s(),0),X){case"@":return I.next(),G=f(R,8,"@"),R.inLinked=!0,G;case".":return m(I),I.next(),f(R,9,".");case":":return m(I),I.next(),f(R,10,":");default:return C(I)?(G=f(R,1,K(I)),R.braceNest=0,R.inLinked=!1,G):w(I,R)||T(I,R)?(m(I),ne(I,R)):E(I,R)?(m(I),f(R,12,ie(I))):$(I,R)?(m(I),X==="{"?Q(I,R)||G:f(R,11,W(I))):(F===8&&l(Ee.INVALID_LINKED_FORMAT,s(),0),R.braceNest=0,R.inLinked=!1,de(I,R))}}function de(I,R){let F={type:14};if(R.braceNest>0)return Q(I,R)||d(R);if(R.inLinked)return ne(I,R)||d(R);switch(I.currentChar()){case"{":return Q(I,R)||d(R);case"}":return l(Ee.UNBALANCED_CLOSING_BRACE,s(),0),I.next(),f(R,3,"}");case"@":return ne(I,R)||d(R);default:if(C(I))return F=f(R,1,K(I)),R.braceNest=0,R.inLinked=!1,F;const{isModulo:X,hasSpace:re}=x(I);if(X)return re?f(R,0,D(I)):f(R,4,N(I));if(L(I))return f(R,0,D(I));break}return F}function _e(){const{currentType:I,offset:R,startLoc:F,endLoc:G}=o;return o.lastType=I,o.lastOffset=R,o.lastStartLoc=F,o.lastEndLoc=G,o.offset=r(),o.startLoc=s(),n.currentChar()===dn?f(o,14):de(n,o)}return{nextToken:_e,currentOffset:r,currentPosition:s,context:h}}const aw="parser",lw=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function cw(e,t,i){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const n=parseInt(t||i,16);return n<=55295||n>=57344?String.fromCodePoint(n):"\uFFFD"}}}function uw(e={}){const t=e.location!==!1,{onError:i}=e;function n(v,y,S,b,..._){const w=v.currentPosition();if(w.offset+=b,w.column+=b,i){const E=t?ac(S,w):null,T=Jr(y,E,{domain:aw,args:_});i(T)}}function r(v,y,S){const b={type:v};return t&&(b.start=y,b.end=y,b.loc={start:S,end:S}),b}function s(v,y,S,b){b&&(v.type=b),t&&(v.end=y,v.loc&&(v.loc.end=S))}function c(v,y){const S=v.context(),b=r(3,S.offset,S.startLoc);return b.value=y,s(b,v.currentOffset(),v.currentPosition()),b}function u(v,y){const S=v.context(),{lastOffset:b,lastStartLoc:_}=S,w=r(5,b,_);return w.index=parseInt(y,10),v.nextToken(),s(w,v.currentOffset(),v.currentPosition()),w}function o(v,y){const S=v.context(),{lastOffset:b,lastStartLoc:_}=S,w=r(4,b,_);return w.key=y,v.nextToken(),s(w,v.currentOffset(),v.currentPosition()),w}function h(v,y){const S=v.context(),{lastOffset:b,lastStartLoc:_}=S,w=r(9,b,_);return w.value=y.replace(lw,cw),v.nextToken(),s(w,v.currentOffset(),v.currentPosition()),w}function a(v){const y=v.nextToken(),S=v.context(),{lastOffset:b,lastStartLoc:_}=S,w=r(8,b,_);return y.type!==12?(n(v,Ee.UNEXPECTED_EMPTY_LINKED_MODIFIER,S.lastStartLoc,0),w.value="",s(w,b,_),{nextConsumeToken:y,node:w}):(y.value==null&&n(v,Ee.UNEXPECTED_LEXICAL_ANALYSIS,S.lastStartLoc,0,Mi(y)),w.value=y.value||"",s(w,v.currentOffset(),v.currentPosition()),{node:w})}function l(v,y){const S=v.context(),b=r(7,S.offset,S.startLoc);return b.value=y,s(b,v.currentOffset(),v.currentPosition()),b}function f(v){const y=v.context(),S=r(6,y.offset,y.startLoc);let b=v.nextToken();if(b.type===9){const _=a(v);S.modifier=_.node,b=_.nextConsumeToken||v.nextToken()}switch(b.type!==10&&n(v,Ee.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,Mi(b)),b=v.nextToken(),b.type===2&&(b=v.nextToken()),b.type){case 11:b.value==null&&n(v,Ee.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,Mi(b)),S.key=l(v,b.value||"");break;case 5:b.value==null&&n(v,Ee.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,Mi(b)),S.key=o(v,b.value||"");break;case 6:b.value==null&&n(v,Ee.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,Mi(b)),S.key=u(v,b.value||"");break;case 7:b.value==null&&n(v,Ee.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,Mi(b)),S.key=h(v,b.value||"");break;default:n(v,Ee.UNEXPECTED_EMPTY_LINKED_KEY,y.lastStartLoc,0);const _=v.context(),w=r(7,_.offset,_.startLoc);return w.value="",s(w,_.offset,_.startLoc),S.key=w,s(S,_.offset,_.startLoc),{nextConsumeToken:b,node:S}}return s(S,v.currentOffset(),v.currentPosition()),{node:S}}function d(v){const y=v.context(),S=y.currentType===1?v.currentOffset():y.offset,b=y.currentType===1?y.endLoc:y.startLoc,_=r(2,S,b);_.items=[];let w=null;do{const $=w||v.nextToken();switch(w=null,$.type){case 0:$.value==null&&n(v,Ee.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,Mi($)),_.items.push(c(v,$.value||""));break;case 6:$.value==null&&n(v,Ee.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,Mi($)),_.items.push(u(v,$.value||""));break;case 5:$.value==null&&n(v,Ee.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,Mi($)),_.items.push(o(v,$.value||""));break;case 7:$.value==null&&n(v,Ee.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,Mi($)),_.items.push(h(v,$.value||""));break;case 8:const C=f(v);_.items.push(C.node),w=C.nextConsumeToken||null;break}}while(y.currentType!==14&&y.currentType!==1);const E=y.currentType===1?y.lastOffset:v.currentOffset(),T=y.currentType===1?y.lastEndLoc:v.currentPosition();return s(_,E,T),_}function p(v,y,S,b){const _=v.context();let w=b.items.length===0;const E=r(1,y,S);E.cases=[],E.cases.push(b);do{const T=d(v);w||(w=T.items.length===0),E.cases.push(T)}while(_.currentType!==14);return w&&n(v,Ee.MUST_HAVE_MESSAGES_IN_PLURAL,S,0),s(E,v.currentOffset(),v.currentPosition()),E}function g(v){const y=v.context(),{offset:S,startLoc:b}=y,_=d(v);return y.currentType===14?_:p(v,S,b,_)}function m(v){const y=ow(v,Kg({},e)),S=y.context(),b=r(0,S.offset,S.startLoc);return t&&b.loc&&(b.loc.source=v),b.body=g(y),e.onCacheKey&&(b.cacheKey=e.onCacheKey(v)),S.currentType!==14&&n(y,Ee.UNEXPECTED_LEXICAL_ANALYSIS,S.lastStartLoc,0,v[S.offset]||""),s(b,y.currentOffset(),y.currentPosition()),b}return{parse:m}}function Mi(e){if(e.type===14)return"EOF";const t=(e.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"\u2026":t}function hw(e,t={}){const i={ast:e,helpers:new Set};return{context:()=>i,helper:s=>(i.helpers.add(s),s)}}function Hh(e,t){for(let i=0;i<e.length;i++)cu(e[i],t)}function cu(e,t){switch(e.type){case 1:Hh(e.cases,t),t.helper("plural");break;case 2:Hh(e.items,t);break;case 6:cu(e.key,t),t.helper("linked"),t.helper("type");break;case 5:t.helper("interpolate"),t.helper("list");break;case 4:t.helper("interpolate"),t.helper("named");break}}function dw(e,t={}){const i=hw(e);i.helper("normalize"),e.body&&cu(e.body,i);const n=i.context();e.helpers=Array.from(n.helpers)}function fw(e){const t=e.body;return t.type===2?Uh(t):t.cases.forEach(i=>Uh(i)),e}function Uh(e){if(e.items.length===1){const t=e.items[0];(t.type===3||t.type===9)&&(e.static=t.value,delete t.value)}else{const t=[];for(let i=0;i<e.items.length;i++){const n=e.items[i];if(!(n.type===3||n.type===9)||n.value==null)break;t.push(n.value)}if(t.length===e.items.length){e.static=Yg(t);for(let i=0;i<e.items.length;i++){const n=e.items[i];(n.type===3||n.type===9)&&delete n.value}}}}const pw="minifier";function Sr(e){switch(e.t=e.type,e.type){case 0:const t=e;Sr(t.body),t.b=t.body,delete t.body;break;case 1:const i=e,n=i.cases;for(let a=0;a<n.length;a++)Sr(n[a]);i.c=n,delete i.cases;break;case 2:const r=e,s=r.items;for(let a=0;a<s.length;a++)Sr(s[a]);r.i=s,delete r.items,r.static&&(r.s=r.static,delete r.static);break;case 3:case 9:case 8:case 7:const c=e;c.value&&(c.v=c.value,delete c.value);break;case 6:const u=e;Sr(u.key),u.k=u.key,delete u.key,u.modifier&&(Sr(u.modifier),u.m=u.modifier,delete u.modifier);break;case 5:const o=e;o.i=o.index,delete o.index;break;case 4:const h=e;h.k=h.key,delete h.key;break;default:throw Jr(Ee.UNHANDLED_MINIFIER_NODE_TYPE,null,{domain:pw,args:[e.type]})}delete e.type}const gw="parser";function mw(e,t){const{sourceMap:i,filename:n,breakLineCode:r,needIndent:s}=t,c=t.location!==!1,u={filename:n,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:r,needIndent:s,indentLevel:0};c&&e.loc&&(u.source=e.loc.source);const o=()=>u;function h(m,v){u.code+=m}function a(m,v=!0){const y=v?r:"";h(s?y+"  ".repeat(m):y)}function l(m=!0){const v=++u.indentLevel;m&&a(v)}function f(m=!0){const v=--u.indentLevel;m&&a(v)}function d(){a(u.indentLevel)}return{context:o,push:h,indent:l,deindent:f,newline:d,helper:m=>`_${m}`,needIndent:()=>u.needIndent}}function vw(e,t){const{helper:i}=e;e.push(`${i("linked")}(`),Hr(e,t.key),t.modifier?(e.push(", "),Hr(e,t.modifier),e.push(", _type")):e.push(", undefined, _type"),e.push(")")}function yw(e,t){const{helper:i,needIndent:n}=e;e.push(`${i("normalize")}([`),e.indent(n());const r=t.items.length;for(let s=0;s<r&&(Hr(e,t.items[s]),s!==r-1);s++)e.push(", ");e.deindent(n()),e.push("])")}function bw(e,t){const{helper:i,needIndent:n}=e;if(t.cases.length>1){e.push(`${i("plural")}([`),e.indent(n());const r=t.cases.length;for(let s=0;s<r&&(Hr(e,t.cases[s]),s!==r-1);s++)e.push(", ");e.deindent(n()),e.push("])")}}function _w(e,t){t.body?Hr(e,t.body):e.push("null")}function Hr(e,t){const{helper:i}=e;switch(t.type){case 0:_w(e,t);break;case 1:bw(e,t);break;case 2:yw(e,t);break;case 6:vw(e,t);break;case 8:e.push(JSON.stringify(t.value),t);break;case 7:e.push(JSON.stringify(t.value),t);break;case 5:e.push(`${i("interpolate")}(${i("list")}(${t.index}))`,t);break;case 4:e.push(`${i("interpolate")}(${i("named")}(${JSON.stringify(t.key)}))`,t);break;case 9:e.push(JSON.stringify(t.value),t);break;case 3:e.push(JSON.stringify(t.value),t);break;default:throw Jr(Ee.UNHANDLED_CODEGEN_NODE_TYPE,null,{domain:gw,args:[t.type]})}}const ww=(e,t={})=>{const i=Vh(t.mode)?t.mode:"normal",n=Vh(t.filename)?t.filename:"message.intl",r=!!t.sourceMap,s=t.breakLineCode!=null?t.breakLineCode:i==="arrow"?";":`
`,c=t.needIndent?t.needIndent:i!=="arrow",u=e.helpers||[],o=mw(e,{mode:i,filename:n,sourceMap:r,breakLineCode:s,needIndent:c});o.push(i==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),o.indent(c),u.length>0&&(o.push(`const { ${Yg(u.map(l=>`${l}: _${l}`),", ")} } = ctx`),o.newline()),o.push("return "),Hr(o,e),o.deindent(c),o.push("}"),delete e.helpers;const{code:h,map:a}=o.context();return{ast:e,code:h,map:a?a.toJSON():void 0}};function Sw(e,t={}){const i=Kg({},t),n=!!i.jit,r=!!i.minify,s=i.optimize==null?!0:i.optimize,u=uw(i).parse(e);return n?(s&&fw(u),r&&Sr(u),{ast:u,code:""}):(dw(u,i),ww(u,i))}/*!
  * core-base v9.9.0
  * (c) 2024 kazuya kawaguchi
  * Released under the MIT License.
  */function Aw(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Ji().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_JIT_COMPILATION__!="boolean"&&(Ji().__INTLIFY_JIT_COMPILATION__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(Ji().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}const Nn=[];Nn[0]={w:[0],i:[3,0],["["]:[4],o:[7]};Nn[1]={w:[1],["."]:[2],["["]:[4],o:[7]};Nn[2]={w:[2],i:[3,0],[0]:[3,0]};Nn[3]={i:[3,0],[0]:[3,0],w:[1,1],["."]:[2,1],["["]:[4,1],o:[7,1]};Nn[4]={["'"]:[5,0],['"']:[6,0],["["]:[4,2],["]"]:[1,3],o:8,l:[4,0]};Nn[5]={["'"]:[4,0],o:8,l:[5,0]};Nn[6]={['"']:[4,0],o:8,l:[6,0]};const Cw=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function xw(e){return Cw.test(e)}function Tw(e){const t=e.charCodeAt(0),i=e.charCodeAt(e.length-1);return t===i&&(t===34||t===39)?e.slice(1,-1):e}function $w(e){if(e==null)return"o";switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function Mw(e){const t=e.trim();return e.charAt(0)==="0"&&isNaN(parseInt(e))?!1:xw(t)?Tw(t):"*"+t}function Ew(e){const t=[];let i=-1,n=0,r=0,s,c,u,o,h,a,l;const f=[];f[0]=()=>{c===void 0?c=u:c+=u},f[1]=()=>{c!==void 0&&(t.push(c),c=void 0)},f[2]=()=>{f[0](),r++},f[3]=()=>{if(r>0)r--,n=4,f[0]();else{if(r=0,c===void 0||(c=Mw(c),c===!1))return!1;f[1]()}};function d(){const p=e[i+1];if(n===5&&p==="'"||n===6&&p==='"')return i++,u="\\"+p,f[0](),!0}for(;n!==null;)if(i++,s=e[i],!(s==="\\"&&d())){if(o=$w(s),l=Nn[n],h=l[o]||l.l||8,h===8||(n=h[0],h[1]!==void 0&&(a=f[h[1]],a&&(u=s,a()===!1))))return;if(n===7)return t}}const Wh=new Map;function kw(e,t){return Ge(e)?e[t]:null}function Pw(e,t){if(!Ge(e))return null;let i=Wh.get(t);if(i||(i=Ew(t),i&&Wh.set(t,i)),!i)return null;const n=i.length;let r=e,s=0;for(;s<n;){const c=r[i[s]];if(c===void 0||Ze(r))return null;r=c,s++}return r}const Lw=e=>e,Rw=e=>"",Iw="text",Ow=e=>e.length===0?"":G_(e),Nw=j_;function jh(e,t){return e=Math.abs(e),t===2?e?e>1?1:0:1:e?Math.min(e,2):0}function Dw(e){const t=vt(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(vt(e.named.count)||vt(e.named.n))?vt(e.named.count)?e.named.count:vt(e.named.n)?e.named.n:t:t}function Fw(e,t){t.count||(t.count=e),t.n||(t.n=e)}function Bw(e={}){const t=e.locale,i=Dw(e),n=Ge(e.pluralRules)&&me(t)&&Ze(e.pluralRules[t])?e.pluralRules[t]:jh,r=Ge(e.pluralRules)&&me(t)&&Ze(e.pluralRules[t])?jh:void 0,s=v=>v[n(i,v.length,r)],c=e.list||[],u=v=>c[v],o=e.named||{};vt(e.pluralIndex)&&Fw(i,o);const h=v=>o[v];function a(v){const y=Ze(e.messages)?e.messages(v):Ge(e.messages)?e.messages[v]:!1;return y||(e.parent?e.parent.message(v):Rw)}const l=v=>e.modifiers?e.modifiers[v]:Lw,f=Pe(e.processor)&&Ze(e.processor.normalize)?e.processor.normalize:Ow,d=Pe(e.processor)&&Ze(e.processor.interpolate)?e.processor.interpolate:Nw,p=Pe(e.processor)&&me(e.processor.type)?e.processor.type:Iw,m={list:u,named:h,plural:s,linked:(v,...y)=>{const[S,b]=y;let _="text",w="";y.length===1?Ge(S)?(w=S.modifier||w,_=S.type||_):me(S)&&(w=S||w):y.length===2&&(me(S)&&(w=S||w),me(b)&&(_=b||_));const E=a(v)(m),T=_==="vnode"&&it(E)&&w?E[0]:E;return w?l(w)(T,_):T},message:a,type:p,interpolate:d,normalize:f,values:kt({},c,o)};return m}let Vs=null;function Vw(e){Vs=e}function zw(e,t,i){Vs&&Vs.emit("i18n:init",{timestamp:Date.now(),i18n:e,version:t,meta:i})}const Hw=Uw("function:translate");function Uw(e){return t=>Vs&&Vs.emit(e,t)}const Ww={NOT_FOUND_KEY:1,FALLBACK_TO_TRANSLATE:2,CANNOT_FORMAT_NUMBER:3,FALLBACK_TO_NUMBER_FORMAT:4,CANNOT_FORMAT_DATE:5,FALLBACK_TO_DATE_FORMAT:6,EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER:7,__EXTEND_POINT__:8},Xg=Ee.__EXTEND_POINT__,zn=lu(Xg),bi={INVALID_ARGUMENT:Xg,INVALID_DATE_ARGUMENT:zn(),INVALID_ISO_DATE_ARGUMENT:zn(),NOT_SUPPORT_NON_STRING_MESSAGE:zn(),NOT_SUPPORT_LOCALE_PROMISE_VALUE:zn(),NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:zn(),NOT_SUPPORT_LOCALE_TYPE:zn(),__EXTEND_POINT__:zn()};function Ii(e){return Jr(e,null,void 0)}function uu(e,t){return t.locale!=null?Gh(t.locale):Gh(e.locale)}let al;function Gh(e){if(me(e))return e;if(Ze(e)){if(e.resolvedOnce&&al!=null)return al;if(e.constructor.name==="Function"){const t=e();if(W_(t))throw Ii(bi.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return al=t}else throw Ii(bi.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw Ii(bi.NOT_SUPPORT_LOCALE_TYPE)}function jw(e,t,i){return[...new Set([i,...it(t)?t:Ge(t)?Object.keys(t):me(t)?[t]:[i]])]}function Qg(e,t,i){const n=me(i)?i:Ur,r=e;r.__localeChainCache||(r.__localeChainCache=new Map);let s=r.__localeChainCache.get(n);if(!s){s=[];let c=[i];for(;it(c);)c=qh(s,c,t);const u=it(t)||!Pe(t)?t:t.default?t.default:null;c=me(u)?[u]:u,it(c)&&qh(s,c,!1),r.__localeChainCache.set(n,s)}return s}function qh(e,t,i){let n=!0;for(let r=0;r<t.length&&Ne(n);r++){const s=t[r];me(s)&&(n=Gw(e,t[r],i))}return n}function Gw(e,t,i){let n;const r=t.split("-");do{const s=r.join("-");n=qw(e,s,i),r.splice(-1,1)}while(r.length&&n===!0);return n}function qw(e,t,i){let n=!1;if(!e.includes(t)&&(n=!0,t)){n=t[t.length-1]!=="!";const r=t.replace(/!/g,"");e.push(r),(it(i)||Pe(i))&&i[r]&&(n=i[r])}return n}const Kw="9.9.0",Na=-1,Ur="en-US",Kh="",Yh=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function Yw(){return{upper:(e,t)=>t==="text"&&me(e)?e.toUpperCase():t==="vnode"&&Ge(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>t==="text"&&me(e)?e.toLowerCase():t==="vnode"&&Ge(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>t==="text"&&me(e)?Yh(e):t==="vnode"&&Ge(e)&&"__v_isVNode"in e?Yh(e.children):e}}let Jg;function Xh(e){Jg=e}let Zg;function Xw(e){Zg=e}let em;function Qw(e){em=e}let tm=null;const Qh=e=>{tm=e},Jw=()=>tm;let im=null;const Jh=e=>{im=e},Zw=()=>im;let Zh=0;function e1(e={}){const t=Ze(e.onWarn)?e.onWarn:q_,i=me(e.version)?e.version:Kw,n=me(e.locale)||Ze(e.locale)?e.locale:Ur,r=Ze(n)?Ur:n,s=it(e.fallbackLocale)||Pe(e.fallbackLocale)||me(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:r,c=Pe(e.messages)?e.messages:{[r]:{}},u=Pe(e.datetimeFormats)?e.datetimeFormats:{[r]:{}},o=Pe(e.numberFormats)?e.numberFormats:{[r]:{}},h=kt({},e.modifiers||{},Yw()),a=e.pluralRules||{},l=Ze(e.missing)?e.missing:null,f=Ne(e.missingWarn)||Rn(e.missingWarn)?e.missingWarn:!0,d=Ne(e.fallbackWarn)||Rn(e.fallbackWarn)?e.fallbackWarn:!0,p=!!e.fallbackFormat,g=!!e.unresolving,m=Ze(e.postTranslation)?e.postTranslation:null,v=Pe(e.processor)?e.processor:null,y=Ne(e.warnHtmlMessage)?e.warnHtmlMessage:!0,S=!!e.escapeParameter,b=Ze(e.messageCompiler)?e.messageCompiler:Jg,_=Ze(e.messageResolver)?e.messageResolver:Zg||kw,w=Ze(e.localeFallbacker)?e.localeFallbacker:em||jw,E=Ge(e.fallbackContext)?e.fallbackContext:void 0,T=e,$=Ge(T.__datetimeFormatters)?T.__datetimeFormatters:new Map,C=Ge(T.__numberFormatters)?T.__numberFormatters:new Map,x=Ge(T.__meta)?T.__meta:{};Zh++;const L={version:i,cid:Zh,locale:n,fallbackLocale:s,messages:c,modifiers:h,pluralRules:a,missing:l,missingWarn:f,fallbackWarn:d,fallbackFormat:p,unresolving:g,postTranslation:m,processor:v,warnHtmlMessage:y,escapeParameter:S,messageCompiler:b,messageResolver:_,localeFallbacker:w,fallbackContext:E,onWarn:t,__meta:x};return L.datetimeFormats=u,L.numberFormats=o,L.__datetimeFormatters=$,L.__numberFormatters=C,__INTLIFY_PROD_DEVTOOLS__&&zw(L,i,x),L}function hu(e,t,i,n,r){const{missing:s,onWarn:c}=e;if(s!==null){const u=s(e,i,t,r);return me(u)?u:t}else return t}function os(e,t,i){const n=e;n.__localeChainCache=new Map,e.localeFallbacker(e,i,t)}function ll(e){return i=>t1(i,e)}function t1(e,t){const i=t.b||t.body;if((i.t||i.type)===1){const n=i,r=n.c||n.cases;return e.plural(r.reduce((s,c)=>[...s,ed(e,c)],[]))}else return ed(e,i)}function ed(e,t){const i=t.s||t.static;if(i)return e.type==="text"?i:e.normalize([i]);{const n=(t.i||t.items).reduce((r,s)=>[...r,lc(e,s)],[]);return e.normalize(n)}}function lc(e,t){const i=t.t||t.type;switch(i){case 3:const n=t;return n.v||n.value;case 9:const r=t;return r.v||r.value;case 4:const s=t;return e.interpolate(e.named(s.k||s.key));case 5:const c=t;return e.interpolate(e.list(c.i!=null?c.i:c.index));case 6:const u=t,o=u.m||u.modifier;return e.linked(lc(e,u.k||u.key),o?lc(e,o):void 0,e.type);case 7:const h=t;return h.v||h.value;case 8:const a=t;return a.v||a.value;default:throw new Error(`unhandled node type on format message part: ${i}`)}}const nm=e=>e;let Tr=Object.create(null);const Wr=e=>Ge(e)&&(e.t===0||e.type===0)&&("b"in e||"body"in e);function rm(e,t={}){let i=!1;const n=t.onError||Z_;return t.onError=r=>{i=!0,n(r)},{...Sw(e,t),detectError:i}}const i1=(e,t)=>{if(!me(e))throw Ii(bi.NOT_SUPPORT_NON_STRING_MESSAGE);{Ne(t.warnHtmlMessage)&&t.warnHtmlMessage;const n=(t.onCacheKey||nm)(e),r=Tr[n];if(r)return r;const{code:s,detectError:c}=rm(e,t),u=new Function(`return ${s}`)();return c?u:Tr[n]=u}};function n1(e,t){if(__INTLIFY_JIT_COMPILATION__&&!__INTLIFY_DROP_MESSAGE_COMPILER__&&me(e)){Ne(t.warnHtmlMessage)&&t.warnHtmlMessage;const n=(t.onCacheKey||nm)(e),r=Tr[n];if(r)return r;const{ast:s,detectError:c}=rm(e,{...t,location:!1,jit:!0}),u=ll(s);return c?u:Tr[n]=u}else{const i=e.cacheKey;if(i){const n=Tr[i];return n||(Tr[i]=ll(e))}else return ll(e)}}const td=()=>"",di=e=>Ze(e);function id(e,...t){const{fallbackFormat:i,postTranslation:n,unresolving:r,messageCompiler:s,fallbackLocale:c,messages:u}=e,[o,h]=cc(...t),a=Ne(h.missingWarn)?h.missingWarn:e.missingWarn,l=Ne(h.fallbackWarn)?h.fallbackWarn:e.fallbackWarn,f=Ne(h.escapeParameter)?h.escapeParameter:e.escapeParameter,d=!!h.resolvedMessage,p=me(h.default)||Ne(h.default)?Ne(h.default)?s?o:()=>o:h.default:i?s?o:()=>o:"",g=i||p!=="",m=uu(e,h);f&&r1(h);let[v,y,S]=d?[o,m,u[m]||{}]:sm(e,o,m,c,l,a),b=v,_=o;if(!d&&!(me(b)||Wr(b)||di(b))&&g&&(b=p,_=b),!d&&(!(me(b)||Wr(b)||di(b))||!me(y)))return r?Na:o;let w=!1;const E=()=>{w=!0},T=di(b)?b:om(e,o,y,b,_,E);if(w)return b;const $=a1(e,y,S,h),C=Bw($),x=s1(e,T,C),L=n?n(x,o):x;if(__INTLIFY_PROD_DEVTOOLS__){const M={timestamp:Date.now(),key:me(o)?o:di(b)?b.key:"",locale:y||(di(b)?b.locale:""),format:me(b)?b:di(b)?b.source:"",message:L};M.meta=kt({},e.__meta,Jw()||{}),Hw(M)}return L}function r1(e){it(e.list)?e.list=e.list.map(t=>me(t)?Bh(t):t):Ge(e.named)&&Object.keys(e.named).forEach(t=>{me(e.named[t])&&(e.named[t]=Bh(e.named[t]))})}function sm(e,t,i,n,r,s){const{messages:c,onWarn:u,messageResolver:o,localeFallbacker:h}=e,a=h(e,n,i);let l={},f,d=null;const p="translate";for(let g=0;g<a.length&&(f=a[g],l=c[f]||{},(d=o(l,t))===null&&(d=l[t]),!(me(d)||Wr(d)||di(d)));g++){const m=hu(e,t,f,s,p);m!==t&&(d=m)}return[d,f,l]}function om(e,t,i,n,r,s){const{messageCompiler:c,warnHtmlMessage:u}=e;if(di(n)){const h=n;return h.locale=h.locale||i,h.key=h.key||t,h}if(c==null){const h=()=>n;return h.locale=i,h.key=t,h}const o=c(n,o1(e,i,r,n,u,s));return o.locale=i,o.key=t,o.source=n,o}function s1(e,t,i){return t(i)}function cc(...e){const[t,i,n]=e,r={};if(!me(t)&&!vt(t)&&!di(t)&&!Wr(t))throw Ii(bi.INVALID_ARGUMENT);const s=vt(t)?String(t):(di(t),t);return vt(i)?r.plural=i:me(i)?r.default=i:Pe(i)&&!Oa(i)?r.named=i:it(i)&&(r.list=i),vt(n)?r.plural=n:me(n)?r.default=n:Pe(n)&&kt(r,n),[s,r]}function o1(e,t,i,n,r,s){return{locale:t,key:i,warnHtmlMessage:r,onError:c=>{throw s&&s(c),c},onCacheKey:c=>V_(t,i,c)}}function a1(e,t,i,n){const{modifiers:r,pluralRules:s,messageResolver:c,fallbackLocale:u,fallbackWarn:o,missingWarn:h,fallbackContext:a}=e,f={locale:t,modifiers:r,pluralRules:s,messages:d=>{let p=c(i,d);if(p==null&&a){const[,,g]=sm(a,d,t,u,o,h);p=c(g,d)}if(me(p)||Wr(p)){let g=!1;const v=om(e,d,t,p,d,()=>{g=!0});return g?td:v}else return di(p)?p:td}};return e.processor&&(f.processor=e.processor),n.list&&(f.list=n.list),n.named&&(f.named=n.named),vt(n.plural)&&(f.pluralIndex=n.plural),f}function nd(e,...t){const{datetimeFormats:i,unresolving:n,fallbackLocale:r,onWarn:s,localeFallbacker:c}=e,{__datetimeFormatters:u}=e,[o,h,a,l]=uc(...t),f=Ne(a.missingWarn)?a.missingWarn:e.missingWarn;Ne(a.fallbackWarn)?a.fallbackWarn:e.fallbackWarn;const d=!!a.part,p=uu(e,a),g=c(e,r,p);if(!me(o)||o==="")return new Intl.DateTimeFormat(p,l).format(h);let m={},v,y=null;const S="datetime format";for(let w=0;w<g.length&&(v=g[w],m=i[v]||{},y=m[o],!Pe(y));w++)hu(e,o,v,f,S);if(!Pe(y)||!me(v))return n?Na:o;let b=`${v}__${o}`;Oa(l)||(b=`${b}__${JSON.stringify(l)}`);let _=u.get(b);return _||(_=new Intl.DateTimeFormat(v,kt({},y,l)),u.set(b,_)),d?_.formatToParts(h):_.format(h)}const am=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function uc(...e){const[t,i,n,r]=e,s={};let c={},u;if(me(t)){const o=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!o)throw Ii(bi.INVALID_ISO_DATE_ARGUMENT);const h=o[3]?o[3].trim().startsWith("T")?`${o[1].trim()}${o[3].trim()}`:`${o[1].trim()}T${o[3].trim()}`:o[1].trim();u=new Date(h);try{u.toISOString()}catch{throw Ii(bi.INVALID_ISO_DATE_ARGUMENT)}}else if(H_(t)){if(isNaN(t.getTime()))throw Ii(bi.INVALID_DATE_ARGUMENT);u=t}else if(vt(t))u=t;else throw Ii(bi.INVALID_ARGUMENT);return me(i)?s.key=i:Pe(i)&&Object.keys(i).forEach(o=>{am.includes(o)?c[o]=i[o]:s[o]=i[o]}),me(n)?s.locale=n:Pe(n)&&(c=n),Pe(r)&&(c=r),[s.key||"",u,s,c]}function rd(e,t,i){const n=e;for(const r in i){const s=`${t}__${r}`;!n.__datetimeFormatters.has(s)||n.__datetimeFormatters.delete(s)}}function sd(e,...t){const{numberFormats:i,unresolving:n,fallbackLocale:r,onWarn:s,localeFallbacker:c}=e,{__numberFormatters:u}=e,[o,h,a,l]=hc(...t),f=Ne(a.missingWarn)?a.missingWarn:e.missingWarn;Ne(a.fallbackWarn)?a.fallbackWarn:e.fallbackWarn;const d=!!a.part,p=uu(e,a),g=c(e,r,p);if(!me(o)||o==="")return new Intl.NumberFormat(p,l).format(h);let m={},v,y=null;const S="number format";for(let w=0;w<g.length&&(v=g[w],m=i[v]||{},y=m[o],!Pe(y));w++)hu(e,o,v,f,S);if(!Pe(y)||!me(v))return n?Na:o;let b=`${v}__${o}`;Oa(l)||(b=`${b}__${JSON.stringify(l)}`);let _=u.get(b);return _||(_=new Intl.NumberFormat(v,kt({},y,l)),u.set(b,_)),d?_.formatToParts(h):_.format(h)}const lm=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function hc(...e){const[t,i,n,r]=e,s={};let c={};if(!vt(t))throw Ii(bi.INVALID_ARGUMENT);const u=t;return me(i)?s.key=i:Pe(i)&&Object.keys(i).forEach(o=>{lm.includes(o)?c[o]=i[o]:s[o]=i[o]}),me(n)?s.locale=n:Pe(n)&&(c=n),Pe(r)&&(c=r),[s.key||"",u,s,c]}function od(e,t,i){const n=e;for(const r in i){const s=`${t}__${r}`;!n.__numberFormatters.has(s)||n.__numberFormatters.delete(s)}}Aw();/*!
  * vue-i18n v9.9.0
  * (c) 2024 kazuya kawaguchi
  * Released under the MIT License.
  */const l1="9.9.0";function c1(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(Ji().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(Ji().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_JIT_COMPILATION__!="boolean"&&(Ji().__INTLIFY_JIT_COMPILATION__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(Ji().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Ji().__INTLIFY_PROD_DEVTOOLS__=!1)}const cm=Ww.__EXTEND_POINT__,fn=lu(cm);fn(),fn(),fn(),fn(),fn(),fn(),fn(),fn();const um=bi.__EXTEND_POINT__,jt=lu(um),bt={UNEXPECTED_RETURN_TYPE:um,INVALID_ARGUMENT:jt(),MUST_BE_CALL_SETUP_TOP:jt(),NOT_INSTALLED:jt(),NOT_AVAILABLE_IN_LEGACY_MODE:jt(),REQUIRED_VALUE:jt(),INVALID_VALUE:jt(),CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:jt(),NOT_INSTALLED_WITH_PROVIDE:jt(),UNEXPECTED_ERROR:jt(),NOT_COMPATIBLE_LEGACY_VUE_I18N:jt(),BRIDGE_SUPPORT_VUE_2_ONLY:jt(),MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION:jt(),NOT_AVAILABLE_COMPOSITION_IN_LEGACY:jt(),__EXTEND_POINT__:jt()};function wt(e,...t){return Jr(e,null,void 0)}const dc=ln("__translateVNode"),fc=ln("__datetimeParts"),pc=ln("__numberParts"),hm=ln("__setPluralRules");ln("__intlifyMeta");const dm=ln("__injectWithOption"),gc=ln("__dispose");function zs(e){if(!Ge(e))return e;for(const t in e)if(!!ua(e,t))if(!t.includes("."))Ge(e[t])&&zs(e[t]);else{const i=t.split("."),n=i.length-1;let r=e,s=!1;for(let c=0;c<n;c++){if(i[c]in r||(r[i[c]]={}),!Ge(r[i[c]])){s=!0;break}r=r[i[c]]}s||(r[i[n]]=e[t],delete e[t]),Ge(r[i[n]])&&zs(r[i[n]])}return e}function Da(e,t){const{messages:i,__i18n:n,messageResolver:r,flatJson:s}=t,c=Pe(i)?i:it(n)?{}:{[e]:{}};if(it(n)&&n.forEach(u=>{if("locale"in u&&"resource"in u){const{locale:o,resource:h}=u;o?(c[o]=c[o]||{},Vo(h,c[o])):Vo(h,c)}else me(u)&&Vo(JSON.parse(u),c)}),r==null&&s)for(const u in c)ua(c,u)&&zs(c[u]);return c}function fm(e){return e.type}function pm(e,t,i){let n=Ge(t.messages)?t.messages:{};"__i18nGlobal"in i&&(n=Da(e.locale.value,{messages:n,__i18n:i.__i18nGlobal}));const r=Object.keys(n);r.length&&r.forEach(s=>{e.mergeLocaleMessage(s,n[s])});{if(Ge(t.datetimeFormats)){const s=Object.keys(t.datetimeFormats);s.length&&s.forEach(c=>{e.mergeDateTimeFormat(c,t.datetimeFormats[c])})}if(Ge(t.numberFormats)){const s=Object.keys(t.numberFormats);s.length&&s.forEach(c=>{e.mergeNumberFormat(c,t.numberFormats[c])})}}}function ad(e){return ve(Mn,null,e,0)}const ld="__INTLIFY_META__",cd=()=>[],u1=()=>!1;let ud=0;function hd(e){return(t,i,n,r)=>e(i,n,Ot()||void 0,r)}const h1=()=>{const e=Ot();let t=null;return e&&(t=fm(e)[ld])?{[ld]:t}:null};function du(e={},t){const{__root:i,__injectWithOption:n}=e,r=i===void 0,s=e.flatJson,c=ca?oi:Ma;let u=Ne(e.inheritLocale)?e.inheritLocale:!0;const o=c(i&&u?i.locale.value:me(e.locale)?e.locale:Ur),h=c(i&&u?i.fallbackLocale.value:me(e.fallbackLocale)||it(e.fallbackLocale)||Pe(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:o.value),a=c(Da(o.value,e)),l=c(Pe(e.datetimeFormats)?e.datetimeFormats:{[o.value]:{}}),f=c(Pe(e.numberFormats)?e.numberFormats:{[o.value]:{}});let d=i?i.missingWarn:Ne(e.missingWarn)||Rn(e.missingWarn)?e.missingWarn:!0,p=i?i.fallbackWarn:Ne(e.fallbackWarn)||Rn(e.fallbackWarn)?e.fallbackWarn:!0,g=i?i.fallbackRoot:Ne(e.fallbackRoot)?e.fallbackRoot:!0,m=!!e.fallbackFormat,v=Ze(e.missing)?e.missing:null,y=Ze(e.missing)?hd(e.missing):null,S=Ze(e.postTranslation)?e.postTranslation:null,b=i?i.warnHtmlMessage:Ne(e.warnHtmlMessage)?e.warnHtmlMessage:!0,_=!!e.escapeParameter;const w=i?i.modifiers:Pe(e.modifiers)?e.modifiers:{};let E=e.pluralRules||i&&i.pluralRules,T;T=(()=>{r&&Jh(null);const z={version:l1,locale:o.value,fallbackLocale:h.value,messages:a.value,modifiers:w,pluralRules:E,missing:y===null?void 0:y,missingWarn:d,fallbackWarn:p,fallbackFormat:m,unresolving:!0,postTranslation:S===null?void 0:S,warnHtmlMessage:b,escapeParameter:_,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};z.datetimeFormats=l.value,z.numberFormats=f.value,z.__datetimeFormatters=Pe(T)?T.__datetimeFormatters:void 0,z.__numberFormatters=Pe(T)?T.__numberFormatters:void 0;const J=e1(z);return r&&Jh(J),J})(),os(T,o.value,h.value);function C(){return[o.value,h.value,a.value,l.value,f.value]}const x=ot({get:()=>o.value,set:z=>{o.value=z,T.locale=o.value}}),L=ot({get:()=>h.value,set:z=>{h.value=z,T.fallbackLocale=h.value,os(T,o.value,z)}}),M=ot(()=>a.value),A=ot(()=>l.value),k=ot(()=>f.value);function P(){return Ze(S)?S:null}function O(z){S=z,T.postTranslation=z}function N(){return v}function D(z){z!==null&&(y=hd(z)),v=z,T.missing=y}const B=(z,J,ue,ge,Ce,Ie)=>{C();let Me;try{__INTLIFY_PROD_DEVTOOLS__&&Qh(h1()),r||(T.fallbackContext=i?Zw():void 0),Me=z(T)}finally{__INTLIFY_PROD_DEVTOOLS__&&Qh(null),r||(T.fallbackContext=void 0)}if(ue!=="translate exists"&&vt(Me)&&Me===Na||ue==="translate exists"&&!Me){const[Re,tt]=J();return i&&g?ge(i):Ce(Re)}else{if(Ie(Me))return Me;throw wt(bt.UNEXPECTED_RETURN_TYPE)}};function U(...z){return B(J=>Reflect.apply(id,null,[J,...z]),()=>cc(...z),"translate",J=>Reflect.apply(J.t,J,[...z]),J=>J,J=>me(J))}function q(...z){const[J,ue,ge]=z;if(ge&&!Ge(ge))throw wt(bt.INVALID_ARGUMENT);return U(J,ue,kt({resolvedMessage:!0},ge||{}))}function H(...z){return B(J=>Reflect.apply(nd,null,[J,...z]),()=>uc(...z),"datetime format",J=>Reflect.apply(J.d,J,[...z]),()=>Kh,J=>me(J))}function j(...z){return B(J=>Reflect.apply(sd,null,[J,...z]),()=>hc(...z),"number format",J=>Reflect.apply(J.n,J,[...z]),()=>Kh,J=>me(J))}function Y(z){return z.map(J=>me(J)||vt(J)||Ne(J)?ad(String(J)):J)}const W={normalize:Y,interpolate:z=>z,type:"vnode"};function K(...z){return B(J=>{let ue;const ge=J;try{ge.processor=W,ue=Reflect.apply(id,null,[ge,...z])}finally{ge.processor=null}return ue},()=>cc(...z),"translate",J=>J[dc](...z),J=>[ad(J)],J=>it(J))}function Q(...z){return B(J=>Reflect.apply(sd,null,[J,...z]),()=>hc(...z),"number format",J=>J[pc](...z),cd,J=>me(J)||it(J))}function ne(...z){return B(J=>Reflect.apply(nd,null,[J,...z]),()=>uc(...z),"datetime format",J=>J[fc](...z),cd,J=>me(J)||it(J))}function de(z){E=z,T.pluralRules=E}function _e(z,J){return B(()=>{if(!z)return!1;const ue=me(J)?J:o.value,ge=F(ue),Ce=T.messageResolver(ge,z);return Wr(Ce)||di(Ce)||me(Ce)},()=>[z],"translate exists",ue=>Reflect.apply(ue.te,ue,[z,J]),u1,ue=>Ne(ue))}function I(z){let J=null;const ue=Qg(T,h.value,o.value);for(let ge=0;ge<ue.length;ge++){const Ce=a.value[ue[ge]]||{},Ie=T.messageResolver(Ce,z);if(Ie!=null){J=Ie;break}}return J}function R(z){const J=I(z);return J!=null?J:i?i.tm(z)||{}:{}}function F(z){return a.value[z]||{}}function G(z,J){if(s){const ue={[z]:J};for(const ge in ue)ua(ue,ge)&&zs(ue[ge]);J=ue[z]}a.value[z]=J,T.messages=a.value}function X(z,J){a.value[z]=a.value[z]||{};const ue={[z]:J};for(const ge in ue)ua(ue,ge)&&zs(ue[ge]);J=ue[z],Vo(J,a.value[z]),T.messages=a.value}function re(z){return l.value[z]||{}}function he(z,J){l.value[z]=J,T.datetimeFormats=l.value,rd(T,z,J)}function le(z,J){l.value[z]=kt(l.value[z]||{},J),T.datetimeFormats=l.value,rd(T,z,J)}function fe(z){return f.value[z]||{}}function oe(z,J){f.value[z]=J,T.numberFormats=f.value,od(T,z,J)}function Z(z,J){f.value[z]=kt(f.value[z]||{},J),T.numberFormats=f.value,od(T,z,J)}ud++,i&&ca&&(wi(i.locale,z=>{u&&(o.value=z,T.locale=z,os(T,o.value,h.value))}),wi(i.fallbackLocale,z=>{u&&(h.value=z,T.fallbackLocale=z,os(T,o.value,h.value))}));const te={id:ud,locale:x,fallbackLocale:L,get inheritLocale(){return u},set inheritLocale(z){u=z,z&&i&&(o.value=i.locale.value,h.value=i.fallbackLocale.value,os(T,o.value,h.value))},get availableLocales(){return Object.keys(a.value).sort()},messages:M,get modifiers(){return w},get pluralRules(){return E||{}},get isGlobal(){return r},get missingWarn(){return d},set missingWarn(z){d=z,T.missingWarn=d},get fallbackWarn(){return p},set fallbackWarn(z){p=z,T.fallbackWarn=p},get fallbackRoot(){return g},set fallbackRoot(z){g=z},get fallbackFormat(){return m},set fallbackFormat(z){m=z,T.fallbackFormat=m},get warnHtmlMessage(){return b},set warnHtmlMessage(z){b=z,T.warnHtmlMessage=z},get escapeParameter(){return _},set escapeParameter(z){_=z,T.escapeParameter=z},t:U,getLocaleMessage:F,setLocaleMessage:G,mergeLocaleMessage:X,getPostTranslationHandler:P,setPostTranslationHandler:O,getMissingHandler:N,setMissingHandler:D,[hm]:de};return te.datetimeFormats=A,te.numberFormats=k,te.rt=q,te.te=_e,te.tm=R,te.d=H,te.n=j,te.getDateTimeFormat=re,te.setDateTimeFormat=he,te.mergeDateTimeFormat=le,te.getNumberFormat=fe,te.setNumberFormat=oe,te.mergeNumberFormat=Z,te[dm]=n,te[dc]=K,te[fc]=ne,te[pc]=Q,te}function d1(e){const t=me(e.locale)?e.locale:Ur,i=me(e.fallbackLocale)||it(e.fallbackLocale)||Pe(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,n=Ze(e.missing)?e.missing:void 0,r=Ne(e.silentTranslationWarn)||Rn(e.silentTranslationWarn)?!e.silentTranslationWarn:!0,s=Ne(e.silentFallbackWarn)||Rn(e.silentFallbackWarn)?!e.silentFallbackWarn:!0,c=Ne(e.fallbackRoot)?e.fallbackRoot:!0,u=!!e.formatFallbackMessages,o=Pe(e.modifiers)?e.modifiers:{},h=e.pluralizationRules,a=Ze(e.postTranslation)?e.postTranslation:void 0,l=me(e.warnHtmlInMessage)?e.warnHtmlInMessage!=="off":!0,f=!!e.escapeParameterHtml,d=Ne(e.sync)?e.sync:!0;let p=e.messages;if(Pe(e.sharedMessages)){const _=e.sharedMessages;p=Object.keys(_).reduce((E,T)=>{const $=E[T]||(E[T]={});return kt($,_[T]),E},p||{})}const{__i18n:g,__root:m,__injectWithOption:v}=e,y=e.datetimeFormats,S=e.numberFormats,b=e.flatJson;return{locale:t,fallbackLocale:i,messages:p,flatJson:b,datetimeFormats:y,numberFormats:S,missing:n,missingWarn:r,fallbackWarn:s,fallbackRoot:c,fallbackFormat:u,modifiers:o,pluralRules:h,postTranslation:a,warnHtmlMessage:l,escapeParameter:f,messageResolver:e.messageResolver,inheritLocale:d,__i18n:g,__root:m,__injectWithOption:v}}function mc(e={},t){{const i=du(d1(e)),{__extender:n}=e,r={id:i.id,get locale(){return i.locale.value},set locale(s){i.locale.value=s},get fallbackLocale(){return i.fallbackLocale.value},set fallbackLocale(s){i.fallbackLocale.value=s},get messages(){return i.messages.value},get datetimeFormats(){return i.datetimeFormats.value},get numberFormats(){return i.numberFormats.value},get availableLocales(){return i.availableLocales},get formatter(){return{interpolate(){return[]}}},set formatter(s){},get missing(){return i.getMissingHandler()},set missing(s){i.setMissingHandler(s)},get silentTranslationWarn(){return Ne(i.missingWarn)?!i.missingWarn:i.missingWarn},set silentTranslationWarn(s){i.missingWarn=Ne(s)?!s:s},get silentFallbackWarn(){return Ne(i.fallbackWarn)?!i.fallbackWarn:i.fallbackWarn},set silentFallbackWarn(s){i.fallbackWarn=Ne(s)?!s:s},get modifiers(){return i.modifiers},get formatFallbackMessages(){return i.fallbackFormat},set formatFallbackMessages(s){i.fallbackFormat=s},get postTranslation(){return i.getPostTranslationHandler()},set postTranslation(s){i.setPostTranslationHandler(s)},get sync(){return i.inheritLocale},set sync(s){i.inheritLocale=s},get warnHtmlInMessage(){return i.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(s){i.warnHtmlMessage=s!=="off"},get escapeParameterHtml(){return i.escapeParameter},set escapeParameterHtml(s){i.escapeParameter=s},get preserveDirectiveContent(){return!0},set preserveDirectiveContent(s){},get pluralizationRules(){return i.pluralRules||{}},__composer:i,t(...s){const[c,u,o]=s,h={};let a=null,l=null;if(!me(c))throw wt(bt.INVALID_ARGUMENT);const f=c;return me(u)?h.locale=u:it(u)?a=u:Pe(u)&&(l=u),it(o)?a=o:Pe(o)&&(l=o),Reflect.apply(i.t,i,[f,a||l||{},h])},rt(...s){return Reflect.apply(i.rt,i,[...s])},tc(...s){const[c,u,o]=s,h={plural:1};let a=null,l=null;if(!me(c))throw wt(bt.INVALID_ARGUMENT);const f=c;return me(u)?h.locale=u:vt(u)?h.plural=u:it(u)?a=u:Pe(u)&&(l=u),me(o)?h.locale=o:it(o)?a=o:Pe(o)&&(l=o),Reflect.apply(i.t,i,[f,a||l||{},h])},te(s,c){return i.te(s,c)},tm(s){return i.tm(s)},getLocaleMessage(s){return i.getLocaleMessage(s)},setLocaleMessage(s,c){i.setLocaleMessage(s,c)},mergeLocaleMessage(s,c){i.mergeLocaleMessage(s,c)},d(...s){return Reflect.apply(i.d,i,[...s])},getDateTimeFormat(s){return i.getDateTimeFormat(s)},setDateTimeFormat(s,c){i.setDateTimeFormat(s,c)},mergeDateTimeFormat(s,c){i.mergeDateTimeFormat(s,c)},n(...s){return Reflect.apply(i.n,i,[...s])},getNumberFormat(s){return i.getNumberFormat(s)},setNumberFormat(s,c){i.setNumberFormat(s,c)},mergeNumberFormat(s,c){i.mergeNumberFormat(s,c)},getChoiceIndex(s,c){return-1}};return r.__extender=n,r}}const fu={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function f1({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((n,r)=>[...n,...r.type===Oe?r.children:[r]],[]):t.reduce((i,n)=>{const r=e[n];return r&&(i[n]=r()),i},{})}function gm(e){return Oe}const p1=ar({name:"i18n-t",props:kt({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>vt(e)||!isNaN(e)}},fu),setup(e,t){const{slots:i,attrs:n}=t,r=e.i18n||pu({useScope:e.scope,__useComponent:!0});return()=>{const s=Object.keys(i).filter(l=>l!=="_"),c={};e.locale&&(c.locale=e.locale),e.plural!==void 0&&(c.plural=me(e.plural)?+e.plural:e.plural);const u=f1(t,s),o=r[dc](e.keypath,u,c),h=kt({},n),a=me(e.tag)||Ge(e.tag)?e.tag:gm();return Zs(a,h,o)}}}),dd=p1;function g1(e){return it(e)&&!me(e[0])}function mm(e,t,i,n){const{slots:r,attrs:s}=t;return()=>{const c={part:!0};let u={};e.locale&&(c.locale=e.locale),me(e.format)?c.key=e.format:Ge(e.format)&&(me(e.format.key)&&(c.key=e.format.key),u=Object.keys(e.format).reduce((f,d)=>i.includes(d)?kt({},f,{[d]:e.format[d]}):f,{}));const o=n(e.value,c,u);let h=[c.key];it(o)?h=o.map((f,d)=>{const p=r[f.type],g=p?p({[f.type]:f.value,index:d,parts:o}):[f.value];return g1(g)&&(g[0].key=`${f.type}-${d}`),g}):me(o)&&(h=[o]);const a=kt({},s),l=me(e.tag)||Ge(e.tag)?e.tag:gm();return Zs(l,a,h)}}const m1=ar({name:"i18n-n",props:kt({value:{type:Number,required:!0},format:{type:[String,Object]}},fu),setup(e,t){const i=e.i18n||pu({useScope:"parent",__useComponent:!0});return mm(e,t,lm,(...n)=>i[pc](...n))}}),fd=m1,v1=ar({name:"i18n-d",props:kt({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},fu),setup(e,t){const i=e.i18n||pu({useScope:"parent",__useComponent:!0});return mm(e,t,am,(...n)=>i[fc](...n))}}),pd=v1;function y1(e,t){const i=e;if(e.mode==="composition")return i.__getInstance(t)||e.global;{const n=i.__getInstance(t);return n!=null?n.__composer:e.global.__composer}}function b1(e){const t=c=>{const{instance:u,modifiers:o,value:h}=c;if(!u||!u.$)throw wt(bt.UNEXPECTED_ERROR);const a=y1(e,u.$),l=gd(h);return[Reflect.apply(a.t,a,[...md(l)]),a]};return{created:(c,u)=>{const[o,h]=t(u);ca&&e.global===h&&(c.__i18nWatcher=wi(h.locale,()=>{u.instance&&u.instance.$forceUpdate()})),c.__composer=h,c.textContent=o},unmounted:c=>{ca&&c.__i18nWatcher&&(c.__i18nWatcher(),c.__i18nWatcher=void 0,delete c.__i18nWatcher),c.__composer&&(c.__composer=void 0,delete c.__composer)},beforeUpdate:(c,{value:u})=>{if(c.__composer){const o=c.__composer,h=gd(u);c.textContent=Reflect.apply(o.t,o,[...md(h)])}},getSSRProps:c=>{const[u]=t(c);return{textContent:u}}}}function gd(e){if(me(e))return{path:e};if(Pe(e)){if(!("path"in e))throw wt(bt.REQUIRED_VALUE,"path");return e}else throw wt(bt.INVALID_VALUE)}function md(e){const{path:t,locale:i,args:n,choice:r,plural:s}=e,c={},u=n||{};return me(i)&&(c.locale=i),vt(r)&&(c.plural=r),vt(s)&&(c.plural=s),[t,u,c]}function _1(e,t,...i){const n=Pe(i[0])?i[0]:{},r=!!n.useI18nComponentName;(Ne(n.globalInstall)?n.globalInstall:!0)&&([r?"i18n":dd.name,"I18nT"].forEach(c=>e.component(c,dd)),[fd.name,"I18nN"].forEach(c=>e.component(c,fd)),[pd.name,"I18nD"].forEach(c=>e.component(c,pd))),e.directive("t",b1(t))}function w1(e,t,i){return{beforeCreate(){const n=Ot();if(!n)throw wt(bt.UNEXPECTED_ERROR);const r=this.$options;if(r.i18n){const s=r.i18n;if(r.__i18n&&(s.__i18n=r.__i18n),s.__root=t,this===this.$root)this.$i18n=vd(e,s);else{s.__injectWithOption=!0,s.__extender=i.__vueI18nExtend,this.$i18n=mc(s);const c=this.$i18n;c.__extender&&(c.__disposer=c.__extender(this.$i18n))}}else if(r.__i18n)if(this===this.$root)this.$i18n=vd(e,r);else{this.$i18n=mc({__i18n:r.__i18n,__injectWithOption:!0,__extender:i.__vueI18nExtend,__root:t});const s=this.$i18n;s.__extender&&(s.__disposer=s.__extender(this.$i18n))}else this.$i18n=e;r.__i18nGlobal&&pm(t,r,r),this.$t=(...s)=>this.$i18n.t(...s),this.$rt=(...s)=>this.$i18n.rt(...s),this.$tc=(...s)=>this.$i18n.tc(...s),this.$te=(s,c)=>this.$i18n.te(s,c),this.$d=(...s)=>this.$i18n.d(...s),this.$n=(...s)=>this.$i18n.n(...s),this.$tm=s=>this.$i18n.tm(s),i.__setInstance(n,this.$i18n)},mounted(){},unmounted(){const n=Ot();if(!n)throw wt(bt.UNEXPECTED_ERROR);const r=this.$i18n;delete this.$t,delete this.$rt,delete this.$tc,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,r.__disposer&&(r.__disposer(),delete r.__disposer,delete r.__extender),i.__deleteInstance(n),delete this.$i18n}}}function vd(e,t){e.locale=t.locale||e.locale,e.fallbackLocale=t.fallbackLocale||e.fallbackLocale,e.missing=t.missing||e.missing,e.silentTranslationWarn=t.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=t.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=t.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=t.postTranslation||e.postTranslation,e.warnHtmlInMessage=t.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=t.escapeParameterHtml||e.escapeParameterHtml,e.sync=t.sync||e.sync,e.__composer[hm](t.pluralizationRules||e.pluralizationRules);const i=Da(e.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(i).forEach(n=>e.mergeLocaleMessage(n,i[n])),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach(n=>e.mergeDateTimeFormat(n,t.datetimeFormats[n])),t.numberFormats&&Object.keys(t.numberFormats).forEach(n=>e.mergeNumberFormat(n,t.numberFormats[n])),e}const S1=ln("global-vue-i18n");function vm(e={},t){const i=__VUE_I18N_LEGACY_API__&&Ne(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__,n=Ne(e.globalInjection)?e.globalInjection:!0,r=__VUE_I18N_LEGACY_API__&&i?!!e.allowComposition:!0,s=new Map,[c,u]=A1(e,i),o=ln("");function h(f){return s.get(f)||null}function a(f,d){s.set(f,d)}function l(f){s.delete(f)}{const f={get mode(){return __VUE_I18N_LEGACY_API__&&i?"legacy":"composition"},get allowComposition(){return r},async install(d,...p){if(d.__VUE_I18N_SYMBOL__=o,d.provide(d.__VUE_I18N_SYMBOL__,f),Pe(p[0])){const v=p[0];f.__composerExtend=v.__composerExtend,f.__vueI18nExtend=v.__vueI18nExtend}let g=null;!i&&n&&(g=L1(d,f.global)),__VUE_I18N_FULL_INSTALL__&&_1(d,f,...p),__VUE_I18N_LEGACY_API__&&i&&d.mixin(w1(u,u.__composer,f));const m=d.unmount;d.unmount=()=>{g&&g(),f.dispose(),m()}},get global(){return u},dispose(){c.stop()},__instances:s,__getInstance:h,__setInstance:a,__deleteInstance:l};return f}}function pu(e={}){const t=Ot();if(t==null)throw wt(bt.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw wt(bt.NOT_INSTALLED);const i=C1(t),n=T1(i),r=fm(t),s=x1(e,r);if(__VUE_I18N_LEGACY_API__&&i.mode==="legacy"&&!e.__useComponent){if(!i.allowComposition)throw wt(bt.NOT_AVAILABLE_IN_LEGACY_MODE);return k1(t,s,n,e)}if(s==="global")return pm(n,e,r),n;if(s==="parent"){let o=$1(i,t,e.__useComponent);return o==null&&(o=n),o}const c=i;let u=c.__getInstance(t);if(u==null){const o=kt({},e);"__i18n"in r&&(o.__i18n=r.__i18n),n&&(o.__root=n),u=du(o),c.__composerExtend&&(u[gc]=c.__composerExtend(u)),E1(c,t,u),c.__setInstance(t,u)}return u}function A1(e,t,i){const n=Sa();{const r=__VUE_I18N_LEGACY_API__&&t?n.run(()=>mc(e)):n.run(()=>du(e));if(r==null)throw wt(bt.UNEXPECTED_ERROR);return[n,r]}}function C1(e){{const t=Qt(e.isCE?S1:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw wt(e.isCE?bt.NOT_INSTALLED_WITH_PROVIDE:bt.UNEXPECTED_ERROR);return t}}function x1(e,t){return Oa(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function T1(e){return e.mode==="composition"?e.global:e.global.__composer}function $1(e,t,i=!1){let n=null;const r=t.root;let s=M1(t,i);for(;s!=null;){const c=e;if(e.mode==="composition")n=c.__getInstance(s);else if(__VUE_I18N_LEGACY_API__){const u=c.__getInstance(s);u!=null&&(n=u.__composer,i&&n&&!n[dm]&&(n=null))}if(n!=null||r===s)break;s=s.parent}return n}function M1(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function E1(e,t,i){Ys(()=>{},t),Pa(()=>{const n=i;e.__deleteInstance(t);const r=n[gc];r&&(r(),delete n[gc])},t)}function k1(e,t,i,n={}){const r=t==="local",s=Ma(null);if(r&&e.proxy&&!(e.proxy.$options.i18n||e.proxy.$options.__i18n))throw wt(bt.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION);const c=Ne(n.inheritLocale)?n.inheritLocale:!me(n.locale),u=oi(!r||c?i.locale.value:me(n.locale)?n.locale:Ur),o=oi(!r||c?i.fallbackLocale.value:me(n.fallbackLocale)||it(n.fallbackLocale)||Pe(n.fallbackLocale)||n.fallbackLocale===!1?n.fallbackLocale:u.value),h=oi(Da(u.value,n)),a=oi(Pe(n.datetimeFormats)?n.datetimeFormats:{[u.value]:{}}),l=oi(Pe(n.numberFormats)?n.numberFormats:{[u.value]:{}}),f=r?i.missingWarn:Ne(n.missingWarn)||Rn(n.missingWarn)?n.missingWarn:!0,d=r?i.fallbackWarn:Ne(n.fallbackWarn)||Rn(n.fallbackWarn)?n.fallbackWarn:!0,p=r?i.fallbackRoot:Ne(n.fallbackRoot)?n.fallbackRoot:!0,g=!!n.fallbackFormat,m=Ze(n.missing)?n.missing:null,v=Ze(n.postTranslation)?n.postTranslation:null,y=r?i.warnHtmlMessage:Ne(n.warnHtmlMessage)?n.warnHtmlMessage:!0,S=!!n.escapeParameter,b=r?i.modifiers:Pe(n.modifiers)?n.modifiers:{},_=n.pluralRules||r&&i.pluralRules;function w(){return[u.value,o.value,h.value,a.value,l.value]}const E=ot({get:()=>s.value?s.value.locale.value:u.value,set:R=>{s.value&&(s.value.locale.value=R),u.value=R}}),T=ot({get:()=>s.value?s.value.fallbackLocale.value:o.value,set:R=>{s.value&&(s.value.fallbackLocale.value=R),o.value=R}}),$=ot(()=>s.value?s.value.messages.value:h.value),C=ot(()=>a.value),x=ot(()=>l.value);function L(){return s.value?s.value.getPostTranslationHandler():v}function M(R){s.value&&s.value.setPostTranslationHandler(R)}function A(){return s.value?s.value.getMissingHandler():m}function k(R){s.value&&s.value.setMissingHandler(R)}function P(R){return w(),R()}function O(...R){return s.value?P(()=>Reflect.apply(s.value.t,null,[...R])):P(()=>"")}function N(...R){return s.value?Reflect.apply(s.value.rt,null,[...R]):""}function D(...R){return s.value?P(()=>Reflect.apply(s.value.d,null,[...R])):P(()=>"")}function B(...R){return s.value?P(()=>Reflect.apply(s.value.n,null,[...R])):P(()=>"")}function U(R){return s.value?s.value.tm(R):{}}function q(R,F){return s.value?s.value.te(R,F):!1}function H(R){return s.value?s.value.getLocaleMessage(R):{}}function j(R,F){s.value&&(s.value.setLocaleMessage(R,F),h.value[R]=F)}function Y(R,F){s.value&&s.value.mergeLocaleMessage(R,F)}function ie(R){return s.value?s.value.getDateTimeFormat(R):{}}function W(R,F){s.value&&(s.value.setDateTimeFormat(R,F),a.value[R]=F)}function K(R,F){s.value&&s.value.mergeDateTimeFormat(R,F)}function Q(R){return s.value?s.value.getNumberFormat(R):{}}function ne(R,F){s.value&&(s.value.setNumberFormat(R,F),l.value[R]=F)}function de(R,F){s.value&&s.value.mergeNumberFormat(R,F)}const _e={get id(){return s.value?s.value.id:-1},locale:E,fallbackLocale:T,messages:$,datetimeFormats:C,numberFormats:x,get inheritLocale(){return s.value?s.value.inheritLocale:c},set inheritLocale(R){s.value&&(s.value.inheritLocale=R)},get availableLocales(){return s.value?s.value.availableLocales:Object.keys(h.value)},get modifiers(){return s.value?s.value.modifiers:b},get pluralRules(){return s.value?s.value.pluralRules:_},get isGlobal(){return s.value?s.value.isGlobal:!1},get missingWarn(){return s.value?s.value.missingWarn:f},set missingWarn(R){s.value&&(s.value.missingWarn=R)},get fallbackWarn(){return s.value?s.value.fallbackWarn:d},set fallbackWarn(R){s.value&&(s.value.missingWarn=R)},get fallbackRoot(){return s.value?s.value.fallbackRoot:p},set fallbackRoot(R){s.value&&(s.value.fallbackRoot=R)},get fallbackFormat(){return s.value?s.value.fallbackFormat:g},set fallbackFormat(R){s.value&&(s.value.fallbackFormat=R)},get warnHtmlMessage(){return s.value?s.value.warnHtmlMessage:y},set warnHtmlMessage(R){s.value&&(s.value.warnHtmlMessage=R)},get escapeParameter(){return s.value?s.value.escapeParameter:S},set escapeParameter(R){s.value&&(s.value.escapeParameter=R)},t:O,getPostTranslationHandler:L,setPostTranslationHandler:M,getMissingHandler:A,setMissingHandler:k,rt:N,d:D,n:B,tm:U,te:q,getLocaleMessage:H,setLocaleMessage:j,mergeLocaleMessage:Y,getDateTimeFormat:ie,setDateTimeFormat:W,mergeDateTimeFormat:K,getNumberFormat:Q,setNumberFormat:ne,mergeNumberFormat:de};function I(R){R.locale.value=u.value,R.fallbackLocale.value=o.value,Object.keys(h.value).forEach(F=>{R.mergeLocaleMessage(F,h.value[F])}),Object.keys(a.value).forEach(F=>{R.mergeDateTimeFormat(F,a.value[F])}),Object.keys(l.value).forEach(F=>{R.mergeNumberFormat(F,l.value[F])}),R.escapeParameter=S,R.fallbackFormat=g,R.fallbackRoot=p,R.fallbackWarn=d,R.missingWarn=f,R.warnHtmlMessage=y}return qc(()=>{if(e.proxy==null||e.proxy.$i18n==null)throw wt(bt.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const R=s.value=e.proxy.$i18n.__composer;t==="global"?(u.value=R.locale.value,o.value=R.fallbackLocale.value,h.value=R.messages.value,a.value=R.datetimeFormats.value,l.value=R.numberFormats.value):r&&I(R)}),_e}const P1=["locale","fallbackLocale","availableLocales"],yd=["t","rt","d","n","tm","te"];function L1(e,t){const i=Object.create(null);return P1.forEach(r=>{const s=Object.getOwnPropertyDescriptor(t,r);if(!s)throw wt(bt.UNEXPECTED_ERROR);const c=at(s.value)?{get(){return s.value.value},set(u){s.value.value=u}}:{get(){return s.get&&s.get()}};Object.defineProperty(i,r,c)}),e.config.globalProperties.$i18n=i,yd.forEach(r=>{const s=Object.getOwnPropertyDescriptor(t,r);if(!s||!s.value)throw wt(bt.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${r}`,s)}),()=>{delete e.config.globalProperties.$i18n,yd.forEach(r=>{delete e.config.globalProperties[`$${r}`]})}}c1();__INTLIFY_JIT_COMPILATION__?Xh(n1):Xh(i1);Xw(Pw);Qw(Qg);if(__INTLIFY_PROD_DEVTOOLS__){const e=Ji();e.__INTLIFY__=!0,Vw(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}const ym=vm({formatFallbackMessages:!0,silentTranslationWarn:!0,silentFallbackWarn:!0});/*!
 * vuex v4.1.0
 * (c) 2022 Evan You
 * @license MIT
 */var bm="store";function $B(e){return e===void 0&&(e=null),Qt(e!==null?e:bm)}function Zr(e,t){Object.keys(e).forEach(function(i){return t(e[i],i)})}function R1(e){return e!==null&&typeof e=="object"}function I1(e){return e&&typeof e.then=="function"}function O1(e,t){return function(){return e(t)}}function _m(e,t,i){return t.indexOf(e)<0&&(i&&i.prepend?t.unshift(e):t.push(e)),function(){var n=t.indexOf(e);n>-1&&t.splice(n,1)}}function wm(e,t){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var i=e.state;Fa(e,i,[],e._modules.root,!0),gu(e,i,t)}function gu(e,t,i){var n=e._state,r=e._scope;e.getters={},e._makeLocalGettersCache=Object.create(null);var s=e._wrappedGetters,c={},u={},o=Sa(!0);o.run(function(){Zr(s,function(h,a){c[a]=O1(h,e),u[a]=ot(function(){return c[a]()}),Object.defineProperty(e.getters,a,{get:function(){return u[a].value},enumerable:!0})})}),e._state=sr({data:t}),e._scope=o,e.strict&&V1(e),n&&i&&e._withCommit(function(){n.data=null}),r&&r.stop()}function Fa(e,t,i,n,r){var s=!i.length,c=e._modules.getNamespace(i);if(n.namespaced&&(e._modulesNamespaceMap[c],e._modulesNamespaceMap[c]=n),!s&&!r){var u=mu(t,i.slice(0,-1)),o=i[i.length-1];e._withCommit(function(){u[o]=n.state})}var h=n.context=N1(e,c,i);n.forEachMutation(function(a,l){var f=c+l;D1(e,f,a,h)}),n.forEachAction(function(a,l){var f=a.root?l:c+l,d=a.handler||a;F1(e,f,d,h)}),n.forEachGetter(function(a,l){var f=c+l;B1(e,f,a,h)}),n.forEachChild(function(a,l){Fa(e,t,i.concat(l),a,r)})}function N1(e,t,i){var n=t==="",r={dispatch:n?e.dispatch:function(s,c,u){var o=ha(s,c,u),h=o.payload,a=o.options,l=o.type;return(!a||!a.root)&&(l=t+l),e.dispatch(l,h)},commit:n?e.commit:function(s,c,u){var o=ha(s,c,u),h=o.payload,a=o.options,l=o.type;(!a||!a.root)&&(l=t+l),e.commit(l,h,a)}};return Object.defineProperties(r,{getters:{get:n?function(){return e.getters}:function(){return Sm(e,t)}},state:{get:function(){return mu(e.state,i)}}}),r}function Sm(e,t){if(!e._makeLocalGettersCache[t]){var i={},n=t.length;Object.keys(e.getters).forEach(function(r){if(r.slice(0,n)===t){var s=r.slice(n);Object.defineProperty(i,s,{get:function(){return e.getters[r]},enumerable:!0})}}),e._makeLocalGettersCache[t]=i}return e._makeLocalGettersCache[t]}function D1(e,t,i,n){var r=e._mutations[t]||(e._mutations[t]=[]);r.push(function(c){i.call(e,n.state,c)})}function F1(e,t,i,n){var r=e._actions[t]||(e._actions[t]=[]);r.push(function(c){var u=i.call(e,{dispatch:n.dispatch,commit:n.commit,getters:n.getters,state:n.state,rootGetters:e.getters,rootState:e.state},c);return I1(u)||(u=Promise.resolve(u)),e._devtoolHook?u.catch(function(o){throw e._devtoolHook.emit("vuex:error",o),o}):u})}function B1(e,t,i,n){e._wrappedGetters[t]||(e._wrappedGetters[t]=function(s){return i(n.state,n.getters,s.state,s.getters)})}function V1(e){wi(function(){return e._state.data},function(){},{deep:!0,flush:"sync"})}function mu(e,t){return t.reduce(function(i,n){return i[n]},e)}function ha(e,t,i){return R1(e)&&e.type&&(i=t,t=e,e=e.type),{type:e,payload:t,options:i}}var z1="vuex bindings",bd="vuex:mutations",cl="vuex:actions",pr="vuex",H1=0;function U1(e,t){P_({id:"org.vuejs.vuex",app:e,label:"Vuex",homepage:"https://next.vuex.vuejs.org/",logo:"https://vuejs.org/images/icons/favicon-96x96.png",packageName:"vuex",componentStateTypes:[z1]},function(i){i.addTimelineLayer({id:bd,label:"Vuex Mutations",color:_d}),i.addTimelineLayer({id:cl,label:"Vuex Actions",color:_d}),i.addInspector({id:pr,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),i.on.getInspectorTree(function(n){if(n.app===e&&n.inspectorId===pr)if(n.filter){var r=[];Tm(r,t._modules.root,n.filter,""),n.rootNodes=r}else n.rootNodes=[xm(t._modules.root,"")]}),i.on.getInspectorState(function(n){if(n.app===e&&n.inspectorId===pr){var r=n.nodeId;Sm(t,r),n.state=G1(K1(t._modules,r),r==="root"?t.getters:t._makeLocalGettersCache,r)}}),i.on.editInspectorState(function(n){if(n.app===e&&n.inspectorId===pr){var r=n.nodeId,s=n.path;r!=="root"&&(s=r.split("/").filter(Boolean).concat(s)),t._withCommit(function(){n.set(t._state.data,s,n.state.value)})}}),t.subscribe(function(n,r){var s={};n.payload&&(s.payload=n.payload),s.state=r,i.notifyComponentUpdate(),i.sendInspectorTree(pr),i.sendInspectorState(pr),i.addTimelineEvent({layerId:bd,event:{time:Date.now(),title:n.type,data:s}})}),t.subscribeAction({before:function(n,r){var s={};n.payload&&(s.payload=n.payload),n._id=H1++,n._time=Date.now(),s.state=r,i.addTimelineEvent({layerId:cl,event:{time:n._time,title:n.type,groupId:n._id,subtitle:"start",data:s}})},after:function(n,r){var s={},c=Date.now()-n._time;s.duration={_custom:{type:"duration",display:c+"ms",tooltip:"Action duration",value:c}},n.payload&&(s.payload=n.payload),s.state=r,i.addTimelineEvent({layerId:cl,event:{time:Date.now(),title:n.type,groupId:n._id,subtitle:"end",data:s}})}})})}var _d=8702998,W1=6710886,j1=16777215,Am={label:"namespaced",textColor:j1,backgroundColor:W1};function Cm(e){return e&&e!=="root"?e.split("/").slice(-2,-1)[0]:"Root"}function xm(e,t){return{id:t||"root",label:Cm(t),tags:e.namespaced?[Am]:[],children:Object.keys(e._children).map(function(i){return xm(e._children[i],t+i+"/")})}}function Tm(e,t,i,n){n.includes(i)&&e.push({id:n||"root",label:n.endsWith("/")?n.slice(0,n.length-1):n||"Root",tags:t.namespaced?[Am]:[]}),Object.keys(t._children).forEach(function(r){Tm(e,t._children[r],i,n+r+"/")})}function G1(e,t,i){t=i==="root"?t:t[i];var n=Object.keys(t),r={state:Object.keys(e.state).map(function(c){return{key:c,editable:!0,value:e.state[c]}})};if(n.length){var s=q1(t);r.getters=Object.keys(s).map(function(c){return{key:c.endsWith("/")?Cm(c):c,editable:!1,value:vc(function(){return s[c]})}})}return r}function q1(e){var t={};return Object.keys(e).forEach(function(i){var n=i.split("/");if(n.length>1){var r=t,s=n.pop();n.forEach(function(c){r[c]||(r[c]={_custom:{value:{},display:c,tooltip:"Module",abstract:!0}}),r=r[c]._custom.value}),r[s]=vc(function(){return e[i]})}else t[i]=vc(function(){return e[i]})}),t}function K1(e,t){var i=t.split("/").filter(function(n){return n});return i.reduce(function(n,r,s){var c=n[r];if(!c)throw new Error('Missing module "'+r+'" for path "'+t+'".');return s===i.length-1?c:c._children},t==="root"?e:e.root._children)}function vc(e){try{return e()}catch(t){return t}}var xi=function(t,i){this.runtime=i,this._children=Object.create(null),this._rawModule=t;var n=t.state;this.state=(typeof n=="function"?n():n)||{}},$m={namespaced:{configurable:!0}};$m.namespaced.get=function(){return!!this._rawModule.namespaced};xi.prototype.addChild=function(t,i){this._children[t]=i};xi.prototype.removeChild=function(t){delete this._children[t]};xi.prototype.getChild=function(t){return this._children[t]};xi.prototype.hasChild=function(t){return t in this._children};xi.prototype.update=function(t){this._rawModule.namespaced=t.namespaced,t.actions&&(this._rawModule.actions=t.actions),t.mutations&&(this._rawModule.mutations=t.mutations),t.getters&&(this._rawModule.getters=t.getters)};xi.prototype.forEachChild=function(t){Zr(this._children,t)};xi.prototype.forEachGetter=function(t){this._rawModule.getters&&Zr(this._rawModule.getters,t)};xi.prototype.forEachAction=function(t){this._rawModule.actions&&Zr(this._rawModule.actions,t)};xi.prototype.forEachMutation=function(t){this._rawModule.mutations&&Zr(this._rawModule.mutations,t)};Object.defineProperties(xi.prototype,$m);var cr=function(t){this.register([],t,!1)};cr.prototype.get=function(t){return t.reduce(function(i,n){return i.getChild(n)},this.root)};cr.prototype.getNamespace=function(t){var i=this.root;return t.reduce(function(n,r){return i=i.getChild(r),n+(i.namespaced?r+"/":"")},"")};cr.prototype.update=function(t){Mm([],this.root,t)};cr.prototype.register=function(t,i,n){var r=this;n===void 0&&(n=!0);var s=new xi(i,n);if(t.length===0)this.root=s;else{var c=this.get(t.slice(0,-1));c.addChild(t[t.length-1],s)}i.modules&&Zr(i.modules,function(u,o){r.register(t.concat(o),u,n)})};cr.prototype.unregister=function(t){var i=this.get(t.slice(0,-1)),n=t[t.length-1],r=i.getChild(n);!r||!r.runtime||i.removeChild(n)};cr.prototype.isRegistered=function(t){var i=this.get(t.slice(0,-1)),n=t[t.length-1];return i?i.hasChild(n):!1};function Mm(e,t,i){if(t.update(i),i.modules)for(var n in i.modules){if(!t.getChild(n))return;Mm(e.concat(n),t.getChild(n),i.modules[n])}}function Em(e){return new Zt(e)}var Zt=function(t){var i=this;t===void 0&&(t={});var n=t.plugins;n===void 0&&(n=[]);var r=t.strict;r===void 0&&(r=!1);var s=t.devtools;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new cr(t),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._scope=null,this._devtools=s;var c=this,u=this,o=u.dispatch,h=u.commit;this.dispatch=function(f,d){return o.call(c,f,d)},this.commit=function(f,d,p){return h.call(c,f,d,p)},this.strict=r;var a=this._modules.root.state;Fa(this,a,[],this._modules.root),gu(this,a),n.forEach(function(l){return l(i)})},vu={state:{configurable:!0}};Zt.prototype.install=function(t,i){t.provide(i||bm,this),t.config.globalProperties.$store=this;var n=this._devtools!==void 0?this._devtools:!1;n&&U1(t,this)};vu.state.get=function(){return this._state.data};vu.state.set=function(e){};Zt.prototype.commit=function(t,i,n){var r=this,s=ha(t,i,n),c=s.type,u=s.payload,o={type:c,payload:u},h=this._mutations[c];!h||(this._withCommit(function(){h.forEach(function(l){l(u)})}),this._subscribers.slice().forEach(function(a){return a(o,r.state)}))};Zt.prototype.dispatch=function(t,i){var n=this,r=ha(t,i),s=r.type,c=r.payload,u={type:s,payload:c},o=this._actions[s];if(!!o){try{this._actionSubscribers.slice().filter(function(a){return a.before}).forEach(function(a){return a.before(u,n.state)})}catch{}var h=o.length>1?Promise.all(o.map(function(a){return a(c)})):o[0](c);return new Promise(function(a,l){h.then(function(f){try{n._actionSubscribers.filter(function(d){return d.after}).forEach(function(d){return d.after(u,n.state)})}catch{}a(f)},function(f){try{n._actionSubscribers.filter(function(d){return d.error}).forEach(function(d){return d.error(u,n.state,f)})}catch{}l(f)})})}};Zt.prototype.subscribe=function(t,i){return _m(t,this._subscribers,i)};Zt.prototype.subscribeAction=function(t,i){var n=typeof t=="function"?{before:t}:t;return _m(n,this._actionSubscribers,i)};Zt.prototype.watch=function(t,i,n){var r=this;return wi(function(){return t(r.state,r.getters)},i,Object.assign({},n))};Zt.prototype.replaceState=function(t){var i=this;this._withCommit(function(){i._state.data=t})};Zt.prototype.registerModule=function(t,i,n){n===void 0&&(n={}),typeof t=="string"&&(t=[t]),this._modules.register(t,i),Fa(this,this.state,t,this._modules.get(t),n.preserveState),gu(this,this.state)};Zt.prototype.unregisterModule=function(t){var i=this;typeof t=="string"&&(t=[t]),this._modules.unregister(t),this._withCommit(function(){var n=mu(i.state,t.slice(0,-1));delete n[t[t.length-1]]}),wm(this)};Zt.prototype.hasModule=function(t){return typeof t=="string"&&(t=[t]),this._modules.isRegistered(t)};Zt.prototype.hotUpdate=function(t){this._modules.update(t),wm(this,!0)};Zt.prototype._withCommit=function(t){var i=this._committing;this._committing=!0,t(),this._committing=i};Object.defineProperties(Zt.prototype,vu);var Ao,Y1=new Uint8Array(16);function X1(){if(!Ao&&(Ao=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!Ao))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ao(Y1)}const Q1=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function J1(e){return typeof e=="string"&&Q1.test(e)}var Tt=[];for(var ul=0;ul<256;++ul)Tt.push((ul+256).toString(16).substr(1));function Z1(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=(Tt[e[t+0]]+Tt[e[t+1]]+Tt[e[t+2]]+Tt[e[t+3]]+"-"+Tt[e[t+4]]+Tt[e[t+5]]+"-"+Tt[e[t+6]]+Tt[e[t+7]]+"-"+Tt[e[t+8]]+Tt[e[t+9]]+"-"+Tt[e[t+10]]+Tt[e[t+11]]+Tt[e[t+12]]+Tt[e[t+13]]+Tt[e[t+14]]+Tt[e[t+15]]).toLowerCase();if(!J1(i))throw TypeError("Stringified UUID is invalid");return i}function rn(e,t,i){e=e||{};var n=e.random||(e.rng||X1)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){i=i||0;for(var r=0;r<16;++r)t[i+r]=n[r];return t}return Z1(n)}class eS{static validateArguments(t,i){let n=!0;const r={};return Object.keys(i).forEach(s=>{const{required:c}=i[s];c&&(n=n&&t[s]!==void 0),t[s]!==void 0&&(r[s]=t[s])}),n&&r}}class tS{constructor(t,i,n,r){this.name=t,this.potreeStoreId=i,this.PUB_CONNECTORS=n,this.SUB_CONNECTORS=r,this.functionCallbacks={},this.messageListener=({data:s,origin:c})=>{var l;if(c!==window.parent.ENV_VARS.BASE_URL)return;const{cmd:u,functionCallbackId:o=null,args:h=!1,potreeStoreId:a}=s;if(!(t==="client"&&this.potreeStoreId!==a)){if(typeof((l=this.functionCallbacks[o])==null?void 0:l.callback)=="function")this.functionCallbacks[o].callback(h),delete this.functionCallbacks[o];else if(u){const f=u.split("."),d=f.pop(),p=f.reduce((m,v)=>m[v]||{},this.SUB_CONNECTORS);p[d]||console.error(this.name,`Method ${d} does not exists`);let g;if(typeof p[d]=="function"&&(g=p[d](this,h)),g===void 0)return;g instanceof Promise?g.then(m=>{this.sendCmd(u,m,o||void 0)}).catch(()=>{console.error(`Error while getting results for function "${u}"`)}):this.sendCmd(u,g,o||void 0)}}},this.initFunctions(),this.registerMessageListener()}destroy(){window.removeEventListener("message",this.messageListener)}registerMessageListener(){window.addEventListener("message",this.messageListener,!1)}sendCmd(t,i={},n=void 0){}initFunctions(){Object.keys(this.PUB_CONNECTORS).forEach(t=>{this[t]||(this[t]={});const i=this.PUB_CONNECTORS[t].getClientSettings();Object.keys(i).forEach(n=>{if(this[n]){console.error(`[Potree ERROR] Function '${n}' already exist`);return}const r=this[t];r[n]=this.functionSetter(n,i[n],[t])})})}functionSetter(t,i,n){const s=`${n.join(".")}.${t}`;return(...c)=>{let u,o;const h=`${s}-${this.name}${rn()}`;if([u,o]=c,typeof c[0]=="function"&&([o]=c,u={}),typeof c[1]=="object"&&(u=c[1]),o&&(this.functionCallbacks[h]={callback:o}),!i.argsDefinition){console.error(`Arguments definition for ${n.join("/")} -> ${t} not set.`);return}const a=eS.validateArguments(u,i.argsDefinition);if(a===!1){console.error(this.name,`Arguments for ${n.join("/")} -> ${t} not valid.`);return}this.sendCmd(s,{...a},h)}}debounce(t,i=0){let n;return(...r)=>{const s=()=>t(...r);n&&clearTimeout(n),n=setTimeout(s,i)}}throttle(t,i=0){let n=null,r=null;return(...s)=>{r=s;const c=()=>{t(...r),n=null};n||(i===0&&(n=c()),n=setTimeout(c,i))}}}class pt{constructor(t={}){this.settings=t}getClientSettings(){return Object.keys(this.settings).reduce((t,i)=>(t[i]={argsDefinition:this.settings[i].argsDefinition},t),{})}}class iS extends pt{constructor(){super({load:{argsDefinition:{path:{required:!1},name:{required:!1},append:{required:!1},classifications:{required:!1},defaultAttribute:{required:!1},tilesUpdatedAt:{required:!1},initialLoad:{required:!1},options:{required:!1}}},settings:{argsDefinition:{}},boundingBox:{argsDefinition:{}},setCameraPosition:{argsDefinition:{position:{required:!0}}}})}}const nS=new iS;class rS extends pt{constructor(){super({toJson:{argsDefinition:{}},toDxf:{argsDefinition:{}}})}}const sS=new rS;class oS extends pt{constructor(){super({pointBudget:{argsDefinition:{value:{required:!0}}},fov:{argsDefinition:{value:{required:!0}}}})}}const aS=new oS;class lS extends pt{constructor(){super({enable:{argsDefinition:{value:{required:!0}}},radius:{argsDefinition:{value:{required:!0}}},strength:{argsDefinition:{value:{required:!0}}},opacity:{argsDefinition:{value:{required:!0}}}})}}const cS=new lS;class uS extends pt{constructor(){super({background:{argsDefinition:{type:{required:!0}}}})}}const hS=new uS;class dS extends pt{constructor(){super({splatQuality:{argsDefinition:{type:{required:!0}}},minNodeSize:{argsDefinition:{value:{required:!0}}},boundingBox:{argsDefinition:{enabled:{required:!0}}},freeze:{argsDefinition:{enabled:{required:!0}}},loadOBJ:{argsDefinition:{url:{required:!0},zOffset:{required:!1}}},showHideOBJs:{argsDefinition:{show:{required:!0}}},changeOBJDisplay:{argsDefinition:{type:{required:!0}}},setLengthUnit:{argsDefinition:{unit:{required:!0}}},getCopcFilesInsideView:{argsDefinition:{copcFiles:{required:!0}}},setVisibleCopcFileBoundingBoxes:{argsDefinition:{boundingBoxes:{required:!0},uuid:{required:!0}}},drawBoxesWireFrames:{argsDefinition:{boxes:{required:!0}}},hideBoxesWireFrames:{argsDefinition:{}},forceShiftKey:{argsDefinition:{}},forceRightClickOnRenderElement:{argsDefinition:{}}})}}const fS=new dS;class pS extends pt{constructor(){super({point:{argsDefinition:{}},angle:{argsDefinition:{}},distance:{argsDefinition:{}},height:{argsDefinition:{}},circle:{argsDefinition:{}},azimuth:{argsDefinition:{}},area:{argsDefinition:{}},aoi:{argsDefinition:{}},volume:{argsDefinition:{}},volumeClip:{argsDefinition:{uuid:{required:!0},value:{required:!0}}},volumeResetOrientation:{argsDefinition:{uuid:{required:!0}}},volumeMakeUniform:{argsDefinition:{uuid:{required:!0}}},sphereDistance:{argsDefinition:{}},profile:{argsDefinition:{}},annotation:{argsDefinition:{}},annotationTitle:{argsDefinition:{uuid:{required:!0},value:{required:!0}}},annotationDbId:{argsDefinition:{uuid:{required:!0},value:{required:!0}}},annotationIsHighlighted:{argsDefinition:{uuid:{required:!0},value:{required:!0}}},annotationDescription:{argsDefinition:{uuid:{required:!0},value:{required:!0}}},addAnnotation:{argsDefinition:{dbId:{required:!1},position:{required:!0},title:{required:!0}}},showHideAnnotations:{argsDefinition:{show:{required:!0}}},removeAllAnnotations:{argsDefinition:{}},removeAll:{argsDefinition:{}},showHideLabels:{argsDefinition:{value:{required:!0}}},visible:{argsDefinition:{uuid:{required:!0},value:{required:!0}}},remove:{argsDefinition:{uuid:{required:!0}}},profileFromMeasure:{argsDefinition:{uuid:{required:!0}}},profileWidth:{argsDefinition:{uuid:{required:!0},value:{required:!0}}},show2dProfile:{argsDefinition:{uuid:{required:!0}}},hideAllOutsideClip:{argsDefinition:{clipTask:{required:!0}}}})}}const gS=new pS;class mS extends pt{constructor(){super({volume:{argsDefinition:{}},polygon:{argsDefinition:{}},box:{argsDefinition:{}},remove:{argsDefinition:{}},clipTask:{argsDefinition:{type:{required:!0}}},clipMethod:{argsDefinition:{type:{required:!0}}}})}}const vS=new mS;class yS extends pt{constructor(){super({earth:{argsDefinition:{}},fly:{argsDefinition:{}},helicopter:{argsDefinition:{}},orbit:{argsDefinition:{}},fullExtent:{argsDefinition:{}},navigationCube:{argsDefinition:{}},compass:{argsDefinition:{}},cameraAnimation:{argsDefinition:{}},cameraAnimationPlay:{argsDefinition:{uuid:{required:!0}}},cameraAnimationDuration:{argsDefinition:{uuid:{required:!0},value:{required:!0}}},cameraAnimationTime:{argsDefinition:{uuid:{required:!0},value:{required:!0}}},cameraAnimationControlPointAdd:{argsDefinition:{uuid:{required:!0},index:{required:!0}}},cameraAnimationControlPointRemove:{argsDefinition:{uuid:{required:!0},index:{required:!0}}},speed:{argsDefinition:{value:{required:!0}}},cameraProjection:{argsDefinition:{type:{required:!0}}},left:{argsDefinition:{}},right:{argsDefinition:{}},front:{argsDefinition:{}},back:{argsDefinition:{}},top:{argsDefinition:{}},bottom:{argsDefinition:{}},leftTargetView:{argsDefinition:{}},rightTargetView:{argsDefinition:{}},frontTargetView:{argsDefinition:{}},backTargetView:{argsDefinition:{}},topTargetView:{argsDefinition:{}},bottomTargetView:{argsDefinition:{}},navigate:{argsDefinition:{}},moveTo:{argsDefinition:{position:{required:!0},target:{required:!0}}},centerPointCloud:{argsDefinition:{uuid:{required:!0}}},centerVirtualTile:{argsDefinition:{polygon:{required:!0}}},setViewPosition:{argsDefinition:{position:{required:!0}}},centerPolygonWith3DExtents:{argsDefinition:{polygon:{required:!0},extents:{required:!0}}}})}}const bS=new yS;class _S extends pt{constructor(){super({init:{argsDefinition:{uuid:{required:!0}}},activeAttributeName:{argsDefinition:{uuid:{required:!0},value:{required:!0}}},rgbGamma:{argsDefinition:{uuid:{required:!0},value:{required:!0}}},rgbBrightness:{argsDefinition:{uuid:{required:!0},value:{required:!0}}},rgbContrast:{argsDefinition:{uuid:{required:!0},value:{required:!0}}},heightRange:{argsDefinition:{uuid:{required:!0},value:{required:!0}}},getHeightRangeAll:{argsDefinition:{}},gradientRepeat:{argsDefinition:{type:{required:!0}}},intensityRange:{argsDefinition:{uuid:{required:!0},value:{required:!0}}},getIntensityRange:{argsDefinition:{uuid:{required:!0}}},getIntensityRangeAll:{argsDefinition:{}},intensityGamma:{argsDefinition:{uuid:{required:!0},value:{required:!0}}},intensityBrightness:{argsDefinition:{uuid:{required:!0},value:{required:!0}}},intensityContrast:{argsDefinition:{uuid:{required:!0},value:{required:!0}}},rgbWeight:{argsDefinition:{uuid:{required:!0},value:{required:!0}}},intensityWeight:{argsDefinition:{uuid:{required:!0},value:{required:!0}}},elevationWeight:{argsDefinition:{uuid:{required:!0},value:{required:!0}}},classificationWeight:{argsDefinition:{uuid:{required:!0},value:{required:!0}}},pointSize:{argsDefinition:{uuid:{required:!0},value:{required:!0}}},pointSizing:{argsDefinition:{uuid:{required:!0},value:{required:!0}}},shape:{argsDefinition:{uuid:{required:!0},value:{required:!0}}},pointOpacity:{argsDefinition:{uuid:{required:!0},value:{required:!0}}},visible:{argsDefinition:{uuid:{required:!0},value:{required:!0}}},updateAttributeRanges:{argsDefinition:{ranges:{required:!0}}}})}}const wS=new _S;class SS extends pt{constructor(){super({classifications:{argsDefinition:{}},classificationsList:{argsDefinition:{}},activeClassification:{argsDefinition:{name:{required:!0}}},toggleAllVisibility:{argsDefinition:{}},visibility:{argsDefinition:{code:{required:!0},checked:{required:!0}}},setColor:{argsDefinition:{code:{required:!0},rgba:{required:!0}}},setClassification:{argsDefinition:{classifications:{required:!0}}}})}}const AS=new SS;class CS extends pt{constructor(){super({load:{argsDefinition:{path:{required:!0},projection:{required:!1}}},closeViewer:{argsDefinition:{}},loadFromArray:{argsDefinition:{uuid:{required:!0},images:{required:!0},path:{required:!1},projection:{required:!1}}},focusByIndex:{argsDefinition:{uuid:{required:!0},index:{required:!0}}},focusByFileName:{argsDefinition:{uuid:{required:!0},path:{required:!0},target:{required:!1},targetSettings:{required:!1}}},remove:{argsDefinition:{uuid:{required:!0}}}})}}const xS=new CS;class TS extends pt{constructor(){super({zoomToObject:{argsDefinition:{uuid:{required:!0},zoomMode:{required:!0}}},zoomToPosition:{argsDefinition:{position:{required:!0}}},cameraToTarget:{argsDefinition:{position:{required:!0}}}})}}const $S=new TS;class MS extends pt{constructor(){super({setEditMode:{argsDefinition:{enabled:{required:!1}}},editFeature:{argsDefinition:{feature:{required:!0},userData:{required:!1}}},removeFeature:{argsDefinition:{userData:{required:!1}}}})}}const ES=new MS;class kS extends pt{constructor(){super({init:{argsDefinition:{points:{required:!0},position:{required:!1}}},getProjection:{argsDefinition:{}},toggle:{argsDefinition:{}},play:{argsDefinition:{}},pause:{argsDefinition:{}},reverse:{argsDefinition:{}},startPlayMode:{argsDefinition:{}},stopPlayMode:{argsDefinition:{}},setYaw:{argsDefinition:{value:{required:!1}}},setPitch:{argsDefinition:{value:{required:!1}}},setElevation:{argsDefinition:{value:{required:!1}}},setSpeed:{argsDefinition:{value:{required:!1}}},setPercent:{argsDefinition:{value:{required:!0}}}})}}const PS=new kS;class LS extends pt{constructor(){super({renderVectors:{argsDefinition:{vectors:{required:!0},id:{required:!0}}},visible:{argsDefinition:{value:{required:!0},id:{required:!0}}},vectorColor:{argsDefinition:{value:{required:!0},id:{required:!0}}},lineWidth:{argsDefinition:{value:{required:!0},id:{required:!0}}},lineOpacity:{argsDefinition:{value:{required:!0},id:{required:!0}}},pointSize:{argsDefinition:{value:{required:!0},id:{required:!0}}},removeVector:{argsDefinition:{datasetId:{required:!0},vectorId:{required:!0}}}})}}const RS=new LS,wd={PointCloudLoader:nS,PointCloudExport:sS,Appearance:aS,EyeDomeLighting:cS,Background:hS,Other:fS,Measurement:gS,Clipping:vS,Navigation:bS,Attribute:wS,Filters:AS,Images360:xS,Zoom:$S,Editor:ES,AnimationPlayer:PS,Vectors:RS};class IS extends pt{constructor(){super({front:{argsDefinition:{}},back:{argsDefinition:{}},left:{argsDefinition:{}},right:{argsDefinition:{}},top:{argsDefinition:{}},bottom:{argsDefinition:{}},polygon:{argsDefinition:{}},rectangle:{argsDefinition:{}},strip:{argsDefinition:{}},lineUp:{argsDefinition:{}},lineDown:{argsDefinition:{}},runLastCommand:{argsDefinition:{}},remove:{argsDefinition:{}},clipTask:{argsDefinition:{type:{required:!0}}},moveClip:{argsDefinition:{direction:{required:!0}}},clipMethod:{argsDefinition:{type:{required:!0}}},confirm:{argsDefinition:{}},navigate:{argsDefinition:{}},setVirtualTile:{argsDefinition:{virtualTile:{required:!0}}},showClipOutsidePoints:{argsDefinition:{value:{required:!0}}},reenterClip:{argsDefinition:{}}})}}const OS=new IS;class NS extends pt{constructor(){super({selectedClassification:{argsDefinition:{value:{required:!0}}},toggleActiveClassification:{argsDefinition:{value:{required:!0}}},activeClassifications:{argsDefinition:{list:{required:!0}}},clearActiveClassifications:{argsDefinition:{}},classificationType:{argsDefinition:{value:{required:!0}}},selectedInstanceId:{argsDefinition:{value:{required:!0}}},activeInstances:{argsDefinition:{list:{required:!0}}},visibleInstances:{argsDefinition:{list:{required:!0}}},discolorHiddenInstances:{argsDefinition:{value:{required:!0}}},invertVisibleInstances:{argsDefinition:{value:{required:!0}}},randomizeInstanceColors:{argsDefinition:{}},randomInstanceColorSeed:{argsDefinition:{value:{required:!0}}}})}}const DS=new NS;class FS extends pt{constructor(){super({setCommands:{argsDefinition:{commands:{required:!0}}},undoCommand:{argsDefinition:{fit:{required:!1},tilesUpdatedAt:{required:!1}}},reloadPointCloud:{argsDefinition:{path:{required:!1},name:{required:!1},fit:{required:!1},tilesUpdatedAt:{required:!1}}},reloadAllPointClouds:{argsDefinition:{fit:{required:!1},tilesUpdatedAt:{required:!1}}}})}}const BS=new FS;class VS extends pt{constructor(){super({setPois:{argsDefinition:{pois:{required:!0}}},box:{argsDefinition:{attributes:{required:!1}}},point:{argsDefinition:{attributes:{required:!1}}},line:{argsDefinition:{attributes:{required:!1}}},polygon:{argsDefinition:{attributes:{required:!1}}},addPolygon:{argsDefinition:{polygon:{required:!0},options:{required:!1}}},confirm:{argsDefinition:{}},updatePoi:{argsDefinition:{uuid:{required:!0},poiId:{required:!1},poiAttributes:{required:!1}}},remove:{argsDefinition:{uuid:{required:!0},type:{required:!0}}},removeAll:{argsDefinition:{}},poiVisibility:{argsDefinition:{names:{required:!0}}},attributeNameCount:{argsDefinition:{name:{required:!0}}}})}}const zS=new VS,HS={ClippingEditor:OS,AttributeEditor:DS,PointWorker:BS,Poi:zS};class US{cameraPosition(t,i){t.store.dispatch("setCameraPosition",i)}selectedPosition(t,i){t.store.dispatch("setSelectedPosition",i)}moveSpeed(t,i){t.store.dispatch("setMoveSpeed",i)}pointCloudUpdated(t,{uuid:i,data:n}){t.store.dispatch("updatePointCloud",{uuid:i,data:n})}measurementUpdated(t,{uuid:i,data:n}){t.store.dispatch("updateMeasurement",{uuid:i,data:n})}pointMeasurementUpdated(t,{uuid:i,data:n}){t.store.dispatch("updateSelectedPointMeasure",{uuid:i,data:n})}measurementRemoved(t,{uuid:i}){t.store.dispatch("removeMeasurement",i)}volumeUpdated(t,{uuid:i,data:n}){t.store.dispatch("updateMeasurement",{uuid:i,data:n})}volumeRemoved(t,{uuid:i}){t.store.dispatch("removeMeasurement",i)}profileUpdated(t,{uuid:i,data:n}){t.store.dispatch("updateMeasurement",{uuid:i,data:n})}profileRemoved(t,{uuid:i}){t.store.dispatch("removeMeasurement",i)}annotationUpdated(t,{uuid:i,data:n}){t.store.dispatch("updateAnnotation",{uuid:i,data:n})}annotationRemoved(t,{uuid:i}){t.store.dispatch("removeAnnotation",i)}cameraAnimationUpdated(t,{uuid:i,data:n}){t.store.dispatch("updateCameraAnimation",{uuid:i,data:n})}cameraAnimationRemoved(t,{uuid:i}){t.store.dispatch("removeCameraAnimation",i)}toggleAllVisibility(t,{checked:i}){t.store.dispatch("toggleAllVisibility",i)}images360Updated(t,{uuid:i,data:n}){t.store.dispatch("updateImages360",{uuid:i,data:n})}images360Removed(t,{uuid:i}){t.store.dispatch("removeImages360",i)}image360Focus(t,{file:i}){t.store.dispatch("updateImage360File",{file:i})}fovUpdated(t,{fov:i}){t.store.dispatch("updateFov",{fov:i})}evlOpacityUpdated(t,{opacity:i}){t.store.dispatch("updateEvlOpacity",{opacity:i})}serverReady(t){t.store.dispatch("serverReady",void 0)}commandAdded(t,i){t.store.dispatch("commandAdded",i)}commandsChanged(t,i){t.store.dispatch("commandsChanged",i)}clipTaskChanged(t,{clipTask:i}){t.store.dispatch("updateClipTask",{clipTask:i})}polygonClipVolumeUpdated(t,{count:i,maxCount:n}){t.store.dispatch("updatePolygonClipVolume",{count:i,maxCount:n})}boxClipVolumeUpdated(t,{count:i}){t.store.dispatch("updateBoxClipVolume",{count:i})}keyPressed(t,{mainKeyCode:i,alterKeyCode:n}){t.store.dispatch("updateKeyPressed",{mainKeyCode:i,alterKeyCode:n})}setSelection(t,i){t.store.dispatch("Poi/updateSelectedPoi",i)}selectInstanceId(t,i){t.store.dispatch("selectInstanceId",i)}virtualTileChanged(t,{virtualTile:i}){t.store.dispatch("updateVirtualTile",{virtualTile:i})}vectorSelected(t,{vector:i}){t.store.dispatch("selectVector",{vector:i})}}const WS=new US;class jS{setProperty(t,i){t.store.dispatch("AnimationPlayer/setProperty",i)}}const GS=new jS,qS={Push:WS,AnimationPlayerPush:GS},da={DEFAULT:0,EDITOR:1};class km extends tS{constructor(t,i,n=da.DEFAULT){const r=n===da.EDITOR?{...wd,...HS}:wd;super("client",i.state.moduleId,r,qS),this.element=t,this.store=i,this.mode=n}sendCmd(t,i={},n=void 0){const r=JSON.parse(JSON.stringify(i));this.element.contentWindow.postMessage({cmd:t,args:r,functionCallbackId:n},window.ENV_VARS.BASE_URL)}}class Ba{constructor(t=1/0,i=1/0){this.max_pending_promises=t,this.max_queued_promises=i,this.pending_promises=0,this.queue=[]}enqueue(t){return new Promise((i,n)=>{if(this.queue.length>this.max_queued_promises){n(new Error("Queue limit reached"));return}this.queue.push({promiseGenerator:t,resolve:i,reject:n}),this.dequeue()})}prequeue(t){return new Promise((i,n)=>{if(this.queue.length>this.max_queued_promises){n(new Error("Queue limit reached"));return}this.queue.unshift({promiseGenerator:t,resolve:i,reject:n}),this.dequeue()})}get pendingLength(){return this.pending_promises}get queueLength(){return this.queue.length}static resolveWith(t){return typeof(t==null?void 0:t.then)=="function"?t:new Promise(i=>{i(t)})}dequeue(){if(this.pending_promises>=this.max_pending_promises)return!1;const t=this.queue.shift();if(!t)return!1;try{this.pending_promises+=1,Ba.resolveWith(t.promiseGenerator()).then(i=>{this.pending_promises-=1,t.resolve(i),this.dequeue()}).catch(i=>{this.pending_promises-=1,t.reject(i),this.dequeue()})}catch(i){this.pending_promises-=1,t.reject(i),this.dequeue()}return!0}}function KS(e){e("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),e("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),e("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"),e.WGS84=e["EPSG:4326"],e["EPSG:3785"]=e["EPSG:3857"],e.GOOGLE=e["EPSG:3857"],e["EPSG:900913"]=e["EPSG:3857"],e["EPSG:102113"]=e["EPSG:3857"]}var er=1,tr=2,Fr=3,YS=4,yc=5,Sd=6378137,XS=6356752314e-3,Ad=.0066943799901413165,$s=484813681109536e-20,ce=Math.PI/2,QS=.16666666666666666,JS=.04722222222222222,ZS=.022156084656084655,pe=1e-10,Mt=.017453292519943295,Oi=57.29577951308232,We=Math.PI/4,Hs=Math.PI*2,ht=3.14159265359,ei={};ei.greenwich=0;ei.lisbon=-9.131906111111;ei.paris=2.337229166667;ei.bogota=-74.080916666667;ei.madrid=-3.687938888889;ei.rome=12.452333333333;ei.bern=7.439583333333;ei.jakarta=106.807719444444;ei.ferro=-17.666666666667;ei.brussels=4.367975;ei.stockholm=18.058277777778;ei.athens=23.7163375;ei.oslo=10.722916666667;const eA={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}};var Cd=/[\s_\-\/\(\)]/g;function In(e,t){if(e[t])return e[t];for(var i=Object.keys(e),n=t.toLowerCase().replace(Cd,""),r=-1,s,c;++r<i.length;)if(s=i[r],c=s.toLowerCase().replace(Cd,""),c===n)return e[s]}function bc(e){var t={},i=e.split("+").map(function(u){return u.trim()}).filter(function(u){return u}).reduce(function(u,o){var h=o.split("=");return h.push(!0),u[h[0].toLowerCase()]=h[1],u},{}),n,r,s,c={proj:"projName",datum:"datumCode",rf:function(u){t.rf=parseFloat(u)},lat_0:function(u){t.lat0=u*Mt},lat_1:function(u){t.lat1=u*Mt},lat_2:function(u){t.lat2=u*Mt},lat_ts:function(u){t.lat_ts=u*Mt},lon_0:function(u){t.long0=u*Mt},lon_1:function(u){t.long1=u*Mt},lon_2:function(u){t.long2=u*Mt},alpha:function(u){t.alpha=parseFloat(u)*Mt},gamma:function(u){t.rectified_grid_angle=parseFloat(u)},lonc:function(u){t.longc=u*Mt},x_0:function(u){t.x0=parseFloat(u)},y_0:function(u){t.y0=parseFloat(u)},k_0:function(u){t.k0=parseFloat(u)},k:function(u){t.k0=parseFloat(u)},a:function(u){t.a=parseFloat(u)},b:function(u){t.b=parseFloat(u)},r_a:function(){t.R_A=!0},zone:function(u){t.zone=parseInt(u,10)},south:function(){t.utmSouth=!0},towgs84:function(u){t.datum_params=u.split(",").map(function(o){return parseFloat(o)})},to_meter:function(u){t.to_meter=parseFloat(u)},units:function(u){t.units=u;var o=In(eA,u);o&&(t.to_meter=o.to_meter)},from_greenwich:function(u){t.from_greenwich=u*Mt},pm:function(u){var o=In(ei,u);t.from_greenwich=(o||parseFloat(u))*Mt},nadgrids:function(u){u==="@null"?t.datumCode="none":t.nadgrids=u},axis:function(u){var o="ewnsud";u.length===3&&o.indexOf(u.substr(0,1))!==-1&&o.indexOf(u.substr(1,1))!==-1&&o.indexOf(u.substr(2,1))!==-1&&(t.axis=u)},approx:function(){t.approx=!0}};for(n in i)r=i[n],n in c?(s=c[n],typeof s=="function"?s(r):t[s]=r):t[n]=r;return typeof t.datumCode=="string"&&t.datumCode!=="WGS84"&&(t.datumCode=t.datumCode.toLowerCase()),t}var Us=1,Pm=2,Lm=3,fa=4,Rm=5,yu=-1,tA=/\s/,iA=/[A-Za-z]/,nA=/[A-Za-z84_]/,Va=/[,\]]/,Im=/[\d\.E\-\+]/;function cn(e){if(typeof e!="string")throw new Error("not a string");this.text=e.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=Us}cn.prototype.readCharicter=function(){var e=this.text[this.place++];if(this.state!==fa)for(;tA.test(e);){if(this.place>=this.text.length)return;e=this.text[this.place++]}switch(this.state){case Us:return this.neutral(e);case Pm:return this.keyword(e);case fa:return this.quoted(e);case Rm:return this.afterquote(e);case Lm:return this.number(e);case yu:return}};cn.prototype.afterquote=function(e){if(e==='"'){this.word+='"',this.state=fa;return}if(Va.test(e)){this.word=this.word.trim(),this.afterItem(e);return}throw new Error(`havn't handled "`+e+'" in afterquote yet, index '+this.place)};cn.prototype.afterItem=function(e){if(e===","){this.word!==null&&this.currentObject.push(this.word),this.word=null,this.state=Us;return}if(e==="]"){this.level--,this.word!==null&&(this.currentObject.push(this.word),this.word=null),this.state=Us,this.currentObject=this.stack.pop(),this.currentObject||(this.state=yu);return}};cn.prototype.number=function(e){if(Im.test(e)){this.word+=e;return}if(Va.test(e)){this.word=parseFloat(this.word),this.afterItem(e);return}throw new Error(`havn't handled "`+e+'" in number yet, index '+this.place)};cn.prototype.quoted=function(e){if(e==='"'){this.state=Rm;return}this.word+=e};cn.prototype.keyword=function(e){if(nA.test(e)){this.word+=e;return}if(e==="["){var t=[];t.push(this.word),this.level++,this.root===null?this.root=t:this.currentObject.push(t),this.stack.push(this.currentObject),this.currentObject=t,this.state=Us;return}if(Va.test(e)){this.afterItem(e);return}throw new Error(`havn't handled "`+e+'" in keyword yet, index '+this.place)};cn.prototype.neutral=function(e){if(iA.test(e)){this.word=e,this.state=Pm;return}if(e==='"'){this.word="",this.state=fa;return}if(Im.test(e)){this.word=e,this.state=Lm;return}if(Va.test(e)){this.afterItem(e);return}throw new Error(`havn't handled "`+e+'" in neutral yet, index '+this.place)};cn.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(this.state===yu)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};function rA(e){var t=new cn(e);return t.output()}function xd(e,t,i){Array.isArray(t)&&(i.unshift(t),t=null);var n=t?{}:e,r=i.reduce(function(s,c){return $r(c,s),s},n);t&&(e[t]=r)}function $r(e,t){if(!Array.isArray(e)){t[e]=!0;return}var i=e.shift();if(i==="PARAMETER"&&(i=e.shift()),e.length===1){if(Array.isArray(e[0])){t[i]={},$r(e[0],t[i]);return}t[i]=e[0];return}if(!e.length){t[i]=!0;return}if(i==="TOWGS84"){t[i]=e;return}if(i==="AXIS"){i in t||(t[i]=[]),t[i].push(e);return}Array.isArray(i)||(t[i]={});var n;switch(i){case"UNIT":case"PRIMEM":case"VERT_DATUM":t[i]={name:e[0].toLowerCase(),convert:e[1]},e.length===3&&$r(e[2],t[i]);return;case"SPHEROID":case"ELLIPSOID":t[i]={name:e[0],a:e[1],rf:e[2]},e.length===4&&$r(e[3],t[i]);return;case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"EDATUM":case"ENGINEERINGDATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":case"COMPD_CS":case"COMPOUNDCRS":case"ENGINEERINGCRS":case"ENGCRS":case"FITTED_CS":case"LOCAL_DATUM":case"DATUM":e[0]=["name",e[0]],xd(t,i,e);return;default:for(n=-1;++n<e.length;)if(!Array.isArray(e[n]))return $r(e,t[i]);return xd(t,i,e)}}var sA=.017453292519943295;function oA(e,t){var i=t[0],n=t[1];!(i in e)&&n in e&&(e[i]=e[n],t.length===3&&(e[i]=t[2](e[i])))}function Ei(e){return e*sA}function aA(e){if(e.type==="GEOGCS"?e.projName="longlat":e.type==="LOCAL_CS"?(e.projName="identity",e.local=!0):typeof e.PROJECTION=="object"?e.projName=Object.keys(e.PROJECTION)[0]:e.projName=e.PROJECTION,e.AXIS){for(var t="",i=0,n=e.AXIS.length;i<n;++i){var r=[e.AXIS[i][0].toLowerCase(),e.AXIS[i][1].toLowerCase()];r[0].indexOf("north")!==-1||(r[0]==="y"||r[0]==="lat")&&r[1]==="north"?t+="n":r[0].indexOf("south")!==-1||(r[0]==="y"||r[0]==="lat")&&r[1]==="south"?t+="s":r[0].indexOf("east")!==-1||(r[0]==="x"||r[0]==="lon")&&r[1]==="east"?t+="e":(r[0].indexOf("west")!==-1||(r[0]==="x"||r[0]==="lon")&&r[1]==="west")&&(t+="w")}t.length===2&&(t+="u"),t.length===3&&(e.axis=t)}e.UNIT&&(e.units=e.UNIT.name.toLowerCase(),e.units==="metre"&&(e.units="meter"),e.UNIT.convert&&(e.type==="GEOGCS"?e.DATUM&&e.DATUM.SPHEROID&&(e.to_meter=e.UNIT.convert*e.DATUM.SPHEROID.a):e.to_meter=e.UNIT.convert));var s=e.GEOGCS;e.type==="GEOGCS"&&(s=e),s&&(s.DATUM?e.datumCode=s.DATUM.name.toLowerCase():e.datumCode=s.name.toLowerCase(),e.datumCode.slice(0,2)==="d_"&&(e.datumCode=e.datumCode.slice(2)),(e.datumCode==="new_zealand_geodetic_datum_1949"||e.datumCode==="new_zealand_1949")&&(e.datumCode="nzgd49"),(e.datumCode==="wgs_1984"||e.datumCode==="world_geodetic_system_1984")&&(e.PROJECTION==="Mercator_Auxiliary_Sphere"&&(e.sphere=!0),e.datumCode="wgs84"),e.datumCode.slice(-6)==="_ferro"&&(e.datumCode=e.datumCode.slice(0,-6)),e.datumCode.slice(-8)==="_jakarta"&&(e.datumCode=e.datumCode.slice(0,-8)),~e.datumCode.indexOf("belge")&&(e.datumCode="rnb72"),s.DATUM&&s.DATUM.SPHEROID&&(e.ellps=s.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),e.ellps.toLowerCase().slice(0,13)==="international"&&(e.ellps="intl"),e.a=s.DATUM.SPHEROID.a,e.rf=parseFloat(s.DATUM.SPHEROID.rf,10)),s.DATUM&&s.DATUM.TOWGS84&&(e.datum_params=s.DATUM.TOWGS84),~e.datumCode.indexOf("osgb_1936")&&(e.datumCode="osgb36"),~e.datumCode.indexOf("osni_1952")&&(e.datumCode="osni52"),(~e.datumCode.indexOf("tm65")||~e.datumCode.indexOf("geodetic_datum_of_1965"))&&(e.datumCode="ire65"),e.datumCode==="ch1903+"&&(e.datumCode="ch1903"),~e.datumCode.indexOf("israel")&&(e.datumCode="isr93")),e.b&&!isFinite(e.b)&&(e.b=e.a);function c(h){var a=e.to_meter||1;return h*a}var u=function(h){return oA(e,h)},o=[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_1","Latitude of 1st standard parallel"],["standard_parallel_2","Standard_Parallel_2"],["standard_parallel_2","Latitude of 2nd standard parallel"],["false_easting","False_Easting"],["false_easting","False easting"],["false-easting","Easting at false origin"],["false_northing","False_Northing"],["false_northing","False northing"],["false_northing","Northing at false origin"],["central_meridian","Central_Meridian"],["central_meridian","Longitude of natural origin"],["central_meridian","Longitude of false origin"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["latitude_of_origin","Latitude of natural origin"],["latitude_of_origin","Latitude of false origin"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",Ei],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",Ei],["x0","false_easting",c],["y0","false_northing",c],["long0","central_meridian",Ei],["lat0","latitude_of_origin",Ei],["lat0","standard_parallel_1",Ei],["lat1","standard_parallel_1",Ei],["lat2","standard_parallel_2",Ei],["azimuth","Azimuth"],["alpha","azimuth",Ei],["srsCode","name"]];o.forEach(u),!e.long0&&e.longc&&(e.projName==="Albers_Conic_Equal_Area"||e.projName==="Lambert_Azimuthal_Equal_Area")&&(e.long0=e.longc),!e.lat_ts&&e.lat1&&(e.projName==="Stereographic_South_Pole"||e.projName==="Polar Stereographic (variant B)")?(e.lat0=Ei(e.lat1>0?90:-90),e.lat_ts=e.lat1):!e.lat_ts&&e.lat0&&e.projName==="Polar_Stereographic"&&(e.lat_ts=e.lat0,e.lat0=Ei(e.lat0>0?90:-90))}function Om(e){var t=rA(e),i=t.shift(),n=t.shift();t.unshift(["name",n]),t.unshift(["type",i]);var r={};return $r(t,r),aA(r),r}function Ft(e){var t=this;if(arguments.length===2){var i=arguments[1];typeof i=="string"?i.charAt(0)==="+"?Ft[e]=bc(arguments[1]):Ft[e]=Om(arguments[1]):Ft[e]=i}else if(arguments.length===1){if(Array.isArray(e))return e.map(function(n){Array.isArray(n)?Ft.apply(t,n):Ft(n)});if(typeof e=="string"){if(e in Ft)return Ft[e]}else"EPSG"in e?Ft["EPSG:"+e.EPSG]=e:"ESRI"in e?Ft["ESRI:"+e.ESRI]=e:"IAU2000"in e?Ft["IAU2000:"+e.IAU2000]=e:console.log(e);return}}KS(Ft);function lA(e){return typeof e=="string"}function cA(e){return e in Ft}var uA=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function hA(e){return uA.some(function(t){return e.indexOf(t)>-1})}var dA=["3857","900913","3785","102113"];function fA(e){var t=In(e,"authority");if(!!t){var i=In(t,"epsg");return i&&dA.indexOf(i)>-1}}function pA(e){var t=In(e,"extension");if(!!t)return In(t,"proj4")}function gA(e){return e[0]==="+"}function mA(e){if(lA(e)){if(cA(e))return Ft[e];if(hA(e)){var t=Om(e);if(fA(t))return Ft["EPSG:3857"];var i=pA(t);return i?bc(i):t}if(gA(e))return bc(e)}else return e}function Td(e,t){e=e||{};var i,n;if(!t)return e;for(n in t)i=t[n],i!==void 0&&(e[n]=i);return e}function Bi(e,t,i){var n=e*t;return i/Math.sqrt(1-n*n)}function eo(e){return e<0?-1:1}function ye(e){return Math.abs(e)<=ht?e:e-eo(e)*Hs}function Si(e,t,i){var n=e*i,r=.5*e;return n=Math.pow((1-n)/(1+n),r),Math.tan(.5*(ce-t))/n}function Ws(e,t){for(var i=.5*e,n,r,s=ce-2*Math.atan(t),c=0;c<=15;c++)if(n=e*Math.sin(s),r=ce-2*Math.atan(t*Math.pow((1-n)/(1+n),i))-s,s+=r,Math.abs(r)<=1e-10)return s;return-9999}function vA(){var e=this.b/this.a;this.es=1-e*e,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=Bi(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)}function yA(e){var t=e.x,i=e.y;if(i*Oi>90&&i*Oi<-90&&t*Oi>180&&t*Oi<-180)return null;var n,r;if(Math.abs(Math.abs(i)-ce)<=pe)return null;if(this.sphere)n=this.x0+this.a*this.k0*ye(t-this.long0),r=this.y0+this.a*this.k0*Math.log(Math.tan(We+.5*i));else{var s=Math.sin(i),c=Si(this.e,i,s);n=this.x0+this.a*this.k0*ye(t-this.long0),r=this.y0-this.a*this.k0*Math.log(c)}return e.x=n,e.y=r,e}function bA(e){var t=e.x-this.x0,i=e.y-this.y0,n,r;if(this.sphere)r=ce-2*Math.atan(Math.exp(-i/(this.a*this.k0)));else{var s=Math.exp(-i/(this.a*this.k0));if(r=Ws(this.e,s),r===-9999)return null}return n=ye(this.long0+t/(this.a*this.k0)),e.x=n,e.y=r,e}var _A=["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"];const wA={init:vA,forward:yA,inverse:bA,names:_A};function SA(){}function $d(e){return e}var AA=["longlat","identity"];const CA={init:SA,forward:$d,inverse:$d,names:AA};var xA=[wA,CA],zo={},pa=[];function Nm(e,t){var i=pa.length;return e.names?(pa[i]=e,e.names.forEach(function(n){zo[n.toLowerCase()]=i}),this):(console.log(t),!0)}function TA(e){if(!e)return!1;var t=e.toLowerCase();if(typeof zo[t]<"u"&&pa[zo[t]])return pa[zo[t]]}function $A(){xA.forEach(Nm)}const MA={start:$A,add:Nm,get:TA};var Le={};Le.MERIT={a:6378137,rf:298.257,ellipseName:"MERIT 1983"};Le.SGS85={a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"};Le.GRS80={a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"};Le.IAU76={a:6378140,rf:298.257,ellipseName:"IAU 1976"};Le.airy={a:6377563396e-3,b:635625691e-2,ellipseName:"Airy 1830"};Le.APL4={a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"};Le.NWL9D={a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"};Le.mod_airy={a:6377340189e-3,b:6356034446e-3,ellipseName:"Modified Airy"};Le.andrae={a:637710443e-2,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"};Le.aust_SA={a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"};Le.GRS67={a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"};Le.bessel={a:6377397155e-3,rf:299.1528128,ellipseName:"Bessel 1841"};Le.bess_nam={a:6377483865e-3,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"};Le.clrk66={a:63782064e-1,b:63565838e-1,ellipseName:"Clarke 1866"};Le.clrk80={a:6378249145e-3,rf:293.4663,ellipseName:"Clarke 1880 mod."};Le.clrk80ign={a:63782492e-1,b:6356515,rf:293.4660213,ellipseName:"Clarke 1880 (IGN)"};Le.clrk58={a:6378293645208759e-9,rf:294.2606763692654,ellipseName:"Clarke 1858"};Le.CPM={a:63757387e-1,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"};Le.delmbr={a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"};Le.engelis={a:637813605e-2,rf:298.2566,ellipseName:"Engelis 1985"};Le.evrst30={a:6377276345e-3,rf:300.8017,ellipseName:"Everest 1830"};Le.evrst48={a:6377304063e-3,rf:300.8017,ellipseName:"Everest 1948"};Le.evrst56={a:6377301243e-3,rf:300.8017,ellipseName:"Everest 1956"};Le.evrst69={a:6377295664e-3,rf:300.8017,ellipseName:"Everest 1969"};Le.evrstSS={a:6377298556e-3,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"};Le.fschr60={a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"};Le.fschr60m={a:6378155,rf:298.3,ellipseName:"Fischer 1960"};Le.fschr68={a:6378150,rf:298.3,ellipseName:"Fischer 1968"};Le.helmert={a:6378200,rf:298.3,ellipseName:"Helmert 1906"};Le.hough={a:6378270,rf:297,ellipseName:"Hough"};Le.intl={a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"};Le.kaula={a:6378163,rf:298.24,ellipseName:"Kaula 1961"};Le.lerch={a:6378139,rf:298.257,ellipseName:"Lerch 1979"};Le.mprts={a:6397300,rf:191,ellipseName:"Maupertius 1738"};Le.new_intl={a:63781575e-1,b:63567722e-1,ellipseName:"New International 1967"};Le.plessis={a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"};Le.krass={a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"};Le.SEasia={a:6378155,b:63567733205e-4,ellipseName:"Southeast Asia"};Le.walbeck={a:6376896,b:63558348467e-4,ellipseName:"Walbeck"};Le.WGS60={a:6378165,rf:298.3,ellipseName:"WGS 60"};Le.WGS66={a:6378145,rf:298.25,ellipseName:"WGS 66"};Le.WGS7={a:6378135,rf:298.26,ellipseName:"WGS 72"};var EA=Le.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};Le.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};function kA(e,t,i,n){var r=e*e,s=t*t,c=(r-s)/r,u=0;n?(e*=1-c*(QS+c*(JS+c*ZS)),r=e*e,c=0):u=Math.sqrt(c);var o=(r-s)/s;return{es:c,e:u,ep2:o}}function PA(e,t,i,n,r){if(!e){var s=In(Le,n);s||(s=EA),e=s.a,t=s.b,i=s.rf}return i&&!t&&(t=(1-1/i)*e),(i===0||Math.abs(e-t)<pe)&&(r=!0,t=e),{a:e,b:t,rf:i,sphere:r}}var At={};At.wgs84={towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"};At.ch1903={towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"};At.ggrs87={towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"};At.nad83={towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"};At.nad27={nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"};At.potsdam={towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"};At.carthage={towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"};At.hermannskogel={towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"};At.osni52={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"};At.ire65={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"};At.rassadiran={towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"};At.nzgd49={towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"};At.osgb36={towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"};At.s_jtsk={towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"};At.beduaram={towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"};At.gunung_segara={towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"};At.rnb72={towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"};function LA(e,t,i,n,r,s,c){var u={};return e===void 0||e==="none"?u.datum_type=yc:u.datum_type=YS,t&&(u.datum_params=t.map(parseFloat),(u.datum_params[0]!==0||u.datum_params[1]!==0||u.datum_params[2]!==0)&&(u.datum_type=er),u.datum_params.length>3&&(u.datum_params[3]!==0||u.datum_params[4]!==0||u.datum_params[5]!==0||u.datum_params[6]!==0)&&(u.datum_type=tr,u.datum_params[3]*=$s,u.datum_params[4]*=$s,u.datum_params[5]*=$s,u.datum_params[6]=u.datum_params[6]/1e6+1)),c&&(u.datum_type=Fr,u.grids=c),u.a=i,u.b=n,u.es=r,u.ep2=s,u}var Dm={};function RA(e,t){var i=new DataView(t),n=NA(i),r=DA(i,n);r.nSubgrids>1&&console.log("Only single NTv2 subgrids are currently supported, subsequent sub grids are ignored");var s=FA(i,r,n),c={header:r,subgrids:s};return Dm[e]=c,c}function IA(e){if(e===void 0)return null;var t=e.split(",");return t.map(OA)}function OA(e){if(e.length===0)return null;var t=e[0]==="@";return t&&(e=e.slice(1)),e==="null"?{name:"null",mandatory:!t,grid:null,isNull:!0}:{name:e,mandatory:!t,grid:Dm[e]||null,isNull:!1}}function Mr(e){return e/3600*Math.PI/180}function NA(e){var t=e.getInt32(8,!1);return t===11?!1:(t=e.getInt32(8,!0),t!==11&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian"),!0)}function DA(e,t){return{nFields:e.getInt32(8,t),nSubgridFields:e.getInt32(24,t),nSubgrids:e.getInt32(40,t),shiftType:_c(e,56,56+8).trim(),fromSemiMajorAxis:e.getFloat64(120,t),fromSemiMinorAxis:e.getFloat64(136,t),toSemiMajorAxis:e.getFloat64(152,t),toSemiMinorAxis:e.getFloat64(168,t)}}function _c(e,t,i){return String.fromCharCode.apply(null,new Uint8Array(e.buffer.slice(t,i)))}function FA(e,t,i){for(var n=176,r=[],s=0;s<t.nSubgrids;s++){var c=VA(e,n,i),u=zA(e,n,c,i),o=Math.round(1+(c.upperLongitude-c.lowerLongitude)/c.longitudeInterval),h=Math.round(1+(c.upperLatitude-c.lowerLatitude)/c.latitudeInterval);r.push({ll:[Mr(c.lowerLongitude),Mr(c.lowerLatitude)],del:[Mr(c.longitudeInterval),Mr(c.latitudeInterval)],lim:[o,h],count:c.gridNodeCount,cvs:BA(u)})}return r}function BA(e){return e.map(function(t){return[Mr(t.longitudeShift),Mr(t.latitudeShift)]})}function VA(e,t,i){return{name:_c(e,t+8,t+16).trim(),parent:_c(e,t+24,t+24+8).trim(),lowerLatitude:e.getFloat64(t+72,i),upperLatitude:e.getFloat64(t+88,i),lowerLongitude:e.getFloat64(t+104,i),upperLongitude:e.getFloat64(t+120,i),latitudeInterval:e.getFloat64(t+136,i),longitudeInterval:e.getFloat64(t+152,i),gridNodeCount:e.getInt32(t+168,i)}}function zA(e,t,i,n){for(var r=t+176,s=16,c=[],u=0;u<i.gridNodeCount;u++){var o={latitudeShift:e.getFloat32(r+u*s,n),longitudeShift:e.getFloat32(r+u*s+4,n),latitudeAccuracy:e.getFloat32(r+u*s+8,n),longitudeAccuracy:e.getFloat32(r+u*s+12,n)};c.push(o)}return c}function Ni(e,t){if(!(this instanceof Ni))return new Ni(e);t=t||function(h){if(h)throw h};var i=mA(e);if(typeof i!="object"){t(e);return}var n=Ni.projections.get(i.projName);if(!n){t(e);return}if(i.datumCode&&i.datumCode!=="none"){var r=In(At,i.datumCode);r&&(i.datum_params=i.datum_params||(r.towgs84?r.towgs84.split(","):null),i.ellps=r.ellipse,i.datumName=r.datumName?r.datumName:i.datumCode)}i.k0=i.k0||1,i.axis=i.axis||"enu",i.ellps=i.ellps||"wgs84",i.lat1=i.lat1||i.lat0;var s=PA(i.a,i.b,i.rf,i.ellps,i.sphere),c=kA(s.a,s.b,s.rf,i.R_A),u=IA(i.nadgrids),o=i.datum||LA(i.datumCode,i.datum_params,s.a,s.b,c.es,c.ep2,u);Td(this,i),Td(this,n),this.a=s.a,this.b=s.b,this.rf=s.rf,this.sphere=s.sphere,this.es=c.es,this.e=c.e,this.ep2=c.ep2,this.datum=o,this.init(),t(null,this)}Ni.projections=MA;Ni.projections.start();function HA(e,t){return e.datum_type!==t.datum_type||e.a!==t.a||Math.abs(e.es-t.es)>5e-11?!1:e.datum_type===er?e.datum_params[0]===t.datum_params[0]&&e.datum_params[1]===t.datum_params[1]&&e.datum_params[2]===t.datum_params[2]:e.datum_type===tr?e.datum_params[0]===t.datum_params[0]&&e.datum_params[1]===t.datum_params[1]&&e.datum_params[2]===t.datum_params[2]&&e.datum_params[3]===t.datum_params[3]&&e.datum_params[4]===t.datum_params[4]&&e.datum_params[5]===t.datum_params[5]&&e.datum_params[6]===t.datum_params[6]:!0}function Fm(e,t,i){var n=e.x,r=e.y,s=e.z?e.z:0,c,u,o,h;if(r<-ce&&r>-1.001*ce)r=-ce;else if(r>ce&&r<1.001*ce)r=ce;else{if(r<-ce)return{x:-1/0,y:-1/0,z:e.z};if(r>ce)return{x:1/0,y:1/0,z:e.z}}return n>Math.PI&&(n-=2*Math.PI),u=Math.sin(r),h=Math.cos(r),o=u*u,c=i/Math.sqrt(1-t*o),{x:(c+s)*h*Math.cos(n),y:(c+s)*h*Math.sin(n),z:(c*(1-t)+s)*u}}function Bm(e,t,i,n){var r=1e-12,s=r*r,c=30,u,o,h,a,l,f,d,p,g,m,v,y,S,b=e.x,_=e.y,w=e.z?e.z:0,E,T,$;if(u=Math.sqrt(b*b+_*_),o=Math.sqrt(b*b+_*_+w*w),u/i<r){if(E=0,o/i<r)return T=ce,$=-n,{x:e.x,y:e.y,z:e.z}}else E=Math.atan2(_,b);h=w/o,a=u/o,l=1/Math.sqrt(1-t*(2-t)*a*a),p=a*(1-t)*l,g=h*l,S=0;do S++,d=i/Math.sqrt(1-t*g*g),$=u*p+w*g-d*(1-t*g*g),f=t*d/(d+$),l=1/Math.sqrt(1-f*(2-f)*a*a),m=a*(1-f)*l,v=h*l,y=v*p-m*g,p=m,g=v;while(y*y>s&&S<c);return T=Math.atan(v/Math.abs(m)),{x:E,y:T,z:$}}function UA(e,t,i){if(t===er)return{x:e.x+i[0],y:e.y+i[1],z:e.z+i[2]};if(t===tr){var n=i[0],r=i[1],s=i[2],c=i[3],u=i[4],o=i[5],h=i[6];return{x:h*(e.x-o*e.y+u*e.z)+n,y:h*(o*e.x+e.y-c*e.z)+r,z:h*(-u*e.x+c*e.y+e.z)+s}}}function WA(e,t,i){if(t===er)return{x:e.x-i[0],y:e.y-i[1],z:e.z-i[2]};if(t===tr){var n=i[0],r=i[1],s=i[2],c=i[3],u=i[4],o=i[5],h=i[6],a=(e.x-n)/h,l=(e.y-r)/h,f=(e.z-s)/h;return{x:a+o*l-u*f,y:-o*a+l+c*f,z:u*a-c*l+f}}}function Co(e){return e===er||e===tr}function jA(e,t,i){if(HA(e,t)||e.datum_type===yc||t.datum_type===yc)return i;var n=e.a,r=e.es;if(e.datum_type===Fr){var s=Md(e,!1,i);if(s!==0)return;n=Sd,r=Ad}var c=t.a,u=t.b,o=t.es;if(t.datum_type===Fr&&(c=Sd,u=XS,o=Ad),r===o&&n===c&&!Co(e.datum_type)&&!Co(t.datum_type))return i;if(i=Fm(i,r,n),Co(e.datum_type)&&(i=UA(i,e.datum_type,e.datum_params)),Co(t.datum_type)&&(i=WA(i,t.datum_type,t.datum_params)),i=Bm(i,o,c,u),t.datum_type===Fr){var h=Md(t,!0,i);if(h!==0)return}return i}function Md(e,t,i){if(e.grids===null||e.grids.length===0)return console.log("Grid shift grids not found"),-1;for(var n={x:-i.x,y:i.y},r={x:Number.NaN,y:Number.NaN},s=[],c=0;c<e.grids.length;c++){var u=e.grids[c];if(s.push(u.name),u.isNull){r=n;break}if(u.mandatory,u.grid===null){if(u.mandatory)return console.log("Unable to find mandatory grid '"+u.name+"'"),-1;continue}var o=u.grid.subgrids[0],h=(Math.abs(o.del[1])+Math.abs(o.del[0]))/1e4,a=o.ll[0]-h,l=o.ll[1]-h,f=o.ll[0]+(o.lim[0]-1)*o.del[0]+h,d=o.ll[1]+(o.lim[1]-1)*o.del[1]+h;if(!(l>n.y||a>n.x||d<n.y||f<n.x)&&(r=GA(n,t,o),!isNaN(r.x)))break}return isNaN(r.x)?(console.log("Failed to find a grid shift table for location '"+-n.x*Oi+" "+n.y*Oi+" tried: '"+s+"'"),-1):(i.x=-r.x,i.y=r.y,0)}function GA(e,t,i){var n={x:Number.NaN,y:Number.NaN};if(isNaN(e.x))return n;var r={x:e.x,y:e.y};r.x-=i.ll[0],r.y-=i.ll[1],r.x=ye(r.x-Math.PI)+Math.PI;var s=Ed(r,i);if(t){if(isNaN(s.x))return n;s.x=r.x-s.x,s.y=r.y-s.y;var c=9,u=1e-12,o,h;do{if(h=Ed(s,i),isNaN(h.x)){console.log("Inverse grid shift iteration failed, presumably at grid edge.  Using first approximation.");break}o={x:r.x-(h.x+s.x),y:r.y-(h.y+s.y)},s.x+=o.x,s.y+=o.y}while(c--&&Math.abs(o.x)>u&&Math.abs(o.y)>u);if(c<0)return console.log("Inverse grid shift iterator failed to converge."),n;n.x=ye(s.x+i.ll[0]),n.y=s.y+i.ll[1]}else isNaN(s.x)||(n.x=e.x+s.x,n.y=e.y+s.y);return n}function Ed(e,t){var i={x:e.x/t.del[0],y:e.y/t.del[1]},n={x:Math.floor(i.x),y:Math.floor(i.y)},r={x:i.x-1*n.x,y:i.y-1*n.y},s={x:Number.NaN,y:Number.NaN},c;if(n.x<0||n.x>=t.lim[0]||n.y<0||n.y>=t.lim[1])return s;c=n.y*t.lim[0]+n.x;var u={x:t.cvs[c][0],y:t.cvs[c][1]};c++;var o={x:t.cvs[c][0],y:t.cvs[c][1]};c+=t.lim[0];var h={x:t.cvs[c][0],y:t.cvs[c][1]};c--;var a={x:t.cvs[c][0],y:t.cvs[c][1]},l=r.x*r.y,f=r.x*(1-r.y),d=(1-r.x)*(1-r.y),p=(1-r.x)*r.y;return s.x=d*u.x+f*o.x+p*a.x+l*h.x,s.y=d*u.y+f*o.y+p*a.y+l*h.y,s}function kd(e,t,i){var n=i.x,r=i.y,s=i.z||0,c,u,o,h={};for(o=0;o<3;o++)if(!(t&&o===2&&i.z===void 0))switch(o===0?(c=n,"ew".indexOf(e.axis[o])!==-1?u="x":u="y"):o===1?(c=r,"ns".indexOf(e.axis[o])!==-1?u="y":u="x"):(c=s,u="z"),e.axis[o]){case"e":h[u]=c;break;case"w":h[u]=-c;break;case"n":h[u]=c;break;case"s":h[u]=-c;break;case"u":i[u]!==void 0&&(h.z=c);break;case"d":i[u]!==void 0&&(h.z=-c);break;default:return null}return h}function Vm(e){var t={x:e[0],y:e[1]};return e.length>2&&(t.z=e[2]),e.length>3&&(t.m=e[3]),t}function qA(e){Pd(e.x),Pd(e.y)}function Pd(e){if(typeof Number.isFinite=="function"){if(Number.isFinite(e))return;throw new TypeError("coordinates must be finite numbers")}if(typeof e!="number"||e!==e||!isFinite(e))throw new TypeError("coordinates must be finite numbers")}function KA(e,t){return(e.datum.datum_type===er||e.datum.datum_type===tr||e.datum.datum_type===Fr)&&t.datumCode!=="WGS84"||(t.datum.datum_type===er||t.datum.datum_type===tr||t.datum.datum_type===Fr)&&e.datumCode!=="WGS84"}function ga(e,t,i,n){var r;Array.isArray(i)?i=Vm(i):i={x:i.x,y:i.y,z:i.z,m:i.m};var s=i.z!==void 0;if(qA(i),e.datum&&t.datum&&KA(e,t)&&(r=new Ni("WGS84"),i=ga(e,r,i,n),e=r),n&&e.axis!=="enu"&&(i=kd(e,!1,i)),e.projName==="longlat")i={x:i.x*Mt,y:i.y*Mt,z:i.z||0};else if(e.to_meter&&(i={x:i.x*e.to_meter,y:i.y*e.to_meter,z:i.z||0}),i=e.inverse(i),!i)return;if(e.from_greenwich&&(i.x+=e.from_greenwich),i=jA(e.datum,t.datum,i),!!i)return t.from_greenwich&&(i={x:i.x-t.from_greenwich,y:i.y,z:i.z||0}),t.projName==="longlat"?i={x:i.x*Oi,y:i.y*Oi,z:i.z||0}:(i=t.forward(i),t.to_meter&&(i={x:i.x/t.to_meter,y:i.y/t.to_meter,z:i.z||0})),n&&t.axis!=="enu"?kd(t,!0,i):(s||delete i.z,i)}var Ld=Ni("WGS84");function hl(e,t,i,n){var r,s,c;return Array.isArray(i)?(r=ga(e,t,i,n)||{x:NaN,y:NaN},i.length>2?typeof e.name<"u"&&e.name==="geocent"||typeof t.name<"u"&&t.name==="geocent"?typeof r.z=="number"?[r.x,r.y,r.z].concat(i.splice(3)):[r.x,r.y,i[2]].concat(i.splice(3)):[r.x,r.y].concat(i.splice(2)):[r.x,r.y]):(s=ga(e,t,i,n),c=Object.keys(i),c.length===2||c.forEach(function(u){if(typeof e.name<"u"&&e.name==="geocent"||typeof t.name<"u"&&t.name==="geocent"){if(u==="x"||u==="y"||u==="z")return}else if(u==="x"||u==="y")return;s[u]=i[u]}),s)}function Rd(e){return e instanceof Ni?e:e.oProj?e.oProj:Ni(e)}function Jt(e,t,i){e=Rd(e);var n=!1,r;return typeof t>"u"?(t=e,e=Ld,n=!0):(typeof t.x<"u"||Array.isArray(t))&&(i=t,t=e,e=Ld,n=!0),t=Rd(t),i?hl(e,t,i):(r={forward:function(s,c){return hl(e,t,s,c)},inverse:function(s,c){return hl(t,e,s,c)}},n&&(r.oProj=t),r)}var Id=6,zm="AJSAJS",Hm="AFAFAF",Er=65,Kt=73,ui=79,ys=86,bs=90;const YA={forward:Um,inverse:XA,toPoint:Wm};function Um(e,t){return t=t||5,ZA(QA({lat:e[1],lon:e[0]}),t)}function XA(e){var t=bu(Gm(e.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat,t.lon,t.lat]:[t.left,t.bottom,t.right,t.top]}function Wm(e){var t=bu(Gm(e.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat]:[(t.left+t.right)/2,(t.top+t.bottom)/2]}function dl(e){return e*(Math.PI/180)}function Od(e){return 180*(e/Math.PI)}function QA(e){var t=e.lat,i=e.lon,n=6378137,r=.00669438,s=.9996,c,u,o,h,a,l,f,d=dl(t),p=dl(i),g,m;m=Math.floor((i+180)/6)+1,i===180&&(m=60),t>=56&&t<64&&i>=3&&i<12&&(m=32),t>=72&&t<84&&(i>=0&&i<9?m=31:i>=9&&i<21?m=33:i>=21&&i<33?m=35:i>=33&&i<42&&(m=37)),c=(m-1)*6-180+3,g=dl(c),u=r/(1-r),o=n/Math.sqrt(1-r*Math.sin(d)*Math.sin(d)),h=Math.tan(d)*Math.tan(d),a=u*Math.cos(d)*Math.cos(d),l=Math.cos(d)*(p-g),f=n*((1-r/4-3*r*r/64-5*r*r*r/256)*d-(3*r/8+3*r*r/32+45*r*r*r/1024)*Math.sin(2*d)+(15*r*r/256+45*r*r*r/1024)*Math.sin(4*d)-35*r*r*r/3072*Math.sin(6*d));var v=s*o*(l+(1-h+a)*l*l*l/6+(5-18*h+h*h+72*a-58*u)*l*l*l*l*l/120)+5e5,y=s*(f+o*Math.tan(d)*(l*l/2+(5-h+9*a+4*a*a)*l*l*l*l/24+(61-58*h+h*h+600*a-330*u)*l*l*l*l*l*l/720));return t<0&&(y+=1e7),{northing:Math.round(y),easting:Math.round(v),zoneNumber:m,zoneLetter:JA(t)}}function bu(e){var t=e.northing,i=e.easting,n=e.zoneLetter,r=e.zoneNumber;if(r<0||r>60)return null;var s=.9996,c=6378137,u=.00669438,o,h=(1-Math.sqrt(1-u))/(1+Math.sqrt(1-u)),a,l,f,d,p,g,m,v,y,S=i-5e5,b=t;n<"N"&&(b-=1e7),m=(r-1)*6-180+3,o=u/(1-u),g=b/s,v=g/(c*(1-u/4-3*u*u/64-5*u*u*u/256)),y=v+(3*h/2-27*h*h*h/32)*Math.sin(2*v)+(21*h*h/16-55*h*h*h*h/32)*Math.sin(4*v)+151*h*h*h/96*Math.sin(6*v),a=c/Math.sqrt(1-u*Math.sin(y)*Math.sin(y)),l=Math.tan(y)*Math.tan(y),f=o*Math.cos(y)*Math.cos(y),d=c*(1-u)/Math.pow(1-u*Math.sin(y)*Math.sin(y),1.5),p=S/(a*s);var _=y-a*Math.tan(y)/d*(p*p/2-(5+3*l+10*f-4*f*f-9*o)*p*p*p*p/24+(61+90*l+298*f+45*l*l-252*o-3*f*f)*p*p*p*p*p*p/720);_=Od(_);var w=(p-(1+2*l+f)*p*p*p/6+(5-2*f+28*l-3*f*f+8*o+24*l*l)*p*p*p*p*p/120)/Math.cos(y);w=m+Od(w);var E;if(e.accuracy){var T=bu({northing:e.northing+e.accuracy,easting:e.easting+e.accuracy,zoneLetter:e.zoneLetter,zoneNumber:e.zoneNumber});E={top:T.lat,right:T.lon,bottom:_,left:w}}else E={lat:_,lon:w};return E}function JA(e){var t="Z";return 84>=e&&e>=72?t="X":72>e&&e>=64?t="W":64>e&&e>=56?t="V":56>e&&e>=48?t="U":48>e&&e>=40?t="T":40>e&&e>=32?t="S":32>e&&e>=24?t="R":24>e&&e>=16?t="Q":16>e&&e>=8?t="P":8>e&&e>=0?t="N":0>e&&e>=-8?t="M":-8>e&&e>=-16?t="L":-16>e&&e>=-24?t="K":-24>e&&e>=-32?t="J":-32>e&&e>=-40?t="H":-40>e&&e>=-48?t="G":-48>e&&e>=-56?t="F":-56>e&&e>=-64?t="E":-64>e&&e>=-72?t="D":-72>e&&e>=-80&&(t="C"),t}function ZA(e,t){var i="00000"+e.easting,n="00000"+e.northing;return e.zoneNumber+e.zoneLetter+eC(e.easting,e.northing,e.zoneNumber)+i.substr(i.length-5,t)+n.substr(n.length-5,t)}function eC(e,t,i){var n=jm(i),r=Math.floor(e/1e5),s=Math.floor(t/1e5)%20;return tC(r,s,n)}function jm(e){var t=e%Id;return t===0&&(t=Id),t}function tC(e,t,i){var n=i-1,r=zm.charCodeAt(n),s=Hm.charCodeAt(n),c=r+e-1,u=s+t,o=!1;c>bs&&(c=c-bs+Er-1,o=!0),(c===Kt||r<Kt&&c>Kt||(c>Kt||r<Kt)&&o)&&c++,(c===ui||r<ui&&c>ui||(c>ui||r<ui)&&o)&&(c++,c===Kt&&c++),c>bs&&(c=c-bs+Er-1),u>ys?(u=u-ys+Er-1,o=!0):o=!1,(u===Kt||s<Kt&&u>Kt||(u>Kt||s<Kt)&&o)&&u++,(u===ui||s<ui&&u>ui||(u>ui||s<ui)&&o)&&(u++,u===Kt&&u++),u>ys&&(u=u-ys+Er-1);var h=String.fromCharCode(c)+String.fromCharCode(u);return h}function Gm(e){if(e&&e.length===0)throw"MGRSPoint coverting from nothing";for(var t=e.length,i=null,n="",r,s=0;!/[A-Z]/.test(r=e.charAt(s));){if(s>=2)throw"MGRSPoint bad conversion from: "+e;n+=r,s++}var c=parseInt(n,10);if(s===0||s+3>t)throw"MGRSPoint bad conversion from: "+e;var u=e.charAt(s++);if(u<="A"||u==="B"||u==="Y"||u>="Z"||u==="I"||u==="O")throw"MGRSPoint zone letter "+u+" not handled: "+e;i=e.substring(s,s+=2);for(var o=jm(c),h=iC(i.charAt(0),o),a=nC(i.charAt(1),o);a<rC(u);)a+=2e6;var l=t-s;if(l%2!==0)throw`MGRSPoint has to have an even number 
of digits after the zone letter and two 100km letters - front 
half for easting meters, second half for 
northing meters`+e;var f=l/2,d=0,p=0,g,m,v,y,S;return f>0&&(g=1e5/Math.pow(10,f),m=e.substring(s,s+f),d=parseFloat(m)*g,v=e.substring(s+f),p=parseFloat(v)*g),y=d+h,S=p+a,{easting:y,northing:S,zoneLetter:u,zoneNumber:c,accuracy:g}}function iC(e,t){for(var i=zm.charCodeAt(t-1),n=1e5,r=!1;i!==e.charCodeAt(0);){if(i++,i===Kt&&i++,i===ui&&i++,i>bs){if(r)throw"Bad character: "+e;i=Er,r=!0}n+=1e5}return n}function nC(e,t){if(e>"V")throw"MGRSPoint given invalid Northing "+e;for(var i=Hm.charCodeAt(t-1),n=0,r=!1;i!==e.charCodeAt(0);){if(i++,i===Kt&&i++,i===ui&&i++,i>ys){if(r)throw"Bad character: "+e;i=Er,r=!0}n+=1e5}return n}function rC(e){var t;switch(e){case"C":t=11e5;break;case"D":t=2e6;break;case"E":t=28e5;break;case"F":t=37e5;break;case"G":t=46e5;break;case"H":t=55e5;break;case"J":t=64e5;break;case"K":t=73e5;break;case"L":t=82e5;break;case"M":t=91e5;break;case"N":t=0;break;case"P":t=8e5;break;case"Q":t=17e5;break;case"R":t=26e5;break;case"S":t=35e5;break;case"T":t=44e5;break;case"U":t=53e5;break;case"V":t=62e5;break;case"W":t=7e6;break;case"X":t=79e5;break;default:t=-1}if(t>=0)return t;throw"Invalid zone letter: "+e}function jr(e,t,i){if(!(this instanceof jr))return new jr(e,t,i);if(Array.isArray(e))this.x=e[0],this.y=e[1],this.z=e[2]||0;else if(typeof e=="object")this.x=e.x,this.y=e.y,this.z=e.z||0;else if(typeof e=="string"&&typeof t>"u"){var n=e.split(",");this.x=parseFloat(n[0],10),this.y=parseFloat(n[1],10),this.z=parseFloat(n[2],10)||0}else this.x=e,this.y=t,this.z=i||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}jr.fromMGRS=function(e){return new jr(Wm(e))};jr.prototype.toMGRS=function(e){return Um([this.x,this.y],e)};var sC=1,oC=.25,Nd=.046875,Dd=.01953125,Fd=.01068115234375,aC=.75,lC=.46875,cC=.013020833333333334,uC=.007120768229166667,hC=.3645833333333333,dC=.005696614583333333,fC=.3076171875;function qm(e){var t=[];t[0]=sC-e*(oC+e*(Nd+e*(Dd+e*Fd))),t[1]=e*(aC-e*(Nd+e*(Dd+e*Fd)));var i=e*e;return t[2]=i*(lC-e*(cC+e*uC)),i*=e,t[3]=i*(hC-e*dC),t[4]=i*e*fC,t}function za(e,t,i,n){return i*=t,t*=t,n[0]*e-i*(n[1]+t*(n[2]+t*(n[3]+t*n[4])))}var pC=20;function Km(e,t,i){for(var n=1/(1-t),r=e,s=pC;s;--s){var c=Math.sin(r),u=1-t*c*c;if(u=(za(r,c,Math.cos(r),i)-e)*(u*Math.sqrt(u))*n,r-=u,Math.abs(u)<pe)return r}return r}function gC(){this.x0=this.x0!==void 0?this.x0:0,this.y0=this.y0!==void 0?this.y0:0,this.long0=this.long0!==void 0?this.long0:0,this.lat0=this.lat0!==void 0?this.lat0:0,this.es&&(this.en=qm(this.es),this.ml0=za(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))}function mC(e){var t=e.x,i=e.y,n=ye(t-this.long0),r,s,c,u=Math.sin(i),o=Math.cos(i);if(this.es){var a=o*n,l=Math.pow(a,2),f=this.ep2*Math.pow(o,2),d=Math.pow(f,2),p=Math.abs(o)>pe?Math.tan(i):0,g=Math.pow(p,2),m=Math.pow(g,2);r=1-this.es*Math.pow(u,2),a=a/Math.sqrt(r);var v=za(i,u,o,this.en);s=this.a*(this.k0*a*(1+l/6*(1-g+f+l/20*(5-18*g+m+14*f-58*g*f+l/42*(61+179*m-m*g-479*g)))))+this.x0,c=this.a*(this.k0*(v-this.ml0+u*n*a/2*(1+l/12*(5-g+9*f+4*d+l/30*(61+m-58*g+270*f-330*g*f+l/56*(1385+543*m-m*g-3111*g))))))+this.y0}else{var h=o*Math.sin(n);if(Math.abs(Math.abs(h)-1)<pe)return 93;if(s=.5*this.a*this.k0*Math.log((1+h)/(1-h))+this.x0,c=o*Math.cos(n)/Math.sqrt(1-Math.pow(h,2)),h=Math.abs(c),h>=1){if(h-1>pe)return 93;c=0}else c=Math.acos(c);i<0&&(c=-c),c=this.a*this.k0*(c-this.lat0)+this.y0}return e.x=s,e.y=c,e}function vC(e){var t,i,n,r,s=(e.x-this.x0)*(1/this.a),c=(e.y-this.y0)*(1/this.a);if(this.es)if(t=this.ml0+c/this.k0,i=Km(t,this.es,this.en),Math.abs(i)<ce){var l=Math.sin(i),f=Math.cos(i),d=Math.abs(f)>pe?Math.tan(i):0,p=this.ep2*Math.pow(f,2),g=Math.pow(p,2),m=Math.pow(d,2),v=Math.pow(m,2);t=1-this.es*Math.pow(l,2);var y=s*Math.sqrt(t)/this.k0,S=Math.pow(y,2);t=t*d,n=i-t*S/(1-this.es)*.5*(1-S/12*(5+3*m-9*p*m+p-4*g-S/30*(61+90*m-252*p*m+45*v+46*p-S/56*(1385+3633*m+4095*v+1574*v*m)))),r=ye(this.long0+y*(1-S/6*(1+2*m+p-S/20*(5+28*m+24*v+8*p*m+6*p-S/42*(61+662*m+1320*v+720*v*m))))/f)}else n=ce*eo(c),r=0;else{var u=Math.exp(s/this.k0),o=.5*(u-1/u),h=this.lat0+c/this.k0,a=Math.cos(h);t=Math.sqrt((1-Math.pow(a,2))/(1+Math.pow(o,2))),n=Math.asin(t),c<0&&(n=-n),o===0&&a===0?r=0:r=ye(Math.atan2(o,a)+this.long0)}return e.x=r,e.y=n,e}var yC=["Fast_Transverse_Mercator","Fast Transverse Mercator"];const Ho={init:gC,forward:mC,inverse:vC,names:yC};function Ym(e){var t=Math.exp(e);return t=(t-1/t)/2,t}function yi(e,t){e=Math.abs(e),t=Math.abs(t);var i=Math.max(e,t),n=Math.min(e,t)/(i||1);return i*Math.sqrt(1+Math.pow(n,2))}function bC(e){var t=1+e,i=t-1;return i===0?e:e*Math.log(t)/i}function _C(e){var t=Math.abs(e);return t=bC(t*(1+t/(yi(1,t)+1))),e<0?-t:t}function _u(e,t){for(var i=2*Math.cos(2*t),n=e.length-1,r=e[n],s=0,c;--n>=0;)c=-s+i*r+e[n],s=r,r=c;return t+c*Math.sin(2*t)}function wC(e,t){for(var i=2*Math.cos(t),n=e.length-1,r=e[n],s=0,c;--n>=0;)c=-s+i*r+e[n],s=r,r=c;return Math.sin(t)*c}function SC(e){var t=Math.exp(e);return t=(t+1/t)/2,t}function Xm(e,t,i){for(var n=Math.sin(t),r=Math.cos(t),s=Ym(i),c=SC(i),u=2*r*c,o=-2*n*s,h=e.length-1,a=e[h],l=0,f=0,d=0,p,g;--h>=0;)p=f,g=l,f=a,l=d,a=-p+u*f-o*l+e[h],d=-g+o*f+u*l;return u=n*c,o=r*s,[u*a-o*d,u*d+o*a]}function AC(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(Ho.init.apply(this),this.forward=Ho.forward,this.inverse=Ho.inverse),this.x0=this.x0!==void 0?this.x0:0,this.y0=this.y0!==void 0?this.y0:0,this.long0=this.long0!==void 0?this.long0:0,this.lat0=this.lat0!==void 0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var e=this.es/(1+Math.sqrt(1-this.es)),t=e/(2-e),i=t;this.cgb[0]=t*(2+t*(-2/3+t*(-2+t*(116/45+t*(26/45+t*(-2854/675)))))),this.cbg[0]=t*(-2+t*(2/3+t*(4/3+t*(-82/45+t*(32/45+t*(4642/4725)))))),i=i*t,this.cgb[1]=i*(7/3+t*(-8/5+t*(-227/45+t*(2704/315+t*(2323/945))))),this.cbg[1]=i*(5/3+t*(-16/15+t*(-13/9+t*(904/315+t*(-1522/945))))),i=i*t,this.cgb[2]=i*(56/15+t*(-136/35+t*(-1262/105+t*(73814/2835)))),this.cbg[2]=i*(-26/15+t*(34/21+t*(8/5+t*(-12686/2835)))),i=i*t,this.cgb[3]=i*(4279/630+t*(-332/35+t*(-399572/14175))),this.cbg[3]=i*(1237/630+t*(-12/5+t*(-24832/14175))),i=i*t,this.cgb[4]=i*(4174/315+t*(-144838/6237)),this.cbg[4]=i*(-734/315+t*(109598/31185)),i=i*t,this.cgb[5]=i*(601676/22275),this.cbg[5]=i*(444337/155925),i=Math.pow(t,2),this.Qn=this.k0/(1+t)*(1+i*(1/4+i*(1/64+i/256))),this.utg[0]=t*(-.5+t*(2/3+t*(-37/96+t*(1/360+t*(81/512+t*(-96199/604800)))))),this.gtu[0]=t*(.5+t*(-2/3+t*(5/16+t*(41/180+t*(-127/288+t*(7891/37800)))))),this.utg[1]=i*(-1/48+t*(-1/15+t*(437/1440+t*(-46/105+t*(1118711/3870720))))),this.gtu[1]=i*(13/48+t*(-3/5+t*(557/1440+t*(281/630+t*(-1983433/1935360))))),i=i*t,this.utg[2]=i*(-17/480+t*(37/840+t*(209/4480+t*(-5569/90720)))),this.gtu[2]=i*(61/240+t*(-103/140+t*(15061/26880+t*(167603/181440)))),i=i*t,this.utg[3]=i*(-4397/161280+t*(11/504+t*(830251/7257600))),this.gtu[3]=i*(49561/161280+t*(-179/168+t*(6601661/7257600))),i=i*t,this.utg[4]=i*(-4583/161280+t*(108847/3991680)),this.gtu[4]=i*(34729/80640+t*(-3418889/1995840)),i=i*t,this.utg[5]=i*(-20648693/638668800),this.gtu[5]=i*(212378941/319334400);var n=_u(this.cbg,this.lat0);this.Zb=-this.Qn*(n+wC(this.gtu,2*n))}function CC(e){var t=ye(e.x-this.long0),i=e.y;i=_u(this.cbg,i);var n=Math.sin(i),r=Math.cos(i),s=Math.sin(t),c=Math.cos(t);i=Math.atan2(n,c*r),t=Math.atan2(s*r,yi(n,r*c)),t=_C(Math.tan(t));var u=Xm(this.gtu,2*i,2*t);i=i+u[0],t=t+u[1];var o,h;return Math.abs(t)<=2.623395162778?(o=this.a*(this.Qn*t)+this.x0,h=this.a*(this.Qn*i+this.Zb)+this.y0):(o=1/0,h=1/0),e.x=o,e.y=h,e}function xC(e){var t=(e.x-this.x0)*(1/this.a),i=(e.y-this.y0)*(1/this.a);i=(i-this.Zb)/this.Qn,t=t/this.Qn;var n,r;if(Math.abs(t)<=2.623395162778){var s=Xm(this.utg,2*i,2*t);i=i+s[0],t=t+s[1],t=Math.atan(Ym(t));var c=Math.sin(i),u=Math.cos(i),o=Math.sin(t),h=Math.cos(t);i=Math.atan2(c*h,yi(o,h*u)),t=Math.atan2(o,h*u),n=ye(t+this.long0),r=_u(this.cgb,i)}else n=1/0,r=1/0;return e.x=n,e.y=r,e}var TC=["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","tmerc"];const Uo={init:AC,forward:CC,inverse:xC,names:TC};function $C(e,t){if(e===void 0){if(e=Math.floor((ye(t)+Math.PI)*30/Math.PI)+1,e<0)return 0;if(e>60)return 60}return e}var MC="etmerc";function EC(){var e=$C(this.zone,this.long0);if(e===void 0)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(e)-183)*Mt,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,Uo.init.apply(this),this.forward=Uo.forward,this.inverse=Uo.inverse}var kC=["Universal Transverse Mercator System","utm"];const PC={init:EC,names:kC,dependsOn:MC};function wu(e,t){return Math.pow((1-e)/(1+e),t)}var LC=20;function RC(){var e=Math.sin(this.lat0),t=Math.cos(this.lat0);t*=t,this.rc=Math.sqrt(1-this.es)/(1-this.es*e*e),this.C=Math.sqrt(1+this.es*t*t/(1-this.es)),this.phic0=Math.asin(e/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+We)/(Math.pow(Math.tan(.5*this.lat0+We),this.C)*wu(this.e*e,this.ratexp))}function IC(e){var t=e.x,i=e.y;return e.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*i+We),this.C)*wu(this.e*Math.sin(i),this.ratexp))-ce,e.x=this.C*t,e}function OC(e){for(var t=1e-14,i=e.x/this.C,n=e.y,r=Math.pow(Math.tan(.5*n+We)/this.K,1/this.C),s=LC;s>0&&(n=2*Math.atan(r*wu(this.e*Math.sin(e.y),-.5*this.e))-ce,!(Math.abs(n-e.y)<t));--s)e.y=n;return s?(e.x=i,e.y=n,e):null}var NC=["gauss"];const Su={init:RC,forward:IC,inverse:OC,names:NC};function DC(){Su.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))}function FC(e){var t,i,n,r;return e.x=ye(e.x-this.long0),Su.forward.apply(this,[e]),t=Math.sin(e.y),i=Math.cos(e.y),n=Math.cos(e.x),r=this.k0*this.R2/(1+this.sinc0*t+this.cosc0*i*n),e.x=r*i*Math.sin(e.x),e.y=r*(this.cosc0*t-this.sinc0*i*n),e.x=this.a*e.x+this.x0,e.y=this.a*e.y+this.y0,e}function BC(e){var t,i,n,r,s;if(e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,e.x/=this.k0,e.y/=this.k0,s=Math.sqrt(e.x*e.x+e.y*e.y)){var c=2*Math.atan2(s,this.R2);t=Math.sin(c),i=Math.cos(c),r=Math.asin(i*this.sinc0+e.y*t*this.cosc0/s),n=Math.atan2(e.x*t,s*this.cosc0*i-e.y*this.sinc0*t)}else r=this.phic0,n=0;return e.x=n,e.y=r,Su.inverse.apply(this,[e]),e.x=ye(e.x+this.long0),e}var VC=["Stereographic_North_Pole","Oblique_Stereographic","Polar_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"];const zC={init:DC,forward:FC,inverse:BC,names:VC};function HC(e,t,i){return t*=i,Math.tan(.5*(ce+e))*Math.pow((1-t)/(1+t),.5*i)}function UC(){this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=pe&&(this.k0=.5*(1+eo(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=pe&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=pe&&(this.k0=.5*this.cons*Bi(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/Si(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=Bi(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-ce,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))}function WC(e){var t=e.x,i=e.y,n=Math.sin(i),r=Math.cos(i),s,c,u,o,h,a,l=ye(t-this.long0);return Math.abs(Math.abs(t-this.long0)-Math.PI)<=pe&&Math.abs(i+this.lat0)<=pe?(e.x=NaN,e.y=NaN,e):this.sphere?(s=2*this.k0/(1+this.sinlat0*n+this.coslat0*r*Math.cos(l)),e.x=this.a*s*r*Math.sin(l)+this.x0,e.y=this.a*s*(this.coslat0*n-this.sinlat0*r*Math.cos(l))+this.y0,e):(c=2*Math.atan(this.ssfn_(i,n,this.e))-ce,o=Math.cos(c),u=Math.sin(c),Math.abs(this.coslat0)<=pe?(h=Si(this.e,i*this.con,this.con*n),a=2*this.a*this.k0*h/this.cons,e.x=this.x0+a*Math.sin(t-this.long0),e.y=this.y0-this.con*a*Math.cos(t-this.long0),e):(Math.abs(this.sinlat0)<pe?(s=2*this.a*this.k0/(1+o*Math.cos(l)),e.y=s*u):(s=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*u+this.cosX0*o*Math.cos(l))),e.y=s*(this.cosX0*u-this.sinX0*o*Math.cos(l))+this.y0),e.x=s*o*Math.sin(l)+this.x0,e))}function jC(e){e.x-=this.x0,e.y-=this.y0;var t,i,n,r,s,c=Math.sqrt(e.x*e.x+e.y*e.y);if(this.sphere){var u=2*Math.atan(c/(2*this.a*this.k0));return t=this.long0,i=this.lat0,c<=pe?(e.x=t,e.y=i,e):(i=Math.asin(Math.cos(u)*this.sinlat0+e.y*Math.sin(u)*this.coslat0/c),Math.abs(this.coslat0)<pe?this.lat0>0?t=ye(this.long0+Math.atan2(e.x,-1*e.y)):t=ye(this.long0+Math.atan2(e.x,e.y)):t=ye(this.long0+Math.atan2(e.x*Math.sin(u),c*this.coslat0*Math.cos(u)-e.y*this.sinlat0*Math.sin(u))),e.x=t,e.y=i,e)}else if(Math.abs(this.coslat0)<=pe){if(c<=pe)return i=this.lat0,t=this.long0,e.x=t,e.y=i,e;e.x*=this.con,e.y*=this.con,n=c*this.cons/(2*this.a*this.k0),i=this.con*Ws(this.e,n),t=this.con*ye(this.con*this.long0+Math.atan2(e.x,-1*e.y))}else r=2*Math.atan(c*this.cosX0/(2*this.a*this.k0*this.ms1)),t=this.long0,c<=pe?s=this.X0:(s=Math.asin(Math.cos(r)*this.sinX0+e.y*Math.sin(r)*this.cosX0/c),t=ye(this.long0+Math.atan2(e.x*Math.sin(r),c*this.cosX0*Math.cos(r)-e.y*this.sinX0*Math.sin(r)))),i=-1*Ws(this.e,Math.tan(.5*(ce+s)));return e.x=t,e.y=i,e}var GC=["stere","Stereographic_South_Pole","Polar Stereographic (variant B)"];const qC={init:UC,forward:WC,inverse:jC,names:GC,ssfn_:HC};function KC(){var e=this.lat0;this.lambda0=this.long0;var t=Math.sin(e),i=this.a,n=this.rf,r=1/n,s=2*r-Math.pow(r,2),c=this.e=Math.sqrt(s);this.R=this.k0*i*Math.sqrt(1-s)/(1-s*Math.pow(t,2)),this.alpha=Math.sqrt(1+s/(1-s)*Math.pow(Math.cos(e),4)),this.b0=Math.asin(t/this.alpha);var u=Math.log(Math.tan(Math.PI/4+this.b0/2)),o=Math.log(Math.tan(Math.PI/4+e/2)),h=Math.log((1+c*t)/(1-c*t));this.K=u-this.alpha*o+this.alpha*c/2*h}function YC(e){var t=Math.log(Math.tan(Math.PI/4-e.y/2)),i=this.e/2*Math.log((1+this.e*Math.sin(e.y))/(1-this.e*Math.sin(e.y))),n=-this.alpha*(t+i)+this.K,r=2*(Math.atan(Math.exp(n))-Math.PI/4),s=this.alpha*(e.x-this.lambda0),c=Math.atan(Math.sin(s)/(Math.sin(this.b0)*Math.tan(r)+Math.cos(this.b0)*Math.cos(s))),u=Math.asin(Math.cos(this.b0)*Math.sin(r)-Math.sin(this.b0)*Math.cos(r)*Math.cos(s));return e.y=this.R/2*Math.log((1+Math.sin(u))/(1-Math.sin(u)))+this.y0,e.x=this.R*c+this.x0,e}function XC(e){for(var t=e.x-this.x0,i=e.y-this.y0,n=t/this.R,r=2*(Math.atan(Math.exp(i/this.R))-Math.PI/4),s=Math.asin(Math.cos(this.b0)*Math.sin(r)+Math.sin(this.b0)*Math.cos(r)*Math.cos(n)),c=Math.atan(Math.sin(n)/(Math.cos(this.b0)*Math.cos(n)-Math.sin(this.b0)*Math.tan(r))),u=this.lambda0+c/this.alpha,o=0,h=s,a=-1e3,l=0;Math.abs(h-a)>1e-7;){if(++l>20)return;o=1/this.alpha*(Math.log(Math.tan(Math.PI/4+s/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(h))/2)),a=h,h=2*Math.atan(Math.exp(o))-Math.PI/2}return e.x=u,e.y=h,e}var QC=["somerc"];const JC={init:KC,forward:YC,inverse:XC,names:QC};var Ar=1e-7;function ZC(e){var t=["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"],i=typeof e.PROJECTION=="object"?Object.keys(e.PROJECTION)[0]:e.PROJECTION;return"no_uoff"in e||"no_off"in e||t.indexOf(i)!==-1}function ex(){var e,t,i,n,r,s,c,u,o,h,a=0,l,f=0,d=0,p=0,g=0,m=0,v=0;this.no_off=ZC(this),this.no_rot="no_rot"in this;var y=!1;"alpha"in this&&(y=!0);var S=!1;if("rectified_grid_angle"in this&&(S=!0),y&&(v=this.alpha),S&&(a=this.rectified_grid_angle*Mt),y||S)f=this.longc;else if(d=this.long1,g=this.lat1,p=this.long2,m=this.lat2,Math.abs(g-m)<=Ar||(e=Math.abs(g))<=Ar||Math.abs(e-ce)<=Ar||Math.abs(Math.abs(this.lat0)-ce)<=Ar||Math.abs(Math.abs(m)-ce)<=Ar)throw new Error;var b=1-this.es;t=Math.sqrt(b),Math.abs(this.lat0)>pe?(u=Math.sin(this.lat0),i=Math.cos(this.lat0),e=1-this.es*u*u,this.B=i*i,this.B=Math.sqrt(1+this.es*this.B*this.B/b),this.A=this.B*this.k0*t/e,n=this.B*t/(i*Math.sqrt(e)),r=n*n-1,r<=0?r=0:(r=Math.sqrt(r),this.lat0<0&&(r=-r)),this.E=r+=n,this.E*=Math.pow(Si(this.e,this.lat0,u),this.B)):(this.B=1/t,this.A=this.k0,this.E=n=r=1),y||S?(y?(l=Math.asin(Math.sin(v)/n),S||(a=v)):(l=a,v=Math.asin(n*Math.sin(l))),this.lam0=f-Math.asin(.5*(r-1/r)*Math.tan(l))/this.B):(s=Math.pow(Si(this.e,g,Math.sin(g)),this.B),c=Math.pow(Si(this.e,m,Math.sin(m)),this.B),r=this.E/s,o=(c-s)/(c+s),h=this.E*this.E,h=(h-c*s)/(h+c*s),e=d-p,e<-Math.pi?p-=Hs:e>Math.pi&&(p+=Hs),this.lam0=ye(.5*(d+p)-Math.atan(h*Math.tan(.5*this.B*(d-p))/o)/this.B),l=Math.atan(2*Math.sin(this.B*ye(d-this.lam0))/(r-1/r)),a=v=Math.asin(n*Math.sin(l))),this.singam=Math.sin(l),this.cosgam=Math.cos(l),this.sinrot=Math.sin(a),this.cosrot=Math.cos(a),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.A*this.B,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(n*n-1)/Math.cos(v))),this.lat0<0&&(this.u_0=-this.u_0)),r=.5*l,this.v_pole_n=this.ArB*Math.log(Math.tan(We-r)),this.v_pole_s=this.ArB*Math.log(Math.tan(We+r))}function tx(e){var t={},i,n,r,s,c,u,o,h;if(e.x=e.x-this.lam0,Math.abs(Math.abs(e.y)-ce)>pe){if(c=this.E/Math.pow(Si(this.e,e.y,Math.sin(e.y)),this.B),u=1/c,i=.5*(c-u),n=.5*(c+u),s=Math.sin(this.B*e.x),r=(i*this.singam-s*this.cosgam)/n,Math.abs(Math.abs(r)-1)<pe)throw new Error;h=.5*this.ArB*Math.log((1-r)/(1+r)),u=Math.cos(this.B*e.x),Math.abs(u)<Ar?o=this.A*e.x:o=this.ArB*Math.atan2(i*this.cosgam+s*this.singam,u)}else h=e.y>0?this.v_pole_n:this.v_pole_s,o=this.ArB*e.y;return this.no_rot?(t.x=o,t.y=h):(o-=this.u_0,t.x=h*this.cosrot+o*this.sinrot,t.y=o*this.cosrot-h*this.sinrot),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t}function ix(e){var t,i,n,r,s,c,u,o={};if(e.x=(e.x-this.x0)*(1/this.a),e.y=(e.y-this.y0)*(1/this.a),this.no_rot?(i=e.y,t=e.x):(i=e.x*this.cosrot-e.y*this.sinrot,t=e.y*this.cosrot+e.x*this.sinrot+this.u_0),n=Math.exp(-this.BrA*i),r=.5*(n-1/n),s=.5*(n+1/n),c=Math.sin(this.BrA*t),u=(c*this.cosgam+r*this.singam)/s,Math.abs(Math.abs(u)-1)<pe)o.x=0,o.y=u<0?-ce:ce;else{if(o.y=this.E/Math.sqrt((1+u)/(1-u)),o.y=Ws(this.e,Math.pow(o.y,1/this.B)),o.y===1/0)throw new Error;o.x=-this.rB*Math.atan2(r*this.cosgam-c*this.singam,Math.cos(this.BrA*t))}return o.x+=this.lam0,o}var nx=["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Two_Point_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","Oblique_Mercator","omerc"];const rx={init:ex,forward:tx,inverse:ix,names:nx};function sx(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(Math.abs(this.lat1+this.lat2)<pe)){var e=this.b/this.a;this.e=Math.sqrt(1-e*e);var t=Math.sin(this.lat1),i=Math.cos(this.lat1),n=Bi(this.e,t,i),r=Si(this.e,this.lat1,t),s=Math.sin(this.lat2),c=Math.cos(this.lat2),u=Bi(this.e,s,c),o=Si(this.e,this.lat2,s),h=Si(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>pe?this.ns=Math.log(n/u)/Math.log(r/o):this.ns=t,isNaN(this.ns)&&(this.ns=t),this.f0=n/(this.ns*Math.pow(r,this.ns)),this.rh=this.a*this.f0*Math.pow(h,this.ns),this.title||(this.title="Lambert Conformal Conic")}}function ox(e){var t=e.x,i=e.y;Math.abs(2*Math.abs(i)-Math.PI)<=pe&&(i=eo(i)*(ce-2*pe));var n=Math.abs(Math.abs(i)-ce),r,s;if(n>pe)r=Si(this.e,i,Math.sin(i)),s=this.a*this.f0*Math.pow(r,this.ns);else{if(n=i*this.ns,n<=0)return null;s=0}var c=this.ns*ye(t-this.long0);return e.x=this.k0*(s*Math.sin(c))+this.x0,e.y=this.k0*(this.rh-s*Math.cos(c))+this.y0,e}function ax(e){var t,i,n,r,s,c=(e.x-this.x0)/this.k0,u=this.rh-(e.y-this.y0)/this.k0;this.ns>0?(t=Math.sqrt(c*c+u*u),i=1):(t=-Math.sqrt(c*c+u*u),i=-1);var o=0;if(t!==0&&(o=Math.atan2(i*c,i*u)),t!==0||this.ns>0){if(i=1/this.ns,n=Math.pow(t/(this.a*this.f0),i),r=Ws(this.e,n),r===-9999)return null}else r=-ce;return s=ye(o/this.ns+this.long0),e.x=s,e.y=r,e}var lx=["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc","Lambert Conic Conformal (1SP)","Lambert Conic Conformal (2SP)"];const cx={init:sx,forward:ox,inverse:ax,names:lx};function ux(){this.a=6377397155e-3,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.7417649320975901-.308341501185665),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq}function hx(e){var t,i,n,r,s,c,u,o=e.x,h=e.y,a=ye(o-this.long0);return t=Math.pow((1+this.e*Math.sin(h))/(1-this.e*Math.sin(h)),this.alfa*this.e/2),i=2*(Math.atan(this.k*Math.pow(Math.tan(h/2+this.s45),this.alfa)/t)-this.s45),n=-a*this.alfa,r=Math.asin(Math.cos(this.ad)*Math.sin(i)+Math.sin(this.ad)*Math.cos(i)*Math.cos(n)),s=Math.asin(Math.cos(i)*Math.sin(n)/Math.cos(r)),c=this.n*s,u=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(r/2+this.s45),this.n),e.y=u*Math.cos(c)/1,e.x=u*Math.sin(c)/1,this.czech||(e.y*=-1,e.x*=-1),e}function dx(e){var t,i,n,r,s,c,u,o,h=e.x;e.x=e.y,e.y=h,this.czech||(e.y*=-1,e.x*=-1),c=Math.sqrt(e.x*e.x+e.y*e.y),s=Math.atan2(e.y,e.x),r=s/Math.sin(this.s0),n=2*(Math.atan(Math.pow(this.ro0/c,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),t=Math.asin(Math.cos(this.ad)*Math.sin(n)-Math.sin(this.ad)*Math.cos(n)*Math.cos(r)),i=Math.asin(Math.cos(n)*Math.sin(r)/Math.cos(t)),e.x=this.long0-i/this.alfa,u=t,o=0;var a=0;do e.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(t/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(u))/(1-this.e*Math.sin(u)),this.e/2))-this.s45),Math.abs(u-e.y)<1e-10&&(o=1),u=e.y,a+=1;while(o===0&&a<15);return a>=15?null:e}var fx=["Krovak","krovak"];const px={init:ux,forward:hx,inverse:dx,names:fx};function Ut(e,t,i,n,r){return e*r-t*Math.sin(2*r)+i*Math.sin(4*r)-n*Math.sin(6*r)}function to(e){return 1-.25*e*(1+e/16*(3+1.25*e))}function io(e){return .375*e*(1+.25*e*(1+.46875*e))}function no(e){return .05859375*e*e*(1+.75*e)}function ro(e){return e*e*e*(35/3072)}function Gr(e,t,i){var n=t*i;return e/Math.sqrt(1-n*n)}function es(e){return Math.abs(e)<ce?e:e-eo(e)*Math.PI}function ma(e,t,i,n,r){var s,c;s=e/t;for(var u=0;u<15;u++)if(c=(e-(t*s-i*Math.sin(2*s)+n*Math.sin(4*s)-r*Math.sin(6*s)))/(t-2*i*Math.cos(2*s)+4*n*Math.cos(4*s)-6*r*Math.cos(6*s)),s+=c,Math.abs(c)<=1e-10)return s;return NaN}function gx(){this.sphere||(this.e0=to(this.es),this.e1=io(this.es),this.e2=no(this.es),this.e3=ro(this.es),this.ml0=this.a*Ut(this.e0,this.e1,this.e2,this.e3,this.lat0))}function mx(e){var t,i,n=e.x,r=e.y;if(n=ye(n-this.long0),this.sphere)t=this.a*Math.asin(Math.cos(r)*Math.sin(n)),i=this.a*(Math.atan2(Math.tan(r),Math.cos(n))-this.lat0);else{var s=Math.sin(r),c=Math.cos(r),u=Gr(this.a,this.e,s),o=Math.tan(r)*Math.tan(r),h=n*Math.cos(r),a=h*h,l=this.es*c*c/(1-this.es),f=this.a*Ut(this.e0,this.e1,this.e2,this.e3,r);t=u*h*(1-a*o*(1/6-(8-o+8*l)*a/120)),i=f-this.ml0+u*s/c*a*(.5+(5-o+6*l)*a/24)}return e.x=t+this.x0,e.y=i+this.y0,e}function vx(e){e.x-=this.x0,e.y-=this.y0;var t=e.x/this.a,i=e.y/this.a,n,r;if(this.sphere){var s=i+this.lat0;n=Math.asin(Math.sin(s)*Math.cos(t)),r=Math.atan2(Math.tan(t),Math.cos(s))}else{var c=this.ml0/this.a+i,u=ma(c,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(u)-ce)<=pe)return e.x=this.long0,e.y=ce,i<0&&(e.y*=-1),e;var o=Gr(this.a,this.e,Math.sin(u)),h=o*o*o/this.a/this.a*(1-this.es),a=Math.pow(Math.tan(u),2),l=t*this.a/o,f=l*l;n=u-o*Math.tan(u)/h*l*l*(.5-(1+3*a)*l*l/24),r=l*(1-f*(a/3+(1+3*a)*a*f/15))/Math.cos(u)}return e.x=ye(r+this.long0),e.y=es(n),e}var yx=["Cassini","Cassini_Soldner","cass"];const bx={init:gx,forward:mx,inverse:vx,names:yx};function En(e,t){var i;return e>1e-7?(i=e*t,(1-e*e)*(t/(1-i*i)-.5/e*Math.log((1-i)/(1+i)))):2*t}var _x=1,wx=2,Sx=3,Ax=4;function Cx(){var e=Math.abs(this.lat0);if(Math.abs(e-ce)<pe?this.mode=this.lat0<0?this.S_POLE:this.N_POLE:Math.abs(e)<pe?this.mode=this.EQUIT:this.mode=this.OBLIQ,this.es>0){var t;switch(this.qp=En(this.e,1),this.mmf=.5/(1-this.es),this.apa=Rx(this.es),this.mode){case this.N_POLE:this.dd=1;break;case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),t=Math.sin(this.lat0),this.sinb1=En(this.e,t)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*t*t)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd;break}}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))}function xx(e){var t,i,n,r,s,c,u,o,h,a,l=e.x,f=e.y;if(l=ye(l-this.long0),this.sphere){if(s=Math.sin(f),a=Math.cos(f),n=Math.cos(l),this.mode===this.OBLIQ||this.mode===this.EQUIT){if(i=this.mode===this.EQUIT?1+a*n:1+this.sinph0*s+this.cosph0*a*n,i<=pe)return null;i=Math.sqrt(2/i),t=i*a*Math.sin(l),i*=this.mode===this.EQUIT?s:this.cosph0*s-this.sinph0*a*n}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(n=-n),Math.abs(f+this.lat0)<pe)return null;i=We-f*.5,i=2*(this.mode===this.S_POLE?Math.cos(i):Math.sin(i)),t=i*Math.sin(l),i*=n}}else{switch(u=0,o=0,h=0,n=Math.cos(l),r=Math.sin(l),s=Math.sin(f),c=En(this.e,s),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(u=c/this.qp,o=Math.sqrt(1-u*u)),this.mode){case this.OBLIQ:h=1+this.sinb1*u+this.cosb1*o*n;break;case this.EQUIT:h=1+o*n;break;case this.N_POLE:h=ce+f,c=this.qp-c;break;case this.S_POLE:h=f-ce,c=this.qp+c;break}if(Math.abs(h)<pe)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:h=Math.sqrt(2/h),this.mode===this.OBLIQ?i=this.ymf*h*(this.cosb1*u-this.sinb1*o*n):i=(h=Math.sqrt(2/(1+o*n)))*u*this.ymf,t=this.xmf*h*o*r;break;case this.N_POLE:case this.S_POLE:c>=0?(t=(h=Math.sqrt(c))*r,i=n*(this.mode===this.S_POLE?h:-h)):t=i=0;break}}return e.x=this.a*t+this.x0,e.y=this.a*i+this.y0,e}function Tx(e){e.x-=this.x0,e.y-=this.y0;var t=e.x/this.a,i=e.y/this.a,n,r,s,c,u,o,h;if(this.sphere){var a=0,l,f=0;if(l=Math.sqrt(t*t+i*i),r=l*.5,r>1)return null;switch(r=2*Math.asin(r),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(f=Math.sin(r),a=Math.cos(r)),this.mode){case this.EQUIT:r=Math.abs(l)<=pe?0:Math.asin(i*f/l),t*=f,i=a*l;break;case this.OBLIQ:r=Math.abs(l)<=pe?this.lat0:Math.asin(a*this.sinph0+i*f*this.cosph0/l),t*=f*this.cosph0,i=(a-Math.sin(r)*this.sinph0)*l;break;case this.N_POLE:i=-i,r=ce-r;break;case this.S_POLE:r-=ce;break}n=i===0&&(this.mode===this.EQUIT||this.mode===this.OBLIQ)?0:Math.atan2(t,i)}else{if(h=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(t/=this.dd,i*=this.dd,o=Math.sqrt(t*t+i*i),o<pe)return e.x=this.long0,e.y=this.lat0,e;c=2*Math.asin(.5*o/this.rq),s=Math.cos(c),t*=c=Math.sin(c),this.mode===this.OBLIQ?(h=s*this.sinb1+i*c*this.cosb1/o,u=this.qp*h,i=o*this.cosb1*s-i*this.sinb1*c):(h=i*c/o,u=this.qp*h,i=o*s)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(i=-i),u=t*t+i*i,!u)return e.x=this.long0,e.y=this.lat0,e;h=1-u/this.qp,this.mode===this.S_POLE&&(h=-h)}n=Math.atan2(t,i),r=Ix(Math.asin(h),this.apa)}return e.x=ye(this.long0+n),e.y=r,e}var $x=.3333333333333333,Mx=.17222222222222222,Ex=.10257936507936508,kx=.06388888888888888,Px=.0664021164021164,Lx=.016415012942191543;function Rx(e){var t,i=[];return i[0]=e*$x,t=e*e,i[0]+=t*Mx,i[1]=t*kx,t*=e,i[0]+=t*Ex,i[1]+=t*Px,i[2]=t*Lx,i}function Ix(e,t){var i=e+e;return e+t[0]*Math.sin(i)+t[1]*Math.sin(i+i)+t[2]*Math.sin(i+i+i)}var Ox=["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"];const Nx={init:Cx,forward:xx,inverse:Tx,names:Ox,S_POLE:_x,N_POLE:wx,EQUIT:Sx,OBLIQ:Ax};function On(e){return Math.abs(e)>1&&(e=e>1?1:-1),Math.asin(e)}function Dx(){Math.abs(this.lat1+this.lat2)<pe||(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.t1=this.sin_po,this.con=this.sin_po,this.ms1=Bi(this.e3,this.sin_po,this.cos_po),this.qs1=En(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=Bi(this.e3,this.sin_po,this.cos_po),this.qs2=En(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=En(this.e3,this.sin_po),Math.abs(this.lat1-this.lat2)>pe?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)}function Fx(e){var t=e.x,i=e.y;this.sin_phi=Math.sin(i),this.cos_phi=Math.cos(i);var n=En(this.e3,this.sin_phi),r=this.a*Math.sqrt(this.c-this.ns0*n)/this.ns0,s=this.ns0*ye(t-this.long0),c=r*Math.sin(s)+this.x0,u=this.rh-r*Math.cos(s)+this.y0;return e.x=c,e.y=u,e}function Bx(e){var t,i,n,r,s,c;return e.x-=this.x0,e.y=this.rh-e.y+this.y0,this.ns0>=0?(t=Math.sqrt(e.x*e.x+e.y*e.y),n=1):(t=-Math.sqrt(e.x*e.x+e.y*e.y),n=-1),r=0,t!==0&&(r=Math.atan2(n*e.x,n*e.y)),n=t*this.ns0/this.a,this.sphere?c=Math.asin((this.c-n*n)/(2*this.ns0)):(i=(this.c-n*n)/this.ns0,c=this.phi1z(this.e3,i)),s=ye(r/this.ns0+this.long0),e.x=s,e.y=c,e}function Vx(e,t){var i,n,r,s,c,u=On(.5*t);if(e<pe)return u;for(var o=e*e,h=1;h<=25;h++)if(i=Math.sin(u),n=Math.cos(u),r=e*i,s=1-r*r,c=.5*s*s/n*(t/(1-o)-i/s+.5/e*Math.log((1-r)/(1+r))),u=u+c,Math.abs(c)<=1e-7)return u;return null}var zx=["Albers_Conic_Equal_Area","Albers","aea"];const Hx={init:Dx,forward:Fx,inverse:Bx,names:zx,phi1z:Vx};function Ux(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1}function Wx(e){var t,i,n,r,s,c,u,o,h=e.x,a=e.y;return n=ye(h-this.long0),t=Math.sin(a),i=Math.cos(a),r=Math.cos(n),c=this.sin_p14*t+this.cos_p14*i*r,s=1,c>0||Math.abs(c)<=pe?(u=this.x0+this.a*s*i*Math.sin(n)/c,o=this.y0+this.a*s*(this.cos_p14*t-this.sin_p14*i*r)/c):(u=this.x0+this.infinity_dist*i*Math.sin(n),o=this.y0+this.infinity_dist*(this.cos_p14*t-this.sin_p14*i*r)),e.x=u,e.y=o,e}function jx(e){var t,i,n,r,s,c;return e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,e.x/=this.k0,e.y/=this.k0,(t=Math.sqrt(e.x*e.x+e.y*e.y))?(r=Math.atan2(t,this.rc),i=Math.sin(r),n=Math.cos(r),c=On(n*this.sin_p14+e.y*i*this.cos_p14/t),s=Math.atan2(e.x*i,t*this.cos_p14*n-e.y*this.sin_p14*i),s=ye(this.long0+s)):(c=this.phic0,s=0),e.x=s,e.y=c,e}var Gx=["gnom"];const qx={init:Ux,forward:Wx,inverse:jx,names:Gx};function Kx(e,t){var i=1-(1-e*e)/(2*e)*Math.log((1-e)/(1+e));if(Math.abs(Math.abs(t)-i)<1e-6)return t<0?-1*ce:ce;for(var n=Math.asin(.5*t),r,s,c,u,o=0;o<30;o++)if(s=Math.sin(n),c=Math.cos(n),u=e*s,r=Math.pow(1-u*u,2)/(2*c)*(t/(1-e*e)-s/(1-u*u)+.5/e*Math.log((1-u)/(1+u))),n+=r,Math.abs(r)<=1e-10)return n;return NaN}function Yx(){this.sphere||(this.k0=Bi(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))}function Xx(e){var t=e.x,i=e.y,n,r,s=ye(t-this.long0);if(this.sphere)n=this.x0+this.a*s*Math.cos(this.lat_ts),r=this.y0+this.a*Math.sin(i)/Math.cos(this.lat_ts);else{var c=En(this.e,Math.sin(i));n=this.x0+this.a*this.k0*s,r=this.y0+this.a*c*.5/this.k0}return e.x=n,e.y=r,e}function Qx(e){e.x-=this.x0,e.y-=this.y0;var t,i;return this.sphere?(t=ye(this.long0+e.x/this.a/Math.cos(this.lat_ts)),i=Math.asin(e.y/this.a*Math.cos(this.lat_ts))):(i=Kx(this.e,2*e.y*this.k0/this.a),t=ye(this.long0+e.x/(this.a*this.k0))),e.x=t,e.y=i,e}var Jx=["cea"];const Zx={init:Yx,forward:Xx,inverse:Qx,names:Jx};function eT(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)}function tT(e){var t=e.x,i=e.y,n=ye(t-this.long0),r=es(i-this.lat0);return e.x=this.x0+this.a*n*this.rc,e.y=this.y0+this.a*r,e}function iT(e){var t=e.x,i=e.y;return e.x=ye(this.long0+(t-this.x0)/(this.a*this.rc)),e.y=es(this.lat0+(i-this.y0)/this.a),e}var nT=["Equirectangular","Equidistant_Cylindrical","eqc"];const rT={init:eT,forward:tT,inverse:iT,names:nT};var Bd=20;function sT(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=to(this.es),this.e1=io(this.es),this.e2=no(this.es),this.e3=ro(this.es),this.ml0=this.a*Ut(this.e0,this.e1,this.e2,this.e3,this.lat0)}function oT(e){var t=e.x,i=e.y,n,r,s,c=ye(t-this.long0);if(s=c*Math.sin(i),this.sphere)Math.abs(i)<=pe?(n=this.a*c,r=-1*this.a*this.lat0):(n=this.a*Math.sin(s)/Math.tan(i),r=this.a*(es(i-this.lat0)+(1-Math.cos(s))/Math.tan(i)));else if(Math.abs(i)<=pe)n=this.a*c,r=-1*this.ml0;else{var u=Gr(this.a,this.e,Math.sin(i))/Math.tan(i);n=u*Math.sin(s),r=this.a*Ut(this.e0,this.e1,this.e2,this.e3,i)-this.ml0+u*(1-Math.cos(s))}return e.x=n+this.x0,e.y=r+this.y0,e}function aT(e){var t,i,n,r,s,c,u,o,h;if(n=e.x-this.x0,r=e.y-this.y0,this.sphere)if(Math.abs(r+this.a*this.lat0)<=pe)t=ye(n/this.a+this.long0),i=0;else{c=this.lat0+r/this.a,u=n*n/this.a/this.a+c*c,o=c;var a;for(s=Bd;s;--s)if(a=Math.tan(o),h=-1*(c*(o*a+1)-o-.5*(o*o+u)*a)/((o-c)/a-1),o+=h,Math.abs(h)<=pe){i=o;break}t=ye(this.long0+Math.asin(n*Math.tan(o)/this.a)/Math.sin(i))}else if(Math.abs(r+this.ml0)<=pe)i=0,t=ye(this.long0+n/this.a);else{c=(this.ml0+r)/this.a,u=n*n/this.a/this.a+c*c,o=c;var l,f,d,p,g;for(s=Bd;s;--s)if(g=this.e*Math.sin(o),l=Math.sqrt(1-g*g)*Math.tan(o),f=this.a*Ut(this.e0,this.e1,this.e2,this.e3,o),d=this.e0-2*this.e1*Math.cos(2*o)+4*this.e2*Math.cos(4*o)-6*this.e3*Math.cos(6*o),p=f/this.a,h=(c*(l*p+1)-p-.5*l*(p*p+u))/(this.es*Math.sin(2*o)*(p*p+u-2*c*p)/(4*l)+(c-p)*(l*d-2/Math.sin(2*o))-d),o-=h,Math.abs(h)<=pe){i=o;break}l=Math.sqrt(1-this.es*Math.pow(Math.sin(i),2))*Math.tan(i),t=ye(this.long0+Math.asin(n*l/this.a)/Math.sin(i))}return e.x=t,e.y=i,e}var lT=["Polyconic","poly"];const cT={init:sT,forward:oT,inverse:aT,names:lT};function uT(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013}function hT(e){var t,i=e.x,n=e.y,r=n-this.lat0,s=i-this.long0,c=r/$s*1e-5,u=s,o=1,h=0;for(t=1;t<=10;t++)o=o*c,h=h+this.A[t]*o;var a=h,l=u,f=1,d=0,p,g,m=0,v=0;for(t=1;t<=6;t++)p=f*a-d*l,g=d*a+f*l,f=p,d=g,m=m+this.B_re[t]*f-this.B_im[t]*d,v=v+this.B_im[t]*f+this.B_re[t]*d;return e.x=v*this.a+this.x0,e.y=m*this.a+this.y0,e}function dT(e){var t,i=e.x,n=e.y,r=i-this.x0,s=n-this.y0,c=s/this.a,u=r/this.a,o=1,h=0,a,l,f=0,d=0;for(t=1;t<=6;t++)a=o*c-h*u,l=h*c+o*u,o=a,h=l,f=f+this.C_re[t]*o-this.C_im[t]*h,d=d+this.C_im[t]*o+this.C_re[t]*h;for(var p=0;p<this.iterations;p++){var g=f,m=d,v,y,S=c,b=u;for(t=2;t<=6;t++)v=g*f-m*d,y=m*f+g*d,g=v,m=y,S=S+(t-1)*(this.B_re[t]*g-this.B_im[t]*m),b=b+(t-1)*(this.B_im[t]*g+this.B_re[t]*m);g=1,m=0;var _=this.B_re[1],w=this.B_im[1];for(t=2;t<=6;t++)v=g*f-m*d,y=m*f+g*d,g=v,m=y,_=_+t*(this.B_re[t]*g-this.B_im[t]*m),w=w+t*(this.B_im[t]*g+this.B_re[t]*m);var E=_*_+w*w;f=(S*_+b*w)/E,d=(b*_-S*w)/E}var T=f,$=d,C=1,x=0;for(t=1;t<=9;t++)C=C*T,x=x+this.D[t]*C;var L=this.lat0+x*$s*1e5,M=this.long0+$;return e.x=M,e.y=L,e}var fT=["New_Zealand_Map_Grid","nzmg"];const pT={init:uT,forward:hT,inverse:dT,names:fT};function gT(){}function mT(e){var t=e.x,i=e.y,n=ye(t-this.long0),r=this.x0+this.a*n,s=this.y0+this.a*Math.log(Math.tan(Math.PI/4+i/2.5))*1.25;return e.x=r,e.y=s,e}function vT(e){e.x-=this.x0,e.y-=this.y0;var t=ye(this.long0+e.x/this.a),i=2.5*(Math.atan(Math.exp(.8*e.y/this.a))-Math.PI/4);return e.x=t,e.y=i,e}var yT=["Miller_Cylindrical","mill"];const bT={init:gT,forward:mT,inverse:vT,names:yT};var _T=20;function wT(){this.sphere?(this.n=1,this.m=0,this.es=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)):this.en=qm(this.es)}function ST(e){var t,i,n=e.x,r=e.y;if(n=ye(n-this.long0),this.sphere){if(!this.m)r=this.n!==1?Math.asin(this.n*Math.sin(r)):r;else for(var s=this.n*Math.sin(r),c=_T;c;--c){var u=(this.m*r+Math.sin(r)-s)/(this.m+Math.cos(r));if(r-=u,Math.abs(u)<pe)break}t=this.a*this.C_x*n*(this.m+Math.cos(r)),i=this.a*this.C_y*r}else{var o=Math.sin(r),h=Math.cos(r);i=this.a*za(r,o,h,this.en),t=this.a*n*h/Math.sqrt(1-this.es*o*o)}return e.x=t,e.y=i,e}function AT(e){var t,i,n,r;return e.x-=this.x0,n=e.x/this.a,e.y-=this.y0,t=e.y/this.a,this.sphere?(t/=this.C_y,n=n/(this.C_x*(this.m+Math.cos(t))),this.m?t=On((this.m*t+Math.sin(t))/this.n):this.n!==1&&(t=On(Math.sin(t)/this.n)),n=ye(n+this.long0),t=es(t)):(t=Km(e.y/this.a,this.es,this.en),r=Math.abs(t),r<ce?(r=Math.sin(t),i=this.long0+e.x*Math.sqrt(1-this.es*r*r)/(this.a*Math.cos(t)),n=ye(i)):r-pe<ce&&(n=this.long0)),e.x=n,e.y=t,e}var CT=["Sinusoidal","sinu"];const xT={init:wT,forward:ST,inverse:AT,names:CT};function TT(){}function $T(e){for(var t=e.x,i=e.y,n=ye(t-this.long0),r=i,s=Math.PI*Math.sin(i);;){var c=-(r+Math.sin(r)-s)/(1+Math.cos(r));if(r+=c,Math.abs(c)<pe)break}r/=2,Math.PI/2-Math.abs(i)<pe&&(n=0);var u=.900316316158*this.a*n*Math.cos(r)+this.x0,o=1.4142135623731*this.a*Math.sin(r)+this.y0;return e.x=u,e.y=o,e}function MT(e){var t,i;e.x-=this.x0,e.y-=this.y0,i=e.y/(1.4142135623731*this.a),Math.abs(i)>.999999999999&&(i=.999999999999),t=Math.asin(i);var n=ye(this.long0+e.x/(.900316316158*this.a*Math.cos(t)));n<-Math.PI&&(n=-Math.PI),n>Math.PI&&(n=Math.PI),i=(2*t+Math.sin(2*t))/Math.PI,Math.abs(i)>1&&(i=1);var r=Math.asin(i);return e.x=n,e.y=r,e}var ET=["Mollweide","moll"];const kT={init:TT,forward:$T,inverse:MT,names:ET};function PT(){Math.abs(this.lat1+this.lat2)<pe||(this.lat2=this.lat2||this.lat1,this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=to(this.es),this.e1=io(this.es),this.e2=no(this.es),this.e3=ro(this.es),this.sinphi=Math.sin(this.lat1),this.cosphi=Math.cos(this.lat1),this.ms1=Bi(this.e,this.sinphi,this.cosphi),this.ml1=Ut(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<pe?this.ns=this.sinphi:(this.sinphi=Math.sin(this.lat2),this.cosphi=Math.cos(this.lat2),this.ms2=Bi(this.e,this.sinphi,this.cosphi),this.ml2=Ut(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=Ut(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))}function LT(e){var t=e.x,i=e.y,n;if(this.sphere)n=this.a*(this.g-i);else{var r=Ut(this.e0,this.e1,this.e2,this.e3,i);n=this.a*(this.g-r)}var s=this.ns*ye(t-this.long0),c=this.x0+n*Math.sin(s),u=this.y0+this.rh-n*Math.cos(s);return e.x=c,e.y=u,e}function RT(e){e.x-=this.x0,e.y=this.rh-e.y+this.y0;var t,i,n,r;this.ns>=0?(i=Math.sqrt(e.x*e.x+e.y*e.y),t=1):(i=-Math.sqrt(e.x*e.x+e.y*e.y),t=-1);var s=0;if(i!==0&&(s=Math.atan2(t*e.x,t*e.y)),this.sphere)return r=ye(this.long0+s/this.ns),n=es(this.g-i/this.a),e.x=r,e.y=n,e;var c=this.g-i/this.a;return n=ma(c,this.e0,this.e1,this.e2,this.e3),r=ye(this.long0+s/this.ns),e.x=r,e.y=n,e}var IT=["Equidistant_Conic","eqdc"];const OT={init:PT,forward:LT,inverse:RT,names:IT};function NT(){this.R=this.a}function DT(e){var t=e.x,i=e.y,n=ye(t-this.long0),r,s;Math.abs(i)<=pe&&(r=this.x0+this.R*n,s=this.y0);var c=On(2*Math.abs(i/Math.PI));(Math.abs(n)<=pe||Math.abs(Math.abs(i)-ce)<=pe)&&(r=this.x0,i>=0?s=this.y0+Math.PI*this.R*Math.tan(.5*c):s=this.y0+Math.PI*this.R*-Math.tan(.5*c));var u=.5*Math.abs(Math.PI/n-n/Math.PI),o=u*u,h=Math.sin(c),a=Math.cos(c),l=a/(h+a-1),f=l*l,d=l*(2/h-1),p=d*d,g=Math.PI*this.R*(u*(l-p)+Math.sqrt(o*(l-p)*(l-p)-(p+o)*(f-p)))/(p+o);n<0&&(g=-g),r=this.x0+g;var m=o+l;return g=Math.PI*this.R*(d*m-u*Math.sqrt((p+o)*(o+1)-m*m))/(p+o),i>=0?s=this.y0+g:s=this.y0-g,e.x=r,e.y=s,e}function FT(e){var t,i,n,r,s,c,u,o,h,a,l,f,d;return e.x-=this.x0,e.y-=this.y0,l=Math.PI*this.R,n=e.x/l,r=e.y/l,s=n*n+r*r,c=-Math.abs(r)*(1+s),u=c-2*r*r+n*n,o=-2*c+1+2*r*r+s*s,d=r*r/o+(2*u*u*u/o/o/o-9*c*u/o/o)/27,h=(c-u*u/3/o)/o,a=2*Math.sqrt(-h/3),l=3*d/h/a,Math.abs(l)>1&&(l>=0?l=1:l=-1),f=Math.acos(l)/3,e.y>=0?i=(-a*Math.cos(f+Math.PI/3)-u/3/o)*Math.PI:i=-(-a*Math.cos(f+Math.PI/3)-u/3/o)*Math.PI,Math.abs(n)<pe?t=this.long0:t=ye(this.long0+Math.PI*(s-1+Math.sqrt(1+2*(n*n-r*r)+s*s))/2/n),e.x=t,e.y=i,e}var BT=["Van_der_Grinten_I","VanDerGrinten","vandg"];const VT={init:NT,forward:DT,inverse:FT,names:BT};function zT(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0)}function HT(e){var t=e.x,i=e.y,n=Math.sin(e.y),r=Math.cos(e.y),s=ye(t-this.long0),c,u,o,h,a,l,f,d,p,g,m,v,y,S,b,_,w,E,T,$,C,x,L;return this.sphere?Math.abs(this.sin_p12-1)<=pe?(e.x=this.x0+this.a*(ce-i)*Math.sin(s),e.y=this.y0-this.a*(ce-i)*Math.cos(s),e):Math.abs(this.sin_p12+1)<=pe?(e.x=this.x0+this.a*(ce+i)*Math.sin(s),e.y=this.y0+this.a*(ce+i)*Math.cos(s),e):(E=this.sin_p12*n+this.cos_p12*r*Math.cos(s),_=Math.acos(E),w=_?_/Math.sin(_):1,e.x=this.x0+this.a*w*r*Math.sin(s),e.y=this.y0+this.a*w*(this.cos_p12*n-this.sin_p12*r*Math.cos(s)),e):(c=to(this.es),u=io(this.es),o=no(this.es),h=ro(this.es),Math.abs(this.sin_p12-1)<=pe?(a=this.a*Ut(c,u,o,h,ce),l=this.a*Ut(c,u,o,h,i),e.x=this.x0+(a-l)*Math.sin(s),e.y=this.y0-(a-l)*Math.cos(s),e):Math.abs(this.sin_p12+1)<=pe?(a=this.a*Ut(c,u,o,h,ce),l=this.a*Ut(c,u,o,h,i),e.x=this.x0+(a+l)*Math.sin(s),e.y=this.y0+(a+l)*Math.cos(s),e):(f=n/r,d=Gr(this.a,this.e,this.sin_p12),p=Gr(this.a,this.e,n),g=Math.atan((1-this.es)*f+this.es*d*this.sin_p12/(p*r)),m=Math.atan2(Math.sin(s),this.cos_p12*Math.tan(g)-this.sin_p12*Math.cos(s)),m===0?T=Math.asin(this.cos_p12*Math.sin(g)-this.sin_p12*Math.cos(g)):Math.abs(Math.abs(m)-Math.PI)<=pe?T=-Math.asin(this.cos_p12*Math.sin(g)-this.sin_p12*Math.cos(g)):T=Math.asin(Math.sin(s)*Math.cos(g)/Math.sin(m)),v=this.e*this.sin_p12/Math.sqrt(1-this.es),y=this.e*this.cos_p12*Math.cos(m)/Math.sqrt(1-this.es),S=v*y,b=y*y,$=T*T,C=$*T,x=C*T,L=x*T,_=d*T*(1-$*b*(1-b)/6+C/8*S*(1-2*b)+x/120*(b*(4-7*b)-3*v*v*(1-7*b))-L/48*S),e.x=this.x0+_*Math.sin(m),e.y=this.y0+_*Math.cos(m),e))}function UT(e){e.x-=this.x0,e.y-=this.y0;var t,i,n,r,s,c,u,o,h,a,l,f,d,p,g,m,v,y,S,b,_,w,E,T;return this.sphere?(t=Math.sqrt(e.x*e.x+e.y*e.y),t>2*ce*this.a?void 0:(i=t/this.a,n=Math.sin(i),r=Math.cos(i),s=this.long0,Math.abs(t)<=pe?c=this.lat0:(c=On(r*this.sin_p12+e.y*n*this.cos_p12/t),u=Math.abs(this.lat0)-ce,Math.abs(u)<=pe?this.lat0>=0?s=ye(this.long0+Math.atan2(e.x,-e.y)):s=ye(this.long0-Math.atan2(-e.x,e.y)):s=ye(this.long0+Math.atan2(e.x*n,t*this.cos_p12*r-e.y*this.sin_p12*n))),e.x=s,e.y=c,e)):(o=to(this.es),h=io(this.es),a=no(this.es),l=ro(this.es),Math.abs(this.sin_p12-1)<=pe?(f=this.a*Ut(o,h,a,l,ce),t=Math.sqrt(e.x*e.x+e.y*e.y),d=f-t,c=ma(d/this.a,o,h,a,l),s=ye(this.long0+Math.atan2(e.x,-1*e.y)),e.x=s,e.y=c,e):Math.abs(this.sin_p12+1)<=pe?(f=this.a*Ut(o,h,a,l,ce),t=Math.sqrt(e.x*e.x+e.y*e.y),d=t-f,c=ma(d/this.a,o,h,a,l),s=ye(this.long0+Math.atan2(e.x,e.y)),e.x=s,e.y=c,e):(t=Math.sqrt(e.x*e.x+e.y*e.y),m=Math.atan2(e.x,e.y),p=Gr(this.a,this.e,this.sin_p12),v=Math.cos(m),y=this.e*this.cos_p12*v,S=-y*y/(1-this.es),b=3*this.es*(1-S)*this.sin_p12*this.cos_p12*v/(1-this.es),_=t/p,w=_-S*(1+S)*Math.pow(_,3)/6-b*(1+3*S)*Math.pow(_,4)/24,E=1-S*w*w/2-_*w*w*w/6,g=Math.asin(this.sin_p12*Math.cos(w)+this.cos_p12*Math.sin(w)*v),s=ye(this.long0+Math.asin(Math.sin(m)*Math.sin(w)/Math.cos(g))),T=Math.sin(g),c=Math.atan2((T-this.es*E*this.sin_p12)*Math.tan(g),T*(1-this.es)),e.x=s,e.y=c,e))}var WT=["Azimuthal_Equidistant","aeqd"];const jT={init:zT,forward:HT,inverse:UT,names:WT};function GT(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)}function qT(e){var t,i,n,r,s,c,u,o,h=e.x,a=e.y;return n=ye(h-this.long0),t=Math.sin(a),i=Math.cos(a),r=Math.cos(n),c=this.sin_p14*t+this.cos_p14*i*r,s=1,(c>0||Math.abs(c)<=pe)&&(u=this.a*s*i*Math.sin(n),o=this.y0+this.a*s*(this.cos_p14*t-this.sin_p14*i*r)),e.x=u,e.y=o,e}function KT(e){var t,i,n,r,s,c,u;return e.x-=this.x0,e.y-=this.y0,t=Math.sqrt(e.x*e.x+e.y*e.y),i=On(t/this.a),n=Math.sin(i),r=Math.cos(i),c=this.long0,Math.abs(t)<=pe?(u=this.lat0,e.x=c,e.y=u,e):(u=On(r*this.sin_p14+e.y*n*this.cos_p14/t),s=Math.abs(this.lat0)-ce,Math.abs(s)<=pe?(this.lat0>=0?c=ye(this.long0+Math.atan2(e.x,-e.y)):c=ye(this.long0-Math.atan2(-e.x,e.y)),e.x=c,e.y=u,e):(c=ye(this.long0+Math.atan2(e.x*n,t*this.cos_p14*r-e.y*this.sin_p14*n)),e.x=c,e.y=u,e))}var YT=["ortho"];const XT={init:GT,forward:qT,inverse:KT,names:YT};var ct={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6},je={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function QT(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=ce-We/2?this.face=ct.TOP:this.lat0<=-(ce-We/2)?this.face=ct.BOTTOM:Math.abs(this.long0)<=We?this.face=ct.FRONT:Math.abs(this.long0)<=ce+We?this.face=this.long0>0?ct.RIGHT:ct.LEFT:this.face=ct.BACK,this.es!==0&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)}function JT(e){var t={x:0,y:0},i,n,r,s,c,u,o={value:0};if(e.x-=this.long0,this.es!==0?i=Math.atan(this.one_minus_f_squared*Math.tan(e.y)):i=e.y,n=e.x,this.face===ct.TOP)s=ce-i,n>=We&&n<=ce+We?(o.value=je.AREA_0,r=n-ce):n>ce+We||n<=-(ce+We)?(o.value=je.AREA_1,r=n>0?n-ht:n+ht):n>-(ce+We)&&n<=-We?(o.value=je.AREA_2,r=n+ce):(o.value=je.AREA_3,r=n);else if(this.face===ct.BOTTOM)s=ce+i,n>=We&&n<=ce+We?(o.value=je.AREA_0,r=-n+ce):n<We&&n>=-We?(o.value=je.AREA_1,r=-n):n<-We&&n>=-(ce+We)?(o.value=je.AREA_2,r=-n-ce):(o.value=je.AREA_3,r=n>0?-n+ht:-n-ht);else{var h,a,l,f,d,p,g;this.face===ct.RIGHT?n=Br(n,+ce):this.face===ct.BACK?n=Br(n,+ht):this.face===ct.LEFT&&(n=Br(n,-ce)),f=Math.sin(i),d=Math.cos(i),p=Math.sin(n),g=Math.cos(n),h=d*g,a=d*p,l=f,this.face===ct.FRONT?(s=Math.acos(h),r=xo(s,l,a,o)):this.face===ct.RIGHT?(s=Math.acos(a),r=xo(s,l,-h,o)):this.face===ct.BACK?(s=Math.acos(-h),r=xo(s,l,-a,o)):this.face===ct.LEFT?(s=Math.acos(-a),r=xo(s,l,h,o)):(s=r=0,o.value=je.AREA_0)}return u=Math.atan(12/ht*(r+Math.acos(Math.sin(r)*Math.cos(We))-ce)),c=Math.sqrt((1-Math.cos(s))/(Math.cos(u)*Math.cos(u))/(1-Math.cos(Math.atan(1/Math.cos(r))))),o.value===je.AREA_1?u+=ce:o.value===je.AREA_2?u+=ht:o.value===je.AREA_3&&(u+=1.5*ht),t.x=c*Math.cos(u),t.y=c*Math.sin(u),t.x=t.x*this.a+this.x0,t.y=t.y*this.a+this.y0,e.x=t.x,e.y=t.y,e}function ZT(e){var t={lam:0,phi:0},i,n,r,s,c,u,o,h,a,l={value:0};if(e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,n=Math.atan(Math.sqrt(e.x*e.x+e.y*e.y)),i=Math.atan2(e.y,e.x),e.x>=0&&e.x>=Math.abs(e.y)?l.value=je.AREA_0:e.y>=0&&e.y>=Math.abs(e.x)?(l.value=je.AREA_1,i-=ce):e.x<0&&-e.x>=Math.abs(e.y)?(l.value=je.AREA_2,i=i<0?i+ht:i-ht):(l.value=je.AREA_3,i+=ce),a=ht/12*Math.tan(i),c=Math.sin(a)/(Math.cos(a)-1/Math.sqrt(2)),u=Math.atan(c),r=Math.cos(i),s=Math.tan(n),o=1-r*r*s*s*(1-Math.cos(Math.atan(1/Math.cos(u)))),o<-1?o=-1:o>1&&(o=1),this.face===ct.TOP)h=Math.acos(o),t.phi=ce-h,l.value===je.AREA_0?t.lam=u+ce:l.value===je.AREA_1?t.lam=u<0?u+ht:u-ht:l.value===je.AREA_2?t.lam=u-ce:t.lam=u;else if(this.face===ct.BOTTOM)h=Math.acos(o),t.phi=h-ce,l.value===je.AREA_0?t.lam=-u+ce:l.value===je.AREA_1?t.lam=-u:l.value===je.AREA_2?t.lam=-u-ce:t.lam=u<0?-u-ht:-u+ht;else{var f,d,p;f=o,a=f*f,a>=1?p=0:p=Math.sqrt(1-a)*Math.sin(u),a+=p*p,a>=1?d=0:d=Math.sqrt(1-a),l.value===je.AREA_1?(a=d,d=-p,p=a):l.value===je.AREA_2?(d=-d,p=-p):l.value===je.AREA_3&&(a=d,d=p,p=-a),this.face===ct.RIGHT?(a=f,f=-d,d=a):this.face===ct.BACK?(f=-f,d=-d):this.face===ct.LEFT&&(a=f,f=d,d=-a),t.phi=Math.acos(-p)-ce,t.lam=Math.atan2(d,f),this.face===ct.RIGHT?t.lam=Br(t.lam,-ce):this.face===ct.BACK?t.lam=Br(t.lam,-ht):this.face===ct.LEFT&&(t.lam=Br(t.lam,+ce))}if(this.es!==0){var g,m,v;g=t.phi<0?1:0,m=Math.tan(t.phi),v=this.b/Math.sqrt(m*m+this.one_minus_f_squared),t.phi=Math.atan(Math.sqrt(this.a*this.a-v*v)/(this.one_minus_f*v)),g&&(t.phi=-t.phi)}return t.lam+=this.long0,e.x=t.lam,e.y=t.phi,e}function xo(e,t,i,n){var r;return e<pe?(n.value=je.AREA_0,r=0):(r=Math.atan2(t,i),Math.abs(r)<=We?n.value=je.AREA_0:r>We&&r<=ce+We?(n.value=je.AREA_1,r-=ce):r>ce+We||r<=-(ce+We)?(n.value=je.AREA_2,r=r>=0?r-ht:r+ht):(n.value=je.AREA_3,r+=ce)),r}function Br(e,t){var i=e+t;return i<-ht?i+=Hs:i>+ht&&(i-=Hs),i}var e$=["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"];const t$={init:QT,forward:JT,inverse:ZT,names:e$};var wc=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-986701e-12],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,18736e-12],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,934959e-12],[.7986,-.00755338,-500009e-10,935324e-12],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],_s=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-126793e-14,422642e-15],[.124,.0124,507171e-14,-160604e-14],[.186,.0123999,-190189e-13,600152e-14],[.248,.0124002,710039e-13,-224e-10],[.31,.0123992,-264997e-12,835986e-13],[.372,.0124029,988983e-12,-311994e-12],[.434,.0123893,-369093e-11,-435621e-12],[.4958,.0123198,-102252e-10,-345523e-12],[.5571,.0121916,-154081e-10,-582288e-12],[.6176,.0119938,-241424e-10,-525327e-12],[.6769,.011713,-320223e-10,-516405e-12],[.7346,.0113541,-397684e-10,-609052e-12],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-140374e-14],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],Qm=.8487,Jm=1.3523,Zm=Oi/5,i$=1/Zm,kr=18,va=function(e,t){return e[0]+t*(e[1]+t*(e[2]+t*e[3]))},n$=function(e,t){return e[1]+t*(2*e[2]+t*3*e[3])};function r$(e,t,i,n){for(var r=t;n;--n){var s=e(r);if(r-=s,Math.abs(s)<i)break}return r}function s$(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"}function o$(e){var t=ye(e.x-this.long0),i=Math.abs(e.y),n=Math.floor(i*Zm);n<0?n=0:n>=kr&&(n=kr-1),i=Oi*(i-i$*n);var r={x:va(wc[n],i)*t,y:va(_s[n],i)};return e.y<0&&(r.y=-r.y),r.x=r.x*this.a*Qm+this.x0,r.y=r.y*this.a*Jm+this.y0,r}function a$(e){var t={x:(e.x-this.x0)/(this.a*Qm),y:Math.abs(e.y-this.y0)/(this.a*Jm)};if(t.y>=1)t.x/=wc[kr][0],t.y=e.y<0?-ce:ce;else{var i=Math.floor(t.y*kr);for(i<0?i=0:i>=kr&&(i=kr-1);;)if(_s[i][0]>t.y)--i;else if(_s[i+1][0]<=t.y)++i;else break;var n=_s[i],r=5*(t.y-n[0])/(_s[i+1][0]-n[0]);r=r$(function(s){return(va(n,s)-t.y)/n$(n,s)},r,pe,100),t.x/=va(wc[i],r),t.y=(5*i+r)*Mt,e.y<0&&(t.y=-t.y)}return t.x=ye(t.x+this.long0),t}var l$=["Robinson","robin"];const c$={init:s$,forward:o$,inverse:a$,names:l$};function u$(){this.name="geocent"}function h$(e){var t=Fm(e,this.es,this.a);return t}function d$(e){var t=Bm(e,this.es,this.a,this.b);return t}var f$=["Geocentric","geocentric","geocent","Geocent"];const p$={init:u$,forward:h$,inverse:d$,names:f$};var Pt={N_POLE:0,S_POLE:1,EQUIT:2,OBLIQ:3},as={h:{def:1e5,num:!0},azi:{def:0,num:!0,degrees:!0},tilt:{def:0,num:!0,degrees:!0},long0:{def:0,num:!0},lat0:{def:0,num:!0}};function g$(){if(Object.keys(as).forEach(function(i){if(typeof this[i]>"u")this[i]=as[i].def;else{if(as[i].num&&isNaN(this[i]))throw new Error("Invalid parameter value, must be numeric "+i+" = "+this[i]);as[i].num&&(this[i]=parseFloat(this[i]))}as[i].degrees&&(this[i]=this[i]*Mt)}.bind(this)),Math.abs(Math.abs(this.lat0)-ce)<pe?this.mode=this.lat0<0?Pt.S_POLE:Pt.N_POLE:Math.abs(this.lat0)<pe?this.mode=Pt.EQUIT:(this.mode=Pt.OBLIQ,this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0)),this.pn1=this.h/this.a,this.pn1<=0||this.pn1>1e10)throw new Error("Invalid height");this.p=1+this.pn1,this.rp=1/this.p,this.h1=1/this.pn1,this.pfact=(this.p+1)*this.h1,this.es=0;var e=this.tilt,t=this.azi;this.cg=Math.cos(t),this.sg=Math.sin(t),this.cw=Math.cos(e),this.sw=Math.sin(e)}function m$(e){e.x-=this.long0;var t=Math.sin(e.y),i=Math.cos(e.y),n=Math.cos(e.x),r,s;switch(this.mode){case Pt.OBLIQ:s=this.sinph0*t+this.cosph0*i*n;break;case Pt.EQUIT:s=i*n;break;case Pt.S_POLE:s=-t;break;case Pt.N_POLE:s=t;break}switch(s=this.pn1/(this.p-s),r=s*i*Math.sin(e.x),this.mode){case Pt.OBLIQ:s*=this.cosph0*t-this.sinph0*i*n;break;case Pt.EQUIT:s*=t;break;case Pt.N_POLE:s*=-(i*n);break;case Pt.S_POLE:s*=i*n;break}var c,u;return c=s*this.cg+r*this.sg,u=1/(c*this.sw*this.h1+this.cw),r=(r*this.cg-s*this.sg)*this.cw*u,s=c*u,e.x=r*this.a,e.y=s*this.a,e}function v$(e){e.x/=this.a,e.y/=this.a;var t={x:e.x,y:e.y},i,n,r;r=1/(this.pn1-e.y*this.sw),i=this.pn1*e.x*r,n=this.pn1*e.y*this.cw*r,e.x=i*this.cg+n*this.sg,e.y=n*this.cg-i*this.sg;var s=yi(e.x,e.y);if(Math.abs(s)<pe)t.x=0,t.y=e.y;else{var c,u;switch(u=1-s*s*this.pfact,u=(this.p-Math.sqrt(u))/(this.pn1/s+s/this.pn1),c=Math.sqrt(1-u*u),this.mode){case Pt.OBLIQ:t.y=Math.asin(c*this.sinph0+e.y*u*this.cosph0/s),e.y=(c-this.sinph0*Math.sin(t.y))*s,e.x*=u*this.cosph0;break;case Pt.EQUIT:t.y=Math.asin(e.y*u/s),e.y=c*s,e.x*=u;break;case Pt.N_POLE:t.y=Math.asin(c),e.y=-e.y;break;case Pt.S_POLE:t.y=-Math.asin(c);break}t.x=Math.atan2(e.x,e.y)}return e.x=t.x+this.long0,e.y=t.y,e}var y$=["Tilted_Perspective","tpers"];const b$={init:g$,forward:m$,inverse:v$,names:y$};function _$(){if(this.flip_axis=this.sweep==="x"?1:0,this.h=Number(this.h),this.radius_g_1=this.h/this.a,this.radius_g_1<=0||this.radius_g_1>1e10)throw new Error;if(this.radius_g=1+this.radius_g_1,this.C=this.radius_g*this.radius_g-1,this.es!==0){var e=1-this.es,t=1/e;this.radius_p=Math.sqrt(e),this.radius_p2=e,this.radius_p_inv2=t,this.shape="ellipse"}else this.radius_p=1,this.radius_p2=1,this.radius_p_inv2=1,this.shape="sphere";this.title||(this.title="Geostationary Satellite View")}function w$(e){var t=e.x,i=e.y,n,r,s,c;if(t=t-this.long0,this.shape==="ellipse"){i=Math.atan(this.radius_p2*Math.tan(i));var u=this.radius_p/yi(this.radius_p*Math.cos(i),Math.sin(i));if(r=u*Math.cos(t)*Math.cos(i),s=u*Math.sin(t)*Math.cos(i),c=u*Math.sin(i),(this.radius_g-r)*r-s*s-c*c*this.radius_p_inv2<0)return e.x=Number.NaN,e.y=Number.NaN,e;n=this.radius_g-r,this.flip_axis?(e.x=this.radius_g_1*Math.atan(s/yi(c,n)),e.y=this.radius_g_1*Math.atan(c/n)):(e.x=this.radius_g_1*Math.atan(s/n),e.y=this.radius_g_1*Math.atan(c/yi(s,n)))}else this.shape==="sphere"&&(n=Math.cos(i),r=Math.cos(t)*n,s=Math.sin(t)*n,c=Math.sin(i),n=this.radius_g-r,this.flip_axis?(e.x=this.radius_g_1*Math.atan(s/yi(c,n)),e.y=this.radius_g_1*Math.atan(c/n)):(e.x=this.radius_g_1*Math.atan(s/n),e.y=this.radius_g_1*Math.atan(c/yi(s,n))));return e.x=e.x*this.a,e.y=e.y*this.a,e}function S$(e){var t=-1,i=0,n=0,r,s,c,u;if(e.x=e.x/this.a,e.y=e.y/this.a,this.shape==="ellipse"){this.flip_axis?(n=Math.tan(e.y/this.radius_g_1),i=Math.tan(e.x/this.radius_g_1)*yi(1,n)):(i=Math.tan(e.x/this.radius_g_1),n=Math.tan(e.y/this.radius_g_1)*yi(1,i));var o=n/this.radius_p;if(r=i*i+o*o+t*t,s=2*this.radius_g*t,c=s*s-4*r*this.C,c<0)return e.x=Number.NaN,e.y=Number.NaN,e;u=(-s-Math.sqrt(c))/(2*r),t=this.radius_g+u*t,i*=u,n*=u,e.x=Math.atan2(i,t),e.y=Math.atan(n*Math.cos(e.x)/t),e.y=Math.atan(this.radius_p_inv2*Math.tan(e.y))}else if(this.shape==="sphere"){if(this.flip_axis?(n=Math.tan(e.y/this.radius_g_1),i=Math.tan(e.x/this.radius_g_1)*Math.sqrt(1+n*n)):(i=Math.tan(e.x/this.radius_g_1),n=Math.tan(e.y/this.radius_g_1)*Math.sqrt(1+i*i)),r=i*i+n*n+t*t,s=2*this.radius_g*t,c=s*s-4*r*this.C,c<0)return e.x=Number.NaN,e.y=Number.NaN,e;u=(-s-Math.sqrt(c))/(2*r),t=this.radius_g+u*t,i*=u,n*=u,e.x=Math.atan2(i,t),e.y=Math.atan(n*Math.cos(e.x)/t)}return e.x=e.x+this.long0,e}var A$=["Geostationary Satellite View","Geostationary_Satellite","geos"];const C$={init:_$,forward:w$,inverse:S$,names:A$};function x$(e){e.Proj.projections.add(Ho),e.Proj.projections.add(Uo),e.Proj.projections.add(PC),e.Proj.projections.add(zC),e.Proj.projections.add(qC),e.Proj.projections.add(JC),e.Proj.projections.add(rx),e.Proj.projections.add(cx),e.Proj.projections.add(px),e.Proj.projections.add(bx),e.Proj.projections.add(Nx),e.Proj.projections.add(Hx),e.Proj.projections.add(qx),e.Proj.projections.add(Zx),e.Proj.projections.add(rT),e.Proj.projections.add(cT),e.Proj.projections.add(pT),e.Proj.projections.add(bT),e.Proj.projections.add(xT),e.Proj.projections.add(kT),e.Proj.projections.add(OT),e.Proj.projections.add(VT),e.Proj.projections.add(jT),e.Proj.projections.add(XT),e.Proj.projections.add(t$),e.Proj.projections.add(c$),e.Proj.projections.add(p$),e.Proj.projections.add(b$),e.Proj.projections.add(C$)}Jt.defaultDatum="WGS84";Jt.Proj=Ni;Jt.WGS84=new Jt.Proj("WGS84");Jt.Point=jr;Jt.toPoint=Vm;Jt.defs=Ft;Jt.nadgrid=RA;Jt.transform=ga;Jt.mgrs=YA;Jt.version="__VERSION__";x$(Jt);function ev(e,t=0){let i;return(...n)=>{const r=()=>e(...n);i&&clearTimeout(i),i=setTimeout(r,t)}}function T$(e,t=0){let i=null,n=null;return(...r)=>{n=r,i||(i=setTimeout(()=>{e(...n),i=null},t))}}function Wo(e,t=0){const i=10**t;return Math.round(parseFloat(e)*i)/i}function $$(){return navigator.languages&&navigator.languages.length?navigator.languages[0]:navigator.language}function fl(e,t={}){return new Intl.NumberFormat($$(),t).format(e)}function tv(e){return!!(e&&typeof e=="object"&&e.constructor===Object)}function M$(e){return!!(e&&Array.isArray(e))}const E$=e=>Number.isFinite(parseFloat(e));function k$(e=0){return new Promise(t=>setTimeout(()=>t(),e))}const iv=(e="")=>e.charAt(0).toUpperCase()+e.slice(1),nv=(e=1e3,t=9999)=>Math.round(Math.random()*(t-e)+e);function MB(e){var c;const{resource_amount:t,cost_per_resource_amount:i,resource_name:n}=e;if(!parseFloat(i))return"free";const r=(u,o)=>{if(o==="compute_area")return u/1e6;if(u<1e6)return u;const h=u/1e6;return h===1?"million":`${h} million`},s={compute_point_count:"points",compute_execution_time:"seconds",compute_area:"km2"};return`${i} processing units per
                 ${r(t,n)}
                    ${(c=s[n])!=null?c:n}`}function EB(e,t){const i=t.match(/\(([^()]+)\)/)[1].split(",").map(r=>r.trim().split(" ").map(Number));let n=!1;for(let r=0,s=i.length-1;r<i.length;s=r++){const c=i[r][0],u=i[r][1],o=i[s][0],h=i[s][1];u>e.y!=h>e.y&&e.x<(o-c)*(e.y-u)/(h-u)+c&&(n=!n)}return n}function rv(e,t){const i={...e};for(const n in t)typeof t[n]=="object"&&!Array.isArray(t[n])?i[n]=rv(e[n]||{},t[n]):i[n]=t[n];return i}function kB(e,t="gb"){if(!E$(e))return"/";let i=1;t==="gb"&&(i=1024),t==="kb"&&(i=1/1024),t==="b"&&(i=1/(1024*1024));const n=e*i;if(n>100)return`${fl(Wo(n/1024,2))} GB`;const r=n*1024;return r>100?`${fl(Wo(n,2))} MB`:`${fl(Wo(r,2))} KB`}function PB(e){var a;const t=/PROJCS\["([^"]*)/,i=/GEOGCS\["([^"]*)/,n=/DATUM\["([^"]*)/,{srid:r,auth_name:s,proj4text:c,srtext:u}=e,o=Jt(c);let h=u.match(t);return h||(h=u.match(i)),h||(h=u.match(n)),h=h[1],`${h} [${(a=o.oProj.units)!=null?a:"/"}] - ${s}:${r}`}function LB(e){const{proj4text:t}=e;return Jt(t).oProj.units}const P$=()=>({moduleId:"",client:!1,ready:!1,loaded:!1,loadPointCloudError:!1,forcedPointCloud:!1,loadingPanoramas:!1,keyPressed:void 0,filePath:"",tilesUpdatedAt:null,cameraShouldUpdate:!1,disableKeyboardShortcuts:!1,selectingInstanceId:{selecting:!1,type:"to"},multiViewId:null,viewportId:null,selectedVector:null,queueLoaderPreset:[],queueActionsPreset:[],queue:new Ba(1),properties:{selectedObject:void 0,pointcloudId:void 0,datasetId:void 0,position:{},selectedPosition:{},cameraControlMode:"orbit",moveSpeed:{sliderValue:0,displayValue:0},pointCloudsAttribute:{},classifications:{},classificationsList:[],images360:[],image360file:"",polygonClipVolumeCount:0,boxClipVolumeCount:0,clipCameraPositionStack:[],commandsCount:0,activeClassifications:["DEFAULT"],selectedClassification:"",selectedInstanceId:0,activeInstances:[],visibleInstances:[],discolorHiddenInstances:!1,invertVisibleInstances:!1,camera:{},editMode:"CLASSIFICATION",lengthUnit:"m",showClipOutsidePoints:!1,pointSize:5,pointSizeType:0,pointShape:1},objects:{pointClouds:{},measurements:{},annotations:{},cameraAnimations:{},images360:{},vectors:{}},counters:{pointClouds:0,measurements:0,annotations:0,cameraAnimations:1,images360:0},editor:{wkt:"",srid:"",id:"",editing:!1,targetSettings:void 0},autoOpenPanorama:!1,forcedPosition:void 0,classificationsAll:!0,rgbGammaOptions:{min:0,max:4,step:.01},rgbBrightnessOptions:{min:-1,max:1,step:.01},rgbContrastOptions:{min:-1,max:1,step:.01},heightRangeOptions:{min:Number.MAX_SAFE_INTEGER,max:Number.MIN_SAFE_INTEGER,step:1},heightRange:{min:Number.MAX_SAFE_INTEGER,max:Number.MIN_SAFE_INTEGER},intensityRangeOptions:{min:Number.MAX_SAFE_INTEGER,max:Number.MIN_SAFE_INTEGER,step:1},intensityRange:{min:Number.MAX_SAFE_INTEGER,max:Number.MIN_SAFE_INTEGER},intensityGammaOptions:{min:0,max:4,step:.01},intensityBrightnessOptions:{min:-1,max:1,step:.01},intensityContrastOptions:{min:-1,max:1,step:.01},weightOptions:{min:0,max:1,step:.01},gradientRepeatOptions:["CLAMP","REPEAT","MIRRORED_REPEAT"],gradientRepeat:"CLAMP",pointBudgetOptions:{min:100*1e3,max:10*1e3*1e3,step:1e3},pointBudget:2e3*1e3,fovOptions:{min:10,max:100,step:1},fov:60,edlEnabled:!0,edlRadiusOptions:{min:1,max:4,step:.01},edlRadius:1.4,edlStrengthOptions:{min:0,max:5,step:.01},edlStrength:.4,edlOpacityOptions:{min:0,max:1,step:.01},edlOpacity:1,backgroundOptions:["skybox","gradient","black","white","none"],background:"gradient",splatQualityOptions:["standard","hq"],splatQuality:"standard",minNodeSizeOptions:{min:10,max:1e3,step:1},minNodeSize:10,showBoundingBoxes:!1,freeze:!1,showMeasurementPoiLabels:!0,clipTaskOptions:["NONE","HIGHLIGHT","SHOW_INSIDE","SHOW_OUTSIDE"],clipTask:"HIGHLIGHT",clipMethodOptions:["INSIDE_ANY","INSIDE_ALL"],clipMethod:"INSIDE_ANY",cameraProjectionOptions:["PERSPECTIVE","ORTHOGRAPHIC"],cameraProjection:"PERSPECTIVE",moveSpeedOptions:{min:0,max:1,step:.01},pointSizeOptions:{min:0,max:15,step:.01},pointSizingOptions:{0:"FIXED",1:"ATTENUATED",2:"ADAPTIVE"},shapeOptions:{0:"SQUARE",1:"CIRCLE",2:"PARABOLOID"},pointOpacityOptions:{min:0,max:1,step:.001},cameraAnimationTimeOptions:{min:0,max:1,step:.001},cameraAnimationTime:0,pocAttribute:"rgba",tracePosition:!0,traceBoundingBox:!0,tracePositionCenter:!0,recenter:!1}),L$={},R$={setStateProperty(e,{property:t,value:i}){e[t]=i},setStatePropertiesProperty(e,{property:t,value:i}){e.properties[t]=i},setStateEditorProperty(e,{property:t,value:i}){e.editor[t]=i},setStatePocAttribute(e,{uuid:t,value:i}){e.properties.pointCloudsAttribute[t]=i;const{min:n,max:r}=i.heightRange;n<e.heightRange.min&&(e.heightRange.min=Math.round(n),e.heightRangeOptions.min=Math.round(n)),r>e.heightRange.max&&(e.heightRange.max=Math.round(r),e.heightRangeOptions.max=Math.round(r))},setStatePocAttributeProperty(e,{uuid:t,property:i,value:n}){e.properties.pointCloudsAttribute[t][i]=n},setStateCountersProperty(e,{property:t,value:i}){e.counters[t]=i},setStateObjectsProperty(e,{group:t=!1,property:i,value:n}){t?e.objects[t][i]=n:e.objects[i]=n},deleteStateObjectsProperty(e,{group:t=!1,uuid:i}){t?delete e.objects[t][i]:delete e.object[i]}},I$={runFromLoaderQueue({state:e},t){return e.ready?e.queue.enqueue(t):(e.queueLoaderPreset.push(t),!0)},frameLoaded(e,t){const{commit:i}=e,n=new km(t,e,da.EDITOR);i("setStateProperty",{property:"client",value:n})},serverReady({commit:e,dispatch:t}){return e("setStateProperty",{property:"ready",value:!0}),t("loadPresets")},setFilePath({commit:e},t){e("setStateProperty",{property:"filePath",value:t})},setTilesUpdatedAt({commit:e},t){e("setStateProperty",{property:"tilesUpdatedAt",value:t})},setCommands({dispatch:e,state:t},i){return e("runFromLoaderQueue",()=>{t.client.PointWorker.setCommands({commands:i},()=>{})})},async reloadPointCloud({state:e,dispatch:t}){t("AppState/PointWorker/getCommands",e.properties.datasetId,{root:!0}).then(i=>t("setCommands",i)).then(()=>{e.client.PointWorker.reloadPointCloud({path:e.filePath,tilesUpdatedAt:e.tilesUpdatedAt},()=>{})})},async reloadAllPointClouds({state:e,dispatch:t}){t("AppState/PointWorker/getCommands",e.properties.datasetId,{root:!0}).then(i=>t("setCommands",i)).then(()=>{e.client.PointWorker.reloadAllPointClouds({tilesUpdatedAt:e.tilesUpdatedAt},()=>{})})},commandsChanged({commit:e},{count:t}){e("setStatePropertiesProperty",{property:"commandsCount",value:t})},updateKeyPressed({commit:e},{mainKeyCode:t,alterKeyCode:i}){setTimeout(()=>{e("setStateProperty",{property:"keyPressed",value:{mainKeyCode:t,alterKeyCode:i}})},0)},destroy({commit:e,dispatch:t,state:i}){i.client&&i.client.destroy(),e("setStateProperty",{property:"ready",value:!1}),e("setStateProperty",{property:"client",value:null}),e("setStateProperty",{property:"cameraShouldUpdate",value:!1}),t("reset")},reset({commit:e}){e("setStateProperty",{property:"loaded",value:!1}),e("setStateProperty",{property:"loadPointCloudError",value:!1}),e("setStateProperty",{property:"forcedPointCloud",value:!1}),e("setStateProperty",{property:"tilesUpdatedAt",value:null}),e("setStatePropertiesProperty",{property:"position",value:{}}),e("setStateObjectsProperty",{property:"pointClouds",value:{}}),e("setStateObjectsProperty",{property:"measurements",value:{}}),e("setStateObjectsProperty",{property:"annotations",value:{}}),e("setStateObjectsProperty",{property:"cameraAnimations",value:{}}),e("setStateObjectsProperty",{property:"images360",value:{}}),e("setStatePropertiesProperty",{property:"camera",value:{}}),e("setStateCountersProperty",{property:"pointClouds",value:0}),e("setStateCountersProperty",{property:"measurements",value:0}),e("setStateCountersProperty",{property:"annotations",value:0}),e("setStateCountersProperty",{property:"cameraAnimations",value:1}),e("setStateCountersProperty",{property:"images360",value:0}),e("setStatePropertiesProperty",{property:"image360file",value:""}),e("setStatePropertiesProperty",{property:"selectedObject",value:void 0}),e("setStateProperty",{property:"tracePosition",value:!0}),e("setStateProperty",{property:"traceBoundingBox",value:!0}),e("setStateProperty",{property:"tracePositionCenter",value:!0}),e("setStateProperty",{property:"pointSize",value:.5}),e("setStateProperty",{property:"pointSizing",value:"ADAPTIVE"}),e("setStateProperty",{property:"shape",value:"CIRCLE"}),e("setStateProperty",{property:"pointOpacity",value:1})},loadPresets({state:e}){let t;return[...e.queueLoaderPreset,...e.queueActionsPreset].forEach(i=>{t=e.queue.enqueue(i)}),e.queueLoaderPreset=[],e.queueActionsPreset=[],t||Promise.resolve()},async loadPointCloud({state:e,dispatch:t},i){e.forcedPointCloud=!0;const n=tv(i),r="n/a";return n||(i={path:i,name:r}),i.name||(i.name=r),t("loadPointCloudNoDispatch",i)},loadPointCloudNoDispatch({dispatch:e},t){return e("runFromLoaderQueue",()=>e("loadPointCloudInPotree",t))},loadPointCloudInPotree({state:e,commit:t,dispatch:i},{path:n,name:r,append:s=!0,classifications:c={},defaultAttribute:u,initialLoad:o=!1}){return new Promise(h=>{e.client.PointCloudLoader.load({path:n,name:r,append:s,classifications:c,defaultAttribute:u,tilesUpdatedAt:e.tilesUpdatedAt,initialLoad:o,options:{pointSize:e.properties.pointSize,pointSizeType:e.properties.pointSizeType,pointShape:e.properties.pointShape,pointBudget:e.pointBudget}},a=>{if(!a){t("setStateProperty",{property:"loadPointCloudError",value:!0}),h(a);return}i("setStatePropertiesProperty",{property:"classificationsList",cmd:"Filters.classificationsList",dispatchRoot:!1}),i("setStatePropertiesProperty",{property:"classifications",cmd:"Filters.classifications",dispatchRoot:!1}),e.client.PointCloudLoader.settings(l=>{var m,v;const f=[];f.push(i("initSettings",l));const d=e.properties.pointcloudId,p=(m=Object.values(e.objects.pointClouds).find(y=>y.name.endsWith("overview.copc.laz")))==null?void 0:m.uuid,g=(v=e.properties.pointCloudsAttribute[p])==null?void 0:v.activeAttributeName;return g&&i("setPocAttributeProperty",{property:"activeAttributeName",uuid:d,cmd:"Attribute.activeAttributeName",params:{uuid:d,value:g}}),setTimeout(()=>{e.ready&&(e.cameraShouldUpdate=!0)},3e3),Promise.all(f).then(()=>{t("setStateProperty",{property:"loaded",value:a}),h(a)})}),i("updateAttributesAcrossPointClouds")})})},initSettings({state:e,commit:t},i){Object.keys(i).filter(n=>Object.prototype.hasOwnProperty.call(e,n)).forEach(n=>{t("setStateProperty",{property:n,value:i[n]})})},setObjectVisibility({state:e},t){e.client&&e.client.Measurement.visible(t)},setCameraPosition({commit:e},t){e("setStatePropertiesProperty",{property:"camera",value:t})},setSelectedPosition(){},setMoveSpeed({commit:e},t){e("setStatePropertiesProperty",{property:"moveSpeed",value:t})},updatePointCloud({state:e,commit:t},{uuid:i,data:n}){t("setStateObjectsProperty",{group:"pointClouds",property:i,value:n}),t("setStateCountersProperty",{property:"pointClouds",value:Object.keys(e.objects.pointClouds).length}),t("setStatePropertiesProperty",{property:"selectedObject",value:e.objects.pointClouds[i]}),t("setStatePropertiesProperty",{property:"pointcloudId",value:i})},updatePointCloudVisibility({state:e},{uuid:t,value:i}){e.client.Attribute.visible({uuid:t,value:i},n=>{e.objects.pointClouds[t].visible=n})},centerPointCloud({state:e},{uuid:t}){e.client.Navigation.centerPointCloud({uuid:t})},updateMeasurement({state:e,commit:t},{uuid:i,data:n}){t("setStateObjectsProperty",{group:"measurements",property:i,value:n}),t("setStatePropertiesProperty",{property:"selectedObject",value:e.objects.measurements[i]}),t("setStateCountersProperty",{property:"measurements",value:Object.keys(e.objects.measurements).length})},updateSelectedPointMeasure({commit:e},{uuid:t,data:i}){e("setStatePropertiesProperty",{property:"selectedPointMeasure",value:{uuid:t,data:i}})},removeMeasurement({state:e,commit:t},i){var n;!i||(i===((n=e.properties.selectedObject)==null?void 0:n.uuid)&&t("setStatePropertiesProperty",{property:"selectedObject",value:void 0}),t("deleteStateObjectsProperty",{group:"measurements",uuid:i}),t("setStateCountersProperty",{property:"measurements",value:Object.keys(e.objects.measurements).length}))},updateAnnotation({state:e,commit:t},{uuid:i,data:n}){t("setStateObjectsProperty",{group:"annotations",property:i,value:n}),t("setStatePropertiesProperty",{property:"selectedObject",value:e.objects.annotations[i]}),t("setStateCountersProperty",{property:"annotations",value:Object.keys(e.objects.annotations).length})},removeAnnotation({state:e,commit:t},i){t("deleteStateObjectsProperty",{group:"annotations",uuid:i}),t("setStateCountersProperty",{property:"annotations",value:Object.keys(e.objects.annotations).length})},updateCameraAnimation({state:e,commit:t},{uuid:i,data:n}){t("setStateObjectsProperty",{group:"cameraAnimations",property:i,value:n}),t("setStatePropertiesProperty",{property:"selectedObject",value:e.objects.cameraAnimations[i]}),t("setStateCountersProperty",{property:"cameraAnimations",value:Object.keys(e.objects.cameraAnimations).length})},removeCameraAnimation({state:e,commit:t},i){t("deleteStateObjectsProperty",{group:"measurements",uuid:i}),t("setStateCountersProperty",{property:"cameraAnimations",value:Object.keys(e.objects.cameraAnimations).length})},updateFov({commit:e},{fov:t}){e("setStateProperty",{property:"fov",value:t})},updateEvlOpacity({commit:e},{opacity:t}){e("setStateProperty",{property:"edlOpacity",value:t})},toggleAllVisibility({commit:e},t){e("setStateProperty",{property:"classificationsAll",value:t})},initPointCloudAttribute({state:e,commit:t},i){!e.client||e.client.Attribute.init({uuid:i},n=>{t("setStatePocAttribute",{uuid:i,value:n})})},setPocAttributeProperty({state:e,commit:t},{uuid:i,property:n,cmd:r,params:s}){const[c,u]=r.split(".");return!e.client||!c||!u?Promise.resolve():new Promise(o=>{e.client[c][u](s,h=>{t("setStatePocAttributeProperty",{uuid:i,property:n,value:h}),o(h)})})},setStatePropertiesProperty({state:e,commit:t},{property:i,cmd:n,params:r}){if(!e.client)return Promise.resolve();if(!n)return t("setStatePropertiesProperty",{property:i,value:r}),Promise.resolve(r);const[s,c]=n.split(".");return!s||!c?Promise.resolve():r?new Promise(u=>{e.client[s][c](r,o=>{t("setStatePropertiesProperty",{property:i,value:o}),u(o)})}):new Promise(u=>{e.client[s][c](o=>{t("setStatePropertiesProperty",{property:i,value:o}),u(o)})})},setStateProperty({state:e,commit:t},{property:i,cmd:n,params:r}){const[s,c]=n.split(".");return!e.client||!s||!c?Promise.resolve():r?new Promise(u=>{e.client[s][c](r,o=>{t("setStateProperty",{property:i,value:o}),u(o)})}):new Promise(u=>{e.client[s][c](o=>{t("setStateProperty",{property:i,value:o}),u(o)})})},setStateObjectsProperty({state:e,commit:t},{group:i,property:n,cmd:r,params:s}){const[c,u]=r.split(".");return!e.client||!c||!u?Promise.resolve():new Promise(o=>{e.client[c][u](s,h=>{t("setStateObjectsProperty",{group:i,property:n,value:h}),o(h)})})},updateClipTask({state:e,commit:t},{clipTask:i}){const n=e.clipTaskOptions[i];e.client.Measurement.hideAllOutsideClip({clipTask:i}),t("setStateProperty",{property:"clipTask",value:n})},updateVirtualTile({state:e},{virtualTile:t}){const i=t?2:1;e.client.Measurement.hideAllOutsideClip({clipTask:i})},updatePolygonClipVolume({commit:e},{count:t}){e("setStatePropertiesProperty",{property:"polygonClipVolumeCount",value:t})},updateBoxClipVolume({state:e,commit:t},{count:i}){if(i>e.properties.boxClipVolumeCount)e.properties.clipCameraPositionStack.push(e.properties.camera);else{const n=e.properties.clipCameraPositionStack.pop();e.client.Navigation.moveTo(n)}t("setStatePropertiesProperty",{property:"boxClipVolumeCount",value:i})},toggleClassificationVisibility({state:e,dispatch:t},{code:i,checked:n}){!e.client||e.client.Filters.visibility({code:i,checked:n},r=>{t("setStatePropertiesProperty",{property:"classifications",params:r}),!n&&e.properties.activeClassifications.includes(i)&&t("setStatePropertiesProperty",{property:"activeClassifications",cmd:"AttributeEditor.toggleActiveClassification",params:{value:i}}),n&&e.properties.selectedClassification===""&&t("setStatePropertiesProperty",{property:"selectedClassification",cmd:"AttributeEditor.selectedClassification",params:{value:i}})})},toggleClassificationsVisibilityAll({state:e,dispatch:t}){!e.client||e.client.Filters.toggleAllVisibility(i=>{t("setStatePropertiesProperty",{property:"classifications",params:i});const n=Object.keys(i.json).filter(r=>i.json[r].visible);n.length===0?(t("setStatePropertiesProperty",{property:"selectedClassification",cmd:"AttributeEditor.selectedClassification",params:{value:""}}),t("setStatePropertiesProperty",{property:"activeClassifications",cmd:"AttributeEditor.activeClassifications",params:{list:[]}})):e.properties.selectedClassification===""&&t("setStatePropertiesProperty",{property:"selectedClassification",cmd:"AttributeEditor.selectedClassification",params:{value:n[0]}})})},changeSelectedClassification({state:e,dispatch:t},{code:i}){!e.client||e.client.AttributeEditor.selectedClassification({value:i},n=>{t("setStatePropertiesProperty",{property:"selectedClassification",params:n}),Object.keys(e.properties.classifications.json).filter(r=>e.properties.classifications.json[r].visible).includes(i)||t("setStatePropertiesProperty",{property:"classifications",cmd:"Filters.visibility",params:{code:i,checked:!0}})})},toggleActiveClassification({state:e,dispatch:t},{code:i}){!e.client||e.client.AttributeEditor.toggleActiveClassification({value:i},n=>{t("setStatePropertiesProperty",{property:"activeClassifications",params:n}),e.properties.selectedClassification===""&&t("setStatePropertiesProperty",{property:"selectedClassification",cmd:"AttributeEditor.selectedClassification",params:{value:i}}),Object.keys(e.properties.classifications.json).filter(r=>e.properties.classifications.json[r].visible).includes(i)||t("setStatePropertiesProperty",{property:"classifications",cmd:"Filters.visibility",params:{code:i,checked:!0}})})},loadNotesToPotree({state:e},{notes:t}){const i=/\(([^)]+)\)/;e.client.Measurement.removeAllAnnotations(),t.forEach(n=>{const r=n.geom.data.match(i)[1].split(" ").map(c=>parseFloat(c));let s=n.note;s.length>20&&(s=s.split(`
`)[0].slice(0,20),s+="..."),e.client.Measurement.addAnnotation({position:r,title:s,dbId:n.id})})},removeNoteFromPotree({state:e},{noteId:t}){const i=Object.values(e.objects.annotations).find(n=>n.dbId===t);e.client.Measurement.remove({uuid:i.uuid})},setCameraControlMode({state:e,commit:t},{mode:i}){!e.client||(i==="fly"&&(e.client.Navigation.fly(),t("setStateProperty",{property:"cameraControlMode",value:"fly"})),i==="orbit"&&(e.client.Navigation.orbit(),t("setStateProperty",{property:"cameraControlMode",value:"orbit"})))},selectInstanceId({state:e,dispatch:t},{uuid:i,data:n}){if(!e.selectingInstanceId.selecting)return;let r=null;switch(e.selectingInstanceId.type){case"to":r=t("setStatePropertiesProperty",{property:"selectedInstanceId",cmd:"AttributeEditor.selectedInstanceId",params:{value:n.instanceId}});break;case"from":r=t("setStatePropertiesProperty",{property:"activeInstances",cmd:"AttributeEditor.activeInstances",params:{list:[n.instanceId]}});break;case"visible":r=t("setStatePropertiesProperty",{property:"visibleInstances",cmd:"AttributeEditor.visibleInstances",params:{list:[n.instanceId]}});break}r.then(()=>{e.selectingInstanceId.selecting=!1,e.client.Measurement.remove({uuid:i})})},selectVector({commit:e},{vector:t}){e("setStateProperty",{property:"selectedVector",value:t})},updateAttributesAcrossPointClouds({state:e}){e.client.Attribute.getIntensityRangeAll(({min:t,max:i})=>{t<e.intensityRangeOptions.min&&(e.intensityRangeOptions.min=t),i>e.intensityRangeOptions.max&&(e.intensityRangeOptions.max=i),e.intensityRange.min===Number.MAX_SAFE_INTEGER&&(e.intensityRange.min=t),e.intensityRange.max===Number.MIN_SAFE_INTEGER&&(e.intensityRange.max=i)}),e.client.Attribute.getHeightRangeAll(({min:t,max:i})=>{t<e.heightRangeOptions.min&&(e.heightRangeOptions.min=t),i>e.heightRangeOptions.max&&(e.heightRangeOptions.max=i),e.heightRange.min===Number.MAX_SAFE_INTEGER&&(e.heightRange.min=t),e.heightRange.max===Number.MIN_SAFE_INTEGER&&(e.heightRange.max=i)}),e.client.Attribute.updateAttributeRanges({ranges:{intensityRange:[e.intensityRange.min,e.intensityRange.max],elevationRange:[e.heightRange.min,e.heightRange.max]}})}},O$={state:P$,getters:L$,mutations:R$,actions:I$,namespaced:!0},Vd=e=>e,N$={},D$={},F$={},B$={registerNewPotreeModule({state:e},t){this.registerModule(["Tools","GeneralAdvancedPotree",t],O$),e.GeneralAdvancedPotree[t].moduleId=t},unregisterPotreeModule(e,t){this.unregisterModule(["Tools","GeneralAdvancedPotree",t])},potreeSetTilesUpdatedAt({state:e,dispatch:t},{tilesUpdatedAt:i,datasetId:n}){Object.keys(this._modules.root._children.Tools._children.GeneralAdvancedPotree._children).forEach(r=>{const{pointClouds:s}=e.GeneralAdvancedPotree[r].objects;Object.keys(s).findIndex(u=>s[u].title===n)!==-1&&t(`GeneralAdvancedPotree/${r}/setTilesUpdatedAt`,i)})},potreeReloadAllPointClouds({state:e,rootState:t,dispatch:i},{datasetId:n}){let r=!1;const s=t.AppState.UserSettings.user_settings.auto_potree_reload;Object.keys(this._modules.root._children.Tools._children.GeneralAdvancedPotree._children).forEach(c=>{const{pointClouds:u}=e.GeneralAdvancedPotree[c].objects,o=Object.keys(u).findIndex(h=>u[h].title===n)!==-1;o&&(r=!0),o&&s&&i(`GeneralAdvancedPotree/${c}/reloadAllPointClouds`)}),r&&s?i("Notifications/displayToastNotification",{msg:Vd("Reclassification commands were applied to this dataset, point cloud viewer was reloaded."),type:"info",timeout:2e4},{root:!0}):r&&!s&&i("Notifications/displayToastNotification",{msg:Vd("Reclassification commands were applied to this dataset, reload the page to see changes."),type:"info",timeout:2e4},{root:!0})},disableAllPotreeShortcuts({commit:e}){Object.keys(this._modules.root._children.Tools._children.GeneralAdvancedPotree._children).forEach(t=>{e(`GeneralAdvancedPotree/${t}/setStateProperty`,{property:"disableKeyboardShortcuts",value:!0})})},enableAllPotreeShortcuts({commit:e}){Object.keys(this._modules.root._children.Tools._children.GeneralAdvancedPotree._children).forEach(t=>{e(`GeneralAdvancedPotree/${t}/setStateProperty`,{property:"disableKeyboardShortcuts",value:!1})})}},V$={state:N$,getters:F$,mutations:D$,actions:B$,modules:{GeneralAdvancedPotree:{namespaced:!0}},namespaced:!0};var z$=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function H$(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function RB(e){var t=e.default;if(typeof t=="function"){var i=function(){return t.apply(this,arguments)};i.prototype=t.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(i,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}),i}var sv={exports:{}},Au={exports:{}},ov=function(t,i){return function(){for(var r=new Array(arguments.length),s=0;s<r.length;s++)r[s]=arguments[s];return t.apply(i,r)}},U$=ov,Dn=Object.prototype.toString;function Cu(e){return Array.isArray(e)}function Sc(e){return typeof e>"u"}function W$(e){return e!==null&&!Sc(e)&&e.constructor!==null&&!Sc(e.constructor)&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function av(e){return Dn.call(e)==="[object ArrayBuffer]"}function j$(e){return Dn.call(e)==="[object FormData]"}function G$(e){var t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&av(e.buffer),t}function q$(e){return typeof e=="string"}function K$(e){return typeof e=="number"}function lv(e){return e!==null&&typeof e=="object"}function jo(e){if(Dn.call(e)!=="[object Object]")return!1;var t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function Y$(e){return Dn.call(e)==="[object Date]"}function X$(e){return Dn.call(e)==="[object File]"}function Q$(e){return Dn.call(e)==="[object Blob]"}function cv(e){return Dn.call(e)==="[object Function]"}function J$(e){return lv(e)&&cv(e.pipe)}function Z$(e){return Dn.call(e)==="[object URLSearchParams]"}function eM(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function tM(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function xu(e,t){if(!(e===null||typeof e>"u"))if(typeof e!="object"&&(e=[e]),Cu(e))for(var i=0,n=e.length;i<n;i++)t.call(null,e[i],i,e);else for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.call(null,e[r],r,e)}function Ac(){var e={};function t(r,s){jo(e[s])&&jo(r)?e[s]=Ac(e[s],r):jo(r)?e[s]=Ac({},r):Cu(r)?e[s]=r.slice():e[s]=r}for(var i=0,n=arguments.length;i<n;i++)xu(arguments[i],t);return e}function iM(e,t,i){return xu(t,function(r,s){i&&typeof r=="function"?e[s]=U$(r,i):e[s]=r}),e}function nM(e){return e.charCodeAt(0)===65279&&(e=e.slice(1)),e}var ti={isArray:Cu,isArrayBuffer:av,isBuffer:W$,isFormData:j$,isArrayBufferView:G$,isString:q$,isNumber:K$,isObject:lv,isPlainObject:jo,isUndefined:Sc,isDate:Y$,isFile:X$,isBlob:Q$,isFunction:cv,isStream:J$,isURLSearchParams:Z$,isStandardBrowserEnv:tM,forEach:xu,merge:Ac,extend:iM,trim:eM,stripBOM:nM},gr=ti;function zd(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var uv=function(t,i,n){if(!i)return t;var r;if(n)r=n(i);else if(gr.isURLSearchParams(i))r=i.toString();else{var s=[];gr.forEach(i,function(o,h){o===null||typeof o>"u"||(gr.isArray(o)?h=h+"[]":o=[o],gr.forEach(o,function(l){gr.isDate(l)?l=l.toISOString():gr.isObject(l)&&(l=JSON.stringify(l)),s.push(zd(h)+"="+zd(l))}))}),r=s.join("&")}if(r){var c=t.indexOf("#");c!==-1&&(t=t.slice(0,c)),t+=(t.indexOf("?")===-1?"?":"&")+r}return t},rM=ti;function Ha(){this.handlers=[]}Ha.prototype.use=function(t,i,n){return this.handlers.push({fulfilled:t,rejected:i,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1};Ha.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)};Ha.prototype.forEach=function(t){rM.forEach(this.handlers,function(n){n!==null&&t(n)})};var sM=Ha,oM=ti,aM=function(t,i){oM.forEach(t,function(r,s){s!==i&&s.toUpperCase()===i.toUpperCase()&&(t[i]=r,delete t[s])})},hv=function(t,i,n,r,s){return t.config=i,n&&(t.code=n),t.request=r,t.response=s,t.isAxiosError=!0,t.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},t},dv={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},pl,Hd;function fv(){if(Hd)return pl;Hd=1;var e=hv;return pl=function(i,n,r,s,c){var u=new Error(i);return e(u,n,r,s,c)},pl}var gl,Ud;function lM(){if(Ud)return gl;Ud=1;var e=fv();return gl=function(i,n,r){var s=r.config.validateStatus;!r.status||!s||s(r.status)?i(r):n(e("Request failed with status code "+r.status,r.config,null,r.request,r))},gl}var ml,Wd;function cM(){if(Wd)return ml;Wd=1;var e=ti;return ml=e.isStandardBrowserEnv()?function(){return{write:function(n,r,s,c,u,o){var h=[];h.push(n+"="+encodeURIComponent(r)),e.isNumber(s)&&h.push("expires="+new Date(s).toGMTString()),e.isString(c)&&h.push("path="+c),e.isString(u)&&h.push("domain="+u),o===!0&&h.push("secure"),document.cookie=h.join("; ")},read:function(n){var r=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}(),ml}var vl,jd;function uM(){return jd||(jd=1,vl=function(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}),vl}var yl,Gd;function hM(){return Gd||(Gd=1,yl=function(t,i){return i?t.replace(/\/+$/,"")+"/"+i.replace(/^\/+/,""):t}),yl}var bl,qd;function dM(){if(qd)return bl;qd=1;var e=uM(),t=hM();return bl=function(n,r){return n&&!e(r)?t(n,r):r},bl}var _l,Kd;function fM(){if(Kd)return _l;Kd=1;var e=ti,t=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];return _l=function(n){var r={},s,c,u;return n&&e.forEach(n.split(`
`),function(h){if(u=h.indexOf(":"),s=e.trim(h.substr(0,u)).toLowerCase(),c=e.trim(h.substr(u+1)),s){if(r[s]&&t.indexOf(s)>=0)return;s==="set-cookie"?r[s]=(r[s]?r[s]:[]).concat([c]):r[s]=r[s]?r[s]+", "+c:c}}),r},_l}var wl,Yd;function pM(){if(Yd)return wl;Yd=1;var e=ti;return wl=e.isStandardBrowserEnv()?function(){var i=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a"),r;function s(c){var u=c;return i&&(n.setAttribute("href",u),u=n.href),n.setAttribute("href",u),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=s(window.location.href),function(u){var o=e.isString(u)?s(u):u;return o.protocol===r.protocol&&o.host===r.host}}():function(){return function(){return!0}}(),wl}var Sl,Xd;function Ua(){if(Xd)return Sl;Xd=1;function e(t){this.message=t}return e.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},e.prototype.__CANCEL__=!0,Sl=e,Sl}var Al,Qd;function Jd(){if(Qd)return Al;Qd=1;var e=ti,t=lM(),i=cM(),n=uv,r=dM(),s=fM(),c=pM(),u=fv(),o=dv,h=Ua();return Al=function(l){return new Promise(function(d,p){var g=l.data,m=l.headers,v=l.responseType,y;function S(){l.cancelToken&&l.cancelToken.unsubscribe(y),l.signal&&l.signal.removeEventListener("abort",y)}e.isFormData(g)&&delete m["Content-Type"];var b=new XMLHttpRequest;if(l.auth){var _=l.auth.username||"",w=l.auth.password?unescape(encodeURIComponent(l.auth.password)):"";m.Authorization="Basic "+btoa(_+":"+w)}var E=r(l.baseURL,l.url);b.open(l.method.toUpperCase(),n(E,l.params,l.paramsSerializer),!0),b.timeout=l.timeout;function T(){if(!!b){var C="getAllResponseHeaders"in b?s(b.getAllResponseHeaders()):null,x=!v||v==="text"||v==="json"?b.responseText:b.response,L={data:x,status:b.status,statusText:b.statusText,headers:C,config:l,request:b};t(function(A){d(A),S()},function(A){p(A),S()},L),b=null}}if("onloadend"in b?b.onloadend=T:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(T)},b.onabort=function(){!b||(p(u("Request aborted",l,"ECONNABORTED",b)),b=null)},b.onerror=function(){p(u("Network Error",l,null,b)),b=null},b.ontimeout=function(){var x=l.timeout?"timeout of "+l.timeout+"ms exceeded":"timeout exceeded",L=l.transitional||o;l.timeoutErrorMessage&&(x=l.timeoutErrorMessage),p(u(x,l,L.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",b)),b=null},e.isStandardBrowserEnv()){var $=(l.withCredentials||c(E))&&l.xsrfCookieName?i.read(l.xsrfCookieName):void 0;$&&(m[l.xsrfHeaderName]=$)}"setRequestHeader"in b&&e.forEach(m,function(x,L){typeof g>"u"&&L.toLowerCase()==="content-type"?delete m[L]:b.setRequestHeader(L,x)}),e.isUndefined(l.withCredentials)||(b.withCredentials=!!l.withCredentials),v&&v!=="json"&&(b.responseType=l.responseType),typeof l.onDownloadProgress=="function"&&b.addEventListener("progress",l.onDownloadProgress),typeof l.onUploadProgress=="function"&&b.upload&&b.upload.addEventListener("progress",l.onUploadProgress),(l.cancelToken||l.signal)&&(y=function(C){!b||(p(!C||C&&C.type?new h("canceled"):C),b.abort(),b=null)},l.cancelToken&&l.cancelToken.subscribe(y),l.signal&&(l.signal.aborted?y():l.signal.addEventListener("abort",y))),g||(g=null),b.send(g)})},Al}var Et=ti,Zd=aM,gM=hv,mM=dv,vM={"Content-Type":"application/x-www-form-urlencoded"};function ef(e,t){!Et.isUndefined(e)&&Et.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}function yM(){var e;return(typeof XMLHttpRequest<"u"||typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]")&&(e=Jd()),e}function bM(e,t,i){if(Et.isString(e))try{return(t||JSON.parse)(e),Et.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(i||JSON.stringify)(e)}var Wa={transitional:mM,adapter:yM(),transformRequest:[function(t,i){return Zd(i,"Accept"),Zd(i,"Content-Type"),Et.isFormData(t)||Et.isArrayBuffer(t)||Et.isBuffer(t)||Et.isStream(t)||Et.isFile(t)||Et.isBlob(t)?t:Et.isArrayBufferView(t)?t.buffer:Et.isURLSearchParams(t)?(ef(i,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):Et.isObject(t)||i&&i["Content-Type"]==="application/json"?(ef(i,"application/json"),bM(t)):t}],transformResponse:[function(t){var i=this.transitional||Wa.transitional,n=i&&i.silentJSONParsing,r=i&&i.forcedJSONParsing,s=!n&&this.responseType==="json";if(s||r&&Et.isString(t)&&t.length)try{return JSON.parse(t)}catch(c){if(s)throw c.name==="SyntaxError"?gM(c,this,"E_JSON_PARSE"):c}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};Et.forEach(["delete","get","head"],function(t){Wa.headers[t]={}});Et.forEach(["post","put","patch"],function(t){Wa.headers[t]=Et.merge(vM)});var Tu=Wa,_M=ti,wM=Tu,SM=function(t,i,n){var r=this||wM;return _M.forEach(n,function(c){t=c.call(r,t,i)}),t},Cl,tf;function pv(){return tf||(tf=1,Cl=function(t){return!!(t&&t.__CANCEL__)}),Cl}var nf=ti,xl=SM,AM=pv(),CM=Tu,xM=Ua();function Tl(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new xM("canceled")}var TM=function(t){Tl(t),t.headers=t.headers||{},t.data=xl.call(t,t.data,t.headers,t.transformRequest),t.headers=nf.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),nf.forEach(["delete","get","head","post","put","patch","common"],function(r){delete t.headers[r]});var i=t.adapter||CM.adapter;return i(t).then(function(r){return Tl(t),r.data=xl.call(t,r.data,r.headers,t.transformResponse),r},function(r){return AM(r)||(Tl(t),r&&r.response&&(r.response.data=xl.call(t,r.response.data,r.response.headers,t.transformResponse))),Promise.reject(r)})},ni=ti,gv=function(t,i){i=i||{};var n={};function r(a,l){return ni.isPlainObject(a)&&ni.isPlainObject(l)?ni.merge(a,l):ni.isPlainObject(l)?ni.merge({},l):ni.isArray(l)?l.slice():l}function s(a){if(ni.isUndefined(i[a])){if(!ni.isUndefined(t[a]))return r(void 0,t[a])}else return r(t[a],i[a])}function c(a){if(!ni.isUndefined(i[a]))return r(void 0,i[a])}function u(a){if(ni.isUndefined(i[a])){if(!ni.isUndefined(t[a]))return r(void 0,t[a])}else return r(void 0,i[a])}function o(a){if(a in i)return r(t[a],i[a]);if(a in t)return r(void 0,t[a])}var h={url:c,method:c,data:c,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:o};return ni.forEach(Object.keys(t).concat(Object.keys(i)),function(l){var f=h[l]||s,d=f(l);ni.isUndefined(d)&&f!==o||(n[l]=d)}),n},$l,rf;function mv(){return rf||(rf=1,$l={version:"0.26.1"}),$l}var $M=mv().version,$u={};["object","boolean","number","function","string","symbol"].forEach(function(e,t){$u[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});var sf={};$u.transitional=function(t,i,n){function r(s,c){return"[Axios v"+$M+"] Transitional option '"+s+"'"+c+(n?". "+n:"")}return function(s,c,u){if(t===!1)throw new Error(r(c," has been removed"+(i?" in "+i:"")));return i&&!sf[c]&&(sf[c]=!0,console.warn(r(c," has been deprecated since v"+i+" and will be removed in the near future"))),t?t(s,c,u):!0}};function MM(e,t,i){if(typeof e!="object")throw new TypeError("options must be an object");for(var n=Object.keys(e),r=n.length;r-- >0;){var s=n[r],c=t[s];if(c){var u=e[s],o=u===void 0||c(u,s,e);if(o!==!0)throw new TypeError("option "+s+" must be "+o);continue}if(i!==!0)throw Error("Unknown option "+s)}}var EM={assertOptions:MM,validators:$u},vv=ti,kM=uv,of=sM,af=TM,ja=gv,yv=EM,mr=yv.validators;function so(e){this.defaults=e,this.interceptors={request:new of,response:new of}}so.prototype.request=function(t,i){typeof t=="string"?(i=i||{},i.url=t):i=t||{},i=ja(this.defaults,i),i.method?i.method=i.method.toLowerCase():this.defaults.method?i.method=this.defaults.method.toLowerCase():i.method="get";var n=i.transitional;n!==void 0&&yv.assertOptions(n,{silentJSONParsing:mr.transitional(mr.boolean),forcedJSONParsing:mr.transitional(mr.boolean),clarifyTimeoutError:mr.transitional(mr.boolean)},!1);var r=[],s=!0;this.interceptors.request.forEach(function(d){typeof d.runWhen=="function"&&d.runWhen(i)===!1||(s=s&&d.synchronous,r.unshift(d.fulfilled,d.rejected))});var c=[];this.interceptors.response.forEach(function(d){c.push(d.fulfilled,d.rejected)});var u;if(!s){var o=[af,void 0];for(Array.prototype.unshift.apply(o,r),o=o.concat(c),u=Promise.resolve(i);o.length;)u=u.then(o.shift(),o.shift());return u}for(var h=i;r.length;){var a=r.shift(),l=r.shift();try{h=a(h)}catch(f){l(f);break}}try{u=af(h)}catch(f){return Promise.reject(f)}for(;c.length;)u=u.then(c.shift(),c.shift());return u};so.prototype.getUri=function(t){return t=ja(this.defaults,t),kM(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")};vv.forEach(["delete","get","head","options"],function(t){so.prototype[t]=function(i,n){return this.request(ja(n||{},{method:t,url:i,data:(n||{}).data}))}});vv.forEach(["post","put","patch"],function(t){so.prototype[t]=function(i,n,r){return this.request(ja(r||{},{method:t,url:i,data:n}))}});var PM=so,Ml,lf;function LM(){if(lf)return Ml;lf=1;var e=Ua();function t(i){if(typeof i!="function")throw new TypeError("executor must be a function.");var n;this.promise=new Promise(function(c){n=c});var r=this;this.promise.then(function(s){if(!!r._listeners){var c,u=r._listeners.length;for(c=0;c<u;c++)r._listeners[c](s);r._listeners=null}}),this.promise.then=function(s){var c,u=new Promise(function(o){r.subscribe(o),c=o}).then(s);return u.cancel=function(){r.unsubscribe(c)},u},i(function(c){r.reason||(r.reason=new e(c),n(r.reason))})}return t.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},t.prototype.subscribe=function(n){if(this.reason){n(this.reason);return}this._listeners?this._listeners.push(n):this._listeners=[n]},t.prototype.unsubscribe=function(n){if(!!this._listeners){var r=this._listeners.indexOf(n);r!==-1&&this._listeners.splice(r,1)}},t.source=function(){var n,r=new t(function(c){n=c});return{token:r,cancel:n}},Ml=t,Ml}var El,cf;function RM(){return cf||(cf=1,El=function(t){return function(n){return t.apply(null,n)}}),El}var kl,uf;function IM(){if(uf)return kl;uf=1;var e=ti;return kl=function(i){return e.isObject(i)&&i.isAxiosError===!0},kl}var hf=ti,OM=ov,Go=PM,NM=gv,DM=Tu;function bv(e){var t=new Go(e),i=OM(Go.prototype.request,t);return hf.extend(i,Go.prototype,t),hf.extend(i,t),i.create=function(r){return bv(NM(e,r))},i}var zi=bv(DM);zi.Axios=Go;zi.Cancel=Ua();zi.CancelToken=LM();zi.isCancel=pv();zi.VERSION=mv().version;zi.all=function(t){return Promise.all(t)};zi.spread=RM();zi.isAxiosError=IM();Au.exports=zi;Au.exports.default=zi;(function(e){e.exports=Au.exports})(sv);const Cr=H$(sv.exports);class FM{static getDatasets(t){return V.request("/public/datasets/open-data",{type:"GET",params:{...t}})}static checkAreaOfInterestPublic(t,i){return V.request(`/public/datasets/open-data/${t}/aoi`,{type:"POST",data:i})}static checkAreaOfInterest(t,i){return V.request(`/datasets/open-data/${t}/aoi`,{type:"POST",data:i})}static runAction(t,i){return V.request(`/organization/${t}/flows/${i.flow_id}/launch`,{type:"POST",data:i})}static getSrid(t,i,n={}){return V.request(`/srids/${t}`,{type:"GET",params:i,...n})}}const{t:ls}=ym.global,js=F_("appState",{state:()=>({analyzeAction:null,runningAction:null,showActionSuccessfulModal:!1,showConfirmActionModal:!1,showFlaiInfoModal:!1,loginModal:{show:!1,step:"login"},selectFlowModal:{show:!1},showInfoModal:!1,infoMessage:"",infoHeader:"",infoFooter:"",infoTitle:"",isMapResizing:!1}),actions:{setAnalyzeAction(e){this.analyzeAction={flow_id:e.flow_id,dataset_id:e.dataset.id,type:e.type,flow_node_options:e.flow_node_options,aoi:{srid:e.dataset.srid,data:`POLYGON ((${e.polygon.map(t=>`${t.x} ${t.y}`).join(", ")}))`}}},runAnalyzeAction(){var t;const{user:e}=hi.state.Auth;return this.runningAction=(t=this.analyzeAction)==null?void 0:t.type,FM.runAction(e.organization_id,this.analyzeAction).then(()=>{this.analyzeAction=null,this.selectFlowModal.show=!1,this.showActionSuccessfulModal=!0}).catch(i=>{hi.dispatch("Notifications/displayToastNotification",{msg:ls("Failed to run action"),type:"error"}),i.status===405&&(this.infoHeader=ls(""),this.infoFooter=ls("Please wait for current tasks to finish before starting new ones."),this.infoTitle=ls("Number of Tasks Exceeded"),this.infoMessage=ls("Maximum number of concurrent tasks reached."),this.showInfoModal=!0)}).finally(()=>{this.runningAction=null})}}});class BM{constructor(){Cr.interceptors.request.use(t=>{var n;const i=JSON.parse(localStorage.getItem("tokens"));return t.method==="get"&&((n=t.params)==null?void 0:n.decorators)&&(t.params.decorators=M$(t.params.decorators)?t.params.decorators.toString(","):t.params.decorators),t.headers.Authorization=i?`${i.token_type} ${i.access_token}`:"",t},t=>Promise.reject(t)),Cr.interceptors.response.use(t=>t,async t=>{var s;const{response:i,config:n}=t,r=js();if(i.status===412)throw r.loginModal.show=!0,r.loginModal.step="TOS",r.passthroughProps={userId:i.data.user.id,organizationId:i.data.user.organization_id},hi.commit("Auth/setUser",i.data.user),hi.commit("Auth/setOrganization",i.data.user.organization),hi.commit("Auth/setIsLoggedIn",!0),t;if(i.status===403&&i.data.error_key==="acl-permission-denied")throw hi.dispatch("Notifications/displayToastNotification",{msg:i.data.message,type:"error",timeout:6e4}),t;if(i.status===401&&i.config.data&&((s=JSON.parse(i.config.data))==null?void 0:s.grant_type)==="refresh_token")throw t;if(i.status===401){const c=JSON.parse(localStorage.getItem("tokens"));if(!(c!=null&&c.refresh_token))throw hi.dispatch("Auth/logout"),r.loginModal.show=!0,r.loginModal.step="prompt",t;return hi.dispatch("Auth/getNewAccessToken",c.refresh_token).then(()=>{Cr.request(n)}).catch(()=>{throw hi.dispatch("Auth/logout"),t})}throw i})}request(t,i={},n=!1){const r=window.ENV_VARS.API_URL,{headers:s={},...c}=i,u={data:null,params:null,type:"POST",headers:{"X-Requested-With":"XMLHttpRequest",...s},contentType:"json",...c};u.type.toLowerCase()==="get"&&Object.keys(u.data||{}).length&&(console.warn('[ajax.js] prefer using "params" over "data" option for GET requests'),u.params={...u.data,...u.params});const o={headers:u.headers,params:u.params,method:u.type,responseType:u.responseType},h=u.type.toLowerCase(),a=n?t:r+t;return["get"].includes(h)&&u.data!==null?console.warn("GET request should have parameters in param and not in data"):["post","put","patch"].includes(h)&&u.params!==null&&console.warn("POST, PUT and PATCH request should have parameters in data and not in params"),["post","put","patch"].includes(h)?Cr[u.type.toLowerCase()](a,u.data,o):Cr[u.type.toLowerCase()](a,o)}}const V=new BM;class ri{static login(t){return V.request("/oauth/token",{type:"POST",data:t})}static register(t){return V.request("/hub/register",{type:"POST",data:t})}static registerSso(t){return V.request("/sso/register",{type:"POST",data:t})}static requestPasswordReset(t){return V.request("/hub/invoke-password-reset",{type:"POST",data:t})}static resendVerificationCode(t){return V.request("/hub/invoke-password-set",{type:"POST",data:t})}static resetPassword(t){return V.request("/hub/reset-password",{type:"POST",data:t})}static getUserData(){return V.request("/oauth/me",{type:"GET"})}static getSsoUser(t){return V.request(`/sso/users/token/${t}`,{type:"GET"})}static changePassword(t){return V.request("/auth/password-change",{type:"POST",data:t})}static loginSso(t){return V.request("/sso/oauth/token",{type:"POST",data:t})}static getSsoProviderRedirect(t,i){return V.request(`/hub/sso/redirect/${t}`,{type:"GET",params:i})}static getAuthorizationCode(){return V.request("/oauth/authorization-code",{type:"POST"})}static getNewAccessToken(t){return V.request("/oauth/token",{type:"POST",headers:{},data:t})}}class VM{static sendConsent(t,i){return V.request(`/organization/${t}/user/consent`,{type:"POST",data:i})}}const zM=e=>e,HM={is_logged_in:!1,user:null,organization:null},UM={getUserCurrency(e,t,i){return{currency:e.organization.currency,symbol:i.AppState.Billing.currencies[e.organization.currency]?i.AppState.Billing.currencies[e.organization.currency].symbol:e.organization.currency}}},WM={logout:e=>{e.user=null,e.is_logged_in=!1},setIsLoggedIn:(e,t)=>{e.is_logged_in=t},setUser:(e,t)=>{e.user=t},setOrganization:(e,t)=>{e.organization=t},setParentOrganization:(e,t)=>{e.parent_organization=t},setPermissions:(e,t)=>{e.permissions=t},setPermissionsFrontend:(e,t)=>{e.permissions_frontend=t},setPersonalAccessTokenAbilities:(e,t)=>{e.personalAccessTokenAbilities=t}},jM={logout({commit:e}){return localStorage.removeItem("tokens"),e("logout"),!0},attemptLogin({state:e,dispatch:t}){return localStorage.getItem("tokens")?e.is_logged_in?!0:t("getUserData").then(()=>t("setIsLoggedIn",!0)).then(()=>!0).catch(()=>!1):!1},login({dispatch:e},t){return ri.login({grant_type:"password",client_id:window.ENV_VARS.CLIENT_ID,client_secret:window.ENV_VARS.CLIENT_SECRET,...t}).catch(i=>{throw e("Notifications/displayToastNotification",{msg:zM("Login failed."),type:"error"},{root:!0}),i}).then(async({data:i})=>{localStorage.setItem("tokens",JSON.stringify(i));try{await e("getUserData")}catch(n){if(n.response.status===412)throw n}return!0})},register(e,t){return ri.register(t)},registerSso(e,t){return ri.registerSso(t)},async requestPasswordReset(e,t){return ri.requestPasswordReset(t)},async resendVerificationCode(e,t){return ri.resendVerificationCode(t)},resetPassword(e,t){return ri.resetPassword(t)},changePassword(e,t){return ri.changePassword(t)},setIsLoggedIn({commit:e},t=!1){e("setIsLoggedIn",t)},getNewAccessToken({dispatch:e},t){return ri.getNewAccessToken({grant_type:"refresh_token",client_id:window.ENV_VARS.CLIENT_ID,client_secret:window.ENV_VARS.CLIENT_SECRET,refresh_token:t}).then(async({data:i})=>(localStorage.setItem("tokens",JSON.stringify(i)),await e("getUserData"),!0))},getUserData({state:e,commit:t}){return ri.getUserData().then(({data:i})=>{t("setUser",i),t("setOrganization",i.organization),t("setIsLoggedIn",!0),e.userDataPromise=null})},getSsoUser(e,t){return ri.getSsoUser(t).then(({data:i})=>i)},async loginSso({dispatch:e},t){try{const{data:i}=await ri.loginSso({...t,client_id:window.ENV_VARS.CLIENT_ID,client_secret:window.ENV_VARS.CLIENT_SECRET});return localStorage.setItem("tokens",JSON.stringify(i)),await e("getUserData"),!0}catch(i){if(i.response.status===412)throw i;return!1}},getSsoProviderRedirect(e,{provider:t,params:i}){return ri.getSsoProviderRedirect(t,i).then(({data:n})=>n)},sendTOSConsent(e,{organizationId:t,payload:i}){return VM.sendConsent(t,i).then(({data:n})=>n)},getAppLoginToken(){return ri.getAuthorizationCode().then(({data:e})=>e)}},GM={namespaced:!0,state:HM,mutations:WM,actions:jM,getters:UM},qM={toastNotifications:[],toastNotificationsCloseTimeouts:{}},KM={displayToastNotification(e,t){e.toastNotifications.push(t)},removeToastNotification(e,{id:t}){const i=e.toastNotifications.findIndex(n=>n.id===t);e.toastNotifications.splice(i,1)}},YM={getToastNotifications(e){return e.toastNotifications}},XM={async displayToastNotification({commit:e,dispatch:t},{timeout:i=1e4,...n}){const r=rn();e("displayToastNotification",{...n,id:r}),t("setToastNotificationCloseTimeout",{id:r,timeout:i})},async stopToastNotificationTimeout({dispatch:e},t){e("removeToastNotificationCloseTimeout",t)},async startToastNotificationTimeout({dispatch:e},{timeout:t=5e3,...i}){e("setToastNotificationCloseTimeout",{...i,timeout:t})},setToastNotificationCloseTimeout({state:e,commit:t},{id:i,timeout:n}){if(e.toastNotificationsCloseTimeouts[i])try{clearTimeout(e.toastNotificationsCloseTimeouts[i])}catch{}e.toastNotificationsCloseTimeouts[i]=setTimeout(()=>t("removeToastNotification",{id:i}),n)},removeToastNotificationCloseTimeout({state:e},{id:t}){if(!!e.toastNotificationsCloseTimeouts[t])try{clearTimeout(e.toastNotificationsCloseTimeouts[t]),delete e.toastNotificationsCloseTimeouts[t]}catch{}},async removeToastNotification({commit:e},t){e("removeToastNotification",t)}},QM={namespaced:!0,state:qM,getters:YM,mutations:KM,actions:XM},JM={userTips:{hubMap:{tips:[{selector:'[data-user-tips="hub-search-button"]',title:"Search button",text:"Explore numerous open datasets across various regions and dates on the map. Simply zoom to your area of interest and press search.",position:"right"},{selector:'[data-user-tips="hub-dataset-list-open"]',title:"Open dataset list",text:"To open or close the dataset list by clicking on the button icon.",position:"top"},{selector:'[data-user-tips="hub-dataset-list"]',title:"Dataset list",text:"If multiple datasets exist in the same location, click on the dataset name to view them. If only one dataset is available, it will open automatically.",position:"top"}]},hubPotree:{tips:[{selector:'[data-user-tips="hub-potree-view"]',title:"View 3D point clouds",text:"View point clouds by zooming in, rotating, and panning.",position:"bottom"},{selector:'[data-user-tips="hub-potree-measure-tools"]',title:"Measure tools",text:"Measure heights, distances, areas, and volumes.",position:"bottom",showOnMobile:!1},{selector:'[data-user-tips="hub-potree-cross-section-tools"]',title:"Cross section tools",text:"Create cross sections by selecting two points on the point cloud and clicking C on keyboard or Enter clip mode button.",position:"bottom",showOnMobile:!1},{selector:'[data-user-tips="hub-potree-aoi-tools"]',title:"Area of interest",text:"For analysis, areas must be up to 5km\xB2 to save on compute resources. Use the AOI tool to select the area if it's under 5km\xB2; otherwise, the AOI tool isn't necessary.",position:"bottom",showOnMobile:!1},{selector:'[data-user-tips="hub-potree-download"]',title:"Download",text:"We will clip the selected area and prepare it for download.",position:"bottom",showOnMobile:!1},{selector:'[data-user-tips="hub-potree-analysis"]',title:"Run Analysis",text:"You can easily launch different AI-based analyses for various use cases.",position:"bottom-left",showOnMobile:!1},{selector:'[data-user-tips="hub-potree-legend"]',title:"Legend",text:"Use it to turn on and off point cloud classification (layers).",position:"left"},{selector:'[data-user-tips="hub-potree-settings"]',title:"Settings",text:"Change point budget, point size, attributes and more.",position:"top-left"}]},hubPotreeAoi:{tips:[{selector:'[data-user-tips="hub-potree-aoi-tools"]',title:"Area of interest",text:"For analysis, areas must be up to 5km\xB2 to save on compute resources. Use the AOI tool to select the area if it's under 5km\xB2; otherwise, the AOI tool isn't necessary.",position:"bottom",showOnMobile:!1}]},visibleTips:null}},ZM={},eE={},tE={showTips({state:e},{tipsName:t,forceShow:i=!1}){if(e.userTips[t]){const n=`${t}-seen`;let r=!1;try{r=JSON.parse(localStorage.getItem(n))===!0}catch{}(i||!r)&&(e.visibleTips=e.userTips[t].tips,localStorage.setItem(n,"true"))}},hideTips({state:e}){e.visibleTips=null}},_v={namespaced:!0,state:JM,getters:eE,mutations:ZM,actions:tE};class Ke{static getFlows(t,i={},n={}){return V.request(`/organization/${t}/flows`,{type:"GET",params:i,...n})}static getPublicFlowTemplates(t={},i={}){return V.request("/public/flow-templates",{type:"GET",params:t,...i})}static getFlowTemplates(t,i={},n={}){return V.request(`/organization/${t}/flow-templates`,{type:"GET",params:i,...n})}static getFlowsAdmin(t){return V.request("/admin/flows",{type:"GET",params:{...t}})}static getPublicFlowNodeDefinitions(){return V.request("/public/flow-node-definitions",{type:"GET"})}static getFlowNodeDefinitions(t={},i={}){return V.request("/flow-node-definitions",{type:"GET",params:t,...i})}static getFlowNodeDefinition(t,i={},n={}){return V.request(`/flow-node-definitions/${t}`,{type:"GET",params:i,...n})}static getFlowNodeTypes(t={},i={}){return V.request("/flow-node-types",{type:"GET",params:t,...i})}static getFlowExecutions(t,i={},n={}){return V.request(`/organization/${t}/flow-execution`,{type:"GET",params:i,...n})}static getOrganizationFlowExecutions(t,i={},n={}){return V.request(`/flow-execution/organization/${t}`,{type:"GET",params:i,...n})}static getFlowExecution(t,i,n={},r={}){return V.request(`/organization/${t}/flow-execution/${i}`,{type:"GET",params:n,...r})}static getFlowExecutionsAdmin(t){return V.request("/admin/flow-execution",{type:"GET",params:{...t}})}static getFlowNodeExecutions(t,i,n={}){return V.request(`/organization/${t}/flow-execution/${i}/flow-node-executions`,{type:"GET",...n})}static getFlow(t,i,n={},r={}){return V.request(`/organization/${t}/flows/${i}`,{type:"GET",params:n,...r})}static createFlow(t,i,n={}){return V.request(`/organization/${t}/flows`,{type:"POST",data:i,...n})}static updateFlow(t,i,n,r={}){return V.request(`/organization/${t}/flows/${i}`,{type:"PUT",data:n,...r})}static deleteFlow(t,i,n={}){return V.request(`/organization/${t}/flows/${i}`,{type:"DELETE",...n})}static duplicateFlow(t,i,n,r={}){return V.request(`/organization/${t}/flows/${i}`,{type:"POST",data:n,...r})}static getFlowValidation(t,i={},n={}){return V.request(`/flows/validate/${t}`,{type:"GET",params:i,...n})}static validateFlow(t,i={}){return V.request("/flows/validate",{type:"POST",data:t,...i})}static validateFlowPublic(t,i={}){return V.request("/public/flows/validate",{type:"POST",data:t,...i})}static getFlowEstimateResources(t,i={},n={}){return V.request(`/flows/estimate-resources/${t}`,{type:"GET",params:i,...n})}static estimateResources(t,i={}){return V.request("/flows/estimate-resources",{type:"POST",data:t,...i})}static estimateResourcesPublic(t,i={}){return V.request("/public/flows/estimate-resources",{type:"POST",data:t,...i})}static executeFlow(t,i,n={}){return V.request(`/organization/${t}/flow-execution/flow/${i}`,{type:"POST",...n})}static stopFlow(t,i,n={}){return V.request(`/organization/${t}/flow-execution/${i}/stop`,{type:"POST",...n})}static startLogQuery(t,i={}){return V.request(`/flow-execution/${t}/log`,{type:"POST",...i})}static getLog(t,i={}){return V.request(`/flow-execution/${t}/log`,{type:"GET",...i})}static submitFlowExecutionDatasetUserFeedback(t,i,n={}){return V.request(`/organization/${t}/flow-execution-datasets/${i}/user-feedback`,{type:"POST",data:n})}static launch(t,i){return V.request(`/organization/${t}/flows/${i.flow_id}/launch`,{type:"POST",data:i})}}class wv{static getTranslations(){return V.request("/translations",{type:"GET"})}static getPublicTranslations(t){return V.request(`/translations/public/${t}`,{type:"GET"})}}let df=!1,ff=!1;const nt=vm({formatFallbackMessages:!0,silentFallbackWarn:!0,silentTranslationWarn:!0}),iE=async e=>{if(!df||!nt.global.availableLocales.includes(e)){const{data:t}=await wv.getTranslations();nt.global.setLocaleMessage(e,t),df=!0}return nt.global.locale=e,tn()},IB=async e=>{if(!ff||!nt.global.availableLocales.includes(e)){const{data:t}=await wv.getPublicTranslations(e);nt.global.setLocaleMessage(e,t),ff=!0}return nt.global.locale=e,tn()},ke={flow:{flow_nodes:"flow_nodes",flow_nodes_decrypted:"flow_nodes_decrypted",flow_nodes_with_options:"flow_nodes_with_options",flow_edges:"flow_edges",flow_details:"flow_details",tags:"tags"},flow_executions:{flow:"flow",node_executions_billed_processing_units:"node_executions_billed_processing_units",cost:"cost"},dataset:{user:"user",datasource:"datasource",pointcloudDataset:"pointcloudDataset",imageDataset:"imageDataset",vectorDataset:"vectorDataset",userFeedback:"user_feedback",tags:"tags",organization:"organization",pointclouds:"pointclouds"},project:{user:"user",datasets:"datasets",flows:"flows"},session:{user:"user",input_ai_model:"input_ai_model",training_dataset:"training_dataset",validation_dataset:"validation_dataset"},ai_model:{user:"user",ai_training_session:"ai_training_session",semantic_classes_prices:"semantic_classes_prices"},organization:{billing_bundle:"billing_bundle",billing_bundle_limits:"billing_bundle_limits",billing_information:"billing_information",billing_periods:"billing_periods",active_billing_subscription_orders:"active_billing_subscription_orders",cli_licenses:"cli_licenses",cli_stats:"cli_stats",cli_consumption:"cli_consumption"},billing:{billing_bundle_limits:"billing_bundle_limits",billing_bundle_price:"billing_bundle_price"},billing_order:{organization:"organization",payments:"payments"}};class nE{static submitUserFeedback(t={}){return V.request("/user-feedback",{type:"POST",data:t})}}const{t:Ct}=nt.global;function pf(){this.status=404,this.data={message:"Flow not found"}}function gf(){this.status=404,this.data={message:"Flow execution not found"}}const rE={flows:[],flowTemplates:[],flowExecutions:[],flowExecutionsPagination:{}},sE={setFlowExecutions(e,t){const i=t.map(n=>{var r;return n.title=(r=n.flow)==null?void 0:r.title,n});e.flowExecutions=i},setFlowExecutionsPagination(e,t){e.flowExecutionsPagination=t},setFlows(e,t){e.flows=t},setFlowTemplates(e,t){e.flowTemplates=t}},oE={getAsync(e,{flowId:t,params:i}){return Ke.getFlow(e.rootState.Auth.organization.id,t,i).then(({data:n})=>{if(n.length===0)throw new pf;return n})},getAsyncAdmin(e,{flowId:t,params:i}){return Ke.getFlowsAdmin({"filter[id]":`i=${t}`,...i}).then(({data:n})=>{if((n==null?void 0:n.items.length)===0)throw new pf;return n.items[0]})},getFlows({commit:e,rootState:t},i){return Ke.getFlows(t.Auth.organization.id,i).then(({data:n})=>(e("setFlows",n),n))},getFlowTemplates({commit:e,rootState:t},i){return(t.Auth.is_logged_in?r=>Ke.getFlowTemplates(t.Auth.organization.id,r):Ke.getPublicFlowTemplates)({decorators:[ke.flow.flow_nodes_with_options,ke.flow.tags],...i}).then(({data:r})=>(e("setFlowTemplates",r),r))},create(e,t){return Ke.createFlow(e.rootState.Auth.organization.id,t).then(({data:i})=>(e.dispatch("Notifications/displayToastNotification",{msg:Ct("Flow created successfully."),type:"success"},{root:!0}),i.id)).catch(i=>{throw e.dispatch("Notifications/displayToastNotification",{msg:Ct("Flow creation failed."),type:"error"},{root:!0}),i})},update(e,t){return t!=null&&t.tags&&(t.tags=t.tags.map(i=>typeof i!="string"?i.tag_id:i)),Ke.updateFlow(e.rootState.Auth.organization.id,t.id,t).then(({data:i})=>(e.dispatch("Notifications/displayToastNotification",{msg:Ct("Flow updated successfully."),type:"success"},{root:!0}),i)).catch(i=>{throw e.dispatch("Notifications/displayToastNotification",{msg:Ct("Flow update failed."),type:"error"},{root:!0}),i})},delete(e,t){return Ke.deleteFlow(e.rootState.Auth.organization.id,t).then(({data:i})=>(e.dispatch("Notifications/displayToastNotification",{msg:Ct("Flow deleted successfully."),type:"success"},{root:!0}),i.id)).catch(i=>{throw e.dispatch("Notifications/displayToastNotification",{msg:Ct("Flow deletion failed."),type:"error"},{root:!0}),i})},duplicate(e,{flowId:t,projectId:i}){return Ke.duplicateFlow(e.rootState.Auth.organization.id,t,{project_id:i}).then(({data:n})=>(e.dispatch("Notifications/displayToastNotification",{msg:Ct("Flow duplicated successfully."),type:"success"},{root:!0}),n.id)).catch(n=>{throw e.dispatch("Notifications/displayToastNotification",{msg:Ct("Flow duplication failed."),type:"error"},{root:!0}),n})},getFlowValidation(e,t){return Ke.getFlowValidation(t).then(({data:i})=>i)},validateFlow(e,t){return Ke.validateFlow(t).then(({data:i})=>i)},getEstimateResources(e,t){return Ke.getFlowEstimateResources(t).then(({data:i})=>i)},estimateResources(e,t){return Ke.estimateResources(t).then(({data:i})=>i)},execute(e,t){return Ke.executeFlow(e.rootState.Auth.organization.id,t).then(({data:i})=>(e.dispatch("Notifications/displayToastNotification",{msg:Ct("Flow execution started successfully."),type:"success"},{root:!0}),i)).catch(i=>{var n;if(e.dispatch("Notifications/displayToastNotification",{msg:(n=i.data.message)!=null?n:Ct("Failed to start flow execution."),type:"error"},{root:!0}),i.status===404&&i.data.error_key==="statistics-missing"){const r=/\[(.*)\]/g,s=i.data.message.match(r)[0];e.dispatch("Notifications/displayToastNotification",{content:`
                            <div>
                                Can't run flow, dataset
                                <span class="font-bold">
                                    ${s}
                                </span>
                                has not yet finished processing.
                            </div>
                        `,type:"info",timeout:6e4},{root:!0})}throw i.status===405&&e.dispatch("Notifications/displayToastNotification",{msg:Ct("You have reached the maximum number of concurrent processing flows. To process more flows in parallel, please upgrade your plan. For more information contract support@flai.ai."),type:"info",timeout:6e4},{root:!0}),i})},stop(e,t){return Ke.stopFlow(e.rootState.Auth.organization.id,t).then(({data:i})=>(e.dispatch("Notifications/displayToastNotification",{msg:Ct("Flow execution stopped successfully."),type:"success"},{root:!0}),i)).catch(i=>{throw e.dispatch("Notifications/displayToastNotification",{msg:Ct("Failed to stop flow execution."),type:"error"},{root:!0}),i})},async getFlowExecution(e,{flowExecutionId:t,params:i}){return Ke.getFlowExecution(e.rootState.Auth.organization.id,t,i).then(({data:n})=>{if(n.length===0)throw new gf;return n})},getFlowExecutionAdmin(e,{flowExecutionId:t,params:i}){return Ke.getFlowExecutionsAdmin({"filter[id]":`u=${t}`,...i}).then(({data:n})=>{if((n==null?void 0:n.items.length)===0)throw new gf;return n.items[0]})},getFlowExecutions({commit:e,rootState:t},i){return Ke.getFlowExecutions(t.Auth.organization.id,{...i}).then(({data:n})=>(e("setFlowExecutions",n.items),e("setFlowExecutionsPagination",n.pagination),n))},getFlowExecutionsAdmin({commit:e},t){return Ke.getFlowExecutionsAdmin({...t}).then(({data:i})=>(e("setFlowExecutions",i.items),e("setFlowExecutionsPagination",i.pagination),i))},getOrganizationFlowExecutions({commit:e,rootState:t},i){const n=t.Auth.user.organization.id;return Ke.getFlowExecutions(n,{...i,"filter[organization_id]":`u=${n}`}).then(({data:r})=>(e("setFlowExecutions",r.items),e("setFlowExecutionsPagination",r.pagination),r))},getFlowNodeExecutions(e,t){return Ke.getFlowNodeExecutions(e.rootState.Auth.organization.id,t).then(({data:i})=>i)},submitUserFeedback(e,{feedback:t}){return nE.submitUserFeedback(t).then(({data:i})=>(e.dispatch("Notifications/displayToastNotification",{msg:Ct("Feedback submitted."),type:"success"},{root:!0}),i)).catch(i=>{throw e.dispatch("Notifications/displayToastNotification",{msg:Ct("Failed to submit feedback."),type:"error"},{root:!0}),i})},launch({rootState:e,dispatch:t},i){return Ke.launch(e.Auth.organization.id,i).then(({data:n})=>(t("Notifications/displayToastNotification",{msg:Ct("Flow execution started successfully."),type:"success"},{root:!0}),n)).catch(n=>{throw t("Notifications/displayToastNotification",{msg:Ct("Failed to start flow."),type:"error"},{root:!0}),n})}},Sv={namespaced:!0,state:rE,mutations:sE,actions:oE};class ji{static getModels(t){return V.request("/ai-models",{type:"GET",params:t})}static getPublicModels(){return V.request("/public/ai-models",{type:"GET"})}static getModelsAdmin(t){return V.request("/admin/ai-models",{type:"GET",params:t})}static getModel(t,i){return V.request(`/ai-models/${t}`,{type:"GET",params:i})}static createAiModel(t){return V.request("/ai-models",{type:"POST",data:t})}static updateAiModel(t,i){return V.request(`/ai-models/${t}`,{type:"PUT",data:i})}static deleteAiModel(t){return V.request(`/ai-models/${t}`,{type:"DELETE"})}static saveAiModelSemanticClassesPrices(t,i){return V.request(`/ai-models/${t}/ai-models-semantic-classes-prices`,{type:"POST",data:i})}static getDynamicPriceList(t,i){return V.request(`/ai-models/${t}/dynamic-price-list`,{type:"POST",data:i})}static getDynamicPriceListPublic(t,i){return V.request(`/public/ai-models/${t}/dynamic-price-list`,{type:"POST",data:i})}}const{t:pn}=nt.global,aE={models:[],modelsAdmin:[],modelsPrivate:[],modelsTorch:[],loading:{},allLoaded:!1},lE={set(e,t){const i=e.models.findIndex(({id:n})=>n===t.id);t.is_public||e.modelsPrivate.push(t),t.framework!=null&&t.framework.includes("Torch")&&e.modelsTorch.push(t),i>=0?e.models.splice(i,1,t):e.models.push(t)},removeModel(e,t){const i=e.models.findIndex(({id:n})=>n===t);i>=0&&e.models.splice(i,1)},setModelsAdmin(e,t){e.modelsAdmin=t}},cE={getAsync({commit:e},{id:t,params:i={}}){return ji.getModel(t,{decorators:[ke.ai_model.ai_training_session],...i}).then(({data:n})=>(e("set",n),n))},forceGetAll({state:e,commit:t,rootState:i},n){if(e.loading.all)return e.loading.all;const s=(i.Auth.is_logged_in?ji.getModels:ji.getPublicModels)(n).then(({data:c})=>(c.forEach(u=>{t("set",u)}),e.allLoaded=!0,delete e.loading.all,c));return e.loading.all=s,s},getModelsAsync({state:e,dispatch:t},i){return e.allLoaded?e.models:t("forceGetAll",i)},getModelsAdminAsync({commit:e},t){return ji.getModelsAdmin(t).then(({data:i})=>(e("setModelsAdmin",i),i)).catch(()=>[])},createAiModel(e,t){return ji.createAiModel(t).then(({data:i})=>(e.dispatch("Notifications/displayToastNotification",{msg:pn("AI model successfully created."),type:"success"},{root:!0}),i)).catch(i=>{throw e.dispatch("Notifications/displayToastNotification",{msg:pn("Failed to create AI model."),type:"error"},{root:!0}),i})},updateAiModel(e,{id:t,...i}){return ji.updateAiModel(t,i).then(({data:n})=>(e.commit("set",n),e.dispatch("Notifications/displayToastNotification",{msg:pn("AI model successfully updated."),type:"success"},{root:!0}),n)).catch(n=>{throw e.dispatch("Notifications/displayToastNotification",{msg:pn("Failed to update AI model."),type:"error"},{root:!0}),n})},deleteAiModel(e,{id:t}){return ji.deleteAiModel(t).then(({data:i})=>(e.commit("removeModel",t),e.dispatch("Notifications/displayToastNotification",{msg:pn("AI model successfully deleted."),type:"success"},{root:!0}),i)).catch(i=>{throw e.dispatch("Notifications/displayToastNotification",{msg:pn("Failed to delete AI model."),type:"error"},{root:!0}),i})},saveAiModelSemanticClassesPrices({dispatch:e},{id:t,payload:i}){return ji.saveAiModelSemanticClassesPrices(t,i).then(({data:n})=>(e("Notifications/displayToastNotification",{msg:pn("AI model pricing updated successfully"),type:"success"},{root:!0}),n)).catch(n=>{throw e("Notifications/displayToastNotification",{msg:pn("Failed to update AI model pricing."),type:"error"},{root:!0}),n})},getDynamicPriceList(e,{id:t,...i}){return ji.getDynamicPriceList(t,i).then(({data:n})=>n)}},Av={namespaced:!0,state:aE,mutations:lE,actions:cE},Cv=(e,{key:t,value:i})=>{t.split(".").reduce((n,r,s,c)=>{if(s+1===c.length)n[r]=i;else if(!Object.prototype.hasOwnProperty.call(n,r)){const u=s+1>=c.length?i:{};n[r]=u}return n[r]},e.settings)},xv=(e,{key:t,promise:i})=>{e.loading[t]=i},Tv=(e,t)=>{delete e.loading[t]},$v=e=>t=>!t||!e.settings?e.settings||{}:t.split(".").reduce((i,n)=>Object.prototype.hasOwnProperty.call(i,n)?i[n]:void 0,e.settings),uE={node_definitions:[],loading:{},settings:{all_loaded:!1}},hE={set(e,t){const i=e.node_definitions.findIndex(({id:n})=>n===t.id);i>=0?e.node_definitions.splice(i,1,t):e.node_definitions.push(t)},setSetting:Cv,setLoading:xv,deleteLoading:Tv},dE={get(e){return t=>e.node_definitions.find(({id:i})=>i===t)},getAll(e){return()=>e.node_definitions},getSetting:$v},fE={getAsync({getters:e,dispatch:t},{nodeDefinitionId:i,params:n}){return e.get(i)||t("forceGet",{nodeDefinitionId:i,params:n})},forceGet({state:e,getters:t,commit:i},{nodeDefinitionId:n,params:r}){let s=e.loading[n];return s||(s=Ke.getFlowNodeDefinition(n,r).then(({data:c})=>{i("set",c)}).finally(()=>{i("deleteLoading",n)}),i("setLoading",{key:n,promise:s})),s.then(()=>t.get(n))},getAllAsync({getters:e,dispatch:t}){return e.getSetting("all_loaded")?e.getAll():t("forceGetAll")},forceGetAll({state:e,commit:t,getters:i,rootState:n}){if(e.loading.all)return e.loading.all;const s=(n.Auth.is_logged_in?Ke.getFlowNodeDefinitions:Ke.getPublicFlowNodeDefinitions)().then(({data:c})=>(c.forEach(u=>{t("set",u)}),t("setSetting",{key:"all_loaded",value:!0}),i.getAll())).finally(()=>{t("deleteLoading","all")});return t("setLoading",{key:"all",promise:s}),s}},Mv={state:uE,getters:dE,mutations:hE,actions:fE,namespaced:!0},pE=Cr.create({baseURL:window.ENV_VARS.API_URL});class gE{static store(t={}){pE.post("/user-events",t).then(({data:i})=>i)}}const mE={},vE={},yE={store(e,t){function i(n){return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(n)}return i(t.session_id)&&localStorage.setItem("session_id",t.session_id),localStorage.getItem("session_id")===null&&localStorage.setItem("session_id",rn()),t={...t,session_id:localStorage.getItem("session_id"),referrer:document.referrer,user_agent:navigator.userAgent,host:window.location.host},gE.store(t)}},Ev={namespaced:!0,state:mE,mutations:vE,actions:yE},bE={},_E={},wE={},SE={},hi=Em({modules:{Tools:V$,Auth:GM,Notifications:QM,UserTips:_v,UserTrackingEvents:Ev,AppState:{modules:{AiModels:Av,Flows:Sv,FlowNodeDefinitions:Mv},namespaced:!0}},state:bE,getters:wE,mutations:_E,actions:SE}),AE="modulepreload",CE=function(e){return"/"+e},mf={},$t=function(t,i,n){if(!i||i.length===0)return t();const r=document.getElementsByTagName("link");return Promise.all(i.map(s=>{if(s=CE(s),s in mf)return;mf[s]=!0;const c=s.endsWith(".css"),u=c?'[rel="stylesheet"]':"";if(!!n)for(let a=r.length-1;a>=0;a--){const l=r[a];if(l.href===s&&(!c||l.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${s}"]${u}`))return;const h=document.createElement("link");if(h.rel=c?"stylesheet":AE,c||(h.as="script",h.crossOrigin=""),h.href=s,document.head.appendChild(h),c)return new Promise((a,l)=>{h.addEventListener("load",a),h.addEventListener("error",()=>l(new Error(`Unable to preload CSS for ${s}`)))})})).then(()=>t())};/*!
  * vue-router v4.2.2
  * (c) 2023 Eduardo San Martin Morote
  * @license MIT
  */const xr=typeof window<"u";function xE(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const Ye=Object.assign;function Pl(e,t){const i={};for(const n in t){const r=t[n];i[n]=Ci(r)?r.map(e):e(r)}return i}const Ms=()=>{},Ci=Array.isArray,TE=/\/$/,$E=e=>e.replace(TE,"");function Ll(e,t,i="/"){let n,r={},s="",c="";const u=t.indexOf("#");let o=t.indexOf("?");return u<o&&u>=0&&(o=-1),o>-1&&(n=t.slice(0,o),s=t.slice(o+1,u>-1?u:t.length),r=e(s)),u>-1&&(n=n||t.slice(0,u),c=t.slice(u,t.length)),n=PE(n!=null?n:t,i),{fullPath:n+(s&&"?")+s+c,path:n,query:r,hash:c}}function ME(e,t){const i=t.query?e(t.query):"";return t.path+(i&&"?")+i+(t.hash||"")}function vf(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function EE(e,t,i){const n=t.matched.length-1,r=i.matched.length-1;return n>-1&&n===r&&qr(t.matched[n],i.matched[r])&&kv(t.params,i.params)&&e(t.query)===e(i.query)&&t.hash===i.hash}function qr(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function kv(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const i in e)if(!kE(e[i],t[i]))return!1;return!0}function kE(e,t){return Ci(e)?yf(e,t):Ci(t)?yf(t,e):e===t}function yf(e,t){return Ci(t)?e.length===t.length&&e.every((i,n)=>i===t[n]):e.length===1&&e[0]===t}function PE(e,t){if(e.startsWith("/"))return e;if(!e)return t;const i=t.split("/"),n=e.split("/"),r=n[n.length-1];(r===".."||r===".")&&n.push("");let s=i.length-1,c,u;for(c=0;c<n.length;c++)if(u=n[c],u!==".")if(u==="..")s>1&&s--;else break;return i.slice(0,s).join("/")+"/"+n.slice(c-(c===n.length?1:0)).join("/")}var Gs;(function(e){e.pop="pop",e.push="push"})(Gs||(Gs={}));var Es;(function(e){e.back="back",e.forward="forward",e.unknown=""})(Es||(Es={}));function LE(e){if(!e)if(xr){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),$E(e)}const RE=/^[^#]+#/;function IE(e,t){return e.replace(RE,"#")+t}function OE(e,t){const i=document.documentElement.getBoundingClientRect(),n=e.getBoundingClientRect();return{behavior:t.behavior,left:n.left-i.left-(t.left||0),top:n.top-i.top-(t.top||0)}}const Ga=()=>({left:window.pageXOffset,top:window.pageYOffset});function NE(e){let t;if("el"in e){const i=e.el,n=typeof i=="string"&&i.startsWith("#"),r=typeof i=="string"?n?document.getElementById(i.slice(1)):document.querySelector(i):i;if(!r)return;t=OE(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.pageXOffset,t.top!=null?t.top:window.pageYOffset)}function bf(e,t){return(history.state?history.state.position-t:-1)+e}const Cc=new Map;function DE(e,t){Cc.set(e,t)}function FE(e){const t=Cc.get(e);return Cc.delete(e),t}let BE=()=>location.protocol+"//"+location.host;function Pv(e,t){const{pathname:i,search:n,hash:r}=t,s=e.indexOf("#");if(s>-1){let u=r.includes(e.slice(s))?e.slice(s).length:1,o=r.slice(u);return o[0]!=="/"&&(o="/"+o),vf(o,"")}return vf(i,e)+n+r}function VE(e,t,i,n){let r=[],s=[],c=null;const u=({state:f})=>{const d=Pv(e,location),p=i.value,g=t.value;let m=0;if(f){if(i.value=d,t.value=f,c&&c===p){c=null;return}m=g?f.position-g.position:0}else n(d);r.forEach(v=>{v(i.value,p,{delta:m,type:Gs.pop,direction:m?m>0?Es.forward:Es.back:Es.unknown})})};function o(){c=i.value}function h(f){r.push(f);const d=()=>{const p=r.indexOf(f);p>-1&&r.splice(p,1)};return s.push(d),d}function a(){const{history:f}=window;!f.state||f.replaceState(Ye({},f.state,{scroll:Ga()}),"")}function l(){for(const f of s)f();s=[],window.removeEventListener("popstate",u),window.removeEventListener("beforeunload",a)}return window.addEventListener("popstate",u),window.addEventListener("beforeunload",a,{passive:!0}),{pauseListeners:o,listen:h,destroy:l}}function _f(e,t,i,n=!1,r=!1){return{back:e,current:t,forward:i,replaced:n,position:window.history.length,scroll:r?Ga():null}}function zE(e){const{history:t,location:i}=window,n={value:Pv(e,i)},r={value:t.state};r.value||s(n.value,{back:null,current:n.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function s(o,h,a){const l=e.indexOf("#"),f=l>-1?(i.host&&document.querySelector("base")?e:e.slice(l))+o:BE()+e+o;try{t[a?"replaceState":"pushState"](h,"",f),r.value=h}catch(d){console.error(d),i[a?"replace":"assign"](f)}}function c(o,h){const a=Ye({},t.state,_f(r.value.back,o,r.value.forward,!0),h,{position:r.value.position});s(o,a,!0),n.value=o}function u(o,h){const a=Ye({},r.value,t.state,{forward:o,scroll:Ga()});s(a.current,a,!0);const l=Ye({},_f(n.value,o,null),{position:a.position+1},h);s(o,l,!1),n.value=o}return{location:n,state:r,push:u,replace:c}}function HE(e){e=LE(e);const t=zE(e),i=VE(e,t.state,t.location,t.replace);function n(s,c=!0){c||i.pauseListeners(),history.go(s)}const r=Ye({location:"",base:e,go:n,createHref:IE.bind(null,e)},t,i);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}function Lv(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),HE(e)}function UE(e){return typeof e=="string"||e&&typeof e=="object"}function Rv(e){return typeof e=="string"||typeof e=="symbol"}const gn={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},Iv=Symbol("");var wf;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(wf||(wf={}));function Kr(e,t){return Ye(new Error,{type:e,[Iv]:!0},t)}function Gi(e,t){return e instanceof Error&&Iv in e&&(t==null||!!(e.type&t))}const Sf="[^/]+?",WE={sensitive:!1,strict:!1,start:!0,end:!0},jE=/[.+*?^${}()[\]/\\]/g;function GE(e,t){const i=Ye({},WE,t),n=[];let r=i.start?"^":"";const s=[];for(const h of e){const a=h.length?[]:[90];i.strict&&!h.length&&(r+="/");for(let l=0;l<h.length;l++){const f=h[l];let d=40+(i.sensitive?.25:0);if(f.type===0)l||(r+="/"),r+=f.value.replace(jE,"\\$&"),d+=40;else if(f.type===1){const{value:p,repeatable:g,optional:m,regexp:v}=f;s.push({name:p,repeatable:g,optional:m});const y=v||Sf;if(y!==Sf){d+=10;try{new RegExp(`(${y})`)}catch(b){throw new Error(`Invalid custom RegExp for param "${p}" (${y}): `+b.message)}}let S=g?`((?:${y})(?:/(?:${y}))*)`:`(${y})`;l||(S=m&&h.length<2?`(?:/${S})`:"/"+S),m&&(S+="?"),r+=S,d+=20,m&&(d+=-8),g&&(d+=-20),y===".*"&&(d+=-50)}a.push(d)}n.push(a)}if(i.strict&&i.end){const h=n.length-1;n[h][n[h].length-1]+=.7000000000000001}i.strict||(r+="/?"),i.end?r+="$":i.strict&&(r+="(?:/|$)");const c=new RegExp(r,i.sensitive?"":"i");function u(h){const a=h.match(c),l={};if(!a)return null;for(let f=1;f<a.length;f++){const d=a[f]||"",p=s[f-1];l[p.name]=d&&p.repeatable?d.split("/"):d}return l}function o(h){let a="",l=!1;for(const f of e){(!l||!a.endsWith("/"))&&(a+="/"),l=!1;for(const d of f)if(d.type===0)a+=d.value;else if(d.type===1){const{value:p,repeatable:g,optional:m}=d,v=p in h?h[p]:"";if(Ci(v)&&!g)throw new Error(`Provided param "${p}" is an array but it is not repeatable (* or + modifiers)`);const y=Ci(v)?v.join("/"):v;if(!y)if(m)f.length<2&&(a.endsWith("/")?a=a.slice(0,-1):l=!0);else throw new Error(`Missing required param "${p}"`);a+=y}}return a||"/"}return{re:c,score:n,keys:s,parse:u,stringify:o}}function qE(e,t){let i=0;for(;i<e.length&&i<t.length;){const n=t[i]-e[i];if(n)return n;i++}return e.length<t.length?e.length===1&&e[0]===40+40?-1:1:e.length>t.length?t.length===1&&t[0]===40+40?1:-1:0}function KE(e,t){let i=0;const n=e.score,r=t.score;for(;i<n.length&&i<r.length;){const s=qE(n[i],r[i]);if(s)return s;i++}if(Math.abs(r.length-n.length)===1){if(Af(n))return 1;if(Af(r))return-1}return r.length-n.length}function Af(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const YE={type:0,value:""},XE=/[a-zA-Z0-9_]/;function QE(e){if(!e)return[[]];if(e==="/")return[[YE]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(d){throw new Error(`ERR (${i})/"${h}": ${d}`)}let i=0,n=i;const r=[];let s;function c(){s&&r.push(s),s=[]}let u=0,o,h="",a="";function l(){!h||(i===0?s.push({type:0,value:h}):i===1||i===2||i===3?(s.length>1&&(o==="*"||o==="+")&&t(`A repeatable param (${h}) must be alone in its segment. eg: '/:ids+.`),s.push({type:1,value:h,regexp:a,repeatable:o==="*"||o==="+",optional:o==="*"||o==="?"})):t("Invalid state to consume buffer"),h="")}function f(){h+=o}for(;u<e.length;){if(o=e[u++],o==="\\"&&i!==2){n=i,i=4;continue}switch(i){case 0:o==="/"?(h&&l(),c()):o===":"?(l(),i=1):f();break;case 4:f(),i=n;break;case 1:o==="("?i=2:XE.test(o)?f():(l(),i=0,o!=="*"&&o!=="?"&&o!=="+"&&u--);break;case 2:o===")"?a[a.length-1]=="\\"?a=a.slice(0,-1)+o:i=3:a+=o;break;case 3:l(),i=0,o!=="*"&&o!=="?"&&o!=="+"&&u--,a="";break;default:t("Unknown state");break}}return i===2&&t(`Unfinished custom RegExp for param "${h}"`),l(),c(),r}function JE(e,t,i){const n=GE(QE(e.path),i),r=Ye(n,{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function ZE(e,t){const i=[],n=new Map;t=Tf({strict:!1,end:!0,sensitive:!1},t);function r(a){return n.get(a)}function s(a,l,f){const d=!f,p=ek(a);p.aliasOf=f&&f.record;const g=Tf(t,a),m=[p];if("alias"in a){const S=typeof a.alias=="string"?[a.alias]:a.alias;for(const b of S)m.push(Ye({},p,{components:f?f.record.components:p.components,path:b,aliasOf:f?f.record:p}))}let v,y;for(const S of m){const{path:b}=S;if(l&&b[0]!=="/"){const _=l.record.path,w=_[_.length-1]==="/"?"":"/";S.path=l.record.path+(b&&w+b)}if(v=JE(S,l,g),f?f.alias.push(v):(y=y||v,y!==v&&y.alias.push(v),d&&a.name&&!xf(v)&&c(a.name)),p.children){const _=p.children;for(let w=0;w<_.length;w++)s(_[w],v,f&&f.children[w])}f=f||v,(v.record.components&&Object.keys(v.record.components).length||v.record.name||v.record.redirect)&&o(v)}return y?()=>{c(y)}:Ms}function c(a){if(Rv(a)){const l=n.get(a);l&&(n.delete(a),i.splice(i.indexOf(l),1),l.children.forEach(c),l.alias.forEach(c))}else{const l=i.indexOf(a);l>-1&&(i.splice(l,1),a.record.name&&n.delete(a.record.name),a.children.forEach(c),a.alias.forEach(c))}}function u(){return i}function o(a){let l=0;for(;l<i.length&&KE(a,i[l])>=0&&(a.record.path!==i[l].record.path||!Ov(a,i[l]));)l++;i.splice(l,0,a),a.record.name&&!xf(a)&&n.set(a.record.name,a)}function h(a,l){let f,d={},p,g;if("name"in a&&a.name){if(f=n.get(a.name),!f)throw Kr(1,{location:a});g=f.record.name,d=Ye(Cf(l.params,f.keys.filter(y=>!y.optional).map(y=>y.name)),a.params&&Cf(a.params,f.keys.map(y=>y.name))),p=f.stringify(d)}else if("path"in a)p=a.path,f=i.find(y=>y.re.test(p)),f&&(d=f.parse(p),g=f.record.name);else{if(f=l.name?n.get(l.name):i.find(y=>y.re.test(l.path)),!f)throw Kr(1,{location:a,currentLocation:l});g=f.record.name,d=Ye({},l.params,a.params),p=f.stringify(d)}const m=[];let v=f;for(;v;)m.unshift(v.record),v=v.parent;return{name:g,path:p,params:d,matched:m,meta:ik(m)}}return e.forEach(a=>s(a)),{addRoute:s,resolve:h,removeRoute:c,getRoutes:u,getRecordMatcher:r}}function Cf(e,t){const i={};for(const n of t)n in e&&(i[n]=e[n]);return i}function ek(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:tk(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}}}function tk(e){const t={},i=e.props||!1;if("component"in e)t.default=i;else for(const n in e.components)t[n]=typeof i=="boolean"?i:i[n];return t}function xf(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function ik(e){return e.reduce((t,i)=>Ye(t,i.meta),{})}function Tf(e,t){const i={};for(const n in e)i[n]=n in t?t[n]:e[n];return i}function Ov(e,t){return t.children.some(i=>i===e||Ov(e,i))}const Nv=/#/g,nk=/&/g,rk=/\//g,sk=/=/g,ok=/\?/g,Dv=/\+/g,ak=/%5B/g,lk=/%5D/g,Fv=/%5E/g,ck=/%60/g,Bv=/%7B/g,uk=/%7C/g,Vv=/%7D/g,hk=/%20/g;function Mu(e){return encodeURI(""+e).replace(uk,"|").replace(ak,"[").replace(lk,"]")}function dk(e){return Mu(e).replace(Bv,"{").replace(Vv,"}").replace(Fv,"^")}function xc(e){return Mu(e).replace(Dv,"%2B").replace(hk,"+").replace(Nv,"%23").replace(nk,"%26").replace(ck,"`").replace(Bv,"{").replace(Vv,"}").replace(Fv,"^")}function fk(e){return xc(e).replace(sk,"%3D")}function pk(e){return Mu(e).replace(Nv,"%23").replace(ok,"%3F")}function gk(e){return e==null?"":pk(e).replace(rk,"%2F")}function ya(e){try{return decodeURIComponent(""+e)}catch{}return""+e}function mk(e){const t={};if(e===""||e==="?")return t;const n=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;r<n.length;++r){const s=n[r].replace(Dv," "),c=s.indexOf("="),u=ya(c<0?s:s.slice(0,c)),o=c<0?null:ya(s.slice(c+1));if(u in t){let h=t[u];Ci(h)||(h=t[u]=[h]),h.push(o)}else t[u]=o}return t}function $f(e){let t="";for(let i in e){const n=e[i];if(i=fk(i),n==null){n!==void 0&&(t+=(t.length?"&":"")+i);continue}(Ci(n)?n.map(s=>s&&xc(s)):[n&&xc(n)]).forEach(s=>{s!==void 0&&(t+=(t.length?"&":"")+i,s!=null&&(t+="="+s))})}return t}function vk(e){const t={};for(const i in e){const n=e[i];n!==void 0&&(t[i]=Ci(n)?n.map(r=>r==null?null:""+r):n==null?n:""+n)}return t}const yk=Symbol(""),Mf=Symbol(""),qa=Symbol(""),Eu=Symbol(""),Tc=Symbol("");function cs(){let e=[];function t(n){return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)}}function i(){e=[]}return{add:t,list:()=>e,reset:i}}function An(e,t,i,n,r){const s=n&&(n.enterCallbacks[r]=n.enterCallbacks[r]||[]);return()=>new Promise((c,u)=>{const o=l=>{l===!1?u(Kr(4,{from:i,to:t})):l instanceof Error?u(l):UE(l)?u(Kr(2,{from:t,to:l})):(s&&n.enterCallbacks[r]===s&&typeof l=="function"&&s.push(l),c())},h=e.call(n&&n.instances[r],t,i,o);let a=Promise.resolve(h);e.length<3&&(a=a.then(o)),a.catch(l=>u(l))})}function Rl(e,t,i,n){const r=[];for(const s of e)for(const c in s.components){let u=s.components[c];if(!(t!=="beforeRouteEnter"&&!s.instances[c]))if(bk(u)){const h=(u.__vccOpts||u)[t];h&&r.push(An(h,i,n,s,c))}else{let o=u();r.push(()=>o.then(h=>{if(!h)return Promise.reject(new Error(`Couldn't resolve component "${c}" at "${s.path}"`));const a=xE(h)?h.default:h;s.components[c]=a;const f=(a.__vccOpts||a)[t];return f&&An(f,i,n,s,c)()}))}}return r}function bk(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Ef(e){const t=Qt(qa),i=Qt(Eu),n=ot(()=>t.resolve(Tn(e.to))),r=ot(()=>{const{matched:o}=n.value,{length:h}=o,a=o[h-1],l=i.matched;if(!a||!l.length)return-1;const f=l.findIndex(qr.bind(null,a));if(f>-1)return f;const d=kf(o[h-2]);return h>1&&kf(a)===d&&l[l.length-1].path!==d?l.findIndex(qr.bind(null,o[h-2])):f}),s=ot(()=>r.value>-1&&Ak(i.params,n.value.params)),c=ot(()=>r.value>-1&&r.value===i.matched.length-1&&kv(i.params,n.value.params));function u(o={}){return Sk(o)?t[Tn(e.replace)?"replace":"push"](Tn(e.to)).catch(Ms):Promise.resolve()}return{route:n,href:ot(()=>n.value.href),isActive:s,isExactActive:c,navigate:u}}const _k=ar({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:Ef,setup(e,{slots:t}){const i=sr(Ef(e)),{options:n}=Qt(qa),r=ot(()=>({[Pf(e.activeClass,n.linkActiveClass,"router-link-active")]:i.isActive,[Pf(e.exactActiveClass,n.linkExactActiveClass,"router-link-exact-active")]:i.isExactActive}));return()=>{const s=t.default&&t.default(i);return e.custom?s:Zs("a",{"aria-current":i.isExactActive?e.ariaCurrentValue:null,href:i.href,onClick:i.navigate,class:r.value},s)}}}),wk=_k;function Sk(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Ak(e,t){for(const i in t){const n=t[i],r=e[i];if(typeof n=="string"){if(n!==r)return!1}else if(!Ci(r)||r.length!==n.length||n.some((s,c)=>s!==r[c]))return!1}return!0}function kf(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Pf=(e,t,i)=>e!=null?e:t!=null?t:i,Ck=ar({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:i}){const n=Qt(Tc),r=ot(()=>e.route||n.value),s=Qt(Mf,0),c=ot(()=>{let h=Tn(s);const{matched:a}=r.value;let l;for(;(l=a[h])&&!l.components;)h++;return h}),u=ot(()=>r.value.matched[c.value]);No(Mf,ot(()=>c.value+1)),No(yk,u),No(Tc,r);const o=oi();return wi(()=>[o.value,u.value,e.name],([h,a,l],[f,d,p])=>{a&&(a.instances[l]=h,d&&d!==a&&h&&h===f&&(a.leaveGuards.size||(a.leaveGuards=d.leaveGuards),a.updateGuards.size||(a.updateGuards=d.updateGuards))),h&&a&&(!d||!qr(a,d)||!f)&&(a.enterCallbacks[l]||[]).forEach(g=>g(h))},{flush:"post"}),()=>{const h=r.value,a=e.name,l=u.value,f=l&&l.components[a];if(!f)return Lf(i.default,{Component:f,route:h});const d=l.props[a],p=d?d===!0?h.params:typeof d=="function"?d(h):d:null,m=Zs(f,Ye({},p,t,{onVnodeUnmounted:v=>{v.component.isUnmounted&&(l.instances[a]=null)},ref:o}));return Lf(i.default,{Component:m,route:h})||m}}});function Lf(e,t){if(!e)return null;const i=e(t);return i.length===1?i[0]:i}const xk=Ck;function zv(e){const t=ZE(e.routes,e),i=e.parseQuery||mk,n=e.stringifyQuery||$f,r=e.history,s=cs(),c=cs(),u=cs(),o=Ma(gn);let h=gn;xr&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const a=Pl.bind(null,W=>""+W),l=Pl.bind(null,gk),f=Pl.bind(null,ya);function d(W,K){let Q,ne;return Rv(W)?(Q=t.getRecordMatcher(W),ne=K):ne=W,t.addRoute(ne,Q)}function p(W){const K=t.getRecordMatcher(W);K&&t.removeRoute(K)}function g(){return t.getRoutes().map(W=>W.record)}function m(W){return!!t.getRecordMatcher(W)}function v(W,K){if(K=Ye({},K||o.value),typeof W=="string"){const R=Ll(i,W,K.path),F=t.resolve({path:R.path},K),G=r.createHref(R.fullPath);return Ye(R,F,{params:f(F.params),hash:ya(R.hash),redirectedFrom:void 0,href:G})}let Q;if("path"in W)Q=Ye({},W,{path:Ll(i,W.path,K.path).path});else{const R=Ye({},W.params);for(const F in R)R[F]==null&&delete R[F];Q=Ye({},W,{params:l(R)}),K.params=l(K.params)}const ne=t.resolve(Q,K),de=W.hash||"";ne.params=a(f(ne.params));const _e=ME(n,Ye({},W,{hash:dk(de),path:ne.path})),I=r.createHref(_e);return Ye({fullPath:_e,hash:de,query:n===$f?vk(W.query):W.query||{}},ne,{redirectedFrom:void 0,href:I})}function y(W){return typeof W=="string"?Ll(i,W,o.value.path):Ye({},W)}function S(W,K){if(h!==W)return Kr(8,{from:K,to:W})}function b(W){return E(W)}function _(W){return b(Ye(y(W),{replace:!0}))}function w(W){const K=W.matched[W.matched.length-1];if(K&&K.redirect){const{redirect:Q}=K;let ne=typeof Q=="function"?Q(W):Q;return typeof ne=="string"&&(ne=ne.includes("?")||ne.includes("#")?ne=y(ne):{path:ne},ne.params={}),Ye({query:W.query,hash:W.hash,params:"path"in ne?{}:W.params},ne)}}function E(W,K){const Q=h=v(W),ne=o.value,de=W.state,_e=W.force,I=W.replace===!0,R=w(Q);if(R)return E(Ye(y(R),{state:typeof R=="object"?Ye({},de,R.state):de,force:_e,replace:I}),K||Q);const F=Q;F.redirectedFrom=K;let G;return!_e&&EE(n,ne,Q)&&(G=Kr(16,{to:F,from:ne}),U(ne,ne,!0,!1)),(G?Promise.resolve(G):C(F,ne)).catch(X=>Gi(X)?Gi(X,2)?X:B(X):N(X,F,ne)).then(X=>{if(X){if(Gi(X,2))return E(Ye({replace:I},y(X.to),{state:typeof X.to=="object"?Ye({},de,X.to.state):de,force:_e}),K||F)}else X=L(F,ne,!0,I,de);return x(F,ne,X),X})}function T(W,K){const Q=S(W,K);return Q?Promise.reject(Q):Promise.resolve()}function $(W){const K=j.values().next().value;return K&&typeof K.runWithContext=="function"?K.runWithContext(W):W()}function C(W,K){let Q;const[ne,de,_e]=Tk(W,K);Q=Rl(ne.reverse(),"beforeRouteLeave",W,K);for(const R of ne)R.leaveGuards.forEach(F=>{Q.push(An(F,W,K))});const I=T.bind(null,W,K);return Q.push(I),ie(Q).then(()=>{Q=[];for(const R of s.list())Q.push(An(R,W,K));return Q.push(I),ie(Q)}).then(()=>{Q=Rl(de,"beforeRouteUpdate",W,K);for(const R of de)R.updateGuards.forEach(F=>{Q.push(An(F,W,K))});return Q.push(I),ie(Q)}).then(()=>{Q=[];for(const R of W.matched)if(R.beforeEnter&&!K.matched.includes(R))if(Ci(R.beforeEnter))for(const F of R.beforeEnter)Q.push(An(F,W,K));else Q.push(An(R.beforeEnter,W,K));return Q.push(I),ie(Q)}).then(()=>(W.matched.forEach(R=>R.enterCallbacks={}),Q=Rl(_e,"beforeRouteEnter",W,K),Q.push(I),ie(Q))).then(()=>{Q=[];for(const R of c.list())Q.push(An(R,W,K));return Q.push(I),ie(Q)}).catch(R=>Gi(R,8)?R:Promise.reject(R))}function x(W,K,Q){for(const ne of u.list())$(()=>ne(W,K,Q))}function L(W,K,Q,ne,de){const _e=S(W,K);if(_e)return _e;const I=K===gn,R=xr?history.state:{};Q&&(ne||I?r.replace(W.fullPath,Ye({scroll:I&&R&&R.scroll},de)):r.push(W.fullPath,de)),o.value=W,U(W,K,Q,I),B()}let M;function A(){M||(M=r.listen((W,K,Q)=>{if(!Y.listening)return;const ne=v(W),de=w(ne);if(de){E(Ye(de,{replace:!0}),ne).catch(Ms);return}h=ne;const _e=o.value;xr&&DE(bf(_e.fullPath,Q.delta),Ga()),C(ne,_e).catch(I=>Gi(I,12)?I:Gi(I,2)?(E(I.to,ne).then(R=>{Gi(R,20)&&!Q.delta&&Q.type===Gs.pop&&r.go(-1,!1)}).catch(Ms),Promise.reject()):(Q.delta&&r.go(-Q.delta,!1),N(I,ne,_e))).then(I=>{I=I||L(ne,_e,!1),I&&(Q.delta&&!Gi(I,8)?r.go(-Q.delta,!1):Q.type===Gs.pop&&Gi(I,20)&&r.go(-1,!1)),x(ne,_e,I)}).catch(Ms)}))}let k=cs(),P=cs(),O;function N(W,K,Q){B(W);const ne=P.list();return ne.length?ne.forEach(de=>de(W,K,Q)):console.error(W),Promise.reject(W)}function D(){return O&&o.value!==gn?Promise.resolve():new Promise((W,K)=>{k.add([W,K])})}function B(W){return O||(O=!W,A(),k.list().forEach(([K,Q])=>W?Q(W):K()),k.reset()),W}function U(W,K,Q,ne){const{scrollBehavior:de}=e;if(!xr||!de)return Promise.resolve();const _e=!Q&&FE(bf(W.fullPath,0))||(ne||!Q)&&history.state&&history.state.scroll||null;return tn().then(()=>de(W,K,_e)).then(I=>I&&NE(I)).catch(I=>N(I,W,K))}const q=W=>r.go(W);let H;const j=new Set,Y={currentRoute:o,listening:!0,addRoute:d,removeRoute:p,hasRoute:m,getRoutes:g,resolve:v,options:e,push:b,replace:_,go:q,back:()=>q(-1),forward:()=>q(1),beforeEach:s.add,beforeResolve:c.add,afterEach:u.add,onError:P.add,isReady:D,install(W){const K=this;W.component("RouterLink",wk),W.component("RouterView",xk),W.config.globalProperties.$router=K,Object.defineProperty(W.config.globalProperties,"$route",{enumerable:!0,get:()=>Tn(o)}),xr&&!H&&o.value===gn&&(H=!0,b(r.location).catch(de=>{}));const Q={};for(const de in gn)Q[de]=ot(()=>o.value[de]);W.provide(qa,K),W.provide(Eu,sr(Q)),W.provide(Tc,o);const ne=W.unmount;j.add(W),W.unmount=function(){j.delete(W),j.size<1&&(h=gn,M&&M(),M=null,o.value=gn,H=!1,O=!1),ne()}}};function ie(W){return W.reduce((K,Q)=>K.then(()=>$(Q)),Promise.resolve())}return Y}function Tk(e,t){const i=[],n=[],r=[],s=Math.max(t.matched.length,e.matched.length);for(let c=0;c<s;c++){const u=t.matched[c];u&&(e.matched.find(h=>qr(h,u))?n.push(u):i.push(u));const o=e.matched[c];o&&(t.matched.find(h=>qr(h,o))||r.push(o))}return[i,n,r]}function OB(){return Qt(qa)}function NB(){return Qt(Eu)}const Hv=zv({history:Lv(),routes:[{path:"/",name:"dashboard",component:()=>$t(()=>import("./HubMap.75d18473.js"),["assets/HubMap.75d18473.js","assets/octree.80a95869.js","assets/keyboardHandler.mixin.5cca6b93.js","assets/octree.f2aaab04.css","assets/marked.esm.1cf17280.js","assets/DataTablePagination.4eb7da97.js","assets/DataTablePagination.33bf7570.css","assets/SelectFlowModal.186c515d.js","assets/api-pagination.85ebf85e.js","assets/SelectFlowModal.907eaa97.css","assets/FLAI-logo-main-cropped.317e0f3a.js","assets/dataset-map.37ffb7ae.js","assets/MVT.2c0710f0.js","assets/dataset-map.bcb77a03.css","assets/HubMap.82294b0b.css"])},{name:"login-sso",path:"/login-sso",component:()=>$t(()=>import("./LoginSSO.50bd2bc2.js"),["assets/LoginSSO.50bd2bc2.js","assets/FLAI-logo-main-cropped.317e0f3a.js"]),meta:{hideForAuth:!0}},{name:"register-sso",path:"/register-sso",component:()=>$t(()=>import("./RegisterSSO.95d54b90.js"),["assets/RegisterSSO.95d54b90.js","assets/FLAI-logo-main-cropped.317e0f3a.js"]),meta:{hideForAuth:!0}}]});Hv.afterEach(async(e,t,i)=>{var n;await hi.dispatch("UserTrackingEvents/store",{event_type:"page_view",path:e.fullPath.split("?")[0]||null,utm_source:e.query.utm_source||null,utm_medium:e.query.utm_medium||null,utm_campaign:e.query.utm_campaign||null,session_id:e.query.session_id||null,user_id:((n=hi.state.Auth.user)==null?void 0:n.id)||null})});const Uv="html",Wv="list-of-values",ku="plain-text-multi-row",Pu="plain-text-single-row",Lu="password",$k=[Uv,Wv,ku,Pu,Lu],jv="text",Ru="decimal",Iu="integer",Ou="sequence-number",Mk=[Ru,Iu,Ou],Gv="number",Nu="boolean",Ek=[Nu],kk="boolean",Du="date",Fu="date-time",Pk=[Du,Fu],qv="timestamp",Kv="radio",Yv="double-range-slider",Xv="range",Lk={[jv]:$k,[Gv]:Mk,[kk]:Ek,[qv]:Pk},Rk=Object.values(Lk).reduce((e,t)=>[...e,...t],[]),Ik=[Kv,Yv,Xv],$e=(e,t)=>{const i=e.__vccOpts||e;for(const[n,r]of t)i[n]=r;return i},Ok={name:"FieldTypeInputErrors",props:{errors:{type:Array,required:!1,default:()=>[]}}},Nk={class:"input-errors"};function Dk(e,t,i,n,r,s){return ee(),ae("div",Nk,[(ee(!0),ae(Oe,null,lr(i.errors,c=>(ee(),ae("p",{key:c},be(c),1))),128))])}const Fk=$e(Ok,[["render",Dk]]),Bk={name:"FieldTypeInputHint",props:{hint:{type:String,required:!0}}},Vk={class:"input-hint"};function zk(e,t,i,n,r,s){const c=Ae("flai-icon");return ee(),ae("div",Vk,[ve(c,{name:"info"}),se("span",null,be(i.hint),1)])}const Hk=$e(Bk,[["render",zk]]),ts={props:{attributes:{type:Object,required:!1,default:()=>({})},parameters:{type:Object,required:!1,default:()=>({})},events:{type:Object,required:!1,default:()=>({})}},computed:{defaultAttributesValues(){throw new Error("default attributes values is not defined")},allowedAttributes(){throw new Error("Allowed attributes is not defined")},definitionType(){throw new Error("Text field type is not defined")},getAttributes(){const{validAttributes:e,invalidAttributes:t}=Object.entries(this.attributes).reduce((i,[n,r])=>(this.allowedAttributes.includes(n)?i.validAttributes[n]=r:i.invalidAttributes.push(n),i),{validAttributes:{},invalidAttributes:[]});return this.$debug&&t.includes("id")&&console.warn('"id" attribute should be added to allowedAttributes'),Object.entries(this.defaultAttributesValues).forEach(([i,n])=>{var r;e[i]=(r=e[i])!=null?r:n}),["required","readonly","disabled"].filter(i=>this.allowedAttributes.includes(i)).forEach(i=>{var n;e[i]=(n=e[i])!=null?n:!1}),this.$debug&&t.length&&console.warn(`Attributes "${t.join(", ")}" on ${this.definitionType} are invalid and will be ignored.`),e}}},Uk={name:"BooleanDefinition",mixins:[ts],props:{modelValue:{type:[String,Number,Boolean],default:null}},emits:["update:modelValue"],computed:{defaultAttributesValues(){return{}},allowedAttributes(){return["autocomplete","autofocus","disabled","form","id","name","required"]},definitionType(){return Nu},getValue:{get(){return this.modelValue},set(e){this.$emit("update:modelValue",e)}}},created(){this.correctValue()},methods:{correctValue(){typeof this.getValue!="boolean"&&(this.getValue=["1",1,"true"].includes(this.modelValue))}}};function Wk(e,t,i,n,r,s){return St((ee(),ae("input",ut({"onUpdate:modelValue":t[0]||(t[0]=c=>s.getValue=c)},e.getAttributes,{type:"checkbox"},mi(e.events,!0)),null,16)),[[Bs,s.getValue]])}const jk=$e(Uk,[["render",Wk]]),Qv={mixins:[ts],props:{modelValue:{type:String,default:null}},data(){return{native_type:qv}},computed:{getValue:{get(){return this.modelValue},set(e){this.$emit("update:modelValue",e||null)}},showClearButton(){return this.parameters.clear_button&&this.getValue}}},Gk={name:"DateTimeDefinition",mixins:[Qv],computed:{defaultAttributesValues(){return{}},definitionType(){return Fu},allowedAttributes(){return["autocomplete","disabled","id","list","max","min","name","readonly","required","step"]}}};function qk(e,t,i,n,r,s){return St((ee(),ae("input",ut({"onUpdate:modelValue":t[0]||(t[0]=c=>e.getValue=c)},e.getAttributes,{type:"datetime-local"},mi(e.events,!0)),null,16)),[[Fi,e.getValue]])}const Kk=$e(Gk,[["render",qk]]),Yk={name:"DateDefinition",mixins:[Qv],computed:{defaultAttributesValues(){return{}},definitionType(){return Du},allowedAttributes(){return["autocomplete","disabled","id","list","max","min","name","readonly","required","step"]}}};function Xk(e,t,i,n,r,s){return St((ee(),ae("input",ut({"onUpdate:modelValue":t[0]||(t[0]=c=>e.getValue=c)},e.getAttributes,{type:"date"},mi(e.events,!0)),null,16)),[[Fi,e.getValue]])}const Qk=$e(Yk,[["render",Xk]]),Bu={mixins:[ts],props:{modelValue:{type:[Number,String],default:null}},data(){return{native_type:Gv}},computed:{getValue:{get(){return this.modelValue},set(e){var n,r;if(!this.attributes.required&&[null,void 0,""].includes(e)){this.$emit("update:modelValue",null);return}const t=!!((n=this.attributes.min)!=null&&n)&&e<this.attributes.min,i=!!((r=this.attributes.max)!=null&&r)&&e>this.attributes.max;t?this.$emit("update:modelValue",this.attributes.min):i?this.$emit("update:modelValue",this.attributes.max):this.$emit("update:modelValue",e)}}}},Jk={name:"DecimalDefinition",mixins:[Bu],computed:{defaultAttributesValues(){return{step:.1}},allowedAttributes(){return["autocomplete","autofocus","disabled","form","id","list","max","min","name","placeholder","readonly","required","step"]},definitionType(){return Ru}}};function Zk(e,t,i,n,r,s){return St((ee(),ae("input",ut({"onUpdate:modelValue":t[0]||(t[0]=c=>e.getValue=c)},e.getAttributes,{type:"number"},mi(e.events,!0)),null,16)),[[Fi,e.getValue,void 0,{number:!0}]])}const eP=$e(Jk,[["render",Zk]]);var Jv={exports:{}};(function(e,t){(function(){var i="ace",n=function(){return this}();!n&&typeof window<"u"&&(n=window);var r=function(a,l,f){if(typeof a!="string"){r.original?r.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(f=l),r.modules[a]||(r.payloads[a]=f,r.modules[a]=null)};r.modules={},r.payloads={};var s=function(a,l,f){if(typeof l=="string"){var d=o(a,l);if(d!=null)return f&&f(),d}else if(Object.prototype.toString.call(l)==="[object Array]"){for(var p=[],g=0,m=l.length;g<m;++g){var v=o(a,l[g]);if(v==null&&c.original)return;p.push(v)}return f&&f.apply(null,p)||!0}},c=function(a,l){var f=s("",a,l);return f==null&&c.original?c.original.apply(this,arguments):f},u=function(a,l){if(l.indexOf("!")!==-1){var f=l.split("!");return u(a,f[0])+"!"+u(a,f[1])}if(l.charAt(0)=="."){var d=a.split("/").slice(0,-1).join("/");for(l=d+"/"+l;l.indexOf(".")!==-1&&p!=l;){var p=l;l=l.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return l},o=function(a,l){l=u(a,l);var f=r.modules[l];if(!f){if(f=r.payloads[l],typeof f=="function"){var d={},p={id:l,uri:"",exports:d,packaged:!0},g=function(v,y){return s(l,v,y)},m=f(g,d,p);d=m||p.exports,r.modules[l]=d,delete r.payloads[l]}f=r.modules[l]=d||f}return f};function h(a){var l=n;a&&(n[a]||(n[a]={}),l=n[a]),(!l.define||!l.define.packaged)&&(r.original=l.define,l.define=r,l.define.packaged=!0),(!l.require||!l.require.packaged)&&(c.original=l.require,l.require=c,l.require.packaged=!0)}h(i)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(i,n,r){function s(c,u,o){Object.defineProperty(c,u,{value:o,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||s(String.prototype,"startsWith",function(c,u){return u=u||0,this.lastIndexOf(c,u)===u}),String.prototype.endsWith||s(String.prototype,"endsWith",function(c,u){var o=this;(u===void 0||u>o.length)&&(u=o.length),u-=c.length;var h=o.indexOf(c,u);return h!==-1&&h===u}),String.prototype.repeat||s(String.prototype,"repeat",function(c){for(var u="",o=this;c>0;)c&1&&(u+=o),(c>>=1)&&(o+=o);return u}),String.prototype.includes||s(String.prototype,"includes",function(c,u){return this.indexOf(c,u)!=-1}),Object.assign||(Object.assign=function(c){if(c==null)throw new TypeError("Cannot convert undefined or null to object");for(var u=Object(c),o=1;o<arguments.length;o++){var h=arguments[o];h!=null&&Object.keys(h).forEach(function(a){u[a]=h[a]})}return u}),Object.values||(Object.values=function(c){return Object.keys(c).map(function(u){return c[u]})}),Array.prototype.find||s(Array.prototype,"find",function(c){for(var u=this.length,o=arguments[1],h=0;h<u;h++){var a=this[h];if(c.call(o,a,h,this))return a}}),Array.prototype.findIndex||s(Array.prototype,"findIndex",function(c){for(var u=this.length,o=arguments[1],h=0;h<u;h++){var a=this[h];if(c.call(o,a,h,this))return h}}),Array.prototype.includes||s(Array.prototype,"includes",function(c,u){return this.indexOf(c,u)!=-1}),Array.prototype.fill||s(Array.prototype,"fill",function(c){for(var u=this,o=u.length>>>0,h=arguments[1],a=h>>0,l=a<0?Math.max(o+a,0):Math.min(a,o),f=arguments[2],d=f===void 0?o:f>>0,p=d<0?Math.max(o+d,0):Math.min(d,o);l<p;)u[l]=c,l++;return u}),Array.of||s(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(i,n,r){i("./es6-shim")}),ace.define("ace/lib/lang",["require","exports","module"],function(i,n,r){n.last=function(u){return u[u.length-1]},n.stringReverse=function(u){return u.split("").reverse().join("")},n.stringRepeat=function(u,o){for(var h="";o>0;)o&1&&(h+=u),(o>>=1)&&(u+=u);return h};var s=/^\s\s*/,c=/\s\s*$/;n.stringTrimLeft=function(u){return u.replace(s,"")},n.stringTrimRight=function(u){return u.replace(c,"")},n.copyObject=function(u){var o={};for(var h in u)o[h]=u[h];return o},n.copyArray=function(u){for(var o=[],h=0,a=u.length;h<a;h++)u[h]&&typeof u[h]=="object"?o[h]=this.copyObject(u[h]):o[h]=u[h];return o},n.deepCopy=function u(o){if(typeof o!="object"||!o)return o;var h;if(Array.isArray(o)){h=[];for(var a=0;a<o.length;a++)h[a]=u(o[a]);return h}if(Object.prototype.toString.call(o)!=="[object Object]")return o;h={};for(var a in o)h[a]=u(o[a]);return h},n.arrayToMap=function(u){for(var o={},h=0;h<u.length;h++)o[u[h]]=1;return o},n.createMap=function(u){var o=Object.create(null);for(var h in u)o[h]=u[h];return o},n.arrayRemove=function(u,o){for(var h=0;h<=u.length;h++)o===u[h]&&u.splice(h,1)},n.escapeRegExp=function(u){return u.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},n.escapeHTML=function(u){return(""+u).replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},n.getMatchOffsets=function(u,o){var h=[];return u.replace(o,function(a){h.push({offset:arguments[arguments.length-2],length:a.length})}),h},n.deferredCall=function(u){var o=null,h=function(){o=null,u()},a=function(l){return a.cancel(),o=setTimeout(h,l||0),a};return a.schedule=a,a.call=function(){return this.cancel(),u(),a},a.cancel=function(){return clearTimeout(o),o=null,a},a.isPending=function(){return o},a},n.delayedCall=function(u,o){var h=null,a=function(){h=null,u()},l=function(f){h==null&&(h=setTimeout(a,f||o))};return l.delay=function(f){h&&clearTimeout(h),h=setTimeout(a,f||o)},l.schedule=l,l.call=function(){this.cancel(),u()},l.cancel=function(){h&&clearTimeout(h),h=null},l.isPending=function(){return h},l}}),ace.define("ace/lib/useragent",["require","exports","module"],function(i,n,r){n.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},n.getOS=function(){return n.isMac?n.OS.MAC:n.isLinux?n.OS.LINUX:n.OS.WINDOWS};var s=typeof navigator=="object"?navigator:{},c=(/mac|win|linux/i.exec(s.platform)||["other"])[0].toLowerCase(),u=s.userAgent||"",o=s.appName||"";n.isWin=c=="win",n.isMac=c=="mac",n.isLinux=c=="linux",n.isIE=o=="Microsoft Internet Explorer"||o.indexOf("MSAppHost")>=0?parseFloat((u.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((u.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),n.isOldIE=n.isIE&&n.isIE<9,n.isGecko=n.isMozilla=u.match(/ Gecko\/\d+/),n.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",n.isWebKit=parseFloat(u.split("WebKit/")[1])||void 0,n.isChrome=parseFloat(u.split(" Chrome/")[1])||void 0,n.isEdge=parseFloat(u.split(" Edge/")[1])||void 0,n.isAIR=u.indexOf("AdobeAIR")>=0,n.isAndroid=u.indexOf("Android")>=0,n.isChromeOS=u.indexOf(" CrOS ")>=0,n.isIOS=/iPad|iPhone|iPod/.test(u)&&!window.MSStream,n.isIOS&&(n.isMac=!0),n.isMobile=n.isIOS||n.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(i,n,r){var s=i("./useragent"),c="http://www.w3.org/1999/xhtml";n.buildDom=function f(d,p,g){if(typeof d=="string"&&d){var m=document.createTextNode(d);return p&&p.appendChild(m),m}if(!Array.isArray(d))return d&&d.appendChild&&p&&p.appendChild(d),d;if(typeof d[0]!="string"||!d[0]){for(var v=[],y=0;y<d.length;y++){var S=f(d[y],p,g);S&&v.push(S)}return v}var b=document.createElement(d[0]),_=d[1],w=1;_&&typeof _=="object"&&!Array.isArray(_)&&(w=2);for(var y=w;y<d.length;y++)f(d[y],b,g);return w==2&&Object.keys(_).forEach(function(E){var T=_[E];E==="class"?b.className=Array.isArray(T)?T.join(" "):T:typeof T=="function"||E=="value"||E[0]=="$"?b[E]=T:E==="ref"?g&&(g[T]=b):E==="style"?typeof T=="string"&&(b.style.cssText=T):T!=null&&b.setAttribute(E,T)}),p&&p.appendChild(b),b},n.getDocumentHead=function(f){return f||(f=document),f.head||f.getElementsByTagName("head")[0]||f.documentElement},n.createElement=function(f,d){return document.createElementNS?document.createElementNS(d||c,f):document.createElement(f)},n.removeChildren=function(f){f.innerHTML=""},n.createTextNode=function(f,d){var p=d?d.ownerDocument:document;return p.createTextNode(f)},n.createFragment=function(f){var d=f?f.ownerDocument:document;return d.createDocumentFragment()},n.hasCssClass=function(f,d){var p=(f.className+"").split(/\s+/g);return p.indexOf(d)!==-1},n.addCssClass=function(f,d){n.hasCssClass(f,d)||(f.className+=" "+d)},n.removeCssClass=function(f,d){for(var p=f.className.split(/\s+/g);;){var g=p.indexOf(d);if(g==-1)break;p.splice(g,1)}f.className=p.join(" ")},n.toggleCssClass=function(f,d){for(var p=f.className.split(/\s+/g),g=!0;;){var m=p.indexOf(d);if(m==-1)break;g=!1,p.splice(m,1)}return g&&p.push(d),f.className=p.join(" "),g},n.setCssClass=function(f,d,p){p?n.addCssClass(f,d):n.removeCssClass(f,d)},n.hasCssString=function(f,d){var p=0,g;if(d=d||document,g=d.querySelectorAll("style")){for(;p<g.length;)if(g[p++].id===f)return!0}},n.removeElementById=function(f,d){d=d||document,d.getElementById(f)&&d.getElementById(f).remove()};var u,o=[];n.useStrictCSP=function(f){u=f,f==!1?h():o||(o=[])};function h(){var f=o;o=null,f&&f.forEach(function(d){a(d[0],d[1])})}function a(f,d,p){if(!(typeof document>"u")){if(o){if(p)h();else if(p===!1)return o.push([f,d])}if(!u){var g=p;!p||!p.getRootNode?g=document:(g=p.getRootNode(),(!g||g==p)&&(g=document));var m=g.ownerDocument||g;if(d&&n.hasCssString(d,g))return null;d&&(f+=`
/*# sourceURL=ace/css/`+d+" */");var v=n.createElement("style");v.appendChild(m.createTextNode(f)),d&&(v.id=d),g==m&&(g=n.getDocumentHead(m)),g.insertBefore(v,g.firstChild)}}}if(n.importCssString=a,n.importCssStylsheet=function(f,d){n.buildDom(["link",{rel:"stylesheet",href:f}],n.getDocumentHead(d))},n.scrollbarWidth=function(f){var d=n.createElement("ace_inner");d.style.width="100%",d.style.minWidth="0px",d.style.height="200px",d.style.display="block";var p=n.createElement("ace_outer"),g=p.style;g.position="absolute",g.left="-10000px",g.overflow="hidden",g.width="200px",g.minWidth="0px",g.height="150px",g.display="block",p.appendChild(d);var m=f&&f.documentElement||document&&document.documentElement;if(!m)return 0;m.appendChild(p);var v=d.offsetWidth;g.overflow="scroll";var y=d.offsetWidth;return v===y&&(y=p.clientWidth),m.removeChild(p),v-y},n.computedStyle=function(f,d){return window.getComputedStyle(f,"")||{}},n.setStyle=function(f,d,p){f[d]!==p&&(f[d]=p)},n.HAS_CSS_ANIMATION=!1,n.HAS_CSS_TRANSFORMS=!1,n.HI_DPI=s.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,s.isChromeOS&&(n.HI_DPI=!1),typeof document<"u"){var l=document.createElement("div");n.HI_DPI&&l.style.transform!==void 0&&(n.HAS_CSS_TRANSFORMS=!0),!s.isEdge&&typeof l.style.animationName<"u"&&(n.HAS_CSS_ANIMATION=!0),l=null}n.HAS_CSS_TRANSFORMS?n.translate=function(f,d,p){f.style.transform="translate("+Math.round(d)+"px, "+Math.round(p)+"px)"}:n.translate=function(f,d,p){f.style.top=Math.round(p)+"px",f.style.left=Math.round(d)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(i,n,r){/*
* based on code from:
*
* @license RequireJS text 0.25.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
* Available via the MIT or new BSD license.
* see: http://github.com/jrburke/requirejs for details
*/var s=i("./dom");n.get=function(c,u){var o=new XMLHttpRequest;o.open("GET",c,!0),o.onreadystatechange=function(){o.readyState===4&&u(o.responseText)},o.send(null)},n.loadScript=function(c,u){var o=s.getDocumentHead(),h=document.createElement("script");h.src=c,o.appendChild(h),h.onload=h.onreadystatechange=function(a,l){(l||!h.readyState||h.readyState=="loaded"||h.readyState=="complete")&&(h=h.onload=h.onreadystatechange=null,l||u())}},n.qualifyURL=function(c){var u=document.createElement("a");return u.href=c,u.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(i,n,r){n.inherits=function(s,c){s.super_=c,s.prototype=Object.create(c.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}})},n.mixin=function(s,c){for(var u in c)s[u]=c[u];return s},n.implement=function(s,c){n.mixin(s,c)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(i,n,r){var s={},c=function(){this.propagationStopped=!0},u=function(){this.defaultPrevented=!0};s._emit=s._dispatchEvent=function(o,h){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var a=this._eventRegistry[o]||[],l=this._defaultHandlers[o];if(!(!a.length&&!l)){(typeof h!="object"||!h)&&(h={}),h.type||(h.type=o),h.stopPropagation||(h.stopPropagation=c),h.preventDefault||(h.preventDefault=u),a=a.slice();for(var f=0;f<a.length&&(a[f](h,this),!h.propagationStopped);f++);if(l&&!h.defaultPrevented)return l(h,this)}},s._signal=function(o,h){var a=(this._eventRegistry||{})[o];if(!!a){a=a.slice();for(var l=0;l<a.length;l++)a[l](h,this)}},s.once=function(o,h){var a=this;if(this.on(o,function l(){a.off(o,l),h.apply(null,arguments)}),!h)return new Promise(function(l){h=l})},s.setDefaultHandler=function(o,h){var a=this._defaultHandlers;if(a||(a=this._defaultHandlers={_disabled_:{}}),a[o]){var l=a[o],f=a._disabled_[o];f||(a._disabled_[o]=f=[]),f.push(l);var d=f.indexOf(h);d!=-1&&f.splice(d,1)}a[o]=h},s.removeDefaultHandler=function(o,h){var a=this._defaultHandlers;if(!!a){var l=a._disabled_[o];if(a[o]==h)l&&this.setDefaultHandler(o,l.pop());else if(l){var f=l.indexOf(h);f!=-1&&l.splice(f,1)}}},s.on=s.addEventListener=function(o,h,a){this._eventRegistry=this._eventRegistry||{};var l=this._eventRegistry[o];return l||(l=this._eventRegistry[o]=[]),l.indexOf(h)==-1&&l[a?"unshift":"push"](h),h},s.off=s.removeListener=s.removeEventListener=function(o,h){this._eventRegistry=this._eventRegistry||{};var a=this._eventRegistry[o];if(!!a){var l=a.indexOf(h);l!==-1&&a.splice(l,1)}},s.removeAllListeners=function(o){o||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[o]=void 0),this._defaultHandlers&&(this._defaultHandlers[o]=void 0)},n.EventEmitter=s}),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(i,n,r){var s=i("./oop"),c=i("./event_emitter").EventEmitter,u={setOptions:function(f){Object.keys(f).forEach(function(d){this.setOption(d,f[d])},this)},getOptions:function(f){var d={};if(f)Array.isArray(f)||(d=f,f=Object.keys(d));else{var p=this.$options;f=Object.keys(p).filter(function(g){return!p[g].hidden})}return f.forEach(function(g){d[g]=this.getOption(g)},this),d},setOption:function(f,d){if(this["$"+f]!==d){var p=this.$options[f];if(!p)return o('misspelled option "'+f+'"');if(p.forwardTo)return this[p.forwardTo]&&this[p.forwardTo].setOption(f,d);p.handlesSet||(this["$"+f]=d),p&&p.set&&p.set.call(this,d)}},getOption:function(f){var d=this.$options[f];return d?d.forwardTo?this[d.forwardTo]&&this[d.forwardTo].getOption(f):d&&d.get?d.get.call(this):this["$"+f]:o('misspelled option "'+f+'"')}};function o(f){typeof console<"u"&&console.warn&&console.warn.apply(console,arguments)}function h(f,d){var p=new Error(f);p.data=d,typeof console=="object"&&console.error&&console.error(p),setTimeout(function(){throw p})}var a,l=function(){function f(){this.$defaultOptions={}}return f.prototype.defineOptions=function(d,p,g){return d.$options||(this.$defaultOptions[p]=d.$options={}),Object.keys(g).forEach(function(m){var v=g[m];typeof v=="string"&&(v={forwardTo:v}),v.name||(v.name=m),d.$options[v.name]=v,"initialValue"in v&&(d["$"+v.name]=v.initialValue)}),s.implement(d,u),this},f.prototype.resetOptions=function(d){Object.keys(d.$options).forEach(function(p){var g=d.$options[p];"value"in g&&d.setOption(p,g.value)})},f.prototype.setDefaultValue=function(d,p,g){if(!d){for(d in this.$defaultOptions)if(this.$defaultOptions[d][p])break;if(!this.$defaultOptions[d][p])return!1}var m=this.$defaultOptions[d]||(this.$defaultOptions[d]={});m[p]&&(m.forwardTo?this.setDefaultValue(m.forwardTo,p,g):m[p].value=g)},f.prototype.setDefaultValues=function(d,p){Object.keys(p).forEach(function(g){this.setDefaultValue(d,g,p[g])},this)},f.prototype.setMessages=function(d){a=d},f.prototype.nls=function(d,p){var g=a&&a[d]||d;return p&&(g=g.replace(/\$(\$|[\d]+)/g,function(m,v){return v=="$"?"$":p[v]})),g},f}();l.prototype.warn=o,l.prototype.reportError=h,s.implement(l.prototype,c),n.AppConfig=l}),ace.define("ace/theme/textmate.css",["require","exports","module"],function(i,n,r){r.exports=`.ace-tm .ace_gutter {
  background: #f0f0f0;
  color: #333;
}

.ace-tm .ace_print-margin {
  width: 1px;
  background: #e8e8e8;
}

.ace-tm .ace_fold {
    background-color: #6B72E6;
}

.ace-tm {
  background-color: #FFFFFF;
  color: black;
}

.ace-tm .ace_cursor {
  color: black;
}
        
.ace-tm .ace_invisible {
  color: rgb(191, 191, 191);
}

.ace-tm .ace_storage,
.ace-tm .ace_keyword {
  color: blue;
}

.ace-tm .ace_constant {
  color: rgb(197, 6, 11);
}

.ace-tm .ace_constant.ace_buildin {
  color: rgb(88, 72, 246);
}

.ace-tm .ace_constant.ace_language {
  color: rgb(88, 92, 246);
}

.ace-tm .ace_constant.ace_library {
  color: rgb(6, 150, 14);
}

.ace-tm .ace_invalid {
  background-color: rgba(255, 0, 0, 0.1);
  color: red;
}

.ace-tm .ace_support.ace_function {
  color: rgb(60, 76, 114);
}

.ace-tm .ace_support.ace_constant {
  color: rgb(6, 150, 14);
}

.ace-tm .ace_support.ace_type,
.ace-tm .ace_support.ace_class {
  color: rgb(109, 121, 222);
}

.ace-tm .ace_keyword.ace_operator {
  color: rgb(104, 118, 135);
}

.ace-tm .ace_string {
  color: rgb(3, 106, 7);
}

.ace-tm .ace_comment {
  color: rgb(76, 136, 107);
}

.ace-tm .ace_comment.ace_doc {
  color: rgb(0, 102, 255);
}

.ace-tm .ace_comment.ace_doc.ace_tag {
  color: rgb(128, 159, 191);
}

.ace-tm .ace_constant.ace_numeric {
  color: rgb(0, 0, 205);
}

.ace-tm .ace_variable {
  color: rgb(49, 132, 149);
}

.ace-tm .ace_xml-pe {
  color: rgb(104, 104, 91);
}

.ace-tm .ace_entity.ace_name.ace_function {
  color: #0000A2;
}


.ace-tm .ace_heading {
  color: rgb(12, 7, 255);
}

.ace-tm .ace_list {
  color:rgb(185, 6, 144);
}

.ace-tm .ace_meta.ace_tag {
  color:rgb(0, 22, 142);
}

.ace-tm .ace_string.ace_regex {
  color: rgb(255, 0, 0)
}

.ace-tm .ace_marker-layer .ace_selection {
  background: rgb(181, 213, 255);
}
.ace-tm.ace_multiselect .ace_selection.ace_start {
  box-shadow: 0 0 3px 0px white;
}
.ace-tm .ace_marker-layer .ace_step {
  background: rgb(252, 255, 0);
}

.ace-tm .ace_marker-layer .ace_stack {
  background: rgb(164, 229, 101);
}

.ace-tm .ace_marker-layer .ace_bracket {
  margin: -1px 0 0 -1px;
  border: 1px solid rgb(192, 192, 192);
}

.ace-tm .ace_marker-layer .ace_active-line {
  background: rgba(0, 0, 0, 0.07);
}

.ace-tm .ace_gutter-active-line {
    background-color : #dcdcdc;
}

.ace-tm .ace_marker-layer .ace_selected-word {
  background: rgb(250, 250, 255);
  border: 1px solid rgb(200, 200, 250);
}

.ace-tm .ace_indent-guide {
  background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
}

.ace-tm .ace_indent-guide-active {
  background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
}
`}),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate.css","ace/lib/dom"],function(i,n,r){n.isDark=!1,n.cssClass="ace-tm",n.cssText=i("./textmate.css"),n.$id="ace/theme/textmate";var s=i("../lib/dom");s.importCssString(n.cssText,n.cssClass,!1)}),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/net","ace/lib/dom","ace/lib/app_config","ace/theme/textmate"],function(i,n,r){var s=i("./lib/lang"),c=i("./lib/net"),u=i("./lib/dom"),o=i("./lib/app_config").AppConfig;r.exports=n=new o;var h={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};n.get=function(f){if(!h.hasOwnProperty(f))throw new Error("Unknown config key: "+f);return h[f]},n.set=function(f,d){if(h.hasOwnProperty(f))h[f]=d;else if(this.setDefaultValue("",f,d)==!1)throw new Error("Unknown config key: "+f);f=="useStrictCSP"&&u.useStrictCSP(d)},n.all=function(){return s.copyObject(h)},n.$modes={},n.moduleUrl=function(f,d){if(h.$moduleUrls[f])return h.$moduleUrls[f];var p=f.split("/");d=d||p[p.length-2]||"";var g=d=="snippets"?"/":"-",m=p[p.length-1];if(d=="worker"&&g=="-"){var v=new RegExp("^"+d+"[\\-_]|[\\-_]"+d+"$","g");m=m.replace(v,"")}(!m||m==d)&&p.length>1&&(m=p[p.length-2]);var y=h[d+"Path"];return y==null?y=h.basePath:g=="/"&&(d=g=""),y&&y.slice(-1)!="/"&&(y+="/"),y+d+g+m+this.get("suffix")},n.setModuleUrl=function(f,d){return h.$moduleUrls[f]=d};var a=function(f,d){return f==="ace/theme/textmate"||f==="./theme/textmate"?d(null,i("./theme/textmate")):console.error("loader is not configured")};n.setLoader=function(f){a=f},n.dynamicModules=Object.create(null),n.$loading={},n.loadModule=function(f,d){var p,g;Array.isArray(f)&&(g=f[0],f=f[1]);var m=function(v){if(v&&!n.$loading[f])return d&&d(v);if(n.$loading[f]||(n.$loading[f]=[]),n.$loading[f].push(d),!(n.$loading[f].length>1)){var y=function(){a(f,function(S,b){n._emit("load.module",{name:f,module:b});var _=n.$loading[f];n.$loading[f]=null,_.forEach(function(w){w&&w(b)})})};if(!n.get("packaged"))return y();c.loadScript(n.moduleUrl(f,g),y),l()}};if(n.dynamicModules[f])n.dynamicModules[f]().then(function(v){v.default?m(v.default):m(v)});else{try{p=i(f)}catch{}m(p)}},n.setModuleLoader=function(f,d){n.dynamicModules[f]=d};var l=function(){!h.basePath&&!h.workerPath&&!h.modePath&&!h.themePath&&!Object.keys(h.$moduleUrls).length&&(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),l=function(){})};n.version="1.22.1"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(i,n,r){i("./lib/fixoldbrowsers");var s=i("./config");s.setLoader(function(h,a){i([h],function(l){a(null,l)})});var c=function(){return this||typeof window<"u"&&window}();r.exports=function(h){s.init=u,h.require=i},u(!0);function u(h){if(!(!c||!c.document)){s.set("packaged",h||i.packaged||r.packaged||c.define&&(void 0).packaged);var a={},l="",f=document.currentScript||document._currentScript,d=f&&f.ownerDocument||document;f&&f.src&&(l=f.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var p=d.getElementsByTagName("script"),g=0;g<p.length;g++){var m=p[g],v=m.src||m.getAttribute("src");if(!!v){for(var y=m.attributes,S=0,b=y.length;S<b;S++){var _=y[S];_.name.indexOf("data-ace-")===0&&(a[o(_.name.replace(/^data-ace-/,""))]=_.value)}var w=v.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);w&&(l=w[1])}}l&&(a.base=a.base||l,a.packaged=!0),a.basePath=a.base,a.workerPath=a.workerPath||a.base,a.modePath=a.modePath||a.base,a.themePath=a.themePath||a.base,delete a.base;for(var E in a)typeof a[E]<"u"&&s.set(E,a[E])}}function o(h){return h.replace(/-(.)/g,function(a,l){return l.toUpperCase()})}}),ace.define("ace/range",["require","exports","module"],function(i,n,r){var s=function(u,o){return u.row-o.row||u.column-o.column},c=function(){function u(o,h,a,l){this.start={row:o,column:h},this.end={row:a,column:l}}return u.prototype.isEqual=function(o){return this.start.row===o.start.row&&this.end.row===o.end.row&&this.start.column===o.start.column&&this.end.column===o.end.column},u.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},u.prototype.contains=function(o,h){return this.compare(o,h)==0},u.prototype.compareRange=function(o){var h,a=o.end,l=o.start;return h=this.compare(a.row,a.column),h==1?(h=this.compare(l.row,l.column),h==1?2:h==0?1:0):h==-1?-2:(h=this.compare(l.row,l.column),h==-1?-1:h==1?42:0)},u.prototype.comparePoint=function(o){return this.compare(o.row,o.column)},u.prototype.containsRange=function(o){return this.comparePoint(o.start)==0&&this.comparePoint(o.end)==0},u.prototype.intersects=function(o){var h=this.compareRange(o);return h==-1||h==0||h==1},u.prototype.isEnd=function(o,h){return this.end.row==o&&this.end.column==h},u.prototype.isStart=function(o,h){return this.start.row==o&&this.start.column==h},u.prototype.setStart=function(o,h){typeof o=="object"?(this.start.column=o.column,this.start.row=o.row):(this.start.row=o,this.start.column=h)},u.prototype.setEnd=function(o,h){typeof o=="object"?(this.end.column=o.column,this.end.row=o.row):(this.end.row=o,this.end.column=h)},u.prototype.inside=function(o,h){return this.compare(o,h)==0?!(this.isEnd(o,h)||this.isStart(o,h)):!1},u.prototype.insideStart=function(o,h){return this.compare(o,h)==0?!this.isEnd(o,h):!1},u.prototype.insideEnd=function(o,h){return this.compare(o,h)==0?!this.isStart(o,h):!1},u.prototype.compare=function(o,h){return!this.isMultiLine()&&o===this.start.row?h<this.start.column?-1:h>this.end.column?1:0:o<this.start.row?-1:o>this.end.row?1:this.start.row===o?h>=this.start.column?0:-1:this.end.row===o?h<=this.end.column?0:1:0},u.prototype.compareStart=function(o,h){return this.start.row==o&&this.start.column==h?-1:this.compare(o,h)},u.prototype.compareEnd=function(o,h){return this.end.row==o&&this.end.column==h?1:this.compare(o,h)},u.prototype.compareInside=function(o,h){return this.end.row==o&&this.end.column==h?1:this.start.row==o&&this.start.column==h?-1:this.compare(o,h)},u.prototype.clipRows=function(o,h){if(this.end.row>h)var a={row:h+1,column:0};else if(this.end.row<o)var a={row:o,column:0};if(this.start.row>h)var l={row:h+1,column:0};else if(this.start.row<o)var l={row:o,column:0};return u.fromPoints(l||this.start,a||this.end)},u.prototype.extend=function(o,h){var a=this.compare(o,h);if(a==0)return this;if(a==-1)var l={row:o,column:h};else var f={row:o,column:h};return u.fromPoints(l||this.start,f||this.end)},u.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},u.prototype.isMultiLine=function(){return this.start.row!==this.end.row},u.prototype.clone=function(){return u.fromPoints(this.start,this.end)},u.prototype.collapseRows=function(){return this.end.column==0?new u(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new u(this.start.row,0,this.end.row,0)},u.prototype.toScreenRange=function(o){var h=o.documentToScreenPosition(this.start),a=o.documentToScreenPosition(this.end);return new u(h.row,h.column,a.row,a.column)},u.prototype.moveBy=function(o,h){this.start.row+=o,this.start.column+=h,this.end.row+=o,this.end.column+=h},u}();c.fromPoints=function(u,o){return new c(u.row,u.column,o.row,o.column)},c.comparePoints=s,c.comparePoints=function(u,o){return u.row-o.row||u.column-o.column},n.Range=c}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(i,n,r){/*! @license
	==========================================================================
	SproutCore -- JavaScript Application Framework
	copyright 2006-2009, Sprout Systems Inc., Apple Inc. and contributors.

	Permission is hereby granted, free of charge, to any person obtaining a
	copy of this software and associated documentation files (the "Software"),
	to deal in the Software without restriction, including without limitation
	the rights to use, copy, modify, merge, publish, distribute, sublicense,
	and/or sell copies of the Software, and to permit persons to whom the
	Software is furnished to do so, subject to the following conditions:

	The above copyright notice and this permission notice shall be included in
	all copies or substantial portions of the Software.

	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
	IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
	FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
	AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
	LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
	FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
	DEALINGS IN THE SOFTWARE.

	SproutCore and the SproutCore logo are trademarks of Sprout Systems, Inc.

	For more information about SproutCore, visit http://www.sproutcore.com


	==========================================================================
	@license */var s=i("./oop"),c=function(){var u={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}};u.PRINTABLE_KEYS[173]="-";var o,h;for(h in u.FUNCTION_KEYS)o=u.FUNCTION_KEYS[h].toLowerCase(),u[o]=parseInt(h,10);for(h in u.PRINTABLE_KEYS)o=u.PRINTABLE_KEYS[h].toLowerCase(),u[o]=parseInt(h,10);return s.mixin(u,u.MODIFIER_KEYS),s.mixin(u,u.PRINTABLE_KEYS),s.mixin(u,u.FUNCTION_KEYS),u.enter=u.return,u.escape=u.esc,u.del=u.delete,function(){for(var a=["cmd","ctrl","alt","shift"],l=Math.pow(2,a.length);l--;)u.KEY_MODS[l]=a.filter(function(f){return l&u.KEY_MODS[f]}).join("-")+"-"}(),u.KEY_MODS[0]="",u.KEY_MODS[-1]="input-",u}();s.mixin(n,c),n.keyCodeToString=function(u){var o=c[u];return typeof o!="string"&&(o=String.fromCharCode(u)),o.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(i,n,r){var s=i("./keys"),c=i("./useragent"),u=null,o=0,h;function a(){h=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){h={passive:!1}}})}catch{}}function l(){return h==null&&a(),h}function f(S,b,_){this.elem=S,this.type=b,this.callback=_}f.prototype.destroy=function(){p(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var d=n.addListener=function(S,b,_,w){S.addEventListener(b,_,l()),w&&w.$toDestroy.push(new f(S,b,_))},p=n.removeListener=function(S,b,_){S.removeEventListener(b,_,l())};n.stopEvent=function(S){return n.stopPropagation(S),n.preventDefault(S),!1},n.stopPropagation=function(S){S.stopPropagation&&S.stopPropagation()},n.preventDefault=function(S){S.preventDefault&&S.preventDefault()},n.getButton=function(S){return S.type=="dblclick"?0:S.type=="contextmenu"||c.isMac&&S.ctrlKey&&!S.altKey&&!S.shiftKey?2:S.button},n.capture=function(S,b,_){var w=S&&S.ownerDocument||document;function E(T){b&&b(T),_&&_(T),p(w,"mousemove",b),p(w,"mouseup",E),p(w,"dragstart",E)}return d(w,"mousemove",b),d(w,"mouseup",E),d(w,"dragstart",E),E},n.addMouseWheelListener=function(S,b,_){d(S,"wheel",function(w){var E=.15,T=w.deltaX||0,$=w.deltaY||0;switch(w.deltaMode){case w.DOM_DELTA_PIXEL:w.wheelX=T*E,w.wheelY=$*E;break;case w.DOM_DELTA_LINE:var C=15;w.wheelX=T*C,w.wheelY=$*C;break;case w.DOM_DELTA_PAGE:var x=150;w.wheelX=T*x,w.wheelY=$*x;break}b(w)},_)},n.addMultiMouseDownListener=function(S,b,_,w,E){var T=0,$,C,x,L={2:"dblclick",3:"tripleclick",4:"quadclick"};function M(A){if(n.getButton(A)!==0?T=0:A.detail>1?(T++,T>4&&(T=1)):T=1,c.isIE){var k=Math.abs(A.clientX-$)>5||Math.abs(A.clientY-C)>5;(!x||k)&&(T=1),x&&clearTimeout(x),x=setTimeout(function(){x=null},b[T-1]||600),T==1&&($=A.clientX,C=A.clientY)}if(A._clicks=T,_[w]("mousedown",A),T>4)T=0;else if(T>1)return _[w](L[T],A)}Array.isArray(S)||(S=[S]),S.forEach(function(A){d(A,"mousedown",M,E)})};var g=function(S){return 0|(S.ctrlKey?1:0)|(S.altKey?2:0)|(S.shiftKey?4:0)|(S.metaKey?8:0)};n.getModifierString=function(S){return s.KEY_MODS[g(S)]};function m(S,b,_){var w=g(b);if(!c.isMac&&u){if(b.getModifierState&&(b.getModifierState("OS")||b.getModifierState("Win"))&&(w|=8),u.altGr)if((3&w)!=3)u.altGr=0;else return;if(_===18||_===17){var E="location"in b?b.location:b.keyLocation;if(_===17&&E===1)u[_]==1&&(o=b.timeStamp);else if(_===18&&w===3&&E===2){var T=b.timeStamp-o;T<50&&(u.altGr=!0)}}}if(_ in s.MODIFIER_KEYS&&(_=-1),!w&&_===13){var E="location"in b?b.location:b.keyLocation;if(E===3&&(S(b,w,-_),b.defaultPrevented))return}if(c.isChromeOS&&w&8){if(S(b,w,_),b.defaultPrevented)return;w&=-9}return!w&&!(_ in s.FUNCTION_KEYS)&&!(_ in s.PRINTABLE_KEYS)?!1:S(b,w,_)}n.addCommandKeyListener=function(S,b,_){if(c.isOldGecko||c.isOpera&&!("KeyboardEvent"in window)){var w=null;d(S,"keydown",function(T){w=T.keyCode},_),d(S,"keypress",function(T){return m(b,T,w)},_)}else{var E=null;d(S,"keydown",function(T){u[T.keyCode]=(u[T.keyCode]||0)+1;var $=m(b,T,T.keyCode);return E=T.defaultPrevented,$},_),d(S,"keypress",function(T){E&&(T.ctrlKey||T.altKey||T.shiftKey||T.metaKey)&&(n.stopEvent(T),E=null)},_),d(S,"keyup",function(T){u[T.keyCode]=null},_),u||(v(),d(window,"focus",v))}};function v(){u=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!c.isOldIE){var y=1;n.nextTick=function(S,b){b=b||window;var _="zero-timeout-message-"+y++,w=function(E){E.data==_&&(n.stopPropagation(E),p(b,"message",w),S())};d(b,"message",w),b.postMessage(_,"*")}}n.$idleBlocked=!1,n.onIdle=function(S,b){return setTimeout(function _(){n.$idleBlocked?setTimeout(_,100):S()},b)},n.$idleBlockId=null,n.blockIdle=function(S){n.$idleBlockId&&clearTimeout(n.$idleBlockId),n.$idleBlocked=!0,n.$idleBlockId=setTimeout(function(){n.$idleBlocked=!1},S||100)},n.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),n.nextFrame?n.nextFrame=n.nextFrame.bind(window):n.nextFrame=function(S){setTimeout(S,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(i,n,r){var s;r.exports={lineMode:!1,pasteCancelled:function(){return s&&s>Date.now()-50?!0:s=!1},cancel:function(){s=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(i,n,r){var s=i("../lib/event"),c=i("../config").nls,u=i("../lib/useragent"),o=i("../lib/dom"),h=i("../lib/lang"),a=i("../clipboard"),l=u.isChrome<18,f=u.isIE,d=u.isChrome>63,p=400,g=i("../lib/keys"),m=g.KEY_MODS,v=u.isIOS,y=v?/\s/:/\n/,S=u.isMobile,b=function(_,w){var E=o.createElement("textarea");E.className="ace_text-input",E.setAttribute("wrap","off"),E.setAttribute("autocorrect","off"),E.setAttribute("autocapitalize","off"),E.setAttribute("spellcheck",!1),E.style.opacity="0",_.insertBefore(E,_.firstChild);var T=!1,$=!1,C=!1,x=!1,L="";S||(E.style.fontSize="1px");var M=!1,A=!1,k="",P=0,O=0,N=0;try{var D=document.activeElement===E}catch{}this.setAriaOptions=function(Z){Z.activeDescendant?(E.setAttribute("aria-haspopup","true"),E.setAttribute("aria-autocomplete",Z.inline?"both":"list"),E.setAttribute("aria-activedescendant",Z.activeDescendant)):(E.setAttribute("aria-haspopup","false"),E.setAttribute("aria-autocomplete","both"),E.removeAttribute("aria-activedescendant")),Z.role&&E.setAttribute("role",Z.role)},this.setAriaLabel=function(){if(w.session&&w.renderer.enableKeyboardAccessibility){var Z=w.session.selection.cursor.row;E.setAttribute("aria-roledescription",c("editor")),E.setAttribute("aria-label",c("Cursor at row $0",[Z+1]))}else E.removeAttribute("aria-roledescription"),E.removeAttribute("aria-label")},this.setAriaOptions({role:"textbox"}),this.setAriaLabel(),s.addListener(E,"blur",function(Z){A||(w.onBlur(Z),D=!1,S&&!v&&document.removeEventListener("selectionchange",H))},w),s.addListener(E,"focus",function(Z){if(!A){if(D=!0,u.isEdge)try{if(!document.hasFocus())return}catch{}w.onFocus(Z),u.isEdge?setTimeout(B):B(),S&&!v&&document.addEventListener("selectionchange",H)}},w),this.$focusScroll=!1,this.focus=function(){if(this.setAriaLabel(),L||d||this.$focusScroll=="browser")return E.focus({preventScroll:!0});var Z=E.style.top;E.style.position="fixed",E.style.top="0px";try{var te=E.getBoundingClientRect().top!=0}catch{return}var z=[];if(te)for(var J=E.parentElement;J&&J.nodeType==1;)z.push(J),J.setAttribute("ace_nocontext",!0),!J.parentElement&&J.getRootNode?J=J.getRootNode().host:J=J.parentElement;E.focus({preventScroll:!0}),te&&z.forEach(function(ue){ue.removeAttribute("ace_nocontext")}),setTimeout(function(){E.style.position="",E.style.top=="0px"&&(E.style.top=Z)},0)},this.blur=function(){E.blur()},this.isFocused=function(){return D},w.on("beforeEndOperation",function(){var Z=w.curOp,te=Z&&Z.command&&Z.command.name;if(te!="insertstring"){var z=te&&(Z.docChanged||Z.selectionChanged);C&&z&&(k=E.value="",F()),B()}});var B=v?function(Z){if(!(!D||T&&!Z||x)){Z||(Z="");var te=`
 ab`+Z+`cde fg
`;te!=E.value&&(E.value=k=te);var z=4,J=4+(Z.length||(w.selection.isEmpty()?0:1));(P!=z||O!=J)&&E.setSelectionRange(z,J),P=z,O=J}}:function(){if(!(C||x)&&!(!D&&!Y)){C=!0;var Z=0,te=0,z="";if(w.session){var J=w.selection,ue=J.getRange(),ge=J.cursor.row;if(Z=ue.start.column,te=ue.end.column,z=w.session.getLine(ge),ue.start.row!=ge){var Ce=w.session.getLine(ge-1);Z=ue.start.row<ge-1?0:Z,te+=Ce.length+1,z=Ce+`
`+z}else if(ue.end.row!=ge){var Ie=w.session.getLine(ge+1);te=ue.end.row>ge+1?Ie.length:te,te+=z.length+1,z=z+`
`+Ie}else S&&ge>0&&(z=`
`+z,te+=1,Z+=1);z.length>p&&(Z<p&&te<p?z=z.slice(0,p):(z=`
`,Z==te?Z=te=0:(Z=0,te=1)))}var Me=z+`

`;if(Me!=k&&(E.value=k=Me,P=O=Me.length),Y&&(P=E.selectionStart,O=E.selectionEnd),O!=te||P!=Z||E.selectionEnd!=O)try{E.setSelectionRange(Z,te),P=Z,O=te}catch{}C=!1}};this.resetSelection=B,D&&w.onFocus();var U=function(Z){return Z.selectionStart===0&&Z.selectionEnd>=k.length&&Z.value===k&&k&&Z.selectionEnd!==O},q=function(Z){C||(T?T=!1:U(E)?(w.selectAll(),B()):S&&E.selectionStart!=P&&B())};function H(Z){if((!E||!E.parentNode)&&document.removeEventListener("selectionchange",H),!C&&E.selectionStart===E.selectionEnd){var te=E.selectionStart-P,z=O-P;te>0?te=Math.max(te-z,1):te===0&&z&&(te=-1);for(var J=Math.abs(te),ue=te>0?g.right:g.left,ge=0;ge<J;ge++)w.onCommandKey({},0,ue)}}var j=null;this.setInputHandler=function(Z){j=Z},this.getInputHandler=function(){return j};var Y=!1,ie=function(Z,te){if(Y&&(Y=!1),$)return B(),Z&&w.onPaste(Z),$=!1,"";for(var z=E.selectionStart,J=E.selectionEnd,ue=P,ge=k.length-O,Ce=Z,Ie=Z.length-z,Me=Z.length-J,Re=0;ue>0&&k[Re]==Z[Re];)Re++,ue--;for(Ce=Ce.slice(Re),Re=1;ge>0&&k.length-Re>P-1&&k[k.length-Re]==Z[Z.length-Re];)Re++,ge--;Ie-=Re-1,Me-=Re-1;var tt=Ce.length-Re+1;if(tt<0&&(ue=-tt,tt=0),Ce=Ce.slice(0,tt),!te&&!Ce&&!Ie&&!ue&&!ge&&!Me)return"";x=!0;var Ti=!1;return u.isAndroid&&Ce==". "&&(Ce="  ",Ti=!0),Ce&&!ue&&!ge&&!Ie&&!Me||M?w.onTextInput(Ce):w.onTextInput(Ce,{extendLeft:ue,extendRight:ge,restoreStart:Ie,restoreEnd:Me}),x=!1,k=Z,P=z,O=J,N=Me,Ti?`
`:Ce},W=function(Z){if(C)return R();if(Z&&Z.inputType){if(Z.inputType=="historyUndo")return w.execCommand("undo");if(Z.inputType=="historyRedo")return w.execCommand("redo")}var te=E.value,z=ie(te,!0);(te.length>p+100||y.test(z)||S&&P<1&&P==O)&&B()},K=function(Z,te,z){var J=Z.clipboardData||window.clipboardData;if(!(!J||l)){var ue=f||z?"Text":"text/plain";try{return te?J.setData(ue,te)!==!1:J.getData(ue)}catch(ge){if(!z)return K(ge,te,!0)}}},Q=function(Z,te){var z=w.getCopyText();if(!z)return s.preventDefault(Z);K(Z,z)?(v&&(B(z),T=z,setTimeout(function(){T=!1},10)),te?w.onCut():w.onCopy(),s.preventDefault(Z)):(T=!0,E.value=z,E.select(),setTimeout(function(){T=!1,B(),te?w.onCut():w.onCopy()}))},ne=function(Z){Q(Z,!0)},de=function(Z){Q(Z,!1)},_e=function(Z){var te=K(Z);a.pasteCancelled()||(typeof te=="string"?(te&&w.onPaste(te,Z),u.isIE&&setTimeout(B),s.preventDefault(Z)):(E.value="",$=!0))};s.addCommandKeyListener(E,w.onCommandKey.bind(w),w),s.addListener(E,"select",q,w),s.addListener(E,"input",W,w),s.addListener(E,"cut",ne,w),s.addListener(E,"copy",de,w),s.addListener(E,"paste",_e,w),(!("oncut"in E)||!("oncopy"in E)||!("onpaste"in E))&&s.addListener(_,"keydown",function(Z){if(!(u.isMac&&!Z.metaKey||!Z.ctrlKey))switch(Z.keyCode){case 67:de(Z);break;case 86:_e(Z);break;case 88:ne(Z);break}},w);var I=function(Z){if(!(C||!w.onCompositionStart||w.$readOnly)&&(C={},!M)){Z.data&&(C.useTextareaForIME=!1),setTimeout(R,0),w._signal("compositionStart"),w.on("mousedown",G);var te=w.getSelectionRange();te.end.row=te.start.row,te.end.column=te.start.column,C.markerRange=te,C.selectionStart=P,w.onCompositionStart(C),C.useTextareaForIME?(k=E.value="",P=0,O=0):(E.msGetInputContext&&(C.context=E.msGetInputContext()),E.getInputContext&&(C.context=E.getInputContext()))}},R=function(){if(!(!C||!w.onCompositionUpdate||w.$readOnly)){if(M)return G();if(C.useTextareaForIME)w.onCompositionUpdate(E.value);else{var Z=E.value;ie(Z),C.markerRange&&(C.context&&(C.markerRange.start.column=C.selectionStart=C.context.compositionStartOffset),C.markerRange.end.column=C.markerRange.start.column+O-C.selectionStart+N)}}},F=function(Z){!w.onCompositionEnd||w.$readOnly||(C=!1,w.onCompositionEnd(),w.off("mousedown",G),Z&&W())};function G(){A=!0,E.blur(),E.focus(),A=!1}var X=h.delayedCall(R,50).schedule.bind(null,null);function re(Z){Z.keyCode==27&&E.value.length<E.selectionStart&&(C||(k=E.value),P=O=-1,B()),X()}s.addListener(E,"compositionstart",I,w),s.addListener(E,"compositionupdate",R,w),s.addListener(E,"keyup",re,w),s.addListener(E,"keydown",X,w),s.addListener(E,"compositionend",F,w),this.getElement=function(){return E},this.setCommandMode=function(Z){M=Z,E.readOnly=!1},this.setReadOnly=function(Z){M||(E.readOnly=Z)},this.setCopyWithEmptySelection=function(Z){},this.onContextMenu=function(Z){Y=!0,B(),w._emit("nativecontextmenu",{target:w,domEvent:Z}),this.moveToMouse(Z,!0)},this.moveToMouse=function(Z,te){L||(L=E.style.cssText),E.style.cssText=(te?"z-index:100000;":"")+(u.isIE?"opacity:0.1;":"")+"text-indent: -"+(P+O)*w.renderer.characterWidth*.5+"px;";var z=w.container.getBoundingClientRect(),J=o.computedStyle(w.container),ue=z.top+(parseInt(J.borderTopWidth)||0),ge=z.left+(parseInt(z.borderLeftWidth)||0),Ce=z.bottom-ue-E.clientHeight-2,Ie=function(Me){o.translate(E,Me.clientX-ge-2,Math.min(Me.clientY-ue-2,Ce))};Ie(Z),Z.type=="mousedown"&&(w.renderer.$isMousePressed=!0,clearTimeout(he),u.isWin&&s.capture(w.container,Ie,le))},this.onContextMenuClose=le;var he;function le(){clearTimeout(he),he=setTimeout(function(){L&&(E.style.cssText=L,L=""),w.renderer.$isMousePressed=!1,w.renderer.$keepTextAreaAtCursor&&w.renderer.$moveTextAreaToCursor()},0)}var fe=function(Z){w.textInput.onContextMenu(Z),le()};s.addListener(E,"mouseup",fe,w),s.addListener(E,"mousedown",function(Z){Z.preventDefault(),le()},w),s.addListener(w.renderer.scroller,"contextmenu",fe,w),s.addListener(E,"contextmenu",fe,w),v&&oe(_,w,E);function oe(Z,te,z){var J=null,ue=!1;z.addEventListener("keydown",function(Ce){J&&clearTimeout(J),ue=!0},!0),z.addEventListener("keyup",function(Ce){J=setTimeout(function(){ue=!1},100)},!0);var ge=function(Ce){if(document.activeElement===z&&!(ue||C||te.$mouseHandler.isMousePressed)&&!T){var Ie=z.selectionStart,Me=z.selectionEnd,Re=null,tt=0;if(Ie==0?Re=g.up:Ie==1?Re=g.home:Me>O&&k[Me]==`
`?Re=g.end:Ie<P&&k[Ie-1]==" "?(Re=g.left,tt=m.option):Ie<P||Ie==P&&O!=P&&Ie==Me?Re=g.left:Me>O&&k.slice(0,Me).split(`
`).length>2?Re=g.down:Me>O&&k[Me-1]==" "?(Re=g.right,tt=m.option):(Me>O||Me==O&&O!=P&&Ie==Me)&&(Re=g.right),Ie!==Me&&(tt|=m.shift),Re){var Ti=te.onCommandKey({},tt,Re);if(!Ti&&te.commands){Re=g.keyCodeToString(Re);var is=te.commands.findKeyCommand(tt,Re);is&&te.execCommand(is)}P=Ie,O=Me,B("")}}};document.addEventListener("selectionchange",ge),te.on("destroy",function(){document.removeEventListener("selectionchange",ge)})}this.destroy=function(){E.parentElement&&E.parentElement.removeChild(E)}};n.TextInput=b,n.$setUserAgentForTests=function(_,w){S=_,v=w}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(i,n,r){var s=i("../lib/useragent"),c=0,u=550,o=function(){function l(f){f.$clickSelection=null;var d=f.editor;d.setDefaultHandler("mousedown",this.onMouseDown.bind(f)),d.setDefaultHandler("dblclick",this.onDoubleClick.bind(f)),d.setDefaultHandler("tripleclick",this.onTripleClick.bind(f)),d.setDefaultHandler("quadclick",this.onQuadClick.bind(f)),d.setDefaultHandler("mousewheel",this.onMouseWheel.bind(f));var p=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];p.forEach(function(g){f[g]=this[g]},this),f.selectByLines=this.extendSelectionBy.bind(f,"getLineRange"),f.selectByWords=this.extendSelectionBy.bind(f,"getWordRange")}return l.prototype.onMouseDown=function(f){var d=f.inSelection(),p=f.getDocumentPosition();this.mousedownEvent=f;var g=this.editor,m=f.getButton();if(m!==0){var v=g.getSelectionRange(),y=v.isEmpty();(y||m==1)&&g.selection.moveToPosition(p),m==2&&(g.textInput.onContextMenu(f.domEvent),s.isMozilla||f.preventDefault());return}if(this.mousedownEvent.time=Date.now(),d&&!g.isFocused()&&(g.focus(),this.$focusTimeout&&!this.$clickSelection&&!g.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(f);return}return this.captureMouse(f),this.startSelect(p,f.domEvent._clicks>1),f.preventDefault()},l.prototype.startSelect=function(f,d){f=f||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var p=this.editor;!this.mousedownEvent||(this.mousedownEvent.getShiftKey()?p.selection.selectToPosition(f):d||p.selection.moveToPosition(f),d||this.select(),p.setStyle("ace_selecting"),this.setState("select"))},l.prototype.select=function(){var f,d=this.editor,p=d.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var g=this.$clickSelection.comparePoint(p);if(g==-1)f=this.$clickSelection.end;else if(g==1)f=this.$clickSelection.start;else{var m=a(this.$clickSelection,p);p=m.cursor,f=m.anchor}d.selection.setSelectionAnchor(f.row,f.column)}d.selection.selectToPosition(p),d.renderer.scrollCursorIntoView()},l.prototype.extendSelectionBy=function(f){var d,p=this.editor,g=p.renderer.screenToTextCoordinates(this.x,this.y),m=p.selection[f](g.row,g.column);if(this.$clickSelection){var v=this.$clickSelection.comparePoint(m.start),y=this.$clickSelection.comparePoint(m.end);if(v==-1&&y<=0)d=this.$clickSelection.end,(m.end.row!=g.row||m.end.column!=g.column)&&(g=m.start);else if(y==1&&v>=0)d=this.$clickSelection.start,(m.start.row!=g.row||m.start.column!=g.column)&&(g=m.end);else if(v==-1&&y==1)g=m.end,d=m.start;else{var S=a(this.$clickSelection,g);g=S.cursor,d=S.anchor}p.selection.setSelectionAnchor(d.row,d.column)}p.selection.selectToPosition(g),p.renderer.scrollCursorIntoView()},l.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},l.prototype.focusWait=function(){var f=h(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),d=Date.now();(f>c||d-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},l.prototype.onDoubleClick=function(f){var d=f.getDocumentPosition(),p=this.editor,g=p.session,m=g.getBracketRange(d);m?(m.isEmpty()&&(m.start.column--,m.end.column++),this.setState("select")):(m=p.selection.getWordRange(d.row,d.column),this.setState("selectByWords")),this.$clickSelection=m,this.select()},l.prototype.onTripleClick=function(f){var d=f.getDocumentPosition(),p=this.editor;this.setState("selectByLines");var g=p.getSelectionRange();g.isMultiLine()&&g.contains(d.row,d.column)?(this.$clickSelection=p.selection.getLineRange(g.start.row),this.$clickSelection.end=p.selection.getLineRange(g.end.row).end):this.$clickSelection=p.selection.getLineRange(d.row),this.select()},l.prototype.onQuadClick=function(f){var d=this.editor;d.selectAll(),this.$clickSelection=d.getSelectionRange(),this.setState("selectAll")},l.prototype.onMouseWheel=function(f){if(!f.getAccelKey()){f.getShiftKey()&&f.wheelY&&!f.wheelX&&(f.wheelX=f.wheelY,f.wheelY=0);var d=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var p=this.$lastScroll,g=f.domEvent.timeStamp,m=g-p.t,v=m?f.wheelX/m:p.vx,y=m?f.wheelY/m:p.vy;m<u&&(v=(v+p.vx)/2,y=(y+p.vy)/2);var S=Math.abs(v/y),b=!1;if(S>=1&&d.renderer.isScrollableBy(f.wheelX*f.speed,0)&&(b=!0),S<=1&&d.renderer.isScrollableBy(0,f.wheelY*f.speed)&&(b=!0),b)p.allowed=g;else if(g-p.allowed<u){var _=Math.abs(v)<=1.5*Math.abs(p.vx)&&Math.abs(y)<=1.5*Math.abs(p.vy);_?(b=!0,p.allowed=g):p.allowed=0}if(p.t=g,p.vx=v,p.vy=y,b)return d.renderer.scrollBy(f.wheelX*f.speed,f.wheelY*f.speed),f.stop()}},l}();o.prototype.selectEnd=o.prototype.selectByLinesEnd,o.prototype.selectAllEnd=o.prototype.selectByLinesEnd,o.prototype.selectByWordsEnd=o.prototype.selectByLinesEnd,n.DefaultHandlers=o;function h(l,f,d,p){return Math.sqrt(Math.pow(d-l,2)+Math.pow(p-f,2))}function a(l,f){if(l.start.row==l.end.row)var d=2*f.column-l.start.column-l.end.column;else if(l.start.row==l.end.row-1&&!l.start.column&&!l.end.column)var d=f.column-4;else var d=2*f.row-l.start.row-l.end.row;return d<0?{cursor:l.start,anchor:l.end}:{cursor:l.end,anchor:l.start}}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/range"],function(i,n,r){var s=this&&this.__extends||function(){var p=function(g,m){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,y){v.__proto__=y}||function(v,y){for(var S in y)Object.prototype.hasOwnProperty.call(y,S)&&(v[S]=y[S])},p(g,m)};return function(g,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");p(g,m);function v(){this.constructor=g}g.prototype=m===null?Object.create(m):(v.prototype=m.prototype,new v)}}(),c=this&&this.__values||function(p){var g=typeof Symbol=="function"&&Symbol.iterator,m=g&&p[g],v=0;if(m)return m.call(p);if(p&&typeof p.length=="number")return{next:function(){return p&&v>=p.length&&(p=void 0),{value:p&&p[v++],done:!p}}};throw new TypeError(g?"Object is not iterable.":"Symbol.iterator is not defined.")},u=i("./lib/dom"),o=i("./range").Range,h="ace_tooltip",a=function(){function p(g){this.isOpen=!1,this.$element=null,this.$parentNode=g}return p.prototype.$init=function(){return this.$element=u.createElement("div"),this.$element.className=h,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},p.prototype.getElement=function(){return this.$element||this.$init()},p.prototype.setText=function(g){this.getElement().textContent=g},p.prototype.setHtml=function(g){this.getElement().innerHTML=g},p.prototype.setPosition=function(g,m){this.getElement().style.left=g+"px",this.getElement().style.top=m+"px"},p.prototype.setClassName=function(g){u.addCssClass(this.getElement(),g)},p.prototype.setTheme=function(g){this.$element.className=h+" "+(g.isDark?"ace_dark ":"")+(g.cssClass||"")},p.prototype.show=function(g,m,v){g!=null&&this.setText(g),m!=null&&v!=null&&this.setPosition(m,v),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},p.prototype.hide=function(){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=h,this.isOpen=!1)},p.prototype.getHeight=function(){return this.getElement().offsetHeight},p.prototype.getWidth=function(){return this.getElement().offsetWidth},p.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},p}(),l=function(){function p(){this.popups=[]}return p.prototype.addPopup=function(g){this.popups.push(g),this.updatePopups()},p.prototype.removePopup=function(g){var m=this.popups.indexOf(g);m!==-1&&(this.popups.splice(m,1),this.updatePopups())},p.prototype.updatePopups=function(){var g,m,v,y;this.popups.sort(function(x,L){return L.priority-x.priority});var S=[];try{for(var b=c(this.popups),_=b.next();!_.done;_=b.next()){var w=_.value,E=!0;try{for(var T=(v=void 0,c(S)),$=T.next();!$.done;$=T.next()){var C=$.value;if(this.doPopupsOverlap(C,w)){E=!1;break}}}catch(x){v={error:x}}finally{try{$&&!$.done&&(y=T.return)&&y.call(T)}finally{if(v)throw v.error}}E?S.push(w):w.hide()}}catch(x){g={error:x}}finally{try{_&&!_.done&&(m=b.return)&&m.call(b)}finally{if(g)throw g.error}}},p.prototype.doPopupsOverlap=function(g,m){var v=g.getElement().getBoundingClientRect(),y=m.getElement().getBoundingClientRect();return v.left<y.right&&v.right>y.left&&v.top<y.bottom&&v.bottom>y.top},p}(),f=new l;n.popupManager=f,n.Tooltip=a;var d=function(p){s(g,p);function g(m){m===void 0&&(m=document.body);var v=p.call(this,m)||this;v.timeout=void 0,v.lastT=0,v.idleTime=350,v.lastEvent=void 0,v.onMouseOut=v.onMouseOut.bind(v),v.onMouseMove=v.onMouseMove.bind(v),v.waitForHover=v.waitForHover.bind(v),v.hide=v.hide.bind(v);var y=v.getElement();return y.style.whiteSpace="pre-wrap",y.style.pointerEvents="auto",y.addEventListener("mouseout",v.onMouseOut),y.tabIndex=-1,y.addEventListener("blur",function(){y.contains(document.activeElement)||this.hide()}.bind(v)),v}return g.prototype.addToEditor=function(m){m.on("mousemove",this.onMouseMove),m.on("mousedown",this.hide),m.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},g.prototype.removeFromEditor=function(m){m.off("mousemove",this.onMouseMove),m.off("mousedown",this.hide),m.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},g.prototype.onMouseMove=function(m,v){this.lastEvent=m,this.lastT=Date.now();var y=v.$mouseHandler.isMousePressed;if(this.isOpen){var S=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(S.row,S.column)||y||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||y||(this.lastEvent=m,this.timeout=setTimeout(this.waitForHover,this.idleTime))},g.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var m=Date.now()-this.lastT;if(this.idleTime-m>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-m);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},g.prototype.isOutsideOfText=function(m){var v=m.editor,y=m.getDocumentPosition(),S=v.session.getLine(y.row);if(y.column==S.length){var b=v.renderer.pixelToScreenCoordinates(m.clientX,m.clientY),_=v.session.documentToScreenPosition(y.row,y.column);if(_.column!=b.column||_.row!=b.row)return!0}return!1},g.prototype.setDataProvider=function(m){this.$gatherData=m},g.prototype.showForRange=function(m,v,y,S){if(!(S&&S!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var b=m.renderer;this.isOpen||(f.addPopup(this),this.$registerCloseEvents(),this.setTheme(b.theme)),this.isOpen=!0,this.addMarker(v,m.session),this.range=o.fromPoints(v.start,v.end);var _=this.getElement();_.innerHTML="",_.appendChild(y),_.style.display="block";var w=b.textToScreenCoordinates(v.start.row,v.start.column),E=m.getCursorPosition(),T=_.clientHeight,$=b.scroller.getBoundingClientRect(),C=!0;this.row>E.row?C=!0:this.row<E.row&&(C=!1),w.pageY-T+b.lineHeight<$.top?C=!0:w.pageY+T>$.bottom&&(C=!1),C?w.pageY+=b.lineHeight:w.pageY-=T,_.style.maxWidth=$.width-(w.pageX-$.left)+"px",this.setPosition(w.pageX,w.pageY)}},g.prototype.addMarker=function(m,v){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=v,this.marker=v&&v.addMarker(m,"ace_highlight-marker","text")},g.prototype.hide=function(m){!m&&document.activeElement==this.getElement()||m&&m.target&&(m.type!="keydown"||m.ctrlKey||m.metaKey)&&this.$element.contains(m.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,f.removePopup(this)))},g.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("mousewheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},g.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("mousewheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},g.prototype.onMouseOut=function(m){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&(!m.relatedTarget||m.relatedTarget==this.getElement()||m&&m.currentTarget.contains(m.relatedTarget)||m.relatedTarget.classList.contains("ace_content")||this.hide())},g}(a);n.HoverTooltip=d}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/tooltip","ace/config"],function(i,n,r){var s=this&&this.__extends||function(){var d=function(p,g){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,v){m.__proto__=v}||function(m,v){for(var y in v)Object.prototype.hasOwnProperty.call(v,y)&&(m[y]=v[y])},d(p,g)};return function(p,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");d(p,g);function m(){this.constructor=p}p.prototype=g===null?Object.create(g):(m.prototype=g.prototype,new m)}}(),c=this&&this.__values||function(d){var p=typeof Symbol=="function"&&Symbol.iterator,g=p&&d[p],m=0;if(g)return g.call(d);if(d&&typeof d.length=="number")return{next:function(){return d&&m>=d.length&&(d=void 0),{value:d&&d[m++],done:!d}}};throw new TypeError(p?"Object is not iterable.":"Symbol.iterator is not defined.")},u=i("../lib/dom"),o=i("../lib/event"),h=i("../tooltip").Tooltip,a=i("../config").nls;function l(d){var p=d.editor,g=p.renderer.$gutterLayer,m=new f(p);d.editor.setDefaultHandler("guttermousedown",function(w){if(!(!p.isFocused()||w.getButton()!=0)){var E=g.getRegion(w);if(E!="foldWidgets"){var T=w.getDocumentPosition().row,$=p.session.selection;if(w.getShiftKey())$.selectTo(T,0);else{if(w.domEvent.detail==2)return p.selectAll(),w.preventDefault();d.$clickSelection=p.selection.getLineRange(T)}return d.setState("selectByLines"),d.captureMouse(w),w.preventDefault()}}});var v,y;function S(){var w=y.getDocumentPosition().row,E=p.session.getLength();if(w==E){var T=p.renderer.pixelToScreenCoordinates(0,y.y).row,$=y.$pos;if(T>p.session.documentToScreenRow($.row,$.column))return b()}if(m.showTooltip(w),!!m.isOpen)if(p.on("mousewheel",b),d.$tooltipFollowsMouse)_(y);else{var C=g.$lines.cells[w].element.querySelector("[class*=ace_icon]"),x=C.getBoundingClientRect(),L=m.getElement().style;L.left=x.right+"px",L.top=x.bottom+"px"}}function b(){v&&(v=clearTimeout(v)),m.isOpen&&(m.hide(),p._signal("hideGutterTooltip",m),p.off("mousewheel",b))}function _(w){m.setPosition(w.x,w.y)}d.editor.setDefaultHandler("guttermousemove",function(w){var E=w.domEvent.target||w.domEvent.srcElement;if(u.hasCssClass(E,"ace_fold-widget"))return b();m.isOpen&&d.$tooltipFollowsMouse&&_(w),y=w,!v&&(v=setTimeout(function(){v=null,y&&!d.isMousePressed?S():b()},50))}),o.addListener(p.renderer.$gutter,"mouseout",function(w){y=null,!(!m.isOpen||v)&&(v=setTimeout(function(){v=null,b()},50))},p),p.on("changeSession",b),p.on("input",b)}n.GutterHandler=l;var f=function(d){s(p,d);function p(g){var m=d.call(this,g.container)||this;return m.editor=g,m}return p.prototype.setPosition=function(g,m){var v=window.innerWidth||document.documentElement.clientWidth,y=window.innerHeight||document.documentElement.clientHeight,S=this.getWidth(),b=this.getHeight();g+=15,m+=15,g+S>v&&(g-=g+S-v),m+b>y&&(m-=20+b),h.prototype.setPosition.call(this,g,m)},Object.defineProperty(p,"annotationLabels",{get:function(){return{error:{singular:a("error"),plural:a("errors")},warning:{singular:a("warning"),plural:a("warnings")},info:{singular:a("information message"),plural:a("information messages")}}},enumerable:!1,configurable:!0}),p.prototype.showTooltip=function(g){var m=this.editor.renderer.$gutterLayer,v=m.$annotations[g],y;v?y={text:Array.from(v.text),type:Array.from(v.type)}:y={text:[],type:[]};var S=m.session.getFoldLine(g);if(S&&m.$showFoldedAnnotations){for(var b={error:[],warning:[],info:[]},_,w=g+1;w<=S.end.row;w++)if(!!m.$annotations[w])for(var E=0;E<m.$annotations[w].text.length;E++){var T=m.$annotations[w].type[E];if(b[T].push(m.$annotations[w].text[E]),T==="error"){_="error_fold";continue}if(T==="warning"){_="warning_fold";continue}}if(_==="error_fold"||_==="warning_fold"){var $="".concat(p.annotationsToSummaryString(b)," in folded code.");y.text.push($),y.type.push(_)}}if(y.text.length===0)return this.hide();for(var C={error:[],warning:[],info:[]},x=m.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",w=0;w<y.text.length;w++){var L="<span class='ace_".concat(y.type[w]," ").concat(x,"' aria-label='").concat(p.annotationLabels[y.type[w].replace("_fold","")].singular,"' role=img> </span> ").concat(y.text[w]);C[y.type[w].replace("_fold","")].push(L)}var M=[].concat(C.error,C.warning,C.info).join("<br>");this.setHtml(M),this.setClassName("ace_gutter-tooltip"),this.$element.setAttribute("aria-live","polite"),this.isOpen||this.setTheme(this.editor.renderer.theme),this.editor._signal("showGutterTooltip",this),this.show()},p.annotationsToSummaryString=function(g){var m,v,y=[],S=["error","warning","info"];try{for(var b=c(S),_=b.next();!_.done;_=b.next()){var w=_.value;if(!!g[w].length){var E=g[w].length===1?p.annotationLabels[w].singular:p.annotationLabels[w].plural;y.push("".concat(g[w].length," ").concat(E))}}}catch(T){m={error:T}}finally{try{_&&!_.done&&(v=b.return)&&v.call(b)}finally{if(m)throw m.error}}return y.join(", ")},p}(h);n.GutterTooltip=f}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(i,n,r){var s=i("../lib/event"),c=i("../lib/useragent"),u=function(){function o(h,a){this.domEvent=h,this.editor=a,this.x=this.clientX=h.clientX,this.y=this.clientY=h.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return o.prototype.stopPropagation=function(){s.stopPropagation(this.domEvent),this.propagationStopped=!0},o.prototype.preventDefault=function(){s.preventDefault(this.domEvent),this.defaultPrevented=!0},o.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},o.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},o.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var h=this.editor,a=h.getSelectionRange();if(a.isEmpty())this.$inSelection=!1;else{var l=this.getDocumentPosition();this.$inSelection=a.contains(l.row,l.column)}return this.$inSelection},o.prototype.getButton=function(){return s.getButton(this.domEvent)},o.prototype.getShiftKey=function(){return this.domEvent.shiftKey},o.prototype.getAccelKey=function(){return c.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},o}();n.MouseEvent=u}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(i,n,r){var s=i("../lib/dom"),c=i("../lib/event"),u=i("../lib/useragent"),o=200,h=200,a=5;function l(d){var p=d.editor,g=s.createElement("div");g.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",g.textContent="\xA0";var m=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];m.forEach(function(H){d[H]=this[H]},this),p.on("mousedown",this.onMouseDown.bind(d));var v=p.container,y,S,b,_,w,E,T=0,$,C,x,L,M;this.onDragStart=function(H){if(this.cancelDrag||!v.draggable){var j=this;return setTimeout(function(){j.startSelect(),j.captureMouse(H)},0),H.preventDefault()}w=p.getSelectionRange();var Y=H.dataTransfer;Y.effectAllowed=p.getReadOnly()?"copy":"copyMove",p.container.appendChild(g),Y.setDragImage&&Y.setDragImage(g,0,0),setTimeout(function(){p.container.removeChild(g)}),Y.clearData(),Y.setData("Text",p.session.getTextRange()),C=!0,this.setState("drag")},this.onDragEnd=function(H){if(v.draggable=!1,C=!1,this.setState(null),!p.getReadOnly()){var j=H.dataTransfer.dropEffect;!$&&j=="move"&&p.session.remove(p.getSelectionRange()),p.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(H){if(!(p.getReadOnly()||!U(H.dataTransfer)))return S=H.clientX,b=H.clientY,y||O(),T++,H.dataTransfer.dropEffect=$=q(H),c.preventDefault(H)},this.onDragOver=function(H){if(!(p.getReadOnly()||!U(H.dataTransfer)))return S=H.clientX,b=H.clientY,y||(O(),T++),D!==null&&(D=null),H.dataTransfer.dropEffect=$=q(H),c.preventDefault(H)},this.onDragLeave=function(H){if(T--,T<=0&&y)return N(),$=null,c.preventDefault(H)},this.onDrop=function(H){if(!!E){var j=H.dataTransfer;if(C)switch($){case"move":w.contains(E.row,E.column)?w={start:E,end:E}:w=p.moveText(w,E);break;case"copy":w=p.moveText(w,E,!0);break}else{var Y=j.getData("Text");w={start:E,end:p.session.insert(E,Y)},p.focus(),$=null}return N(),c.preventDefault(H)}},c.addListener(v,"dragstart",this.onDragStart.bind(d),p),c.addListener(v,"dragend",this.onDragEnd.bind(d),p),c.addListener(v,"dragenter",this.onDragEnter.bind(d),p),c.addListener(v,"dragover",this.onDragOver.bind(d),p),c.addListener(v,"dragleave",this.onDragLeave.bind(d),p),c.addListener(v,"drop",this.onDrop.bind(d),p);function A(H,j){var Y=Date.now(),ie=!j||H.row!=j.row,W=!j||H.column!=j.column;if(!L||ie||W)p.moveCursorToPosition(H),L=Y,M={x:S,y:b};else{var K=f(M.x,M.y,S,b);K>a?L=null:Y-L>=h&&(p.renderer.scrollCursorIntoView(),L=null)}}function k(H,j){var Y=Date.now(),ie=p.renderer.layerConfig.lineHeight,W=p.renderer.layerConfig.characterWidth,K=p.renderer.scroller.getBoundingClientRect(),Q={x:{left:S-K.left,right:K.right-S},y:{top:b-K.top,bottom:K.bottom-b}},ne=Math.min(Q.x.left,Q.x.right),de=Math.min(Q.y.top,Q.y.bottom),_e={row:H.row,column:H.column};ne/W<=2&&(_e.column+=Q.x.left<Q.x.right?-3:2),de/ie<=1&&(_e.row+=Q.y.top<Q.y.bottom?-1:1);var I=H.row!=_e.row,R=H.column!=_e.column,F=!j||H.row!=j.row;I||R&&!F?x?Y-x>=o&&p.renderer.scrollCursorIntoView(_e):x=Y:x=null}function P(){var H=E;E=p.renderer.screenToTextCoordinates(S,b),A(E,H),k(E,H)}function O(){w=p.selection.toOrientedRange(),y=p.session.addMarker(w,"ace_selection",p.getSelectionStyle()),p.clearSelection(),p.isFocused()&&p.renderer.$cursorLayer.setBlinking(!1),clearInterval(_),P(),_=setInterval(P,20),T=0,c.addListener(document,"mousemove",B)}function N(){clearInterval(_),p.session.removeMarker(y),y=null,p.selection.fromOrientedRange(w),p.isFocused()&&!C&&p.$resetCursorStyle(),w=null,E=null,T=0,x=null,L=null,c.removeListener(document,"mousemove",B)}var D=null;function B(){D==null&&(D=setTimeout(function(){D!=null&&y&&N()},20))}function U(H){var j=H.types;return!j||Array.prototype.some.call(j,function(Y){return Y=="text/plain"||Y=="Text"})}function q(H){var j=["copy","copymove","all","uninitialized"],Y=["move","copymove","linkmove","all","uninitialized"],ie=u.isMac?H.altKey:H.ctrlKey,W="uninitialized";try{W=H.dataTransfer.effectAllowed.toLowerCase()}catch{}var K="none";return ie&&j.indexOf(W)>=0?K="copy":Y.indexOf(W)>=0?K="move":j.indexOf(W)>=0&&(K="copy"),K}}(function(){this.dragWait=function(){var d=Date.now()-this.mousedownEvent.time;d>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var d=this.editor.container;d.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(d){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var d=this.editor,p=d.container;p.draggable=!0,d.renderer.$cursorLayer.setBlinking(!1),d.setStyle("ace_dragging");var g=u.isWin?"default":"move";d.renderer.setCursorStyle(g),this.setState("dragReady")},this.onMouseDrag=function(d){var p=this.editor.container;if(u.isIE&&this.state=="dragReady"){var g=f(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);g>3&&p.dragDrop()}if(this.state==="dragWait"){var g=f(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);g>0&&(p.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(d){if(!!this.$dragEnabled){this.mousedownEvent=d;var p=this.editor,g=d.inSelection(),m=d.getButton(),v=d.domEvent.detail||1;if(v===1&&m===0&&g){if(d.editor.inMultiSelectMode&&(d.getAccelKey()||d.getShiftKey()))return;this.mousedownEvent.time=Date.now();var y=d.domEvent.target||d.domEvent.srcElement;if("unselectable"in y&&(y.unselectable="on"),p.getDragDelay()){if(u.isWebKit){this.cancelDrag=!0;var S=p.container;S.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(d,this.onMouseDrag.bind(this)),d.defaultPrevented=!0}}}}).call(l.prototype);function f(d,p,g,m){return Math.sqrt(Math.pow(g-d,2)+Math.pow(m-p,2))}n.DragdropHandler=l}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(i,n,r){var s=i("./mouse_event").MouseEvent,c=i("../lib/event"),u=i("../lib/dom");n.addTouchListeners=function(o,h){var a="scroll",l,f,d,p,g,m,v=0,y,S=0,b=0,_=0,w,E;function T(){var A=window.navigator&&window.navigator.clipboard,k=!1,P=function(){var N=h.getCopyText(),D=h.session.getUndoManager().hasUndo();E.replaceChild(u.buildDom(k?["span",!N&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],N&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],N&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],A&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],D&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],["span",{class:"ace_mobile-button",action:"find"},"Find"],["span",{class:"ace_mobile-button",action:"openCommandPallete"},"Palette"]]:["span"]),E.firstChild)},O=function(N){var D=N.target.getAttribute("action");if(D=="more"||!k)return k=!k,P();D=="paste"?A.readText().then(function(B){h.execCommand(D,B)}):D&&((D=="cut"||D=="copy")&&(A?A.writeText(h.getCopyText()):document.execCommand("copy")),h.execCommand(D)),E.firstChild.style.display="none",k=!1,D!="openCommandPallete"&&h.focus()};E=u.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(N){a="menu",N.stopPropagation(),N.preventDefault(),h.textInput.focus()},ontouchend:function(N){N.stopPropagation(),N.preventDefault(),O(N)},onclick:O},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],h.container)}function $(){E||T();var A=h.selection.cursor,k=h.renderer.textToScreenCoordinates(A.row,A.column),P=h.renderer.textToScreenCoordinates(0,0).pageX,O=h.renderer.scrollLeft,N=h.container.getBoundingClientRect();E.style.top=k.pageY-N.top-3+"px",k.pageX-N.left<N.width-70?(E.style.left="",E.style.right="10px"):(E.style.right="",E.style.left=P+O-N.left+"px"),E.style.display="",E.firstChild.style.display="none",h.on("input",C)}function C(A){E&&(E.style.display="none"),h.off("input",C)}function x(){g=null,clearTimeout(g);var A=h.selection.getRange(),k=A.contains(y.row,y.column);(A.isEmpty()||!k)&&(h.selection.moveToPosition(y),h.selection.selectWord()),a="wait",$()}function L(){g=null,clearTimeout(g),h.selection.moveToPosition(y);var A=S>=2?h.selection.getLineRange(y.row):h.session.getBracketRange(y);A&&!A.isEmpty()?h.selection.setRange(A):h.selection.selectWord(),a="wait"}c.addListener(o,"contextmenu",function(A){if(!!w){var k=h.textInput.getElement();k.focus()}},h),c.addListener(o,"touchstart",function(A){var k=A.touches;if(g||k.length>1){clearTimeout(g),g=null,d=-1,a="zoom";return}w=h.$mouseHandler.isMousePressed=!0;var P=h.renderer.layerConfig.lineHeight,O=h.renderer.layerConfig.lineHeight,N=A.timeStamp;p=N;var D=k[0],B=D.clientX,U=D.clientY;Math.abs(l-B)+Math.abs(f-U)>P&&(d=-1),l=A.clientX=B,f=A.clientY=U,b=_=0;var q=new s(A,h);if(y=q.getDocumentPosition(),N-d<500&&k.length==1&&!v)S++,A.preventDefault(),A.button=0,L();else{S=0;var H=h.selection.cursor,j=h.selection.isEmpty()?H:h.selection.anchor,Y=h.renderer.$cursorLayer.getPixelPosition(H,!0),ie=h.renderer.$cursorLayer.getPixelPosition(j,!0),W=h.renderer.scroller.getBoundingClientRect(),K=h.renderer.layerConfig.offset,Q=h.renderer.scrollLeft,ne=function(I,R){return I=I/O,R=R/P-.75,I*I+R*R};if(A.clientX<W.left){a="zoom";return}var de=ne(A.clientX-W.left-Y.left+Q,A.clientY-W.top-Y.top+K),_e=ne(A.clientX-W.left-ie.left+Q,A.clientY-W.top-ie.top+K);de<3.5&&_e<3.5&&(a=de>_e?"cursor":"anchor"),_e<3.5?a="anchor":de<3.5?a="cursor":a="scroll",g=setTimeout(x,450)}d=N},h),c.addListener(o,"touchend",function(A){w=h.$mouseHandler.isMousePressed=!1,m&&clearInterval(m),a=="zoom"?(a="",v=0):g?(h.selection.moveToPosition(y),v=0,$()):a=="scroll"?(M(),C()):$(),clearTimeout(g),g=null},h),c.addListener(o,"touchmove",function(A){g&&(clearTimeout(g),g=null);var k=A.touches;if(!(k.length>1||a=="zoom")){var P=k[0],O=l-P.clientX,N=f-P.clientY;if(a=="wait")if(O*O+N*N>4)a="cursor";else return A.preventDefault();l=P.clientX,f=P.clientY,A.clientX=P.clientX,A.clientY=P.clientY;var D=A.timeStamp,B=D-p;if(p=D,a=="scroll"){var U=new s(A,h);U.speed=1,U.wheelX=O,U.wheelY=N,10*Math.abs(O)<Math.abs(N)&&(O=0),10*Math.abs(N)<Math.abs(O)&&(N=0),B!=0&&(b=O/B,_=N/B),h._emit("mousewheel",U),U.propagationStopped||(b=_=0)}else{var q=new s(A,h),H=q.getDocumentPosition();a=="cursor"?h.selection.moveCursorToPosition(H):a=="anchor"&&h.selection.setSelectionAnchor(H.row,H.column),h.renderer.scrollCursorIntoView(H),A.preventDefault()}}},h);function M(){v+=60,m=setInterval(function(){v--<=0&&(clearInterval(m),m=null),Math.abs(b)<.01&&(b=0),Math.abs(_)<.01&&(_=0),v<20&&(b=.9*b),v<20&&(_=.9*_);var A=h.session.getScrollTop();h.renderer.scrollBy(10*b,10*_),A==h.session.getScrollTop()&&(v=0)},10)}}}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"],function(i,n,r){var s=i("../lib/event"),c=i("../lib/useragent"),u=i("./default_handlers").DefaultHandlers,o=i("./default_gutter_handler").GutterHandler,h=i("./mouse_event").MouseEvent,a=i("./dragdrop_handler").DragdropHandler,l=i("./touch_handler").addTouchListeners,f=i("../config"),d=function(){function p(g){var m=this;this.editor=g,new u(this),new o(this),new a(this);var v=function(b){var _=!document.hasFocus||!document.hasFocus()||!g.isFocused()&&document.activeElement==(g.textInput&&g.textInput.getElement());_&&window.focus(),g.focus(),setTimeout(function(){g.isFocused()||g.focus()})},y=g.renderer.getMouseEventTarget();s.addListener(y,"click",this.onMouseEvent.bind(this,"click"),g),s.addListener(y,"mousemove",this.onMouseMove.bind(this,"mousemove"),g),s.addMultiMouseDownListener([y,g.renderer.scrollBarV&&g.renderer.scrollBarV.inner,g.renderer.scrollBarH&&g.renderer.scrollBarH.inner,g.textInput&&g.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",g),s.addMouseWheelListener(g.container,this.onMouseWheel.bind(this,"mousewheel"),g),l(g.container,g);var S=g.renderer.$gutter;s.addListener(S,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),g),s.addListener(S,"click",this.onMouseEvent.bind(this,"gutterclick"),g),s.addListener(S,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),g),s.addListener(S,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),g),s.addListener(y,"mousedown",v,g),s.addListener(S,"mousedown",v,g),c.isIE&&g.renderer.scrollBarV&&(s.addListener(g.renderer.scrollBarV.element,"mousedown",v,g),s.addListener(g.renderer.scrollBarH.element,"mousedown",v,g)),g.on("mousemove",function(b){if(!(m.state||m.$dragDelay||!m.$dragEnabled)){var _=g.renderer.screenToTextCoordinates(b.x,b.y),w=g.session.selection.getRange(),E=g.renderer;!w.isEmpty()&&w.insideStart(_.row,_.column)?E.setCursorStyle("default"):E.setCursorStyle("")}},g)}return p.prototype.onMouseEvent=function(g,m){!this.editor.session||this.editor._emit(g,new h(m,this.editor))},p.prototype.onMouseMove=function(g,m){var v=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!v||!v.length||this.editor._emit(g,new h(m,this.editor))},p.prototype.onMouseWheel=function(g,m){var v=new h(m,this.editor);v.speed=this.$scrollSpeed*2,v.wheelX=m.wheelX,v.wheelY=m.wheelY,this.editor._emit(g,v)},p.prototype.setState=function(g){this.state=g},p.prototype.captureMouse=function(g,m){this.x=g.x,this.y=g.y,this.isMousePressed=!0;var v=this.editor,y=this.editor.renderer;y.$isMousePressed=!0;var S=this,b=function($){if(!!$){if(c.isWebKit&&!$.which&&S.releaseMouse)return S.releaseMouse();S.x=$.clientX,S.y=$.clientY,m&&m($),S.mouseEvent=new h($,S.editor),S.$mouseMoved=!0}},_=function($){v.off("beforeEndOperation",E),clearInterval(T),v.session&&w(),S[S.state+"End"]&&S[S.state+"End"]($),S.state="",S.isMousePressed=y.$isMousePressed=!1,y.$keepTextAreaAtCursor&&y.$moveTextAreaToCursor(),S.$onCaptureMouseMove=S.releaseMouse=null,$&&S.onMouseEvent("mouseup",$),v.endOperation()},w=function(){S[S.state]&&S[S.state](),S.$mouseMoved=!1};if(c.isOldIE&&g.domEvent.type=="dblclick")return setTimeout(function(){_(g)});var E=function($){!S.releaseMouse||v.curOp.command.name&&v.curOp.selectionChanged&&(S[S.state+"End"]&&S[S.state+"End"](),S.state="",S.releaseMouse())};v.on("beforeEndOperation",E),v.startOperation({command:{name:"mouse"}}),S.$onCaptureMouseMove=b,S.releaseMouse=s.capture(this.editor.container,b,_);var T=setInterval(w,20)},p.prototype.cancelContextMenu=function(){var g=function(m){m&&m.domEvent&&m.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",g),m&&m.domEvent&&s.stopEvent(m.domEvent))}.bind(this);setTimeout(g,10),this.editor.on("nativecontextmenu",g)},p.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse()},p}();d.prototype.releaseMouse=null,f.defineOptions(d.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:c.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),n.MouseHandler=d}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(i,n,r){var s=i("../lib/dom"),c=function(){function u(o){o.on("click",function(h){var a=h.getDocumentPosition(),l=o.session,f=l.getFoldAt(a.row,a.column,1);f&&(h.getAccelKey()?l.removeFold(f):l.expandFold(f),h.stop());var d=h.domEvent&&h.domEvent.target;d&&s.hasCssClass(d,"ace_inline_button")&&s.hasCssClass(d,"ace_toggle_wrap")&&(l.setOption("wrap",!l.getUseWrapMode()),o.renderer.scrollCursorIntoView())}),o.on("gutterclick",function(h){var a=o.renderer.$gutterLayer.getRegion(h);if(a=="foldWidgets"){var l=h.getDocumentPosition().row,f=o.session;f.foldWidgets&&f.foldWidgets[l]&&o.session.onFoldWidgetClick(l,h),o.isFocused()||o.focus(),h.stop()}}),o.on("gutterdblclick",function(h){var a=o.renderer.$gutterLayer.getRegion(h);if(a=="foldWidgets"){var l=h.getDocumentPosition().row,f=o.session,d=f.getParentFoldRangeData(l,!0),p=d.range||d.firstRange;if(p){l=p.start.row;var g=f.getFoldAt(l,f.getLine(l).length,1);g?f.removeFold(g):(f.addFold("...",p),o.renderer.scrollCursorIntoView({row:p.start.row,column:0}))}h.stop()}})}return u}();n.FoldHandler=c}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(i,n,r){var s=i("../lib/keys"),c=i("../lib/event"),u=function(){function o(h){this.$editor=h,this.$data={editor:h},this.$handlers=[],this.setDefaultHandler(h.commands)}return o.prototype.setDefaultHandler=function(h){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=h,this.addKeyboardHandler(h,0)},o.prototype.setKeyboardHandler=function(h){var a=this.$handlers;if(a[a.length-1]!=h){for(;a[a.length-1]&&a[a.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(a[a.length-1]);this.addKeyboardHandler(h,1)}},o.prototype.addKeyboardHandler=function(h,a){if(!!h){typeof h=="function"&&!h.handleKeyboard&&(h.handleKeyboard=h);var l=this.$handlers.indexOf(h);l!=-1&&this.$handlers.splice(l,1),a==null?this.$handlers.push(h):this.$handlers.splice(a,0,h),l==-1&&h.attach&&h.attach(this.$editor)}},o.prototype.removeKeyboardHandler=function(h){var a=this.$handlers.indexOf(h);return a==-1?!1:(this.$handlers.splice(a,1),h.detach&&h.detach(this.$editor),!0)},o.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},o.prototype.getStatusText=function(){var h=this.$data,a=h.editor;return this.$handlers.map(function(l){return l.getStatusText&&l.getStatusText(a,h)||""}).filter(Boolean).join(" ")},o.prototype.$callKeyboardHandlers=function(h,a,l,f){for(var d,p=!1,g=this.$editor.commands,m=this.$handlers.length;m--&&(d=this.$handlers[m].handleKeyboard(this.$data,h,a,l,f),!(!(!d||!d.command)&&(d.command=="null"?p=!0:p=g.exec(d.command,this.$editor,d.args,f),p&&f&&h!=-1&&d.passEvent!=!0&&d.command.passEvent!=!0&&c.stopEvent(f),p))););return!p&&h==-1&&(d={command:"insertstring"},p=g.exec("insertstring",this.$editor,a)),p&&this.$editor._signal&&this.$editor._signal("keyboardActivity",d),p},o.prototype.onCommandKey=function(h,a,l){var f=s.keyCodeToString(l);return this.$callKeyboardHandlers(a,f,l,h)},o.prototype.onTextInput=function(h){return this.$callKeyboardHandlers(-1,h)},o}();n.KeyBinding=u}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(i,n,r){var s=0,c=0,u=!1,o=!1,h=!1,a=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],l=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],f=0,d=1,p=0,g=1,m=2,v=3,y=4,S=5,b=6,_=7,w=8,E=9,T=10,$=11,C=12,x=13,L=14,M=15,A=16,k=17,P=18,O=[P,P,P,P,P,P,P,P,P,b,S,b,w,S,P,P,P,P,P,P,P,P,P,P,P,P,P,P,S,S,S,b,w,y,y,$,$,$,y,y,y,y,y,T,E,T,E,E,m,m,m,m,m,m,m,m,m,m,E,y,y,y,y,y,y,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,y,y,y,y,y,y,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,y,y,y,y,P,P,P,P,P,P,S,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,E,y,$,$,$,$,y,y,y,y,p,y,y,P,y,y,$,$,m,m,y,p,y,y,y,m,p,y,y,y,y,y],N=[w,w,w,w,w,w,w,w,w,w,w,P,P,P,p,g,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,w,S,x,L,M,A,k,E,$,$,$,$,$,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,E,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,w];function D(H,j,Y,ie){var W=s?l:a,K=null,Q=null,ne=null,de=0,_e=null,I=null,R=-1,F=null,G=null,X=[];if(!ie)for(F=0,ie=[];F<Y;F++)ie[F]=q(H[F]);for(c=s,u=!1,o=!1,h=!1,G=0;G<Y;G++){if(K=de,X[G]=Q=U(H,ie,X,G),de=W[K][Q],_e=de&240,de&=15,j[G]=ne=W[de][5],_e>0)if(_e==16){for(F=R;F<G;F++)j[F]=1;R=-1}else R=-1;if(I=W[de][6],I)R==-1&&(R=G);else if(R>-1){for(F=R;F<G;F++)j[F]=ne;R=-1}ie[G]==S&&(j[G]=0),c|=ne}if(h){for(F=0;F<Y;F++)if(ie[F]==b){j[F]=s;for(var re=F-1;re>=0&&ie[re]==w;re--)j[re]=s}}}function B(H,j,Y){if(!(c<H)){if(H==1&&s==d&&!o){Y.reverse();return}for(var ie=Y.length,W=0,K,Q,ne,de;W<ie;){if(j[W]>=H){for(K=W+1;K<ie&&j[K]>=H;)K++;for(Q=W,ne=K-1;Q<ne;Q++,ne--)de=Y[Q],Y[Q]=Y[ne],Y[ne]=de;W=K}W++}}}function U(H,j,Y,ie){var W=j[ie],K,Q,ne,de;switch(W){case p:case g:u=!1;case y:case v:return W;case m:return u?v:m;case _:return u=!0,g;case w:return y;case E:return ie<1||ie+1>=j.length||(K=Y[ie-1])!=m&&K!=v||(Q=j[ie+1])!=m&&Q!=v?y:(u&&(Q=v),Q==K?Q:y);case T:return K=ie>0?Y[ie-1]:S,K==m&&ie+1<j.length&&j[ie+1]==m?m:y;case $:if(ie>0&&Y[ie-1]==m)return m;if(u)return y;for(de=ie+1,ne=j.length;de<ne&&j[de]==$;)de++;return de<ne&&j[de]==m?m:y;case C:for(ne=j.length,de=ie+1;de<ne&&j[de]==C;)de++;if(de<ne){var _e=H[ie],I=_e>=1425&&_e<=2303||_e==64286;if(K=j[de],I&&(K==g||K==_))return g}return ie<1||(K=j[ie-1])==S?y:Y[ie-1];case S:return u=!1,o=!0,s;case b:return h=!0,y;case x:case L:case A:case k:case M:u=!1;case P:return y}}function q(H){var j=H.charCodeAt(0),Y=j>>8;return Y==0?j>191?p:O[j]:Y==5?/[\u0591-\u05f4]/.test(H)?g:p:Y==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(H)?C:/[\u0660-\u0669\u066b-\u066c]/.test(H)?v:j==1642?$:/[\u06f0-\u06f9]/.test(H)?m:_:Y==32&&j<=8287?N[j&255]:Y==254&&j>=65136?_:y}n.L=p,n.R=g,n.EN=m,n.ON_R=3,n.AN=4,n.R_H=5,n.B=6,n.RLE=7,n.DOT="\xB7",n.doBidiReorder=function(H,j,Y){if(H.length<2)return{};var ie=H.split(""),W=new Array(ie.length),K=new Array(ie.length),Q=[];s=Y?d:f,D(ie,Q,ie.length,j);for(var ne=0;ne<W.length;W[ne]=ne,ne++);B(2,Q,W),B(1,Q,W);for(var ne=0;ne<W.length-1;ne++)j[ne]===v?Q[ne]=n.AN:Q[ne]===g&&(j[ne]>_&&j[ne]<x||j[ne]===y||j[ne]===P)?Q[ne]=n.ON_R:ne>0&&ie[ne-1]==="\u0644"&&/\u0622|\u0623|\u0625|\u0627/.test(ie[ne])&&(Q[ne-1]=Q[ne]=n.R_H,ne++);ie[ie.length-1]===n.DOT&&(Q[ie.length-1]=n.B),ie[0]==="\u202B"&&(Q[0]=n.RLE);for(var ne=0;ne<W.length;ne++)K[ne]=Q[W[ne]];return{logicalFromVisual:W,bidiLevels:K}},n.hasBidiCharacters=function(H,j){for(var Y=!1,ie=0;ie<H.length;ie++)j[ie]=q(H.charAt(ie)),!Y&&(j[ie]==g||j[ie]==_||j[ie]==v)&&(Y=!0);return Y},n.getVisualFromLogicalIdx=function(H,j){for(var Y=0;Y<j.logicalFromVisual.length;Y++)if(j.logicalFromVisual[Y]==H)return Y;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(i,n,r){var s=i("./lib/bidiutil"),c=i("./lib/lang"),u=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,o=function(){function h(a){this.session=a,this.bidiMap={},this.currentRow=null,this.bidiUtil=s,this.charWidths=[],this.EOL="\xAC",this.showInvisibles=!0,this.isRtlDir=!1,this.$isRtl=!1,this.line="",this.wrapIndent=0,this.EOF="\xB6",this.RLE="\u202B",this.contentWidth=0,this.fontMetrics=null,this.rtlLineOffset=0,this.wrapOffset=0,this.isMoveLeftOperation=!1,this.seenBidi=u.test(a.getValue())}return h.prototype.isBidiRow=function(a,l,f){return this.seenBidi?(a!==this.currentRow&&(this.currentRow=a,this.updateRowLine(l,f),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},h.prototype.onChange=function(a){this.seenBidi?this.currentRow=null:a.action=="insert"&&u.test(a.lines.join(`
`))&&(this.seenBidi=!0,this.currentRow=null)},h.prototype.getDocumentRow=function(){var a=0,l=this.session.$screenRowCache;if(l.length){var f=this.session.$getRowCacheIndex(l,this.currentRow);f>=0&&(a=this.session.$docRowCache[f])}return a},h.prototype.getSplitIndex=function(){var a=0,l=this.session.$screenRowCache;if(l.length)for(var f,d=this.session.$getRowCacheIndex(l,this.currentRow);this.currentRow-a>0&&(f=this.session.$getRowCacheIndex(l,this.currentRow-a-1),f===d);)d=f,a++;else a=this.currentRow;return a},h.prototype.updateRowLine=function(a,l){a===void 0&&(a=this.getDocumentRow());var f=a===this.session.getLength()-1,d=f?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(a),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var p=this.session.$wrapData[a];p&&(l===void 0&&(l=this.getSplitIndex()),l>0&&p.length?(this.wrapIndent=p.indent,this.wrapOffset=this.wrapIndent*this.charWidths[s.L],this.line=l<p.length?this.line.substring(p[l-1],p[l]):this.line.substring(p[p.length-1])):this.line=this.line.substring(0,p[l]),l==p.length&&(this.line+=this.showInvisibles?d:s.DOT))}else this.line+=this.showInvisibles?d:s.DOT;var g=this.session,m=0,v;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(y,S){return y==="	"||g.isFullWidth(y.charCodeAt(0))?(v=y==="	"?g.getScreenTabSize(S+m):2,m+=v-1,c.stringRepeat(s.DOT,v)):y}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==s.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},h.prototype.updateBidiMap=function(){var a=[];s.hasBidiCharacters(this.line,a)||this.isRtlDir?this.bidiMap=s.doBidiReorder(this.line,a,this.isRtlDir):this.bidiMap={}},h.prototype.markAsDirty=function(){this.currentRow=null},h.prototype.updateCharacterWidths=function(a){if(this.characterWidth!==a.$characterSize.width){this.fontMetrics=a;var l=this.characterWidth=a.$characterSize.width,f=a.$measureCharWidth("\u05D4");this.charWidths[s.L]=this.charWidths[s.EN]=this.charWidths[s.ON_R]=l,this.charWidths[s.R]=this.charWidths[s.AN]=f,this.charWidths[s.R_H]=f*.45,this.charWidths[s.B]=this.charWidths[s.RLE]=0,this.currentRow=null}},h.prototype.setShowInvisibles=function(a){this.showInvisibles=a,this.currentRow=null},h.prototype.setEolChar=function(a){this.EOL=a},h.prototype.setContentWidth=function(a){this.contentWidth=a},h.prototype.isRtlLine=function(a){return this.$isRtl?!0:a!=null?this.session.getLine(a).charAt(0)==this.RLE:this.isRtlDir},h.prototype.setRtlDirection=function(a,l){for(var f=a.getCursorPosition(),d=a.selection.getSelectionAnchor().row;d<=f.row;d++)!l&&a.session.getLine(d).charAt(0)===a.session.$bidiHandler.RLE?a.session.doc.removeInLine(d,0,1):l&&a.session.getLine(d).charAt(0)!==a.session.$bidiHandler.RLE&&a.session.doc.insert({column:0,row:d},a.session.$bidiHandler.RLE)},h.prototype.getPosLeft=function(a){a-=this.wrapIndent;var l=this.line.charAt(0)===this.RLE?1:0,f=a>l?this.session.getOverwrite()?a:a-1:l,d=s.getVisualFromLogicalIdx(f,this.bidiMap),p=this.bidiMap.bidiLevels,g=0;!this.session.getOverwrite()&&a<=l&&p[d]%2!==0&&d++;for(var m=0;m<d;m++)g+=this.charWidths[p[m]];return!this.session.getOverwrite()&&a>l&&p[d]%2===0&&(g+=this.charWidths[p[d]]),this.wrapIndent&&(g+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(g+=this.rtlLineOffset),g},h.prototype.getSelections=function(a,l){var f=this.bidiMap,d=f.bidiLevels,p,g=[],m=0,v=Math.min(a,l)-this.wrapIndent,y=Math.max(a,l)-this.wrapIndent,S=!1,b=!1,_=0;this.wrapIndent&&(m+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var w,E=0;E<d.length;E++)w=f.logicalFromVisual[E],p=d[E],S=w>=v&&w<y,S&&!b?_=m:!S&&b&&g.push({left:_,width:m-_}),m+=this.charWidths[p],b=S;if(S&&E===d.length&&g.push({left:_,width:m-_}),this.isRtlDir)for(var T=0;T<g.length;T++)g[T].left+=this.rtlLineOffset;return g},h.prototype.offsetToCol=function(f){this.isRtlDir&&(f-=this.rtlLineOffset);var l=0,f=Math.max(f,0),d=0,p=0,g=this.bidiMap.bidiLevels,m=this.charWidths[g[p]];for(this.wrapIndent&&(f-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);f>d+m/2;){if(d+=m,p===g.length-1){m=0;break}m=this.charWidths[g[++p]]}return p>0&&g[p-1]%2!==0&&g[p]%2===0?(f<d&&p--,l=this.bidiMap.logicalFromVisual[p]):p>0&&g[p-1]%2===0&&g[p]%2!==0?l=1+(f>d?this.bidiMap.logicalFromVisual[p]:this.bidiMap.logicalFromVisual[p-1]):this.isRtlDir&&p===g.length-1&&m===0&&g[p-1]%2===0||!this.isRtlDir&&p===0&&g[p]%2!==0?l=1+this.bidiMap.logicalFromVisual[p]:(p>0&&g[p-1]%2!==0&&m!==0&&p--,l=this.bidiMap.logicalFromVisual[p]),l===0&&this.isRtlDir&&l++,l+this.wrapIndent},h}();n.BidiHandler=o}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(i,n,r){var s=i("./lib/oop"),c=i("./lib/lang"),u=i("./lib/event_emitter").EventEmitter,o=i("./range").Range,h=function(a){this.session=a,this.doc=a.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var l=this;this.cursor.on("change",function(f){l.$cursorChanged=!0,l.$silent||l._emit("changeCursor"),!l.$isEmpty&&!l.$silent&&l._emit("changeSelection"),!l.$keepDesiredColumnOnChange&&f.old.column!=f.value.column&&(l.$desiredColumn=null)}),this.anchor.on("change",function(){l.$anchorChanged=!0,!l.$isEmpty&&!l.$silent&&l._emit("changeSelection")})};(function(){s.implement(this,u),this.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},this.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},this.getCursor=function(){return this.lead.getPosition()},this.setAnchor=function(a,l){this.$isEmpty=!1,this.anchor.setPosition(a,l)},this.setSelectionAnchor=this.setAnchor,this.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},this.getSelectionAnchor=this.getAnchor,this.getSelectionLead=function(){return this.lead.getPosition()},this.isBackwards=function(){var a=this.anchor,l=this.lead;return a.row>l.row||a.row==l.row&&a.column>l.column},this.getRange=function(){var a=this.anchor,l=this.lead;return this.$isEmpty?o.fromPoints(l,l):this.isBackwards()?o.fromPoints(l,a):o.fromPoints(a,l)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},this.setRange=this.setSelectionRange=function(a,l){var f=l?a.end:a.start,d=l?a.start:a.end;this.$setSelection(f.row,f.column,d.row,d.column)},this.$setSelection=function(a,l,f,d){if(!this.$silent){var p=this.$isEmpty,g=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(a,l),this.cursor.setPosition(f,d),this.$isEmpty=!o.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||p!=this.$isEmpty||g)&&this._emit("changeSelection")}},this.$moveSelection=function(a){var l=this.lead;this.$isEmpty&&this.setSelectionAnchor(l.row,l.column),a.call(this)},this.selectTo=function(a,l){this.$moveSelection(function(){this.moveCursorTo(a,l)})},this.selectToPosition=function(a){this.$moveSelection(function(){this.moveCursorToPosition(a)})},this.moveTo=function(a,l){this.clearSelection(),this.moveCursorTo(a,l)},this.moveToPosition=function(a){this.clearSelection(),this.moveCursorToPosition(a)},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(a,l){if(typeof l>"u"){var f=a||this.lead;a=f.row,l=f.column}return this.session.getWordRange(a,l)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var a=this.getCursor(),l=this.session.getAWordRange(a.row,a.column);this.setSelectionRange(l)},this.getLineRange=function(a,l){var f=typeof a=="number"?a:this.lead.row,d,p=this.session.getFoldLine(f);return p?(f=p.start.row,d=p.end.row):d=f,l===!0?new o(f,0,d,this.session.getLine(d).length):new o(f,0,d+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.wouldMoveIntoSoftTab=function(a,l,f){var d=a.column,p=a.column+l;return f<0&&(d=a.column-l,p=a.column),this.session.isTabStop(a)&&this.doc.getLine(a.row).slice(d,p).split(" ").length-1==l},this.moveCursorLeft=function(){var a=this.lead.getPosition(),l;if(l=this.session.getFoldAt(a.row,a.column,-1))this.moveCursorTo(l.start.row,l.start.column);else if(a.column===0)a.row>0&&this.moveCursorTo(a.row-1,this.doc.getLine(a.row-1).length);else{var f=this.session.getTabSize();this.wouldMoveIntoSoftTab(a,f,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-f):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var a=this.lead.getPosition(),l;if(l=this.session.getFoldAt(a.row,a.column,1))this.moveCursorTo(l.end.row,l.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var f=this.session.getTabSize(),a=this.lead;this.wouldMoveIntoSoftTab(a,f,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,f):this.moveCursorBy(0,1)}},this.moveCursorLineStart=function(){var a=this.lead.row,l=this.lead.column,f=this.session.documentToScreenRow(a,l),d=this.session.screenToDocumentPosition(f,0),p=this.session.getDisplayLine(a,null,d.row,d.column),g=p.match(/^\s*/);g[0].length!=l&&!this.session.$useEmacsStyleLineStart&&(d.column+=g[0].length),this.moveCursorToPosition(d)},this.moveCursorLineEnd=function(){var a=this.lead,l=this.session.getDocumentLastRowColumnPosition(a.row,a.column);if(this.lead.column==l.column){var f=this.session.getLine(l.row);if(l.column==f.length){var d=f.search(/\s+$/);d>0&&(l.column=d)}}this.moveCursorTo(l.row,l.column)},this.moveCursorFileEnd=function(){var a=this.doc.getLength()-1,l=this.doc.getLine(a).length;this.moveCursorTo(a,l)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var a=this.lead.row,l=this.lead.column,f=this.doc.getLine(a),d=f.substring(l);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var p=this.session.getFoldAt(a,l,1);if(p){this.moveCursorTo(p.end.row,p.end.column);return}if(this.session.nonTokenRe.exec(d)&&(l+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,d=f.substring(l)),l>=f.length){this.moveCursorTo(a,f.length),this.moveCursorRight(),a<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(d)&&(l+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(a,l)},this.moveCursorLongWordLeft=function(){var a=this.lead.row,l=this.lead.column,f;if(f=this.session.getFoldAt(a,l,-1)){this.moveCursorTo(f.start.row,f.start.column);return}var d=this.session.getFoldStringAt(a,l,-1);d==null&&(d=this.doc.getLine(a).substring(0,l));var p=c.stringReverse(d);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(p)&&(l-=this.session.nonTokenRe.lastIndex,p=p.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),l<=0){this.moveCursorTo(a,0),this.moveCursorLeft(),a>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(p)&&(l-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(a,l)},this.$shortWordEndIndex=function(a){var l=0,f,d=/\s/,p=this.session.tokenRe;if(p.lastIndex=0,this.session.tokenRe.exec(a))l=this.session.tokenRe.lastIndex;else{for(;(f=a[l])&&d.test(f);)l++;if(l<1){for(p.lastIndex=0;(f=a[l])&&!p.test(f);)if(p.lastIndex=0,l++,d.test(f))if(l>2){l--;break}else{for(;(f=a[l])&&d.test(f);)l++;if(l>2)break}}}return p.lastIndex=0,l},this.moveCursorShortWordRight=function(){var a=this.lead.row,l=this.lead.column,f=this.doc.getLine(a),d=f.substring(l),p=this.session.getFoldAt(a,l,1);if(p)return this.moveCursorTo(p.end.row,p.end.column);if(l==f.length){var g=this.doc.getLength();do a++,d=this.doc.getLine(a);while(a<g&&/^\s*$/.test(d));/^\s+/.test(d)||(d=""),l=0}var m=this.$shortWordEndIndex(d);this.moveCursorTo(a,l+m)},this.moveCursorShortWordLeft=function(){var a=this.lead.row,l=this.lead.column,f;if(f=this.session.getFoldAt(a,l,-1))return this.moveCursorTo(f.start.row,f.start.column);var d=this.session.getLine(a).substring(0,l);if(l===0){do a--,d=this.doc.getLine(a);while(a>0&&/^\s*$/.test(d));l=d.length,/\s+$/.test(d)||(d="")}var p=c.stringReverse(d),g=this.$shortWordEndIndex(p);return this.moveCursorTo(a,l-g)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(a,l){var f=this.session.documentToScreenPosition(this.lead.row,this.lead.column),d;if(l===0&&(a!==0&&(this.session.$bidiHandler.isBidiRow(f.row,this.lead.row)?(d=this.session.$bidiHandler.getPosLeft(f.column),f.column=Math.round(d/this.session.$bidiHandler.charWidths[0])):d=f.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?f.column=this.$desiredColumn:this.$desiredColumn=f.column),a!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var p=this.session.lineWidgets[this.lead.row];a<0?a-=p.rowsAbove||0:a>0&&(a+=p.rowCount-(p.rowsAbove||0))}var g=this.session.screenToDocumentPosition(f.row+a,f.column,d);a!==0&&l===0&&g.row===this.lead.row&&(g.column,this.lead.column),this.moveCursorTo(g.row,g.column+l,l===0)},this.moveCursorToPosition=function(a){this.moveCursorTo(a.row,a.column)},this.moveCursorTo=function(a,l,f){var d=this.session.getFoldAt(a,l,1);d&&(a=d.start.row,l=d.start.column),this.$keepDesiredColumnOnChange=!0;var p=this.session.getLine(a);/[\uDC00-\uDFFF]/.test(p.charAt(l))&&p.charAt(l-1)&&(this.lead.row==a&&this.lead.column==l+1?l=l-1:l=l+1),this.lead.setPosition(a,l),this.$keepDesiredColumnOnChange=!1,f||(this.$desiredColumn=null)},this.moveCursorToScreen=function(a,l,f){var d=this.session.screenToDocumentPosition(a,l);this.moveCursorTo(d.row,d.column,f)},this.detach=function(){this.lead.detach(),this.anchor.detach()},this.fromOrientedRange=function(a){this.setSelectionRange(a,a.cursor==a.start),this.$desiredColumn=a.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(a){var l=this.getRange();return a?(a.start.column=l.start.column,a.start.row=l.start.row,a.end.column=l.end.column,a.end.row=l.end.row):a=l,a.cursor=this.isBackwards()?a.start:a.end,a.desiredColumn=this.$desiredColumn,a},this.getRangeOfMovements=function(a){var l=this.getCursor();try{a(this);var f=this.getCursor();return o.fromPoints(l,f)}catch{return o.fromPoints(l,l)}finally{this.moveCursorToPosition(l)}},this.toJSON=function(){if(this.rangeCount)var a=this.ranges.map(function(l){var f=l.clone();return f.isBackwards=l.cursor==l.start,f});else{var a=this.getRange();a.isBackwards=this.isBackwards()}return a},this.fromJSON=function(a){if(a.start==null)if(this.rangeList&&a.length>1){this.toSingleRange(a[0]);for(var l=a.length;l--;){var f=o.fromPoints(a[l].start,a[l].end);a[l].isBackwards&&(f.cursor=f.start),this.addRange(f,!0)}return}else a=a[0];this.rangeList&&this.toSingleRange(a),this.setSelectionRange(a,a.isBackwards)},this.isEqual=function(a){if((a.length||this.rangeCount)&&a.length!=this.rangeCount)return!1;if(!a.length||!this.ranges)return this.getRange().isEqual(a);for(var l=this.ranges.length;l--;)if(!this.ranges[l].isEqual(a[l]))return!1;return!0}}).call(h.prototype),n.Selection=h}),ace.define("ace/tokenizer",["require","exports","module","ace/config"],function(i,n,r){var s=i("./config"),c=2e3,u=function(){function o(h){this.states=h,this.regExps={},this.matchMappings={};for(var a in this.states){for(var l=this.states[a],f=[],d=0,p=this.matchMappings[a]={defaultToken:"text"},g="g",m=[],v=0;v<l.length;v++){var y=l[v];if(y.defaultToken&&(p.defaultToken=y.defaultToken),y.caseInsensitive&&g.indexOf("i")===-1&&(g+="i"),y.unicode&&g.indexOf("u")===-1&&(g+="u"),y.regex!=null){y.regex instanceof RegExp&&(y.regex=y.regex.toString().slice(1,-1));var S=y.regex,b=new RegExp("(?:("+S+")|(.))").exec("a").length-2;Array.isArray(y.token)?y.token.length==1||b==1?y.token=y.token[0]:b-1!=y.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:y,groupCount:b-1}),y.token=y.token[0]):(y.tokenArray=y.token,y.token=null,y.onMatch=this.$arrayTokens):typeof y.token=="function"&&!y.onMatch&&(b>1?y.onMatch=this.$applyToken:y.onMatch=y.token),b>1&&(/\\\d/.test(y.regex)?S=y.regex.replace(/\\([0-9]+)/g,function(_,w){return"\\"+(parseInt(w,10)+d+1)}):(b=1,S=this.removeCapturingGroups(y.regex)),!y.splitRegex&&typeof y.token!="string"&&m.push(y)),p[d]=v,d+=b,f.push(S),y.onMatch||(y.onMatch=null)}}f.length||(p[0]=0,f.push("$")),m.forEach(function(_){_.splitRegex=this.createSplitterRegexp(_.regex,g)},this),this.regExps[a]=new RegExp("("+f.join(")|(")+")|($)",g)}}return o.prototype.$setMaxTokenCount=function(h){c=h|0},o.prototype.$applyToken=function(h){var a=this.splitRegex.exec(h).slice(1),l=this.token.apply(this,a);if(typeof l=="string")return[{type:l,value:h}];for(var f=[],d=0,p=l.length;d<p;d++)a[d]&&(f[f.length]={type:l[d],value:a[d]});return f},o.prototype.$arrayTokens=function(h){if(!h)return[];var a=this.splitRegex.exec(h);if(!a)return"text";for(var l=[],f=this.tokenArray,d=0,p=f.length;d<p;d++)a[d+1]&&(l[l.length]={type:f[d],value:a[d+1]});return l},o.prototype.removeCapturingGroups=function(h){var a=h.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(l,f){return f?"(?:":l});return a},o.prototype.createSplitterRegexp=function(h,a){if(h.indexOf("(?=")!=-1){var l=0,f=!1,d={};h.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(p,g,m,v,y,S){return f?f=y!="]":y?f=!0:v?(l==d.stack&&(d.end=S+1,d.stack=-1),l--):m&&(l++,m.length!=1&&(d.stack=l,d.start=S)),p}),d.end!=null&&/^\)*$/.test(h.substr(d.end))&&(h=h.substring(0,d.start)+h.substr(d.end))}return h.charAt(0)!="^"&&(h="^"+h),h.charAt(h.length-1)!="$"&&(h+="$"),new RegExp(h,(a||"").replace("g",""))},o.prototype.getLineTokens=function(h,a){if(a&&typeof a!="string"){var l=a.slice(0);a=l[0],a==="#tmp"&&(l.shift(),a=l.shift())}else var l=[];var f=a||"start",d=this.states[f];d||(f="start",d=this.states[f]);var p=this.matchMappings[f],g=this.regExps[f];g.lastIndex=0;for(var m,v=[],y=0,S=0,b={type:null,value:""};m=g.exec(h);){var _=p.defaultToken,w=null,E=m[0],T=g.lastIndex;if(T-E.length>y){var $=h.substring(y,T-E.length);b.type==_?b.value+=$:(b.type&&v.push(b),b={type:_,value:$})}for(var C=0;C<m.length-2;C++)if(m[C+1]!==void 0){w=d[p[C]],w.onMatch?_=w.onMatch(E,f,l,h):_=w.token,w.next&&(typeof w.next=="string"?f=w.next:f=w.next(f,l),d=this.states[f],d||(this.reportError("state doesn't exist",f),f="start",d=this.states[f]),p=this.matchMappings[f],y=T,g=this.regExps[f],g.lastIndex=T),w.consumeLineEnd&&(y=T);break}if(E){if(typeof _=="string")(!w||w.merge!==!1)&&b.type===_?b.value+=E:(b.type&&v.push(b),b={type:_,value:E});else if(_){b.type&&v.push(b),b={type:null,value:""};for(var C=0;C<_.length;C++)v.push(_[C])}}if(y==h.length)break;if(y=T,S++>c){for(S>2*h.length&&this.reportError("infinite loop with in ace tokenizer",{startState:a,line:h});y<h.length;)b.type&&v.push(b),b={value:h.substring(y,y+=500),type:"overflow"};f="start",l=[];break}}return b.type&&v.push(b),l.length>1&&l[0]!==f&&l.unshift("#tmp",f),{tokens:v,state:l.length?l:f}},o}();u.prototype.reportError=s.reportError,n.Tokenizer=u}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],function(i,n,r){var s=i("../lib/lang"),c=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(h,a){if(!a){for(var l in h)this.$rules[l]=h[l];return}for(var l in h){for(var f=h[l],d=0;d<f.length;d++){var p=f[d];(p.next||p.onMatch)&&(typeof p.next=="string"&&p.next.indexOf(a)!==0&&(p.next=a+p.next),p.nextState&&p.nextState.indexOf(a)!==0&&(p.nextState=a+p.nextState))}this.$rules[a+l]=f}},this.getRules=function(){return this.$rules},this.embedRules=function(h,a,l,f,d){var p=typeof h=="function"?new h().getRules():h;if(f)for(var g=0;g<f.length;g++)f[g]=a+f[g];else{f=[];for(var m in p)f.push(a+m)}if(this.addRules(p,a),l)for(var v=Array.prototype[d?"push":"unshift"],g=0;g<f.length;g++)v.apply(this.$rules[f[g]],s.deepCopy(l));this.$embeds||(this.$embeds=[]),this.$embeds.push(a)},this.getEmbeds=function(){return this.$embeds};var u=function(h,a){return(h!="start"||a.length)&&a.unshift(this.nextState,h),this.nextState},o=function(h,a){return a.shift(),a.shift()||"start"};this.normalizeRules=function(){var h=0,a=this.$rules;function l(f){var d=a[f];d.processed=!0;for(var p=0;p<d.length;p++){var g=d[p],m=null;Array.isArray(g)&&(m=g,g={}),!g.regex&&g.start&&(g.regex=g.start,g.next||(g.next=[]),g.next.push({defaultToken:g.token},{token:g.token+".end",regex:g.end||g.start,next:"pop"}),g.token=g.token+".start",g.push=!0);var v=g.next||g.push;if(v&&Array.isArray(v)){var y=g.stateName;y||(y=g.token,typeof y!="string"&&(y=y[0]||""),a[y]&&(y+=h++)),a[y]=v,g.next=y,l(y)}else v=="pop"&&(g.next=o);if(g.push&&(g.nextState=g.next||g.push,g.next=u,delete g.push),g.rules)for(var S in g.rules)a[S]?a[S].push&&a[S].push.apply(a[S],g.rules[S]):a[S]=g.rules[S];var b=typeof g=="string"?g:g.include;if(b&&(b==="$self"&&(b="start"),Array.isArray(b)?m=b.map(function(w){return a[w]}):m=a[b]),m){var _=[p,1].concat(m);g.noEscape&&(_=_.filter(function(w){return!w.next})),d.splice.apply(d,_),p--}g.keywordMap&&(g.token=this.createKeywordMapper(g.keywordMap,g.defaultToken||"text",g.caseInsensitive),delete g.defaultToken)}}Object.keys(a).forEach(l,this)},this.createKeywordMapper=function(h,a,l,f){var d=Object.create(null);return this.$keywordList=[],Object.keys(h).forEach(function(p){for(var g=h[p],m=g.split(f||"|"),v=m.length;v--;){var y=m[v];this.$keywordList.push(y),l&&(y=y.toLowerCase()),d[y]=p}},this),h=null,l?function(p){return d[p.toLowerCase()]||a}:function(p){return d[p]||a}},this.getKeywords=function(){return this.$keywords}}).call(c.prototype),n.TextHighlightRules=c}),ace.define("ace/mode/behaviour",["require","exports","module"],function(i,n,r){var s=function(){this.$behaviours={}};(function(){this.add=function(c,u,o){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[c]:this.$behaviours[c]={}}this.$behaviours[c][u]=o},this.addBehaviours=function(c){for(var u in c)for(var o in c[u])this.add(u,o,c[u][o])},this.remove=function(c){this.$behaviours&&this.$behaviours[c]&&delete this.$behaviours[c]},this.inherit=function(c,u){if(typeof c=="function")var o=new c().getBehaviours(u);else var o=c.getBehaviours(u);this.addBehaviours(o)},this.getBehaviours=function(c){if(c){for(var u={},o=0;o<c.length;o++)this.$behaviours[c[o]]&&(u[c[o]]=this.$behaviours[c[o]]);return u}else return this.$behaviours}}).call(s.prototype),n.Behaviour=s}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(i,n,r){var s=i("./range").Range,c=function(){function u(o,h,a){this.$session=o,this.$row=h,this.$rowTokens=o.getTokens(h);var l=o.getTokenAt(h,a);this.$tokenIndex=l?l.index:-1}return u.prototype.stepBackward=function(){for(this.$tokenIndex-=1;this.$tokenIndex<0;){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},u.prototype.stepForward=function(){this.$tokenIndex+=1;for(var o;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,o||(o=this.$session.getLength()),this.$row>=o)return this.$row=o-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},u.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},u.prototype.getCurrentTokenRow=function(){return this.$row},u.prototype.getCurrentTokenColumn=function(){var o=this.$rowTokens,h=this.$tokenIndex,a=o[h].start;if(a!==void 0)return a;for(a=0;h>0;)h-=1,a+=o[h].value.length;return a},u.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},u.prototype.getCurrentTokenRange=function(){var o=this.$rowTokens[this.$tokenIndex],h=this.getCurrentTokenColumn();return new s(this.$row,h,this.$row,h+o.value.length)},u}();n.TokenIterator=c}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(i,n,r){var s=i("../../lib/oop"),c=i("../behaviour").Behaviour,u=i("../../token_iterator").TokenIterator,o=i("../../lib/lang"),h=["text","paren.rparen","rparen","paren","punctuation.operator"],a=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],l,f={},d={'"':'"',"'":"'"},p=function(v){var y=-1;if(v.multiSelect&&(y=v.selection.index,f.rangeCount!=v.multiSelect.rangeCount&&(f={rangeCount:v.multiSelect.rangeCount})),f[y])return l=f[y];l=f[y]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},g=function(v,y,S,b){var _=v.end.row-v.start.row;return{text:S+y+b,selection:[0,v.start.column+1,_,v.end.column+(_?0:1)]}},m=function(v){v=v||{},this.add("braces","insertion",function(y,S,b,_,w){var E=b.getCursorPosition(),T=_.doc.getLine(E.row);if(w=="{"){p(b);var $=b.getSelectionRange(),C=_.doc.getTextRange($);if(C!==""&&C!=="{"&&b.getWrapBehavioursEnabled())return g($,C,"{","}");if(m.isSaneInsertion(b,_))return/[\]\}\)]/.test(T[E.column])||b.inMultiSelectMode||v.braces?(m.recordAutoInsert(b,_,"}"),{text:"{}",selection:[1,1]}):(m.recordMaybeInsert(b,_,"{"),{text:"{",selection:[1,1]})}else if(w=="}"){p(b);var x=T.substring(E.column,E.column+1);if(x=="}"){var L=_.$findOpeningBracket("}",{column:E.column+1,row:E.row});if(L!==null&&m.isAutoInsertedClosing(E,T,w))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(w==`
`||w==`\r
`){p(b);var M="";m.isMaybeInsertedClosing(E,T)&&(M=o.stringRepeat("}",l.maybeInsertedBrackets),m.clearMaybeInsertedClosing());var x=T.substring(E.column,E.column+1);if(x==="}"){var A=_.findMatchingBracket({row:E.row,column:E.column+1},"}");if(!A)return null;var k=this.$getIndent(_.getLine(A.row))}else if(M)var k=this.$getIndent(T);else{m.clearMaybeInsertedClosing();return}var P=k+_.getTabString();return{text:`
`+P+`
`+k+M,selection:[1,P.length,1,P.length]}}else m.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(y,S,b,_,w){var E=_.doc.getTextRange(w);if(!w.isMultiLine()&&E=="{"){p(b);var T=_.doc.getLine(w.start.row),$=T.substring(w.end.column,w.end.column+1);if($=="}")return w.end.column++,w;l.maybeInsertedBrackets--}}),this.add("parens","insertion",function(y,S,b,_,w){if(w=="("){p(b);var E=b.getSelectionRange(),T=_.doc.getTextRange(E);if(T!==""&&b.getWrapBehavioursEnabled())return g(E,T,"(",")");if(m.isSaneInsertion(b,_))return m.recordAutoInsert(b,_,")"),{text:"()",selection:[1,1]}}else if(w==")"){p(b);var $=b.getCursorPosition(),C=_.doc.getLine($.row),x=C.substring($.column,$.column+1);if(x==")"){var L=_.$findOpeningBracket(")",{column:$.column+1,row:$.row});if(L!==null&&m.isAutoInsertedClosing($,C,w))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(y,S,b,_,w){var E=_.doc.getTextRange(w);if(!w.isMultiLine()&&E=="("){p(b);var T=_.doc.getLine(w.start.row),$=T.substring(w.start.column+1,w.start.column+2);if($==")")return w.end.column++,w}}),this.add("brackets","insertion",function(y,S,b,_,w){if(w=="["){p(b);var E=b.getSelectionRange(),T=_.doc.getTextRange(E);if(T!==""&&b.getWrapBehavioursEnabled())return g(E,T,"[","]");if(m.isSaneInsertion(b,_))return m.recordAutoInsert(b,_,"]"),{text:"[]",selection:[1,1]}}else if(w=="]"){p(b);var $=b.getCursorPosition(),C=_.doc.getLine($.row),x=C.substring($.column,$.column+1);if(x=="]"){var L=_.$findOpeningBracket("]",{column:$.column+1,row:$.row});if(L!==null&&m.isAutoInsertedClosing($,C,w))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(y,S,b,_,w){var E=_.doc.getTextRange(w);if(!w.isMultiLine()&&E=="["){p(b);var T=_.doc.getLine(w.start.row),$=T.substring(w.start.column+1,w.start.column+2);if($=="]")return w.end.column++,w}}),this.add("string_dquotes","insertion",function(y,S,b,_,w){var E=_.$mode.$quotes||d;if(w.length==1&&E[w]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(w)!=-1)return;p(b);var T=w,$=b.getSelectionRange(),C=_.doc.getTextRange($);if(C!==""&&(C.length!=1||!E[C])&&b.getWrapBehavioursEnabled())return g($,C,T,T);if(!C){var x=b.getCursorPosition(),L=_.doc.getLine(x.row),M=L.substring(x.column-1,x.column),A=L.substring(x.column,x.column+1),k=_.getTokenAt(x.row,x.column),P=_.getTokenAt(x.row,x.column+1);if(M=="\\"&&k&&/escape/.test(k.type))return null;var O=k&&/string|escape/.test(k.type),N=!P||/string|escape/.test(P.type),D;if(A==T)D=O!==N,D&&/string\.end/.test(P.type)&&(D=!1);else{if(O&&!N||O&&N)return null;var B=_.$mode.tokenRe;B.lastIndex=0;var U=B.test(M);B.lastIndex=0;var q=B.test(A),H=_.$mode.$pairQuotesAfter,j=H&&H[T]&&H[T].test(M);if(!j&&U||q||A&&!/[\s;,.})\]\\]/.test(A))return null;var Y=L[x.column-2];if(M==T&&(Y==T||B.test(Y)))return null;D=!0}return{text:D?T+T:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(y,S,b,_,w){var E=_.$mode.$quotes||d,T=_.doc.getTextRange(w);if(!w.isMultiLine()&&E.hasOwnProperty(T)){p(b);var $=_.doc.getLine(w.start.row),C=$.substring(w.start.column+1,w.start.column+2);if(C==T)return w.end.column++,w}}),v.closeDocComment!==!1&&this.add("doc comment end","insertion",function(y,S,b,_,w){if(y==="doc-start"&&(w===`
`||w===`\r
`)&&b.selection.isEmpty()){var E=b.getCursorPosition(),T=_.doc.getLine(E.row),$=_.doc.getLine(E.row+1),C=this.$getIndent(T);if(/\s*\*/.test($))return/^\s*\*/.test(T)?{text:w+C+"* ",selection:[1,3+C.length,1,3+C.length]}:{text:w+C+" * ",selection:[1,3+C.length,1,3+C.length]};if(/\/\*\*/.test(T.substring(0,E.column)))return{text:w+C+" * "+w+" "+C+"*/",selection:[1,4+C.length,1,4+C.length]}}})};m.isSaneInsertion=function(v,y){var S=v.getCursorPosition(),b=new u(y,S.row,S.column);if(!this.$matchTokenType(b.getCurrentToken()||"text",h)){if(/[)}\]]/.test(v.session.getLine(S.row)[S.column]))return!0;var _=new u(y,S.row,S.column+1);if(!this.$matchTokenType(_.getCurrentToken()||"text",h))return!1}return b.stepForward(),b.getCurrentTokenRow()!==S.row||this.$matchTokenType(b.getCurrentToken()||"text",a)},m.$matchTokenType=function(v,y){return y.indexOf(v.type||v)>-1},m.recordAutoInsert=function(v,y,S){var b=v.getCursorPosition(),_=y.doc.getLine(b.row);this.isAutoInsertedClosing(b,_,l.autoInsertedLineEnd[0])||(l.autoInsertedBrackets=0),l.autoInsertedRow=b.row,l.autoInsertedLineEnd=S+_.substr(b.column),l.autoInsertedBrackets++},m.recordMaybeInsert=function(v,y,S){var b=v.getCursorPosition(),_=y.doc.getLine(b.row);this.isMaybeInsertedClosing(b,_)||(l.maybeInsertedBrackets=0),l.maybeInsertedRow=b.row,l.maybeInsertedLineStart=_.substr(0,b.column)+S,l.maybeInsertedLineEnd=_.substr(b.column),l.maybeInsertedBrackets++},m.isAutoInsertedClosing=function(v,y,S){return l.autoInsertedBrackets>0&&v.row===l.autoInsertedRow&&S===l.autoInsertedLineEnd[0]&&y.substr(v.column)===l.autoInsertedLineEnd},m.isMaybeInsertedClosing=function(v,y){return l.maybeInsertedBrackets>0&&v.row===l.maybeInsertedRow&&y.substr(v.column)===l.maybeInsertedLineEnd&&y.substr(0,v.column)==l.maybeInsertedLineStart},m.popAutoInsertedClosing=function(){l.autoInsertedLineEnd=l.autoInsertedLineEnd.substr(1),l.autoInsertedBrackets--},m.clearMaybeInsertedClosing=function(){l&&(l.maybeInsertedBrackets=0,l.maybeInsertedRow=-1)},s.inherits(m,c),n.CstyleBehaviour=m}),ace.define("ace/unicode",["require","exports","module"],function(i,n,r){for(var s=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],c=0,u=[],o=0;o<s.length;o+=2)u.push(c+=s[o]),s[o+1]&&u.push(45,c+=s[o+1]);n.wordChars=String.fromCharCode.apply(null,u)}),ace.define("ace/mode/text",["require","exports","module","ace/config","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(i,n,r){var s=i("../config"),c=i("../tokenizer").Tokenizer,u=i("./text_highlight_rules").TextHighlightRules,o=i("./behaviour/cstyle").CstyleBehaviour,h=i("../unicode"),a=i("../lib/lang"),l=i("../token_iterator").TokenIterator,f=i("../range").Range,d=function(){this.HighlightRules=u};(function(){this.$defaultBehaviour=new o,this.tokenRe=new RegExp("^["+h.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+h.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new c(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(p,g,m,v){var y=g.doc,S=!0,b=!0,_=1/0,w=g.getTabSize(),E=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var C=this.lineCommentStart.map(a.escapeRegExp).join("|"),T=this.lineCommentStart[0];else var C=a.escapeRegExp(this.lineCommentStart),T=this.lineCommentStart;C=new RegExp("^(\\s*)(?:"+C+") ?"),E=g.getUseSoftTabs();var M=function(q,H){var j=q.match(C);if(!!j){var Y=j[1].length,ie=j[0].length;!P(q,Y,ie)&&j[0][ie-1]==" "&&ie--,y.removeInLine(H,Y,ie)}},k=T+" ",L=function(q,H){(!S||/\S/.test(q))&&(P(q,_,_)?y.insertInLine({row:H,column:_},k):y.insertInLine({row:H,column:_},T))},A=function(q,H){return C.test(q)},P=function(q,H,j){for(var Y=0;H--&&q.charAt(H)==" ";)Y++;if(Y%w!=0)return!1;for(var Y=0;q.charAt(j++)==" ";)Y++;return w>2?Y%w!=w-1:Y%w==0}}else{if(!this.blockComment)return!1;var T=this.blockComment.start,$=this.blockComment.end,C=new RegExp("^(\\s*)(?:"+a.escapeRegExp(T)+")"),x=new RegExp("(?:"+a.escapeRegExp($)+")\\s*$"),L=function(D,B){A(D,B)||(!S||/\S/.test(D))&&(y.insertInLine({row:B,column:D.length},$),y.insertInLine({row:B,column:_},T))},M=function(D,B){var U;(U=D.match(x))&&y.removeInLine(B,D.length-U[0].length,D.length),(U=D.match(C))&&y.removeInLine(B,U[1].length,U[0].length)},A=function(D,B){if(C.test(D))return!0;for(var U=g.getTokens(B),q=0;q<U.length;q++)if(U[q].type==="comment")return!0}}function O(D){for(var B=m;B<=v;B++)D(y.getLine(B),B)}var N=1/0;O(function(D,B){var U=D.search(/\S/);U!==-1?(U<_&&(_=U),b&&!A(D,B)&&(b=!1)):N>D.length&&(N=D.length)}),_==1/0&&(_=N,S=!1,b=!1),E&&_%w!=0&&(_=Math.floor(_/w)*w),O(b?M:L)},this.toggleBlockComment=function(p,g,m,v){var y=this.blockComment;if(!!y){!y.start&&y[0]&&(y=y[0]);var S=new l(g,v.row,v.column),b=S.getCurrentToken();g.selection;var _=g.selection.toOrientedRange(),w,E;if(b&&/comment/.test(b.type)){for(var T,$;b&&/comment/.test(b.type);){var C=b.value.indexOf(y.start);if(C!=-1){var x=S.getCurrentTokenRow(),L=S.getCurrentTokenColumn()+C;T=new f(x,L,x,L+y.start.length);break}b=S.stepBackward()}for(var S=new l(g,v.row,v.column),b=S.getCurrentToken();b&&/comment/.test(b.type);){var C=b.value.indexOf(y.end);if(C!=-1){var x=S.getCurrentTokenRow(),L=S.getCurrentTokenColumn()+C;$=new f(x,L,x,L+y.end.length);break}b=S.stepForward()}$&&g.remove($),T&&(g.remove(T),w=T.start.row,E=-y.start.length)}else E=y.start.length,w=m.start.row,g.insert(m.end,y.end),g.insert(m.start,y.start);_.start.row==w&&(_.start.column+=E),_.end.row==w&&(_.end.column+=E),g.selection.fromOrientedRange(_)}},this.getNextLineIndent=function(p,g,m){return this.$getIndent(g)},this.checkOutdent=function(p,g,m){return!1},this.autoOutdent=function(p,g,m){},this.$getIndent=function(p){return p.match(/^\s*/)[0]},this.createWorker=function(p){return null},this.createModeDelegates=function(p){this.$embeds=[],this.$modes={};for(var g in p)if(p[g]){var m=p[g],v=m.prototype.$id,y=s.$modes[v];y||(s.$modes[v]=y=new m),s.$modes[g]||(s.$modes[g]=y),this.$embeds.push(g),this.$modes[g]=y}for(var S=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],g=0;g<S.length;g++)(function(_){var w=S[g],E=_[w];_[S[g]]=function(){return this.$delegator(w,arguments,E)}})(this)},this.$delegator=function(p,g,m){var v=g[0]||"start";if(typeof v!="string"){if(Array.isArray(v[2])){var y=v[2][v[2].length-1],S=this.$modes[y];if(S)return S[p].apply(S,[v[1]].concat([].slice.call(g,1)))}v=v[0]||"start"}for(var b=0;b<this.$embeds.length;b++)if(!!this.$modes[this.$embeds[b]]){var _=v.split(this.$embeds[b]);if(!_[0]&&_[1]){g[0]=_[1];var S=this.$modes[this.$embeds[b]];return S[p].apply(S,g)}}var w=m.apply(this,g);return m?w:void 0},this.transformAction=function(p,g,m,v,y){if(this.$behaviour){var S=this.$behaviour.getBehaviours();for(var b in S)if(S[b][g]){var _=S[b][g].apply(this,arguments);if(_)return _}}},this.getKeywords=function(p){if(!this.completionKeywords){var g=this.$tokenizer.rules,m=[];for(var v in g)for(var y=g[v],S=0,b=y.length;S<b;S++)if(typeof y[S].token=="string")/keyword|support|storage/.test(y[S].token)&&m.push(y[S].regex);else if(typeof y[S].token=="object"){for(var _=0,w=y[S].token.length;_<w;_++)if(/keyword|support|storage/.test(y[S].token[_])){var v=y[S].regex.match(/\(.+?\)/g)[_];m.push(v.substr(1,v.length-2))}}this.completionKeywords=m}return p?m.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(p,g,m,v){var y=this.$keywordList||this.$createKeywordList();return y.map(function(S){return{name:S,value:S,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(d.prototype),n.Mode=d}),ace.define("ace/apply_delta",["require","exports","module"],function(i,n,r){n.applyDelta=function(s,c,u){var o=c.start.row,h=c.start.column,a=s[o]||"";switch(c.action){case"insert":var l=c.lines;if(l.length===1)s[o]=a.substring(0,h)+c.lines[0]+a.substring(h);else{var f=[o,1].concat(c.lines);s.splice.apply(s,f),s[o]=a.substring(0,h)+s[o],s[o+c.lines.length-1]+=a.substring(h)}break;case"remove":var d=c.end.column,p=c.end.row;o===p?s[o]=a.substring(0,h)+a.substring(d):s.splice(o,p-o+1,a.substring(0,h)+s[p].substring(d));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(i,n,r){var s=i("./lib/oop"),c=i("./lib/event_emitter").EventEmitter,u=function(){function a(l,f,d){this.$onChange=this.onChange.bind(this),this.attach(l),typeof d>"u"?this.setPosition(f.row,f.column):this.setPosition(f,d)}return a.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},a.prototype.getDocument=function(){return this.document},a.prototype.onChange=function(l){if(!(l.start.row==l.end.row&&l.start.row!=this.row)&&!(l.start.row>this.row)){var f=h(l,{row:this.row,column:this.column},this.$insertRight);this.setPosition(f.row,f.column,!0)}},a.prototype.setPosition=function(l,f,d){var p;if(d?p={row:l,column:f}:p=this.$clipPositionToDocument(l,f),!(this.row==p.row&&this.column==p.column)){var g={row:this.row,column:this.column};this.row=p.row,this.column=p.column,this._signal("change",{old:g,value:p})}},a.prototype.detach=function(){this.document.off("change",this.$onChange)},a.prototype.attach=function(l){this.document=l||this.document,this.document.on("change",this.$onChange)},a.prototype.$clipPositionToDocument=function(l,f){var d={};return l>=this.document.getLength()?(d.row=Math.max(0,this.document.getLength()-1),d.column=this.document.getLine(d.row).length):l<0?(d.row=0,d.column=0):(d.row=l,d.column=Math.min(this.document.getLine(d.row).length,Math.max(0,f))),f<0&&(d.column=0),d},a}();u.prototype.$insertRight=!1,s.implement(u.prototype,c);function o(a,l,f){var d=f?a.column<=l.column:a.column<l.column;return a.row<l.row||a.row==l.row&&d}function h(a,l,f){var d=a.action=="insert",p=(d?1:-1)*(a.end.row-a.start.row),g=(d?1:-1)*(a.end.column-a.start.column),m=a.start,v=d?m:a.end;return o(l,m,f)?{row:l.row,column:l.column}:o(v,l,!f)?{row:l.row+p,column:l.column+(l.row==v.row?g:0)}:{row:m.row,column:m.column}}n.Anchor=u}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(i,n,r){var s=i("./lib/oop"),c=i("./apply_delta").applyDelta,u=i("./lib/event_emitter").EventEmitter,o=i("./range").Range,h=i("./anchor").Anchor,a=function(){function l(f){this.$lines=[""],f.length===0?this.$lines=[""]:Array.isArray(f)?this.insertMergedLines({row:0,column:0},f):this.insert({row:0,column:0},f)}return l.prototype.setValue=function(f){var d=this.getLength()-1;this.remove(new o(0,0,d,this.getLine(d).length)),this.insert({row:0,column:0},f||"")},l.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},l.prototype.createAnchor=function(f,d){return new h(this,f,d)},l.prototype.$detectNewLine=function(f){var d=f.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=d?d[1]:`
`,this._signal("changeNewLineMode")},l.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r
`;case"unix":return`
`;default:return this.$autoNewLine||`
`}},l.prototype.setNewLineMode=function(f){this.$newLineMode!==f&&(this.$newLineMode=f,this._signal("changeNewLineMode"))},l.prototype.getNewLineMode=function(){return this.$newLineMode},l.prototype.isNewLine=function(f){return f==`\r
`||f=="\r"||f==`
`},l.prototype.getLine=function(f){return this.$lines[f]||""},l.prototype.getLines=function(f,d){return this.$lines.slice(f,d+1)},l.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},l.prototype.getLength=function(){return this.$lines.length},l.prototype.getTextRange=function(f){return this.getLinesForRange(f).join(this.getNewLineCharacter())},l.prototype.getLinesForRange=function(f){var d;if(f.start.row===f.end.row)d=[this.getLine(f.start.row).substring(f.start.column,f.end.column)];else{d=this.getLines(f.start.row,f.end.row),d[0]=(d[0]||"").substring(f.start.column);var p=d.length-1;f.end.row-f.start.row==p&&(d[p]=d[p].substring(0,f.end.column))}return d},l.prototype.insertLines=function(f,d){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(f,d)},l.prototype.removeLines=function(f,d){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(f,d)},l.prototype.insertNewLine=function(f){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(f,["",""])},l.prototype.insert=function(f,d){return this.getLength()<=1&&this.$detectNewLine(d),this.insertMergedLines(f,this.$split(d))},l.prototype.insertInLine=function(f,d){var p=this.clippedPos(f.row,f.column),g=this.pos(f.row,f.column+d.length);return this.applyDelta({start:p,end:g,action:"insert",lines:[d]},!0),this.clonePos(g)},l.prototype.clippedPos=function(f,d){var p=this.getLength();f===void 0?f=p:f<0?f=0:f>=p&&(f=p-1,d=void 0);var g=this.getLine(f);return d==null&&(d=g.length),d=Math.min(Math.max(d,0),g.length),{row:f,column:d}},l.prototype.clonePos=function(f){return{row:f.row,column:f.column}},l.prototype.pos=function(f,d){return{row:f,column:d}},l.prototype.$clipPosition=function(f){var d=this.getLength();return f.row>=d?(f.row=Math.max(0,d-1),f.column=this.getLine(d-1).length):(f.row=Math.max(0,f.row),f.column=Math.min(Math.max(f.column,0),this.getLine(f.row).length)),f},l.prototype.insertFullLines=function(f,d){f=Math.min(Math.max(f,0),this.getLength());var p=0;f<this.getLength()?(d=d.concat([""]),p=0):(d=[""].concat(d),f--,p=this.$lines[f].length),this.insertMergedLines({row:f,column:p},d)},l.prototype.insertMergedLines=function(f,d){var p=this.clippedPos(f.row,f.column),g={row:p.row+d.length-1,column:(d.length==1?p.column:0)+d[d.length-1].length};return this.applyDelta({start:p,end:g,action:"insert",lines:d}),this.clonePos(g)},l.prototype.remove=function(f){var d=this.clippedPos(f.start.row,f.start.column),p=this.clippedPos(f.end.row,f.end.column);return this.applyDelta({start:d,end:p,action:"remove",lines:this.getLinesForRange({start:d,end:p})}),this.clonePos(d)},l.prototype.removeInLine=function(f,d,p){var g=this.clippedPos(f,d),m=this.clippedPos(f,p);return this.applyDelta({start:g,end:m,action:"remove",lines:this.getLinesForRange({start:g,end:m})},!0),this.clonePos(g)},l.prototype.removeFullLines=function(f,d){f=Math.min(Math.max(0,f),this.getLength()-1),d=Math.min(Math.max(0,d),this.getLength()-1);var p=d==this.getLength()-1&&f>0,g=d<this.getLength()-1,m=p?f-1:f,v=p?this.getLine(m).length:0,y=g?d+1:d,S=g?0:this.getLine(y).length,b=new o(m,v,y,S),_=this.$lines.slice(f,d+1);return this.applyDelta({start:b.start,end:b.end,action:"remove",lines:this.getLinesForRange(b)}),_},l.prototype.removeNewLine=function(f){f<this.getLength()-1&&f>=0&&this.applyDelta({start:this.pos(f,this.getLine(f).length),end:this.pos(f+1,0),action:"remove",lines:["",""]})},l.prototype.replace=function(f,d){if(f instanceof o||(f=o.fromPoints(f.start,f.end)),d.length===0&&f.isEmpty())return f.start;if(d==this.getTextRange(f))return f.end;this.remove(f);var p;return d?p=this.insert(f.start,d):p=f.start,p},l.prototype.applyDeltas=function(f){for(var d=0;d<f.length;d++)this.applyDelta(f[d])},l.prototype.revertDeltas=function(f){for(var d=f.length-1;d>=0;d--)this.revertDelta(f[d])},l.prototype.applyDelta=function(f,d){var p=f.action=="insert";(p?f.lines.length<=1&&!f.lines[0]:!o.comparePoints(f.start,f.end))||(p&&f.lines.length>2e4?this.$splitAndapplyLargeDelta(f,2e4):(c(this.$lines,f,d),this._signal("change",f)))},l.prototype.$safeApplyDelta=function(f){var d=this.$lines.length;(f.action=="remove"&&f.start.row<d&&f.end.row<d||f.action=="insert"&&f.start.row<=d)&&this.applyDelta(f)},l.prototype.$splitAndapplyLargeDelta=function(f,d){for(var p=f.lines,g=p.length-d+1,m=f.start.row,v=f.start.column,y=0,S=0;y<g;y=S){S+=d-1;var b=p.slice(y,S);b.push(""),this.applyDelta({start:this.pos(m+y,v),end:this.pos(m+S,v=0),action:f.action,lines:b},!0)}f.lines=p.slice(y),f.start.row=m+y,f.start.column=v,this.applyDelta(f,!0)},l.prototype.revertDelta=function(f){this.$safeApplyDelta({start:this.clonePos(f.start),end:this.clonePos(f.end),action:f.action=="insert"?"remove":"insert",lines:f.lines.slice()})},l.prototype.indexToPosition=function(f,d){for(var p=this.$lines||this.getAllLines(),g=this.getNewLineCharacter().length,m=d||0,v=p.length;m<v;m++)if(f-=p[m].length+g,f<0)return{row:m,column:f+p[m].length+g};return{row:v-1,column:f+p[v-1].length+g}},l.prototype.positionToIndex=function(f,d){for(var p=this.$lines||this.getAllLines(),g=this.getNewLineCharacter().length,m=0,v=Math.min(f.row,p.length),y=d||0;y<v;++y)m+=p[y].length+g;return m+f.column},l.prototype.$split=function(f){return f.split(/\r\n|\r|\n/)},l}();a.prototype.$autoNewLine="",a.prototype.$newLineMode="auto",s.implement(a.prototype,u),n.Document=a}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(i,n,r){var s=i("./lib/oop"),c=i("./lib/event_emitter").EventEmitter,u=function(){function o(h,a){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=h;var l=this;this.$worker=function(){if(!!l.running){for(var f=new Date,d=l.currentLine,p=-1,g=l.doc,m=d;l.lines[d];)d++;var v=g.getLength(),y=0;for(l.running=!1;d<v;){l.$tokenizeRow(d),p=d;do d++;while(l.lines[d]);if(y++,y%5===0&&new Date-f>20){l.running=setTimeout(l.$worker,20);break}}l.currentLine=d,p==-1&&(p=d),m<=p&&l.fireUpdateEvent(m,p)}}}return o.prototype.setTokenizer=function(h){this.tokenizer=h,this.lines=[],this.states=[],this.start(0)},o.prototype.setDocument=function(h){this.doc=h,this.lines=[],this.states=[],this.stop()},o.prototype.fireUpdateEvent=function(h,a){var l={first:h,last:a};this._signal("update",{data:l})},o.prototype.start=function(h){this.currentLine=Math.min(h||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},o.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},o.prototype.$updateOnChange=function(h){var a=h.start.row,l=h.end.row-a;if(l===0)this.lines[a]=null;else if(h.action=="remove")this.lines.splice(a,l+1,null),this.states.splice(a,l+1,null);else{var f=Array(l+1);f.unshift(a,1),this.lines.splice.apply(this.lines,f),this.states.splice.apply(this.states,f)}this.currentLine=Math.min(a,this.currentLine,this.doc.getLength()),this.stop()},o.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},o.prototype.getTokens=function(h){return this.lines[h]||this.$tokenizeRow(h)},o.prototype.getState=function(h){return this.currentLine==h&&this.$tokenizeRow(h),this.states[h]||"start"},o.prototype.$tokenizeRow=function(h){var a=this.doc.getLine(h),l=this.states[h-1],f=this.tokenizer.getLineTokens(a,l,h);return this.states[h]+""!=f.state+""?(this.states[h]=f.state,this.lines[h+1]=null,this.currentLine>h+1&&(this.currentLine=h+1)):this.currentLine==h&&(this.currentLine=h+1),this.lines[h]=f.tokens},o.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},o}();s.implement(u.prototype,c),n.BackgroundTokenizer=u}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(i,n,r){var s=i("./lib/lang"),c=i("./range").Range,u=function(){function o(h,a,l){l===void 0&&(l="text"),this.setRegexp(h),this.clazz=a,this.type=l}return o.prototype.setRegexp=function(h){this.regExp+""!=h+""&&(this.regExp=h,this.cache=[])},o.prototype.update=function(h,a,l,f){if(!!this.regExp)for(var d=f.firstRow,p=f.lastRow,g={},m=d;m<=p;m++){var v=this.cache[m];v==null&&(v=s.getMatchOffsets(l.getLine(m),this.regExp),v.length>this.MAX_RANGES&&(v=v.slice(0,this.MAX_RANGES)),v=v.map(function(_){return new c(m,_.offset,m,_.offset+_.length)}),this.cache[m]=v.length?v:"");for(var y=v.length;y--;){var S=v[y].toScreenRange(l),b=S.toString();g[b]||(g[b]=!0,a.drawSingleLineMarker(h,S,this.clazz,f))}}},o}();u.prototype.MAX_RANGES=500,n.SearchHighlight=u}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(i,n,r){var s=i("../range").Range,c=function(){function u(o,h){this.foldData=o,Array.isArray(h)?this.folds=h:h=this.folds=[h];var a=h[h.length-1];this.range=new s(h[0].start.row,h[0].start.column,a.end.row,a.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(l){l.setFoldLine(this)},this)}return u.prototype.shiftRow=function(o){this.start.row+=o,this.end.row+=o,this.folds.forEach(function(h){h.start.row+=o,h.end.row+=o})},u.prototype.addFold=function(o){if(o.sameRow){if(o.start.row<this.startRow||o.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(o),this.folds.sort(function(h,a){return-h.range.compareEnd(a.start.row,a.start.column)}),this.range.compareEnd(o.start.row,o.start.column)>0?(this.end.row=o.end.row,this.end.column=o.end.column):this.range.compareStart(o.end.row,o.end.column)<0&&(this.start.row=o.start.row,this.start.column=o.start.column)}else if(o.start.row==this.end.row)this.folds.push(o),this.end.row=o.end.row,this.end.column=o.end.column;else if(o.end.row==this.start.row)this.folds.unshift(o),this.start.row=o.start.row,this.start.column=o.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");o.foldLine=this},u.prototype.containsRow=function(o){return o>=this.start.row&&o<=this.end.row},u.prototype.walk=function(o,h,a){var l=0,f=this.folds,d,p,g,m=!0;h==null&&(h=this.end.row,a=this.end.column);for(var v=0;v<f.length;v++){if(d=f[v],p=d.range.compareStart(h,a),p==-1){o(null,h,a,l,m);return}if(g=o(null,d.start.row,d.start.column,l,m),g=!g&&o(d.placeholder,d.start.row,d.start.column,l),g||p===0)return;m=!d.sameRow,l=d.end.column}o(null,h,a,l,m)},u.prototype.getNextFoldTo=function(o,h){for(var a,l,f=0;f<this.folds.length;f++){if(a=this.folds[f],l=a.range.compareEnd(o,h),l==-1)return{fold:a,kind:"after"};if(l===0)return{fold:a,kind:"inside"}}return null},u.prototype.addRemoveChars=function(o,h,a){var l=this.getNextFoldTo(o,h),f,d;if(l){if(f=l.fold,l.kind=="inside"&&f.start.column!=h&&f.start.row!=o)window.console&&window.console.log(o,h,f);else if(f.start.row==o){d=this.folds;var p=d.indexOf(f);for(p===0&&(this.start.column+=a),p;p<d.length;p++){if(f=d[p],f.start.column+=a,!f.sameRow)return;f.end.column+=a}this.end.column+=a}}},u.prototype.split=function(o,h){var a=this.getNextFoldTo(o,h);if(!a||a.kind=="inside")return null;var l=a.fold,f=this.folds,d=this.foldData,p=f.indexOf(l),g=f[p-1];this.end.row=g.end.row,this.end.column=g.end.column,f=f.splice(p,f.length-p);var m=new u(d,f);return d.splice(d.indexOf(this)+1,0,m),m},u.prototype.merge=function(o){for(var h=o.folds,a=0;a<h.length;a++)this.addFold(h[a]);var l=this.foldData;l.splice(l.indexOf(o),1)},u.prototype.toString=function(){var o=[this.range.toString()+": ["];return this.folds.forEach(function(h){o.push("  "+h.toString())}),o.push("]"),o.join(`
`)},u.prototype.idxToPosition=function(o){for(var h=0,a=0;a<this.folds.length;a++){var l=this.folds[a];if(o-=l.start.column-h,o<0)return{row:l.start.row,column:l.start.column+o};if(o-=l.placeholder.length,o<0)return l.start;h=l.end.column}return{row:this.end.row,column:this.end.column+o}},u}();n.FoldLine=c}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(i,n,r){var s=i("./range").Range,c=s.comparePoints,u=function(){function o(){this.ranges=[],this.$bias=1}return o.prototype.pointIndex=function(h,a,l){for(var f=this.ranges,d=l||0;d<f.length;d++){var p=f[d],g=c(h,p.end);if(!(g>0)){var m=c(h,p.start);return g===0?a&&m!==0?-d-2:d:m>0||m===0&&!a?d:-d-1}}return-d-1},o.prototype.add=function(h){var a=!h.isEmpty(),l=this.pointIndex(h.start,a);l<0&&(l=-l-1);var f=this.pointIndex(h.end,a,l);return f<0?f=-f-1:f++,this.ranges.splice(l,f-l,h)},o.prototype.addList=function(h){for(var a=[],l=h.length;l--;)a.push.apply(a,this.add(h[l]));return a},o.prototype.substractPoint=function(h){var a=this.pointIndex(h);if(a>=0)return this.ranges.splice(a,1)},o.prototype.merge=function(){var h=[],a=this.ranges;a=a.sort(function(g,m){return c(g.start,m.start)});for(var l=a[0],f,d=1;d<a.length;d++){f=l,l=a[d];var p=c(f.end,l.start);p<0||p==0&&!f.isEmpty()&&!l.isEmpty()||(c(f.end,l.end)<0&&(f.end.row=l.end.row,f.end.column=l.end.column),a.splice(d,1),h.push(l),l=f,d--)}return this.ranges=a,h},o.prototype.contains=function(h,a){return this.pointIndex({row:h,column:a})>=0},o.prototype.containsPoint=function(h){return this.pointIndex(h)>=0},o.prototype.rangeAtPoint=function(h){var a=this.pointIndex(h);if(a>=0)return this.ranges[a]},o.prototype.clipRows=function(h,a){var l=this.ranges;if(l[0].start.row>a||l[l.length-1].start.row<h)return[];var f=this.pointIndex({row:h,column:0});f<0&&(f=-f-1);var d=this.pointIndex({row:a,column:0},f);d<0&&(d=-d-1);for(var p=[],g=f;g<d;g++)p.push(l[g]);return p},o.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},o.prototype.attach=function(h){this.session&&this.detach(),this.session=h,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},o.prototype.detach=function(){!this.session||(this.session.removeListener("change",this.onChange),this.session=null)},o.prototype.$onChange=function(h){for(var a=h.start,l=h.end,f=a.row,d=l.row,p=this.ranges,g=0,m=p.length;g<m;g++){var v=p[g];if(v.end.row>=f)break}if(h.action=="insert")for(var y=d-f,S=-a.column+l.column;g<m;g++){var v=p[g];if(v.start.row>f)break;if(v.start.row==f&&v.start.column>=a.column&&(v.start.column==a.column&&this.$bias<=0||(v.start.column+=S,v.start.row+=y)),v.end.row==f&&v.end.column>=a.column){if(v.end.column==a.column&&this.$bias<0)continue;v.end.column==a.column&&S>0&&g<m-1&&v.end.column>v.start.column&&v.end.column==p[g+1].start.column&&(v.end.column-=S),v.end.column+=S,v.end.row+=y}}else for(var y=f-d,S=a.column-l.column;g<m;g++){var v=p[g];if(v.start.row>d)break;v.end.row<d&&(f<v.end.row||f==v.end.row&&a.column<v.end.column)?(v.end.row=f,v.end.column=a.column):v.end.row==d?v.end.column<=l.column?(y||v.end.column>a.column)&&(v.end.column=a.column,v.end.row=a.row):(v.end.column+=S,v.end.row+=y):v.end.row>d&&(v.end.row+=y),v.start.row<d&&(f<v.start.row||f==v.start.row&&a.column<v.start.column)?(v.start.row=f,v.start.column=a.column):v.start.row==d?v.start.column<=l.column?(y||v.start.column>a.column)&&(v.start.column=a.column,v.start.row=a.row):(v.start.column+=S,v.start.row+=y):v.start.row>d&&(v.start.row+=y)}if(y!=0&&g<m)for(;g<m;g++){var v=p[g];v.start.row+=y,v.end.row+=y}},o}();u.prototype.comparePoints=c,n.RangeList=u}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(i,n,r){var s=this&&this.__extends||function(){var f=function(d,p){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,m){g.__proto__=m}||function(g,m){for(var v in m)Object.prototype.hasOwnProperty.call(m,v)&&(g[v]=m[v])},f(d,p)};return function(d,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");f(d,p);function g(){this.constructor=d}d.prototype=p===null?Object.create(p):(g.prototype=p.prototype,new g)}}(),c=i("../range_list").RangeList,u=function(f){s(d,f);function d(p,g){var m=f.call(this)||this;return m.foldLine=null,m.placeholder=g,m.range=p,m.start=p.start,m.end=p.end,m.sameRow=p.start.row==p.end.row,m.subFolds=m.ranges=[],m}return d.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},d.prototype.setFoldLine=function(p){this.foldLine=p,this.subFolds.forEach(function(g){g.setFoldLine(p)})},d.prototype.clone=function(){var p=this.range.clone(),g=new d(p,this.placeholder);return this.subFolds.forEach(function(m){g.subFolds.push(m.clone())}),g.collapseChildren=this.collapseChildren,g},d.prototype.addSubFold=function(p){if(!this.range.isEqual(p)){h(p,this.start);for(var S=p.start.row,b=p.start.column,g=0,m=-1;g<this.subFolds.length&&(m=this.subFolds[g].range.compare(S,b),m==1);g++);var v=this.subFolds[g],y=0;if(m==0){if(v.range.containsRange(p))return v.addSubFold(p);y=1}for(var S=p.range.end.row,b=p.range.end.column,_=g,m=-1;_<this.subFolds.length&&(m=this.subFolds[_].range.compare(S,b),m==1);_++);m==0&&_++;for(var w=this.subFolds.splice(g,_-g,p),E=m==0?w.length-1:w.length,T=y;T<E;T++)p.addSubFold(w[T]);return p.setFoldLine(this.foldLine),p}},d.prototype.restoreRange=function(p){return l(p,this.start)},d}(c);function o(f,d){f.row-=d.row,f.row==0&&(f.column-=d.column)}function h(f,d){o(f.start,d),o(f.end,d)}function a(f,d){f.row==0&&(f.column+=d.column),f.row+=d.row}function l(f,d){a(f.start,d),a(f.end,d)}n.Fold=u}),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator","ace/mouse/mouse_event"],function(i,n,r){var s=i("../range").Range,c=i("./fold_line").FoldLine,u=i("./fold").Fold,o=i("../token_iterator").TokenIterator,h=i("../mouse/mouse_event").MouseEvent;function a(){this.getFoldAt=function(l,f,d){var p=this.getFoldLine(l);if(!p)return null;for(var g=p.folds,m=0;m<g.length;m++){var v=g[m].range;if(v.contains(l,f)){if(d==1&&v.isEnd(l,f)&&!v.isEmpty())continue;if(d==-1&&v.isStart(l,f)&&!v.isEmpty())continue;return g[m]}}},this.getFoldsInRange=function(l){var f=l.start,d=l.end,p=this.$foldData,g=[];f.column+=1,d.column-=1;for(var m=0;m<p.length;m++){var v=p[m].range.compareRange(l);if(v!=2){if(v==-2)break;for(var y=p[m].folds,S=0;S<y.length;S++){var b=y[S];if(v=b.range.compareRange(l),v==-2)break;if(v==2)continue;if(v==42)break;g.push(b)}}}return f.column-=1,d.column+=1,g},this.getFoldsInRangeList=function(l){if(Array.isArray(l)){var f=[];l.forEach(function(d){f=f.concat(this.getFoldsInRange(d))},this)}else var f=this.getFoldsInRange(l);return f},this.getAllFolds=function(){for(var l=[],f=this.$foldData,d=0;d<f.length;d++)for(var p=0;p<f[d].folds.length;p++)l.push(f[d].folds[p]);return l},this.getFoldStringAt=function(l,f,d,p){if(p=p||this.getFoldLine(l),!p)return null;for(var g={end:{column:0}},m,v,y=0;y<p.folds.length;y++){v=p.folds[y];var S=v.range.compareEnd(l,f);if(S==-1){m=this.getLine(v.start.row).substring(g.end.column,v.start.column);break}else if(S===0)return null;g=v}return m||(m=this.getLine(v.start.row).substring(g.end.column)),d==-1?m.substring(0,f-g.end.column):d==1?m.substring(f-g.end.column):m},this.getFoldLine=function(l,f){var d=this.$foldData,p=0;for(f&&(p=d.indexOf(f)),p==-1&&(p=0),p;p<d.length;p++){var g=d[p];if(g.start.row<=l&&g.end.row>=l)return g;if(g.end.row>l)return null}return null},this.getNextFoldLine=function(l,f){var d=this.$foldData,p=0;for(f&&(p=d.indexOf(f)),p==-1&&(p=0),p;p<d.length;p++){var g=d[p];if(g.end.row>=l)return g}return null},this.getFoldedRowCount=function(l,f){for(var d=this.$foldData,p=f-l+1,g=0;g<d.length;g++){var m=d[g],v=m.end.row,y=m.start.row;if(v>=f){y<f&&(y>=l?p-=f-y:p=0);break}else v>=l&&(y>=l?p-=v-y:p-=v-l+1)}return p},this.$addFoldLine=function(l){return this.$foldData.push(l),this.$foldData.sort(function(f,d){return f.start.row-d.start.row}),l},this.addFold=function(l,f){var d=this.$foldData,p=!1,g;l instanceof u?g=l:(g=new u(f,l),g.collapseChildren=f.collapseChildren),this.$clipRangeToDocument(g.range);var m=g.start.row,v=g.start.column,y=g.end.row,S=g.end.column,b=this.getFoldAt(m,v,1),_=this.getFoldAt(y,S,-1);if(b&&_==b)return b.addSubFold(g);b&&!b.range.isStart(m,v)&&this.removeFold(b),_&&!_.range.isEnd(y,S)&&this.removeFold(_);var w=this.getFoldsInRange(g.range);w.length>0&&(this.removeFolds(w),g.collapseChildren||w.forEach(function(C){g.addSubFold(C)}));for(var E=0;E<d.length;E++){var T=d[E];if(y==T.start.row){T.addFold(g),p=!0;break}else if(m==T.end.row){if(T.addFold(g),p=!0,!g.sameRow){var $=d[E+1];if($&&$.start.row==y){T.merge($);break}}break}else if(y<=T.start.row)break}return p||(T=this.$addFoldLine(new c(this.$foldData,g))),this.$useWrapMode?this.$updateWrapData(T.start.row,T.start.row):this.$updateRowLengthCache(T.start.row,T.start.row),this.$modified=!0,this._signal("changeFold",{data:g,action:"add"}),g},this.addFolds=function(l){l.forEach(function(f){this.addFold(f)},this)},this.removeFold=function(l){var f=l.foldLine,d=f.start.row,p=f.end.row,g=this.$foldData,m=f.folds;if(m.length==1)g.splice(g.indexOf(f),1);else if(f.range.isEnd(l.end.row,l.end.column))m.pop(),f.end.row=m[m.length-1].end.row,f.end.column=m[m.length-1].end.column;else if(f.range.isStart(l.start.row,l.start.column))m.shift(),f.start.row=m[0].start.row,f.start.column=m[0].start.column;else if(l.sameRow)m.splice(m.indexOf(l),1);else{var v=f.split(l.start.row,l.start.column);m=v.folds,m.shift(),v.start.row=m[0].start.row,v.start.column=m[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(d,p):this.$updateRowLengthCache(d,p)),this.$modified=!0,this._signal("changeFold",{data:l,action:"remove"})},this.removeFolds=function(l){for(var f=[],d=0;d<l.length;d++)f.push(l[d]);f.forEach(function(p){this.removeFold(p)},this),this.$modified=!0},this.expandFold=function(l){this.removeFold(l),l.subFolds.forEach(function(f){l.restoreRange(f),this.addFold(f)},this),l.collapseChildren>0&&this.foldAll(l.start.row+1,l.end.row,l.collapseChildren-1),l.subFolds=[]},this.expandFolds=function(l){l.forEach(function(f){this.expandFold(f)},this)},this.unfold=function(l,f){var d,p;if(l==null)d=new s(0,0,this.getLength(),0),f==null&&(f=!0);else if(typeof l=="number")d=new s(l,0,l,this.getLine(l).length);else if("row"in l)d=s.fromPoints(l,l);else{if(Array.isArray(l))return p=[],l.forEach(function(m){p=p.concat(this.unfold(m))},this),p;d=l}p=this.getFoldsInRangeList(d);for(var g=p;p.length==1&&s.comparePoints(p[0].start,d.start)<0&&s.comparePoints(p[0].end,d.end)>0;)this.expandFolds(p),p=this.getFoldsInRangeList(d);if(f!=!1?this.removeFolds(p):this.expandFolds(p),g.length)return g},this.isRowFolded=function(l,f){return!!this.getFoldLine(l,f)},this.getRowFoldEnd=function(l,f){var d=this.getFoldLine(l,f);return d?d.end.row:l},this.getRowFoldStart=function(l,f){var d=this.getFoldLine(l,f);return d?d.start.row:l},this.getFoldDisplayLine=function(l,f,d,p,g){p==null&&(p=l.start.row),g==null&&(g=0),f==null&&(f=l.end.row),d==null&&(d=this.getLine(f).length);var m=this.doc,v="";return l.walk(function(y,S,b,_){if(!(S<p)){if(S==p){if(b<g)return;_=Math.max(g,_)}y!=null?v+=y:v+=m.getLine(S).substring(_,b)}},f,d),v},this.getDisplayLine=function(l,f,d,p){var g=this.getFoldLine(l);if(g)return this.getFoldDisplayLine(g,l,f,d,p);var m;return m=this.doc.getLine(l),m.substring(p||0,f||m.length)},this.$cloneFoldData=function(){var l=[];return l=this.$foldData.map(function(f){var d=f.folds.map(function(p){return p.clone()});return new c(l,d)}),l},this.toggleFold=function(l){var f=this.selection,d=f.getRange(),p,g;if(d.isEmpty()){var m=d.start;if(p=this.getFoldAt(m.row,m.column),p){this.expandFold(p);return}else(g=this.findMatchingBracket(m))?d.comparePoint(g)==1?d.end=g:(d.start=g,d.start.column++,d.end.column--):(g=this.findMatchingBracket({row:m.row,column:m.column+1}))?(d.comparePoint(g)==1?d.end=g:d.start=g,d.start.column++):d=this.getCommentFoldRange(m.row,m.column)||d}else{var v=this.getFoldsInRange(d);if(l&&v.length){this.expandFolds(v);return}else v.length==1&&(p=v[0])}if(p||(p=this.getFoldAt(d.start.row,d.start.column)),p&&p.range.toString()==d.toString()){this.expandFold(p);return}var y="...";if(!d.isMultiLine()){if(y=this.getTextRange(d),y.length<4)return;y=y.trim().substring(0,2)+".."}this.addFold(y,d)},this.getCommentFoldRange=function(l,f,d){var p=new o(this,l,f),g=p.getCurrentToken(),m=g&&g.type;if(g&&/^comment|string/.test(m)){m=m.match(/comment|string/)[0],m=="comment"&&(m+="|doc-start|\\.doc");var v=new RegExp(m),y=new s;if(d!=1){do g=p.stepBackward();while(g&&v.test(g.type)&&!/^comment.end/.test(g.type));g=p.stepForward()}if(y.start.row=p.getCurrentTokenRow(),y.start.column=p.getCurrentTokenColumn()+(/^comment.start/.test(g.type)?g.value.length:2),p=new o(this,l,f),d!=-1){var S=-1;do if(g=p.stepForward(),S==-1){var b=this.getState(p.$row);v.test(b)||(S=p.$row)}else if(p.$row>S)break;while(g&&v.test(g.type)&&!/^comment.start/.test(g.type));g=p.stepBackward()}else g=p.getCurrentToken();return y.end.row=p.getCurrentTokenRow(),y.end.column=p.getCurrentTokenColumn(),/^comment.end/.test(g.type)||(y.end.column+=g.value.length-2),y}},this.foldAll=function(l,f,d,p){d==null&&(d=1e5);var g=this.foldWidgets;if(!!g){f=f||this.getLength(),l=l||0;for(var m=l;m<f;m++)if(g[m]==null&&(g[m]=this.getFoldWidget(m)),g[m]=="start"&&!(p&&!p(m))){var v=this.getFoldWidgetRange(m);v&&v.isMultiLine()&&v.end.row<=f&&v.start.row>=l&&(m=v.end.row,v.collapseChildren=d,this.addFold("...",v))}}},this.foldToLevel=function(l){for(this.foldAll();l-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var l=this;this.foldAll(null,null,null,function(f){for(var d=l.getTokens(f),p=0;p<d.length;p++){var g=d[p];if(!(g.type=="text"&&/^\s+$/.test(g.value)))return!!/comment/.test(g.type)}})},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(l){if(!this.$foldStyles[l])throw new Error("invalid fold style: "+l+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=l){this.$foldStyle=l,l=="manual"&&this.unfold();var f=this.$foldMode;this.$setFolding(null),this.$setFolding(f)}},this.$setFolding=function(l){if(this.$foldMode!=l){if(this.$foldMode=l,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!l||this.$foldStyle=="manual"){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=l.getFoldWidget.bind(l,this,this.$foldStyle),this.getFoldWidgetRange=l.getFoldWidgetRange.bind(l,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)}},this.getParentFoldRangeData=function(l,f){var d=this.foldWidgets;if(!d||f&&d[l])return{};for(var p=l-1,g;p>=0;){var m=d[p];if(m==null&&(m=d[p]=this.getFoldWidget(p)),m=="start"){var v=this.getFoldWidgetRange(p);if(g||(g=v),v&&v.end.row>=l)break}p--}return{range:p!==-1&&v,firstRange:g}},this.onFoldWidgetClick=function(l,f){f instanceof h&&(f=f.domEvent);var d={children:f.shiftKey,all:f.ctrlKey||f.metaKey,siblings:f.altKey},p=this.$toggleFoldWidget(l,d);if(!p){var g=f.target||f.srcElement;g&&/ace_fold-widget/.test(g.className)&&(g.className+=" ace_invalid")}},this.$toggleFoldWidget=function(l,f){if(!!this.getFoldWidget){var d=this.getFoldWidget(l),p=this.getLine(l),g=d==="end"?-1:1,m=this.getFoldAt(l,g===-1?0:p.length,g);if(m)return f.children||f.all?this.removeFold(m):this.expandFold(m),m;var v=this.getFoldWidgetRange(l,!0);if(v&&!v.isMultiLine()&&(m=this.getFoldAt(v.start.row,v.start.column,1),m&&v.isEqual(m.range)))return this.removeFold(m),m;if(f.siblings){var y=this.getParentFoldRangeData(l);if(y.range)var S=y.range.start.row+1,b=y.range.end.row;this.foldAll(S,b,f.all?1e4:0)}else f.children?(b=v?v.end.row:this.getLength(),this.foldAll(l+1,b,f.all?1e4:0)):v&&(f.all&&(v.collapseChildren=1e4),this.addFold("...",v));return v}},this.toggleFoldWidget=function(l){var f=this.selection.getCursor().row;f=this.getRowFoldStart(f);var d=this.$toggleFoldWidget(f,{});if(!d){var p=this.getParentFoldRangeData(f,!0);if(d=p.range||p.firstRange,d){f=d.start.row;var g=this.getFoldAt(f,this.getLine(f).length,1);g?this.removeFold(g):this.addFold("...",d)}}},this.updateFoldWidgets=function(l){var f=l.start.row,d=l.end.row-f;if(d===0)this.foldWidgets[f]=null;else if(l.action=="remove")this.foldWidgets.splice(f,d+1,null);else{var p=Array(d+1);p.unshift(f,1),this.foldWidgets.splice.apply(this.foldWidgets,p)}},this.tokenizerUpdateFoldWidgets=function(l){var f=l.data;f.first!=f.last&&this.foldWidgets.length>f.first&&this.foldWidgets.splice(f.first,this.foldWidgets.length)}}n.Folding=a}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(i,n,r){var s=i("../token_iterator").TokenIterator,c=i("../range").Range;function u(){this.findMatchingBracket=function(o,h){if(o.column==0)return null;var a=h||this.getLine(o.row).charAt(o.column-1);if(a=="")return null;var l=a.match(/([\(\[\{])|([\)\]\}])/);return l?l[1]?this.$findClosingBracket(l[1],o):this.$findOpeningBracket(l[2],o):null},this.getBracketRange=function(o){var h=this.getLine(o.row),a=!0,l,f=h.charAt(o.column-1),d=f&&f.match(/([\(\[\{])|([\)\]\}])/);if(d||(f=h.charAt(o.column),o={row:o.row,column:o.column+1},d=f&&f.match(/([\(\[\{])|([\)\]\}])/),a=!1),!d)return null;if(d[1]){var p=this.$findClosingBracket(d[1],o);if(!p)return null;l=c.fromPoints(o,p),a||(l.end.column++,l.start.column--),l.cursor=l.end}else{var p=this.$findOpeningBracket(d[2],o);if(!p)return null;l=c.fromPoints(p,o),a||(l.start.column++,l.end.column--),l.cursor=l.start}return l},this.getMatchingBracketRanges=function(o,h){var a=this.getLine(o.row),l=/([\(\[\{])|([\)\]\}])/,f=!h&&a.charAt(o.column-1),d=f&&f.match(l);if(d||(f=(h===void 0||h)&&a.charAt(o.column),o={row:o.row,column:o.column+1},d=f&&f.match(l)),!d)return null;var p=new c(o.row,o.column-1,o.row,o.column),g=d[1]?this.$findClosingBracket(d[1],o):this.$findOpeningBracket(d[2],o);if(!g)return[p];var m=new c(g.row,g.column,g.row,g.column+1);return[p,m]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(o,h,a){var l=this.$brackets[o],f=1,d=new s(this,h.row,h.column),p=d.getCurrentToken();if(p||(p=d.stepForward()),!!p){a||(a=new RegExp("(\\.?"+p.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var g=h.column-d.getCurrentTokenColumn()-2,m=p.value;;){for(;g>=0;){var v=m.charAt(g);if(v==l){if(f-=1,f==0)return{row:d.getCurrentTokenRow(),column:g+d.getCurrentTokenColumn()}}else v==o&&(f+=1);g-=1}do p=d.stepBackward();while(p&&!a.test(p.type));if(p==null)break;m=p.value,g=m.length-1}return null}},this.$findClosingBracket=function(o,h,a){var l=this.$brackets[o],f=1,d=new s(this,h.row,h.column),p=d.getCurrentToken();if(p||(p=d.stepForward()),!!p){a||(a=new RegExp("(\\.?"+p.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var g=h.column-d.getCurrentTokenColumn();;){for(var m=p.value,v=m.length;g<v;){var y=m.charAt(g);if(y==l){if(f-=1,f==0)return{row:d.getCurrentTokenRow(),column:g+d.getCurrentTokenColumn()}}else y==o&&(f+=1);g+=1}do p=d.stepForward();while(p&&!a.test(p.type));if(p==null)break;g=0}return null}},this.getMatchingTags=function(o){var h=new s(this,o.row,o.column),a=this.$findTagName(h);if(!!a){var l=h.stepBackward();return l.value==="<"?this.$findClosingTag(h,a):this.$findOpeningTag(h,a)}},this.$findTagName=function(o){var h=o.getCurrentToken(),a=!1,l=!1;if(h&&h.type.indexOf("tag-name")===-1)do l?h=o.stepBackward():h=o.stepForward(),h&&(h.value==="/>"?l=!0:h.type.indexOf("tag-name")!==-1&&(a=!0));while(h&&!a);return h},this.$findClosingTag=function(o,h){var a,l=h.value,f=h.value,d=0,p=new c(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+1);h=o.stepForward();var g=new c(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+h.value.length),m=!1;do if(a=h,h=o.stepForward(),h){if(h.value===">"&&!m){var v=new c(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+1);m=!0}if(h.type.indexOf("tag-name")!==-1){if(l=h.value,f===l){if(a.value==="<")d++;else if(a.value==="</"&&(d--,d<0)){o.stepBackward();var y=new c(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+2);h=o.stepForward();var S=new c(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+h.value.length);if(h=o.stepForward(),h&&h.value===">")var b=new c(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+1);else return}}}else if(f===l&&h.value==="/>"&&(d--,d<0))var y=new c(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+2),S=y,b=S,v=new c(g.end.row,g.end.column,g.end.row,g.end.column+1)}while(h&&d>=0);if(p&&v&&y&&b&&g&&S)return{openTag:new c(p.start.row,p.start.column,v.end.row,v.end.column),closeTag:new c(y.start.row,y.start.column,b.end.row,b.end.column),openTagName:g,closeTagName:S}},this.$findOpeningTag=function(o,h){var a=o.getCurrentToken(),l=h.value,f=0,d=o.getCurrentTokenRow(),p=o.getCurrentTokenColumn(),g=p+2,m=new c(d,p,d,g);o.stepForward();var v=new c(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+h.value.length);if(h=o.stepForward(),!(!h||h.value!==">")){var y=new c(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+1);o.stepBackward(),o.stepBackward();do if(h=a,d=o.getCurrentTokenRow(),p=o.getCurrentTokenColumn(),g=p+h.value.length,a=o.stepBackward(),h){if(h.type.indexOf("tag-name")!==-1){if(l===h.value)if(a.value==="<"){if(f++,f>0){var S=new c(d,p,d,g),b=new c(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+1);do h=o.stepForward();while(h&&h.value!==">");var _=new c(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+1)}}else a.value==="</"&&f--}else if(h.value==="/>"){for(var w=0,E=a;E;){if(E.type.indexOf("tag-name")!==-1&&E.value===l){f--;break}else if(E.value==="<")break;E=o.stepBackward(),w++}for(var T=0;T<w;T++)o.stepForward()}}while(a&&f<=0);if(b&&_&&m&&y&&S&&v)return{openTag:new c(b.start.row,b.start.column,_.end.row,_.end.column),closeTag:new c(m.start.row,m.start.column,y.end.row,y.end.column),openTagName:S,closeTagName:v}}}}n.BracketMatch=u}),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/bidihandler","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/search_highlight","ace/edit_session/folding","ace/edit_session/bracket_match"],function(i,n,r){var s=i("./lib/oop"),c=i("./lib/lang"),u=i("./bidihandler").BidiHandler,o=i("./config"),h=i("./lib/event_emitter").EventEmitter,a=i("./selection").Selection,l=i("./mode/text").Mode,f=i("./range").Range,d=i("./document").Document,p=i("./background_tokenizer").BackgroundTokenizer,g=i("./search_highlight").SearchHighlight,m=function(){function C(x,L){this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],this.id="session"+ ++C.$uid,this.$foldData.toString=function(){return this.join(`
`)},this.bgTokenizer=new p(new l().getTokenizer(),this);var M=this;this.bgTokenizer.on("update",function(A){M._signal("tokenizerUpdate",A)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),(typeof x!="object"||!x.getLine)&&(x=new d(x)),this.setDocument(x),this.selection=new a(this),this.$bidiHandler=new u(this),o.resetOptions(this),this.setMode(L),o._signal("session",this),this.destroyed=!1}return C.prototype.setDocument=function(x){this.doc&&this.doc.off("change",this.$onChange),this.doc=x,x.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},C.prototype.getDocument=function(){return this.doc},C.prototype.$resetRowCache=function(x){if(!x){this.$docRowCache=[],this.$screenRowCache=[];return}var L=this.$docRowCache.length,M=this.$getRowCacheIndex(this.$docRowCache,x)+1;L>M&&(this.$docRowCache.splice(M,L),this.$screenRowCache.splice(M,L))},C.prototype.$getRowCacheIndex=function(x,L){for(var M=0,A=x.length-1;M<=A;){var k=M+A>>1,P=x[k];if(L>P)M=k+1;else if(L<P)A=k-1;else return k}return M-1},C.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},C.prototype.onChangeFold=function(x){var L=x.data;this.$resetRowCache(L.start.row)},C.prototype.onChange=function(x){this.$modified=!0,this.$bidiHandler.onChange(x),this.$resetRowCache(x.start.row);var L=this.$updateInternalDataOnChange(x);!this.$fromUndo&&this.$undoManager&&(L&&L.length&&(this.$undoManager.add({action:"removeFolds",folds:L},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(x,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(x),this._signal("change",x)},C.prototype.setValue=function(x){this.doc.setValue(x),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},C.prototype.toString=function(){return this.doc.getValue()},C.prototype.getSelection=function(){return this.selection},C.prototype.getState=function(x){return this.bgTokenizer.getState(x)},C.prototype.getTokens=function(x){return this.bgTokenizer.getTokens(x)},C.prototype.getTokenAt=function(x,L){var M=this.bgTokenizer.getTokens(x),A,k=0;if(L==null){var P=M.length-1;k=this.getLine(x).length}else for(var P=0;P<M.length&&(k+=M[P].value.length,!(k>=L));P++);return A=M[P],A?(A.index=P,A.start=k-A.value.length,A):null},C.prototype.setUndoManager=function(x){if(this.$undoManager=x,this.$informUndoManager&&this.$informUndoManager.cancel(),x){var L=this;x.addSession(this),this.$syncInformUndoManager=function(){L.$informUndoManager.cancel(),L.mergeUndoDeltas=!1},this.$informUndoManager=c.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},C.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},C.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},C.prototype.getTabString=function(){return this.getUseSoftTabs()?c.stringRepeat(" ",this.getTabSize()):"	"},C.prototype.setUseSoftTabs=function(x){this.setOption("useSoftTabs",x)},C.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},C.prototype.setTabSize=function(x){this.setOption("tabSize",x)},C.prototype.getTabSize=function(){return this.$tabSize},C.prototype.isTabStop=function(x){return this.$useSoftTabs&&x.column%this.$tabSize===0},C.prototype.setNavigateWithinSoftTabs=function(x){this.setOption("navigateWithinSoftTabs",x)},C.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},C.prototype.setOverwrite=function(x){this.setOption("overwrite",x)},C.prototype.getOverwrite=function(){return this.$overwrite},C.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},C.prototype.addGutterDecoration=function(x,L){this.$decorations[x]||(this.$decorations[x]=""),this.$decorations[x]+=" "+L,this._signal("changeBreakpoint",{})},C.prototype.removeGutterDecoration=function(x,L){this.$decorations[x]=(this.$decorations[x]||"").replace(" "+L,""),this._signal("changeBreakpoint",{})},C.prototype.getBreakpoints=function(){return this.$breakpoints},C.prototype.setBreakpoints=function(x){this.$breakpoints=[];for(var L=0;L<x.length;L++)this.$breakpoints[x[L]]="ace_breakpoint";this._signal("changeBreakpoint",{})},C.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},C.prototype.setBreakpoint=function(x,L){L===void 0&&(L="ace_breakpoint"),L?this.$breakpoints[x]=L:delete this.$breakpoints[x],this._signal("changeBreakpoint",{})},C.prototype.clearBreakpoint=function(x){delete this.$breakpoints[x],this._signal("changeBreakpoint",{})},C.prototype.addMarker=function(x,L,M,A){var k=this.$markerId++,P={range:x,type:M||"line",renderer:typeof M=="function"?M:null,clazz:L,inFront:!!A,id:k};return A?(this.$frontMarkers[k]=P,this._signal("changeFrontMarker")):(this.$backMarkers[k]=P,this._signal("changeBackMarker")),k},C.prototype.addDynamicMarker=function(x,L){if(!!x.update){var M=this.$markerId++;return x.id=M,x.inFront=!!L,L?(this.$frontMarkers[M]=x,this._signal("changeFrontMarker")):(this.$backMarkers[M]=x,this._signal("changeBackMarker")),x}},C.prototype.removeMarker=function(x){var L=this.$frontMarkers[x]||this.$backMarkers[x];if(!!L){var M=L.inFront?this.$frontMarkers:this.$backMarkers;delete M[x],this._signal(L.inFront?"changeFrontMarker":"changeBackMarker")}},C.prototype.getMarkers=function(x){return x?this.$frontMarkers:this.$backMarkers},C.prototype.highlight=function(x){if(!this.$searchHighlight){var L=new g(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(L)}this.$searchHighlight.setRegexp(x)},C.prototype.highlightLines=function(x,L,M,A){typeof L!="number"&&(M=L,L=x),M||(M="ace_step");var k=new f(x,0,L,1/0);return k.id=this.addMarker(k,M,"fullLine",A),k},C.prototype.setAnnotations=function(x){this.$annotations=x,this._signal("changeAnnotation",{})},C.prototype.getAnnotations=function(){return this.$annotations||[]},C.prototype.clearAnnotations=function(){this.setAnnotations([])},C.prototype.$detectNewLine=function(x){var L=x.match(/^.*?(\r?\n)/m);L?this.$autoNewLine=L[1]:this.$autoNewLine=`
`},C.prototype.getWordRange=function(x,L){var M=this.getLine(x),A=!1;if(L>0&&(A=!!M.charAt(L-1).match(this.tokenRe)),A||(A=!!M.charAt(L).match(this.tokenRe)),A)var k=this.tokenRe;else if(/^\s+$/.test(M.slice(L-1,L+1)))var k=/\s/;else var k=this.nonTokenRe;var P=L;if(P>0){do P--;while(P>=0&&M.charAt(P).match(k));P++}for(var O=L;O<M.length&&M.charAt(O).match(k);)O++;return new f(x,P,x,O)},C.prototype.getAWordRange=function(x,L){for(var M=this.getWordRange(x,L),A=this.getLine(M.end.row);A.charAt(M.end.column).match(/[ \t]/);)M.end.column+=1;return M},C.prototype.setNewLineMode=function(x){this.doc.setNewLineMode(x)},C.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},C.prototype.setUseWorker=function(x){this.setOption("useWorker",x)},C.prototype.getUseWorker=function(){return this.$useWorker},C.prototype.onReloadTokenizer=function(x){var L=x.data;this.bgTokenizer.start(L.first),this._signal("tokenizerUpdate",x)},C.prototype.setMode=function(x,L){if(x&&typeof x=="object"){if(x.getTokenizer)return this.$onChangeMode(x);var M=x,A=M.path}else A=x||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new l),this.$modes[A]&&!M){this.$onChangeMode(this.$modes[A]),L&&L();return}this.$modeId=A,o.loadModule(["mode",A],function(k){if(this.$modeId!==A)return L&&L();this.$modes[A]&&!M?this.$onChangeMode(this.$modes[A]):k&&k.Mode&&(k=new k.Mode(M),M||(this.$modes[A]=k,k.$id=A),this.$onChangeMode(k)),L&&L()}.bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},C.prototype.$onChangeMode=function(x,L){if(L||(this.$modeId=x.$id),this.$mode!==x){var M=this.$mode;this.$mode=x,this.$stopWorker(),this.$useWorker&&this.$startWorker();var A=x.getTokenizer();if(A.on!==void 0){var k=this.onReloadTokenizer.bind(this);A.on("update",k)}this.bgTokenizer.setTokenizer(A),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=x.tokenRe,this.nonTokenRe=x.nonTokenRe,L||(x.attachToSession&&x.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(x.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:M,mode:x}))}},C.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},C.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(x){o.warn("Could not load worker",x),this.$worker=null}},C.prototype.getMode=function(){return this.$mode},C.prototype.setScrollTop=function(x){this.$scrollTop===x||isNaN(x)||(this.$scrollTop=x,this._signal("changeScrollTop",x))},C.prototype.getScrollTop=function(){return this.$scrollTop},C.prototype.setScrollLeft=function(x){this.$scrollLeft===x||isNaN(x)||(this.$scrollLeft=x,this._signal("changeScrollLeft",x))},C.prototype.getScrollLeft=function(){return this.$scrollLeft},C.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},C.prototype.getLineWidgetMaxWidth=function(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var x=0;return this.lineWidgets.forEach(function(L){L&&L.screenWidth>x&&(x=L.screenWidth)}),this.lineWidgetWidth=x},C.prototype.$computeWidth=function(x){if(this.$modified||x){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var L=this.doc.getAllLines(),M=this.$rowLengthCache,A=0,k=0,P=this.$foldData[k],O=P?P.start.row:1/0,N=L.length,D=0;D<N;D++){if(D>O){if(D=P.end.row+1,D>=N)break;P=this.$foldData[k++],O=P?P.start.row:1/0}M[D]==null&&(M[D]=this.$getStringScreenWidth(L[D])[0]),M[D]>A&&(A=M[D])}this.screenWidth=A}},C.prototype.getLine=function(x){return this.doc.getLine(x)},C.prototype.getLines=function(x,L){return this.doc.getLines(x,L)},C.prototype.getLength=function(){return this.doc.getLength()},C.prototype.getTextRange=function(x){return this.doc.getTextRange(x||this.selection.getRange())},C.prototype.insert=function(x,L){return this.doc.insert(x,L)},C.prototype.remove=function(x){return this.doc.remove(x)},C.prototype.removeFullLines=function(x,L){return this.doc.removeFullLines(x,L)},C.prototype.undoChanges=function(x,L){if(!!x.length){this.$fromUndo=!0;for(var M=x.length-1;M!=-1;M--){var A=x[M];A.action=="insert"||A.action=="remove"?this.doc.revertDelta(A):A.folds&&this.addFolds(A.folds)}!L&&this.$undoSelect&&(x.selectionBefore?this.selection.fromJSON(x.selectionBefore):this.selection.setRange(this.$getUndoSelection(x,!0))),this.$fromUndo=!1}},C.prototype.redoChanges=function(x,L){if(!!x.length){this.$fromUndo=!0;for(var M=0;M<x.length;M++){var A=x[M];(A.action=="insert"||A.action=="remove")&&this.doc.$safeApplyDelta(A)}!L&&this.$undoSelect&&(x.selectionAfter?this.selection.fromJSON(x.selectionAfter):this.selection.setRange(this.$getUndoSelection(x,!1))),this.$fromUndo=!1}},C.prototype.setUndoSelect=function(x){this.$undoSelect=x},C.prototype.$getUndoSelection=function(x,L){function M(N){return L?N.action!=="insert":N.action==="insert"}for(var A,k,P=0;P<x.length;P++){var O=x[P];if(!!O.start){if(!A){M(O)?A=f.fromPoints(O.start,O.end):A=f.fromPoints(O.start,O.start);continue}M(O)?(k=O.start,A.compare(k.row,k.column)==-1&&A.setStart(k),k=O.end,A.compare(k.row,k.column)==1&&A.setEnd(k)):(k=O.start,A.compare(k.row,k.column)==-1&&(A=f.fromPoints(O.start,O.start)))}}return A},C.prototype.replace=function(x,L){return this.doc.replace(x,L)},C.prototype.moveText=function(x,L,M){var A=this.getTextRange(x),k=this.getFoldsInRange(x),P=f.fromPoints(L,L);if(!M){this.remove(x);var O=x.start.row-x.end.row,N=O?-x.end.column:x.start.column-x.end.column;N&&(P.start.row==x.end.row&&P.start.column>x.end.column&&(P.start.column+=N),P.end.row==x.end.row&&P.end.column>x.end.column&&(P.end.column+=N)),O&&P.start.row>=x.end.row&&(P.start.row+=O,P.end.row+=O)}if(P.end=this.insert(P.start,A),k.length){var D=x.start,B=P.start,O=B.row-D.row,N=B.column-D.column;this.addFolds(k.map(function(H){return H=H.clone(),H.start.row==D.row&&(H.start.column+=N),H.end.row==D.row&&(H.end.column+=N),H.start.row+=O,H.end.row+=O,H}))}return P},C.prototype.indentRows=function(x,L,M){M=M.replace(/\t/g,this.getTabString());for(var A=x;A<=L;A++)this.doc.insertInLine({row:A,column:0},M)},C.prototype.outdentRows=function(x){for(var L=x.collapseRows(),M=new f(0,0,0,0),A=this.getTabSize(),k=L.start.row;k<=L.end.row;++k){var P=this.getLine(k);M.start.row=k,M.end.row=k;for(var O=0;O<A&&P.charAt(O)==" ";++O);O<A&&P.charAt(O)=="	"?(M.start.column=O,M.end.column=O+1):(M.start.column=0,M.end.column=O),this.remove(M)}},C.prototype.$moveLines=function(x,L,M){if(x=this.getRowFoldStart(x),L=this.getRowFoldEnd(L),M<0){var A=this.getRowFoldStart(x+M);if(A<0)return 0;var k=A-x}else if(M>0){var A=this.getRowFoldEnd(L+M);if(A>this.doc.getLength()-1)return 0;var k=A-L}else{x=this.$clipRowToDocument(x),L=this.$clipRowToDocument(L);var k=L-x+1}var P=new f(x,0,L,Number.MAX_VALUE),O=this.getFoldsInRange(P).map(function(D){return D=D.clone(),D.start.row+=k,D.end.row+=k,D}),N=M==0?this.doc.getLines(x,L):this.doc.removeFullLines(x,L);return this.doc.insertFullLines(x+k,N),O.length&&this.addFolds(O),k},C.prototype.moveLinesUp=function(x,L){return this.$moveLines(x,L,-1)},C.prototype.moveLinesDown=function(x,L){return this.$moveLines(x,L,1)},C.prototype.duplicateLines=function(x,L){return this.$moveLines(x,L,0)},C.prototype.$clipRowToDocument=function(x){return Math.max(0,Math.min(x,this.doc.getLength()-1))},C.prototype.$clipColumnToRow=function(x,L){return L<0?0:Math.min(this.doc.getLine(x).length,L)},C.prototype.$clipPositionToDocument=function(x,L){if(L=Math.max(0,L),x<0)x=0,L=0;else{var M=this.doc.getLength();x>=M?(x=M-1,L=this.doc.getLine(M-1).length):L=Math.min(this.doc.getLine(x).length,L)}return{row:x,column:L}},C.prototype.$clipRangeToDocument=function(x){x.start.row<0?(x.start.row=0,x.start.column=0):x.start.column=this.$clipColumnToRow(x.start.row,x.start.column);var L=this.doc.getLength()-1;return x.end.row>L?(x.end.row=L,x.end.column=this.doc.getLine(L).length):x.end.column=this.$clipColumnToRow(x.end.row,x.end.column),x},C.prototype.setUseWrapMode=function(x){if(x!=this.$useWrapMode){if(this.$useWrapMode=x,this.$modified=!0,this.$resetRowCache(0),x){var L=this.getLength();this.$wrapData=Array(L),this.$updateWrapData(0,L-1)}this._signal("changeWrapMode")}},C.prototype.getUseWrapMode=function(){return this.$useWrapMode},C.prototype.setWrapLimitRange=function(x,L){(this.$wrapLimitRange.min!==x||this.$wrapLimitRange.max!==L)&&(this.$wrapLimitRange={min:x,max:L},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},C.prototype.adjustWrapLimit=function(x,L){var M=this.$wrapLimitRange;M.max<0&&(M={min:L,max:L});var A=this.$constrainWrapLimit(x,M.min,M.max);return A!=this.$wrapLimit&&A>1?(this.$wrapLimit=A,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},C.prototype.$constrainWrapLimit=function(x,L,M){return L&&(x=Math.max(L,x)),M&&(x=Math.min(M,x)),x},C.prototype.getWrapLimit=function(){return this.$wrapLimit},C.prototype.setWrapLimit=function(x){this.setWrapLimitRange(x,x)},C.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},C.prototype.$updateInternalDataOnChange=function(x){var L=this.$useWrapMode,M=x.action,A=x.start,k=x.end,P=A.row,O=k.row,N=O-P,D=null;if(this.$updating=!0,N!=0)if(M==="remove"){this[L?"$wrapData":"$rowLengthCache"].splice(P,N);var B=this.$foldData;D=this.getFoldsInRange(x),this.removeFolds(D);var U=this.getFoldLine(k.row),q=0;if(U){U.addRemoveChars(k.row,k.column,A.column-k.column),U.shiftRow(-N);var H=this.getFoldLine(P);H&&H!==U&&(H.merge(U),U=H),q=B.indexOf(U)+1}for(q;q<B.length;q++){var U=B[q];U.start.row>=k.row&&U.shiftRow(-N)}O=P}else{var j=Array(N);j.unshift(P,0);var Y=L?this.$wrapData:this.$rowLengthCache;Y.splice.apply(Y,j);var B=this.$foldData,U=this.getFoldLine(P),q=0;if(U){var ie=U.range.compareInside(A.row,A.column);ie==0?(U=U.split(A.row,A.column),U&&(U.shiftRow(N),U.addRemoveChars(O,0,k.column-A.column))):ie==-1&&(U.addRemoveChars(P,0,k.column-A.column),U.shiftRow(N)),q=B.indexOf(U)+1}for(q;q<B.length;q++){var U=B[q];U.start.row>=P&&U.shiftRow(N)}}else{N=Math.abs(x.start.column-x.end.column),M==="remove"&&(D=this.getFoldsInRange(x),this.removeFolds(D),N=-N);var U=this.getFoldLine(P);U&&U.addRemoveChars(P,A.column,N)}return L&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,L?this.$updateWrapData(P,O):this.$updateRowLengthCache(P,O),D},C.prototype.$updateRowLengthCache=function(x,L,M){this.$rowLengthCache[x]=null,this.$rowLengthCache[L]=null},C.prototype.$updateWrapData=function(x,L){var M=this.doc.getAllLines(),A=this.getTabSize(),k=this.$wrapData,P=this.$wrapLimit,O,N,D=x;for(L=Math.min(L,M.length-1);D<=L;)N=this.getFoldLine(D,N),N?(O=[],N.walk(function(B,U,q,H){var j;if(B!=null){j=this.$getDisplayTokens(B,O.length),j[0]=S;for(var Y=1;Y<j.length;Y++)j[Y]=b}else j=this.$getDisplayTokens(M[U].substring(H,q),O.length);O=O.concat(j)}.bind(this),N.end.row,M[N.end.row].length+1),k[N.start.row]=this.$computeWrapSplits(O,P,A),D=N.end.row+1):(O=this.$getDisplayTokens(M[D]),k[D]=this.$computeWrapSplits(O,P,A),D++)},C.prototype.$computeWrapSplits=function(x,L,M){if(x.length==0)return[];var A=[],k=x.length,P=0,O=0,N=this.$wrapAsCode,D=this.$indentedSoftWrap,B=L<=Math.max(2*M,8)||D===!1?0:Math.floor(L/2);function U(){var ie=0;if(B===0)return ie;if(D)for(var W=0;W<x.length;W++){var K=x[W];if(K==w)ie+=1;else if(K==E)ie+=M;else{if(K==T)continue;break}}return N&&D!==!1&&(ie+=M),Math.min(ie,B)}function q(ie){for(var W=ie-P,K=P;K<ie;K++){var Q=x[K];(Q===12||Q===2)&&(W-=1)}A.length||(H=U(),A.indent=H),O+=W,A.push(O),P=ie}for(var H=0;k-P>L-H;){var j=P+L-H;if(x[j-1]>=w&&x[j]>=w){q(j);continue}if(x[j]==S||x[j]==b){for(j;j!=P-1&&x[j]!=S;j--);if(j>P){q(j);continue}for(j=P+L,j;j<x.length&&x[j]==b;j++);if(j==x.length)break;q(j);continue}for(var Y=Math.max(j-(L-(L>>2)),P-1);j>Y&&x[j]<S;)j--;if(N){for(;j>Y&&x[j]<S;)j--;for(;j>Y&&x[j]==_;)j--}else for(;j>Y&&x[j]<w;)j--;if(j>Y){q(++j);continue}j=P+L,x[j]==y&&j--,q(j-H)}return A},C.prototype.$getDisplayTokens=function(x,L){var M=[],A;L=L||0;for(var k=0;k<x.length;k++){var P=x.charCodeAt(k);if(P==9){A=this.getScreenTabSize(M.length+L),M.push(E);for(var O=1;O<A;O++)M.push(T)}else P==32?M.push(w):P>39&&P<48||P>57&&P<64?M.push(_):P>=4352&&$(P)?M.push(v,y):M.push(v)}return M},C.prototype.$getStringScreenWidth=function(x,L,M){if(L==0)return[0,0];L==null&&(L=1/0),M=M||0;var A,k;for(k=0;k<x.length&&(A=x.charCodeAt(k),A==9?M+=this.getScreenTabSize(M):A>=4352&&$(A)?M+=2:M+=1,!(M>L));k++);return[M,k]},C.prototype.getRowLength=function(x){var L=1;return this.lineWidgets&&(L+=this.lineWidgets[x]&&this.lineWidgets[x].rowCount||0),!this.$useWrapMode||!this.$wrapData[x]?L:this.$wrapData[x].length+L},C.prototype.getRowLineCount=function(x){return!this.$useWrapMode||!this.$wrapData[x]?1:this.$wrapData[x].length+1},C.prototype.getRowWrapIndent=function(x){if(this.$useWrapMode){var L=this.screenToDocumentPosition(x,Number.MAX_VALUE),M=this.$wrapData[L.row];return M.length&&M[0]<L.column?M.indent:0}else return 0},C.prototype.getScreenLastRowColumn=function(x){var L=this.screenToDocumentPosition(x,Number.MAX_VALUE);return this.documentToScreenColumn(L.row,L.column)},C.prototype.getDocumentLastRowColumn=function(x,L){var M=this.documentToScreenRow(x,L);return this.getScreenLastRowColumn(M)},C.prototype.getDocumentLastRowColumnPosition=function(x,L){var M=this.documentToScreenRow(x,L);return this.screenToDocumentPosition(M,Number.MAX_VALUE/10)},C.prototype.getRowSplitData=function(x){if(this.$useWrapMode)return this.$wrapData[x]},C.prototype.getScreenTabSize=function(x){return this.$tabSize-(x%this.$tabSize|0)},C.prototype.screenToDocumentRow=function(x,L){return this.screenToDocumentPosition(x,L).row},C.prototype.screenToDocumentColumn=function(x,L){return this.screenToDocumentPosition(x,L).column},C.prototype.screenToDocumentPosition=function(x,L,M){if(x<0)return{row:0,column:0};var A,k=0,P=0,O,N=0,D=0,B=this.$screenRowCache,U=this.$getRowCacheIndex(B,x),q=B.length;if(q&&U>=0)var N=B[U],k=this.$docRowCache[U],H=x>B[q-1];else var H=!q;for(var j=this.getLength()-1,Y=this.getNextFoldLine(k),ie=Y?Y.start.row:1/0;N<=x&&(D=this.getRowLength(k),!(N+D>x||k>=j));)N+=D,k++,k>ie&&(k=Y.end.row+1,Y=this.getNextFoldLine(k,Y),ie=Y?Y.start.row:1/0),H&&(this.$docRowCache.push(k),this.$screenRowCache.push(N));if(Y&&Y.start.row<=k)A=this.getFoldDisplayLine(Y),k=Y.start.row;else{if(N+D<=x||k>j)return{row:j,column:this.getLine(j).length};A=this.getLine(k),Y=null}var W=0,K=Math.floor(x-N);if(this.$useWrapMode){var Q=this.$wrapData[k];Q&&(O=Q[K],K>0&&Q.length&&(W=Q.indent,P=Q[K-1]||Q[Q.length-1],A=A.substring(P)))}return M!==void 0&&this.$bidiHandler.isBidiRow(N+K,k,K)&&(L=this.$bidiHandler.offsetToCol(M)),P+=this.$getStringScreenWidth(A,L-W)[1],this.$useWrapMode&&P>=O&&(P=O-1),Y?Y.idxToPosition(P):{row:k,column:P}},C.prototype.documentToScreenPosition=function(x,L){if(typeof L>"u")var M=this.$clipPositionToDocument(x.row,x.column);else M=this.$clipPositionToDocument(x,L);x=M.row,L=M.column;var A=0,k=null,P=null;P=this.getFoldAt(x,L,1),P&&(x=P.start.row,L=P.start.column);var O,N=0,D=this.$docRowCache,B=this.$getRowCacheIndex(D,x),U=D.length;if(U&&B>=0)var N=D[B],A=this.$screenRowCache[B],q=x>D[U-1];else var q=!U;for(var H=this.getNextFoldLine(N),j=H?H.start.row:1/0;N<x;){if(N>=j){if(O=H.end.row+1,O>x)break;H=this.getNextFoldLine(O,H),j=H?H.start.row:1/0}else O=N+1;A+=this.getRowLength(N),N=O,q&&(this.$docRowCache.push(N),this.$screenRowCache.push(A))}var Y="";H&&N>=j?(Y=this.getFoldDisplayLine(H,x,L),k=H.start.row):(Y=this.getLine(x).substring(0,L),k=x);var ie=0;if(this.$useWrapMode){var W=this.$wrapData[k];if(W){for(var K=0;Y.length>=W[K];)A++,K++;Y=Y.substring(W[K-1]||0,Y.length),ie=K>0?W.indent:0}}return this.lineWidgets&&this.lineWidgets[N]&&this.lineWidgets[N].rowsAbove&&(A+=this.lineWidgets[N].rowsAbove),{row:A,column:ie+this.$getStringScreenWidth(Y)[0]}},C.prototype.documentToScreenColumn=function(x,L){return this.documentToScreenPosition(x,L).column},C.prototype.documentToScreenRow=function(x,L){return this.documentToScreenPosition(x,L).row},C.prototype.getScreenLength=function(){var x=0,L=null;if(this.$useWrapMode)for(var k=this.$wrapData.length,P=0,A=0,L=this.$foldData[A++],O=L?L.start.row:1/0;P<k;){var N=this.$wrapData[P];x+=N?N.length+1:1,P++,P>O&&(P=L.end.row+1,L=this.$foldData[A++],O=L?L.start.row:1/0)}else{x=this.getLength();for(var M=this.$foldData,A=0;A<M.length;A++)L=M[A],x-=L.end.row-L.start.row}return this.lineWidgets&&(x+=this.$getWidgetScreenLength()),x},C.prototype.$setFontMetrics=function(x){!this.$enableVarChar||(this.$getStringScreenWidth=function(L,M,A){if(M===0)return[0,0];M||(M=1/0),A=A||0;var k,P;for(P=0;P<L.length&&(k=L.charAt(P),k==="	"?A+=this.getScreenTabSize(A):A+=x.getCharacterWidth(k),!(A>M));P++);return[A,P]})},C.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection.detach()},C}();m.$uid=0,m.prototype.$modes=o.$modes,m.prototype.getValue=m.prototype.toString,m.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},m.prototype.$overwrite=!1,m.prototype.$mode=null,m.prototype.$modeId=null,m.prototype.$scrollTop=0,m.prototype.$scrollLeft=0,m.prototype.$wrapLimit=80,m.prototype.$useWrapMode=!1,m.prototype.$wrapLimitRange={min:null,max:null},m.prototype.lineWidgets=null,m.prototype.isFullWidth=$,s.implement(m.prototype,h);var v=1,y=2,S=3,b=4,_=9,w=10,E=11,T=12;function $(C){return C<4352?!1:C>=4352&&C<=4447||C>=4515&&C<=4519||C>=4602&&C<=4607||C>=9001&&C<=9002||C>=11904&&C<=11929||C>=11931&&C<=12019||C>=12032&&C<=12245||C>=12272&&C<=12283||C>=12288&&C<=12350||C>=12353&&C<=12438||C>=12441&&C<=12543||C>=12549&&C<=12589||C>=12593&&C<=12686||C>=12688&&C<=12730||C>=12736&&C<=12771||C>=12784&&C<=12830||C>=12832&&C<=12871||C>=12880&&C<=13054||C>=13056&&C<=19903||C>=19968&&C<=42124||C>=42128&&C<=42182||C>=43360&&C<=43388||C>=44032&&C<=55203||C>=55216&&C<=55238||C>=55243&&C<=55291||C>=63744&&C<=64255||C>=65040&&C<=65049||C>=65072&&C<=65106||C>=65108&&C<=65126||C>=65128&&C<=65131||C>=65281&&C<=65376||C>=65504&&C<=65510}i("./edit_session/folding").Folding.call(m.prototype),i("./edit_session/bracket_match").BracketMatch.call(m.prototype),o.defineOptions(m.prototype,"session",{wrap:{set:function(C){if(!C||C=="off"?C=!1:C=="free"?C=!0:C=="printMargin"?C=-1:typeof C=="string"&&(C=parseInt(C,10)||!1),this.$wrap!=C)if(this.$wrap=C,!C)this.setUseWrapMode(!1);else{var x=typeof C=="number"?C:null;this.setWrapLimitRange(x,x),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(C){C=C=="auto"?this.$mode.type!="text":C!="text",C!=this.$wrapAsCode&&(this.$wrapAsCode=C,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(C){this.$useWorker=C,this.$stopWorker(),C&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(C){C=parseInt(C),C>0&&this.$tabSize!==C&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=C,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(C){this.setFoldStyle(C)},handlesSet:!0},overwrite:{set:function(C){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(C){this.doc.setNewLineMode(C)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(C){this.setMode(C)},get:function(){return this.$modeId},handlesSet:!0}}),n.EditSession=m}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(i,n,r){var s=i("./lib/lang"),c=i("./lib/oop"),u=i("./range").Range,o=function(){function a(){this.$options={}}return a.prototype.set=function(l){return c.mixin(this.$options,l),this},a.prototype.getOptions=function(){return s.copyObject(this.$options)},a.prototype.setOptions=function(l){this.$options=l},a.prototype.find=function(l){var f=this.$options,d=this.$matchIterator(l,f);if(!d)return!1;var p=null;return d.forEach(function(g,m,v,y){return p=new u(g,m,v,y),m==y&&f.start&&f.start.start&&f.skipCurrent!=!1&&p.isEqual(f.start)?(p=null,!1):!0}),p},a.prototype.findAll=function(l){var f=this.$options;if(!f.needle)return[];this.$assembleRegExp(f);var d=f.range,p=d?l.getLines(d.start.row,d.end.row):l.doc.getAllLines(),g=[],m=f.re;if(f.$isMultiLine){var v=m.length,y=p.length-v,S;e:for(var b=m.offset||0;b<=y;b++){for(var _=0;_<v;_++)if(p[b+_].search(m[_])==-1)continue e;var w=p[b],E=p[b+v-1],T=w.length-w.match(m[0])[0].length,$=E.match(m[v-1])[0].length;S&&S.end.row===b&&S.end.column>T||(g.push(S=new u(b,T,b+v-1,$)),v>2&&(b=b+v-2))}}else for(var C=0;C<p.length;C++)for(var x=s.getMatchOffsets(p[C],m),_=0;_<x.length;_++){var L=x[_];g.push(new u(C,L.offset,C,L.offset+L.length))}if(d){for(var M=d.start.column,A=d.end.column,C=0,_=g.length-1;C<_&&g[C].start.column<M&&g[C].start.row==0;)C++;for(var k=d.end.row-d.start.row;C<_&&g[_].end.column>A&&g[_].end.row==k;)_--;for(g=g.slice(C,_+1),C=0,_=g.length;C<_;C++)g[C].start.row+=d.start.row,g[C].end.row+=d.start.row}return g},a.prototype.replace=function(l,f){var d=this.$options,p=this.$assembleRegExp(d);if(d.$isMultiLine)return f;if(!!p){var g=p.exec(l);if(!g||g[0].length!=l.length)return null;if(f=l.replace(p,f),d.preserveCase){f=f.split("");for(var m=Math.min(l.length,l.length);m--;){var v=l[m];v&&v.toLowerCase()!=v?f[m]=f[m].toUpperCase():f[m]=f[m].toLowerCase()}f=f.join("")}return f}},a.prototype.$assembleRegExp=function(l,f){if(l.needle instanceof RegExp)return l.re=l.needle;var d=l.needle;if(!l.needle)return l.re=!1;l.regExp||(d=s.escapeRegExp(d)),l.wholeWord&&(d=h(d,l));var p=l.caseSensitive?"gm":"gmi";if(l.$isMultiLine=!f&&/[\n\r]/.test(d),l.$isMultiLine)return l.re=this.$assembleMultilineRegExp(d,p);try{var g=new RegExp(d,p)}catch{g=!1}return l.re=g},a.prototype.$assembleMultilineRegExp=function(l,f){for(var d=l.replace(/\r\n|\r|\n/g,`$
^`).split(`
`),p=[],g=0;g<d.length;g++)try{p.push(new RegExp(d[g],f))}catch{return!1}return p},a.prototype.$matchIterator=function(l,f){var d=this.$assembleRegExp(f);if(!d)return!1;var p=f.backwards==!0,g=f.skipCurrent!=!1,m=f.range,v=f.start;v||(v=m?m[p?"end":"start"]:l.selection.getRange()),v.start&&(v=v[g!=p?"end":"start"]);var y=m?m.start.row:0,S=m?m.end.row:l.getLength()-1;if(p)var b=function(E){var T=v.row;if(!w(T,v.column,E)){for(T--;T>=y;T--)if(w(T,Number.MAX_VALUE,E))return;if(f.wrap!=!1){for(T=S,y=v.row;T>=y;T--)if(w(T,Number.MAX_VALUE,E))return}}};else var b=function(T){var $=v.row;if(!w($,v.column,T)){for($=$+1;$<=S;$++)if(w($,0,T))return;if(f.wrap!=!1){for($=y,S=v.row;$<=S;$++)if(w($,0,T))return}}};if(f.$isMultiLine)var _=d.length,w=function(E,T,$){var C=p?E-_+1:E;if(!(C<0||C+_>l.getLength())){var x=l.getLine(C),L=x.search(d[0]);if(!(!p&&L<T||L===-1)){for(var M=1;M<_;M++)if(x=l.getLine(C+M),x.search(d[M])==-1)return;var A=x.match(d[_-1])[0].length;if(!(p&&A>T)&&$(C,L,C+_-1,A))return!0}}};else if(p)var w=function(T,$,C){var x=l.getLine(T),L=[],M,A=0;for(d.lastIndex=0;M=d.exec(x);){var k=M[0].length;if(A=M.index,!k){if(A>=x.length)break;d.lastIndex=A+=1}if(M.index+k>$)break;L.push(M.index,k)}for(var P=L.length-1;P>=0;P-=2){var O=L[P-1],k=L[P];if(C(T,O,T,O+k))return!0}};else var w=function(T,$,C){var x=l.getLine(T),L,M;for(d.lastIndex=$;M=d.exec(x);){var A=M[0].length;if(L=M.index,C(T,L,T,L+A))return!0;if(!A&&(d.lastIndex=L+=1,L>=x.length))return!1}};return{forEach:b}},a}();function h(a,l){function f(d){return/\w/.test(d)||l.regExp?"\\b":""}return f(a[0])+a+f(a[a.length-1])}n.Search=o}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(i,n,r){var s=this&&this.__extends||function(){var f=function(d,p){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,m){g.__proto__=m}||function(g,m){for(var v in m)Object.prototype.hasOwnProperty.call(m,v)&&(g[v]=m[v])},f(d,p)};return function(d,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");f(d,p);function g(){this.constructor=d}d.prototype=p===null?Object.create(p):(g.prototype=p.prototype,new g)}}(),c=i("../lib/keys"),u=i("../lib/useragent"),o=c.KEY_MODS,h=function(){function f(d,p){this.$init(d,p,!1)}return f.prototype.$init=function(d,p,g){this.platform=p||(u.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(d),this.$singleCommand=g},f.prototype.addCommand=function(d){this.commands[d.name]&&this.removeCommand(d),this.commands[d.name]=d,d.bindKey&&this._buildKeyHash(d)},f.prototype.removeCommand=function(d,p){var g=d&&(typeof d=="string"?d:d.name);d=this.commands[g],p||delete this.commands[g];var m=this.commandKeyBinding;for(var v in m){var y=m[v];if(y==d)delete m[v];else if(Array.isArray(y)){var S=y.indexOf(d);S!=-1&&(y.splice(S,1),y.length==1&&(m[v]=y[0]))}}},f.prototype.bindKey=function(d,p,g){if(typeof d=="object"&&d&&(g==null&&(g=d.position),d=d[this.platform]),!!d){if(typeof p=="function")return this.addCommand({exec:p,bindKey:d,name:p.name||d});d.split("|").forEach(function(m){var v="";if(m.indexOf(" ")!=-1){var y=m.split(/\s+/);m=y.pop(),y.forEach(function(_){var w=this.parseKeys(_),E=o[w.hashId]+w.key;v+=(v?" ":"")+E,this._addCommandToBinding(v,"chainKeys")},this),v+=" "}var S=this.parseKeys(m),b=o[S.hashId]+S.key;this._addCommandToBinding(v+b,p,g)},this)}},f.prototype._addCommandToBinding=function(d,p,g){var m=this.commandKeyBinding,v;if(!p)delete m[d];else if(!m[d]||this.$singleCommand)m[d]=p;else{Array.isArray(m[d])?(v=m[d].indexOf(p))!=-1&&m[d].splice(v,1):m[d]=[m[d]],typeof g!="number"&&(g=a(p));var y=m[d];for(v=0;v<y.length;v++){var S=y[v],b=a(S);if(b>g)break}y.splice(v,0,p)}},f.prototype.addCommands=function(d){d&&Object.keys(d).forEach(function(p){var g=d[p];if(!!g){if(typeof g=="string")return this.bindKey(g,p);typeof g=="function"&&(g={exec:g}),typeof g=="object"&&(g.name||(g.name=p),this.addCommand(g))}},this)},f.prototype.removeCommands=function(d){Object.keys(d).forEach(function(p){this.removeCommand(d[p])},this)},f.prototype.bindKeys=function(d){Object.keys(d).forEach(function(p){this.bindKey(p,d[p])},this)},f.prototype._buildKeyHash=function(d){this.bindKey(d.bindKey,d)},f.prototype.parseKeys=function(d){var p=d.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(b){return b}),g=p.pop(),m=c[g];if(c.FUNCTION_KEYS[m])g=c.FUNCTION_KEYS[m].toLowerCase();else if(p.length){if(p.length==1&&p[0]=="shift")return{key:g.toUpperCase(),hashId:-1}}else return{key:g,hashId:-1};for(var v=0,y=p.length;y--;){var S=c.KEY_MODS[p[y]];if(S==null)return typeof console<"u"&&console.error("invalid modifier "+p[y]+" in "+d),!1;v|=S}return{key:g,hashId:v}},f.prototype.findKeyCommand=function(d,p){var g=o[d]+p;return this.commandKeyBinding[g]},f.prototype.handleKeyboard=function(d,p,g,m){if(!(m<0)){var v=o[p]+g,y=this.commandKeyBinding[v];return d.$keyChain&&(d.$keyChain+=" "+v,y=this.commandKeyBinding[d.$keyChain]||y),y&&(y=="chainKeys"||y[y.length-1]=="chainKeys")?(d.$keyChain=d.$keyChain||v,{command:"null"}):(d.$keyChain&&((!p||p==4)&&g.length==1?d.$keyChain=d.$keyChain.slice(0,-v.length-1):(p==-1||m>0)&&(d.$keyChain="")),{command:y})}},f.prototype.getStatusText=function(d,p){return p.$keyChain||""},f}();function a(f){return typeof f=="object"&&f.bindKey&&f.bindKey.position||(f.isDefault?-100:0)}var l=function(f){s(d,f);function d(p,g){var m=f.call(this,p,g)||this;return m.$singleCommand=!0,m}return d}(h);l.call=function(f,d,p){h.prototype.$init.call(f,d,p,!0)},h.call=function(f,d,p){h.prototype.$init.call(f,d,p,!1)},n.HashHandler=l,n.MultiHashHandler=h}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(i,n,r){var s=this&&this.__extends||function(){var a=function(l,f){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,p){d.__proto__=p}||function(d,p){for(var g in p)Object.prototype.hasOwnProperty.call(p,g)&&(d[g]=p[g])},a(l,f)};return function(l,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");a(l,f);function d(){this.constructor=l}l.prototype=f===null?Object.create(f):(d.prototype=f.prototype,new d)}}(),c=i("../lib/oop"),u=i("../keyboard/hash_handler").MultiHashHandler,o=i("../lib/event_emitter").EventEmitter,h=function(a){s(l,a);function l(f,d){var p=a.call(this,d,f)||this;return p.byName=p.commands,p.setDefaultHandler("exec",function(g){return g.args?g.command.exec(g.editor,g.args,g.event,!1):g.command.exec(g.editor,{},g.event,!0)}),p}return l.prototype.exec=function(f,d,p){if(Array.isArray(f)){for(var g=f.length;g--;)if(this.exec(f[g],d,p))return!0;return!1}if(typeof f=="string"&&(f=this.commands[f]),!f||d&&d.$readOnly&&!f.readOnly||this.$checkCommandState!=!1&&f.isAvailable&&!f.isAvailable(d))return!1;var m={editor:d,command:f,args:p};return m.returnValue=this._emit("exec",m),this._signal("afterExec",m),m.returnValue!==!1},l.prototype.toggleRecording=function(f){if(!this.$inReplay)return f&&f._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(d){this.macro.push([d.command,d.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},l.prototype.replay=function(f){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(f);try{this.$inReplay=!0,this.macro.forEach(function(d){typeof d=="string"?this.exec(d,f):this.exec(d[0],f,d[1])},this)}finally{this.$inReplay=!1}}},l.prototype.trimMacro=function(f){return f.map(function(d){return typeof d[0]!="string"&&(d[0]=d[0].name),d[1]||(d=d[0]),d})},l}(u);c.implement(h.prototype,o),n.CommandManager=h}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(i,n,r){var s=i("../lib/lang"),c=i("../config"),u=i("../range").Range;function o(a,l){return{win:a,mac:l}}n.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:o("Ctrl-,","Command-,"),exec:function(a){c.loadModule("ace/ext/settings_menu",function(l){l.init(a),a.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:o("Alt-E","F4"),exec:function(a){c.loadModule("ace/ext/error_marker",function(l){l.showErrorMarker(a,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:o("Alt-Shift-E","Shift-F4"),exec:function(a){c.loadModule("ace/ext/error_marker",function(l){l.showErrorMarker(a,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:o("Ctrl-A","Command-A"),exec:function(a){a.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:o(null,"Ctrl-L"),exec:function(a){a.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:o("Ctrl-L","Command-L"),exec:function(a,l){typeof l=="number"&&!isNaN(l)&&a.gotoLine(l),a.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:o("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(a){a.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:o("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(a){a.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:o("F2","F2"),exec:function(a){a.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:o("Alt-F2","Alt-F2"),exec:function(a){a.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:o(null,"Ctrl-Command-Option-0"),exec:function(a){a.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:o(null,"Ctrl-Command-Option-0"),exec:function(a){a.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:o("Alt-0","Command-Option-0"),exec:function(a){a.session.foldAll(),a.session.unfold(a.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:o("Alt-Shift-0","Command-Option-Shift-0"),exec:function(a){a.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:o("Ctrl-K","Command-G"),exec:function(a){a.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:o("Ctrl-Shift-K","Command-Shift-G"),exec:function(a){a.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:o("Alt-K","Ctrl-G"),exec:function(a){a.selection.isEmpty()?a.selection.selectWord():a.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:o("Alt-Shift-K","Ctrl-Shift-G"),exec:function(a){a.selection.isEmpty()?a.selection.selectWord():a.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:o("Ctrl-F","Command-F"),exec:function(a){c.loadModule("ace/ext/searchbox",function(l){l.Search(a)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(a){a.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:o("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(a){a.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:o("Ctrl-Home","Command-Home|Command-Up"),exec:function(a){a.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:o("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(a){a.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:o("Up","Up|Ctrl-P"),exec:function(a,l){a.navigateUp(l.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:o("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(a){a.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:o("Ctrl-End","Command-End|Command-Down"),exec:function(a){a.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:o("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(a){a.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:o("Down","Down|Ctrl-N"),exec:function(a,l){a.navigateDown(l.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:o("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(a){a.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:o("Ctrl-Left","Option-Left"),exec:function(a){a.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:o("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(a){a.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:o("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(a){a.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:o("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(a){a.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:o("Left","Left|Ctrl-B"),exec:function(a,l){a.navigateLeft(l.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:o("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(a){a.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:o("Ctrl-Right","Option-Right"),exec:function(a){a.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:o("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(a){a.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:o("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(a){a.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:o("Shift-Right","Shift-Right"),exec:function(a){a.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:o("Right","Right|Ctrl-F"),exec:function(a,l){a.navigateRight(l.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(a){a.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:o(null,"Option-PageDown"),exec:function(a){a.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:o("PageDown","PageDown|Ctrl-V"),exec:function(a){a.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(a){a.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:o(null,"Option-PageUp"),exec:function(a){a.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(a){a.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:o("Ctrl-Up",null),exec:function(a){a.renderer.scrollBy(0,-2*a.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:o("Ctrl-Down",null),exec:function(a){a.renderer.scrollBy(0,2*a.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(a){a.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(a){a.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:o("Ctrl-Alt-E","Command-Option-E"),exec:function(a){a.commands.toggleRecording(a)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:o("Ctrl-Shift-E","Command-Shift-E"),exec:function(a){a.commands.replay(a)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:o("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(a){a.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:o("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(a){a.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:o("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(a){a.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:o(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(a){},readOnly:!0},{name:"cut",description:"Cut",exec:function(a){var l=a.$copyWithEmptySelection&&a.selection.isEmpty(),f=l?a.selection.getLineRange():a.selection.getRange();a._emit("cut",f),f.isEmpty()||a.session.remove(f),a.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(a,l){a.$handlePaste(l)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:o("Ctrl-D","Command-D"),exec:function(a){a.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:o("Ctrl-Shift-D","Command-Shift-D"),exec:function(a){a.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:o("Ctrl-Alt-S","Command-Alt-S"),exec:function(a){a.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:o("Ctrl-/","Command-/"),exec:function(a){a.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:o("Ctrl-Shift-/","Command-Shift-/"),exec:function(a){a.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:o("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(a){a.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:o("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(a){a.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:o("Ctrl-H","Command-Option-F"),exec:function(a){c.loadModule("ace/ext/searchbox",function(l){l.Search(a,!0)})}},{name:"undo",description:"Undo",bindKey:o("Ctrl-Z","Command-Z"),exec:function(a){a.undo()}},{name:"redo",description:"Redo",bindKey:o("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(a){a.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:o("Alt-Shift-Up","Command-Option-Up"),exec:function(a){a.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:o("Alt-Up","Option-Up"),exec:function(a){a.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:o("Alt-Shift-Down","Command-Option-Down"),exec:function(a){a.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:o("Alt-Down","Option-Down"),exec:function(a){a.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:o("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(a){a.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:o("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(a){a.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:o("Shift-Delete",null),exec:function(a){if(a.selection.isEmpty())a.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:o("Alt-Backspace","Command-Backspace"),exec:function(a){a.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:o("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(a){a.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:o("Ctrl-Shift-Backspace",null),exec:function(a){var l=a.selection.getRange();l.start.column=0,a.session.remove(l)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:o("Ctrl-Shift-Delete",null),exec:function(a){var l=a.selection.getRange();l.end.column=Number.MAX_VALUE,a.session.remove(l)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:o("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(a){a.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:o("Ctrl-Delete","Alt-Delete"),exec:function(a){a.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:o("Shift-Tab","Shift-Tab"),exec:function(a){a.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:o("Tab","Tab"),exec:function(a){a.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:o("Ctrl-[","Ctrl-["),exec:function(a){a.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:o("Ctrl-]","Ctrl-]"),exec:function(a){a.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(a,l){a.insert(l)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(a,l){a.insert(s.stringRepeat(l.text||"",l.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:o(null,"Ctrl-O"),exec:function(a){a.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:o("Alt-Shift-X","Ctrl-T"),exec:function(a){a.transposeLetters()},multiSelectAction:function(a){a.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:o("Ctrl-U","Ctrl-U"),exec:function(a){a.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:o("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(a){a.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:o(null,null),exec:function(a){a.autoIndent()},multiSelectAction:"forEachLine",scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:o("Ctrl-Shift-L","Command-Shift-L"),exec:function(a){var l=a.selection.getRange();l.start.column=l.end.column=0,l.end.row++,a.selection.setRange(l,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:o("Ctrl+F3","F3"),exec:function(a){a.openLink()}},{name:"joinlines",description:"Join lines",bindKey:o(null,null),exec:function(a){for(var l=a.selection.isBackwards(),f=l?a.selection.getSelectionLead():a.selection.getSelectionAnchor(),d=l?a.selection.getSelectionAnchor():a.selection.getSelectionLead(),p=a.session.doc.getLine(f.row).length,g=a.session.doc.getTextRange(a.selection.getRange()),m=g.replace(/\n\s*/," ").length,v=a.session.doc.getLine(f.row),y=f.row+1;y<=d.row+1;y++){var S=s.stringTrimLeft(s.stringTrimRight(a.session.doc.getLine(y)));S.length!==0&&(S=" "+S),v+=S}d.row+1<a.session.doc.getLength()-1&&(v+=a.session.doc.getNewLineCharacter()),a.clearSelection(),a.session.doc.replace(new u(f.row,0,d.row+2,0),v),m>0?(a.selection.moveCursorTo(f.row,f.column),a.selection.selectTo(f.row,f.column+m)):(p=a.session.doc.getLine(f.row).length>p?p+1:p,a.selection.moveCursorTo(f.row,p))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:o(null,null),exec:function(a){var l=a.session.doc.getLength()-1,f=a.session.doc.getLine(l).length,d=a.selection.rangeList.ranges,p=[];d.length<1&&(d=[a.selection.getRange()]);for(var g=0;g<d.length;g++)g==d.length-1&&(d[g].end.row===l&&d[g].end.column===f||p.push(new u(d[g].end.row,d[g].end.column,l,f))),g===0?d[g].start.row===0&&d[g].start.column===0||p.push(new u(0,0,d[g].start.row,d[g].start.column)):p.push(new u(d[g-1].end.row,d[g-1].end.column,d[g].start.row,d[g].start.column));a.exitMultiSelectMode(),a.clearSelection();for(var g=0;g<p.length;g++)a.selection.addRange(p[g],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(a){a.selection.clearSelection(),a.navigateLineEnd(),a.insert(`
`)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(a){a.selection.clearSelection();var l=a.getCursorPosition();a.selection.moveTo(l.row-1,Number.MAX_VALUE),a.insert(`
`),l.row===0&&a.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",description:"Open command palette",bindKey:o("F1","F1"),exec:function(a){a.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:o(null,null),exec:function(a){a.prompt({$type:"modes"})},readOnly:!0}];for(var h=1;h<9;h++)n.commands.push({name:"foldToLevel"+h,description:"Fold To Level "+h,level:h,exec:function(a){a.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(i,n,r){var s=i("./lib/dom"),c=function(){function u(o){this.session=o,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}return u.prototype.getRowLength=function(o){var h;return this.lineWidgets?h=this.lineWidgets[o]&&this.lineWidgets[o].rowCount||0:h=0,!this.$useWrapMode||!this.$wrapData[o]?1+h:this.$wrapData[o].length+1+h},u.prototype.$getWidgetScreenLength=function(){var o=0;return this.lineWidgets.forEach(function(h){h&&h.rowCount&&!h.hidden&&(o+=h.rowCount)}),o},u.prototype.$onChangeEditor=function(o){this.attach(o.editor)},u.prototype.attach=function(o){o&&o.widgetManager&&o.widgetManager!=this&&o.widgetManager.detach(),this.editor!=o&&(this.detach(),this.editor=o,o&&(o.widgetManager=this,o.renderer.on("beforeRender",this.measureWidgets),o.renderer.on("afterRender",this.renderWidgets)))},u.prototype.detach=function(o){var h=this.editor;if(!!h){this.editor=null,h.widgetManager=null,h.renderer.off("beforeRender",this.measureWidgets),h.renderer.off("afterRender",this.renderWidgets);var a=this.session.lineWidgets;a&&a.forEach(function(l){l&&l.el&&l.el.parentNode&&(l._inDocument=!1,l.el.parentNode.removeChild(l.el))})}},u.prototype.updateOnFold=function(o,h){var a=h.lineWidgets;if(!(!a||!o.action)){for(var l=o.data,f=l.start.row,d=l.end.row,p=o.action=="add",g=f+1;g<d;g++)a[g]&&(a[g].hidden=p);a[d]&&(p?a[f]?a[d].hidden=p:a[f]=a[d]:(a[f]==a[d]&&(a[f]=void 0),a[d].hidden=p))}},u.prototype.updateOnChange=function(o){var h=this.session.lineWidgets;if(!!h){var a=o.start.row,l=o.end.row-a;if(l!==0)if(o.action=="remove"){var f=h.splice(a+1,l);!h[a]&&f[f.length-1]&&(h[a]=f.pop()),f.forEach(function(p){p&&this.removeLineWidget(p)},this),this.$updateRows()}else{var d=new Array(l);h[a]&&h[a].column!=null&&o.start.column>h[a].column&&a++,d.unshift(a,0),h.splice.apply(h,d),this.$updateRows()}}},u.prototype.$updateRows=function(){var o=this.session.lineWidgets;if(!!o){var h=!0;o.forEach(function(a,l){if(a)for(h=!1,a.row=l;a.$oldWidget;)a.$oldWidget.row=l,a=a.$oldWidget}),h&&(this.session.lineWidgets=null)}},u.prototype.$registerLineWidget=function(o){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var h=this.session.lineWidgets[o.row];return h&&(o.$oldWidget=h,h.el&&h.el.parentNode&&(h.el.parentNode.removeChild(h.el),h._inDocument=!1)),this.session.lineWidgets[o.row]=o,o},u.prototype.addLineWidget=function(o){if(this.$registerLineWidget(o),o.session=this.session,!this.editor)return o;var h=this.editor.renderer;o.html&&!o.el&&(o.el=s.createElement("div"),o.el.innerHTML=o.html),o.text&&!o.el&&(o.el=s.createElement("div"),o.el.textContent=o.text),o.el&&(s.addCssClass(o.el,"ace_lineWidgetContainer"),o.className&&s.addCssClass(o.el,o.className),o.el.style.position="absolute",o.el.style.zIndex=5,h.container.appendChild(o.el),o._inDocument=!0,o.coverGutter||(o.el.style.zIndex=3),o.pixelHeight==null&&(o.pixelHeight=o.el.offsetHeight)),o.rowCount==null&&(o.rowCount=o.pixelHeight/h.layerConfig.lineHeight);var a=this.session.getFoldAt(o.row,0);if(o.$fold=a,a){var l=this.session.lineWidgets;o.row==a.end.row&&!l[a.start.row]?l[a.start.row]=o:o.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:o.row}}}),this.$updateRows(),this.renderWidgets(null,h),this.onWidgetChanged(o),o},u.prototype.removeLineWidget=function(o){if(o._inDocument=!1,o.session=null,o.el&&o.el.parentNode&&o.el.parentNode.removeChild(o.el),o.editor&&o.editor.destroy)try{o.editor.destroy()}catch{}if(this.session.lineWidgets){var h=this.session.lineWidgets[o.row];if(h==o)this.session.lineWidgets[o.row]=o.$oldWidget,o.$oldWidget&&this.onWidgetChanged(o.$oldWidget);else for(;h;){if(h.$oldWidget==o){h.$oldWidget=o.$oldWidget;break}h=h.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:o.row}}}),this.$updateRows()},u.prototype.getWidgetsAtRow=function(o){for(var h=this.session.lineWidgets,a=h&&h[o],l=[];a;)l.push(a),a=a.$oldWidget;return l},u.prototype.onWidgetChanged=function(o){this.session._changedWidgets.push(o),this.editor&&this.editor.renderer.updateFull()},u.prototype.measureWidgets=function(o,h){var a=this.session._changedWidgets,l=h.layerConfig;if(!(!a||!a.length)){for(var f=1/0,d=0;d<a.length;d++){var p=a[d];if(!(!p||!p.el)&&p.session==this.session){if(!p._inDocument){if(this.session.lineWidgets[p.row]!=p)continue;p._inDocument=!0,h.container.appendChild(p.el)}p.h=p.el.offsetHeight,p.fixedWidth||(p.w=p.el.offsetWidth,p.screenWidth=Math.ceil(p.w/l.characterWidth));var g=p.h/l.lineHeight;p.coverLine&&(g-=this.session.getRowLineCount(p.row),g<0&&(g=0)),p.rowCount!=g&&(p.rowCount=g,p.row<f&&(f=p.row))}}f!=1/0&&(this.session._emit("changeFold",{data:{start:{row:f}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},u.prototype.renderWidgets=function(o,h){var a=h.layerConfig,l=this.session.lineWidgets;if(!!l){for(var f=Math.min(this.firstRow,a.firstRow),d=Math.max(this.lastRow,a.lastRow,l.length);f>0&&!l[f];)f--;this.firstRow=a.firstRow,this.lastRow=a.lastRow,h.$cursorLayer.config=a;for(var p=f;p<=d;p++){var g=l[p];if(!(!g||!g.el)){if(g.hidden){g.el.style.top=-100-(g.pixelHeight||0)+"px";continue}g._inDocument||(g._inDocument=!0,h.container.appendChild(g.el));var m=h.$cursorLayer.getPixelPosition({row:p,column:0},!0).top;g.coverLine||(m+=a.lineHeight*this.session.getRowLineCount(g.row)),g.el.style.top=m-a.offset+"px";var v=g.coverGutter?0:h.gutterWidth;g.fixedWidth||(v-=h.scrollLeft),g.el.style.left=v+"px",g.fullWidth&&g.screenWidth&&(g.el.style.minWidth=a.width+2*a.padding+"px"),g.fixedWidth?g.el.style.right=h.scrollBar.getWidth()+"px":g.el.style.right=""}}}},u}();n.LineWidgets=c}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys","ace/mouse/default_gutter_handler"],function(i,n,r){var s=i("../lib/keys"),c=i("../mouse/default_gutter_handler").GutterTooltip,u=function(){function o(h){this.editor=h,this.gutterLayer=h.renderer.$gutterLayer,this.element=h.renderer.$gutter,this.lines=h.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new c(this.editor)}return o.prototype.addListener=function(){this.element.addEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.addEventListener("focusout",this.$blurGutter.bind(this)),this.editor.on("mousewheel",this.$blurGutter.bind(this))},o.prototype.removeListener=function(){this.element.removeEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.removeEventListener("focusout",this.$blurGutter.bind(this)),this.editor.off("mousewheel",this.$blurGutter.bind(this))},o.prototype.$onGutterKeyDown=function(h){if(this.annotationTooltip.isOpen){h.preventDefault(),h.keyCode===s.escape&&this.annotationTooltip.hide();return}if(h.target===this.element){if(h.keyCode!=s.enter)return;h.preventDefault();var a=this.editor.getCursorPosition().row;this.editor.isRowVisible(a)||this.editor.scrollToLine(a,!0,!0),setTimeout(function(){var g=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),m=this.$findNearestFoldWidget(g),v=this.$findNearestAnnotation(g);if(!(m===null&&v===null)){if(m===null&&v!==null){this.activeRowIndex=v,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}if(m!==null&&v===null){this.activeRowIndex=m,this.activeLane="fold",this.$focusFoldWidget(this.activeRowIndex);return}if(Math.abs(v-g)<Math.abs(m-g)){this.activeRowIndex=v,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}else{this.activeRowIndex=m,this.activeLane="fold",this.$focusFoldWidget(this.activeRowIndex);return}}}.bind(this),10);return}if(h.keyCode===s.tab){h.preventDefault();return}if(h.keyCode===s.escape){h.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;return}if(h.keyCode===s.up){switch(h.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}return}if(h.keyCode===s.down){switch(h.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}return}if(h.keyCode===s.left&&(h.preventDefault(),this.$switchLane("annotation")),h.keyCode===s.right&&(h.preventDefault(),this.$switchLane("fold")),h.keyCode===s.enter||h.keyCode===s.space){switch(h.preventDefault(),this.activeLane){case"fold":if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="start"){var l=this.$rowIndexToRow(this.activeRowIndex);this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),h),setTimeout(function(){this.$rowIndexToRow(this.activeRowIndex)!==l&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(l),this.$focusFoldWidget(this.activeRowIndex))}.bind(this),10);break}else if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="end")break;return;case"annotation":var f=this.lines.cells[this.activeRowIndex].element.childNodes[2],d=f.getBoundingClientRect(),p=this.annotationTooltip.getElement().style;p.left=d.right+"px",p.top=d.bottom+"px",this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex));break}return}},o.prototype.$blurGutter=function(){if(this.activeRowIndex!==null)switch(this.activeLane){case"fold":this.$blurFoldWidget(this.activeRowIndex);break;case"annotation":this.$blurAnnotation(this.activeRowIndex);break}this.annotationTooltip.isOpen&&this.annotationTooltip.hide()},o.prototype.$isFoldWidgetVisible=function(h){var a=this.editor.isRowFullyVisible(this.$rowIndexToRow(h)),l=this.$getFoldWidget(h).style.display!=="none";return a&&l},o.prototype.$isAnnotationVisible=function(h){var a=this.editor.isRowFullyVisible(this.$rowIndexToRow(h)),l=this.$getAnnotation(h).style.display!=="none";return a&&l},o.prototype.$getFoldWidget=function(h){var a=this.lines.get(h),l=a.element;return l.childNodes[1]},o.prototype.$getAnnotation=function(h){var a=this.lines.get(h),l=a.element;return l.childNodes[2]},o.prototype.$findNearestFoldWidget=function(h){if(this.$isFoldWidgetVisible(h))return h;for(var a=0;h-a>0||h+a<this.lines.getLength()-1;){if(a++,h-a>=0&&this.$isFoldWidgetVisible(h-a))return h-a;if(h+a<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(h+a))return h+a}return null},o.prototype.$findNearestAnnotation=function(h){if(this.$isAnnotationVisible(h))return h;for(var a=0;h-a>0||h+a<this.lines.getLength()-1;){if(a++,h-a>=0&&this.$isAnnotationVisible(h-a))return h-a;if(h+a<=this.lines.getLength()-1&&this.$isAnnotationVisible(h+a))return h+a}return null},o.prototype.$focusFoldWidget=function(h){if(h!=null){var a=this.$getFoldWidget(h);a.classList.add(this.editor.renderer.keyboardFocusClassName),a.focus()}},o.prototype.$focusAnnotation=function(h){if(h!=null){var a=this.$getAnnotation(h);a.classList.add(this.editor.renderer.keyboardFocusClassName),a.setAttribute("role","button"),a.focus()}},o.prototype.$blurFoldWidget=function(h){var a=this.$getFoldWidget(h);a.classList.remove(this.editor.renderer.keyboardFocusClassName),a.blur()},o.prototype.$blurAnnotation=function(h){var a=this.$getAnnotation(h);a.classList.remove(this.editor.renderer.keyboardFocusClassName),a.removeAttribute("role"),a.blur()},o.prototype.$moveFoldWidgetUp=function(){for(var h=this.activeRowIndex;h>0;)if(h--,this.$isFoldWidgetVisible(h)){this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=h,this.$focusFoldWidget(this.activeRowIndex);return}},o.prototype.$moveFoldWidgetDown=function(){for(var h=this.activeRowIndex;h<this.lines.getLength()-1;)if(h++,this.$isFoldWidgetVisible(h)){this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=h,this.$focusFoldWidget(this.activeRowIndex);return}},o.prototype.$moveAnnotationUp=function(){for(var h=this.activeRowIndex;h>0;)if(h--,this.$isAnnotationVisible(h)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=h,this.$focusAnnotation(this.activeRowIndex);return}},o.prototype.$moveAnnotationDown=function(){for(var h=this.activeRowIndex;h<this.lines.getLength()-1;)if(h++,this.$isAnnotationVisible(h)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=h,this.$focusAnnotation(this.activeRowIndex);return}},o.prototype.$switchLane=function(h){switch(h){case"annotation":if(this.activeLane==="annotation")break;var a=this.$findNearestAnnotation(this.activeRowIndex);if(a==null)break;this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=a,this.$focusAnnotation(this.activeRowIndex);break;case"fold":if(this.activeLane==="fold")break;var l=this.$findNearestFoldWidget(this.activeRowIndex);if(l==null)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=l,this.$focusFoldWidget(this.activeRowIndex);break}},o.prototype.$rowIndexToRow=function(h){var a=this.lines.get(h);return a?a.row:null},o.prototype.$rowToRowIndex=function(h){for(var a=0;a<this.lines.getLength();a++){var l=this.lines.get(a);if(l.row==h)return a}return null},o}();n.GutterKeyboardHandler=u}),ace.define("ace/editor",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator","ace/line_widgets","ace/keyboard/gutter_handler","ace/config","ace/clipboard","ace/lib/keys"],function(i,n,r){var s=this&&this.__values||function(M){var A=typeof Symbol=="function"&&Symbol.iterator,k=A&&M[A],P=0;if(k)return k.call(M);if(M&&typeof M.length=="number")return{next:function(){return M&&P>=M.length&&(M=void 0),{value:M&&M[P++],done:!M}}};throw new TypeError(A?"Object is not iterable.":"Symbol.iterator is not defined.")},c=i("./lib/oop"),u=i("./lib/dom"),o=i("./lib/lang"),h=i("./lib/useragent"),a=i("./keyboard/textinput").TextInput,l=i("./mouse/mouse_handler").MouseHandler,f=i("./mouse/fold_handler").FoldHandler,d=i("./keyboard/keybinding").KeyBinding,p=i("./edit_session").EditSession,g=i("./search").Search,m=i("./range").Range,v=i("./lib/event_emitter").EventEmitter,y=i("./commands/command_manager").CommandManager,S=i("./commands/default_commands").commands,b=i("./config"),_=i("./token_iterator").TokenIterator,w=i("./line_widgets").LineWidgets,E=i("./keyboard/gutter_handler").GutterKeyboardHandler,T=i("./config").nls,$=i("./clipboard"),C=i("./lib/keys"),x=function(){function M(A,k,P){this.$toDestroy=[];var O=A.getContainerElement();this.container=O,this.renderer=A,this.id="editor"+ ++M.$uid,this.commands=new y(h.isMac?"mac":"win",S),typeof document=="object"&&(this.textInput=new a(A.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new l(this),new f(this)),this.keyBinding=new d(this),this.$search=new g().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=o.delayedCall(function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",function(N,D){D._$emitInputEvent.schedule(31)}),this.setSession(k||P&&P.session||new p("")),b.resetOptions(this),P&&this.setOptions(P),b._signal("editor",this)}return M.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=o.delayedCall(this.endOperation.bind(this,!0)),this.on("change",function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.docChanged=!0}.bind(this),!0),this.on("changeSelection",function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.selectionChanged=!0}.bind(this),!0)},M.prototype.startOperation=function(A){if(this.curOp){if(!A||this.curOp.command)return;this.prevOp=this.curOp}A||(this.previousCommand=null,A={}),this.$opResetTimer.schedule(),this.curOp=this.session.curOp={command:A.command||{},args:A.args,scrollTop:this.renderer.scrollTop},this.curOp.selectionBefore=this.selection.toJSON()},M.prototype.endOperation=function(A){if(this.curOp&&this.session){if(A&&A.returnValue===!1||!this.session)return this.curOp=null;if(A==!0&&this.curOp.command&&this.curOp.command.name=="mouse"||(this._signal("beforeEndOperation"),!this.curOp))return;var k=this.curOp.command,P=k&&k.scrollIntoView;if(P){switch(P){case"center-animate":P="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var O=this.selection.getRange(),N=this.renderer.layerConfig;(O.start.row>=N.lastRow||O.end.row<=N.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}P=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}var D=this.selection.toJSON();this.curOp.selectionAfter=D,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(D),this.prevOp=this.curOp,this.curOp=null}},M.prototype.$historyTracker=function(A){if(!!this.$mergeUndoDeltas){var k=this.prevOp,P=this.$mergeableCommands,O=k.command&&A.command.name==k.command.name;if(A.command.name=="insertstring"){var N=A.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),O=O&&this.mergeNextCommand&&(!/\s/.test(N)||/\s/.test(k.args)),this.mergeNextCommand=!0}else O=O&&P.indexOf(A.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(O=!1),O?this.session.mergeUndoDeltas=!0:P.indexOf(A.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},M.prototype.setKeyboardHandler=function(A,k){if(A&&typeof A=="string"&&A!="ace"){this.$keybindingId=A;var P=this;b.loadModule(["keybinding",A],function(O){P.$keybindingId==A&&P.keyBinding.setKeyboardHandler(O&&O.handler),k&&k()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(A),k&&k()},M.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},M.prototype.setSession=function(A){if(this.session!=A){this.curOp&&this.endOperation(),this.curOp={};var k=this.session;if(k){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange);var P=this.session.getSelection();P.off("changeCursor",this.$onCursorChange),P.off("changeSelection",this.$onSelectionChange)}this.session=A,A?(this.$onDocumentChange=this.onDocumentChange.bind(this),A.on("change",this.$onDocumentChange),this.renderer.setSession(A),this.$onChangeMode=this.onChangeMode.bind(this),A.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),A.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),A.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),A.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),A.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),A.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=A.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(A)),this._signal("changeSession",{session:A,oldSession:k}),this.curOp=null,k&&k._signal("changeEditor",{oldEditor:this}),A&&A._signal("changeEditor",{editor:this}),A&&!A.destroyed&&A.bgTokenizer.scheduleStart()}},M.prototype.getSession=function(){return this.session},M.prototype.setValue=function(A,k){return this.session.doc.setValue(A),k?k==1?this.navigateFileEnd():k==-1&&this.navigateFileStart():this.selectAll(),A},M.prototype.getValue=function(){return this.session.getValue()},M.prototype.getSelection=function(){return this.selection},M.prototype.resize=function(A){this.renderer.onResize(A)},M.prototype.setTheme=function(A,k){this.renderer.setTheme(A,k)},M.prototype.getTheme=function(){return this.renderer.getTheme()},M.prototype.setStyle=function(A){this.renderer.setStyle(A)},M.prototype.unsetStyle=function(A){this.renderer.unsetStyle(A)},M.prototype.getFontSize=function(){return this.getOption("fontSize")||u.computedStyle(this.container).fontSize},M.prototype.setFontSize=function(A){this.setOption("fontSize",A)},M.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var A=this;this.$highlightPending=!0,setTimeout(function(){A.$highlightPending=!1;var k=A.session;if(!(!k||k.destroyed)){k.$bracketHighlight&&(k.$bracketHighlight.markerIds.forEach(function(j){k.removeMarker(j)}),k.$bracketHighlight=null);var P=A.getCursorPosition(),O=A.getKeyboardHandler(),N=O&&O.$getDirectionForHighlight&&O.$getDirectionForHighlight(A),D=k.getMatchingBracketRanges(P,N);if(!D){var B=new _(k,P.row,P.column),U=B.getCurrentToken();if(U&&/\b(?:tag-open|tag-name)/.test(U.type)){var q=k.getMatchingTags(P);q&&(D=[q.openTagName,q.closeTagName])}}if(!D&&k.$mode.getMatching&&(D=k.$mode.getMatching(A.session)),!D){A.getHighlightIndentGuides()&&A.renderer.$textLayer.$highlightIndentGuide();return}var H="ace_bracket";Array.isArray(D)?D.length==1&&(H="ace_error_bracket"):D=[D],D.length==2&&(m.comparePoints(D[0].end,D[1].start)==0?D=[m.fromPoints(D[0].start,D[1].end)]:m.comparePoints(D[0].start,D[1].end)==0&&(D=[m.fromPoints(D[1].start,D[0].end)])),k.$bracketHighlight={ranges:D,markerIds:D.map(function(j){return k.addMarker(j,H,"text")})},A.getHighlightIndentGuides()&&A.renderer.$textLayer.$highlightIndentGuide()}},50)}},M.prototype.focus=function(){this.textInput.focus()},M.prototype.isFocused=function(){return this.textInput.isFocused()},M.prototype.blur=function(){this.textInput.blur()},M.prototype.onFocus=function(A){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",A))},M.prototype.onBlur=function(A){!this.$isFocused||(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",A))},M.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},M.prototype.onDocumentChange=function(A){var k=this.session.$useWrapMode,P=A.start.row==A.end.row?A.end.row:1/0;this.renderer.updateLines(A.start.row,P,k),this._signal("change",A),this.$cursorChange()},M.prototype.onTokenizerUpdate=function(A){var k=A.data;this.renderer.updateLines(k.first,k.last)},M.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},M.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},M.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},M.prototype.$updateHighlightActiveLine=function(){var A=this.getSession(),k;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(k=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(k=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(k=!1)),A.$highlightLineMarker&&!k)A.removeMarker(A.$highlightLineMarker.id),A.$highlightLineMarker=null;else if(!A.$highlightLineMarker&&k){var P=new m(k.row,k.column,k.row,1/0);P.id=A.addMarker(P,"ace_active-line","screenLine"),A.$highlightLineMarker=P}else k&&(A.$highlightLineMarker.start.row=k.row,A.$highlightLineMarker.end.row=k.row,A.$highlightLineMarker.start.column=k.column,A._signal("changeBackMarker"))},M.prototype.onSelectionChange=function(A){var k=this.session;if(k.$selectionMarker&&k.removeMarker(k.$selectionMarker),k.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var P=this.selection.getRange(),O=this.getSelectionStyle();k.$selectionMarker=k.addMarker(P,"ace_selection",O)}var N=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(N),this._signal("changeSelection")},M.prototype.$getSelectionHighLightRegexp=function(){var A=this.session,k=this.getSelectionRange();if(!(k.isEmpty()||k.isMultiLine())){var P=k.start.column,O=k.end.column,N=A.getLine(k.start.row),D=N.substring(P,O);if(!(D.length>5e3||!/[\w\d]/.test(D))){var B=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:D}),U=N.substring(P-1,O+1);if(!!B.test(U))return B}}},M.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},M.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},M.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},M.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},M.prototype.onChangeMode=function(A){this.renderer.updateText(),this._emit("changeMode",A)},M.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},M.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},M.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},M.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},M.prototype.getCopyText=function(){var A=this.getSelectedText(),k=this.session.doc.getNewLineCharacter(),P=!1;if(!A&&this.$copyWithEmptySelection){P=!0;for(var O=this.selection.getAllRanges(),N=0;N<O.length;N++){var D=O[N];N&&O[N-1].start.row==D.start.row||(A+=this.session.getLine(D.start.row)+k)}}var B={text:A};return this._signal("copy",B),$.lineMode=P?B.text:!1,B.text},M.prototype.onCopy=function(){this.commands.exec("copy",this)},M.prototype.onCut=function(){this.commands.exec("cut",this)},M.prototype.onPaste=function(A,k){var P={text:A,event:k};this.commands.exec("paste",this,P)},M.prototype.$handlePaste=function(A){typeof A=="string"&&(A={text:A}),this._signal("paste",A);var k=A.text,P=k===$.lineMode,O=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)P?O.insert({row:this.selection.lead.row,column:0},k):this.insert(k);else if(P)this.selection.rangeList.ranges.forEach(function(H){O.insert({row:H.start.row,column:0},k)});else{var N=k.split(/\r\n|\r|\n/),D=this.selection.rangeList.ranges,B=N.length==2&&(!N[0]||!N[1]);if(N.length!=D.length||B)return this.commands.exec("insertstring",this,k);for(var U=D.length;U--;){var q=D[U];q.isEmpty()||O.remove(q),O.insert(q.start,N[U])}}},M.prototype.execCommand=function(A,k){return this.commands.exec(A,this,k)},M.prototype.insert=function(A,k){var P=this.session,O=P.getMode(),N=this.getCursorPosition();if(this.getBehavioursEnabled()&&!k){var D=O.transformAction(P.getState(N.row),"insertion",this,P,A);D&&(A!==D.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),A=D.text)}if(A=="	"&&(A=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&A.indexOf(`
`)==-1){var B=new m.fromPoints(N,N);B.end.column+=A.length,this.session.remove(B)}}else{var B=this.getSelectionRange();N=this.session.remove(B),this.clearSelection()}if(A==`
`||A==`\r
`){var j=P.getLine(N.row);if(N.column>j.search(/\S|$/)){var U=j.substr(N.column).search(/\S|$/);P.doc.removeInLine(N.row,N.column,N.column+U)}}this.clearSelection();var q=N.column,H=P.getState(N.row),j=P.getLine(N.row),Y=O.checkOutdent(H,j,A);if(P.insert(N,A),D&&D.selection&&(D.selection.length==2?this.selection.setSelectionRange(new m(N.row,q+D.selection[0],N.row,q+D.selection[1])):this.selection.setSelectionRange(new m(N.row+D.selection[0],D.selection[1],N.row+D.selection[2],D.selection[3]))),this.$enableAutoIndent){if(P.getDocument().isNewLine(A)){var ie=O.getNextLineIndent(H,j.slice(0,N.column),P.getTabString());P.insert({row:N.row+1,column:0},ie)}Y&&O.autoOutdent(H,P,N.row)}},M.prototype.autoIndent=function(){var A=this.session,k=A.getMode(),P,O;if(this.selection.isEmpty())P=0,O=A.doc.getLength()-1;else{var N=this.getSelectionRange();P=N.start.row,O=N.end.row}for(var D="",B="",U="",q,H,j,Y=A.getTabString(),ie=P;ie<=O;ie++)ie>0&&(D=A.getState(ie-1),B=A.getLine(ie-1),U=k.getNextLineIndent(D,B,Y)),q=A.getLine(ie),H=k.$getIndent(q),U!==H&&(H.length>0&&(j=new m(ie,0,ie,H.length),A.remove(j)),U.length>0&&A.insert({row:ie,column:0},U)),k.autoOutdent(D,A,ie)},M.prototype.onTextInput=function(A,k){if(!k)return this.keyBinding.onTextInput(A);this.startOperation({command:{name:"insertstring"}});var P=this.applyComposition.bind(this,A,k);this.selection.rangeCount?this.forEachSelection(P):P(),this.endOperation()},M.prototype.applyComposition=function(A,k){if(k.extendLeft||k.extendRight){var P=this.selection.getRange();P.start.column-=k.extendLeft,P.end.column+=k.extendRight,P.start.column<0&&(P.start.row--,P.start.column+=this.session.getLine(P.start.row).length+1),this.selection.setRange(P),!A&&!P.isEmpty()&&this.remove()}if((A||!this.selection.isEmpty())&&this.insert(A,!0),k.restoreStart||k.restoreEnd){var P=this.selection.getRange();P.start.column-=k.restoreStart,P.end.column-=k.restoreEnd,this.selection.setRange(P)}},M.prototype.onCommandKey=function(A,k,P){return this.keyBinding.onCommandKey(A,k,P)},M.prototype.setOverwrite=function(A){this.session.setOverwrite(A)},M.prototype.getOverwrite=function(){return this.session.getOverwrite()},M.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},M.prototype.setScrollSpeed=function(A){this.setOption("scrollSpeed",A)},M.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},M.prototype.setDragDelay=function(A){this.setOption("dragDelay",A)},M.prototype.getDragDelay=function(){return this.getOption("dragDelay")},M.prototype.setSelectionStyle=function(A){this.setOption("selectionStyle",A)},M.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},M.prototype.setHighlightActiveLine=function(A){this.setOption("highlightActiveLine",A)},M.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},M.prototype.setHighlightGutterLine=function(A){this.setOption("highlightGutterLine",A)},M.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},M.prototype.setHighlightSelectedWord=function(A){this.setOption("highlightSelectedWord",A)},M.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},M.prototype.setAnimatedScroll=function(A){this.renderer.setAnimatedScroll(A)},M.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},M.prototype.setShowInvisibles=function(A){this.renderer.setShowInvisibles(A)},M.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},M.prototype.setDisplayIndentGuides=function(A){this.renderer.setDisplayIndentGuides(A)},M.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},M.prototype.setHighlightIndentGuides=function(A){this.renderer.setHighlightIndentGuides(A)},M.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},M.prototype.setShowPrintMargin=function(A){this.renderer.setShowPrintMargin(A)},M.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},M.prototype.setPrintMarginColumn=function(A){this.renderer.setPrintMarginColumn(A)},M.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},M.prototype.setReadOnly=function(A){this.setOption("readOnly",A)},M.prototype.getReadOnly=function(){return this.getOption("readOnly")},M.prototype.setBehavioursEnabled=function(A){this.setOption("behavioursEnabled",A)},M.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},M.prototype.setWrapBehavioursEnabled=function(A){this.setOption("wrapBehavioursEnabled",A)},M.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},M.prototype.setShowFoldWidgets=function(A){this.setOption("showFoldWidgets",A)},M.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},M.prototype.setFadeFoldWidgets=function(A){this.setOption("fadeFoldWidgets",A)},M.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},M.prototype.remove=function(A){this.selection.isEmpty()&&(A=="left"?this.selection.selectLeft():this.selection.selectRight());var k=this.getSelectionRange();if(this.getBehavioursEnabled()){var P=this.session,O=P.getState(k.start.row),N=P.getMode().transformAction(O,"deletion",this,P,k);if(k.end.column===0){var D=P.getTextRange(k);if(D[D.length-1]==`
`){var B=P.getLine(k.end.row);/^\s+$/.test(B)&&(k.end.column=B.length)}}N&&(k=N)}this.session.remove(k),this.clearSelection()},M.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},M.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},M.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},M.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var A=this.getSelectionRange();A.start.column==A.end.column&&A.start.row==A.end.row&&(A.end.column=0,A.end.row++),this.session.remove(A),this.clearSelection()},M.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var A=this.getCursorPosition();this.insert(`
`),this.moveCursorToPosition(A)},M.prototype.setGhostText=function(A,k){this.session.widgetManager||(this.session.widgetManager=new w(this.session),this.session.widgetManager.attach(this)),this.renderer.setGhostText(A,k)},M.prototype.removeGhostText=function(){!this.session.widgetManager||this.renderer.removeGhostText()},M.prototype.transposeLetters=function(){if(!!this.selection.isEmpty()){var A=this.getCursorPosition(),k=A.column;if(k!==0){var P=this.session.getLine(A.row),O,N;k<P.length?(O=P.charAt(k)+P.charAt(k-1),N=new m(A.row,k-1,A.row,k+1)):(O=P.charAt(k-1)+P.charAt(k-2),N=new m(A.row,k-2,A.row,k)),this.session.replace(N,O),this.session.selection.moveToPosition(N.end)}}},M.prototype.toLowerCase=function(){var A=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var k=this.getSelectionRange(),P=this.session.getTextRange(k);this.session.replace(k,P.toLowerCase()),this.selection.setSelectionRange(A)},M.prototype.toUpperCase=function(){var A=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var k=this.getSelectionRange(),P=this.session.getTextRange(k);this.session.replace(k,P.toUpperCase()),this.selection.setSelectionRange(A)},M.prototype.indent=function(){var A=this.session,k=this.getSelectionRange();if(k.start.row<k.end.row){var P=this.$getSelectedRows();A.indentRows(P.first,P.last,"	");return}else if(k.start.column<k.end.column){var O=A.getTextRange(k);if(!/^\s+$/.test(O)){var P=this.$getSelectedRows();A.indentRows(P.first,P.last,"	");return}}var N=A.getLine(k.start.row),D=k.start,B=A.getTabSize(),U=A.documentToScreenColumn(D.row,D.column);if(this.session.getUseSoftTabs())var q=B-U%B,H=o.stringRepeat(" ",q);else{for(var q=U%B;N[k.start.column-1]==" "&&q;)k.start.column--,q--;this.selection.setSelectionRange(k),H="	"}return this.insert(H)},M.prototype.blockIndent=function(){var A=this.$getSelectedRows();this.session.indentRows(A.first,A.last,"	")},M.prototype.blockOutdent=function(){var A=this.session.getSelection();this.session.outdentRows(A.getRange())},M.prototype.sortLines=function(){for(var A=this.$getSelectedRows(),k=this.session,P=[],O=A.first;O<=A.last;O++)P.push(k.getLine(O));P.sort(function(B,U){return B.toLowerCase()<U.toLowerCase()?-1:B.toLowerCase()>U.toLowerCase()?1:0});for(var N=new m(0,0,0,0),O=A.first;O<=A.last;O++){var D=k.getLine(O);N.start.row=O,N.end.row=O,N.end.column=D.length,k.replace(N,P[O-A.first])}},M.prototype.toggleCommentLines=function(){var A=this.session.getState(this.getCursorPosition().row),k=this.$getSelectedRows();this.session.getMode().toggleCommentLines(A,this.session,k.first,k.last)},M.prototype.toggleBlockComment=function(){var A=this.getCursorPosition(),k=this.session.getState(A.row),P=this.getSelectionRange();this.session.getMode().toggleBlockComment(k,this.session,P,A)},M.prototype.getNumberAt=function(A,k){var P=/[\-]?[0-9]+(?:\.[0-9]+)?/g;P.lastIndex=0;for(var O=this.session.getLine(A);P.lastIndex<k;){var N=P.exec(O);if(N.index<=k&&N.index+N[0].length>=k){var D={value:N[0],start:N.index,end:N.index+N[0].length};return D}}return null},M.prototype.modifyNumber=function(A){var k=this.selection.getCursor().row,P=this.selection.getCursor().column,O=new m(k,P-1,k,P),N=this.session.getTextRange(O);if(!isNaN(parseFloat(N))&&isFinite(N)){var D=this.getNumberAt(k,P);if(D){var B=D.value.indexOf(".")>=0?D.start+D.value.indexOf(".")+1:D.end,U=D.start+D.value.length-B,q=parseFloat(D.value);q*=Math.pow(10,U),B!==D.end&&P<B?A*=Math.pow(10,D.end-P-1):A*=Math.pow(10,D.end-P),q+=A,q/=Math.pow(10,U);var H=q.toFixed(U),j=new m(k,D.start,k,D.end);this.session.replace(j,H),this.moveCursorTo(k,Math.max(D.start+1,P+H.length-D.value.length))}}else this.toggleWord()},M.prototype.toggleWord=function(){var A=this.selection.getCursor().row,k=this.selection.getCursor().column;this.selection.selectWord();var P=this.getSelectedText(),O=this.selection.getWordRange().start.column,N=P.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),D=k-O-1;D<0&&(D=0);var B=0,U=0,q=this;P.match(/[A-Za-z0-9_]+/)&&N.forEach(function(de,_e){U=B+de.length,D>=B&&D<=U&&(P=de,q.selection.clearSelection(),q.moveCursorTo(A,B+O),q.selection.selectTo(A,U+O)),B=U});for(var H=this.$toggleWordPairs,j,Y=0;Y<H.length;Y++)for(var ie=H[Y],W=0;W<=1;W++){var K=+!W,Q=P.match(new RegExp("^\\s?_?("+o.escapeRegExp(ie[W])+")\\s?$","i"));if(Q){var ne=P.match(new RegExp("([_]|^|\\s)("+o.escapeRegExp(Q[1])+")($|\\s)","g"));ne&&(j=P.replace(new RegExp(o.escapeRegExp(ie[W]),"i"),function(de){var _e=ie[K];return de.toUpperCase()==de?_e=_e.toUpperCase():de.charAt(0).toUpperCase()==de.charAt(0)&&(_e=_e.substr(0,0)+ie[K].charAt(0).toUpperCase()+_e.substr(1)),_e}),this.insert(j),j="")}}},M.prototype.findLinkAt=function(A,k){var P,O,N=this.session.getLine(A),D=N.split(/((?:https?|ftp):\/\/[\S]+)/),B=k;B<0&&(B=0);var U=0,q=0,H;try{for(var j=s(D),Y=j.next();!Y.done;Y=j.next()){var ie=Y.value;if(q=U+ie.length,B>=U&&B<=q&&ie.match(/((?:https?|ftp):\/\/[\S]+)/)){H=ie.replace(/[\s:.,'";}\]]+$/,"");break}U=q}}catch(W){P={error:W}}finally{try{Y&&!Y.done&&(O=j.return)&&O.call(j)}finally{if(P)throw P.error}}return H},M.prototype.openLink=function(){var A=this.selection.getCursor(),k=this.findLinkAt(A.row,A.column);return k&&window.open(k,"_blank"),k!=null},M.prototype.removeLines=function(){var A=this.$getSelectedRows();this.session.removeFullLines(A.first,A.last),this.clearSelection()},M.prototype.duplicateSelection=function(){var A=this.selection,k=this.session,P=A.getRange(),O=A.isBackwards();if(P.isEmpty()){var N=P.start.row;k.duplicateLines(N,N)}else{var D=O?P.start:P.end,B=k.insert(D,k.getTextRange(P),!1);P.start=D,P.end=B,A.setSelectionRange(P,O)}},M.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},M.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},M.prototype.moveText=function(A,k,P){return this.session.moveText(A,k,P)},M.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},M.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},M.prototype.$moveLines=function(A,k){var P,O,N=this.selection;if(!N.inMultiSelectMode||this.inVirtualSelectionMode){var D=N.toOrientedRange();P=this.$getSelectedRows(D),O=this.session.$moveLines(P.first,P.last,k?0:A),k&&A==-1&&(O=0),D.moveBy(O,0),N.fromOrientedRange(D)}else{var B=N.rangeList.ranges;N.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var U=0,q=0,H=B.length,j=0;j<H;j++){var Y=j;B[j].moveBy(U,0),P=this.$getSelectedRows(B[j]);for(var ie=P.first,W=P.last;++j<H;){q&&B[j].moveBy(q,0);var K=this.$getSelectedRows(B[j]);if(k&&K.first!=W)break;if(!k&&K.first>W+1)break;W=K.last}for(j--,U=this.session.$moveLines(ie,W,k?0:A),k&&A==-1&&(Y=j+1);Y<=j;)B[Y].moveBy(U,0),Y++;k||(U=0),q+=U}N.fromOrientedRange(N.ranges[0]),N.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},M.prototype.$getSelectedRows=function(A){return A=(A||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(A.start.row),last:this.session.getRowFoldEnd(A.end.row)}},M.prototype.onCompositionStart=function(A){this.renderer.showComposition(A)},M.prototype.onCompositionUpdate=function(A){this.renderer.setCompositionText(A)},M.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},M.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},M.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},M.prototype.isRowVisible=function(A){return A>=this.getFirstVisibleRow()&&A<=this.getLastVisibleRow()},M.prototype.isRowFullyVisible=function(A){return A>=this.renderer.getFirstFullyVisibleRow()&&A<=this.renderer.getLastFullyVisibleRow()},M.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},M.prototype.$moveByPage=function(A,k){var P=this.renderer,O=this.renderer.layerConfig,N=A*Math.floor(O.height/O.lineHeight);k===!0?this.selection.$moveSelection(function(){this.moveCursorBy(N,0)}):k===!1&&(this.selection.moveCursorBy(N,0),this.selection.clearSelection());var D=P.scrollTop;P.scrollBy(0,N*O.lineHeight),k!=null&&P.scrollCursorIntoView(null,.5),P.animateScrolling(D)},M.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},M.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},M.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},M.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},M.prototype.scrollPageDown=function(){this.$moveByPage(1)},M.prototype.scrollPageUp=function(){this.$moveByPage(-1)},M.prototype.scrollToRow=function(A){this.renderer.scrollToRow(A)},M.prototype.scrollToLine=function(A,k,P,O){this.renderer.scrollToLine(A,k,P,O)},M.prototype.centerSelection=function(){var A=this.getSelectionRange(),k={row:Math.floor(A.start.row+(A.end.row-A.start.row)/2),column:Math.floor(A.start.column+(A.end.column-A.start.column)/2)};this.renderer.alignCursor(k,.5)},M.prototype.getCursorPosition=function(){return this.selection.getCursor()},M.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},M.prototype.getSelectionRange=function(){return this.selection.getRange()},M.prototype.selectAll=function(){this.selection.selectAll()},M.prototype.clearSelection=function(){this.selection.clearSelection()},M.prototype.moveCursorTo=function(A,k){this.selection.moveCursorTo(A,k)},M.prototype.moveCursorToPosition=function(A){this.selection.moveCursorToPosition(A)},M.prototype.jumpToMatching=function(A,k){var P=this.getCursorPosition(),O=new _(this.session,P.row,P.column),N=O.getCurrentToken(),D=0;N&&N.type.indexOf("tag-name")!==-1&&(N=O.stepBackward());var B=N||O.stepForward();if(!!B){var U,q=!1,H={},j=P.column-B.start,Y,ie={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(B.value.match(/[{}()\[\]]/g)){for(;j<B.value.length&&!q;j++)if(!!ie[B.value[j]])switch(Y=ie[B.value[j]]+"."+B.type.replace("rparen","lparen"),isNaN(H[Y])&&(H[Y]=0),B.value[j]){case"(":case"[":case"{":H[Y]++;break;case")":case"]":case"}":H[Y]--,H[Y]===-1&&(U="bracket",q=!0);break}}else B.type.indexOf("tag-name")!==-1&&(isNaN(H[B.value])&&(H[B.value]=0),N.value==="<"&&D>1?H[B.value]++:N.value==="</"&&H[B.value]--,H[B.value]===-1&&(U="tag",q=!0));q||(N=B,D++,B=O.stepForward(),j=0)}while(B&&!q);if(!!U){var W,K;if(U==="bracket")W=this.session.getBracketRange(P),W||(W=new m(O.getCurrentTokenRow(),O.getCurrentTokenColumn()+j-1,O.getCurrentTokenRow(),O.getCurrentTokenColumn()+j-1),K=W.start,(k||K.row===P.row&&Math.abs(K.column-P.column)<2)&&(W=this.session.getBracketRange(K)));else if(U==="tag"){if(!B||B.type.indexOf("tag-name")===-1)return;if(W=new m(O.getCurrentTokenRow(),O.getCurrentTokenColumn()-2,O.getCurrentTokenRow(),O.getCurrentTokenColumn()-2),W.compare(P.row,P.column)===0){var Q=this.session.getMatchingTags(P);Q&&(Q.openTag.contains(P.row,P.column)?(W=Q.closeTag,K=W.start):(W=Q.openTag,Q.closeTag.start.row===P.row&&Q.closeTag.start.column===P.column?K=W.end:K=W.start))}K=K||W.start}K=W&&W.cursor||K,K&&(A?W&&k?this.selection.setRange(W):W&&W.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(K.row,K.column):this.selection.moveTo(K.row,K.column))}}},M.prototype.gotoLine=function(A,k,P){this.selection.clearSelection(),this.session.unfold({row:A-1,column:k||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(A-1,k||0),this.isRowFullyVisible(A-1)||this.scrollToLine(A-1,!0,P)},M.prototype.navigateTo=function(A,k){this.selection.moveTo(A,k)},M.prototype.navigateUp=function(A){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var k=this.selection.anchor.getPosition();return this.moveCursorToPosition(k)}this.selection.clearSelection(),this.selection.moveCursorBy(-A||-1,0)},M.prototype.navigateDown=function(A){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var k=this.selection.anchor.getPosition();return this.moveCursorToPosition(k)}this.selection.clearSelection(),this.selection.moveCursorBy(A||1,0)},M.prototype.navigateLeft=function(A){if(this.selection.isEmpty())for(A=A||1;A--;)this.selection.moveCursorLeft();else{var k=this.getSelectionRange().start;this.moveCursorToPosition(k)}this.clearSelection()},M.prototype.navigateRight=function(A){if(this.selection.isEmpty())for(A=A||1;A--;)this.selection.moveCursorRight();else{var k=this.getSelectionRange().end;this.moveCursorToPosition(k)}this.clearSelection()},M.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},M.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},M.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},M.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},M.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},M.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},M.prototype.replace=function(A,k){k&&this.$search.set(k);var P=this.$search.find(this.session),O=0;return P&&(this.$tryReplace(P,A)&&(O=1),this.selection.setSelectionRange(P),this.renderer.scrollSelectionIntoView(P.start,P.end)),O},M.prototype.replaceAll=function(A,k){k&&this.$search.set(k);var P=this.$search.findAll(this.session),O=0;if(!P.length)return O;var N=this.getSelectionRange();this.selection.moveTo(0,0);for(var D=P.length-1;D>=0;--D)this.$tryReplace(P[D],A)&&O++;return this.selection.setSelectionRange(N),O},M.prototype.$tryReplace=function(A,k){var P=this.session.getTextRange(A);return k=this.$search.replace(P,k),k!==null?(A.end=this.session.replace(A,k),A):null},M.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},M.prototype.find=function(A,k,P){k||(k={}),typeof A=="string"||A instanceof RegExp?k.needle=A:typeof A=="object"&&c.mixin(k,A);var O=this.selection.getRange();k.needle==null&&(A=this.session.getTextRange(O)||this.$search.$options.needle,A||(O=this.session.getWordRange(O.start.row,O.start.column),A=this.session.getTextRange(O)),this.$search.set({needle:A})),this.$search.set(k),k.start||this.$search.set({start:O});var N=this.$search.find(this.session);if(k.preventScroll)return N;if(N)return this.revealRange(N,P),N;k.backwards?O.start=O.end:O.end=O.start,this.selection.setRange(O)},M.prototype.findNext=function(A,k){this.find({skipCurrent:!0,backwards:!1},A,k)},M.prototype.findPrevious=function(A,k){this.find(A,{skipCurrent:!0,backwards:!0},k)},M.prototype.revealRange=function(A,k){this.session.unfold(A),this.selection.setSelectionRange(A);var P=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(A.start,A.end,.5),k!==!1&&this.renderer.animateScrolling(P)},M.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},M.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},M.prototype.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach(function(A){A.destroy()}),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},M.prototype.setAutoScrollEditorIntoView=function(A){if(!!A){var k,P=this,O=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var N=this.$scrollAnchor;N.style.cssText="position:absolute",this.container.insertBefore(N,this.container.firstChild);var D=this.on("changeSelection",function(){O=!0}),B=this.renderer.on("beforeRender",function(){O&&(k=P.renderer.container.getBoundingClientRect())}),U=this.renderer.on("afterRender",function(){if(O&&k&&(P.isFocused()||P.searchBox&&P.searchBox.isFocused())){var q=P.renderer,H=q.$cursorLayer.$pixelPos,j=q.layerConfig,Y=H.top-j.offset;H.top>=0&&Y+k.top<0?O=!0:H.top<j.height&&H.top+k.top+j.lineHeight>window.innerHeight?O=!1:O=null,O!=null&&(N.style.top=Y+"px",N.style.left=H.left+"px",N.style.height=j.lineHeight+"px",N.scrollIntoView(O)),O=k=null}});this.setAutoScrollEditorIntoView=function(q){q||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",D),this.renderer.off("afterRender",U),this.renderer.off("beforeRender",B))}}},M.prototype.$resetCursorStyle=function(){var A=this.$cursorStyle||"ace",k=this.renderer.$cursorLayer;!k||(k.setSmoothBlinking(/smooth/.test(A)),k.isBlinking=!this.$readOnly&&A!="wide",u.setCssClass(k.element,"ace_slim-cursors",/slim/.test(A)))},M.prototype.prompt=function(A,k,P){var O=this;b.loadModule("ace/ext/prompt",function(N){N.prompt(O,A,k,P)})},M}();x.$uid=0,x.prototype.curOp=null,x.prototype.prevOp={},x.prototype.$mergeableCommands=["backspace","del","insertstring"],x.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],c.implement(x.prototype,v),b.defineOptions(x.prototype,"editor",{selectionStyle:{set:function(M){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:M})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(M){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(M){this.textInput.setReadOnly(M),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(M){this.textInput.setCopyWithEmptySelection(M)},initialValue:!1},cursorStyle:{set:function(M){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(M){this.setAutoScrollEditorIntoView(M)}},keyboardHandler:{set:function(M){this.setKeyboardHandler(M)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(M){this.session.setValue(M)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(M){this.setSession(M)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(M){this.renderer.$gutterLayer.setShowLineNumbers(M),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),M&&this.$relativeLineNumbers?L.attach(this):L.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(M){this.$showLineNumbers&&M?L.attach(this):L.detach(this)}},placeholder:{set:function(M){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var A=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(A&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),u.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!A&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),u.addCssClass(this.container,"ace_hasPlaceholder");var k=u.createElement("div");k.className="ace_placeholder",k.textContent=this.$placeholder||"",this.renderer.placeholderNode=k,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!A&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(M){var A={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(O){O.blur(),O.renderer.scroller.focus()},readOnly:!0},k=function(O){if(O.target==this.renderer.scroller&&O.keyCode===C.enter){O.preventDefault();var N=this.getCursorPosition().row;this.isRowVisible(N)||this.scrollToLine(N,!0,!0),this.focus()}},P;M?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",T("editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",T("Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",k.bind(this)),this.commands.addCommand(A),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",T("editor")),this.renderer.$gutter.setAttribute("aria-label",T("Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),P||(P=new E(this)),P.addListener()):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",k.bind(this)),this.commands.removeCommand(A),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),P&&P.removeListener())},initialValue:!1},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var L={getText:function(M,A){return(Math.abs(M.selection.lead.row-A)||A+1+(A<9?"\xB7":""))+""},getWidth:function(M,A,k){return Math.max(A.toString().length,(k.lastRow+1).toString().length,2)*k.characterWidth},update:function(M,A){A.renderer.$loop.schedule(A.renderer.CHANGE_GUTTER)},attach:function(M){M.renderer.$gutterLayer.$renderer=this,M.on("changeSelection",this.update),this.update(null,M)},detach:function(M){M.renderer.$gutterLayer.$renderer==this&&(M.renderer.$gutterLayer.$renderer=null),M.off("changeSelection",this.update),this.update(null,M)}};n.Editor=x}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(i,n,r){var s=function(){function _(){this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return _.prototype.addSession=function(w){this.$session=w},_.prototype.add=function(w,E,T){if(!this.$fromUndo&&w!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),E===!1||!this.lastDeltas){this.lastDeltas=[];var $=this.$undoStack.length;$>this.$undoDepth-1&&this.$undoStack.splice(0,$-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),w.id=this.$rev=++this.$maxRev}(w.action=="remove"||w.action=="insert")&&(this.$lastDelta=w),this.lastDeltas.push(w)}},_.prototype.addSelection=function(w,E){this.selections.push({value:w,rev:E||this.$rev})},_.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},_.prototype.markIgnored=function(w,E){E==null&&(E=this.$rev+1);for(var T=this.$undoStack,$=T.length;$--;){var C=T[$][0];if(C.id<=w)break;C.id<E&&(C.ignore=!0)}this.lastDeltas=null},_.prototype.getSelection=function(w,E){for(var T=this.selections,$=T.length;$--;){var C=T[$];if(C.rev<w)return E&&(C=T[$+1]),C}},_.prototype.getRevision=function(){return this.$rev},_.prototype.getDeltas=function(w,E){E==null&&(E=this.$rev+1);for(var T=this.$undoStack,$=null,C=0,x=T.length;x--;){var L=T[x][0];if(L.id<E&&!$&&($=x+1),L.id<=w){C=x+1;break}}return T.slice(C,$)},_.prototype.getChangedRanges=function(w,E){E==null&&(E=this.$rev+1)},_.prototype.getChangedLines=function(w,E){E==null&&(E=this.$rev+1)},_.prototype.undo=function(w,E){this.lastDeltas=null;var T=this.$undoStack;if(!!c(T,T.length)){w||(w=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var $=T.pop(),C=null;return $&&(C=w.undoChanges($,E),this.$redoStack.push($),this.$syncRev()),this.$fromUndo=!1,C}},_.prototype.redo=function(w,E){if(this.lastDeltas=null,w||(w=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var T=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);b(this.$redoStack,T),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(x){x[0].id=++this.$maxRev},this)}var $=this.$redoStack.pop(),C=null;return $&&(C=w.redoChanges($,E),this.$undoStack.push($),this.$syncRev()),this.$fromUndo=!1,C},_.prototype.$syncRev=function(){var w=this.$undoStack,E=w[w.length-1],T=E&&E[0].id||0;this.$redoStackBaseRev=T,this.$rev=T},_.prototype.reset=function(){this.lastDeltas=null,this.$lastDelta=null,this.$undoStack=[],this.$redoStack=[],this.$rev=0,this.mark=0,this.$redoStackBaseRev=this.$rev,this.selections=[]},_.prototype.canUndo=function(){return this.$undoStack.length>0},_.prototype.canRedo=function(){return this.$redoStack.length>0},_.prototype.bookmark=function(w){w==null&&(w=this.$rev),this.mark=w},_.prototype.isAtBookmark=function(){return this.$rev===this.mark},_.prototype.toJSON=function(){},_.prototype.fromJSON=function(){},_.prototype.$prettyPrint=function(w){return w?l(w):l(this.$undoStack)+`
---
`+l(this.$redoStack)},_}();s.prototype.hasUndo=s.prototype.canUndo,s.prototype.hasRedo=s.prototype.canRedo,s.prototype.isClean=s.prototype.isAtBookmark,s.prototype.markClean=s.prototype.bookmark;function c(_,w){for(var E=w;E--;){var T=_[E];if(T&&!T[0].ignore){for(;E<w-1;){var $=p(_[E],_[E+1]);_[E]=$[0],_[E+1]=$[1],E++}return!0}}}var u=i("./range").Range,o=u.comparePoints;u.comparePoints;function h(_){return{row:_.row,column:_.column}}function a(_){return{start:h(_.start),end:h(_.end),action:_.action,lines:_.lines.slice()}}function l(_){if(_=_||this,Array.isArray(_))return _.map(l).join(`
`);var w="";return _.action?(w=_.action=="insert"?"+":"-",w+="["+_.lines+"]"):_.value&&(Array.isArray(_.value)?w=_.value.map(f).join(`
`):w=f(_.value)),_.start&&(w+=f(_)),(_.id||_.rev)&&(w+="	("+(_.id||_.rev)+")"),w}function f(_){return _.start.row+":"+_.start.column+"=>"+_.end.row+":"+_.end.column}function d(_,w){var E=_.action=="insert",T=w.action=="insert";if(E&&T)if(o(w.start,_.end)>=0)m(w,_,-1);else if(o(w.start,_.start)<=0)m(_,w,1);else return null;else if(E&&!T)if(o(w.start,_.end)>=0)m(w,_,-1);else if(o(w.end,_.start)<=0)m(_,w,-1);else return null;else if(!E&&T)if(o(w.start,_.start)>=0)m(w,_,1);else if(o(w.start,_.start)<=0)m(_,w,1);else return null;else if(!E&&!T)if(o(w.start,_.start)>=0)m(w,_,1);else if(o(w.end,_.start)<=0)m(_,w,-1);else return null;return[w,_]}function p(_,w){for(var E=_.length;E--;)for(var T=0;T<w.length;T++)if(!d(_[E],w[T])){for(;E<_.length;){for(;T--;)d(w[T],_[E]);T=w.length,E++}return[_,w]}return _.selectionBefore=w.selectionBefore=_.selectionAfter=w.selectionAfter=null,[w,_]}function g(_,w){var E=_.action=="insert",T=w.action=="insert";if(E&&T)o(_.start,w.start)<0?m(w,_,1):m(_,w,1);else if(E&&!T)o(_.start,w.end)>=0?m(_,w,-1):(o(_.start,w.start)<=0||m(_,u.fromPoints(w.start,_.start),-1),m(w,_,1));else if(!E&&T)o(w.start,_.end)>=0?m(w,_,-1):(o(w.start,_.start)<=0||m(w,u.fromPoints(_.start,w.start),-1),m(_,w,1));else if(!E&&!T)if(o(w.start,_.end)>=0)m(w,_,-1);else if(o(w.end,_.start)<=0)m(_,w,-1);else{var $,C;return o(_.start,w.start)<0&&($=_,_=y(_,w.start)),o(_.end,w.end)>0&&(C=y(_,w.end)),v(w.end,_.start,_.end,-1),C&&!$&&(_.lines=C.lines,_.start=C.start,_.end=C.end,C=_),[w,$,C].filter(Boolean)}return[w,_]}function m(_,w,E){v(_.start,w.start,w.end,E),v(_.end,w.start,w.end,E)}function v(_,w,E,T){_.row==(T==1?w:E).row&&(_.column+=T*(E.column-w.column)),_.row+=T*(E.row-w.row)}function y(_,w){var E=_.lines,T=_.end;_.end=h(w);var $=_.end.row-_.start.row,C=E.splice($,E.length),x=$?w.column:w.column-_.start.column;E.push(C[0].substring(0,x)),C[0]=C[0].substr(x);var L={start:h(w),end:T,lines:C,action:_.action};return L}function S(_,w){w=a(w);for(var E=_.length;E--;){for(var T=_[E],$=0;$<T.length;$++){var C=T[$],x=g(C,w);w=x[0],x.length!=2&&(x[2]?(T.splice($+1,1,x[1],x[2]),$++):x[1]||(T.splice($,1),$--))}T.length||_.splice(E,1)}return _}function b(_,w){for(var E=0;E<w.length;E++)for(var T=w[E],$=0;$<T.length;$++)S(_,T[$])}n.UndoManager=s}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(i,n,r){var s=i("../lib/dom"),c=function(){function u(o,h){this.element=o,this.canvasHeight=h||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return u.prototype.moveContainer=function(o){s.translate(this.element,0,-(o.firstRowScreen*o.lineHeight%this.canvasHeight)-o.offset*this.$offsetCoefficient)},u.prototype.pageChanged=function(o,h){return Math.floor(o.firstRowScreen*o.lineHeight/this.canvasHeight)!==Math.floor(h.firstRowScreen*h.lineHeight/this.canvasHeight)},u.prototype.computeLineTop=function(o,h,a){var l=h.firstRowScreen*h.lineHeight,f=Math.floor(l/this.canvasHeight),d=a.documentToScreenRow(o,0)*h.lineHeight;return d-f*this.canvasHeight},u.prototype.computeLineHeight=function(o,h,a){return h.lineHeight*a.getRowLineCount(o)},u.prototype.getLength=function(){return this.cells.length},u.prototype.get=function(o){return this.cells[o]},u.prototype.shift=function(){this.$cacheCell(this.cells.shift())},u.prototype.pop=function(){this.$cacheCell(this.cells.pop())},u.prototype.push=function(o){if(Array.isArray(o)){this.cells.push.apply(this.cells,o);for(var h=s.createFragment(this.element),a=0;a<o.length;a++)h.appendChild(o[a].element);this.element.appendChild(h)}else this.cells.push(o),this.element.appendChild(o.element)},u.prototype.unshift=function(o){if(Array.isArray(o)){this.cells.unshift.apply(this.cells,o);for(var h=s.createFragment(this.element),a=0;a<o.length;a++)h.appendChild(o[a].element);this.element.firstChild?this.element.insertBefore(h,this.element.firstChild):this.element.appendChild(h)}else this.cells.unshift(o),this.element.insertAdjacentElement("afterbegin",o.element)},u.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},u.prototype.$cacheCell=function(o){!o||(o.element.remove(),this.cellCache.push(o))},u.prototype.createCell=function(o,h,a,l){var f=this.cellCache.pop();if(!f){var d=s.createElement("div");l&&l(d),this.element.appendChild(d),f={element:d,text:"",row:o}}return f.row=o,f},u}();n.Lines=c}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/layer/lines","ace/config"],function(i,n,r){var s=i("../lib/dom"),c=i("../lib/oop"),u=i("../lib/lang"),o=i("../lib/event_emitter").EventEmitter,h=i("./lines").Lines,a=i("../config").nls,l=function(){function d(p){this.element=s.createElement("div"),this.element.className="ace_layer ace_gutter-layer",p.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new h(this.element),this.$lines.$offsetCoefficient=1}return d.prototype.setSession=function(p){this.session&&this.session.off("change",this.$updateAnnotations),this.session=p,p&&p.on("change",this.$updateAnnotations)},d.prototype.addGutterDecoration=function(p,g){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(p,g)},d.prototype.removeGutterDecoration=function(p,g){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(p,g)},d.prototype.setAnnotations=function(p){this.$annotations=[];for(var g=0;g<p.length;g++){var m=p[g],v=m.row,y=this.$annotations[v];y||(y=this.$annotations[v]={text:[],type:[]});var S=m.text,b=m.type;S=S?u.escapeHTML(S):m.html||"",y.text.indexOf(S)===-1&&(y.text.push(S),y.type.push(b));var _=m.className;_?y.className=_:b=="error"?y.className=" ace_error":b=="warning"&&y.className!=" ace_error"?y.className=" ace_warning":b=="info"&&!y.className&&(y.className=" ace_info")}},d.prototype.$updateAnnotations=function(p){if(!!this.$annotations.length){var g=p.start.row,m=p.end.row-g;if(m!==0)if(p.action=="remove")this.$annotations.splice(g,m+1,null);else{var v=new Array(m+1);v.unshift(g,1),this.$annotations.splice.apply(this.$annotations,v)}}},d.prototype.update=function(p){this.config=p;var g=this.session,m=p.firstRow,v=Math.min(p.lastRow+p.gutterOffset,g.getLength()-1);this.oldLastRow=v,this.config=p,this.$lines.moveContainer(p),this.$updateCursorRow();for(var y=g.getNextFoldLine(m),S=y?y.start.row:1/0,b=null,_=-1,w=m;;){if(w>S&&(w=y.end.row+1,y=g.getNextFoldLine(w,y),S=y?y.start.row:1/0),w>v){for(;this.$lines.getLength()>_+1;)this.$lines.pop();break}b=this.$lines.get(++_),b?b.row=w:(b=this.$lines.createCell(w,p,this.session,f),this.$lines.push(b)),this.$renderCell(b,p,y,w),w++}this._signal("afterRender"),this.$updateGutterWidth(p)},d.prototype.$updateGutterWidth=function(p){var g=this.session,m=g.gutterRenderer||this.$renderer,v=g.$firstLineNumber,y=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||g.$useWrapMode)&&(y=g.getLength()+v-1);var S=m?m.getWidth(g,y,p):y.toString().length*p.characterWidth,b=this.$padding||this.$computePadding();S+=b.left+b.right,S!==this.gutterWidth&&!isNaN(S)&&(this.gutterWidth=S,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",S))},d.prototype.$updateCursorRow=function(){if(!!this.$highlightGutterLine){var p=this.session.selection.getCursor();this.$cursorRow!==p.row&&(this.$cursorRow=p.row)}},d.prototype.updateLineHighlight=function(){if(!!this.$highlightGutterLine){var p=this.session.selection.cursor.row;if(this.$cursorRow=p,!(this.$cursorCell&&this.$cursorCell.row==p)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var g=this.$lines.cells;this.$cursorCell=null;for(var m=0;m<g.length;m++){var v=g[m];if(v.row>=this.$cursorRow){if(v.row>this.$cursorRow){var y=this.session.getFoldLine(this.$cursorRow);if(m>0&&y&&y.start.row==g[m-1].row)v=g[m-1];else break}v.element.className="ace_gutter-active-line "+v.element.className,this.$cursorCell=v;break}}}}},d.prototype.scrollLines=function(p){var g=this.config;if(this.config=p,this.$updateCursorRow(),this.$lines.pageChanged(g,p))return this.update(p);this.$lines.moveContainer(p);var m=Math.min(p.lastRow+p.gutterOffset,this.session.getLength()-1),v=this.oldLastRow;if(this.oldLastRow=m,!g||v<p.firstRow)return this.update(p);if(m<g.firstRow)return this.update(p);if(g.firstRow<p.firstRow)for(var y=this.session.getFoldedRowCount(g.firstRow,p.firstRow-1);y>0;y--)this.$lines.shift();if(v>m)for(var y=this.session.getFoldedRowCount(m+1,v);y>0;y--)this.$lines.pop();p.firstRow<g.firstRow&&this.$lines.unshift(this.$renderLines(p,p.firstRow,g.firstRow-1)),m>v&&this.$lines.push(this.$renderLines(p,v+1,m)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(p)},d.prototype.$renderLines=function(p,g,m){for(var v=[],y=g,S=this.session.getNextFoldLine(y),b=S?S.start.row:1/0;y>b&&(y=S.end.row+1,S=this.session.getNextFoldLine(y,S),b=S?S.start.row:1/0),!(y>m);){var _=this.$lines.createCell(y,p,this.session,f);this.$renderCell(_,p,S,y),v.push(_),y++}return v},d.prototype.$renderCell=function(p,g,m,v){var y=p.element,S=this.session,b=y.childNodes[0],_=y.childNodes[1],w=y.childNodes[2],E=w.firstChild,T=S.$firstLineNumber,$=S.$breakpoints,C=S.$decorations,x=S.gutterRenderer||this.$renderer,L=this.$showFoldWidgets&&S.foldWidgets,M=m?m.start.row:Number.MAX_VALUE,A=g.lineHeight+"px",k=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",P=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",O=(x?x.getText(S,v):v+T).toString();if(this.$highlightGutterLine&&(v==this.$cursorRow||m&&v<this.$cursorRow&&v>=M&&this.$cursorRow<=m.end.row)&&(k+="ace_gutter-active-line ",this.$cursorCell!=p&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=p)),$[v]&&(k+=$[v]),C[v]&&(k+=C[v]),this.$annotations[v]&&v!==M&&(k+=this.$annotations[v].className),y.className!=k&&(y.className=k),L){var N=L[v];N==null&&(N=L[v]=S.getFoldWidget(v))}if(N){var k="ace_fold-widget ace_"+N;if(N=="start"&&v==M&&v<m.end.row){k+=" ace_closed";for(var D,B=!1,U=v+1;U<=m.end.row;U++)if(!!this.$annotations[U]){if(this.$annotations[U].className===" ace_error"){B=!0,D=" ace_error_fold";break}if(this.$annotations[U].className===" ace_warning"){B=!0,D=" ace_warning_fold";continue}}y.className+=D}else k+=" ace_open";_.className!=k&&(_.className=k),s.setStyle(_.style,"height",A),s.setStyle(_.style,"display","inline-block"),_.setAttribute("role","button"),_.setAttribute("tabindex","-1");var m=S.getFoldLine(O-1);m?(_.setAttribute("aria-label",a("Unfold rows $0 to $1",[O,m.end.row+1])),_.setAttribute("title",a("Unfold code"))):(_.setAttribute("aria-label",a("Fold at row $0",[O])),_.setAttribute("title",a("Fold code")))}else _&&(s.setStyle(_.style,"display","none"),_.setAttribute("tabindex","0"),_.removeAttribute("role"),_.removeAttribute("aria-label"));return B&&this.$showFoldedAnnotations?(w.className="ace_gutter_annotation",E.className=P,E.className+=D,s.setStyle(E.style,"height",A),s.setStyle(w.style,"display","block"),s.setStyle(w.style,"height",A),w.setAttribute("aria-label",a("Read annotations row $0",[O])),w.setAttribute("tabindex","-1"),w.setAttribute("role","button")):this.$annotations[v]?(w.className="ace_gutter_annotation",E.className=P,this.$useSvgGutterIcons?E.className+=this.$annotations[v].className:y.classList.add(this.$annotations[v].className.replace(" ","")),s.setStyle(E.style,"height",A),s.setStyle(w.style,"display","block"),s.setStyle(w.style,"height",A),w.setAttribute("aria-label",a("Read annotations row $0",[O])),w.setAttribute("tabindex","-1"),w.setAttribute("role","button")):(s.setStyle(w.style,"display","none"),w.removeAttribute("aria-label"),w.removeAttribute("role"),w.setAttribute("tabindex","0")),O!==b.data&&(b.data=O),s.setStyle(p.element.style,"height",this.$lines.computeLineHeight(v,g,S)+"px"),s.setStyle(p.element.style,"top",this.$lines.computeLineTop(v,g,S)+"px"),p.text=O,w.style.display==="none"&&_.style.display==="none"?p.element.setAttribute("aria-hidden",!0):p.element.setAttribute("aria-hidden",!1),p},d.prototype.setHighlightGutterLine=function(p){this.$highlightGutterLine=p},d.prototype.setShowLineNumbers=function(p){this.$renderer=!p&&{getWidth:function(){return 0},getText:function(){return""}}},d.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},d.prototype.setShowFoldWidgets=function(p){p?s.addCssClass(this.element,"ace_folding-enabled"):s.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=p,this.$padding=null},d.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},d.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var p=s.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(p.borderLeftWidth)||0)+(parseInt(p.paddingLeft)||0)+1,this.$padding.right=(parseInt(p.borderRightWidth)||0)+(parseInt(p.paddingRight)||0),this.$padding},d.prototype.getRegion=function(p){var g=this.$padding||this.$computePadding(),m=this.element.getBoundingClientRect();if(p.x<g.left+m.left)return"markers";if(this.$showFoldWidgets&&p.x>m.right-g.right)return"foldWidgets"},d}();l.prototype.$fixedWidth=!1,l.prototype.$highlightGutterLine=!0,l.prototype.$renderer="",l.prototype.$showLineNumbers=!0,l.prototype.$showFoldWidgets=!0,c.implement(l.prototype,o);function f(d){var p=document.createTextNode("");d.appendChild(p);var g=s.createElement("span");d.appendChild(g);var m=s.createElement("span");d.appendChild(m);var v=s.createElement("span");return m.appendChild(v),d}n.Gutter=l}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(i,n,r){var s=i("../range").Range,c=i("../lib/dom"),u=function(){function h(a){this.element=c.createElement("div"),this.element.className="ace_layer ace_marker-layer",a.appendChild(this.element)}return h.prototype.setPadding=function(a){this.$padding=a},h.prototype.setSession=function(a){this.session=a},h.prototype.setMarkers=function(a){this.markers=a},h.prototype.elt=function(a,l){var f=this.i!=-1&&this.element.childNodes[this.i];f?this.i++:(f=document.createElement("div"),this.element.appendChild(f),this.i=-1),f.style.cssText=l,f.className=a},h.prototype.update=function(a){if(!!a){this.config=a,this.i=0;var l;for(var f in this.markers){var d=this.markers[f];if(!d.range){d.update(l,this,this.session,a);continue}var p=d.range.clipRows(a.firstRow,a.lastRow);if(!p.isEmpty())if(p=p.toScreenRange(this.session),d.renderer){var g=this.$getTop(p.start.row,a),m=this.$padding+p.start.column*a.characterWidth;d.renderer(l,p,m,g,a)}else d.type=="fullLine"?this.drawFullLineMarker(l,p,d.clazz,a):d.type=="screenLine"?this.drawScreenLineMarker(l,p,d.clazz,a):p.isMultiLine()?d.type=="text"?this.drawTextMarker(l,p,d.clazz,a):this.drawMultiLineMarker(l,p,d.clazz,a):this.drawSingleLineMarker(l,p,d.clazz+" ace_start ace_br15",a)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},h.prototype.$getTop=function(a,l){return(a-l.firstRowScreen)*l.lineHeight},h.prototype.drawTextMarker=function(a,l,f,d,p){for(var g=this.session,m=l.start.row,v=l.end.row,y=m,S=0,b=0,_=g.getScreenLastRowColumn(y),w=new s(y,l.start.column,y,b);y<=v;y++)w.start.row=w.end.row=y,w.start.column=y==m?l.start.column:g.getRowWrapIndent(y),w.end.column=_,S=b,b=_,_=y+1<v?g.getScreenLastRowColumn(y+1):y==v?0:l.end.column,this.drawSingleLineMarker(a,w,f+(y==m?" ace_start":"")+" ace_br"+o(y==m||y==m+1&&l.start.column,S<b,b>_,y==v),d,y==v?0:1,p)},h.prototype.drawMultiLineMarker=function(a,l,f,d,p){var g=this.$padding,m=d.lineHeight,v=this.$getTop(l.start.row,d),y=g+l.start.column*d.characterWidth;if(p=p||"",this.session.$bidiHandler.isBidiRow(l.start.row)){var S=l.clone();S.end.row=S.start.row,S.end.column=this.session.getLine(S.start.row).length,this.drawBidiSingleLineMarker(a,S,f+" ace_br1 ace_start",d,null,p)}else this.elt(f+" ace_br1 ace_start","height:"+m+"px;right:0;top:"+v+"px;left:"+y+"px;"+(p||""));if(this.session.$bidiHandler.isBidiRow(l.end.row)){var S=l.clone();S.start.row=S.end.row,S.start.column=0,this.drawBidiSingleLineMarker(a,S,f+" ace_br12",d,null,p)}else{v=this.$getTop(l.end.row,d);var b=l.end.column*d.characterWidth;this.elt(f+" ace_br12","height:"+m+"px;width:"+b+"px;top:"+v+"px;left:"+g+"px;"+(p||""))}if(m=(l.end.row-l.start.row-1)*d.lineHeight,!(m<=0)){v=this.$getTop(l.start.row+1,d);var _=(l.start.column?1:0)|(l.end.column?0:8);this.elt(f+(_?" ace_br"+_:""),"height:"+m+"px;right:0;top:"+v+"px;left:"+g+"px;"+(p||""))}},h.prototype.drawSingleLineMarker=function(a,l,f,d,p,g){if(this.session.$bidiHandler.isBidiRow(l.start.row))return this.drawBidiSingleLineMarker(a,l,f,d,p,g);var m=d.lineHeight,v=(l.end.column+(p||0)-l.start.column)*d.characterWidth,y=this.$getTop(l.start.row,d),S=this.$padding+l.start.column*d.characterWidth;this.elt(f,"height:"+m+"px;width:"+v+"px;top:"+y+"px;left:"+S+"px;"+(g||""))},h.prototype.drawBidiSingleLineMarker=function(a,l,f,d,p,g){var m=d.lineHeight,v=this.$getTop(l.start.row,d),y=this.$padding,S=this.session.$bidiHandler.getSelections(l.start.column,l.end.column);S.forEach(function(b){this.elt(f,"height:"+m+"px;width:"+(b.width+(p||0))+"px;top:"+v+"px;left:"+(y+b.left)+"px;"+(g||""))},this)},h.prototype.drawFullLineMarker=function(a,l,f,d,p){var g=this.$getTop(l.start.row,d),m=d.lineHeight;l.start.row!=l.end.row&&(m+=this.$getTop(l.end.row,d)-g),this.elt(f,"height:"+m+"px;top:"+g+"px;left:0;right:0;"+(p||""))},h.prototype.drawScreenLineMarker=function(a,l,f,d,p){var g=this.$getTop(l.start.row,d),m=d.lineHeight;this.elt(f,"height:"+m+"px;top:"+g+"px;left:0;right:0;"+(p||""))},h}();u.prototype.$padding=0;function o(h,a,l,f){return(h?1:0)|(a?2:0)|(l?4:0)|(f?8:0)}n.Marker=u}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config"],function(i,n,r){var s=i("../lib/oop"),c=i("../lib/dom"),u=i("../lib/lang"),o=i("./lines").Lines,h=i("../lib/event_emitter").EventEmitter,a=i("../config").nls,l=function(){function f(d){this.dom=c,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",d.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new o(this.element)}return f.prototype.$updateEolChar=function(){var d=this.session.doc,p=d.getNewLineCharacter()==`
`&&d.getNewLineMode()!="windows",g=p?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=g)return this.EOL_CHAR=g,!0},f.prototype.setPadding=function(d){this.$padding=d,this.element.style.margin="0 "+d+"px"},f.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},f.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},f.prototype.$setFontMetrics=function(d){this.$fontMetrics=d,this.$fontMetrics.on("changeCharacterSize",function(p){this._signal("changeCharacterSize",p)}.bind(this)),this.$pollSizeChanges()},f.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},f.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},f.prototype.setSession=function(d){this.session=d,d&&this.$computeTabString()},f.prototype.setShowInvisibles=function(d){return this.showInvisibles==d?!1:(this.showInvisibles=d,typeof d=="string"?(this.showSpaces=/tab/i.test(d),this.showTabs=/space/i.test(d),this.showEOL=/eol/i.test(d)):this.showSpaces=this.showTabs=this.showEOL=d,this.$computeTabString(),!0)},f.prototype.setDisplayIndentGuides=function(d){return this.displayIndentGuides==d?!1:(this.displayIndentGuides=d,this.$computeTabString(),!0)},f.prototype.setHighlightIndentGuides=function(d){return this.$highlightIndentGuides===d?!1:(this.$highlightIndentGuides=d,d)},f.prototype.$computeTabString=function(){var d=this.session.getTabSize();this.tabSize=d;for(var p=this.$tabStrings=[0],g=1;g<d+1;g++)if(this.showTabs){var m=this.dom.createElement("span");m.className="ace_invisible ace_invisible_tab",m.textContent=u.stringRepeat(this.TAB_CHAR,g),p.push(m)}else p.push(this.dom.createTextNode(u.stringRepeat(" ",g),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var v="ace_indent-guide",y=this.showSpaces?" ace_invisible ace_invisible_space":"",S=this.showSpaces?u.stringRepeat(this.SPACE_CHAR,this.tabSize):u.stringRepeat(" ",this.tabSize),b=this.showTabs?" ace_invisible ace_invisible_tab":"",_=this.showTabs?u.stringRepeat(this.TAB_CHAR,this.tabSize):S,m=this.dom.createElement("span");m.className=v+y,m.textContent=S,this.$tabStrings[" "]=m;var m=this.dom.createElement("span");m.className=v+b,m.textContent=_,this.$tabStrings["	"]=m}},f.prototype.updateLines=function(d,p,g){if(this.config.lastRow!=d.lastRow||this.config.firstRow!=d.firstRow)return this.update(d);this.config=d;for(var m=Math.max(p,d.firstRow),v=Math.min(g,d.lastRow),y=this.element.childNodes,S=0,_=d.firstRow;_<m;_++){var w=this.session.getFoldLine(_);if(w)if(w.containsRow(m)){m=w.start.row;break}else _=w.end.row;S++}for(var b=!1,_=m,w=this.session.getNextFoldLine(_),E=w?w.start.row:1/0;_>E&&(_=w.end.row+1,w=this.session.getNextFoldLine(_,w),E=w?w.start.row:1/0),!(_>v);){var T=y[S++];if(T){this.dom.removeChildren(T),this.$renderLine(T,_,_==E?w:!1),b&&(T.style.top=this.$lines.computeLineTop(_,d,this.session)+"px");var $=d.lineHeight*this.session.getRowLength(_)+"px";T.style.height!=$&&(b=!0,T.style.height=$)}_++}if(b)for(;S<this.$lines.cells.length;){var C=this.$lines.cells[S++];C.element.style.top=this.$lines.computeLineTop(C.row,d,this.session)+"px"}},f.prototype.scrollLines=function(d){var p=this.config;if(this.config=d,this.$lines.pageChanged(p,d))return this.update(d);this.$lines.moveContainer(d);var g=d.lastRow,m=p?p.lastRow:-1;if(!p||m<d.firstRow)return this.update(d);if(g<p.firstRow)return this.update(d);if(!p||p.lastRow<d.firstRow)return this.update(d);if(d.lastRow<p.firstRow)return this.update(d);if(p.firstRow<d.firstRow)for(var v=this.session.getFoldedRowCount(p.firstRow,d.firstRow-1);v>0;v--)this.$lines.shift();if(p.lastRow>d.lastRow)for(var v=this.session.getFoldedRowCount(d.lastRow+1,p.lastRow);v>0;v--)this.$lines.pop();d.firstRow<p.firstRow&&this.$lines.unshift(this.$renderLinesFragment(d,d.firstRow,p.firstRow-1)),d.lastRow>p.lastRow&&this.$lines.push(this.$renderLinesFragment(d,p.lastRow+1,d.lastRow)),this.$highlightIndentGuide()},f.prototype.$renderLinesFragment=function(d,p,g){for(var m=[],v=p,y=this.session.getNextFoldLine(v),S=y?y.start.row:1/0;v>S&&(v=y.end.row+1,y=this.session.getNextFoldLine(v,y),S=y?y.start.row:1/0),!(v>g);){var b=this.$lines.createCell(v,d,this.session),_=b.element;this.dom.removeChildren(_),c.setStyle(_.style,"height",this.$lines.computeLineHeight(v,d,this.session)+"px"),c.setStyle(_.style,"top",this.$lines.computeLineTop(v,d,this.session)+"px"),this.$renderLine(_,v,v==S?y:!1),this.$useLineGroups()?_.className="ace_line_group":_.className="ace_line",m.push(b),v++}return m},f.prototype.update=function(d){this.$lines.moveContainer(d),this.config=d;for(var p=d.firstRow,g=d.lastRow,m=this.$lines;m.getLength();)m.pop();m.push(this.$renderLinesFragment(d,p,g))},f.prototype.$renderToken=function(d,p,g,m){for(var v=this,y=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,S=this.dom.createFragment(this.element),b,_=0;b=y.exec(m);){var w=b[1],E=b[2],T=b[3],$=b[4],C=b[5];if(!(!v.showSpaces&&E)){var x=_!=b.index?m.slice(_,b.index):"";if(_=b.index+b[0].length,x&&S.appendChild(this.dom.createTextNode(x,this.element)),w){var L=v.session.getScreenTabSize(p+b.index);S.appendChild(v.$tabStrings[L].cloneNode(!0)),p+=L-1}else if(E)if(v.showSpaces){var M=this.dom.createElement("span");M.className="ace_invisible ace_invisible_space",M.textContent=u.stringRepeat(v.SPACE_CHAR,E.length),S.appendChild(M)}else S.appendChild(this.com.createTextNode(E,this.element));else if(T){var M=this.dom.createElement("span");M.className="ace_invisible ace_invisible_space ace_invalid",M.textContent=u.stringRepeat(v.SPACE_CHAR,T.length),S.appendChild(M)}else if($){p+=1;var M=this.dom.createElement("span");M.style.width=v.config.characterWidth*2+"px",M.className=v.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",M.textContent=v.showSpaces?v.SPACE_CHAR:$,S.appendChild(M)}else if(C){p+=1;var M=this.dom.createElement("span");M.style.width=v.config.characterWidth*2+"px",M.className="ace_cjk",M.textContent=C,S.appendChild(M)}}}if(S.appendChild(this.dom.createTextNode(_?m.slice(_):m,this.element)),this.$textToken[g.type])d.appendChild(S);else{var A="ace_"+g.type.replace(/\./g," ace_"),M=this.dom.createElement("span");g.type=="fold"&&(M.style.width=g.value.length*this.config.characterWidth+"px",M.setAttribute("title",a("Unfold code"))),M.className=A,M.appendChild(S),d.appendChild(M)}return p+m.length},f.prototype.renderIndentGuide=function(d,p,g){var m=p.search(this.$indentGuideRe);if(m<=0||m>=g)return p;if(p[0]==" "){m-=m%this.tabSize;for(var v=m/this.tabSize,y=0;y<v;y++)d.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),p.substr(m)}else if(p[0]=="	"){for(var y=0;y<m;y++)d.appendChild(this.$tabStrings["	"].cloneNode(!0));return this.$highlightIndentGuide(),p.substr(m)}return this.$highlightIndentGuide(),p},f.prototype.$highlightIndentGuide=function(){if(!(!this.$highlightIndentGuides||!this.displayIndentGuides)){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var d=this.session.doc.$lines;if(!!d){var p=this.session.selection.getCursor(),g=/^\s*/.exec(this.session.doc.getLine(p.row))[0].length,m=Math.floor(g/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:m,start:p.row};var v=this.session.$bracketHighlight;if(v){for(var y=this.session.$bracketHighlight.ranges,S=0;S<y.length;S++)if(p.row!==y[S].start.row){this.$highlightIndentGuideMarker.end=y[S].start.row,p.row>y[S].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&d[p.row]!==""&&p.column===d[p.row].length){this.$highlightIndentGuideMarker.dir=1;for(var S=p.row+1;S<d.length;S++){var b=d[S],_=/^\s*/.exec(b)[0].length;if(b!==""&&(this.$highlightIndentGuideMarker.end=S,_<=g))break}}this.$renderHighlightIndentGuide()}}},f.prototype.$clearActiveIndentGuide=function(){for(var d=this.$lines.cells,p=0;p<d.length;p++){var g=d[p],m=g.element.childNodes;if(m.length>0){for(var v=0;v<m.length;v++)if(m[v].classList&&m[v].classList.contains("ace_indent-guide-active")){m[v].classList.remove("ace_indent-guide-active");break}}}},f.prototype.$setIndentGuideActive=function(d,p){var g=this.session.doc.getLine(d.row);if(g!==""){var m=d.element.childNodes;if(m){var v=m[p-1];v&&v.classList&&v.classList.contains("ace_indent-guide")&&v.classList.add("ace_indent-guide-active")}}},f.prototype.$renderHighlightIndentGuide=function(){if(!!this.$lines){var d=this.$lines.cells;this.$clearActiveIndentGuide();var p=this.$highlightIndentGuideMarker.indentLevel;if(p!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var g=0;g<d.length;g++){var m=d[g];if(this.$highlightIndentGuideMarker.end&&m.row>=this.$highlightIndentGuideMarker.start+1){if(m.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(m,p)}}else for(var g=d.length-1;g>=0;g--){var m=d[g];if(this.$highlightIndentGuideMarker.end&&m.row<this.$highlightIndentGuideMarker.start){if(m.row<=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(m,p)}}}},f.prototype.$createLineElement=function(d){var p=this.dom.createElement("div");return p.className="ace_line",p.style.height=this.config.lineHeight+"px",p},f.prototype.$renderWrappedLine=function(d,p,g){var m=0,v=0,y=g[0],S=0,b=this.$createLineElement();d.appendChild(b);for(var _=0;_<p.length;_++){var w=p[_],E=w.value;if(_==0&&this.displayIndentGuides){if(m=E.length,E=this.renderIndentGuide(b,E,y),!E)continue;m-=E.length}if(m+E.length<y)S=this.$renderToken(b,S,w,E),m+=E.length;else{for(;m+E.length>=y;)S=this.$renderToken(b,S,w,E.substring(0,y-m)),E=E.substring(y-m),m=y,b=this.$createLineElement(),d.appendChild(b),b.appendChild(this.dom.createTextNode(u.stringRepeat("\xA0",g.indent),this.element)),v++,S=0,y=g[v]||Number.MAX_VALUE;E.length!=0&&(m+=E.length,S=this.$renderToken(b,S,w,E))}}g[g.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(b,S,null,"",!0)},f.prototype.$renderSimpleLine=function(d,p){for(var g=0,m=0;m<p.length;m++){var v=p[m],y=v.value;if(!(m==0&&this.displayIndentGuides&&(y=this.renderIndentGuide(d,y),!y))){if(g+y.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(d,g,v,y);g=this.$renderToken(d,g,v,y)}}},f.prototype.$renderOverflowMessage=function(d,p,g,m,v){g&&this.$renderToken(d,p,g,m.slice(0,this.MAX_LINE_LENGTH-p));var y=this.dom.createElement("span");y.className="ace_inline_button ace_keyword ace_toggle_wrap",y.textContent=v?"<hide>":"<click to see more...>",d.appendChild(y)},f.prototype.$renderLine=function(d,p,g){if(!g&&g!=!1&&(g=this.session.getFoldLine(p)),g)var m=this.$getFoldLineTokens(p,g);else var m=this.session.getTokens(p);var v=d;if(m.length){var y=this.session.getRowSplitData(p);if(y&&y.length){this.$renderWrappedLine(d,m,y);var v=d.lastChild}else{var v=d;this.$useLineGroups()&&(v=this.$createLineElement(),d.appendChild(v)),this.$renderSimpleLine(v,m)}}else this.$useLineGroups()&&(v=this.$createLineElement(),d.appendChild(v));if(this.showEOL&&v){g&&(p=g.end.row);var S=this.dom.createElement("span");S.className="ace_invisible ace_invisible_eol",S.textContent=p==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,v.appendChild(S)}},f.prototype.$getFoldLineTokens=function(d,p){var g=this.session,m=[];function v(S,b,_){for(var w=0,E=0;E+S[w].value.length<b;)if(E+=S[w].value.length,w++,w==S.length)return;if(E!=b){var T=S[w].value.substring(b-E);T.length>_-b&&(T=T.substring(0,_-b)),m.push({type:S[w].type,value:T}),E=b+T.length,w+=1}for(;E<_&&w<S.length;){var T=S[w].value;T.length+E>_?m.push({type:S[w].type,value:T.substring(0,_-E)}):m.push(S[w]),E+=T.length,w+=1}}var y=g.getTokens(d);return p.walk(function(S,b,_,w,E){S!=null?m.push({type:"fold",value:S}):(E&&(y=g.getTokens(b)),y.length&&v(y,w,_))},p.end.row,this.session.getLine(p.end.row).length),m},f.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},f}();l.prototype.$textToken={text:!0,rparen:!0,lparen:!0},l.prototype.EOF_CHAR="\xB6",l.prototype.EOL_CHAR_LF="\xAC",l.prototype.EOL_CHAR_CRLF="\xA4",l.prototype.EOL_CHAR=l.prototype.EOL_CHAR_LF,l.prototype.TAB_CHAR="\u2014",l.prototype.SPACE_CHAR="\xB7",l.prototype.$padding=0,l.prototype.MAX_LINE_LENGTH=1e4,l.prototype.showInvisibles=!1,l.prototype.showSpaces=!1,l.prototype.showTabs=!1,l.prototype.showEOL=!1,l.prototype.displayIndentGuides=!0,l.prototype.$highlightIndentGuides=!0,l.prototype.$tabStrings=[],l.prototype.destroy={},l.prototype.onChangeTabSize=l.prototype.$computeTabString,s.implement(l.prototype,h),n.Text=l}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(i,n,r){var s=i("../lib/dom"),c=function(){function u(o){this.element=s.createElement("div"),this.element.className="ace_layer ace_cursor-layer",o.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),s.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return u.prototype.$updateOpacity=function(o){for(var h=this.cursors,a=h.length;a--;)s.setStyle(h[a].style,"opacity",o?"":"0")},u.prototype.$startCssAnimation=function(){for(var o=this.cursors,h=o.length;h--;)o[h].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout(function(){this.$isAnimating&&s.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},u.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,s.removeCssClass(this.element,"ace_animate-blinking")},u.prototype.setPadding=function(o){this.$padding=o},u.prototype.setSession=function(o){this.session=o},u.prototype.setBlinking=function(o){o!=this.isBlinking&&(this.isBlinking=o,this.restartTimer())},u.prototype.setBlinkInterval=function(o){o!=this.blinkInterval&&(this.blinkInterval=o,this.restartTimer())},u.prototype.setSmoothBlinking=function(o){o!=this.smoothBlinking&&(this.smoothBlinking=o,s.setCssClass(this.element,"ace_smooth-blinking",o),this.$updateCursors(!0),this.restartTimer())},u.prototype.addCursor=function(){var o=s.createElement("div");return o.className="ace_cursor",this.element.appendChild(o),this.cursors.push(o),o},u.prototype.removeCursor=function(){if(this.cursors.length>1){var o=this.cursors.pop();return o.parentNode.removeChild(o),o}},u.prototype.hideCursor=function(){this.isVisible=!1,s.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},u.prototype.showCursor=function(){this.isVisible=!0,s.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},u.prototype.restartTimer=function(){var o=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,s.removeCssClass(this.element,"ace_smooth-blinking")),o(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout(function(){this.$isSmoothBlinking&&s.addCssClass(this.element,"ace_smooth-blinking")}.bind(this))),s.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var h=function(){this.timeoutId=setTimeout(function(){o(!1)},.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){o(!0),h()},this.blinkInterval),h()}},u.prototype.getPixelPosition=function(o,h){if(!this.config||!this.session)return{left:0,top:0};o||(o=this.session.selection.getCursor());var a=this.session.documentToScreenPosition(o),l=this.$padding+(this.session.$bidiHandler.isBidiRow(a.row,o.row)?this.session.$bidiHandler.getPosLeft(a.column):a.column*this.config.characterWidth),f=(a.row-(h?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:l,top:f}},u.prototype.isCursorInView=function(o,h){return o.top>=0&&o.top<h.maxHeight},u.prototype.update=function(o){this.config=o;var h=this.session.$selectionMarkers,a=0,l=0;(h===void 0||h.length===0)&&(h=[{cursor:null}]);for(var a=0,f=h.length;a<f;a++){var d=this.getPixelPosition(h[a].cursor,!0);if(!((d.top>o.height+o.offset||d.top<0)&&a>1)){var p=this.cursors[l++]||this.addCursor(),g=p.style;this.drawCursor?this.drawCursor(p,d,o,h[a],this.session):this.isCursorInView(d,o)?(s.setStyle(g,"display","block"),s.translate(p,d.left,d.top),s.setStyle(g,"width",Math.round(o.characterWidth)+"px"),s.setStyle(g,"height",o.lineHeight+"px")):s.setStyle(g,"display","none")}}for(;this.cursors.length>l;)this.removeCursor();var m=this.session.getOverwrite();this.$setOverwrite(m),this.$pixelPos=d,this.restartTimer()},u.prototype.$setOverwrite=function(o){o!=this.overwrite&&(this.overwrite=o,o?s.addCssClass(this.element,"ace_overwrite-cursors"):s.removeCssClass(this.element,"ace_overwrite-cursors"))},u.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},u}();c.prototype.$padding=0,c.prototype.drawCursor=null,n.Cursor=c}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(i,n,r){var s=this&&this.__extends||function(){var p=function(g,m){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,y){v.__proto__=y}||function(v,y){for(var S in y)Object.prototype.hasOwnProperty.call(y,S)&&(v[S]=y[S])},p(g,m)};return function(g,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");p(g,m);function v(){this.constructor=g}g.prototype=m===null?Object.create(m):(v.prototype=m.prototype,new v)}}(),c=i("./lib/oop"),u=i("./lib/dom"),o=i("./lib/event"),h=i("./lib/event_emitter").EventEmitter,a=32768,l=function(){function p(g,m){this.element=u.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+m,this.inner=u.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent="\xA0",this.element.appendChild(this.inner),g.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,o.addListener(this.element,"scroll",this.onScroll.bind(this)),o.addListener(this.element,"mousedown",o.preventDefault)}return p.prototype.setVisible=function(g){this.element.style.display=g?"":"none",this.isVisible=g,this.coeff=1},p}();c.implement(l.prototype,h);var f=function(p){s(g,p);function g(m,v){var y=p.call(this,m,"-v")||this;return y.scrollTop=0,y.scrollHeight=0,v.$scrollbarWidth=y.width=u.scrollbarWidth(m.ownerDocument),y.inner.style.width=y.element.style.width=(y.width||15)+5+"px",y.$minWidth=0,y}return g.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var m=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-m)/(this.coeff-m)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},g.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},g.prototype.setHeight=function(m){this.element.style.height=m+"px"},g.prototype.setScrollHeight=function(m){this.scrollHeight=m,m>a?(this.coeff=a/m,m=a):this.coeff!=1&&(this.coeff=1),this.inner.style.height=m+"px"},g.prototype.setScrollTop=function(m){this.scrollTop!=m&&(this.skipEvent=!0,this.scrollTop=m,this.element.scrollTop=m*this.coeff)},g}(l);f.prototype.setInnerHeight=f.prototype.setScrollHeight;var d=function(p){s(g,p);function g(m,v){var y=p.call(this,m,"-h")||this;return y.scrollLeft=0,y.height=v.$scrollbarWidth,y.inner.style.height=y.element.style.height=(y.height||15)+5+"px",y}return g.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},g.prototype.getHeight=function(){return this.isVisible?this.height:0},g.prototype.setWidth=function(m){this.element.style.width=m+"px"},g.prototype.setInnerWidth=function(m){this.inner.style.width=m+"px"},g.prototype.setScrollWidth=function(m){this.inner.style.width=m+"px"},g.prototype.setScrollLeft=function(m){this.scrollLeft!=m&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=m)},g}(l);n.ScrollBar=f,n.ScrollBarV=f,n.ScrollBarH=d,n.VScrollBar=f,n.HScrollBar=d}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(i,n,r){var s=this&&this.__extends||function(){var d=function(p,g){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,v){m.__proto__=v}||function(m,v){for(var y in v)Object.prototype.hasOwnProperty.call(v,y)&&(m[y]=v[y])},d(p,g)};return function(p,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");d(p,g);function m(){this.constructor=p}p.prototype=g===null?Object.create(g):(m.prototype=g.prototype,new m)}}(),c=i("./lib/oop"),u=i("./lib/dom"),o=i("./lib/event"),h=i("./lib/event_emitter").EventEmitter;u.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{
  position: absolute;
  background: rgba(128, 128, 128, 0.6);
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  border: 1px solid #bbb;
  border-radius: 2px;
  z-index: 8;
}
.ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {
  position: absolute;
  z-index: 6;
  background: none;
  overflow: hidden!important;
}
.ace_editor>.ace_sb-v {
  z-index: 6;
  right: 0;
  top: 0;
  width: 12px;
}
.ace_editor>.ace_sb-v div {
  z-index: 8;
  right: 0;
  width: 100%;
}
.ace_editor>.ace_sb-h {
  bottom: 0;
  left: 0;
  height: 12px;
}
.ace_editor>.ace_sb-h div {
  bottom: 0;
  height: 100%;
}
.ace_editor>.ace_sb_grabbed {
  z-index: 8;
  background: #000;
}`,"ace_scrollbar.css",!1);var a=function(){function d(p,g){this.element=u.createElement("div"),this.element.className="ace_sb"+g,this.inner=u.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,p.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,o.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return d.prototype.setVisible=function(p){this.element.style.display=p?"":"none",this.isVisible=p,this.coeff=1},d}();c.implement(a.prototype,h);var l=function(d){s(p,d);function p(g,m){var v=d.call(this,g,"-v")||this;return v.scrollTop=0,v.scrollHeight=0,v.parent=g,v.width=v.VScrollWidth,v.renderer=m,v.inner.style.width=v.element.style.width=(v.width||15)+"px",v.$minWidth=0,v}return p.prototype.onMouseDown=function(g,m){if(g==="mousedown"&&!(o.getButton(m)!==0||m.detail===2)){if(m.target===this.inner){var v=this,y=m.clientY,S=function(C){y=C.clientY},b=function(){clearInterval(T)},_=m.clientY,w=this.thumbTop,E=function(){if(y!==void 0){var C=v.scrollTopFromThumbTop(w+y-_);C!==v.scrollTop&&v._emit("scroll",{data:C})}};o.capture(this.inner,S,b);var T=setInterval(E,20);return o.preventDefault(m)}var $=m.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop($)}),o.preventDefault(m)}},p.prototype.getHeight=function(){return this.height},p.prototype.scrollTopFromThumbTop=function(g){var m=g*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return m=m>>0,m<0?m=0:m>this.pageHeight-this.viewHeight&&(m=this.pageHeight-this.viewHeight),m},p.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},p.prototype.setHeight=function(g){this.height=Math.max(0,g),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},p.prototype.setScrollHeight=function(g,m){this.pageHeight===g&&!m||(this.pageHeight=g,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},p.prototype.setScrollTop=function(g){this.scrollTop=g,g<0&&(g=0),this.thumbTop=g*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},p}(a);l.prototype.setInnerHeight=l.prototype.setScrollHeight;var f=function(d){s(p,d);function p(g,m){var v=d.call(this,g,"-h")||this;return v.scrollLeft=0,v.scrollWidth=0,v.height=v.HScrollHeight,v.inner.style.height=v.element.style.height=(v.height||12)+"px",v.renderer=m,v}return p.prototype.onMouseDown=function(g,m){if(g==="mousedown"&&!(o.getButton(m)!==0||m.detail===2)){if(m.target===this.inner){var v=this,y=m.clientX,S=function(C){y=C.clientX},b=function(){clearInterval(T)},_=m.clientX,w=this.thumbLeft,E=function(){if(y!==void 0){var C=v.scrollLeftFromThumbLeft(w+y-_);C!==v.scrollLeft&&v._emit("scroll",{data:C})}};o.capture(this.inner,S,b);var T=setInterval(E,20);return o.preventDefault(m)}var $=m.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft($)}),o.preventDefault(m)}},p.prototype.getHeight=function(){return this.isVisible?this.height:0},p.prototype.scrollLeftFromThumbLeft=function(g){var m=g*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return m=m>>0,m<0?m=0:m>this.pageWidth-this.viewWidth&&(m=this.pageWidth-this.viewWidth),m},p.prototype.setWidth=function(g){this.width=Math.max(0,g),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},p.prototype.setScrollWidth=function(g,m){this.pageWidth===g&&!m||(this.pageWidth=g,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},p.prototype.setScrollLeft=function(g){this.scrollLeft=g,g<0&&(g=0),this.thumbLeft=g*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},p}(a);f.prototype.setInnerWidth=f.prototype.setScrollWidth,n.ScrollBar=l,n.ScrollBarV=l,n.ScrollBarH=f,n.VScrollBar=l,n.HScrollBar=f}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(i,n,r){var s=i("./lib/event"),c=function(){function u(o,h){this.onRender=o,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=h||window;var a=this;this._flush=function(l){a.pending=!1;var f=a.changes;if(f&&(s.blockIdle(100),a.changes=0,a.onRender(f)),a.changes){if(a.$recursionLimit--<0)return;a.schedule()}else a.$recursionLimit=2}}return u.prototype.schedule=function(o){this.changes=this.changes|o,this.changes&&!this.pending&&(s.nextFrame(this._flush),this.pending=!0)},u.prototype.clear=function(o){var h=this.changes;return this.changes=0,h},u}();n.RenderLoop=c}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(i,n,r){var s=i("../lib/oop"),c=i("../lib/dom"),u=i("../lib/lang"),o=i("../lib/event"),h=i("../lib/useragent"),a=i("../lib/event_emitter").EventEmitter,l=512,f=typeof ResizeObserver=="function",d=200,p=function(){function g(m){this.el=c.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=c.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=c.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),m.appendChild(this.el),this.$measureNode.textContent=u.stringRepeat("X",l),this.$characterSize={width:0,height:0},f?this.$addObserver():this.checkForSizeChanges()}return g.prototype.$setMeasureNodeStyles=function(m,v){m.width=m.height="auto",m.left=m.top="0px",m.visibility="hidden",m.position="absolute",m.whiteSpace="pre",h.isIE<8?m["font-family"]="inherit":m.font="inherit",m.overflow=v?"hidden":"visible"},g.prototype.checkForSizeChanges=function(m){if(m===void 0&&(m=this.$measureSizes()),m&&(this.$characterSize.width!==m.width||this.$characterSize.height!==m.height)){this.$measureNode.style.fontWeight="bold";var v=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=m,this.charSizes=Object.create(null),this.allowBoldFonts=v&&v.width===m.width&&v.height===m.height,this._emit("changeCharacterSize",{data:m})}},g.prototype.$addObserver=function(){var m=this;this.$observer=new window.ResizeObserver(function(v){m.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},g.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var m=this;return this.$pollSizeChangesTimer=o.onIdle(function v(){m.checkForSizeChanges(),o.onIdle(v,500)},500)},g.prototype.setPolling=function(m){m?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},g.prototype.$measureSizes=function(m){var v={height:(m||this.$measureNode).clientHeight,width:(m||this.$measureNode).clientWidth/l};return v.width===0||v.height===0?null:v},g.prototype.$measureCharWidth=function(m){this.$main.textContent=u.stringRepeat(m,l);var v=this.$main.getBoundingClientRect();return v.width/l},g.prototype.getCharacterWidth=function(m){var v=this.charSizes[m];return v===void 0&&(v=this.charSizes[m]=this.$measureCharWidth(m)/this.$characterSize.width),v},g.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},g.prototype.$getZoom=function(m){return!m||!m.parentElement?1:(window.getComputedStyle(m).zoom||1)*this.$getZoom(m.parentElement)},g.prototype.$initTransformMeasureNodes=function(){var m=function(v,y){return["div",{style:"position: absolute;top:"+v+"px;left:"+y+"px;"}]};this.els=c.buildDom([m(0,0),m(d,0),m(0,d),m(d,d)],this.el)},g.prototype.transformCoordinates=function(m,v){if(m){var y=this.$getZoom(this.el);m=w(1/y,m)}function S(B,U,q){var H=B[1]*U[0]-B[0]*U[1];return[(-U[1]*q[0]+U[0]*q[1])/H,(+B[1]*q[0]-B[0]*q[1])/H]}function b(B,U){return[B[0]-U[0],B[1]-U[1]]}function _(B,U){return[B[0]+U[0],B[1]+U[1]]}function w(B,U){return[B*U[0],B*U[1]]}this.els||this.$initTransformMeasureNodes();function E(B){var U=B.getBoundingClientRect();return[U.left,U.top]}var T=E(this.els[0]),$=E(this.els[1]),C=E(this.els[2]),x=E(this.els[3]),L=S(b(x,$),b(x,C),b(_($,C),_(x,T))),M=w(1+L[0],b($,T)),A=w(1+L[1],b(C,T));if(v){var k=v,P=L[0]*k[0]/d+L[1]*k[1]/d+1,O=_(w(k[0],M),w(k[1],A));return _(w(1/P/d,O),T)}var N=b(m,T),D=S(b(M,w(L[0],N)),b(A,w(L[1],N)),N);return w(d,D)},g}();p.prototype.$characterSize={width:0,height:0},s.implement(p.prototype,a),n.FontMetrics=p}),ace.define("ace/css/editor.css",["require","exports","module"],function(i,n,r){r.exports=`
.ace_br1 {border-top-left-radius    : 3px;}
.ace_br2 {border-top-right-radius   : 3px;}
.ace_br3 {border-top-left-radius    : 3px; border-top-right-radius:    3px;}
.ace_br4 {border-bottom-right-radius: 3px;}
.ace_br5 {border-top-left-radius    : 3px; border-bottom-right-radius: 3px;}
.ace_br6 {border-top-right-radius   : 3px; border-bottom-right-radius: 3px;}
.ace_br7 {border-top-left-radius    : 3px; border-top-right-radius:    3px; border-bottom-right-radius: 3px;}
.ace_br8 {border-bottom-left-radius : 3px;}
.ace_br9 {border-top-left-radius    : 3px; border-bottom-left-radius:  3px;}
.ace_br10{border-top-right-radius   : 3px; border-bottom-left-radius:  3px;}
.ace_br11{border-top-left-radius    : 3px; border-top-right-radius:    3px; border-bottom-left-radius:  3px;}
.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius:  3px;}
.ace_br13{border-top-left-radius    : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius:  3px;}
.ace_br14{border-top-right-radius   : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius:  3px;}
.ace_br15{border-top-left-radius    : 3px; border-top-right-radius:    3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}


.ace_editor {
    position: relative;
    overflow: hidden;
    padding: 0;
    font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Source Code Pro', 'source-code-pro', monospace;
    direction: ltr;
    text-align: left;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

.ace_scroller {
    position: absolute;
    overflow: hidden;
    top: 0;
    bottom: 0;
    background-color: inherit;
    -ms-user-select: none;
    -moz-user-select: none;
    -webkit-user-select: none;
    user-select: none;
    cursor: text;
}

.ace_content {
    position: absolute;
    box-sizing: border-box;
    min-width: 100%;
    contain: style size layout;
    font-variant-ligatures: no-common-ligatures;
}

.ace_keyboard-focus:focus {
    box-shadow: inset 0 0 0 2px #5E9ED6;
    outline: none;
}

.ace_dragging .ace_scroller:before{
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    content: '';
    background: rgba(250, 250, 250, 0.01);
    z-index: 1000;
}
.ace_dragging.ace_dark .ace_scroller:before{
    background: rgba(0, 0, 0, 0.01);
}

.ace_gutter {
    position: absolute;
    overflow : hidden;
    width: auto;
    top: 0;
    bottom: 0;
    left: 0;
    cursor: default;
    z-index: 4;
    -ms-user-select: none;
    -moz-user-select: none;
    -webkit-user-select: none;
    user-select: none;
    contain: style size layout;
}

.ace_gutter-active-line {
    position: absolute;
    left: 0;
    right: 0;
}

.ace_scroller.ace_scroll-left:after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;
    pointer-events: none;
}

.ace_gutter-cell, .ace_gutter-cell_svg-icons {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding-left: 19px;
    padding-right: 6px;
    background-repeat: no-repeat;
}

.ace_gutter-cell_svg-icons .ace_gutter_annotation {
    margin-left: -14px;
    float: left;
}

.ace_gutter-cell .ace_gutter_annotation {
    margin-left: -19px;
    float: left;
}

.ace_gutter-cell.ace_error, .ace_icon.ace_error, .ace_icon.ace_error_fold {
    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");
    background-repeat: no-repeat;
    background-position: 2px center;
}

.ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold {
    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");
    background-repeat: no-repeat;
    background-position: 2px center;
}

.ace_gutter-cell.ace_info, .ace_icon.ace_info {
    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");
    background-repeat: no-repeat;
    background-position: 2px center;
}
.ace_dark .ace_gutter-cell.ace_info, .ace_dark .ace_icon.ace_info {
    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");
}

.ace_icon_svg.ace_error {
    -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");
    background-color: crimson;
}
.ace_icon_svg.ace_warning {
    -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");
    background-color: darkorange;
}
.ace_icon_svg.ace_info {
    -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");
    background-color: royalblue;
}

.ace_icon_svg.ace_error_fold {
    -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
    background-color: crimson;
}
.ace_icon_svg.ace_warning_fold {
    -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");
    background-color: darkorange;
}

.ace_scrollbar {
    contain: strict;
    position: absolute;
    right: 0;
    bottom: 0;
    z-index: 6;
}

.ace_scrollbar-inner {
    position: absolute;
    cursor: text;
    left: 0;
    top: 0;
}

.ace_scrollbar-v{
    overflow-x: hidden;
    overflow-y: scroll;
    top: 0;
}

.ace_scrollbar-h {
    overflow-x: scroll;
    overflow-y: hidden;
    left: 0;
}

.ace_print-margin {
    position: absolute;
    height: 100%;
}

.ace_text-input {
    position: absolute;
    z-index: 0;
    width: 0.5em;
    height: 1em;
    opacity: 0;
    background: transparent;
    -moz-appearance: none;
    appearance: none;
    border: none;
    resize: none;
    outline: none;
    overflow: hidden;
    font: inherit;
    padding: 0 1px;
    margin: 0 -1px;
    contain: strict;
    -ms-user-select: text;
    -moz-user-select: text;
    -webkit-user-select: text;
    user-select: text;
    /*with \`pre-line\` chrome inserts &nbsp; instead of space*/
    white-space: pre!important;
}
.ace_text-input.ace_composition {
    background: transparent;
    color: inherit;
    z-index: 1000;
    opacity: 1;
}
.ace_composition_placeholder { color: transparent }
.ace_composition_marker { 
    border-bottom: 1px solid;
    position: absolute;
    border-radius: 0;
    margin-top: 1px;
}

[ace_nocontext=true] {
    transform: none!important;
    filter: none!important;
    clip-path: none!important;
    mask : none!important;
    contain: none!important;
    perspective: none!important;
    mix-blend-mode: initial!important;
    z-index: auto;
}

.ace_layer {
    z-index: 1;
    position: absolute;
    overflow: hidden;
    /* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/
    word-wrap: normal;
    white-space: pre;
    height: 100%;
    width: 100%;
    box-sizing: border-box;
    /* setting pointer-events: auto; on node under the mouse, which changes
        during scroll, will break mouse wheel scrolling in Safari */
    pointer-events: none;
}

.ace_gutter-layer {
    position: relative;
    width: auto;
    text-align: right;
    pointer-events: auto;
    height: 1000000px;
    contain: style size layout;
}

.ace_text-layer {
    font: inherit !important;
    position: absolute;
    height: 1000000px;
    width: 1000000px;
    contain: style size layout;
}

.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {
    contain: style size layout;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
}

.ace_hidpi .ace_text-layer,
.ace_hidpi .ace_gutter-layer,
.ace_hidpi .ace_content,
.ace_hidpi .ace_gutter {
    contain: strict;
}
.ace_hidpi .ace_text-layer > .ace_line, 
.ace_hidpi .ace_text-layer > .ace_line_group {
    contain: strict;
}

.ace_cjk {
    display: inline-block;
    text-align: center;
}

.ace_cursor-layer {
    z-index: 4;
}

.ace_cursor {
    z-index: 4;
    position: absolute;
    box-sizing: border-box;
    border-left: 2px solid;
    /* workaround for smooth cursor repaintng whole screen in chrome */
    transform: translatez(0);
}

.ace_multiselect .ace_cursor {
    border-left-width: 1px;
}

.ace_slim-cursors .ace_cursor {
    border-left-width: 1px;
}

.ace_overwrite-cursors .ace_cursor {
    border-left-width: 0;
    border-bottom: 1px solid;
}

.ace_hidden-cursors .ace_cursor {
    opacity: 0.2;
}

.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {
    opacity: 0;
}

.ace_smooth-blinking .ace_cursor {
    transition: opacity 0.18s;
}

.ace_animate-blinking .ace_cursor {
    animation-duration: 1000ms;
    animation-timing-function: step-end;
    animation-name: blink-ace-animate;
    animation-iteration-count: infinite;
}

.ace_animate-blinking.ace_smooth-blinking .ace_cursor {
    animation-duration: 1000ms;
    animation-timing-function: ease-in-out;
    animation-name: blink-ace-animate-smooth;
}
    
@keyframes blink-ace-animate {
    from, to { opacity: 1; }
    60% { opacity: 0; }
}

@keyframes blink-ace-animate-smooth {
    from, to { opacity: 1; }
    45% { opacity: 1; }
    60% { opacity: 0; }
    85% { opacity: 0; }
}

.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {
    position: absolute;
    z-index: 3;
}

.ace_marker-layer .ace_selection {
    position: absolute;
    z-index: 5;
}

.ace_marker-layer .ace_bracket {
    position: absolute;
    z-index: 6;
}

.ace_marker-layer .ace_error_bracket {
    position: absolute;
    border-bottom: 1px solid #DE5555;
    border-radius: 0;
}

.ace_marker-layer .ace_active-line {
    position: absolute;
    z-index: 2;
}

.ace_marker-layer .ace_selected-word {
    position: absolute;
    z-index: 4;
    box-sizing: border-box;
}

.ace_line .ace_fold {
    box-sizing: border-box;

    display: inline-block;
    height: 11px;
    margin-top: -2px;
    vertical-align: middle;

    background-image:
        url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
        url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");
    background-repeat: no-repeat, repeat-x;
    background-position: center center, top left;
    color: transparent;

    border: 1px solid black;
    border-radius: 2px;

    cursor: pointer;
    pointer-events: auto;
}

.ace_dark .ace_fold {
}

.ace_fold:hover{
    background-image:
        url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
        url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");
}

.ace_tooltip {
    background-color: #f5f5f5;
    border: 1px solid gray;
    border-radius: 1px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    color: black;
    max-width: 100%;
    padding: 3px 4px;
    position: fixed;
    z-index: 999999;
    box-sizing: border-box;
    cursor: default;
    white-space: pre;
    word-wrap: break-word;
    line-height: normal;
    font-style: normal;
    font-weight: normal;
    letter-spacing: normal;
    pointer-events: none;
}

.ace_tooltip.ace_dark {
    background-color: #636363;
    color: #fff;
}

.ace_tooltip:focus {
    outline: 1px solid #5E9ED6;
}

.ace_icon {
    display: inline-block;
    width: 18px;
    vertical-align: top;
}

.ace_icon_svg {
    display: inline-block;
    width: 12px;
    vertical-align: top;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: 12px;
    -webkit-mask-position: center;
}

.ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {
    padding-right: 13px;
}

.ace_fold-widget {
    box-sizing: border-box;

    margin: 0 -12px 0 1px;
    display: none;
    width: 11px;
    vertical-align: top;

    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");
    background-repeat: no-repeat;
    background-position: center;

    border-radius: 3px;
    
    border: 1px solid transparent;
    cursor: pointer;
}

.ace_folding-enabled .ace_fold-widget {
    display: inline-block;   
}

.ace_fold-widget.ace_end {
    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");
}

.ace_fold-widget.ace_closed {
    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");
}

.ace_fold-widget:hover {
    border: 1px solid rgba(0, 0, 0, 0.3);
    background-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
}

.ace_fold-widget:active {
    border: 1px solid rgba(0, 0, 0, 0.4);
    background-color: rgba(0, 0, 0, 0.05);
    box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
}
/**
 * Dark version for fold widgets
 */
.ace_dark .ace_fold-widget {
    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");
}
.ace_dark .ace_fold-widget.ace_end {
    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");
}
.ace_dark .ace_fold-widget.ace_closed {
    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");
}
.ace_dark .ace_fold-widget:hover {
    box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
    background-color: rgba(255, 255, 255, 0.1);
}
.ace_dark .ace_fold-widget:active {
    box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
}

.ace_inline_button {
    border: 1px solid lightgray;
    display: inline-block;
    margin: -1px 8px;
    padding: 0 5px;
    pointer-events: auto;
    cursor: pointer;
}
.ace_inline_button:hover {
    border-color: gray;
    background: rgba(200,200,200,0.2);
    display: inline-block;
    pointer-events: auto;
}

.ace_fold-widget.ace_invalid {
    background-color: #FFB4B4;
    border-color: #DE5555;
}

.ace_fade-fold-widgets .ace_fold-widget {
    transition: opacity 0.4s ease 0.05s;
    opacity: 0;
}

.ace_fade-fold-widgets:hover .ace_fold-widget {
    transition: opacity 0.05s ease 0.05s;
    opacity:1;
}

.ace_underline {
    text-decoration: underline;
}

.ace_bold {
    font-weight: bold;
}

.ace_nobold .ace_bold {
    font-weight: normal;
}

.ace_italic {
    font-style: italic;
}


.ace_error-marker {
    background-color: rgba(255, 0, 0,0.2);
    position: absolute;
    z-index: 9;
}

.ace_highlight-marker {
    background-color: rgba(255, 255, 0,0.2);
    position: absolute;
    z-index: 8;
}

.ace_mobile-menu {
    position: absolute;
    line-height: 1.5;
    border-radius: 4px;
    -ms-user-select: none;
    -moz-user-select: none;
    -webkit-user-select: none;
    user-select: none;
    background: white;
    box-shadow: 1px 3px 2px grey;
    border: 1px solid #dcdcdc;
    color: black;
}
.ace_dark > .ace_mobile-menu {
    background: #333;
    color: #ccc;
    box-shadow: 1px 3px 2px grey;
    border: 1px solid #444;

}
.ace_mobile-button {
    padding: 2px;
    cursor: pointer;
    overflow: hidden;
}
.ace_mobile-button:hover {
    background-color: #eee;
    opacity:1;
}
.ace_mobile-button:active {
    background-color: #ddd;
}

.ace_placeholder {
    font-family: arial;
    transform: scale(0.9);
    transform-origin: left;
    white-space: pre;
    opacity: 0.7;
    margin: 0 10px;
}

.ace_ghost_text {
    opacity: 0.5;
    font-style: italic;
    white-space: pre;
}`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(i,n,r){var s=i("../lib/dom"),c=i("../lib/oop"),u=i("../lib/event_emitter").EventEmitter,o=function(){function h(a,l){this.canvas=s.createElement("canvas"),this.renderer=l,this.pixelRatio=1,this.maxHeight=l.layerConfig.maxHeight,this.lineHeight=l.layerConfig.lineHeight,this.canvasHeight=a.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=a.width,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.canvas.style.top=0+"px",this.canvas.style.right=0+"px",this.canvas.style.zIndex=7+"px",this.canvas.style.position="absolute",this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},a.element.appendChild(this.canvas)}return h.prototype.$updateDecorators=function(a){var l=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;if(a){this.maxHeight=a.maxHeight,this.lineHeight=a.lineHeight,this.canvasHeight=a.height;var f=(a.lastRow+1)*this.lineHeight;f<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight}var d=this.canvas.getContext("2d");function p(x,L){return x.priority<L.priority?-1:x.priority>L.priority?1:0}var g=this.renderer.session.$annotations;if(d.clearRect(0,0,this.canvas.width,this.canvas.height),g){var m={info:1,warning:2,error:3};g.forEach(function(x){x.priority=m[x.type]||null}),g=g.sort(p);for(var v=this.renderer.session.$foldData,y=0;y<g.length;y++){var S=g[y].row,b=this.compensateFoldRows(S,v),_=Math.round((S-b)*this.lineHeight*this.heightRatio),w=Math.round((S-b)*this.lineHeight*this.heightRatio),E=Math.round(((S-b)*this.lineHeight+this.lineHeight)*this.heightRatio),T=E-w;if(T<this.minDecorationHeight){var $=(w+E)/2|0;$<this.halfMinDecorationHeight?$=this.halfMinDecorationHeight:$+this.halfMinDecorationHeight>this.canvasHeight&&($=this.canvasHeight-this.halfMinDecorationHeight),w=Math.round($-this.halfMinDecorationHeight),E=Math.round($+this.halfMinDecorationHeight)}d.fillStyle=l[g[y].type]||null,d.fillRect(0,_,this.canvasWidth,E-w)}}var C=this.renderer.session.selection.getCursor();if(C){var b=this.compensateFoldRows(C.row,v),_=Math.round((C.row-b)*this.lineHeight*this.heightRatio);d.fillStyle="rgba(0, 0, 0, 0.5)",d.fillRect(0,_,this.canvasWidth,2)}},h.prototype.compensateFoldRows=function(a,l){var f=0;if(l&&l.length>0)for(var d=0;d<l.length;d++)a>l[d].start.row&&a<l[d].end.row?f+=a-l[d].start.row:a>=l[d].end.row&&(f+=l[d].end.row-l[d].start.row);return f},h}();c.implement(o.prototype,u),n.Decorator=o}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor.css","ace/layer/decorators","ace/lib/useragent"],function(i,n,r){var s=i("./lib/oop"),c=i("./lib/dom"),u=i("./lib/lang"),o=i("./config"),h=i("./layer/gutter").Gutter,a=i("./layer/marker").Marker,l=i("./layer/text").Text,f=i("./layer/cursor").Cursor,d=i("./scrollbar").HScrollBar,p=i("./scrollbar").VScrollBar,g=i("./scrollbar_custom").HScrollBar,m=i("./scrollbar_custom").VScrollBar,v=i("./renderloop").RenderLoop,y=i("./layer/font_metrics").FontMetrics,S=i("./lib/event_emitter").EventEmitter,b=i("./css/editor.css"),_=i("./layer/decorators").Decorator,w=i("./lib/useragent");c.importCssString(b,"ace_editor.css",!1);var E=function(){function T($,C){var x=this;this.container=$||c.createElement("div"),c.addCssClass(this.container,"ace_editor"),c.HI_DPI&&c.addCssClass(this.container,"ace_hidpi"),this.setTheme(C),o.get("useStrictCSP")==null&&o.set("useStrictCSP",!1),this.$gutter=c.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden",!0),this.scroller=c.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=c.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new h(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new a(this.content);var L=this.$textLayer=new l(this.content);this.canvas=L.element,this.$markerFront=new a(this.content),this.$cursorLayer=new f(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new p(this.container,this),this.scrollBarH=new d(this.container,this),this.scrollBarV.on("scroll",function(M){x.$scrollAnimation||x.session.setScrollTop(M.data-x.scrollMargin.top)}),this.scrollBarH.on("scroll",function(M){x.$scrollAnimation||x.session.setScrollLeft(M.data-x.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new y(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(M){x.updateCharacterSize(),x.onResize(!0,x.gutterWidth,x.$size.width,x.$size.height),x._signal("changeCharacterSize",M)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!w.isIOS,this.$loop=new v(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),o.resetOptions(this),o._signal("renderer",this)}return T.prototype.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),c.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},T.prototype.setSession=function($){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=$,$&&this.scrollMargin.top&&$.getScrollTop()<=0&&$.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession($),this.$markerBack.setSession($),this.$markerFront.setSession($),this.$gutterLayer.setSession($),this.$textLayer.setSession($),$&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},T.prototype.updateLines=function($,C,x){if(C===void 0&&(C=1/0),this.$changedLines?(this.$changedLines.firstRow>$&&(this.$changedLines.firstRow=$),this.$changedLines.lastRow<C&&(this.$changedLines.lastRow=C)):this.$changedLines={firstRow:$,lastRow:C},this.$changedLines.lastRow<this.layerConfig.firstRow)if(x)this.$changedLines.lastRow=this.layerConfig.lastRow;else return;this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},T.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},T.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},T.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},T.prototype.updateFull=function($){$?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},T.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},T.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},T.prototype.onResize=function($,C,x,L){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=$?1:0;var M=this.container;L||(L=M.clientHeight||M.scrollHeight),x||(x=M.clientWidth||M.scrollWidth);var A=this.$updateCachedSize($,C,x,L);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!x&&!L)return this.resizing=0;$&&(this.$gutterLayer.$padding=null),$?this.$renderChanges(A|this.$changes,!0):this.$loop.schedule(A|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},T.prototype.$updateCachedSize=function($,C,x,L){L-=this.$extraHeight||0;var M=0,A=this.$size,k={width:A.width,height:A.height,scrollerHeight:A.scrollerHeight,scrollerWidth:A.scrollerWidth};if(L&&($||A.height!=L)&&(A.height=L,M|=this.CHANGE_SIZE,A.scrollerHeight=A.height,this.$horizScroll&&(A.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(A.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",M=M|this.CHANGE_SCROLL),x&&($||A.width!=x)){M|=this.CHANGE_SIZE,A.width=x,C==null&&(C=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=C,c.setStyle(this.scrollBarH.element.style,"left",C+"px"),c.setStyle(this.scroller.style,"left",C+this.margin.left+"px"),A.scrollerWidth=Math.max(0,x-C-this.scrollBarV.getWidth()-this.margin.h),c.setStyle(this.$gutter.style,"left",this.margin.left+"px");var P=this.scrollBarV.getWidth()+"px";c.setStyle(this.scrollBarH.element.style,"right",P),c.setStyle(this.scroller.style,"right",P),c.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(A.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||$)&&(M|=this.CHANGE_FULL)}return A.$dirty=!x||!L,M&&this._signal("resize",k),M},T.prototype.onGutterResize=function($){var C=this.$showGutter?$:0;C!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,C,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},T.prototype.adjustWrapLimit=function(){var $=this.$size.scrollerWidth-this.$padding*2,C=Math.floor($/this.characterWidth);return this.session.adjustWrapLimit(C,this.$showPrintMargin&&this.$printMarginColumn)},T.prototype.setAnimatedScroll=function($){this.setOption("animatedScroll",$)},T.prototype.getAnimatedScroll=function(){return this.$animatedScroll},T.prototype.setShowInvisibles=function($){this.setOption("showInvisibles",$),this.session.$bidiHandler.setShowInvisibles($)},T.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},T.prototype.getDisplayIndentGuide=function(){return this.getOption("displayIndentGuides")},T.prototype.setDisplayIndentGuides=function($){this.setOption("displayIndentGuides",$)},T.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},T.prototype.setHighlightIndentGuides=function($){this.setOption("highlightIndentGuides",$)},T.prototype.setShowPrintMargin=function($){this.setOption("showPrintMargin",$)},T.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},T.prototype.setPrintMarginColumn=function($){this.setOption("printMarginColumn",$)},T.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},T.prototype.getShowGutter=function(){return this.getOption("showGutter")},T.prototype.setShowGutter=function($){return this.setOption("showGutter",$)},T.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},T.prototype.setFadeFoldWidgets=function($){this.setOption("fadeFoldWidgets",$)},T.prototype.setHighlightGutterLine=function($){this.setOption("highlightGutterLine",$)},T.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},T.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var $=c.createElement("div");$.className="ace_layer ace_print-margin-layer",this.$printMarginEl=c.createElement("div"),this.$printMarginEl.className="ace_print-margin",$.appendChild(this.$printMarginEl),this.content.insertBefore($,this.content.firstChild)}var C=this.$printMarginEl.style;C.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",C.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},T.prototype.getContainerElement=function(){return this.container},T.prototype.getMouseEventTarget=function(){return this.scroller},T.prototype.getTextAreaContainer=function(){return this.container},T.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var $=this.textarea.style,C=this.$composition;if(!this.$keepTextAreaAtCursor&&!C){c.translate(this.textarea,-100,0);return}var x=this.$cursorLayer.$pixelPos;if(!!x){C&&C.markerRange&&(x=this.$cursorLayer.getPixelPosition(C.markerRange.start,!0));var L=this.layerConfig,M=x.top,A=x.left;M-=L.offset;var k=C&&C.useTextareaForIME||w.isMobile?this.lineHeight:1;if(M<0||M>L.height-k){c.translate(this.textarea,0,0);return}var P=1,O=this.$size.height-k;if(!C)M+=this.lineHeight;else if(C.useTextareaForIME){var N=this.textarea.value;P=this.characterWidth*this.session.$getStringScreenWidth(N)[0]}else M+=this.lineHeight+2;A-=this.scrollLeft,A>this.$size.scrollerWidth-P&&(A=this.$size.scrollerWidth-P),A+=this.gutterWidth+this.margin.left,c.setStyle($,"height",k+"px"),c.setStyle($,"width",P+"px"),c.translate(this.textarea,Math.min(A,this.$size.scrollerWidth-P),Math.min(M,O))}}},T.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},T.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},T.prototype.getLastFullyVisibleRow=function(){var $=this.layerConfig,C=$.lastRow,x=this.session.documentToScreenRow(C,0)*$.lineHeight;return x-this.session.getScrollTop()>$.height-$.lineHeight?C-1:C},T.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},T.prototype.setPadding=function($){this.$padding=$,this.$textLayer.setPadding($),this.$cursorLayer.setPadding($),this.$markerFront.setPadding($),this.$markerBack.setPadding($),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},T.prototype.setScrollMargin=function($,C,x,L){var M=this.scrollMargin;M.top=$|0,M.bottom=C|0,M.right=L|0,M.left=x|0,M.v=M.top+M.bottom,M.h=M.left+M.right,M.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-M.top),this.updateFull()},T.prototype.setMargin=function($,C,x,L){var M=this.margin;M.top=$|0,M.bottom=C|0,M.right=L|0,M.left=x|0,M.v=M.top+M.bottom,M.h=M.left+M.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},T.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},T.prototype.setHScrollBarAlwaysVisible=function($){this.setOption("hScrollBarAlwaysVisible",$)},T.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},T.prototype.setVScrollBarAlwaysVisible=function($){this.setOption("vScrollBarAlwaysVisible",$)},T.prototype.$updateScrollBarV=function(){var $=this.layerConfig.maxHeight,C=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&($-=(C-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>$-C&&($=this.scrollTop+C,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight($+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},T.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},T.prototype.freeze=function(){this.$frozen=!0},T.prototype.unfreeze=function(){this.$frozen=!1},T.prototype.$renderChanges=function($,C){if(this.$changes&&($|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!$&&!C){this.$changes|=$;return}if(this.$size.$dirty)return this.$changes|=$,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",$),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var x=this.layerConfig;if($&this.CHANGE_FULL||$&this.CHANGE_SIZE||$&this.CHANGE_TEXT||$&this.CHANGE_LINES||$&this.CHANGE_SCROLL||$&this.CHANGE_H_SCROLL){if($|=this.$computeLayerConfig()|this.$loop.clear(),x.firstRow!=this.layerConfig.firstRow&&x.firstRowScreen==this.layerConfig.firstRowScreen){var L=this.scrollTop+(x.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;L>0&&(this.scrollTop=L,$=$|this.CHANGE_SCROLL,$|=this.$computeLayerConfig()|this.$loop.clear())}x=this.layerConfig,this.$updateScrollBarV(),$&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),c.translate(this.content,-this.scrollLeft,-x.offset);var M=x.width+2*this.$padding+"px",A=x.minHeight+"px";c.setStyle(this.content.style,"width",M),c.setStyle(this.content.style,"height",A)}if($&this.CHANGE_H_SCROLL&&(c.translate(this.content,-this.scrollLeft,-x.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),$&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(x),this.$showGutter&&this.$gutterLayer.update(x),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(x),this.$markerBack.update(x),this.$markerFront.update(x),this.$cursorLayer.update(x),this.$moveTextAreaToCursor(),this._signal("afterRender",$);return}if($&this.CHANGE_SCROLL){this.$changedLines=null,$&this.CHANGE_TEXT||$&this.CHANGE_LINES?this.$textLayer.update(x):this.$textLayer.scrollLines(x),this.$showGutter&&($&this.CHANGE_GUTTER||$&this.CHANGE_LINES?this.$gutterLayer.update(x):this.$gutterLayer.scrollLines(x)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(x),this.$markerBack.update(x),this.$markerFront.update(x),this.$cursorLayer.update(x),this.$moveTextAreaToCursor(),this._signal("afterRender",$);return}$&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(x),this.$showGutter&&this.$gutterLayer.update(x),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(x)):$&this.CHANGE_LINES?((this.$updateLines()||$&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(x),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(x)):$&this.CHANGE_TEXT||$&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(x),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(x)):$&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(x),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(x)),$&this.CHANGE_CURSOR&&(this.$cursorLayer.update(x),this.$moveTextAreaToCursor()),$&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(x),$&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(x),this._signal("afterRender",$)},T.prototype.$autosize=function(){var $=this.session.getScreenLength()*this.lineHeight,C=this.$maxLines*this.lineHeight,x=Math.min(C,Math.max((this.$minLines||1)*this.lineHeight,$))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(x+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&x>this.$maxPixelHeight&&(x=this.$maxPixelHeight);var L=x<=2*this.lineHeight,M=!L&&$>C;if(x!=this.desiredHeight||this.$size.height!=this.desiredHeight||M!=this.$vScroll){M!=this.$vScroll&&(this.$vScroll=M,this.scrollBarV.setVisible(M));var A=this.container.clientWidth;this.container.style.height=x+"px",this.$updateCachedSize(!0,this.$gutterWidth,A,x),this.desiredHeight=x,this._signal("autosize")}},T.prototype.$computeLayerConfig=function(){var $=this.session,C=this.$size,x=C.height<=2*this.lineHeight,L=this.session.getScreenLength(),M=L*this.lineHeight,A=this.$getLongestLine(),k=!x&&(this.$hScrollBarAlwaysVisible||C.scrollerWidth-A-2*this.$padding<0),P=this.$horizScroll!==k;P&&(this.$horizScroll=k,this.scrollBarH.setVisible(k));var O=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var N=C.scrollerHeight+this.lineHeight,D=!this.$maxLines&&this.$scrollPastEnd?(C.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;M+=D;var B=this.scrollMargin;this.session.setScrollTop(Math.max(-B.top,Math.min(this.scrollTop,M-C.scrollerHeight+B.bottom))),this.session.setScrollLeft(Math.max(-B.left,Math.min(this.scrollLeft,A+2*this.$padding-C.scrollerWidth+B.right)));var U=!x&&(this.$vScrollBarAlwaysVisible||C.scrollerHeight-M+D<0||this.scrollTop>B.top),q=O!==U;q&&(this.$vScroll=U,this.scrollBarV.setVisible(U));var H=this.scrollTop%this.lineHeight,j=Math.ceil(N/this.lineHeight)-1,Y=Math.max(0,Math.round((this.scrollTop-H)/this.lineHeight)),ie=Y+j,W,K,Q=this.lineHeight;Y=$.screenToDocumentRow(Y,0);var ne=$.getFoldLine(Y);ne&&(Y=ne.start.row),W=$.documentToScreenRow(Y,0),K=$.getRowLength(Y)*Q,ie=Math.min($.screenToDocumentRow(ie,0),$.getLength()-1),N=C.scrollerHeight+$.getRowLength(ie)*Q+K,H=this.scrollTop-W*Q;var de=0;return(this.layerConfig.width!=A||P)&&(de=this.CHANGE_H_SCROLL),(P||q)&&(de|=this.$updateCachedSize(!0,this.gutterWidth,C.width,C.height),this._signal("scrollbarVisibilityChanged"),q&&(A=this.$getLongestLine())),this.layerConfig={width:A,padding:this.$padding,firstRow:Y,firstRowScreen:W,lastRow:ie,lineHeight:Q,characterWidth:this.characterWidth,minHeight:N,maxHeight:M,offset:H,gutterOffset:Q?Math.max(0,Math.ceil((H+C.height-C.scrollerHeight)/Q)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(A-this.$padding),de},T.prototype.$updateLines=function(){if(!!this.$changedLines){var $=this.$changedLines.firstRow,C=this.$changedLines.lastRow;this.$changedLines=null;var x=this.layerConfig;if(!($>x.lastRow+1)&&!(C<x.firstRow)){if(C===1/0){this.$showGutter&&this.$gutterLayer.update(x),this.$textLayer.update(x);return}return this.$textLayer.updateLines(x,$,C),!0}}},T.prototype.$getLongestLine=function(){var $=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&($+=1),this.$textLayer&&$>this.$textLayer.MAX_LINE_LENGTH&&($=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round($*this.characterWidth))},T.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},T.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},T.prototype.addGutterDecoration=function($,C){this.$gutterLayer.addGutterDecoration($,C)},T.prototype.removeGutterDecoration=function($,C){this.$gutterLayer.removeGutterDecoration($,C)},T.prototype.updateBreakpoints=function($){this.$loop.schedule(this.CHANGE_GUTTER)},T.prototype.setAnnotations=function($){this.$gutterLayer.setAnnotations($),this.$loop.schedule(this.CHANGE_GUTTER)},T.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},T.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},T.prototype.showCursor=function(){this.$cursorLayer.showCursor()},T.prototype.scrollSelectionIntoView=function($,C,x){this.scrollCursorIntoView($,x),this.scrollCursorIntoView(C,x)},T.prototype.scrollCursorIntoView=function($,C,x){if(this.$size.scrollerHeight!==0){var L=this.$cursorLayer.getPixelPosition($),M=L.left,A=L.top,k=x&&x.top||0,P=x&&x.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var O=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;O+k>A?(C&&O+k>A+this.lineHeight&&(A-=C*this.$size.scrollerHeight),A===0&&(A=-this.scrollMargin.top),this.session.setScrollTop(A)):O+this.$size.scrollerHeight-P<A+this.lineHeight&&(C&&O+this.$size.scrollerHeight-P<A-this.lineHeight&&(A+=C*this.$size.scrollerHeight),this.session.setScrollTop(A+this.lineHeight+P-this.$size.scrollerHeight));var N=this.scrollLeft,D=2*this.layerConfig.characterWidth;M-D<N?(M-=D,M<this.$padding+D&&(M=-this.scrollMargin.left),this.session.setScrollLeft(M)):(M+=D,N+this.$size.scrollerWidth<M+this.characterWidth?this.session.setScrollLeft(Math.round(M+this.characterWidth-this.$size.scrollerWidth)):N<=this.$padding&&M-N<this.characterWidth&&this.session.setScrollLeft(0))}},T.prototype.getScrollTop=function(){return this.session.getScrollTop()},T.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},T.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},T.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},T.prototype.scrollToRow=function($){this.session.setScrollTop($*this.lineHeight)},T.prototype.alignCursor=function($,C){typeof $=="number"&&($={row:$,column:0});var x=this.$cursorLayer.getPixelPosition($),L=this.$size.scrollerHeight-this.lineHeight,M=x.top-L*(C||0);return this.session.setScrollTop(M),M},T.prototype.$calcSteps=function($,C){var x=0,L=this.STEPS,M=[],A=function(k,P,O){return O*(Math.pow(k-1,3)+1)+P};for(x=0;x<L;++x)M.push(A(x/this.STEPS,$,C-$));return M},T.prototype.scrollToLine=function($,C,x,L){var M=this.$cursorLayer.getPixelPosition({row:$,column:0}),A=M.top;C&&(A-=this.$size.scrollerHeight/2);var k=this.scrollTop;this.session.setScrollTop(A),x!==!1&&this.animateScrolling(k,L)},T.prototype.animateScrolling=function($,C){var x=this.scrollTop;if(!this.$animatedScroll)return;var L=this;if($==x)return;if(this.$scrollAnimation){var M=this.$scrollAnimation.steps;if(M.length&&($=M[0],$==x))return}var A=L.$calcSteps($,x);this.$scrollAnimation={from:$,to:x,steps:A},clearInterval(this.$timer),L.session.setScrollTop(A.shift()),L.session.$scrollTop=x;function k(){L.$timer=clearInterval(L.$timer),L.$scrollAnimation=null,L.$stopAnimation=!1,C&&C()}this.$timer=setInterval(function(){if(L.$stopAnimation){k();return}if(!L.session)return clearInterval(L.$timer);A.length?(L.session.setScrollTop(A.shift()),L.session.$scrollTop=x):x!=null?(L.session.$scrollTop=-1,L.session.setScrollTop(x),x=null):k()},10)},T.prototype.scrollToY=function($){this.scrollTop!==$&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=$)},T.prototype.scrollToX=function($){this.scrollLeft!==$&&(this.scrollLeft=$),this.$loop.schedule(this.CHANGE_H_SCROLL)},T.prototype.scrollTo=function($,C){this.session.setScrollTop(C),this.session.setScrollLeft($)},T.prototype.scrollBy=function($,C){C&&this.session.setScrollTop(this.session.getScrollTop()+C),$&&this.session.setScrollLeft(this.session.getScrollLeft()+$)},T.prototype.isScrollableBy=function($,C){if(C<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||C>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||$<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||$>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},T.prototype.pixelToScreenCoordinates=function($,C){var x;if(this.$hasCssTransforms){x={top:0,left:0};var L=this.$fontMetrics.transformCoordinates([$,C]);$=L[1]-this.gutterWidth-this.margin.left,C=L[0]}else x=this.scroller.getBoundingClientRect();var M=$+this.scrollLeft-x.left-this.$padding,A=M/this.characterWidth,k=Math.floor((C+this.scrollTop-x.top)/this.lineHeight),P=this.$blockCursor?Math.floor(A):Math.round(A);return{row:k,column:P,side:A-P>0?1:-1,offsetX:M}},T.prototype.screenToTextCoordinates=function($,C){var x;if(this.$hasCssTransforms){x={top:0,left:0};var L=this.$fontMetrics.transformCoordinates([$,C]);$=L[1]-this.gutterWidth-this.margin.left,C=L[0]}else x=this.scroller.getBoundingClientRect();var M=$+this.scrollLeft-x.left-this.$padding,A=M/this.characterWidth,k=this.$blockCursor?Math.floor(A):Math.round(A),P=Math.floor((C+this.scrollTop-x.top)/this.lineHeight);return this.session.screenToDocumentPosition(P,Math.max(k,0),M)},T.prototype.textToScreenCoordinates=function($,C){var x=this.scroller.getBoundingClientRect(),L=this.session.documentToScreenPosition($,C),M=this.$padding+(this.session.$bidiHandler.isBidiRow(L.row,$)?this.session.$bidiHandler.getPosLeft(L.column):Math.round(L.column*this.characterWidth)),A=L.row*this.lineHeight;return{pageX:x.left+M-this.scrollLeft,pageY:x.top+A-this.scrollTop}},T.prototype.visualizeFocus=function(){c.addCssClass(this.container,"ace_focus")},T.prototype.visualizeBlur=function(){c.removeCssClass(this.container,"ace_focus")},T.prototype.showComposition=function($){this.$composition=$,$.cssText||($.cssText=this.textarea.style.cssText),$.useTextareaForIME==null&&($.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(c.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):$.markerId=this.session.addMarker($.markerRange,"ace_composition_marker","text")},T.prototype.setCompositionText=function($){var C=this.session.selection.cursor;this.addToken($,"composition_placeholder",C.row,C.column),this.$moveTextAreaToCursor()},T.prototype.hideComposition=function(){if(!!this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),c.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var $=this.session.selection.cursor;this.removeExtraToken($.row,$.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},T.prototype.setGhostText=function($,C){var x=this.session.selection.cursor,L=C||{row:x.row,column:x.column};this.removeGhostText();var M=$.split(`
`);this.addToken(M[0],"ghost_text",L.row,L.column),this.$ghostText={text:$,position:{row:L.row,column:L.column}},M.length>1&&(this.$ghostTextWidget={text:M.slice(1).join(`
`),row:L.row,column:L.column,className:"ace_ghost_text"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget))},T.prototype.removeGhostText=function(){if(!!this.$ghostText){var $=this.$ghostText.position;this.removeExtraToken($.row,$.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},T.prototype.addToken=function($,C,x,L){var M=this.session;M.bgTokenizer.lines[x]=null;var A={type:C,value:$},k=M.getTokens(x);if(L==null||!k.length)k.push(A);else for(var P=0,O=0;O<k.length;O++){var N=k[O];if(P+=N.value.length,L<=P){var D=N.value.length-(P-L),B=N.value.slice(0,D),U=N.value.slice(D);k.splice(O,1,{type:N.type,value:B},A,{type:N.type,value:U});break}}this.updateLines(x,x)},T.prototype.removeExtraToken=function($,C){this.session.bgTokenizer.lines[$]=null,this.updateLines($,$)},T.prototype.setTheme=function($,C){var x=this;if(this.$themeId=$,x._dispatchEvent("themeChange",{theme:$}),!$||typeof $=="string"){var L=$||this.$options.theme.initialValue;o.loadModule(["theme",L],M)}else M($);function M(A){if(x.$themeId!=$)return C&&C();if(!A||!A.cssClass)throw new Error("couldn't load module "+$+" or it didn't call define");A.$id&&(x.$themeId=A.$id),c.importCssString(A.cssText,A.cssClass,x.container),x.theme&&c.removeCssClass(x.container,x.theme.cssClass);var k="padding"in A?A.padding:"padding"in(x.theme||{})?4:x.$padding;x.$padding&&k!=x.$padding&&x.setPadding(k),x.$theme=A.cssClass,x.theme=A,c.addCssClass(x.container,A.cssClass),c.setCssClass(x.container,"ace_dark",A.isDark),x.$size&&(x.$size.width=0,x.$updateSizeAsync()),x._dispatchEvent("themeLoaded",{theme:A}),C&&C()}},T.prototype.getTheme=function(){return this.$themeId},T.prototype.setStyle=function($,C){c.setCssClass(this.container,$,C!==!1)},T.prototype.unsetStyle=function($){c.removeCssClass(this.container,$)},T.prototype.setCursorStyle=function($){c.setStyle(this.scroller.style,"cursor",$)},T.prototype.setMouseCursor=function($){c.setStyle(this.scroller.style,"cursor",$)},T.prototype.attachToShadowRoot=function(){c.importCssString(b,"ace_editor.css",this.container)},T.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},T.prototype.$updateCustomScrollbar=function($){var C=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),this.$scrollDecorator&&delete this.$scrollDecorator,$===!0?(this.scrollBarV=new m(this.container,this),this.scrollBarH=new g(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(x){C.$scrollAnimation||C.session.setScrollTop(x.data-C.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(x){C.$scrollAnimation||C.session.setScrollLeft(x.data-C.scrollMargin.left)}),this.$scrollDecorator=new _(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators()):(this.scrollBarV=new p(this.container,this),this.scrollBarH=new d(this.container,this),this.scrollBarV.addEventListener("scroll",function(x){C.$scrollAnimation||C.session.setScrollTop(x.data-C.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(x){C.$scrollAnimation||C.session.setScrollLeft(x.data-C.scrollMargin.left)}))},T.prototype.$addResizeObserver=function(){if(!(!window.ResizeObserver||this.$resizeObserver)){var $=this;this.$resizeTimer=u.delayedCall(function(){$.destroyed||$.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(C){var x=C[0].contentRect.width,L=C[0].contentRect.height;Math.abs($.$size.width-x)>1||Math.abs($.$size.height-L)>1?$.$resizeTimer.delay():$.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},T}();E.prototype.CHANGE_CURSOR=1,E.prototype.CHANGE_MARKER=2,E.prototype.CHANGE_GUTTER=4,E.prototype.CHANGE_SCROLL=8,E.prototype.CHANGE_LINES=16,E.prototype.CHANGE_TEXT=32,E.prototype.CHANGE_SIZE=64,E.prototype.CHANGE_MARKER_BACK=128,E.prototype.CHANGE_MARKER_FRONT=256,E.prototype.CHANGE_FULL=512,E.prototype.CHANGE_H_SCROLL=1024,E.prototype.$changes=0,E.prototype.$padding=null,E.prototype.$frozen=!1,E.prototype.STEPS=8,s.implement(E.prototype,S),o.defineOptions(E.prototype,"renderer",{useResizeObserver:{set:function(T){!T&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):T&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(T){this.$textLayer.setShowInvisibles(T)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(T){typeof T=="number"&&(this.$printMarginColumn=T),this.$showPrintMargin=!!T,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(T){this.$gutter.style.display=T?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(T){this.$gutterLayer.$useSvgGutterIcons=T},initialValue:!1},showFoldedAnnotations:{set:function(T){this.$gutterLayer.$showFoldedAnnotations=T},initialValue:!1},fadeFoldWidgets:{set:function(T){c.setCssClass(this.$gutter,"ace_fade-fold-widgets",T)},initialValue:!1},showFoldWidgets:{set:function(T){this.$gutterLayer.setShowFoldWidgets(T),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(T){this.$textLayer.setDisplayIndentGuides(T)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(T){this.$textLayer.setHighlightIndentGuides(T)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(T){this.$gutterLayer.setHighlightGutterLine(T),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(T){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(T){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(T){typeof T=="number"&&(T=T+"px"),this.container.style.fontSize=T,this.updateFontSize()},initialValue:12},fontFamily:{set:function(T){this.container.style.fontFamily=T,this.updateFontSize()}},maxLines:{set:function(T){this.updateFull()}},minLines:{set:function(T){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(T){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(T){T=+T||0,this.$scrollPastEnd!=T&&(this.$scrollPastEnd=T,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(T){this.$gutterLayer.$fixedWidth=!!T,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(T){this.$updateCustomScrollbar(T)},initialValue:!1},theme:{set:function(T){this.setTheme(T)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!w.isMobile&&!w.isIE}}),n.VirtualRenderer=E}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(i,n,r){var s=i("../lib/oop"),c=i("../lib/net"),u=i("../lib/event_emitter").EventEmitter,o=i("../config");function h(d){var p="importScripts('"+c.qualifyURL(d)+"');";try{return new Blob([p],{type:"application/javascript"})}catch{var g=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,m=new g;return m.append(p),m.getBlob("application/javascript")}}function a(d){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(o.get("loadWorkerFromBlob")){var p=h(d),g=window.URL||window.webkitURL,m=g.createObjectURL(p);return new Worker(m)}return new Worker(d)}var l=function(d){d.postMessage||(d=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=d,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){s.implement(this,u),this.$createWorkerFromOldConfig=function(d,p,g,m,v){if(i.nameToUrl&&!i.toUrl&&(i.toUrl=i.nameToUrl),o.get("packaged")||!i.toUrl)m=m||o.moduleUrl(p,"worker");else{var y=this.$normalizePath;m=m||y(i.toUrl("ace/worker/worker.js",null,"_"));var S={};d.forEach(function(b){S[b]=y(i.toUrl(b,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=a(m),v&&this.send("importScripts",v),this.$worker.postMessage({init:!0,tlns:S,module:p,classname:g}),this.$worker},this.onMessage=function(d){var p=d.data;switch(p.type){case"event":this._signal(p.name,{data:p.data});break;case"call":var g=this.callbacks[p.id];g&&(g(p.data),delete this.callbacks[p.id]);break;case"error":this.reportError(p.data);break;case"log":window.console&&console.log&&console.log.apply(console,p.data);break}},this.reportError=function(d){window.console&&console.error&&console.error(d)},this.$normalizePath=function(d){return c.qualifyURL(d)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(d){d.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(d,p){this.$worker.postMessage({command:d,args:p})},this.call=function(d,p,g){if(g){var m=this.callbackId++;this.callbacks[m]=g,p.push(m)}this.send(d,p)},this.emit=function(d,p){try{p.data&&p.data.err&&(p.data.err={message:p.data.err.message,stack:p.data.err.stack,code:p.data.err.code}),this.$worker&&this.$worker.postMessage({event:d,data:{data:p.data}})}catch(g){console.error(g.stack)}},this.attachToDocument=function(d){this.$doc&&this.terminate(),this.$doc=d,this.call("setValue",[d.getValue()]),d.on("change",this.changeListener,!0)},this.changeListener=function(d){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),d.action=="insert"?this.deltaQueue.push(d.start,d.lines):this.deltaQueue.push(d.start,d.end)},this.$sendDeltaQueue=function(){var d=this.deltaQueue;!d||(this.deltaQueue=null,d.length>50&&d.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:d}))}}).call(l.prototype);var f=function(d,p,g){var m=null,v=!1,y=Object.create(u),S=[],b=new l({messageBuffer:S,terminate:function(){},postMessage:function(w){S.push(w),m&&(v?setTimeout(_):_())}});b.setEmitSync=function(w){v=w};var _=function(){var w=S.shift();w.command?m[w.command].apply(m,w.args):w.event&&y._signal(w.event,w.data)};return y.postMessage=function(w){b.onMessage({data:w})},y.callback=function(w,E){this.postMessage({type:"call",id:E,data:w})},y.emit=function(w,E){this.postMessage({type:"event",name:w,data:E})},o.loadModule(["worker",p],function(w){for(m=new w[g](y);S.length;)_()}),b};n.UIWorkerClient=f,n.WorkerClient=l,n.createWorker=a}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(i,n,r){var s=i("./range").Range,c=i("./lib/event_emitter").EventEmitter,u=i("./lib/oop"),o=function(){function h(a,l,f,d,p,g){var m=this;this.length=l,this.session=a,this.doc=a.getDocument(),this.mainClass=p,this.othersClass=g,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=d,this.$onCursorChange=function(){setTimeout(function(){m.onCursorChange()})},this.$pos=f;var v=a.getUndoManager().$undoStack||a.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=v.length,this.setup(),a.selection.on("changeCursor",this.$onCursorChange)}return h.prototype.setup=function(){var a=this,l=this.doc,f=this.session;this.selectionBefore=f.selection.toJSON(),f.selection.inMultiSelectMode&&f.selection.toSingleRange(),this.pos=l.createAnchor(this.$pos.row,this.$pos.column);var d=this.pos;d.$insertRight=!0,d.detach(),d.markerId=f.addMarker(new s(d.row,d.column,d.row,d.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(p){var g=l.createAnchor(p.row,p.column);g.$insertRight=!0,g.detach(),a.others.push(g)}),f.setUndoSelect(!1)},h.prototype.showOtherMarkers=function(){if(!this.othersActive){var a=this.session,l=this;this.othersActive=!0,this.others.forEach(function(f){f.markerId=a.addMarker(new s(f.row,f.column,f.row,f.column+l.length),l.othersClass,null,!1)})}},h.prototype.hideOtherMarkers=function(){if(!!this.othersActive){this.othersActive=!1;for(var a=0;a<this.others.length;a++)this.session.removeMarker(this.others[a].markerId)}},h.prototype.onUpdate=function(a){if(this.$updating)return this.updateAnchors(a);var l=a;if(l.start.row===l.end.row&&l.start.row===this.pos.row){this.$updating=!0;var f=a.action==="insert"?l.end.column-l.start.column:l.start.column-l.end.column,d=l.start.column>=this.pos.column&&l.start.column<=this.pos.column+this.length+1,p=l.start.column-this.pos.column;if(this.updateAnchors(a),d&&(this.length+=f),d&&!this.session.$fromUndo){if(a.action==="insert")for(var g=this.others.length-1;g>=0;g--){var m=this.others[g],v={row:m.row,column:m.column+p};this.doc.insertMergedLines(v,a.lines)}else if(a.action==="remove")for(var g=this.others.length-1;g>=0;g--){var m=this.others[g],v={row:m.row,column:m.column+p};this.doc.remove(new s(v.row,v.column,v.row,v.column-f))}}this.$updating=!1,this.updateMarkers()}},h.prototype.updateAnchors=function(a){this.pos.onChange(a);for(var l=this.others.length;l--;)this.others[l].onChange(a);this.updateMarkers()},h.prototype.updateMarkers=function(){if(!this.$updating){var a=this,l=this.session,f=function(p,g){l.removeMarker(p.markerId),p.markerId=l.addMarker(new s(p.row,p.column,p.row,p.column+a.length),g,null,!1)};f(this.pos,this.mainClass);for(var d=this.others.length;d--;)f(this.others[d],this.othersClass)}},h.prototype.onCursorChange=function(a){if(!(this.$updating||!this.session)){var l=this.session.selection.getCursor();l.row===this.pos.row&&l.column>=this.pos.column&&l.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",a)):(this.hideOtherMarkers(),this._emit("cursorLeave",a))}},h.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},h.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var a=this.session.getUndoManager(),l=(a.$undoStack||a.$undostack).length-this.$undoStackDepth,f=0;f<l;f++)a.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},h}();u.implement(o.prototype,c),n.PlaceHolder=o}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(i,n,r){var s=i("../lib/event"),c=i("../lib/useragent");function u(h,a){return h.row==a.row&&h.column==a.column}function o(h){var a=h.domEvent,l=a.altKey,f=a.shiftKey,d=a.ctrlKey,p=h.getAccelKey(),g=h.getButton();if(d&&c.isMac&&(g=a.button),h.editor.inMultiSelectMode&&g==2){h.editor.textInput.onContextMenu(h.domEvent);return}if(!d&&!l&&!p){g===0&&h.editor.inMultiSelectMode&&h.editor.exitMultiSelectMode();return}if(g===0){var m=h.editor,v=m.selection,y=m.inMultiSelectMode,S=h.getDocumentPosition(),b=v.getCursor(),_=h.inSelection()||v.isEmpty()&&u(S,b),w=h.x,E=h.y,T=function(U){w=U.clientX,E=U.clientY},$=m.session,C=m.renderer.pixelToScreenCoordinates(w,E),x=C,L;if(m.$mouseHandler.$enableJumpToDef)d&&l||p&&l?L=f?"block":"add":l&&m.$blockSelectEnabled&&(L="block");else if(p&&!l){if(L="add",!y&&f)return}else l&&m.$blockSelectEnabled&&(L="block");if(L&&c.isMac&&a.ctrlKey&&m.$mouseHandler.cancelContextMenu(),L=="add"){if(!y&&_)return;if(!y){var M=v.toOrientedRange();m.addSelectionMarker(M)}var A=v.rangeList.rangeAtPoint(S);m.inVirtualSelectionMode=!0,f&&(A=null,M=v.ranges[0]||M,m.removeSelectionMarker(M)),m.once("mouseup",function(){var U=v.toOrientedRange();A&&U.isEmpty()&&u(A.cursor,U.cursor)?v.substractPoint(U.cursor):(f?v.substractPoint(M.cursor):M&&(m.removeSelectionMarker(M),v.addRange(M)),v.addRange(U)),m.inVirtualSelectionMode=!1})}else if(L=="block"){h.stop(),m.inVirtualSelectionMode=!0;var k,P=[],O=function(){var U=m.renderer.pixelToScreenCoordinates(w,E),q=$.screenToDocumentPosition(U.row,U.column,U.offsetX);u(x,U)&&u(q,v.lead)||(x=U,m.selection.moveToPosition(q),m.renderer.scrollCursorIntoView(),m.removeSelectionMarkers(P),P=v.rectangularRangeBlock(x,C),m.$mouseHandler.$clickSelection&&P.length==1&&P[0].isEmpty()&&(P[0]=m.$mouseHandler.$clickSelection.clone()),P.forEach(m.addSelectionMarker,m),m.updateSelectionMarkers())};y&&!p?v.toSingleRange():!y&&p&&(k=v.toOrientedRange(),m.addSelectionMarker(k)),f?C=$.documentToScreenPosition(v.lead):v.moveToPosition(S),x={row:-1,column:-1};var N=function(U){O(),clearInterval(B),m.removeSelectionMarkers(P),P.length||(P=[v.toOrientedRange()]),k&&(m.removeSelectionMarker(k),v.toSingleRange(k));for(var q=0;q<P.length;q++)v.addRange(P[q]);m.inVirtualSelectionMode=!1,m.$mouseHandler.$clickSelection=null},D=O;s.capture(m.container,T,N);var B=setInterval(function(){D()},20);return h.preventDefault()}}}n.onMouseDown=o}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(i,n,r){n.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(c){c.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(c){c.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorAboveSkipCurrent",description:"Add cursor above (skip current)",exec:function(c){c.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelowSkipCurrent",description:"Add cursor below (skip current)",exec:function(c){c.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreBefore",description:"Select more before",exec:function(c){c.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(c){c.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(c){c.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextAfter",description:"Select next after",exec:function(c){c.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"toggleSplitSelectionIntoLines",description:"Split selection into lines",exec:function(c){c.multiSelect.rangeCount>1?c.multiSelect.joinSelections():c.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(c){c.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(c){c.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(c){c.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],n.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(c){c.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(c){return c&&c.inMultiSelectMode}}];var s=i("../keyboard/hash_handler").HashHandler;n.keyboardHandler=new s(n.multiSelectCommands)}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(i,n,r){var s=i("./range_list").RangeList,c=i("./range").Range,u=i("./selection").Selection,o=i("./mouse/multi_select_handler").onMouseDown,h=i("./lib/event"),a=i("./lib/lang"),l=i("./commands/multi_select_commands");n.commands=l.defaultCommands.concat(l.multiSelectCommands);var f=i("./search").Search,d=new f;function p(b,_,w){return d.$options.wrap=!0,d.$options.needle=_,d.$options.backwards=w==-1,d.find(b)}var g=i("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(g.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(b,_){if(!!b){if(!this.inMultiSelectMode&&this.rangeCount===0){var w=this.toOrientedRange();if(this.rangeList.add(w),this.rangeList.add(b),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),_||this.fromOrientedRange(b);this.rangeList.removeAll(),this.rangeList.add(w),this.$onAddRange(w)}b.cursor||(b.cursor=b.end);var E=this.rangeList.add(b);return this.$onAddRange(b),E.length&&this.$onRemoveRange(E),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),_||this.fromOrientedRange(b)}},this.toSingleRange=function(b){b=b||this.ranges[0];var _=this.rangeList.removeAll();_.length&&this.$onRemoveRange(_),b&&this.fromOrientedRange(b)},this.substractPoint=function(b){var _=this.rangeList.substractPoint(b);if(_)return this.$onRemoveRange(_),_[0]},this.mergeOverlappingRanges=function(){var b=this.rangeList.merge();b.length&&this.$onRemoveRange(b)},this.$onAddRange=function(b){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(b),this._signal("addRange",{range:b})},this.$onRemoveRange=function(b){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var _=this.rangeList.ranges.pop();b.push(_),this.rangeCount=0}for(var w=b.length;w--;){var E=this.ranges.indexOf(b[w]);this.ranges.splice(E,1)}this._signal("removeRange",{ranges:b}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),_=_||this.ranges[0],_&&!_.isEqual(this.getRange())&&this.fromOrientedRange(_)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new s,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var b=this.ranges.length?this.ranges:[this.getRange()],_=[],w=0;w<b.length;w++){var E=b[w],T=E.start.row,$=E.end.row;if(T===$)_.push(E.clone());else{for(_.push(new c(T,E.start.column,T,this.session.getLine(T).length));++T<$;)_.push(this.getLineRange(T,!0));_.push(new c($,0,$,E.end.column))}w==0&&!this.isBackwards()&&(_=_.reverse())}this.toSingleRange();for(var w=_.length;w--;)this.addRange(_[w])},this.joinSelections=function(){var b=this.rangeList.ranges,_=b[b.length-1],w=c.fromPoints(b[0].start,_.end);this.toSingleRange(),this.setSelectionRange(w,_.cursor==_.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var b=this.rangeList.ranges,_=b[b.length-1],w=c.fromPoints(b[0].start,_.end);this.toSingleRange(),this.setSelectionRange(w,_.cursor==_.start)}else{var E=this.session.documentToScreenPosition(this.cursor),T=this.session.documentToScreenPosition(this.anchor),$=this.rectangularRangeBlock(E,T);$.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(b,_,w){var E=[],T=b.column<_.column;if(T)var $=b.column,C=_.column,x=b.offsetX,L=_.offsetX;else var $=_.column,C=b.column,x=_.offsetX,L=b.offsetX;var M=b.row<_.row;if(M)var A=b.row,k=_.row;else var A=_.row,k=b.row;$<0&&($=0),A<0&&(A=0),A==k&&(w=!0);for(var P,O=A;O<=k;O++){var N=c.fromPoints(this.session.screenToDocumentPosition(O,$,x),this.session.screenToDocumentPosition(O,C,L));if(N.isEmpty()){if(P&&v(N.end,P))break;P=N.end}N.cursor=T?N.start:N.end,E.push(N)}if(M&&E.reverse(),!w){for(var D=E.length-1;E[D].isEmpty()&&D>0;)D--;if(D>0)for(var B=0;E[B].isEmpty();)B++;for(var U=D;U>=B;U--)E[U].isEmpty()&&E.splice(U,1)}return E}}.call(u.prototype);var m=i("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(b){b.cursor||(b.cursor=b.end);var _=this.getSelectionStyle();return b.marker=this.session.addMarker(b,"ace_selection",_),this.session.$selectionMarkers.push(b),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,b},this.removeSelectionMarker=function(b){if(!!b.marker){this.session.removeMarker(b.marker);var _=this.session.$selectionMarkers.indexOf(b);_!=-1&&this.session.$selectionMarkers.splice(_,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(b){for(var _=this.session.$selectionMarkers,w=b.length;w--;){var E=b[w];if(!!E.marker){this.session.removeMarker(E.marker);var T=_.indexOf(E);T!=-1&&_.splice(T,1)}}this.session.selectionMarkerCount=_.length},this.$onAddRange=function(b){this.addSelectionMarker(b.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(b){this.removeSelectionMarkers(b.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(b){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(l.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(b){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(l.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(b){var _=b.command,w=b.editor;if(!!w.multiSelect){if(_.multiSelectAction)_.multiSelectAction=="forEach"?E=w.forEachSelection(_,b.args):_.multiSelectAction=="forEachLine"?E=w.forEachSelection(_,b.args,!0):_.multiSelectAction=="single"?(w.exitMultiSelectMode(),E=_.exec(w,b.args||{})):E=_.multiSelectAction(w,b.args||{});else{var E=_.exec(w,b.args||{});w.multiSelect.addRange(w.multiSelect.toOrientedRange()),w.multiSelect.mergeOverlappingRanges()}return E}},this.forEachSelection=function(b,_,w){if(!this.inVirtualSelectionMode){var E=w&&w.keepOrder,T=w==!0||w&&w.$byLines,$=this.session,C=this.selection,x=C.rangeList,L=(E?C:x).ranges,M;if(!L.length)return b.exec?b.exec(this,_||{}):b(this,_||{});var A=C._eventRegistry;C._eventRegistry={};var k=new u($);this.inVirtualSelectionMode=!0;for(var P=L.length;P--;){if(T)for(;P>0&&L[P].start.row==L[P-1].end.row;)P--;k.fromOrientedRange(L[P]),k.index=P,this.selection=$.selection=k;var O=b.exec?b.exec(this,_||{}):b(this,_||{});!M&&O!==void 0&&(M=O),k.toOrientedRange(L[P])}k.detach(),this.selection=$.selection=C,this.inVirtualSelectionMode=!1,C._eventRegistry=A,C.mergeOverlappingRanges(),C.ranges[0]&&C.fromOrientedRange(C.ranges[0]);var N=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),N&&N.from==N.to&&this.renderer.animateScrolling(N.from),M}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var b="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var _=this.multiSelect.rangeList.ranges,w=[],E=0;E<_.length;E++)w.push(this.session.getTextRange(_[E]));var T=this.session.getDocument().getNewLineCharacter();b=w.join(T),b.length==(w.length-1)*T.length&&(b="")}else this.selection.isEmpty()||(b=this.session.getTextRange(this.getSelectionRange()));return b},this.$checkMultiselectChange=function(b,_){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var w=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&_==this.multiSelect.anchor)return;var E=_==this.multiSelect.anchor?w.cursor==w.start?w.end:w.start:w.cursor;E.row!=_.row||this.session.$clipPositionToDocument(E.row,E.column).column!=_.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function(b,_,w){if(_=_||{},_.needle=b||_.needle,_.needle==null){var E=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();_.needle=this.session.getTextRange(E)}this.$search.set(_);var T=this.$search.findAll(this.session);if(!T.length)return 0;var $=this.multiSelect;w||$.toSingleRange(T[0]);for(var C=T.length;C--;)$.addRange(T[C],!0);return E&&$.rangeList.rangeAtPoint(E.start)&&$.addRange(E,!0),T.length},this.selectMoreLines=function(b,_){var w=this.selection.toOrientedRange(),E=w.cursor==w.end,T=this.session.documentToScreenPosition(w.cursor);this.selection.$desiredColumn&&(T.column=this.selection.$desiredColumn);var $=this.session.screenToDocumentPosition(T.row+b,T.column);if(w.isEmpty())var x=$;else var C=this.session.documentToScreenPosition(E?w.end:w.start),x=this.session.screenToDocumentPosition(C.row+b,C.column);if(E){var L=c.fromPoints($,x);L.cursor=L.start}else{var L=c.fromPoints(x,$);L.cursor=L.end}if(L.desiredColumn=T.column,!this.selection.inMultiSelectMode)this.selection.addRange(w);else if(_)var M=w.cursor;this.selection.addRange(L),M&&this.selection.substractPoint(M)},this.transposeSelections=function(b){for(var _=this.session,w=_.multiSelect,E=w.ranges,T=E.length;T--;){var $=E[T];if($.isEmpty()){var C=_.getWordRange($.start.row,$.start.column);$.start.row=C.start.row,$.start.column=C.start.column,$.end.row=C.end.row,$.end.column=C.end.column}}w.mergeOverlappingRanges();for(var x=[],T=E.length;T--;){var $=E[T];x.unshift(_.getTextRange($))}b<0?x.unshift(x.pop()):x.push(x.shift());for(var T=E.length;T--;){var $=E[T],C=$.clone();_.replace($,x[T]),$.start.row=C.start.row,$.start.column=C.start.column}w.fromOrientedRange(w.ranges[0])},this.selectMore=function(b,_,w){var E=this.session,T=E.multiSelect,$=T.toOrientedRange();if(!($.isEmpty()&&($=E.getWordRange($.start.row,$.start.column),$.cursor=b==-1?$.start:$.end,this.multiSelect.addRange($),w))){var C=E.getTextRange($),x=p(E,C,b);x&&(x.cursor=b==-1?x.start:x.end,this.session.unfold(x),this.multiSelect.addRange(x),this.renderer.scrollCursorIntoView(null,.5)),_&&this.multiSelect.substractPoint($.cursor)}},this.alignCursors=function(){var b=this.session,_=b.multiSelect,w=_.ranges,E=-1,T=w.filter(function(D){if(D.cursor.row==E)return!0;E=D.cursor.row});if(!w.length||T.length==w.length-1){var $=this.selection.getRange(),C=$.start.row,x=$.end.row,L=C==x;if(L){var M=this.session.getLength(),A;do A=this.session.getLine(x);while(/[=:]/.test(A)&&++x<M);do A=this.session.getLine(C);while(/[=:]/.test(A)&&--C>0);C<0&&(C=0),x>=M&&(x=M-1)}var k=this.session.removeFullLines(C,x);k=this.$reAlignText(k,L),this.session.insert({row:C,column:0},k.join(`
`)+`
`),L||($.start.column=0,$.end.column=k[k.length-1].length),this.selection.setRange($)}else{T.forEach(function(D){_.substractPoint(D.cursor)});var P=0,O=1/0,N=w.map(function(D){var B=D.cursor,U=b.getLine(B.row),q=U.substr(B.column).search(/\S/g);return q==-1&&(q=0),B.column>P&&(P=B.column),q<O&&(O=q),q});w.forEach(function(D,B){var U=D.cursor,q=P-U.column,H=N[B]-O;q>H?b.insert(U,a.stringRepeat(" ",q-H)):b.remove(new c(U.row,U.column,U.row,U.column-q+H)),D.start.column=D.end.column=P,D.start.row=D.end.row=U.row,D.cursor=D.end}),_.fromOrientedRange(w[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(b,_){var w=!0,E=!0,T,$,C;return b.map(function(k){var P=k.match(/(\s*)(.*?)(\s*)([=:].*)/);return P?T==null?(T=P[1].length,$=P[2].length,C=P[3].length,P):(T+$+C!=P[1].length+P[2].length+P[3].length&&(E=!1),T!=P[1].length&&(w=!1),T>P[1].length&&(T=P[1].length),$<P[2].length&&($=P[2].length),C>P[3].length&&(C=P[3].length),P):[k]}).map(_?L:w?E?M:L:A);function x(k){return a.stringRepeat(" ",k)}function L(k){return k[2]?x(T)+k[2]+x($-k[2].length+C)+k[4].replace(/^([=:])\s+/,"$1 "):k[0]}function M(k){return k[2]?x(T+$-k[2].length)+k[2]+x(C)+k[4].replace(/^([=:])\s+/,"$1 "):k[0]}function A(k){return k[2]?x(T)+k[2]+x(C)+k[4].replace(/^([=:])\s+/,"$1 "):k[0]}}}).call(m.prototype);function v(b,_){return b.row==_.row&&b.column==_.column}n.onSessionChange=function(b){var _=b.session;_&&!_.multiSelect&&(_.$selectionMarkers=[],_.selection.$initRangeList(),_.multiSelect=_.selection),this.multiSelect=_&&_.multiSelect;var w=b.oldSession;w&&(w.multiSelect.off("addRange",this.$onAddRange),w.multiSelect.off("removeRange",this.$onRemoveRange),w.multiSelect.off("multiSelect",this.$onMultiSelect),w.multiSelect.off("singleSelect",this.$onSingleSelect),w.multiSelect.lead.off("change",this.$checkMultiselectChange),w.multiSelect.anchor.off("change",this.$checkMultiselectChange)),_&&(_.multiSelect.on("addRange",this.$onAddRange),_.multiSelect.on("removeRange",this.$onRemoveRange),_.multiSelect.on("multiSelect",this.$onMultiSelect),_.multiSelect.on("singleSelect",this.$onSingleSelect),_.multiSelect.lead.on("change",this.$checkMultiselectChange),_.multiSelect.anchor.on("change",this.$checkMultiselectChange)),_&&this.inMultiSelectMode!=_.selection.inMultiSelectMode&&(_.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function y(b){b.$multiselectOnSessionChange||(b.$onAddRange=b.$onAddRange.bind(b),b.$onRemoveRange=b.$onRemoveRange.bind(b),b.$onMultiSelect=b.$onMultiSelect.bind(b),b.$onSingleSelect=b.$onSingleSelect.bind(b),b.$multiselectOnSessionChange=n.onSessionChange.bind(b),b.$checkMultiselectChange=b.$checkMultiselectChange.bind(b),b.$multiselectOnSessionChange(b),b.on("changeSession",b.$multiselectOnSessionChange),b.on("mousedown",o),b.commands.addCommands(l.defaultCommands),S(b))}function S(b){if(!b.textInput)return;var _=b.textInput.getElement(),w=!1;h.addListener(_,"keydown",function(T){var $=T.keyCode==18&&!(T.ctrlKey||T.shiftKey||T.metaKey);b.$blockSelectEnabled&&$?w||(b.renderer.setMouseCursor("crosshair"),w=!0):w&&E()},b),h.addListener(_,"keyup",E,b),h.addListener(_,"blur",E,b);function E(T){w&&(b.renderer.setMouseCursor(""),w=!1)}}n.MultiSelect=y,i("./config").defineOptions(m.prototype,"editor",{enableMultiselect:{set:function(b){y(this),b?this.on("mousedown",o):this.off("mousedown",o)},value:!0},enableBlockSelect:{set:function(b){this.$blockSelectEnabled=b},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(i,n,r){var s=i("../../range").Range,c=n.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(u,o,h){var a=u.getLine(h);return this.foldingStartMarker.test(a)?"start":o=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(a)?"end":""},this.getFoldWidgetRange=function(u,o,h){return null},this.indentationBlock=function(u,o,h){var a=/\S/,l=u.getLine(o),f=l.search(a);if(f!=-1){for(var d=h||l.length,p=u.getLength(),g=o,m=o;++o<p;){var v=u.getLine(o).search(a);if(v!=-1){if(v<=f){var y=u.getTokenAt(o,0);if(!y||y.type!=="string")break}m=o}}if(m>g){var S=u.getLine(m).length;return new s(g,d,m,S)}}},this.openingBracketBlock=function(u,o,h,a,l){var f={row:h,column:a+1},d=u.$findClosingBracket(o,f,l);if(!!d){var p=u.foldWidgets[d.row];return p==null&&(p=u.getFoldWidget(d.row)),p=="start"&&d.row>f.row&&(d.row--,d.column=u.getLine(d.row).length),s.fromPoints(f,d)}},this.closingBracketBlock=function(u,o,h,a,l){var f={row:h,column:a},d=u.$findOpeningBracket(o,f);if(!!d)return d.column++,f.column--,s.fromPoints(d,f)}}).call(c.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range","ace/config"],function(i,n,r){var s=i("../line_widgets").LineWidgets,c=i("../lib/dom"),u=i("../range").Range,o=i("../config").nls;function h(l,f,d){for(var p=0,g=l.length-1;p<=g;){var m=p+g>>1,v=d(f,l[m]);if(v>0)p=m+1;else if(v<0)g=m-1;else return m}return-(p+1)}function a(l,f,d){var p=l.getAnnotations().sort(u.comparePoints);if(!!p.length){var g=h(p,{row:f,column:-1},u.comparePoints);g<0&&(g=-g-1),g>=p.length?g=d>0?0:p.length-1:g===0&&d<0&&(g=p.length-1);var m=p[g];if(!(!m||!d)){if(m.row===f){do m=p[g+=d];while(m&&m.row===f);if(!m)return p.slice()}var v=[];f=m.row;do v[d<0?"unshift":"push"](m),m=p[g+=d];while(m&&m.row==f);return v.length&&v}}}n.showErrorMarker=function(l,f){var d=l.session;d.widgetManager||(d.widgetManager=new s(d),d.widgetManager.attach(l));var p=l.getCursorPosition(),g=p.row,m=d.widgetManager.getWidgetsAtRow(g).filter(function($){return $.type=="errorMarker"})[0];m?m.destroy():g-=f;var v=a(d,g,f),y;if(v){var S=v[0];p.column=(S.pos&&typeof S.column!="number"?S.pos.sc:S.column)||0,p.row=S.row,y=l.renderer.$gutterLayer.$annotations[p.row]}else{if(m)return;y={text:[o("Looks good!")],className:"ace_ok"}}l.session.unfold(p.row),l.selection.moveToPosition(p);var b={row:p.row,fixedWidth:!0,coverGutter:!0,el:c.createElement("div"),type:"errorMarker"},_=b.el.appendChild(c.createElement("div")),w=b.el.appendChild(c.createElement("div"));w.className="error_widget_arrow "+y.className;var E=l.renderer.$cursorLayer.getPixelPosition(p).left;w.style.left=E+l.renderer.gutterWidth-5+"px",b.el.className="error_widget_wrapper",_.className="error_widget "+y.className,_.innerHTML=y.text.join("<br>"),_.appendChild(c.createElement("div"));var T=function($,C,x){if(C===0&&(x==="esc"||x==="return"))return b.destroy(),{command:"null"}};b.destroy=function(){l.$mouseHandler.isMousePressed||(l.keyBinding.removeKeyboardHandler(T),d.widgetManager.removeLineWidget(b),l.off("changeSelection",b.destroy),l.off("changeSession",b.destroy),l.off("mouseup",b.destroy),l.off("change",b.destroy))},l.keyBinding.addKeyboardHandler(T),l.on("changeSelection",b.destroy),l.on("changeSession",b.destroy),l.on("mouseup",b.destroy),l.on("change",b.destroy),l.session.widgetManager.addLineWidget(b),b.el.onmousedown=l.focus.bind(l),l.renderer.scrollCursorIntoView(null,.5,{bottom:b.el.offsetHeight})},c.importCssString(`
    .error_widget_wrapper {
        background: inherit;
        color: inherit;
        border:none
    }
    .error_widget {
        border-top: solid 2px;
        border-bottom: solid 2px;
        margin: 5px 0;
        padding: 10px 40px;
        white-space: pre-wrap;
    }
    .error_widget.ace_error, .error_widget_arrow.ace_error{
        border-color: #ff5a5a
    }
    .error_widget.ace_warning, .error_widget_arrow.ace_warning{
        border-color: #F1D817
    }
    .error_widget.ace_info, .error_widget_arrow.ace_info{
        border-color: #5a5a5a
    }
    .error_widget.ace_ok, .error_widget_arrow.ace_ok{
        border-color: #5aaa5a
    }
    .error_widget_arrow {
        position: absolute;
        border: solid 5px;
        border-top-color: transparent!important;
        border-right-color: transparent!important;
        border-left-color: transparent!important;
        top: -5px;
    }
`,"error_marker.css",!1)}),ace.define("ace/ace",["require","exports","module","ace/lib/dom","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config","ace/loader_build"],function(i,n,r){i("./loader_build")(n);var s=i("./lib/dom"),c=i("./range").Range,u=i("./editor").Editor,o=i("./edit_session").EditSession,h=i("./undomanager").UndoManager,a=i("./virtual_renderer").VirtualRenderer;i("./worker/worker_client"),i("./keyboard/hash_handler"),i("./placeholder"),i("./multi_select"),i("./mode/folding/fold_mode"),i("./theme/textmate"),i("./ext/error_marker"),n.config=i("./config"),n.edit=function(l,f){if(typeof l=="string"){var d=l;if(l=document.getElementById(d),!l)throw new Error("ace.edit can't find div #"+d)}if(l&&l.env&&l.env.editor instanceof u)return l.env.editor;var p="";if(l&&/input|textarea/i.test(l.tagName)){var g=l;p=g.value,l=s.createElement("pre"),g.parentNode.replaceChild(l,g)}else l&&(p=l.textContent,l.innerHTML="");var m=n.createEditSession(p),v=new u(new a(l),m,f),y={document:m,editor:v,onResize:v.resize.bind(v,null)};return g&&(y.textarea=g),v.on("destroy",function(){y.editor.container.env=null}),v.container.env=v.env=y,v},n.createEditSession=function(l,f){var d=new o(l,f);return d.setUndoManager(new h),d},n.Range=c,n.Editor=u,n.EditSession=o,n.UndoManager=h,n.VirtualRenderer=a,n.version=n.config.version}),function(){ace.require(["ace/ace"],function(i){i&&(i.config.init(!0),i.define=ace.define),window.ace||(window.ace=i);for(var n in i)i.hasOwnProperty(n)&&(window.ace[n]=i[n]);window.ace.default=window.ace,e&&(e.exports=window.ace)})}()})(Jv);var tP={exports:{}};(function(e,t){ace.define("ace/theme/chrome.css",["require","exports","module"],function(i,n,r){r.exports=`.ace-chrome .ace_gutter {
  background: #ebebeb;
  color: #333;
  overflow : hidden;
}

.ace-chrome .ace_print-margin {
  width: 1px;
  background: #e8e8e8;
}

.ace-chrome {
  background-color: #FFFFFF;
  color: black;
}

.ace-chrome .ace_cursor {
  color: black;
}

.ace-chrome .ace_invisible {
  color: rgb(191, 191, 191);
}

.ace-chrome .ace_constant.ace_buildin {
  color: rgb(88, 72, 246);
}

.ace-chrome .ace_constant.ace_language {
  color: rgb(88, 92, 246);
}

.ace-chrome .ace_constant.ace_library {
  color: rgb(6, 150, 14);
}

.ace-chrome .ace_invalid {
  background-color: rgb(153, 0, 0);
  color: white;
}

.ace-chrome .ace_fold {
}

.ace-chrome .ace_support.ace_function {
  color: rgb(60, 76, 114);
}

.ace-chrome .ace_support.ace_constant {
  color: rgb(6, 150, 14);
}

.ace-chrome .ace_support.ace_type,
.ace-chrome .ace_support.ace_class
.ace-chrome .ace_support.ace_other {
  color: rgb(109, 121, 222);
}

.ace-chrome .ace_variable.ace_parameter {
  font-style:italic;
  color:#FD971F;
}
.ace-chrome .ace_keyword.ace_operator {
  color: rgb(104, 118, 135);
}

.ace-chrome .ace_comment {
  color: #236e24;
}

.ace-chrome .ace_comment.ace_doc {
  color: #236e24;
}

.ace-chrome .ace_comment.ace_doc.ace_tag {
  color: #236e24;
}

.ace-chrome .ace_constant.ace_numeric {
  color: rgb(0, 0, 205);
}

.ace-chrome .ace_variable {
  color: rgb(49, 132, 149);
}

.ace-chrome .ace_xml-pe {
  color: rgb(104, 104, 91);
}

.ace-chrome .ace_entity.ace_name.ace_function {
  color: #0000A2;
}


.ace-chrome .ace_heading {
  color: rgb(12, 7, 255);
}

.ace-chrome .ace_list {
  color:rgb(185, 6, 144);
}

.ace-chrome .ace_marker-layer .ace_selection {
  background: rgb(181, 213, 255);
}

.ace-chrome .ace_marker-layer .ace_step {
  background: rgb(252, 255, 0);
}

.ace-chrome .ace_marker-layer .ace_stack {
  background: rgb(164, 229, 101);
}

.ace-chrome .ace_marker-layer .ace_bracket {
  margin: -1px 0 0 -1px;
  border: 1px solid rgb(192, 192, 192);
}

.ace-chrome .ace_marker-layer .ace_active-line {
  background: rgba(0, 0, 0, 0.07);
}

.ace-chrome .ace_gutter-active-line {
    background-color : #dcdcdc;
}

.ace-chrome .ace_marker-layer .ace_selected-word {
  background: rgb(250, 250, 255);
  border: 1px solid rgb(200, 200, 250);
}

.ace-chrome .ace_storage,
.ace-chrome .ace_keyword,
.ace-chrome .ace_meta.ace_tag {
  color: rgb(147, 15, 128);
}

.ace-chrome .ace_string.ace_regex {
  color: rgb(255, 0, 0)
}

.ace-chrome .ace_string {
  color: #1A1AA6;
}

.ace-chrome .ace_entity.ace_other.ace_attribute-name {
  color: #994409;
}

.ace-chrome .ace_indent-guide {
  background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
}
  
.ace-chrome .ace_indent-guide-active {
  background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
}
`}),ace.define("ace/theme/chrome",["require","exports","module","ace/theme/chrome.css","ace/lib/dom"],function(i,n,r){n.isDark=!1,n.cssClass="ace-chrome",n.cssText=i("./chrome.css");var s=i("../lib/dom");s.importCssString(n.cssText,n.cssClass,!1)}),function(){ace.require(["ace/theme/chrome"],function(i){e&&(e.exports=i)})}()})(tP);var iP={exports:{}};(function(e,t){ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(i,n,r){var s=i("../lib/oop");i("../lib/lang");var c=i("./text_highlight_rules").TextHighlightRules,u=n.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",o=n.supportFunction="rgb|rgba|url|attr|counter|counters",h=n.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",a=n.supportConstantColor="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|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|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|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen",l=n.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",f=n.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",d=n.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=n.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",g=function(){var m=this.createKeywordMapper({"support.function":o,"support.constant":h,"support.type":u,"support.constant.color":a,"support.constant.fonts":l},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:f},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+f+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:f},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:d},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:m,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};s.inherits(g,c),n.CssHighlightRules=g}),ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(i,n,r){var s=i("../lib/oop"),c=i("./text_highlight_rules").TextHighlightRules,u=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},u.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};s.inherits(u,c),u.getTagRule=function(o){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},u.getStartRule=function(o){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:o}},u.getEndRule=function(o){return{token:"comment.doc",regex:"\\*\\/",next:o}},n.JsDocCommentHighlightRules=u}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(i,n,r){var s=i("../lib/oop"),c=i("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,u=i("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\xA1-\uFFFF][a-zA-Z\\d\\$_\xA1-\uFFFF]*",h=function(f){var d=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},"identifier"),p="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",g="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)";this.$rules={no_regex:[c.getStartRule("doc-start"),l("no_regex"),{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+o+")(\\.)(prototype)(\\.)("+o+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\.)("+o+")(\\s*)(=)(\\s*)(function\\*?)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)(function\\*?)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+o+")(\\.)("+o+")(\\s*)(=)(\\s*)(function\\*?)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function\\*?)(\\s+)("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)(function\\*?)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function\\*?)(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:`from(?=\\s*('|"))`},{token:"keyword",regex:"(?:"+p+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/},{token:d,regex:o},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+o+")(\\.)("+o+")(\\s*)(=)(\\s*)(function\\*?)(?:(\\s+)(\\w+))?(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:o},{regex:"",token:"empty",next:"no_regex"}],start:[c.getStartRule("doc-start"),l("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[l("function_arguments"),{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:g},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:g},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},(!f||!f.noES6)&&(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(m,v,y){if(this.next=m=="{"?this.nextState:"",m=="{"&&y.length)y.unshift("start",v);else if(m=="}"&&y.length&&(y.shift(),this.next=y.shift(),this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1))return"paren.quasi.end";return m=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:g},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+o+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=.+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!f||f.jsx!=!1)&&a.call(this)),this.embedRules(c,"doc-",[c.getEndRule("no_regex")]),this.normalizeRules()};s.inherits(h,u);function a(){var f=o.replace("\\d","\\d\\-"),d={onMatch:function(g,m,v){var y=g.charAt(1)=="/"?2:1;return y==1?(m!=this.nextState?v.unshift(this.next,this.nextState,0):v.unshift(this.next),v[2]++):y==2&&m==this.nextState&&(v[1]--,(!v[1]||v[1]<0)&&(v.shift(),v.shift())),[{type:"meta.tag.punctuation."+(y==1?"":"end-")+"tag-open.xml",value:g.slice(0,y)},{type:"meta.tag.tag-name.xml",value:g.substr(y)}]},regex:"</?"+f,next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(d);var p={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[p,d,{include:"reference"},{defaultToken:"string"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(g,m,v){return m==v[0]&&v.shift(),g.length==2&&(v[0]==this.nextState&&v[1]--,(!v[1]||v[1]<0)&&v.splice(0,2)),this.next=v[0]||"start",[{type:this.token,value:g}]},nextState:"jsx"},p,l("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:f},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},d],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function l(f){return[{token:"comment",regex:/\/\*/,next:[c.getTagRule(),{token:"comment",regex:"\\*\\/",next:f||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[c.getTagRule(),{token:"comment",regex:"$|^",next:f||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}n.JavaScriptHighlightRules=h}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(i,n,r){var s=i("../lib/oop"),c=i("./text_highlight_rules").TextHighlightRules,u=function(o){var h="[_:a-zA-Z\xC0-\uFFFF][-_:.a-zA-Z0-9\xC0-\uFFFF]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+h+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"</"},{token:"text.tag-open.xml",regex:"<"},{include:"reference"},{defaultToken:"text.xml"}],processing_instruction:[{token:"entity.other.attribute-name.decl-attribute-name.xml",regex:h},{token:"keyword.operator.decl-attribute-equals.xml",regex:"="},{include:"whitespace"},{include:"string"},{token:"punctuation.xml-decl.xml",regex:"\\?>",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+h+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(</))((?:"+h+":)?"+h+")",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:h},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===u&&this.normalizeRules()};(function(){this.embedTagRules=function(o,h,a){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+a+".tag-name.xml"],regex:"(<)("+a+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:h+"start"}]}),this.$rules[a+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(l,f,d){return d.splice(0),this.token}}],this.embedRules(o,h,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+a+".tag-name.xml"],regex:"(</)("+a+"(?=\\s|>|$))",next:a+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(c.prototype),s.inherits(u,c),n.XmlHighlightRules=u}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(i,n,r){var s=i("../lib/oop"),c=i("../lib/lang"),u=i("./css_highlight_rules").CssHighlightRules,o=i("./javascript_highlight_rules").JavaScriptHighlightRules,h=i("./xml_highlight_rules").XmlHighlightRules,a=c.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),l=function(){h.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(f,d){var p=a[d];return["meta.tag.punctuation."+(f=="<"?"":"end-")+"tag-open.xml","meta.tag"+(p?"."+p:"")+".tag-name.xml"]},regex:"(</?)([-_a-zA-Z0-9:.]+)",next:"tag_stuff"}],tag_stuff:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start"}]}),this.embedTagRules(u,"css-","style"),this.embedTagRules(new o({jsx:!1}).getRules(),"js-","script"),this.constructor===l&&this.normalizeRules()};s.inherits(l,h),n.HtmlHighlightRules=l}),ace.define("ace/mode/markdown_highlight_rules",["require","exports","module","ace/config","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/html_highlight_rules"],function(i,n,r){var s=i("../config").$modes,c=i("../lib/oop"),u=i("../lib/lang"),o=i("./text_highlight_rules").TextHighlightRules,h=i("./html_highlight_rules").HtmlHighlightRules,a=function(f){return"(?:[^"+u.escapeRegExp(f)+"\\\\]|\\\\.)*"},l=function(){h.call(this);var f={token:"support.function",regex:/^\s*(```+[^`]*|~~~+[^~]*)$/,onMatch:function(p,g,m,v){var y=p.match(/^(\s*)([`~]+)(.*)/),S=/[\w-]+|$/.exec(y[3])[0];return s[S]||(S=""),m.unshift("githubblock",[],[y[1],y[2],S],g),this.token},next:"githubblock"},d=[{token:"support.function",regex:".*",onMatch:function(p,g,m,v){var y=m[1],S=m[2][0],b=m[2][1],_=m[2][2],w=/^(\s*)(`+|~+)\s*$/.exec(p);if(w&&w[1].length<S.length+3&&w[2].length>=b.length&&w[2][0]==b[0])return m.splice(0,3),this.next=m.shift(),this.token;if(this.next="",_&&s[_]){var E=s[_].getTokenizer().getLineTokens(p,y.slice(0));return m[1]=E.state,E.tokens}return this.token}}];this.$rules.start.unshift({token:"empty_line",regex:"^$",next:"allowBlock"},{token:"markup.heading.1",regex:"^=+(?=\\s*$)"},{token:"markup.heading.2",regex:"^\\-+(?=\\s*$)"},{token:function(p){return"markup.heading."+p.length},regex:/^#{1,6}(?=\s|$)/,next:"header"},f,{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{token:"constant",regex:"^ {0,3}(?:(?:\\* ?){3,}|(?:\\- ?){3,}|(?:\\_ ?){3,})\\s*$",next:"allowBlock"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic"}),this.addRules({basic:[{token:"constant.language.escape",regex:/\\[\\`*_{}\[\]()#+\-.!]/},{token:"support.function",regex:"(`+)(.*?[^`])(\\1)"},{token:["text","constant","text","url","string","text"],regex:'^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:["][^"]+["])?(\\s*))$'},{token:["text","string","text","constant","text"],regex:"(\\[)("+a("]")+")(\\]\\s*\\[)("+a("]")+")(\\])"},{token:["text","string","text","markup.underline","string","text"],regex:"(\\!?\\[)("+a("]")+')(\\]\\()((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)(\\s*"'+a('"')+'"\\s*)?(\\))'},{token:"string.strong",regex:"([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)"},{token:"string.emphasis",regex:"([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)"},{token:["text","url","text"],regex:`(<)((?:https?|ftp|dict):[^'">\\s]+|(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+)(>)`}],allowBlock:[{token:"support.function",regex:"^ {4}.+",next:"allowBlock"},{token:"empty_line",regex:"^$",next:"allowBlock"},{token:"empty",regex:"",next:"start"}],header:[{regex:"$",next:"start"},{include:"basic"},{defaultToken:"heading"}],"listblock-start":[{token:"support.variable",regex:/(?:\[[ x]\])?/,next:"listblock"}],listblock:[{token:"empty_line",regex:"^$",next:"start"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic",noEscape:!0},f,{defaultToken:"list"}],blockquote:[{token:"empty_line",regex:"^\\s*$",next:"start"},{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{include:"basic",noEscape:!0},{defaultToken:"string.blockquote"}],githubblock:d}),this.normalizeRules()};c.inherits(l,o),n.MarkdownHighlightRules=l}),ace.define("ace/mode/folding/markdown",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(i,n,r){var s=i("../../lib/oop"),c=i("./fold_mode").FoldMode,u=i("../../range").Range,o=n.FoldMode=function(){};s.inherits(o,c),function(){this.foldingStartMarker=/^(?:[=-]+\s*$|#{1,6} |`{3})/,this.getFoldWidget=function(h,a,l){var f=h.getLine(l);return this.foldingStartMarker.test(f)?f[0]=="`"&&h.bgTokenizer.getState(l)=="start"?"end":"start":""},this.getFoldWidgetRange=function(h,a,l){var f=h.getLine(l),d=f.length,p=h.getLength(),g=l,m=l;if(!f.match(this.foldingStartMarker))return;if(f[0]=="`")if(h.bgTokenizer.getState(l)!=="start"){for(;++l<p&&(f=h.getLine(l),!(f[0]=="`"&f.substring(0,3)=="```")););return new u(g,d,l,0)}else{for(;l-- >0&&(f=h.getLine(l),!(f[0]=="`"&f.substring(0,3)=="```")););return new u(l,f.length,g,0)}var v;function y(T){return v=h.getTokens(T)[0],v&&v.type.lastIndexOf(S,0)===0}var S="markup.heading";function b(){var T=v.value[0];return T=="="?6:T=="-"?5:7-v.value.search(/[^#]|$/)}if(y(l)){for(var _=b();++l<p;)if(!!y(l)){var w=b();if(w>=_)break}if(m=l-(!v||["=","-"].indexOf(v.value[0])==-1?1:2),m>g)for(;m>g&&/^\s*$/.test(h.getLine(m));)m--;if(m>g){var E=h.getLine(m).length;return new u(g,d,m,E)}}}}.call(o.prototype)}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(i,n,r){var s=i("../range").Range,c=function(){};(function(){this.checkOutdent=function(u,o){return/^\s+$/.test(u)?/^\s*\}/.test(o):!1},this.autoOutdent=function(u,o){var h=u.getLine(o),a=h.match(/^(\s*\})/);if(!a)return 0;var l=a[1].length,f=u.findMatchingBracket({row:o,column:l});if(!f||f.row==o)return 0;var d=this.$getIndent(u.getLine(f.row));u.replace(new s(o,0,o,l-1),d)},this.$getIndent=function(u){return u.match(/^\s*/)[0]}}).call(c.prototype),n.MatchingBraceOutdent=c}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(i,n,r){var s=i("../../lib/oop"),c=i("../../range").Range,u=i("./fold_mode").FoldMode,o=n.FoldMode=function(h){h&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+h.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+h.end)))};s.inherits(o,u),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(h,a,l){var f=h.getLine(l);if(this.singleLineBlockCommentRe.test(f)&&!this.startRegionRe.test(f)&&!this.tripleStarBlockCommentRe.test(f))return"";var d=this._getFoldWidgetBase(h,a,l);return!d&&this.startRegionRe.test(f)?"start":d},this.getFoldWidgetRange=function(h,a,l,f){var d=h.getLine(l);if(this.startRegionRe.test(d))return this.getCommentRegionBlock(h,d,l);var m=d.match(this.foldingStartMarker);if(m){var p=m.index;if(m[1])return this.openingBracketBlock(h,m[1],l,p);var g=h.getCommentFoldRange(l,p+m[0].length,1);return g&&!g.isMultiLine()&&(f?g=this.getSectionRange(h,l):a!="all"&&(g=null)),g}if(a!=="markbegin"){var m=d.match(this.foldingStopMarker);if(m){var p=m.index+m[0].length;return m[1]?this.closingBracketBlock(h,m[1],l,p):h.getCommentFoldRange(l,p,-1)}}},this.getSectionRange=function(h,a){var l=h.getLine(a),f=l.search(/\S/),d=a,p=l.length;a=a+1;for(var g=a,m=h.getLength();++a<m;){l=h.getLine(a);var v=l.search(/\S/);if(v!==-1){if(f>v)break;var y=this.getFoldWidgetRange(h,"all",a);if(y){if(y.start.row<=d)break;if(y.isMultiLine())a=y.end.row;else if(f==v)break}g=a}}return new c(d,p,g,h.getLine(g).length)},this.getCommentRegionBlock=function(h,a,l){for(var f=a.search(/\s*$/),d=h.getLength(),p=l,g=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,m=1;++l<d;){a=h.getLine(l);var v=g.exec(a);if(!!v&&(v[1]?m--:m++,!m))break}var y=l;if(y>p)return new c(p,f,y,a.length)}}.call(o.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(i,n,r){var s=i("../lib/oop"),c=i("./text").Mode,u=i("./javascript_highlight_rules").JavaScriptHighlightRules,o=i("./matching_brace_outdent").MatchingBraceOutdent,h=i("../worker/worker_client").WorkerClient,a=i("./behaviour/cstyle").CstyleBehaviour,l=i("./folding/cstyle").FoldMode,f=function(){this.HighlightRules=u,this.$outdent=new o,this.$behaviour=new a,this.foldingRules=new l};s.inherits(f,c),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(d,p,g){var m=this.$getIndent(p),v=this.getTokenizer().getLineTokens(p,d),y=v.tokens,S=v.state;if(y.length&&y[y.length-1].type=="comment")return m;if(d=="start"||d=="no_regex"){var b=p.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);b&&(m+=g)}else if(d=="doc-start"){if(S=="start"||S=="no_regex")return"";var b=p.match(/^\s*(\/?)\*/);b&&(b[1]&&(m+=" "),m+="* ")}return m},this.checkOutdent=function(d,p,g){return this.$outdent.checkOutdent(p,g)},this.autoOutdent=function(d,p,g){this.$outdent.autoOutdent(p,g)},this.createWorker=function(d){var p=new h(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return p.attachToDocument(d.getDocument()),p.on("annotate",function(g){d.setAnnotations(g.data)}),p.on("terminate",function(){d.clearAnnotations()}),p},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(f.prototype),n.Mode=f}),ace.define("ace/mode/css_completions",["require","exports","module"],function(i,n,r){var s={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,double:2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{default:1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},float:{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,static:1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},c=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var u=document.createElement("c").style;for(var o in u)if(typeof u[o]=="string"){var h=o.replace(/[A-Z]/g,function(a){return"-"+a.toLowerCase()});s.hasOwnProperty(h)||(s[h]=1)}}this.completionsDefined=!0},this.getCompletions=function(u,o,h,a){if(this.completionsDefined||this.defineCompletions(),u==="ruleset"||o.$mode.$id=="ace/mode/scss"){var l=o.getLine(h.row).substr(0,h.column),f=/\([^)]*$/.test(l);return f&&(l=l.substr(l.lastIndexOf("(")+1)),/:[^;]+$/.test(l)?(/([\w\-]+):[^:]*$/.test(l),this.getPropertyValueCompletions(u,o,h,a)):this.getPropertyCompletions(u,o,h,a,f)}return[]},this.getPropertyCompletions=function(u,o,h,a,l){l=l||!1;var f=Object.keys(s);return f.map(function(d){return{caption:d,snippet:d+": $0"+(l?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(u,o,h,a){var l=o.getLine(h.row).substr(0,h.column),f=(/([\w\-]+):[^:]*$/.exec(l)||{})[1];if(!f)return[];var d=[];return f in s&&typeof s[f]=="object"&&(d=Object.keys(s[f])),d.map(function(p){return{caption:p,snippet:p,meta:"property value",score:1e6}})}}).call(c.prototype),n.CssCompletions=c}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(i,n,r){var s=i("../../lib/oop");i("../behaviour").Behaviour;var c=i("./cstyle").CstyleBehaviour,u=i("../../token_iterator").TokenIterator,o=function(){this.inherit(c),this.add("colon","insertion",function(h,a,l,f,d){if(d===":"&&l.selection.isEmpty()){var p=l.getCursorPosition(),g=new u(f,p.row,p.column),m=g.getCurrentToken();if(m&&m.value.match(/\s+/)&&(m=g.stepBackward()),m&&m.type==="support.type"){var v=f.doc.getLine(p.row),y=v.substring(p.column,p.column+1);if(y===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(v.substring(p.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(h,a,l,f,d){var p=f.doc.getTextRange(d);if(!d.isMultiLine()&&p===":"){var g=l.getCursorPosition(),m=new u(f,g.row,g.column),v=m.getCurrentToken();if(v&&v.value.match(/\s+/)&&(v=m.stepBackward()),v&&v.type==="support.type"){var y=f.doc.getLine(d.start.row),S=y.substring(d.end.column,d.end.column+1);if(S===";")return d.end.column++,d}}}),this.add("semicolon","insertion",function(h,a,l,f,d){if(d===";"&&l.selection.isEmpty()){var p=l.getCursorPosition(),g=f.doc.getLine(p.row),m=g.substring(p.column,p.column+1);if(m===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(h,a,l,f,d){if(d==="!"&&l.selection.isEmpty()){var p=l.getCursorPosition(),g=f.doc.getLine(p.row);if(/^\s*(;|}|$)/.test(g.substring(p.column)))return{text:"!important",selection:[10,10]}}})};s.inherits(o,c),n.CssBehaviour=o}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(i,n,r){var s=i("../lib/oop"),c=i("./text").Mode,u=i("./css_highlight_rules").CssHighlightRules,o=i("./matching_brace_outdent").MatchingBraceOutdent,h=i("../worker/worker_client").WorkerClient,a=i("./css_completions").CssCompletions,l=i("./behaviour/css").CssBehaviour,f=i("./folding/cstyle").FoldMode,d=function(){this.HighlightRules=u,this.$outdent=new o,this.$behaviour=new l,this.$completer=new a,this.foldingRules=new f};s.inherits(d,c),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(p,g,m){var v=this.$getIndent(g),y=this.getTokenizer().getLineTokens(g,p).tokens;if(y.length&&y[y.length-1].type=="comment")return v;var S=g.match(/^.*\{\s*$/);return S&&(v+=m),v},this.checkOutdent=function(p,g,m){return this.$outdent.checkOutdent(g,m)},this.autoOutdent=function(p,g,m){this.$outdent.autoOutdent(g,m)},this.getCompletions=function(p,g,m,v){return this.$completer.getCompletions(p,g,m,v)},this.createWorker=function(p){var g=new h(["ace"],"ace/mode/css_worker","Worker");return g.attachToDocument(p.getDocument()),g.on("annotate",function(m){p.setAnnotations(m.data)}),g.on("terminate",function(){p.clearAnnotations()}),g},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(d.prototype),n.Mode=d}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(i,n,r){var s=i("../../lib/oop"),c=i("../behaviour").Behaviour,u=i("../../token_iterator").TokenIterator;i("../../lib/lang");function o(a,l){return a&&a.type.lastIndexOf(l+".xml")>-1}var h=function(){this.add("string_dquotes","insertion",function(a,l,f,d,p){if(p=='"'||p=="'"){var g=p,m=d.doc.getTextRange(f.getSelectionRange());if(m!==""&&m!=="'"&&m!='"'&&f.getWrapBehavioursEnabled())return{text:g+m+g,selection:!1};var v=f.getCursorPosition(),y=d.doc.getLine(v.row),S=y.substring(v.column,v.column+1),b=new u(d,v.row,v.column),_=b.getCurrentToken();if(S==g&&(o(_,"attribute-value")||o(_,"string")))return{text:"",selection:[1,1]};if(_||(_=b.stepBackward()),!_)return;for(;o(_,"tag-whitespace")||o(_,"whitespace");)_=b.stepBackward();var w=!S||S.match(/\s/);if(o(_,"attribute-equals")&&(w||S==">")||o(_,"decl-attribute-equals")&&(w||S=="?"))return{text:g+g,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(a,l,f,d,p){var g=d.doc.getTextRange(p);if(!p.isMultiLine()&&(g=='"'||g=="'")){var m=d.doc.getLine(p.start.row),v=m.substring(p.start.column+1,p.start.column+2);if(v==g)return p.end.column++,p}}),this.add("autoclosing","insertion",function(a,l,f,d,p){if(p==">"){var g=f.getSelectionRange().start,m=new u(d,g.row,g.column),v=m.getCurrentToken()||m.stepBackward();if(!v||!(o(v,"tag-name")||o(v,"tag-whitespace")||o(v,"attribute-name")||o(v,"attribute-equals")||o(v,"attribute-value"))||o(v,"reference.attribute-value"))return;if(o(v,"attribute-value")){var y=m.getCurrentTokenColumn()+v.value.length;if(g.column<y)return;if(g.column==y){var S=m.stepForward();if(S&&o(S,"attribute-value"))return;m.stepBackward()}}if(/^\s*>/.test(d.getLine(g.row).slice(g.column)))return;for(;!o(v,"tag-name");)if(v=m.stepBackward(),v.value=="<"){v=m.stepForward();break}var b=m.getCurrentTokenRow(),_=m.getCurrentTokenColumn();if(o(m.stepBackward(),"end-tag-open"))return;var w=v.value;return b==g.row&&(w=w.substring(0,g.column-_)),this.voidElements.hasOwnProperty(w.toLowerCase())?void 0:{text:"></"+w+">",selection:[1,1]}}}),this.add("autoindent","insertion",function(a,l,f,d,p){if(p==`
`){var g=f.getCursorPosition(),m=d.getLine(g.row),v=new u(d,g.row,g.column),y=v.getCurrentToken();if(y&&y.type.indexOf("tag-close")!==-1){if(y.value=="/>")return;for(;y&&y.type.indexOf("tag-name")===-1;)y=v.stepBackward();if(!y)return;var S=y.value,b=v.getCurrentTokenRow();if(y=v.stepBackward(),!y||y.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[S]){var _=d.getTokenAt(g.row,g.column+1),m=d.getLine(b),w=this.$getIndent(m),E=w+d.getTabString();return _&&_.value==="</"?{text:`
`+E+`
`+w,selection:[1,E.length,1,E.length]}:{text:`
`+E}}}}})};s.inherits(h,c),n.XmlBehaviour=h}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(i,n,r){var s=i("../../lib/oop"),c=i("./fold_mode").FoldMode,u=n.FoldMode=function(o,h){this.defaultMode=o,this.subModes=h};s.inherits(u,c),function(){this.$getMode=function(o){typeof o!="string"&&(o=o[0]);for(var h in this.subModes)if(o.indexOf(h)===0)return this.subModes[h];return null},this.$tryMode=function(o,h,a,l){var f=this.$getMode(o);return f?f.getFoldWidget(h,a,l):""},this.getFoldWidget=function(o,h,a){return this.$tryMode(o.getState(a-1),o,h,a)||this.$tryMode(o.getState(a),o,h,a)||this.defaultMode.getFoldWidget(o,h,a)},this.getFoldWidgetRange=function(o,h,a){var l=this.$getMode(o.getState(a-1));return(!l||!l.getFoldWidget(o,h,a))&&(l=this.$getMode(o.getState(a))),(!l||!l.getFoldWidget(o,h,a))&&(l=this.defaultMode),l.getFoldWidgetRange(o,h,a)}}.call(u.prototype)}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(i,n,r){var s=i("../../lib/oop"),c=i("../../range").Range,u=i("./fold_mode").FoldMode,o=n.FoldMode=function(l,f){u.call(this),this.voidElements=l||{},this.optionalEndTags=s.mixin({},this.voidElements),f&&s.mixin(this.optionalEndTags,f)};s.inherits(o,u);var h=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};function a(l,f){return l.type.lastIndexOf(f+".xml")>-1}(function(){this.getFoldWidget=function(l,f,d){var p=this._getFirstTagInLine(l,d);return p?p.closing||!p.tagName&&p.selfClosing?f==="markbeginend"?"end":"":!p.tagName||p.selfClosing||this.voidElements.hasOwnProperty(p.tagName.toLowerCase())||this._findEndTagInLine(l,d,p.tagName,p.end.column)?"":"start":this.getCommentFoldWidget(l,d)},this.getCommentFoldWidget=function(l,f){return/comment/.test(l.getState(f))&&/<!-/.test(l.getLine(f))?"start":""},this._getFirstTagInLine=function(l,f){for(var d=l.getTokens(f),p=new h,g=0;g<d.length;g++){var m=d[g];if(a(m,"tag-open")){if(p.end.column=p.start.column+m.value.length,p.closing=a(m,"end-tag-open"),m=d[++g],!m)return null;for(p.tagName=m.value,p.end.column+=m.value.length,g++;g<d.length;g++)if(m=d[g],p.end.column+=m.value.length,a(m,"tag-close")){p.selfClosing=m.value=="/>";break}return p}else if(a(m,"tag-close"))return p.selfClosing=m.value=="/>",p;p.start.column+=m.value.length}return null},this._findEndTagInLine=function(l,f,d,p){for(var g=l.getTokens(f),m=0,v=0;v<g.length;v++){var y=g[v];if(m+=y.value.length,!(m<p)&&a(y,"end-tag-open")&&(y=g[v+1],y&&y.value==d))return!0}return!1},this.getFoldWidgetRange=function(l,f,d){var p=l.getMatchingTags({row:d,column:0});return p?new c(p.openTag.end.row,p.openTag.end.column,p.closeTag.start.row,p.closeTag.start.column):this.getCommentFoldWidget(l,d)&&l.getCommentFoldRange(d,l.getLine(d).length)}}).call(o.prototype)}),ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(i,n,r){var s=i("../../lib/oop"),c=i("./mixed").FoldMode,u=i("./xml").FoldMode,o=i("./cstyle").FoldMode,h=n.FoldMode=function(a,l){c.call(this,new u(a,l),{"js-":new o,"css-":new o})};s.inherits(h,c)}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(i,n,r){var s=i("../token_iterator").TokenIterator,c=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],u=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],o=c.concat(u),h={a:{href:1,target:{_blank:1,top:1},ping:1,rel:{nofollow:1,alternate:1,author:1,bookmark:1,help:1,license:1,next:1,noreferrer:1,prefetch:1,prev:1,search:1,tag:1},media:1,hreflang:1,type:1},abbr:{},address:{},area:{shape:1,coords:1,href:1,hreflang:1,alt:1,target:1,media:1,rel:1,ping:1,type:1},article:{pubdate:1},aside:{},audio:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},muted:{muted:1},preload:{auto:1,metadata:1,none:1}},b:{},base:{href:1,target:1},bdi:{},bdo:{},blockquote:{cite:1},body:{onafterprint:1,onbeforeprint:1,onbeforeunload:1,onhashchange:1,onmessage:1,onoffline:1,onpopstate:1,onredo:1,onresize:1,onstorage:1,onundo:1,onunload:1},br:{},button:{autofocus:1,disabled:{disabled:1},form:1,formaction:1,formenctype:1,formmethod:1,formnovalidate:1,formtarget:1,name:1,value:1,type:{button:1,submit:1}},canvas:{width:1,height:1},caption:{},cite:{},code:{},col:{span:1},colgroup:{span:1},command:{type:1,label:1,icon:1,disabled:1,checked:1,radiogroup:1,command:1},data:{},datalist:{},dd:{},del:{cite:1,datetime:1},details:{open:1},dfn:{},dialog:{open:1},div:{},dl:{},dt:{},em:{},embed:{src:1,height:1,width:1,type:1},fieldset:{disabled:1,form:1,name:1},figcaption:{},figure:{},footer:{},form:{"accept-charset":1,action:1,autocomplete:1,enctype:{"multipart/form-data":1,"application/x-www-form-urlencoded":1},method:{get:1,post:1},name:1,novalidate:1,target:{_blank:1,top:1}},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},head:{},header:{},hr:{},html:{manifest:1},i:{},iframe:{name:1,src:1,height:1,width:1,sandbox:{"allow-same-origin":1,"allow-top-navigation":1,"allow-forms":1,"allow-scripts":1},seamless:{seamless:1}},img:{alt:1,src:1,height:1,width:1,usemap:1,ismap:1},input:{type:{text:1,password:1,hidden:1,checkbox:1,submit:1,radio:1,file:1,button:1,reset:1,image:31,color:1,date:1,datetime:1,"datetime-local":1,email:1,month:1,number:1,range:1,search:1,tel:1,time:1,url:1,week:1},accept:1,alt:1,autocomplete:{on:1,off:1},autofocus:{autofocus:1},checked:{checked:1},disabled:{disabled:1},form:1,formaction:1,formenctype:{"application/x-www-form-urlencoded":1,"multipart/form-data":1,"text/plain":1},formmethod:{get:1,post:1},formnovalidate:{formnovalidate:1},formtarget:{_blank:1,_self:1,_parent:1,_top:1},height:1,list:1,max:1,maxlength:1,min:1,multiple:{multiple:1},name:1,pattern:1,placeholder:1,readonly:{readonly:1},required:{required:1},size:1,src:1,step:1,width:1,files:1,value:1},ins:{cite:1,datetime:1},kbd:{},keygen:{autofocus:1,challenge:{challenge:1},disabled:{disabled:1},form:1,keytype:{rsa:1,dsa:1,ec:1},name:1},label:{form:1,for:1},legend:{},li:{value:1},link:{href:1,hreflang:1,rel:{stylesheet:1,icon:1},media:{all:1,screen:1,print:1},type:{"text/css":1,"image/png":1,"image/jpeg":1,"image/gif":1},sizes:1},main:{},map:{name:1},mark:{},math:{},menu:{type:1,label:1},meta:{"http-equiv":{"content-type":1},name:{description:1,keywords:1},content:{"text/html; charset=UTF-8":1},charset:1},meter:{value:1,min:1,max:1,low:1,high:1,optimum:1},nav:{},noscript:{href:1},object:{param:1,data:1,type:1,height:1,width:1,usemap:1,name:1,form:1,classid:1},ol:{start:1,reversed:1},optgroup:{disabled:1,label:1},option:{disabled:1,selected:1,label:1,value:1},output:{for:1,form:1,name:1},p:{},param:{name:1,value:1},pre:{},progress:{value:1,max:1},q:{cite:1},rp:{},rt:{},ruby:{},s:{},samp:{},script:{charset:1,type:{"text/javascript":1},src:1,defer:1,async:1},select:{autofocus:1,disabled:1,form:1,multiple:{multiple:1},name:1,size:1,readonly:{readonly:1}},small:{},source:{src:1,type:1,media:1},span:{},strong:{},style:{type:1,media:{all:1,screen:1,print:1},scoped:1},sub:{},sup:{},svg:{},table:{summary:1},tbody:{},td:{headers:1,rowspan:1,colspan:1},textarea:{autofocus:{autofocus:1},disabled:{disabled:1},form:1,maxlength:1,name:1,placeholder:1,readonly:{readonly:1},required:{required:1},rows:1,cols:1,wrap:{on:1,off:1,hard:1,soft:1}},tfoot:{},th:{headers:1,rowspan:1,colspan:1,scope:1},thead:{},time:{datetime:1},title:{},tr:{},track:{kind:1,src:1,srclang:1,label:1,default:1},section:{},summary:{},u:{},ul:{},var:{},video:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},width:1,height:1,poster:1,muted:{muted:1},preload:{auto:1,metadata:1,none:1}},wbr:{}},a=Object.keys(h);function l(g,m){return g.type.lastIndexOf(m+".xml")>-1}function f(g,m){for(var v=new s(g,m.row,m.column),y=v.getCurrentToken();y&&!l(y,"tag-name");)y=v.stepBackward();if(y)return y.value}function d(g,m){for(var v=new s(g,m.row,m.column),y=v.getCurrentToken();y&&!l(y,"attribute-name");)y=v.stepBackward();if(y)return y.value}var p=function(){};(function(){this.getCompletions=function(g,m,v,y){var S=m.getTokenAt(v.row,v.column);if(!S)return[];if(l(S,"tag-name")||l(S,"tag-open")||l(S,"end-tag-open"))return this.getTagCompletions(g,m,v,y);if(l(S,"tag-whitespace")||l(S,"attribute-name"))return this.getAttributeCompletions(g,m,v,y);if(l(S,"attribute-value"))return this.getAttributeValueCompletions(g,m,v,y);var b=m.getLine(v.row).substr(0,v.column);return/&[a-z]*$/i.test(b)?this.getHTMLEntityCompletions(g,m,v,y):[]},this.getTagCompletions=function(g,m,v,y){return a.map(function(S){return{value:S,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(g,m,v,y){var S=f(m,v);if(!S)return[];var b=o;return S in h&&(b=b.concat(Object.keys(h[S]))),b.map(function(_){return{caption:_,snippet:_+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(g,m,v,y){var S=f(m,v),b=d(m,v);if(!S)return[];var _=[];return S in h&&b in h[S]&&typeof h[S][b]=="object"&&(_=Object.keys(h[S][b])),_.map(function(w){return{caption:w,snippet:w,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(g,m,v,y){var S=["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"];return S.map(function(b){return{caption:b,snippet:b,meta:"html entity",score:1e6}})}}).call(p.prototype),n.HtmlCompletions=p}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(i,n,r){var s=i("../lib/oop"),c=i("../lib/lang"),u=i("./text").Mode,o=i("./javascript").Mode,h=i("./css").Mode,a=i("./html_highlight_rules").HtmlHighlightRules,l=i("./behaviour/xml").XmlBehaviour,f=i("./folding/html").FoldMode,d=i("./html_completions").HtmlCompletions,p=i("../worker/worker_client").WorkerClient,g=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],m=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],v=function(y){this.fragmentContext=y&&y.fragmentContext,this.HighlightRules=a,this.$behaviour=new l,this.$completer=new d,this.createModeDelegates({"js-":o,"css-":h}),this.foldingRules=new f(this.voidElements,c.arrayToMap(m))};s.inherits(v,u),function(){this.blockComment={start:"<!--",end:"-->"},this.voidElements=c.arrayToMap(g),this.getNextLineIndent=function(y,S,b){return this.$getIndent(S)},this.checkOutdent=function(y,S,b){return!1},this.getCompletions=function(y,S,b,_){return this.$completer.getCompletions(y,S,b,_)},this.createWorker=function(y){if(this.constructor==v){var S=new p(["ace"],"ace/mode/html_worker","Worker");return S.attachToDocument(y.getDocument()),this.fragmentContext&&S.call("setOptions",[{context:this.fragmentContext}]),S.on("error",function(b){y.setAnnotations(b.data)}),S.on("terminate",function(){y.clearAnnotations()}),S}},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}.call(v.prototype),n.Mode=v}),ace.define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(i,n,r){var s=i("../lib/oop"),c=i("./text_highlight_rules").TextHighlightRules,u=n.reservedKeywords="!|{|}|case|do|done|elif|else|esac|fi|for|if|in|then|until|while|&|;|export|local|read|typeset|unset|elif|select|set|function|declare|readonly",o=n.languageConstructs="[|]|alias|bg|bind|break|builtin|cd|command|compgen|complete|continue|dirs|disown|echo|enable|eval|exec|exit|fc|fg|getopts|hash|help|history|jobs|kill|let|logout|popd|printf|pushd|pwd|return|set|shift|shopt|source|suspend|test|times|trap|type|ulimit|umask|unalias|wait",h=function(){var a=this.createKeywordMapper({keyword:u,"support.function.builtin":o,"invalid.deprecated":"debugger"},"identifier"),l="(?:(?:[1-9]\\d*)|(?:0))",f="(?:\\.\\d+)",d="(?:\\d+)",p="(?:(?:"+d+"?"+f+")|(?:"+d+"\\.))",g="(?:(?:"+p+"|"+d+"))",m="(?:"+g+"|"+p+")",v="(?:&"+d+")",y="[a-zA-Z_][a-zA-Z0-9_]*",S="(?:"+y+"(?==))",b="(?:\\$(?:SHLVL|\\$|\\!|\\?))",_="(?:"+y+"\\s*\\(\\))";this.$rules={start:[{token:"constant",regex:/\\./},{token:["text","comment"],regex:/(^|\s)(#.*)$/},{token:"string.start",regex:'"',push:[{token:"constant.language.escape",regex:/\\(?:[$`"\\]|$)/},{include:"variables"},{token:"keyword.operator",regex:/`/},{token:"string.end",regex:'"',next:"pop"},{defaultToken:"string"}]},{token:"string",regex:"\\$'",push:[{token:"constant.language.escape",regex:/\\(?:[abeEfnrtv\\'"]|x[a-fA-F\d]{1,2}|u[a-fA-F\d]{4}([a-fA-F\d]{4})?|c.|\d{1,3})/},{token:"string",regex:"'",next:"pop"},{defaultToken:"string"}]},{regex:"<<<",token:"keyword.operator"},{stateName:"heredoc",regex:"(<<-?)(\\s*)(['\"`]?)([\\w\\-]+)(['\"`]?)",onMatch:function(w,E,T){var $=w[2]=="-"?"indentedHeredoc":"heredoc",C=w.split(this.splitRegex);return T.push($,C[4]),[{type:"constant",value:C[1]},{type:"text",value:C[2]},{type:"string",value:C[3]},{type:"support.class",value:C[4]},{type:"string",value:C[5]}]},rules:{heredoc:[{onMatch:function(w,E,T){return w===T[1]?(T.shift(),T.shift(),this.next=T[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^	+"},{onMatch:function(w,E,T){return w===T[1]?(T.shift(),T.shift(),this.next=T[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(w,E){return E[0]==="heredoc"||E[0]==="indentedHeredoc"?E[0]:w}},{token:["keyword","text","text","text","variable"],regex:/(declare|local|readonly)(\s+)(?:(-[fixar]+)(\s+))?([a-zA-Z_][a-zA-Z0-9_]*\b)/},{token:"variable.language",regex:b},{token:"variable",regex:S},{include:"variables"},{token:"support.function",regex:_},{token:"support.function",regex:v},{token:"string",start:"'",end:"'"},{token:"constant.numeric",regex:m},{token:"constant.numeric",regex:l+"\\b"},{token:a,regex:"[a-zA-Z_][a-zA-Z0-9_]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|~|<|>|<=|=>|=|!=|[%&|`]"},{token:"punctuation.operator",regex:";"},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]]"},{token:"paren.rparen",regex:"[\\)\\}]",next:"pop"}],variables:[{token:"variable",regex:/(\$)(\w+)/},{token:["variable","paren.lparen"],regex:/(\$)(\()/,push:"start"},{token:["variable","paren.lparen","keyword.operator","variable","keyword.operator"],regex:/(\$)(\{)([#!]?)(\w+|[*@#?\-$!0_])(:[?+\-=]?|##?|%%?|,,?\/|\^\^?)?/,push:"start"},{token:"variable",regex:/\$[*@#?\-$!0_]/},{token:["variable","paren.lparen"],regex:/(\$)(\{)/,push:"start"}]},this.normalizeRules()};s.inherits(h,c),n.ShHighlightRules=h}),ace.define("ace/mode/sh",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sh_highlight_rules","ace/range","ace/mode/folding/cstyle"],function(i,n,r){var s=i("../lib/oop"),c=i("./text").Mode,u=i("./sh_highlight_rules").ShHighlightRules,o=i("../range").Range,h=i("./folding/cstyle").FoldMode,a=function(){this.HighlightRules=u,this.foldingRules=new h,this.$behaviour=this.$defaultBehaviour};s.inherits(a,c),function(){this.lineCommentStart="#",this.getNextLineIndent=function(f,d,p){var g=this.$getIndent(d),m=this.getTokenizer().getLineTokens(d,f),v=m.tokens;if(v.length&&v[v.length-1].type=="comment")return g;if(f=="start"){var y=d.match(/^.*[\{\(\[:]\s*$/);y&&(g+=p)}return g};var l={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(f,d,p){if(p!==`\r
`&&p!=="\r"&&p!==`
`)return!1;var g=this.getTokenizer().getLineTokens(d.trim(),f).tokens;if(!g)return!1;do var m=g.pop();while(m&&(m.type=="comment"||m.type=="text"&&m.value.match(/^\s+$/)));return m?m.type=="keyword"&&l[m.value]:!1},this.autoOutdent=function(f,d,p){p+=1;var g=this.$getIndent(d.getLine(p)),m=d.getTabString();g.slice(-m.length)==m&&d.remove(new o(p,g.length-m.length,p,g.length))},this.$id="ace/mode/sh",this.snippetFileId="ace/snippets/sh"}.call(a.prototype),n.Mode=a}),ace.define("ace/mode/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/xml_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/xml","ace/worker/worker_client"],function(i,n,r){var s=i("../lib/oop"),c=i("../lib/lang"),u=i("./text").Mode,o=i("./xml_highlight_rules").XmlHighlightRules,h=i("./behaviour/xml").XmlBehaviour,a=i("./folding/xml").FoldMode,l=i("../worker/worker_client").WorkerClient,f=function(){this.HighlightRules=o,this.$behaviour=new h,this.foldingRules=new a};s.inherits(f,u),function(){this.voidElements=c.arrayToMap([]),this.blockComment={start:"<!--",end:"-->"},this.createWorker=function(d){var p=new l(["ace"],"ace/mode/xml_worker","Worker");return p.attachToDocument(d.getDocument()),p.on("error",function(g){d.setAnnotations(g.data)}),p.on("terminate",function(){d.clearAnnotations()}),p},this.$id="ace/mode/xml"}.call(f.prototype),n.Mode=f}),ace.define("ace/mode/markdown",["require","exports","module","ace/lib/oop","ace/mode/behaviour/cstyle","ace/mode/text","ace/mode/markdown_highlight_rules","ace/mode/folding/markdown","ace/mode/javascript","ace/mode/html","ace/mode/sh","ace/mode/sh","ace/mode/xml","ace/mode/css"],function(i,n,r){var s=i("../lib/oop"),c=i("./behaviour/cstyle").CstyleBehaviour,u=i("./text").Mode,o=i("./markdown_highlight_rules").MarkdownHighlightRules,h=i("./folding/markdown").FoldMode,a=function(){this.HighlightRules=o,this.createModeDelegates({javascript:i("./javascript").Mode,html:i("./html").Mode,bash:i("./sh").Mode,sh:i("./sh").Mode,xml:i("./xml").Mode,css:i("./css").Mode}),this.foldingRules=new h,this.$behaviour=new c({braces:!0})};s.inherits(a,u),function(){this.type="text",this.blockComment={start:"<!--",end:"-->"},this.$quotes={'"':'"',"`":"`"},this.getNextLineIndent=function(l,f,d){if(l=="listblock"){var p=/^(\s*)(?:([-+*])|(\d+)\.)(\s+)/.exec(f);if(!p)return"";var g=p[2];return g||(g=parseInt(p[3],10)+1+"."),p[1]+g+p[4]}else return this.$getIndent(f)},this.$id="ace/mode/markdown",this.snippetFileId="ace/snippets/markdown"}.call(a.prototype),n.Mode=a}),function(){ace.require(["ace/mode/markdown"],function(i){e&&(e.exports=i)})}()})(iP);const nP={name:"AceEditor",props:{modelValue:{type:String,required:!0},mode:{type:String,default:"text"},theme:{type:String,default:"chrome"},readonly:{type:Boolean,default:!1},height:{type:String,default:"150px"}},emits:["update:modelValue"],data(){return{editor:null}},watch:{modelValue(e){e!==this.editor.getValue()&&this.editor.setValue(e,1)},theme(e){this.editor.setTheme(`ace/theme/${e}`)},mode(e){this.editor.setOption("mode",`ace/mode/${e}`)},readonly(e){this.editor.setReadOnly(e)}},mounted(){this.editor=Jv.exports.edit(this.$el),this.editor.setValue(this.modelValue,1),this.editor.setReadOnly(this.readonly),this.editor.setTheme(`ace/theme/${this.theme}`),this.editor.session.setMode(`ace/mode/${this.mode}`),this.editor.on("change",()=>{this.$emit("update:modelValue",this.editor.getValue())})},beforeUnmount(){this.editor.destroy()}};function rP(e,t,i,n,r,s){return ee(),ae("div",{style:dt([{height:i.height},{width:"100%"}]),onKeydown:t[0]||(t[0]=Je(()=>{},["stop"])),onKeyup:t[1]||(t[1]=Je(()=>{},["stop"])),onKeypress:t[2]||(t[2]=Je(()=>{},["stop"]))},null,36)}const sP=$e(nP,[["render",rP]]),oo={mixins:[ts],props:{modelValue:{type:[String,Number],default:""}},data(){return{native_type:jv}},computed:{getValue:{get(){var e;return(e=this.modelValue)!=null?e:""},set(e){this.$emit("update:modelValue",e)}}}},oP={name:"FieldTypeHtmlDefinition",components:{AceEditor:sP},mixins:[oo],computed:{defaultAttributesValues(){return{mode:"html",theme:"chrome"}},definitionType(){return Uv},allowedAttributes(){return["disabled","height","id","mode","name","readonly","required","theme"]}}},aP={key:0,class:"overlay"};function lP(e,t,i,n,r,s){const c=Ae("ace-editor");return ee(),ae("div",null,[ve(c,ut({modelValue:e.getValue,"onUpdate:modelValue":t[0]||(t[0]=u=>e.getValue=u)},e.getAttributes),null,16,["modelValue"]),e.getAttributes.disabled?(ee(),ae("div",aP)):xe("",!0)])}const cP=$e(oP,[["render",lP]]),uP={name:"IntegerDefinition",mixins:[Bu],computed:{defaultAttributesValues(){return{}},allowedAttributes(){return["autocomplete","autofocus","disabled","form","id","list","max","min","name","placeholder","readonly","required","step"]},definitionType(){return Iu}}};function hP(e,t,i,n,r,s){return St((ee(),ae("input",ut({"onUpdate:modelValue":t[0]||(t[0]=c=>e.getValue=c)},e.getAttributes,{type:"number"},mi(e.events,!0)),null,16)),[[Fi,e.getValue,void 0,{number:!0}]])}const dP=$e(uP,[["render",hP]]),fP={name:"FieldTypeListOfValuesDefinition",mixins:[oo],emits:["more-data","filter","update:modelValue"],data(){return{is_mouse_down:!1,selected_index:null,is_open:!1,is_top:!1,filter:null,placeholder:null,loading_bg_top:0}},computed:{defaultAttributesValues(){return{}},definitionType(){return Wv},allowedAttributes(){return["autocomplete","autofocus","dirname","disabled","form","id","list","maxlength","minlength","name","pattern","placeholder","readonly","required","size","type"]},showMoreInputsWarning(){return Object.keys(this.parameters.options||{}).length>100&&Object.keys(this.getOptions).length===100},getFieldAttributes(){return{...this.attributes,value:this.getValue}},getFilterAttributes(){return{...this.attributes,name:this.attributes.name?`input_${this.attributes.name}`:void 0,required:this.attributes.required&&!this.getValue}},showRemoveOptionButton(){return this.parameters.allow_empty&&!(this.getAttributes.readonly||this.getAttributes.disabled)&&this.getOptions[this.selected_index||this.getValue]},getOptions(){let e=Array.isArray(this.parameters.options)?this.parameters.options.map(t=>[t.id,t.label,t.html]):Object.entries(this.parameters.options||{});if(this.filter&&!this.parameters.hasPagination){const t=this.filter.toLowerCase().replace(/\s/g,"");e=e.filter(([,i])=>{const n=(i||"").toString();return String(n.replace(/(<([^>]+)>)| /img,"")).toLowerCase().replace(" ","").includes(t)})}return this.parameters.sort!==!1&&(this.parameters.hasPagination?e.sort(([,t],[,i])=>t<i?-1:t>i?1:0):e.sort(([,t],[,i])=>(t||"").toString().localeCompare((i||"").toString(),"en",{numeric:!0}))),e.slice(0,e.length>100?100:e.length).reduce((t,[i,n,r])=>({...t,[i]:{value:n,html:r}}),{})}},watch:{is_open(e){this.loading_bg_top=0;const t=e?"addEventListener":"removeEventListener";document[t]("click",this.closeListenerFn),this.toggleCloseListenerForScrollEvent(t)},selected_index:"setPlaceholderValue",getValue:{handler:"setPlaceholderValue",immediate:!0},"parameters.options":"setPlaceholderValue",filter(e){this.emitFilterDebounced(this,e==null?void 0:e.toLowerCase())}},beforeUnmount(){this.close()},methods:{setIsMouseDown(e=!1){this.is_mouse_down=e},clearFilterInput(){setTimeout(()=>{this.filter&&!this.is_mouse_down&&(this.filter=null)},100)},closeListenerFn(e){this.$el.contains(e.target)||this.close()},toggleCloseListenerForScrollEvent(e){const t=({parentNode:n})=>n===document?null:window.getComputedStyle(n).getPropertyValue("overflow").includes("auto")?n:t(n),i=t(this.$el);i&&i[e]("scroll",this.closeListenerFn)},selectOption(e,t){e.preventDefault(),this.getValue=t,this.filter=null,this.selected_index=null,this.close()},setPlaceholderValue(){this.$nextTick(()=>{var e,t,i,n;if(this.parameters.plain_options)this.placeholder=this.parameters.plain_options[this.selected_index||this.getValue];else if(Array.isArray((e=this.parameters)==null?void 0:e.options))this.placeholder=(t=this.parameters.options.find(r=>`${r.id}`==`${this.getValue}`))==null?void 0:t.label;else{const r=(i=this.parameters.options)==null?void 0:i[this.selected_index||this.getValue];this.placeholder=(n=(r==null?void 0:r.title)||r)!=null?n:this.getAttributes.placeholder}this.placeholder=(this.placeholder||"").toString().replaceAll("&nbsp;","")})},keyDown(){!this.selected_index&&this.getValue&&(this.selected_index=this.getValue);const e=Object.keys(this.getOptions),t=e.indexOf(this.selected_index)+1;t>=e.length?[this.selected_index]=e:this.selected_index=e[t]},keyUp(){!this.selected_index&&this.getValue&&(this.selected_index=this.getValue);const e=Object.keys(this.getOptions),t=e.indexOf(this.selected_index)-1;t<0?[this.selected_index]=e.reverse():this.selected_index=e[t]},keyEsc(){this.close()},keyEnter(e){this.is_open&&e.preventDefault(),this.selected_index&&this.selectOption(e,this.selected_index)},onBlur(){this.selected_index&&(this.selected_index=null)},toggle(){this.is_open?this.close():this.open()},close(){this.selected_index=null,this.is_mouse_down=!1,this.is_open=!1},open(){this.getAttributes.disabled||this.getAttributes.readonly||(this.is_open=!0,this.$nextTick(this.setSelectMenuPosition))},checkScroll(e){const{scrollHeight:t,clientHeight:i,scrollTop:n}=e.target;this.loading_bg_top=n,!this.parameters.loading&&!this.showMoreInputsWarning&&n+i>=t&&this.$emit("more-data")},setSelectMenuPosition(){if(!this.$refs.selectMenu||!this.is_open)return;const e=200,t=105;this.$nextTick(()=>{const i=window.innerHeight-this.$refs.input.getBoundingClientRect().bottom,n=this.$refs.selectMenu.getBoundingClientRect().height,{top:r,bottom:s,left:c,width:u}=this.$refs.input.getBoundingClientRect(),o={left:c,width:u-2,maxHeight:void 0,top:void 0};this.is_top=n<t?!1:i<t,this.is_top?(o.maxHeight=n<e?n:e,o.top=r-o.maxHeight):(o.maxHeight=i<e?i-4:e,o.top=s),Object.entries(o).forEach(([h,a])=>{this.$refs.selectMenu.style[h]=`${a}px`})})},emitFilterDebounced:ev((e,t)=>{!e.is_open||e.$emit("filter",t)},500)}},pP=["placeholder","value"],gP={class:"btn-group"},mP=["disabled"],vP=["onClick","innerHTML"],yP=["onClick"],bP={key:1,class:"more-results"},_P={key:2,class:"more-results"};function wP(e,t,i,n,r,s){const c=Ae("flai-icon"),u=Ae("flai-spinner");return ee(),ae("div",{class:"bg-white",onFocusout:t[13]||(t[13]=(...o)=>s.clearFilterInput&&s.clearFilterInput(...o))},[se("div",{ref:"input",class:Ue([{open:r.is_open,"top-position":r.is_top},"input-selection"])},[se("input",ut({ref:"filter-input"},s.getFilterAttributes,{placeholder:r.placeholder,value:r.filter,type:"text",autocomplete:"off",onInput:t[0]||(t[0]=o=>r.filter=o.target.value),onBlur:t[1]||(t[1]=(...o)=>s.onBlur&&s.onBlur(...o)),onClick:t[2]||(t[2]=Je((...o)=>s.open&&s.open(...o),["prevent"])),onKeyup:[t[3]||(t[3]=Cn(Je((...o)=>s.keyUp&&s.keyUp(...o),["prevent"]),["up"])),t[4]||(t[4]=Cn(Je((...o)=>s.keyDown&&s.keyDown(...o),["prevent"]),["down"]))],onKeydown:[t[5]||(t[5]=Cn(Je((...o)=>s.keyEsc&&s.keyEsc(...o),["prevent"]),["esc"])),t[6]||(t[6]=Cn((...o)=>s.keyEnter&&s.keyEnter(...o),["enter"]))]}),null,16,pP),se("input",ut({type:"hidden"},s.getFieldAttributes),null,16),se("div",gP,[s.showRemoveOptionButton?(ee(),ae("button",{key:0,type:"button",class:"btn icon link",onClick:t[7]||(t[7]=Je(o=>s.selectOption(o,null),["prevent"]))},[ve(c,{name:"close"})])):xe("",!0),se("button",{disabled:e.getAttributes.disabled||e.getAttributes.readonly,type:"button",class:"btn icon link",onClick:t[8]||(t[8]=Je((...o)=>s.toggle&&s.toggle(...o),["prevent"]))},[ve(c,{name:r.is_open?"expand_less":"expand_more"},null,8,["name"])],8,mP)])],2),r.is_open?(ee(),Se(or,{key:0,to:"#root-portal","ignore-parent-node":""},[se("ul",{ref:"selectMenu",class:Ue([{"top-position":r.is_top},"list-of-values-value-list"]),onScroll:t[12]||(t[12]=(...o)=>s.checkScroll&&s.checkScroll(...o))},[e.parameters.loading?(ee(),ae("div",{key:0,class:"loading-bg",style:dt(`top: ${r.loading_bg_top}px;`),onClick:t[9]||(t[9]=Je(()=>{},["stop"]))},[ve(u,{size:"3xl"})],4)):xe("",!0),(ee(!0),ae(Oe,null,lr(s.getOptions,(o,h)=>(ee(),ae("li",{key:h,class:Ue({active:h===e.getValue,"active-index":h===r.selected_index}),onMousedown:t[10]||(t[10]=a=>s.setIsMouseDown(!0)),onMouseup:t[11]||(t[11]=a=>s.setIsMouseDown(!1))},[e.parameters.option_html?(ee(),ae("div",{key:0,onClick:Je(a=>s.selectOption(a,h),["prevent","stop"]),innerHTML:o.html},null,8,vP)):(ee(),ae("div",{key:1,onClick:Je(a=>s.selectOption(a,h),["prevent","stop"])},be(o.value),9,yP))],34))),128)),Object.keys(s.getOptions).length===0?(ee(),ae("li",bP," No options available. ")):xe("",!0),s.showMoreInputsWarning?(ee(),ae("li",_P," More results are available. Use filter. ")):xe("",!0)],34)])):xe("",!0)],32)}const SP=$e(fP,[["render",wP]]),AP={name:"FieldTypePlainTextMultiRowDefinition",mixins:[oo],computed:{defaultAttributesValues(){return{rows:3}},allowedAttributes(){return["autocomplete","autofocus","cols","disabled","form","id","maxlength","minlength","name","placeholder","readonly","required","rows","spellcheck","wrap"]},definitionType(){return ku}}};function CP(e,t,i,n,r,s){return St((ee(),ae("textarea",ut({"onUpdate:modelValue":t[0]||(t[0]=c=>e.getValue=c)},e.getAttributes,mi(e.events,!0)),null,16)),[[Fi,e.getValue]])}const xP=$e(AP,[["render",CP]]),TP={name:"FieldTypePlainTextSingleRowDefinition",mixins:[oo],computed:{defaultAttributesValues(){return{}},definitionType(){return Pu},allowedAttributes(){return["autocomplete","autofocus","dirname","disabled","form","id","list","maxlength","minlength","name","pattern","placeholder","readonly","required","size","type"]},getType(){return["email","password","search","text","url"].includes(this.getAttributes.type)?this.getAttributes.type:(this.$debug&&this.getAttributes.type&&console.warn(`Type ${this.getAttributes.type} is not valid for plain-text-single-row inputs. Reverting to "text"`),"text")}}},$P=["type"];function MP(e,t,i,n,r,s){return St((ee(),ae("input",ut({"onUpdate:modelValue":t[0]||(t[0]=c=>e.getValue=c)},e.getAttributes,{type:s.getType},mi(e.events,!0)),null,16,$P)),[[au,e.getValue]])}const EP=$e(TP,[["render",MP]]),kP={name:"SequenceNumberDefinition",mixins:[Bu],computed:{defaultAttributesValues(){return{}},allowedAttributes(){return["autocomplete","autofocus","disabled","form","id","list","max","min","name","placeholder","readonly","required","step","type"]},definitionType(){return Ou}}};function PP(e,t,i,n,r,s){return St((ee(),ae("input",ut({"onUpdate:modelValue":t[0]||(t[0]=c=>e.getValue=c)},e.getAttributes,{type:"number"},mi(e.events,!0)),null,16)),[[Fi,e.getValue,void 0,{number:!0}]])}const LP=$e(kP,[["render",PP]]);const RP={name:"PasswordDefinition",mixins:[oo],data(){return{showPassword:!1}},computed:{defaultAttributesValues(){return{}},definitionType(){return Lu},allowedAttributes(){return["autocomplete","autofocus","dirname","disabled","form","id","list","maxlength","minlength","name","pattern","placeholder","readonly","required","size"]},getType(){return this.showPassword?"text":"password"}}},IP={class:"d-flex items-center"},OP=["type"];function NP(e,t,i,n,r,s){const c=Ae("flai-icon");return ee(),ae("div",IP,[St(se("input",ut({"onUpdate:modelValue":t[0]||(t[0]=u=>e.getValue=u)},e.getAttributes,{type:s.getType,class:"flex-1"},mi(e.events,!0)),null,16,OP),[[au,e.getValue]]),ve(c,{name:r.showPassword?"visibility_off":"visibility",class:"toggle-icon ml-2",onClick:t[1]||(t[1]=u=>r.showPassword=!r.showPassword)},null,8,["name"])])}const DP=$e(RP,[["render",NP],["__scopeId","data-v-061eb8c9"]]),FP={name:"RadioDefinition",mixins:[ts],props:{modelValue:{type:[String,Number],default:null}},emits:["update:modelValue"],computed:{defaultAttributesValues(){return{}},allowedAttributes(){return["disabled","id","name","required"]},definitionType(){return Kv},options(){return(this.parameters.options||[]).map(e=>{var i,n;const t=this.getAttributes.name||e.name;return{id:`${e.id||t||"id"}_${nv()}`.replaceAll(" ","-"),name:t,value:e.value,checked:this.getValue===e.value,required:this.getAttributes.required,disabled:(i=e.disabled)!=null?i:this.getAttributes.disabled,label:(n=e.label)!=null?n:e.value}})},getValue:{get(){return this.modelValue},set(e){this.$emit("update:modelValue",e)}}}},BP=["id","value","name","disabled","readonly","checked"],VP=["for"];function zP(e,t,i,n,r,s){return ee(),ae("div",null,[(ee(!0),ae(Oe,null,lr(s.options,c=>(ee(),ae("div",{key:c.id},[St(se("input",{id:c.id,"onUpdate:modelValue":t[0]||(t[0]=u=>s.getValue=u),value:c.value,name:c.name,disabled:c.disabled,readonly:c.readonly,checked:c.checked,type:"radio"},null,8,BP),[[ou,s.getValue]]),se("label",{for:c.id},[se("span",{class:Ue(["definition-checkbox",{checked:c.checked}])},null,2),He(" "+be(c.label),1)],8,VP)]))),128))])}const HP=$e(FP,[["render",zP]]),Zv={mixins:[ts],props:{modelValue:{type:[Array,String,Number,Boolean,Object],default:()=>[]}},computed:{getValue:{get(){return this.modelValue},set(e){this.$emit("update:modelValue",e)}}}},UP={name:"RangeDefinition",mixins:[Zv],computed:{defaultAttributesValues(){return{min:0,max:100,step:1}},allowedAttributes(){return["max","min","step","id","name","disabled"]},definitionType(){return Xv}}};function WP(e,t,i,n,r,s){return St((ee(),ae("input",ut({"onUpdate:modelValue":t[0]||(t[0]=c=>e.getValue=c),type:"range"},e.getAttributes),null,16)),[[Fi,e.getValue,void 0,{number:!0}]])}const jP=$e(UP,[["render",WP]]);const GP={name:"DoubleRangeDefinition",mixins:[Zv],props:{modelValue:{type:Object,validator:e=>e.hasOwnProperty("from")&&e.hasOwnProperty("to"),default:()=>({from:null,to:null})}},emits:["update:modelValue"],data(){return{fromHover:!1,toHover:!1,fromActive:!1,toActive:!1,sliderEvents:e=>({mouseover:()=>{this[`${e}Hover`]=!0},mouseout:()=>{this[`${e}Hover`]=!1},mousedown:()=>{this[`${e}Active`]=!0},pointerup:()=>{this[`${e}Active`]=!1},touchstart:()=>{this[`${e}Active`]=!0},touchend:()=>{this[`${e}Active`]=!1},input:e==="from"?this.onFromInput:this.onToInput})}},computed:{defaultAttributesValues(){return{min:0,max:100,step:1}},numberInputStep(){return this.getAttributes.step<1?this.getAttributes.step:1},allowedAttributes(){return["max","min","step","id","name","disabled","fromdisabled","todisabled"]},definitionType(){return Yv},fromStyle(){return`left: ${(Math.min(parseInt(this.from),parseInt(this.to)-1)-this.fromAttributes.min)/(this.fromAttributes.max-this.fromAttributes.min)*100}%`},toStyle(){return`right: ${100-(Math.max(parseInt(this.to),parseInt(this.from)+1)-this.toAttributes.min)/(this.toAttributes.max-this.toAttributes.min)*100}%`},betweenStyle(){return`${this.fromStyle}; ${this.toStyle}`},fromAttributes(){return{...this.getAttributes,disabled:this.getAttributes.disabled||this.getAttributes.fromdisabled,step:this.fromActive?this.attributes.step:1}},toAttributes(){return{...this.getAttributes,disabled:this.getAttributes.disabled||this.getAttributes.todisabled,step:this.toActive?this.attributes.step:1}},from:{get(){return this.modelValue.from},set(e){this.$emit("update:modelValue",{...this.modelValue,from:e})}},to:{get(){return this.modelValue.to},set(e){this.$emit("update:modelValue",{...this.modelValue,to:e})}}},methods:{onFromInput(e){const t=parseFloat(e.target.value);this.to>t?this.from=t:e.target.value=this.from},onToInput(e){const t=parseFloat(e.target.value);this.from<t?this.to=t:e.target.value=this.to}}},qP={class:"wrapper"},KP={class:"range-slider"},YP={class:"range-labels"},XP=["value"],QP=["value"],JP=["value"],ZP=["value"],eL={class:"track-wrapper"};function tL(e,t,i,n,r,s){return ee(),ae("div",qP,[se("div",KP,[se("div",YP,[se("input",ut({type:"number",value:s.from},s.fromAttributes,{class:"range-label range-label-start",onChange:t[0]||(t[0]=(...c)=>s.onFromInput&&s.onFromInput(...c))}),null,16,XP),se("input",ut({type:"number",value:s.to},s.toAttributes,{class:"range-label range-label-end",onChange:t[1]||(t[1]=(...c)=>s.onToInput&&s.onToInput(...c))}),null,16,QP)]),se("input",ut({value:s.from,type:"range"},s.fromAttributes,mi(r.sliderEvents("from"),!0)),null,16,JP),se("input",ut({value:s.to,type:"range"},s.toAttributes,mi(r.sliderEvents("to"),!0)),null,16,ZP),se("div",eL,[t[2]||(t[2]=se("div",{class:"track"},null,-1)),se("div",{class:Ue(["range-between",{disabled:e.getAttributes.disabled}]),style:dt(s.betweenStyle)},null,6),se("div",{class:Ue([{active:r.fromActive,hover:r.fromHover,disabled:s.fromAttributes.disabled},"thumb left"]),style:dt(s.fromStyle)},null,6),se("div",{class:Ue([{active:r.toActive,hover:r.toHover,disabled:s.toAttributes.disabled},"thumb right"]),style:dt(s.toStyle)},null,6)])])])}const iL=$e(GP,[["render",tL],["__scopeId","data-v-97125727"]]),nL={name:"FieldType",components:{InputErrors:Fk,InputHint:Hk,BooleanDefinition:jk,DateTimeDefinition:Kk,DateDefinition:Qk,DecimalDefinition:eP,HtmlDefinition:cP,IntegerDefinition:dP,ListOfValuesDefinition:SP,PlainTextMultiRowDefinition:xP,PlainTextSingleRowDefinition:EP,SequenceNumberDefinition:LP,PasswordDefinition:DP,RadioDefinition:HP,RangeDefinition:jP,DoubleRangeSliderDefinition:iL},props:{modelValue:{default:null},definition:{type:String,required:!0,validator:e=>Rk.includes(e)||Ik.includes(e)},errors:{type:Array,required:!1,default:()=>[]},hint:{type:String,required:!1,default:null},label:{type:String,required:!1,default:""},attributes:{type:Object,required:!1,default:()=>({})},parameters:{type:Object,required:!1,default:()=>({})},events:{type:Object,default:()=>({})},inline:{type:Boolean,default:!1}},emits:["update:modelValue"],computed:{getComponentName(){return`${this.definition}-definition`},getDefinitionVBind(){return{attributes:{...this.attributes,id:this.getId},parameters:this.parameters,events:this.getEvents}},getEvents(){return[Pu,ku,Nu,Du,Fu,Ru,Iu,Ou,Lu].includes(this.definition)?this.events:void 0},hasErrors(){return Object.keys(this.errors).length},getValue:{get(){return this.modelValue},set(e){this.$emit("update:modelValue",e)}},getId(){if(this.attributes.id)return this.attributes.id;const e=this.attributes.name||"id";return this.$debug&&!this.attributes.name&&console.warn('[FieldType] if possible add "name" to attributes parameter'),`${e}_${nv()}`},listeners(){return Object.keys(this.$attrs).reduce((e,t)=>(t.startsWith("on")&&!t.startsWith("onUpdate:")&&this.$attrs[t]instanceof Function&&(e[t]=this.$attrs[t]),e),{})}}},rL={class:"input-wrapper"},sL={key:0,class:"label-wrapper"},oL=["for"],aL={key:0},lL={class:"field-wrapper"};function cL(e,t,i,n,r,s){const c=Ae("input-errors"),u=Ae("input-hint");return ee(),ae("div",{class:Ue([[`${i.definition}-definition`,{required:i.attributes.required,"has-errors":s.hasErrors,inline:i.inline}],"field-type"]),"data-flai":""},[se("div",rL,[i.label?(ee(),ae("div",sL,[se("label",{for:s.getId},[He(be(i.label)+" ",1),i.attributes.required?(ee(),ae("span",aL,"*")):xe("",!0)],8,oL),ft(e.$slots,"label-icons")])):xe("",!0),se("div",lL,[(ee(),Se(Qc(s.getComponentName),ut({modelValue:s.getValue,"onUpdate:modelValue":t[0]||(t[0]=o=>s.getValue=o)},{...s.getDefinitionVBind,...s.listeners}),null,16,["modelValue"]))])]),s.hasErrors?(ee(),Se(c,{key:0,errors:i.errors},null,8,["errors"])):xe("",!0),i.hint?(ee(),Se(u,{key:1,hint:i.hint},null,8,["hint"])):xe("",!0)],2)}const uL=$e(nL,[["render",cL]]),hL="/assets/icons.e9709be1.svg",dL={name:"FlaiIcon",props:{name:{type:String,required:!0},size:{default:"base",type:String,validator:e=>["2xl","xl","lg","base","sm"].includes(e)},type:{type:String,default:"main",validator:e=>["main","white","gray","success","warning","error"].includes(e)}},computed:{getSize(){return{"2xl":"2rem",xl:"1.75rem",lg:"1.5rem",base:"1.25rem",sm:"1rem"}[this.size]||"1.25rem"},url(){return`${hL}#${this.name}`}}},fL=["width","height"],pL=["xlink:href"];function gL(e,t,i,n,r,s){return ee(),ae("svg",{width:s.getSize,height:s.getSize,class:Ue(`text-${i.type}`)},[se("use",{"xlink:href":s.url},null,8,pL)],10,fL)}const mL=$e(dL,[["render",gL]]);const vL={name:"Spinner",props:{size:{type:String,default:"base",validator:e=>["6xl","3xl","lg","base","sm","xs"].includes(e)},type:{type:String,default:"main",validator:e=>["main","white","success","warning","error"].includes(e)}},computed:{loaderStyle(){let e={"6xl":6.25,"3xl":2.5,lg:1.25,base:1,sm:.75,xs:.625}[this.size];e=`${e}rem`;let t={"6xl":12,"3xl":8,lg:6,base:4,sm:3,xs:3}[this.size];return t=`${t}px`,{border:`${t} solid var(--${this.type})`,width:e,height:e,"border-top":`${t} solid transparent`}}}},yL={class:"spinner"};function bL(e,t,i,n,r,s){return ee(),ae("div",yL,[se("div",{class:"loader",style:dt(s.loaderStyle)},null,4),ft(e.$slots,"default",{},void 0,!0)])}const _L=$e(vL,[["render",bL],["__scopeId","data-v-8da75d1f"]]),wL={name:"Notification",props:{modelValue:{type:Boolean,default:!1},icon:{type:String,default:null},type:{type:String,default:"info",validator:e=>["info","success","warning","error"].includes(e)},notification:{type:String,default:null},closable:{type:Boolean,default:!0},htmlContent:{type:String,default:null}},emits:["update:modelValue"],computed:{getIcon(){return this.icon||{success:"check_circle"}[this.type]||this.type}},methods:{close(){this.$emit("update:modelValue",!1)}}},SL={class:"flex-1"},AL=["innerHTML"];function CL(e,t,i,n,r,s){const c=Ae("flai-icon");return i.modelValue?(ee(),ae("div",{key:0,class:Ue([i.type,"notification items-center"])},[ve(c,{name:s.getIcon,size:"xl"},null,8,["name"]),se("span",SL,[i.htmlContent?(ee(),ae("div",{key:0,innerHTML:i.htmlContent},null,8,AL)):ft(e.$slots,"default",{key:1},()=>[He(be(i.notification),1)])]),i.closable?(ee(),Se(c,{key:0,name:"close",onClick:s.close},null,8,["onClick"])):xe("",!0)],2)):xe("",!0)}const xL=$e(wL,[["render",CL]]),TL={name:"Panel",props:{dark:{type:Boolean,default:!1},noPadding:{type:Boolean,default:!1},noMargin:{type:Boolean,default:!1},closable:{type:Boolean,default:!1},closed:{type:Boolean,default:!1},self:{type:String,default:"auto",validator:e=>["auto","start","center","end","stretch"].includes(e)},element:{type:String,default:"section"}},computed:{getClasses(){return[`self-${this.self}`,{dark:this.dark,"no-padding":this.noPadding,"no-margin":this.noMargin}]}}};function $L(e,t,i,n,r,s){return ee(),Se(Qc(i.element),{class:Ue([s.getClasses,"flai-panel"])},{default:De(()=>[ft(e.$slots,"default")]),_:3},8,["class"])}const ML=$e(TL,[["render",$L]]),Vu={props:{justify:{type:String,default:"start",validator:e=>["start","center","end","between","around"].includes(e)},content:{type:String,default:"start",validator:e=>["start","center","end","between","around"].includes(e)},flex:{type:String,default:"row",validator:e=>["row","row-reverse","col","col-reverse"].includes(e)},items:{type:String,default:"stretch",validator:e=>["stretch","start","end","center","baseline"].includes(e)},noBorder:{type:Boolean,default:!1}},data(){return{closed:!1}},computed:{justifyClass(){return`justify-${this.justify}`},contentClass(){return`content-${this.content}`},flexClass(){return`flex-${this.flex}`},itemsClass(){return`items-${this.items}`},allClasses(){return[this.justifyClass,this.contentClass,this.flexClass,this.itemsClass]},border(){return this.noBorder||this.closed?"":"border"}},methods:{minimize(){this.closed=!0},maximize(){this.closed=!1}}},EL={name:"PanelHeader",mixins:[Vu],computed:{closable(){return this.$parent.closable},iconClass(){return this.closed?"expand_more":"expand_less"}},mounted(){this.closable&&this.$parent.closed&&this.toggle()},methods:{toggle(){const e=this.closed?"maximize":"minimize";[...this.$parent.$children].filter(t=>["PanelContent","PanelFooter"].includes(t.$options.name)).forEach(t=>{t[e]()}),this[e]()}}};function kL(e,t,i,n,r,s){return ee(),ae("header",{class:Ue([[...e.allClasses,e.border,{"justify-between":s.closable}],"flai-panel-header"])},[ft(e.$slots,"default"),s.closable?(ee(),ae("i",{key:0,class:Ue(["ml-4",s.iconClass]),onClick:t[0]||(t[0]=Je((...c)=>s.toggle&&s.toggle(...c),["prevent"]))},null,2)):xe("",!0)],2)}const PL=$e(EL,[["render",kL]]),LL={name:"PanelContent",mixins:[Vu],props:{flex:{type:String,default:"col",validator:e=>["row","row-reverse","col","col-reverse"].includes(e)},noPadding:{type:Boolean,default:!1},overflow:{type:String,default:"",validator:e=>e?["auto","hidden","visible","scroll"].includes(e):!0},gap:{type:[String,Number],default:null}},computed:{overflowClass(){return this.overflow?`overflow-${this.overflow}`:""},gapClass(){var e;return(e=this.gap)!=null&&e?`gap-${this.gap}`:""}}};function RL(e,t,i,n,r,s){return St((ee(),ae("div",{class:Ue([[e.justifyClass,e.flexClass,e.contentClass,s.overflowClass,s.gapClass,{"no-padding":i.noPadding}],"flai-panel-content"])},[ft(e.$slots,"default")],2)),[[Ra,!e.closed]])}const IL=$e(LL,[["render",RL]]),OL={name:"PanelFooter",mixins:[Vu]};function NL(e,t,i,n,r,s){return St((ee(),ae("footer",{class:Ue([[...e.allClasses,e.border],"flai-panel-footer"])},[ft(e.$slots,"default")],2)),[[Ra,!e.closed]])}const DL=$e(OL,[["render",NL]]);class FL{constructor(){this.events={},this.key={A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,NUMPAD_0:96,NUMPAD_1:97,NUMPAD_2:98,NUMPAD_3:99,NUMPAD_4:100,NUMPAD_5:101,NUMPAD_6:102,NUMPAD_7:103,NUMPAD_8:104,NUMPAD_9:105,NUMPAD_MULTIPLY:106,NUMPAD_ADD:107,NUMPAD_ENTER:108,NUMPAD_SUBTRACT:109,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,F13:124,F14:125,F15:126,COLON:186,EQUALS:187,UNDERSCORE:189,QUESTION_MARK:191,TILDE:192,OPEN_BRACKET:219,BACKWARD_SLASH:220,CLOSED_BRACKET:221,QUOTES:222,LESS_THAN:188,GREATER_THAN:190,BACKSPACE:8,TAB:9,CLEAR:12,ENTER:13,SHIFT:16,CONTROL:17,ALT:18,CAPS_LOCK:20,ESC:27,SPACEBAR:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,INSERT:45,DELETE:46,HELP:47,NUM_LOCK:144};const t=this;this.keyFunction=i=>{this.keyPressed(i,t)},this.keyReleasedFunction=i=>{this.keyReleased(i,t)},this.keyFunctionFromElement=i=>{this.keyPressed(i,t,!0)},this.keyReleasedFunctionFromElement=i=>{this.keyReleased(i,t,!0)},document.addEventListener("keydown",i=>{this.keyFunction(i)}),document.addEventListener("keyup",i=>{this.keyReleasedFunction(i)})}add(t,i,n,r,s=!1){this.events[t]||(this.events[t]=[]);const c=rn();return this.events[t].push({id:c,function:i,removeWhenPressed:n,isKeyPressed:!1,element:r,preventOnInputs:s}),r&&(r.addEventListener("keydown",this.keyFunctionFromElement),r.addEventListener("keyup",this.keyReleasedFunctionFromElement)),{index:c,key:t}}remove({key:t,index:i}){const n=(this.events[t]||[]).findIndex(({id:s})=>i===s);if(n<0)return;const{element:r}=this.events[t][n];r&&(r.removeEventListener("keydown",this.keyFunction),r.addEventListener("keyup",this.keyReleasedFunction)),this.events[t].splice(n,1)}keyPressed(t,i,n=!1){var r,s;if(t.which&&i.events[t.which]){const{function:c,id:u,removeWhenPressed:o,element:h,preventOnInputs:a}=((s=(r=this.events)==null?void 0:r[t.which])==null?void 0:s[this.events[t.which].length-1])||{};if(h&&!n||!this.events[t.which][this.events[t.which].length-1]||document.activeElement.tagName.toLowerCase()==="input"&&a)return;t.preventDefault(),t.stopPropagation(),c&&typeof c=="function"&&c(),this.events[t.which][this.events[t.which].length-1].isKeyPressed=!0,o&&this.remove({key:t.which,index:u})}}keyReleased(t,i,n=!1){var r,s;if(t.which&&i.events[t.which]){const{element:c}=((s=(r=this.events)==null?void 0:r[t.which])==null?void 0:s[this.events[t.which].length-1])||{};if(c&&!n)return;t.preventDefault(),t.stopPropagation(),this.events[t.which][this.events[t.which].length-1]&&(this.events[t.which][this.events[t.which].length-1].isKeyPressed=!1)}}}const us=new FL,BL={data(){return{keyLoggersData:[]}},beforeUnmount(){this.__keyPressHandlerRemoveAll()},computed:{__key(){return us.key}},methods:{__keyPressHandlerAdd(e,t,i=!0,n=void 0,r=!1){const s=us.add(e,t,i,n,r);this.keyLoggersData.push(s)},__keyPressHandlerRemove(e){this.keyLoggersData.filter(({key:t})=>t===e).forEach(t=>{us.remove(t)})},__keyPressHandlerRemoveAll(){this.keyLoggersData.forEach(e=>{us.remove(e)}),this.keyLoggersData=[]},__keyPressed(){return Object.entries(us.events).reduce((e,[t,i])=>({...e,[t]:i.some(({isKeyPressed:n})=>n)}),{})}}};const VL={name:"Popover",mixins:[BL],provide(){return{positionPopover:this.positionPopover,closePopover:this.closePopover}},props:{uid:{type:String,default:""},title:{type:String,default:""},icon:{type:String,default:""},iconEnd:{type:Boolean,default:!1},hideCloseIcon:{type:Boolean,default:!1},hideArrow:{type:Boolean,default:!1},initials:{type:String,default:""},width:{type:Number,default:220},minRequiredHeight:{type:Number,default:100},minHeight:{type:Number,default:void 0},maxHeight:{type:Number,default:void 0},zIndex:{type:Number,default:void 0},position:{type:String,default:"right",validator:e=>["top","right","bottom","left","top-right","top-left","bottom-right","bottom-left","screen"].includes(e)},closable:{type:Boolean,default:!0}},data(){return{is_opened:!1,internal_position:"right",element_to_position_to:null,popover_position:{},arrow_styles:{top:0,left:0},close_styles:{top:0,left:0},alternative_positions:Object.freeze({top:["bottom","top-right","top-left","left","right","bottom-right","bottom-left","screen"],right:["left","top","bottom","screen"],bottom:["top","bottom-right","bottom-left","left","right","top-right","top-left","screen"],left:["right","top","bottom","screen"],"top-right":["top-left","bottom-right","right","bottom-left","left","bottom","screen"],"top-left":["top-right","bottom-left","left","bottom-right","right","bottom","screen"],"bottom-right":["bottom-left","top-right","right","top-left","left","top","screen"],"bottom-left":["bottom-right","top-left","left","top-right","right","top","screen"]})}},computed:{getMinRequiredHeight(){return this.minHeight&&this.minHeight>this.minRequiredHeight?this.minHeight:this.minRequiredHeight},getStyle(){const e=this.internal_position==="screen"?{zIndex:this.zIndex,...this.popover_position}:{width:this.width,minHeight:this.minHeight,maxHeight:this.maxHeight,zIndex:this.zIndex,...this.popover_position};return Object.entries(e).filter(([,t])=>(t!=null?t:!1)!==!1).reduce((t,[i,n])=>({...t,[i]:["zIndex"].includes(i)?n:`${n}px`}),{})}},methods:{togglePopover(e){this.is_opened?this.closePopover():this.openPopover(e)},openPopover({target:e}={}){this.internal_position=this.position,this.popover_position={},this.element_to_position_to=e||this.$refs.button,this.is_opened=!0,this.closable&&this.__keyPressHandlerAdd(this.__key.ESC,this.closePopover,!0)},closePopover(){this.is_opened=!1,this.element_to_position_to=null},buttonPosition(){const e=this.element_to_position_to.getBoundingClientRect(),t=10;return e.width+100>window.screen.width||e.height+200>window.screen.height?{x:e.left+t,y:e.top+t}:{top:{x:e.left+e.width/2,y:e.top-t},"top-right":{x:e.right+t,y:e.bottom},"top-left":{x:e.left-t,y:e.bottom},right:{x:e.right+t,y:e.top+e.height/2},bottom:{x:e.left+e.width/2,y:e.bottom+t},"bottom-right":{x:e.right+t,y:e.top},"bottom-left":{x:e.left-t,y:e.top},left:{x:e.left-t,y:e.top+e.height/2},screen:{x:0,y:0}}[this.internal_position]},positionPopover(){delete this.popover_position.bottom,this.$nextTick(()=>{const e=this.$refs.portal.getBoundingClientRect(),t={x:e.width/2,y:e.height/2},i=this.internal_position.split("-").map(iv).join(""),n=this.buttonPosition(),r=this[`position${i}`](n,t,e);this.maxHeight&&e.height>=this.maxHeight&&(r.height=this.maxHeight),this.popover_position=r,this.positionArrow(n)})},positionArrow(e){if(this.internal_position==="screen"){this.arrow_styles={};return}this.arrow_styles={top:`${e.y}px`,left:`${e.x}px`,zIndex:this.zIndex+1}},positionTop(e,t,{height:i}){const n=this.getPositivePosition(e.y-i),r=n+i,s={left:this.getPositivePosition(e.x-t.x),top:n};if(r>e.y){if(!this.elementFits(n+e.y))return this.reposition();s.bottom=window.innerHeight-e.y}return s},positionBottom(e,t,{height:i}){const n=e.y,r={left:this.getPositivePosition(e.x-t.x)||this.getPositivePosition(t.x-e.x),top:n};if(n+i>window.innerHeight){if(!this.elementFits(window.innerHeight-n))return this.reposition();r.bottom=0}return r},positionRight(e,t,{width:i,height:n}){if(e.x+i>window.innerWidth)return this.reposition();const r=this.getPositivePosition(e.y-t.y);return{left:e.x,top:r,bottom:window.innerHeight<=r+n?0:void 0}},positionLeft(e,t,{width:i,height:n}){if(e.x-i<0)return this.reposition();const r=this.getPositivePosition(e.y-t.y);return{left:this.getPositivePosition(e.x-i),top:r,bottom:window.innerHeight<=r+n?0:void 0}},positionTopRight(e,t,{height:i,width:n}){if(e.x+n>window.innerWidth)return this.reposition();const r=this.getPositivePosition(e.y-i),s=r+i,c={left:e.x,top:r};if(s>e.y){if(!this.elementFits(r+e.y))return this.reposition();c.bottom=window.innerHeight-e.y}return c},positionTopLeft(e,t,{height:i,width:n}){if(e.x-n<0)return this.reposition();const r=this.getPositivePosition(e.y-i),s=r+i,c={left:this.getPositivePosition(e.x-n),top:r};if(s>e.y){if(!this.elementFits(r+e.y))return this.reposition();c.bottom=window.innerHeight-e.y}return c},positionBottomRight(e,t,{height:i,width:n}){if(e.x+n>window.innerWidth)return this.reposition();const r={left:e.x,top:e.y};if(window.innerHeight<=e.y+i){if(!this.elementFits(window.innerHeight-r.top))return this.reposition();r.bottom=0}return r},positionBottomLeft(e,t,{height:i,width:n}){if(e.x-n<0)return this.reposition();const r={left:this.getPositivePosition(e.x-n),top:e.y};if(window.innerHeight<=e.y+i){if(!this.elementFits(window.innerHeight-r.top))return this.reposition();r.bottom=0}return r},positionScreen(){return{top:0,left:0,right:0,bottom:0}},reposition(){this.$debug&&this.internal_position==="screen"&&console.warn("Trying to reposition screen position.");const e=this.alternative_positions[this.position],t=e.indexOf(this.internal_position);return this.internal_position=e[t+1]||"screen",this.positionPopover(),{}},elementFits(e){return e>=this.getMinRequiredHeight},getPositivePosition(e){return e<0?0:e}}},zL={class:"flai-popover-wrapper"},HL={key:2,class:"thumb","data-test":"user_menu"},UL=["data-position"],WL={class:"flai-popover-content-wrapper"},jL={key:0,class:"flai-popover-close"},GL={class:"flai-popover-content"};function qL(e,t,i,n,r,s){const c=Ae("flai-icon"),u=Ae("flai-resize-observer"),o=Gp("click-outside");return ee(),ae("div",zL,[ft(e.$slots,"button",Bl(ia({openPopover:s.openPopover,closePopover:s.closePopover,togglePopover:s.togglePopover,isOpened:r.is_opened})),()=>[se("span",{ref:"button",class:Ue([{"flex-row-reverse":i.iconEnd,"btn link p-0":i.icon},"flai-popover-btn"]),onClick:t[0]||(t[0]=Je(h=>s.togglePopover(),["prevent"]))},[i.icon?(ee(),Se(c,{key:0,name:i.icon},null,8,["name"])):xe("",!0),i.title?(ee(),ae(Oe,{key:1},[He(be(i.title),1)],64)):xe("",!0),i.initials?(ee(),ae("div",HL,be(i.initials),1)):xe("",!0)],2)],!0),r.is_opened?(ee(),Se(or,{key:0,to:"#root-portal","ignore-parent-node":""},[i.hideArrow?xe("",!0):(ee(),ae("span",{key:0,style:dt(r.arrow_styles),class:Ue([r.internal_position,"flai-popover-arrow"])},null,6)),St((ee(),ae("div",{ref:"portal",style:dt(s.getStyle),"data-position":r.internal_position,class:Ue([r.internal_position,"flai-popover"])},[se("div",WL,[i.hideCloseIcon?xe("",!0):(ee(),ae("div",jL,[ve(c,{name:"close",onClick:s.closePopover},null,8,["onClick"])])),se("div",GL,[ve(u,{onResize:s.positionPopover},null,8,["onResize"]),ft(e.$slots,"default",Bl(ia({closePopover:s.closePopover,positionPopover:s.positionPopover})),void 0,!0)])])],14,UL)),[[o,s.closePopover]])])):xe("",!0)])}const KL=$e(VL,[["render",qL],["__scopeId","data-v-cea9620f"]]),YL={name:"SortableAddChildListGroup",inject:["sortableId"],props:{itemIndex:{type:Number,required:!0},parentIndexes:{type:Array,default:()=>[]}},methods:{handleDrop(e){try{const t=JSON.parse(e.dataTransfer.getData("text-plain"));this.$store.dispatch("Sortable/createChildListGroup",{sortableId:this.sortableId,itemIndex:this.itemIndex,parentIndexes:this.parentIndexes,draggedItem:t})}catch{this.$store.dispatch("Sortable/cleanDraggingState")}}}};function XL(e,t,i,n,r,s){const c=Ae("flai-icon");return ee(),ae("div",{class:"sortable-add-child-list-group",onDrop:t[0]||(t[0]=Je((...u)=>s.handleDrop&&s.handleDrop(...u),["stop","prevent"]))},[ve(c,{name:"add"})],32)}const QL=$e(YL,[["render",XL]]),JL={name:"SortableItem",components:{SortableAddChildListGroup:QL},inject:["sortableId"],props:{itemIndex:{type:Number,required:!0},parentIndexes:{type:Array,default:()=>[]}},computed:{isDraggable(){var e;return(e=this.sortableItem.draggable)!=null?e:!0},entered:{get(){return this.$store.state.Sortable.entered},set(e){this.$store.commit("Sortable/setEntered",e)}},isDroppable(){return this.$store.getters["Sortable/isItemDroppable"](this.sortableId,this.parentIndexes,this.itemIndex)},isBeingDragged(){const{dragging:e}=this.$store.state.Sortable;return e&&e.item_index===this.itemIndex&&e.parent_indexes.join("")===this.parentIndexes.join("")},getComponent(){const e=this.sortableItem.component||this.$store.getters["Sortable/getSortable"](this.sortableId).component;return this.$debug&&!e&&console.warn('[SortableItem] component not defined. Falling back to "div"'),e||"div"},sortableItem(){return this.$store.getters["Sortable/getSortableListItem"](this.sortableId,this.parentIndexes,this.itemIndex)},getClasses(){return{"not-draggable":!this.isDraggable,"not-droppable":!this.isDroppable,"dragging-over":this.isBeingDraggedOver(),dragging:this.isBeingDragged}},draggingPayload(){return{sortable_id:this.sortableId,item_index:this.itemIndex,parent_indexes:[...this.parentIndexes]}},events(){const e={dragover:this.onDragover,dragenter:this.onDragenter,drop:this.onDrop};return this.isDroppable&&(e.dragleave=this.onDragleave),this.isDraggable&&(e.drag=this.onDrag,e.dragstart=this.onDragstart),e}},methods:{isBeingDraggedOver(){return this.$el&&this.entered.some(e=>this.$el.contains(e))},showAddChild(){return this.sortableItem.allow_nesting&&!(this.sortableItem.list||[]).length&&!this.isBeingDragged&&this.isBeingDraggedOver()},displayPlaceholder:T$((e,t)=>{const{pageY:i,pageX:n}=t,{bottom:r,height:s,left:c,right:u,top:o,width:h,x:a,y:l}=e.$el.getBoundingClientRect(),f=o+s/2;e.$store.commit("Sortable/setCoordinates",{pageY:i,pageX:n,middleY:f,bottom:r,height:s,left:c,right:u,top:o,width:h,x:a,y:l})},100),onDrag(e){e.preventDefault(),e.stopPropagation()},onDragenter(e){e.preventDefault(),e.stopPropagation(),this.isDroppable&&this.entered.push(e.target)},onDragleave(e){e.preventDefault(),e.stopPropagation(),this.entered=this.entered.filter(t=>t!==e.target)},onDragover(e){e.preventDefault(),e.stopPropagation(),this.isDroppable&&!this.isBeingDragged&&this.displayPlaceholder(this,e)},onDragstart(e){e.stopPropagation(),this.$store.commit("Sortable/setDragging",this.draggingPayload),e.dataTransfer.setData("text-plain",JSON.stringify(this.draggingPayload))},onDrop(e){if(e.preventDefault(),e.stopPropagation(),this.isBeingDragged||!this.isDroppable){this.$store.dispatch("Sortable/cleanDraggingState");return}try{const t=JSON.parse(e.dataTransfer.getData("text-plain"));this.$store.dispatch("Sortable/reorderItems",{draggedItem:t,droppedOnItem:this.draggingPayload})}catch(t){this.$store.dispatch("Sortable/cleanDraggingState"),this.$errorTracker.captureException(t)}}}},ZL=["draggable"];function eR(e,t,i,n,r,s){const c=Ae("sortable-add-child-list-group");return ee(),ae("div",ut({draggable:s.isDraggable,class:[s.getClasses,"sortable-item"]},mi(s.events,!0)),[(ee(),Se(Qc(s.getComponent),Bl(ia(s.sortableItem.props)),null,16)),ft(e.$slots,"default"),s.showAddChild()?(ee(),Se(c,{key:0,"item-index":i.itemIndex,"parent-indexes":[...i.parentIndexes]},null,8,["item-index","parent-indexes"])):xe("",!0)],16,ZL)}const tR=$e(JL,[["render",eR]]),iR={name:"SortableList",components:{SortableItem:tR},inject:["sortableId"],props:{parentIndexes:{type:Array,default:()=>[]}},computed:{sortableListGroup(){return this.$store.getters["Sortable/getSortableListGroup"](this.sortableId,this.parentIndexes)}}},nR={key:0,class:"sortable-list"};function rR(e,t,i,n,r,s){const c=Ae("sortable-list",!0),u=Ae("sortable-item");return s.sortableListGroup?(ee(),ae("div",nR,[(ee(!0),ae(Oe,null,lr(s.sortableListGroup.list,(o,h)=>(ee(),Se(u,{key:[...i.parentIndexes,h].join("_"),"parent-indexes":i.parentIndexes,"item-index":h},{default:De(()=>[(o.list||[]).length?(ee(),Se(c,{key:0,"parent-indexes":[...i.parentIndexes,h]},null,8,["parent-indexes"])):xe("",!0)]),_:2},1032,["parent-indexes","item-index"]))),128))])):xe("",!0)}const sR=$e(iR,[["render",rR]]),oR={name:"SortableIcon",inject:["sortableId"],computed:{coordinates(){return this.$store.state.Sortable.coordinates},canDisplay(){return!!Object.keys(this.coordinates||{}).length},getPosition(){const{clientWidth:e,clientHeight:t}=document.body,i={right:`${e-this.coordinates.x}px`};return this.coordinates.pageY<=this.coordinates.middleY?i.top=`${this.coordinates.y}px`:i.bottom=`${t-this.coordinates.bottom}px`,i}}};function aR(e,t,i,n,r,s){const c=Ae("flai-icon");return s.canDisplay?(ee(),Se(or,{key:0,to:"#root-portal","ignore-parent-node":""},[ve(c,{style:dt(s.getPosition),name:"arrow_right",class:"sortable-icon"},null,8,["style"])])):xe("",!0)}const lR=$e(oR,[["render",aR]]),cR={name:"Sortable",components:{SortableList:sR,SortableIcon:lR},provide(){return{sortableId:this.sortableId}},props:{sortableId:{type:String,required:!0},sortable:{type:Object,default:()=>({})}},computed:{getSortable(){return this.$store.getters["Sortable/getSortable"](this.sortableId)},isEmpty(){return this.getSortable&&!this.getSortable.list.length}},created(){this.getSortable||this.$store.commit("Sortable/addSortable",{sortableId:this.sortableId,sortable:this.sortable})},beforeUnmount(){this.$store.commit("Sortable/removeSortable",this.sortableId)}},uR={class:"sortable-wrapper"};function hR(e,t,i,n,r,s){const c=Ae("sortable-list"),u=Ae("sortable-icon");return ee(),ae("div",uR,[ve(c),ve(u)])}const dR=$e(cR,[["render",hR]]),fR={name:"Tooltip",provide(){return{closeTooltip:this.closeTooltip}},props:{icon:{type:String,default:""},title:{type:String,default:""},content:{type:String,default:""},width:{type:Number,default:void 0},position:{type:String,default:"top",validator:e=>["top","right","bottom","left"].includes(e)},delayDisplayFor:{type:Number,default:0}},data(){return{is_opened:!1,internal_position:"right",tooltip_position:{},arrow_styles:{top:0,left:0},alternative_positions:Object.freeze({top:["bottom","left","right"],right:["left","top","bottom"],bottom:["top","left","right"],left:["right","top","bottom"]}),timeout:null}},computed:{getStyle(){const e={...this.tooltip_position};return this.width&&(e.width=this.width),Object.entries(e).filter(([,t])=>(t!=null?t:!1)!==!1).reduce((t,[i,n])=>({...t,[i]:`${n}px`}),{})}},mounted(){this.$debug&&!this.icon&&!this.title&&!(this.$slots.title||[]).length&&console.warn("[Tooltip] provide icon or title prop.")},methods:{openTooltip(){this.timeout=setTimeout(()=>{this.internal_position=this.position,this.tooltip_position={},this.is_opened=!0,this.positionTooltip(),clearTimeout(this.timeout)},this.delayDisplayFor)},closeTooltip(){this.tooltip_position={},this.is_opened=!1,this.timeout&&clearTimeout(this.timeout)},titlePosition(){const e=this.$el.getBoundingClientRect(),t=10;return{top:{x:e.left+e.width/2,y:e.top-t},right:{x:e.right+t,y:e.top+e.height/2},bottom:{x:e.left+e.width/2,y:e.bottom+t},left:{x:e.left-t,y:e.top+e.height/2}}[this.internal_position]},positionTooltip(){delete this.tooltip_position.bottom,this.$nextTick(()=>{const e=this.$refs.portal.getBoundingClientRect(),t={x:e.width/2,y:e.height/2},i=iv(this.internal_position),n=this.titlePosition(),r=this[`position${i}`](n,t,e);this.tooltip_position=r,this.positionArrow(n)})},positionArrow(e){this.arrow_styles={top:`${e.y}px`,left:`${e.x}px`}},positionTop(e,t,{height:i}){const n=this.getPositivePosition(e.y-i);return n+i>e.y?this.reposition():{left:this.getPositivePosition(e.x-t.x),top:n}},positionBottom(e,t,{height:i}){const n=e.y;return n+i>window.innerHeight?this.reposition():{left:this.getPositivePosition(e.x-t.x),top:n}},positionRight(e,t,{width:i,height:n}){if(e.x+i>window.innerWidth)return this.reposition();const r=this.getPositivePosition(e.y-t.y);return{left:e.x,top:r,bottom:window.innerHeight<=r+n?0:void 0}},positionLeft(e,t,{width:i,height:n}){if(e.x-i<0)return this.reposition();const r=this.getPositivePosition(e.y-t.y);return{left:this.getPositivePosition(e.x-i),top:r,bottom:window.innerHeight<=r+n?0:void 0}},reposition(){const e=this.alternative_positions[this.position],t=e.indexOf(this.internal_position);return this.internal_position=e[t+1]||e[0],this.positionTooltip(),{}},getPositivePosition(e){return e<0?0:e}}},pR=["data-position"],gR={class:"flai-tooltip-content"};function mR(e,t,i,n,r,s){const c=Ae("flai-icon"),u=Gp("click-outside");return ee(),ae("span",{class:"flai-tooltip-title",onMouseenter:t[0]||(t[0]=(...o)=>s.openTooltip&&s.openTooltip(...o)),onMouseleave:t[1]||(t[1]=(...o)=>s.closeTooltip&&s.closeTooltip(...o))},[i.icon?(ee(),Se(c,{key:0,name:i.icon,class:Ue({"mr-1":i.title})},null,8,["name","class"])):xe("",!0),i.title?(ee(),ae(Oe,{key:1},[He(be(i.title),1)],64)):xe("",!0),ft(e.$slots,"title"),r.is_opened?(ee(),Se(or,{key:2,to:"#root-portal","ignore-parent-node":""},[se("span",{style:dt(r.arrow_styles),class:Ue([r.internal_position,"flai-tooltip-arrow"])},null,6),St((ee(),ae("div",{ref:"portal",style:dt(s.getStyle),"data-position":r.internal_position,class:Ue([r.internal_position,"flai-tooltip"])},[se("div",gR,[ft(e.$slots,"default",{},()=>[He(be(i.content),1)])])],14,pR)),[[u,s.closeTooltip]])])):xe("",!0)],32)}const vR=$e(fR,[["render",mR]]),yR={name:"ResizeObserver",emits:["resize"],data(){return{observer:null}},mounted(){this.$nextTick(()=>{this.observer=new ResizeObserver(([e])=>{this.$emit("resize",{width:e.contentRect.width,height:e.contentRect.height})}),this.observer.observe(this.$el)})},beforeUnmount(){this.observer.disconnect()}},bR={class:"resize-observer"};function _R(e,t,i,n,r,s){return ee(),ae("div",bR)}const wR=$e(yR,[["render",_R]]);const SR={data(){return{expanded:!1,slotItems:0}},computed:{style(){return this.expanded?`width: ${(this.slotItems+1)*34}px`:""}},mounted(){this.slotItems=this.$refs["button-wrapper"].children.length}},AR={ref:"button-wrapper",class:"d-flex"};function CR(e,t,i,n,r,s){const c=Ae("flai-icon");return ee(),ae("div",{class:Ue([{expanded:r.expanded},"more-vertical"]),style:dt(s.style),onMouseleave:t[1]||(t[1]=u=>r.expanded=!1)},[St(se("div",AR,[ft(e.$slots,"default",{},void 0,!0)],512),[[Ra,r.expanded]]),se("button",{class:"btn link sm show-more gray",onMouseover:t[0]||(t[0]=u=>r.expanded=!0)},[ve(c,{name:"more_vert"})],32)],38)}const xR=$e(SR,[["render",CR],["__scopeId","data-v-ddac02f2"]]);const TR={name:"Details",props:{title:{type:String,required:!0},startOpen:{type:Boolean,default:!1},forceOpen:{type:Boolean,default:!1},hideSummary:{type:Boolean,default:!1}},data(){return{open:this.startOpen,animation:null,isClosing:null,isExpanding:null,preForceState:null,forceOpenState:this.forceOpen}},watch:{forceOpen(e){e?(this.preForceState=this.$refs.details.open,this.open=!0):this.open=this.preForceState}},methods:{toggle(){this.$refs.details.style.overflow="hidden",this.isClosing||!this.open?this.expand():this.shrink()},expand(){this.$refs.details.style.height=`${this.$refs.details.offsetHeight}px`,this.open=!0,window.requestAnimationFrame(()=>{this.isExpanding=!0;const e=`${this.$refs.details.offsetHeight}px`,t=`${this.$refs.summary.offsetHeight+this.$refs.content.offsetHeight}px`;this.animation&&this.animation.cancel(),this.animation=this.$refs.details.animate({height:[e,t]},{duration:400,easing:"ease-out"}),this.animation.onfinish=()=>this.resetState(!0),this.animation.oncancel=()=>{this.isExpanding=!0}})},shrink(){this.isClosing=!0;const e=`${this.$refs.details.offsetHeight}px`,t=`${this.$refs.summary.offsetHeight}px`;this.animation&&this.animation.cancel(),this.animation=this.$refs.details.animate({height:[e,t]},{duration:400,easing:"ease-out"}),this.animation.onfinish=()=>this.resetState(!1),this.animation.oncancel=()=>{this.isClosing=!1}},resetState(e){this.open=e,this.animation=null,this.isClosing=!1,this.isExpanding=!1,this.$refs.details.style.height="",this.$refs.details.style.overflow=""}}},$R=["open"],MR={class:"m-0"},ER={ref:"content",class:"content"};function kR(e,t,i,n,r,s){return ee(),ae("details",{ref:"details",open:r.open},[se("summary",{ref:"summary",class:Ue([{hidden:i.hideSummary},"rounded"]),onClick:t[0]||(t[0]=Je((...c)=>s.toggle&&s.toggle(...c),["prevent"]))},[ft(e.$slots,"title",{},()=>[se("h3",MR,be(i.title),1)],!0)],2),se("div",ER,[ft(e.$slots,"default",{},void 0,!0)],512)],8,$R)}const PR=$e(TR,[["render",kR],["__scopeId","data-v-a07232ac"]]),LR={name:"ProgressBar",props:{progress:{type:[Number,Array],required:!0},showLabel:{type:Boolean,default:!0},label:{type:String,default:null},title:{type:String,default:""},height:{type:Number,default:null}},computed:{hasCustomColors(){return Array.isArray(this.progress)},progressStyle(){return{width:`${this.progress}%`,height:this.height?`${this.height}px`:""}},labelText(){return this.label?this.label:`${this.progress}%`}},methods:{getProgressItemStyle(e){return{backgroundColor:e.color,width:`${e.percentage}%`,height:this.height?`${this.height}px`:""}}}},RR={class:"progress-bar"},IR=["title"],OR={key:0,class:"progress-bar-label"},NR={key:0,class:"progress-bar-label"},DR=["title"];function FR(e,t,i,n,r,s){return ee(),ae("div",RR,[s.hasCustomColors?(ee(!0),ae(Oe,{key:0},lr(i.progress,c=>(ee(),ae("div",{key:c.color,class:"progress-bar-fill",style:dt(s.getProgressItemStyle(c)),title:c.title},[c.label?(ee(),ae("span",OR,be(c.label),1)):xe("",!0)],12,IR))),128)):(ee(),ae(Oe,{key:1},[i.showLabel?(ee(),ae("span",NR,be(s.labelText),1)):xe("",!0),se("div",{class:"progress-bar-fill",style:dt(s.progressStyle),title:i.title},null,12,DR)],64))])}const BR=$e(LR,[["render",FR]]);const VR={name:"Breadcrumbs",props:{breadcrumbs:{type:Array,required:!0}}},zR={class:"d-flex mb-4"},HR={key:0,class:"mx-1 text-gray"};function UR(e,t,i,n,r,s){const c=Ae("router-link");return ee(),ae("div",zR,[(ee(!0),ae(Oe,null,lr(i.breadcrumbs,(u,o)=>(ee(),ae("div",{key:u.text,class:"d-flex items-center"},[ve(c,{to:u.to},{default:De(()=>[He(be(u.text),1)]),_:2},1032,["to"]),o!==i.breadcrumbs.length-1?(ee(),ae("span",HR," > ")):xe("",!0)]))),128))])}const WR=$e(VR,[["render",UR],["__scopeId","data-v-a2b4b7b1"]]),jR={name:"CopyButton",props:{tooltip:{type:String,required:!0},dataToCopy:{type:String,required:!0}},data(){return{copySuccessful:!1}},methods:{copy(){navigator.clipboard.writeText(this.dataToCopy),this.copySuccessful=!0,setTimeout(()=>{this.copySuccessful=!1},1e3)}}},GR=["disabled"];function qR(e,t,i,n,r,s){const c=Ae("flai-icon"),u=Ae("flai-tooltip");return ee(),Se(u,{content:i.tooltip,"delay-display-for":500},{title:De(()=>[se("button",{class:"btn sm secondary",disabled:r.copySuccessful,onClick:t[0]||(t[0]=Je((...o)=>s.copy&&s.copy(...o),["stop","prevent"]))},[r.copySuccessful?(ee(),Se(c,{key:0,name:"check_circle"})):(ee(),Se(c,{key:1,name:"file_copy"}))],8,GR)]),_:1},8,["content"])}const KR=$e(jR,[["render",qR]]),YR="/assets/FLAI-robot.7f6ad07c.png";const XR={name:"404Page",props:{status:{type:String,default:"404"},title:{type:String,default:""},message:{type:String,default:""},addMargin:{type:Boolean,default:!1}}},QR={key:0},JR={key:1},ZR={key:0},eI={key:1},tI={class:"d-flex flex-col items-center"},iI={class:"bubble d-flex justify-center items-center"};function nI(e,t,i,n,r,s){const c=Ae("router-link");return ee(),ae("div",{class:Ue(["d-flex flex-col ml-5",{"m-5":i.addMargin}])},[ft(e.$slots,"title",{},()=>[i.title?(ee(),ae("h1",QR,be(i.title),1)):(ee(),ae("h1",JR,be(e.$t("Page does not exist")),1))],!0),ft(e.$slots,"message",{},()=>[i.message?(ee(),ae("div",ZR,be(i.message),1)):(ee(),ae("div",eI,[ve(c,{to:{name:"pages",params:{tool:"pages:dashboard"}}},{default:De(()=>[He(be(e.$t("Return to dashboard")),1)]),_:1})]))],!0),se("div",tI,[se("div",null,[se("div",iI," Oh no, "+be(i.status)+"! ",1),t[0]||(t[0]=se("div",{class:"pointer"},null,-1))]),t[1]||(t[1]=se("img",{class:"robot",src:YR,alt:"Flai robot"},null,-1))])],2)}const ey=$e(XR,[["render",nI],["__scopeId","data-v-684bfa52"]]),rI=Object.freeze(Object.defineProperty({__proto__:null,default:ey},Symbol.toStringTag,{value:"Module"})),sI=e=>{e.component("FlaiFieldType",uL),e.component("FlaiIcon",mL),e.component("FlaiSpinner",_L),e.component("FlaiNotification",xL),e.component("FlaiPanel",ML),e.component("FlaiPanelHeader",PL),e.component("FlaiPanelContent",IL),e.component("FlaiPanelFooter",DL),e.component("FlaiPopover",KL),e.component("FlaiTooltip",vR),e.component("FlaiSortable",dR),e.component("FlaiResizeObserver",wR),e.component("FlaiExpandableVertButtons",xR),e.component("FlaiDetails",PR),e.component("FlaiProgressBar",BR),e.component("FlaiNotFoundPage",ey),e.component("FlaiBreadcrumbs",WR),e.component("FlaiCopyButton",KR)},oI={beforeMount(e,t){let i=!1;e.onclick=n=>{n.stopImmediatePropagation(),i?i=!i:(i=!i,setTimeout(()=>{requestAnimationFrame(()=>{e.click(n,!0)})},0))},e.event=n=>{document.querySelector(".flatpickr-calendar.open")||document.querySelector(".flai-modal")||n.target.classList.contains("modal-button")||e!==n.target&&!e.contains(n.target)&&t.value(n)},setTimeout(()=>{document.body.addEventListener("click",e.event),document.body.addEventListener("drag",e.event)},0)},unmounted(e){document.body.removeEventListener("click",e.event),document.body.removeEventListener("drag",e.event)}},aI=e=>{e.directive("click-outside",oI)};const lI={name:"ToastNotifications",computed:{notifications(){return this.$store.getters["Notifications/getToastNotifications"]}}},cI={class:"d-flex flex-col flex-1 fixed toast-container"};function uI(e,t,i,n,r,s){const c=Ae("flai-notification");return ee(),ae("div",cI,[(ee(!0),ae(Oe,null,lr(s.notifications,u=>(ee(),Se(c,{key:u.id,"model-value":!0,notification:u.msg,class:"m-1 shadow","html-content":u.content,type:u.type,onMouseenter:o=>e.$store.dispatch("Notifications/stopToastNotificationTimeout",u),onMouseleave:o=>e.$store.dispatch("Notifications/startToastNotificationTimeout",u),"onUpdate:modelValue":o=>e.$store.dispatch("Notifications/removeToastNotification",u)},null,8,["notification","html-content","type","onMouseenter","onMouseleave","onUpdate:modelValue"]))),128))])}const hI=$e(lI,[["render",uI],["__scopeId","data-v-24aafc60"]]);const dI={name:"Modal",props:{id:{type:String,required:!0},spinnerOnly:{type:Boolean,default:!1},title:{type:String,default:""},message:{type:String,default:""},content:{type:String,default:""},confirmButton:{type:Object,default:()=>({})},cancelButton:{type:Object,default:()=>({})},customClass:{type:String,default:null},allowEnterConfirm:{type:Boolean,default:!1},closable:{type:Boolean,default:!0},handleClick:{type:Function,default:null},width:{type:String,default:null},height:{type:String,default:null},top:{type:String,default:null},dispatchClose:{type:Boolean,default:!0},showSpinner:{type:Boolean,default:!1}},emits:["close"],computed:{style(){let e="";return this.width&&(e+=`width: ${this.width};`),this.height&&(e+=`height: ${this.height};`),this.top&&(e+=`top: ${this.top};`),e}},mounted(){this.$refs.modal.focus()},methods:{close(){var e;!this.closable||((e=this.cancelButton)!=null&&e.onClick&&this.cancelButton.onClick(),this.dispatchClose&&this.$store.dispatch("Modals/closeModal",this.id),this.$emit("close"))},confirm(){this.confirmButton.onClick&&this.confirmButton.onClick(),this.dispatchClose&&this.$store.dispatch("Modals/closeModal",this.id),this.$emit("close")},confirmWithEnter(){this.allowEnterConfirm&&this.confirm()}}},fI=["id"],pI={class:"d-flex p-4"},gI={class:"flex-1 m-0"},mI={class:"flai-modal-content-content d-flex p-4"},vI=["innerHTML"],yI={key:1,class:"flex-1"},bI={class:"d-flex justify-end p-3"};function _I(e,t,i,n,r,s){const c=Ae("flai-spinner"),u=Ae("flai-icon");return ee(),Se(or,{to:"#root-portal"},[se("div",{id:i.id,ref:"modal",class:Ue([i.customClass,"flai-modal"]),tabindex:"-1",onKeydown:[t[2]||(t[2]=Cn((...o)=>s.close&&s.close(...o),["esc"])),t[3]||(t[3]=Cn((...o)=>s.confirmWithEnter&&s.confirmWithEnter(...o),["enter"]))],onClick:t[4]||(t[4]=(...o)=>i.handleClick&&i.handleClick(...o))},[i.spinnerOnly?(ee(),Se(c,{key:0,size:"6xl",class:"spinner"})):(ee(),ae("div",{key:1,class:"flai-modal-content",style:dt(s.style)},[ft(e.$slots,"header",{},()=>[se("div",pI,[se("h1",gI,be(i.title),1),i.closable?(ee(),Se(u,{key:0,class:"close-icon modal-button",name:"close",onClick:s.close},null,8,["onClick"])):xe("",!0)]),t[5]||(t[5]=se("hr",{class:"m-0"},null,-1))],!0),ft(e.$slots,"content",{},()=>[i.showSpinner?(ee(),Se(c,{key:0,size:"3xl",class:"spinner m-4"})):xe("",!0),se("div",mI,[i.content?(ee(),ae("div",{key:0,class:"flex-1",innerHTML:i.content},null,8,vI)):(ee(),ae("div",yI,be(i.message),1))]),t[6]||(t[6]=se("hr",{class:"m-0"},null,-1))],!0),ft(e.$slots,"footer",{},()=>[se("div",bI,[i.cancelButton&&i.closable?(ee(),ae("button",{key:0,class:"btn secondary m-1 modal-button","data-test":"cancel-button",onClick:t[0]||(t[0]=(...o)=>s.close&&s.close(...o))},be(i.cancelButton.text||e.$t("Cancel")),1)):xe("",!0),i.confirmButton?(ee(),ae("button",{key:1,class:Ue([{delete:i.confirmButton.type==="delete"},"btn m-1 modal-button"]),"data-test":"confirm-button",onClick:t[1]||(t[1]=(...o)=>s.confirm&&s.confirm(...o))},be(i.confirmButton.text||e.$t("Confirm")),3)):xe("",!0)])],!0)],4))],42,fI)])}const ty=$e(dI,[["render",_I],["__scopeId","data-v-3dec2b59"]]),iy="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAYAAACpF6WWAAAACXBIWXMAAAsSAAALEgHS3X78AAAAVElEQVQ4jWP8//8/A7UBC8i8z4HKBE3mXX+XsWE3I0F1Da7/GZmo7kwGBoZRQ0cNpTKgXY5iXPqBoMn/owUYGXYRzlEMbqM5atTQoWEo9XMUAwMDAGSOGCOVddy/AAAAAElFTkSuQmCC",wI={name:"LoginForm",props:{loginInfo:{type:String,default:""}},emits:["login-successful","login-failed","go-to-register","go-to-password-reset","finish-registration"],data(){return{credentials:{username:"",password:""},logging_in:!1,logging_sso:!1,login_error:""}},methods:{async loginWithGoogle(){this.logging_sso=!0;const{target_url:e}=await this.$store.dispatch("Auth/getSsoProviderRedirect",{provider:"google",params:this.$route.query}),t=window.open(e,"_blank");window.addEventListener("message",async i=>{if(i.source===t){const n=JSON.parse(i.data);n.type==="login"&&this.$store.dispatch("Auth/loginSso",{...n.credentials}).then(()=>this.$emit("login-successful")).catch(()=>this.$emit("login-failed")),n.type==="register"&&this.$emit("finish-registration",n.credentials)}})},async loginWithMs(){this.logging_sso=!0;const{target_url:e}=await this.$store.dispatch("Auth/getSsoProviderRedirect",{provider:"microsoft",params:this.$route.query}),t=window.open(e,"_blank");window.addEventListener("message",async i=>{if(i.source===t){const n=JSON.parse(i.data);n.type==="login"&&this.$store.dispatch("Auth/loginSso",{...n.credentials}).then(()=>this.$emit("login-successful")).catch(()=>this.$emit("login-failed")),n.type==="register"&&this.$emit("finish-registration",n.credentials)}})},async login(){this.logging_in=!0,await this.$store.dispatch("Auth/logout"),this.$store.dispatch("Auth/login",this.credentials).then(()=>{this.$emit("login-successful")}).catch(e=>{var t,i;if(((t=e==null?void 0:e.data)==null?void 0:t.error)==="invalid_grant"){this.login_error=this.$t("Incorrect email or password.");return}if(((i=e==null?void 0:e.response)==null?void 0:i.status)===412){this.login_error="";return}this.login_error=this.$t("Login failed for unknown reason."),this.$emit("login-failed")}).finally(()=>{this.logging_in=!1})}}},SI=["disabled"],AI=["disabled"],CI={class:"separator"},xI={class:"d-flex justify-between"},TI={class:"d-flex gap-4"},$I=["disabled"];function MI(e,t,i,n,r,s){const c=Ae("flai-icon"),u=Ae("flai-notification"),o=Ae("flai-field-type"),h=Ae("flai-spinner");return ee(),ae(Oe,null,[se("button",{type:"button",class:"btn sso_login",disabled:r.logging_in||r.logging_sso,onClick:t[0]||(t[0]=(...a)=>s.loginWithGoogle&&s.loginWithGoogle(...a))},[ve(c,{name:"google_logo"}),He(" "+be(e.$t("Sign in with Google")),1)],8,SI),se("button",{type:"button",class:"btn sso_login",disabled:r.logging_in||r.logging_sso,onClick:t[1]||(t[1]=(...a)=>s.loginWithMs&&s.loginWithMs(...a))},[t[7]||(t[7]=se("img",{src:iy,alt:"Sign in with Microsoft"},null,-1)),He(" "+be(e.$t("Sign in with Microsoft")),1)],8,AI),se("div",CI,be(e.$t("or")),1),r.login_error?(ee(),Se(u,{key:0,"model-value":!0,closable:!1,type:"error"},{default:De(()=>[He(be(r.login_error),1)]),_:1})):xe("",!0),i.loginInfo?(ee(),Se(u,{key:1,"model-value":!0,closable:!1,type:"success"},{default:De(()=>[He(be(i.loginInfo),1)]),_:1})):xe("",!0),ve(o,{modelValue:r.credentials.username,"onUpdate:modelValue":t[2]||(t[2]=a=>r.credentials.username=a),attributes:{name:"email",required:!0,type:"email"},label:e.$t("Email"),definition:"plain-text-single-row",onKeydown:Cn(Je(s.login,["stop","prevent"]),["enter"])},null,8,["modelValue","label","onKeydown"]),ve(o,{modelValue:r.credentials.password,"onUpdate:modelValue":t[3]||(t[3]=a=>r.credentials.password=a),attributes:{name:"password",required:!0},label:e.$t("Password"),definition:"password",onKeydown:Cn(Je(s.login,["stop","prevent"]),["enter"])},null,8,["modelValue","label","onKeydown"]),t[8]||(t[8]=se("div",{class:"separator"},null,-1)),se("div",xI,[se("button",{class:"btn link","data-test":"password-reset-button",onClick:t[4]||(t[4]=a=>e.$emit("go-to-password-reset"))},be(e.$t("Forgot password?")),1),se("div",TI,[se("button",{class:"btn secondary","data-test":"register-button",onClick:t[5]||(t[5]=a=>e.$emit("go-to-register"))},be(e.$t("Register")),1),se("button",{class:"btn","data-test":"login-button",disabled:r.logging_in||r.logging_sso,onClick:t[6]||(t[6]=(...a)=>s.login&&s.login(...a))},[r.logging_in?(ee(),Se(h,{key:0})):xe("",!0),He(" "+be(e.$t("Login")),1)],8,$I)])])],64)}const EI=$e(wI,[["render",MI]]),kI={name:"RegisterForm",props:{actionCode:{type:String,default:""},locale:{type:String,default:""},routeParams:{type:Object,default:()=>{}}},emits:["go-to-password-reset","go-to-login","registration-successful","login-successful","login-failed","finish-registration"],data(){var e,t,i;return{credentials:{user:{first_name:"",last_name:"",email:""},organization:{name:"",address:"",utm_source:((e=this.routeParams)==null?void 0:e.utm_source)||null,utm_medium:((t=this.routeParams)==null?void 0:t.utm_medium)||null,utm_campaign:((i=this.routeParams)==null?void 0:i.utm_campaign)||null}},registering:!1,register_error:null,email_error:null}},methods:{async registerWithSSO(e){this.registering=!0;const t=this.routeParams;this.actionCode&&(t.action_code_id=this.actionCode.id);const{target_url:i}=await this.$store.dispatch("Auth/getSsoProviderRedirect",{provider:e,params:t}),n=window.open(i,"_blank");window.addEventListener("message",async r=>{if(r.source===n){const s=JSON.parse(r.data);s.type==="login"&&this.$store.dispatch("Auth/loginSso",{...s.credentials}).then(()=>this.$emit("login-successful")).catch(()=>this.$emit("login-failed")),s.type==="register"&&this.$emit("finish-registration",s.credentials)}})},async register(){this.registering=!0,this.actionCode?this.credentials.organization.action_code_id=this.actionCode.id:delete this.credentials.organization.action_code_id,this.locale&&(this.credentials.user.locale=this.locale),this.$store.dispatch("Auth/register",this.credentials).then(()=>{this.register_error=null,this.email_error=null,this.show_email_sent_text=!0,this.$emit("registration-successful",{email:this.credentials.user.email})}).catch(e=>{if(e.status===409){this.register_error=this.$t("An account using this email address already exists"),this.email_error=this.$t("An account using this email address already exists");return}this.register_error=this.$t("Registration failed for unknown reason.")}).finally(()=>{this.registering=!1})}}},PI=["disabled"],LI=["disabled"],RI={class:"separator"},II={class:"d-flex justify-between"},OI={class:"d-flex gap-4"},NI=["disabled"];function DI(e,t,i,n,r,s){const c=Ae("flai-notification"),u=Ae("flai-icon"),o=Ae("flai-field-type"),h=Ae("flai-spinner");return ee(),ae(Oe,null,[r.register_error?(ee(),Se(c,{key:0,"model-value":!0,closable:!1,type:"error"},{default:De(()=>[He(be(r.register_error),1)]),_:1})):xe("",!0),se("button",{type:"button",class:"btn sso_login",disabled:r.registering,onClick:t[0]||(t[0]=a=>s.registerWithSSO("google"))},[ve(u,{name:"google_logo"}),He(" "+be(e.$t("Register with Google")),1)],8,PI),se("button",{type:"button",class:"btn sso_login",disabled:r.registering,onClick:t[1]||(t[1]=a=>s.registerWithSSO("microsoft"))},[t[10]||(t[10]=se("img",{src:iy,alt:"Sign in with Microsoft"},null,-1)),He(" "+be(e.$t("Register with Microsoft")),1)],8,LI),se("div",RI,be(e.$t("or")),1),ve(o,{modelValue:r.credentials.user.first_name,"onUpdate:modelValue":t[2]||(t[2]=a=>r.credentials.user.first_name=a),attributes:{name:"first-name",required:!0,type:"text"},label:e.$t("First name"),definition:"plain-text-single-row"},null,8,["modelValue","label"]),ve(o,{modelValue:r.credentials.user.last_name,"onUpdate:modelValue":t[3]||(t[3]=a=>r.credentials.user.last_name=a),attributes:{name:"last-name",required:!1,type:"text"},label:e.$t("Last name"),definition:"plain-text-single-row"},null,8,["modelValue","label"]),ve(o,{modelValue:r.credentials.user.email,"onUpdate:modelValue":t[4]||(t[4]=a=>r.credentials.user.email=a),attributes:{name:"email",required:!0},errors:r.email_error?[r.email_error]:[],label:e.$t("Email"),definition:"plain-text-single-row"},null,8,["modelValue","errors","label"]),ve(o,{modelValue:r.credentials.organization.name,"onUpdate:modelValue":t[5]||(t[5]=a=>r.credentials.organization.name=a),attributes:{name:"organization_name",required:!0},label:e.$t("Organization name"),definition:"plain-text-single-row"},null,8,["modelValue","label"]),ve(o,{modelValue:r.credentials.organization.address,"onUpdate:modelValue":t[6]||(t[6]=a=>r.credentials.organization.address=a),attributes:{name:"organization_address",required:!0},label:e.$t("Organization address"),definition:"plain-text-single-row"},null,8,["modelValue","label"]),t[11]||(t[11]=se("div",{class:"separator"},null,-1)),se("div",II,[se("button",{class:"btn link","data-test":"password-reset-button",onClick:t[7]||(t[7]=a=>e.$emit("go-to-password-reset"))},be(e.$t("Forgot password?")),1),se("div",OI,[se("button",{class:"btn secondary","data-test":"login-button",onClick:t[8]||(t[8]=a=>e.$emit("go-to-login"))},be(e.$t("Login")),1),se("button",{class:"btn",disabled:r.registering,"data-test":"register-button",onClick:t[9]||(t[9]=(...a)=>s.register&&s.register(...a))},[r.registering?(ee(),Se(h,{key:0})):(ee(),ae(Oe,{key:1},[He(be(e.$t("Register")),1)],64))],8,NI)])])],64)}const FI=$e(kI,[["render",DI]]),BI={name:"RegisterSsoForm",props:{isInsideModal:{type:Boolean,default:!1},passedCredentials:{type:Object,default:null}},data(){return{credentials:this.isInsideModal?{access_token:this.passedCredentials.access_token||null,user:{email:null},use_existing_organization:!1,organization:{id:null,name:"",address:"",utm_source:this.passedCredentials.utm_source||null,utm_medium:this.passedCredentials.utm_medium||null,utm_campaign:this.passedCredentials.utm_campaign||null,action_code_id:this.passedCredentials.action_code_id||null}}:{access_token:this.$route.query.access_token||null,user:{email:null},use_existing_organization:!1,organization:{id:null,name:"",address:"",utm_source:this.$route.query.utm_source||null,utm_medium:this.$route.query.utm_medium||null,utm_campaign:this.$route.query.utm_campaign||null,action_code_id:this.$route.query.action_code_id||null}},existing_organization_name:"",has_no_email:!1,loading:!1,error:null,fatal_error:null,errors:{}}},created(){this.ssoUser()},methods:{async ssoUser(){this.loading=!0,await this.$store.dispatch("Auth/getSsoUser",this.credentials.access_token).then(e=>{e.organization&&(this.credentials.use_existing_organization=!0,this.existing_organization_name=e.organization.name,this.credentials.organization.id=e.organization.id),this.has_no_email=e.email===null,this.error=null,this.fatal_error=!1,this.errors={}}).catch(()=>{this.error="Registration failed, user not found.",this.fatal_error=!0}).finally(()=>{this.loading=!1})},register(){this.loading=!0,this.$store.dispatch("Auth/registerSso",this.credentials).then(()=>this.$store.dispatch("Auth/loginSso",this.credentials)).then(()=>{this.error=null,this.fatal_error=!1,this.errors={}}).catch(e=>{var t;if(((t=e.response)==null?void 0:t.status)!==412){if(this.loading=!1,e.status===409){this.error="An account using this email address already exists";return}if(e.status===422){this.errors=e.data.errors;return}this.error="Registration failed for unknown reason."}})}}},VI={class:"d-flex justify-between"},zI={class:"d-flex gap-4"},HI=["disabled"];function UI(e,t,i,n,r,s){const c=Ae("flai-notification"),u=Ae("flai-spinner"),o=Ae("flai-field-type");return ee(),ae(Oe,null,[r.error?(ee(),Se(c,{key:0,"model-value":!0,closable:!1,type:"error"},{default:De(()=>[He(be(r.error),1)]),_:1})):r.loading?(ee(),Se(u,{key:1})):(ee(),ae(Oe,{key:2},[r.credentials.organization.id?(ee(),Se(o,{key:0,modelValue:r.credentials.use_existing_organization,"onUpdate:modelValue":t[0]||(t[0]=h=>r.credentials.use_existing_organization=h),attributes:{required:!1},label:`Join '${r.existing_organization_name}' organization`,definition:"boolean"},null,8,["modelValue","label"])):xe("",!0),r.has_no_email?(ee(),Se(o,{key:1,modelValue:r.credentials.user.email,"onUpdate:modelValue":t[1]||(t[1]=h=>r.credentials.user.email=h),attributes:{name:"email",required:!0},errors:r.errors["user.email"],label:"Email",definition:"plain-text-single-row"},null,8,["modelValue","errors"])):xe("",!0),r.credentials.use_existing_organization===!1?(ee(),ae(Oe,{key:2},[ve(o,{modelValue:r.credentials.organization.name,"onUpdate:modelValue":t[2]||(t[2]=h=>r.credentials.organization.name=h),attributes:{name:"organization_name",required:!0},errors:r.errors["organization.name"],label:"Organization name",definition:"plain-text-single-row"},null,8,["modelValue","errors"]),ve(o,{modelValue:r.credentials.organization.address,"onUpdate:modelValue":t[3]||(t[3]=h=>r.credentials.organization.address=h),attributes:{name:"organization_address",required:!0},errors:r.errors["organization.address"],label:"Organization address",definition:"plain-text-single-row"},null,8,["modelValue","errors"])],64)):xe("",!0)],64)),r.fatal_error===!1?(ee(),ae(Oe,{key:3},[t[5]||(t[5]=se("hr",{class:"divider"},null,-1)),se("div",VI,[se("div",zI,[se("button",{class:"btn",type:"submit",disabled:r.loading,onClick:t[4]||(t[4]=(...h)=>s.register&&s.register(...h))},[r.loading?(ee(),Se(u,{key:0})):(ee(),ae(Oe,{key:1},[He(" Complete registration ")],64))],8,HI)])])],64)):xe("",!0)],64)}const WI=$e(BI,[["render",UI]]),jI={name:"PasswordResetForm",props:{modelValue:{type:String,default:""}},emits:["update:modelValue"],data(){return{passwordConfirmation:"",password:"",passwordErrors:[],passwordMismatchErrors:[]}},computed:{visiblePasswordErrors(){return this.passwordErrors.length>0?[this.passwordErrors[0]]:[]}},watch:{password(){this.checkPassword()},passwordConfirmation(){this.checkPassword()}},methods:{checkPassword(){if(this.passwordErrors=[],/\d/.test(this.password)||this.passwordErrors.push(this.$t("Must contain at least 1 number.")),/[a-zA-Z]/.test(this.password)||this.passwordErrors.push(this.$t("Must contain at least 1 letter.")),/[a-z]/.test(this.password)||this.passwordErrors.push(this.$t("Must contain at least 1 lower case letter.")),/[A-Z]/.test(this.password)||this.passwordErrors.push(this.$t("Must contain at least 1 upper case letter.")),this.password.length<12&&this.passwordErrors.push(this.$t("Must be at least 12 characters.")),this.password!==this.passwordConfirmation){this.passwordMismatchErrors=[this.$t("Passwords do not match.")];return}this.passwordMismatchErrors=[],this.$emit("update:modelValue",this.password)}}},GI={class:"d-flex flex-col gap-4"},qI={class:"p-2 m-0 bg-background-panel d-flex flex-col"};function KI(e,t,i,n,r,s){const c=Ae("flai-field-type");return ee(),ae("div",GI,[se("p",qI,[se("span",null,be(e.$t("Password must be at least 12 characters.")),1),se("span",null,be(e.$t("Must contain at least 1 number.")),1),se("span",null,be(e.$t("Must contain at least 1 lower case letter.")),1),se("span",null,be(e.$t("Must contain at least 1 upper case letter.")),1)]),ve(c,{modelValue:r.password,"onUpdate:modelValue":t[0]||(t[0]=u=>r.password=u),attributes:{name:"password",required:!0},label:e.$t("Password"),definition:"password",errors:s.visiblePasswordErrors},null,8,["modelValue","label","errors"]),ve(c,{modelValue:r.passwordConfirmation,"onUpdate:modelValue":t[1]||(t[1]=u=>r.passwordConfirmation=u),attributes:{name:"password_confirmation",required:!0},label:e.$t("Password confirmation"),definition:"password",errors:r.passwordMismatchErrors},null,8,["modelValue","label","errors"])])}const YI=$e(jI,[["render",KI]]),XI={name:"TermsOfUseForm",props:{userId:{type:String,required:!0},organizationId:{type:String,required:!0}},emits:["tos-accepted","login-required"],data(){return{termsOfUse:!1,newsletter:!1,submitting:!1,error:null}},methods:{submitTos(){this.submitting=!0,this.$store.dispatch("Auth/sendTOSConsent",{organizationId:this.organizationId,payload:{accept_terms_and_conditions:this.termsOfUse,subscribe_to_emails:this.newsletter}}).then(()=>{this.$emit("tos-accepted")}).catch(e=>{throw e.status===401&&this.$emit("login-required"),this.error=this.$t("Something went wrong"),e}).finally(()=>{this.submitting=!1})}}},QI={for:"terms-of-use"},JI={href:"https://www.flai.ai/legal/terms-of-use"},ZI={href:"https://www.flai.ai/legal/privacy-policy"},eO={for:"newsletter"},tO={class:"d-flex justify-end"},iO=["disabled"];function nO(e,t,i,n,r,s){const c=Ae("flai-notification"),u=Ae("i18n-t"),o=Ae("flai-spinner");return ee(),ae("div",null,[r.error?(ee(),Se(c,{key:0,"model-value":!0,closable:!1,type:"error"},{default:De(()=>[He(be(r.error),1)]),_:1})):xe("",!0),St(se("input",{id:"terms-of-use","onUpdate:modelValue":t[0]||(t[0]=h=>r.termsOfUse=h),type:"checkbox",name:"terms-of-use"},null,512),[[Bs,r.termsOfUse]]),se("label",QI,[ve(u,{keypath:"I accept {TOS} and {privacyPolicy}",tag:"span",scope:"global"},{TOS:De(()=>[se("a",JI,be(e.$t("Flai Terms of Use")),1)]),privacyPolicy:De(()=>[se("a",ZI,be(e.$t("Privacy Policy")),1)]),_:1})]),se("div",null,[St(se("input",{id:"newsletter","onUpdate:modelValue":t[1]||(t[1]=h=>r.newsletter=h),type:"checkbox",name:"newsletter"},null,512),[[Bs,r.newsletter]]),se("label",eO,be(e.$t("I want to subscribe to the newsletter")),1)]),t[3]||(t[3]=se("hr",null,null,-1)),se("div",tO,[se("button",{class:"btn",type:"submit",disabled:!r.termsOfUse,onClick:t[2]||(t[2]=(...h)=>s.submitTos&&s.submitTos(...h))},[r.submitting?(ee(),Se(o,{key:0})):xe("",!0),He(" "+be(e.$t("Continue")),1)],8,iO)])])}const rO=$e(XI,[["render",nO]]),sO={name:"PromptLoginModal",components:{Modal:ty,LoginForm:EI,RegisterForm:FI,RegisterSsoForm:WI,PasswordResetForm:YI,TermsOfUseForm:rO},emits:["close"],data(){return{promptLoginModal:{title:"Login to continue",message:this.$t("Once you log in, you will be able to continue."),dispatchClose:!1},registrationEmail:"",newPassword:"",verificationCode:"",settingPassword:!1,loginInfo:"",resendingPasswordResetCode:!1,resendingPasswordResetCodeCompleted:!1,resendingVerificationCode:!1,resendingVerificationCodeCompleted:!1,resetPasswordEmail:"",passwordResetError:""}},computed:{...Wg(js,{loginModal:"loginModal",runAnalyzeAction:"runAnalyzeAction"}),...jg(js,{runningAction:"runningAction"})},methods:{loginSuccessful(){this.loginModal.show=!1},registrationSuccessful({email:e}){this.registrationEmail=e,this.loginModal.step="enter-registration-code"},async setPassword(){if(this.verificationCode&&this.registrationEmail){this.settingPassword=!0,this.passwordResetError="";try{await this.$store.dispatch("Auth/resetPassword",{password:this.newPassword,password_confirmation:this.newPassword,token:this.verificationCode,email:this.registrationEmail}),await this.$store.dispatch("Auth/login",{username:this.registrationEmail,password:this.newPassword}),this.newPassword="",this.verificationCode=""}catch{this.passwordResetError=this.$t("Password set failed. Check the verification code.")}this.settingPassword=!1}},async resendVerificationCode(){if(this.passwordResetError="",!this.resendingVerificationCode){this.resendingVerificationCode=!0,this.resendingVerificationCodeCompleted=!1;try{await this.$store.dispatch("Auth/resendVerificationCode",{email:this.registrationEmail})}finally{this.resendingVerificationCode=!1,this.resendingVerificationCodeCompleted=!0}}},async resendPasswordResetCode(){if(this.passwordResetError="",!this.resendingPasswordResetCode){this.resendingPasswordResetCode=!0,this.resendingPasswordResetCodeCompleted=!1;try{await this.$store.dispatch("Auth/requestPasswordReset",{email:this.registrationEmail})}finally{this.resendingPasswordResetCode=!1,this.resendingPasswordResetCodeCompleted=!0}}},sentPasswordResetCode(){this.$store.dispatch("Auth/requestPasswordReset",{email:this.resetPasswordEmail}),this.loginModal.step="reset-password-enter-password"},async resetPassword(){if(this.verificationCode&&this.resetPasswordEmail){this.settingPassword=!0;try{await this.$store.dispatch("Auth/resetPassword",{password:this.newPassword,password_confirmation:this.newPassword,token:this.verificationCode,email:this.resetPasswordEmail}),this.newPassword="",this.verificationCode="",this.loginModal.step="login",this.loginInfo=this.$t("Your password has been updated. Please log in.")}catch{this.passwordResetError=this.$t("Password reset failed. Check the verification code.")}this.settingPassword=!1}},close(){this.runningAction=null,this.$emit("close")},openSSOFinishRegisterForm(e){this.loginModal.step="finish-register-sso",this.loginModal.passedCredentials=e}}},oO={class:"auth"},aO={class:"auth"},lO={class:"auth"},cO=["disabled"],uO={class:"d-flex justify-end p-3"},hO=["disabled"],dO={class:"auth"},fO={class:"d-flex justify-end p-3"},pO={class:"auth"},gO={class:"d-flex justify-end p-3"},mO=["disabled"],vO={class:"auth"},yO=["disabled"],bO={class:"d-flex justify-end p-3"},_O=["disabled"];function wO(e,t,i,n,r,s){const c=Ae("login-form"),u=Ae("modal"),o=Ae("register-form"),h=Ae("flai-spinner"),a=Ae("flai-icon"),l=Ae("flai-notification"),f=Ae("flai-field-type"),d=Ae("password-reset-form"),p=Ae("register-sso-form"),g=Ae("terms-of-use-form");return e.loginModal.step==="login"?(ee(),Se(u,{key:0,title:e.$t("Login"),"dispatch-close":!1,onClose:s.close},{content:De(()=>[se("div",oO,[se("form",{class:"form gap-6",onSubmit:t[2]||(t[2]=Je(()=>{},["prevent"]))},[ve(c,{"login-info":r.loginInfo,onGoToRegister:t[0]||(t[0]=m=>e.loginModal.step="register"),onGoToPasswordReset:t[1]||(t[1]=m=>e.loginModal.step="reset-password"),onFinishRegistration:s.openSSOFinishRegisterForm,onLoginSuccessful:s.loginSuccessful},null,8,["login-info","onFinishRegistration","onLoginSuccessful"])],32)])]),footer:De(()=>t[21]||(t[21]=[se("div",null,null,-1)])),_:1},8,["title","onClose"])):e.loginModal.step==="register"?(ee(),Se(u,{key:1,title:e.$t("Register"),"dispatch-close":!1,top:"10%",onClose:s.close},{content:De(()=>[se("div",aO,[se("form",{class:"form gap-6",onSubmit:t[5]||(t[5]=Je(()=>{},["prevent"]))},[ve(o,{onGoToLogin:t[3]||(t[3]=m=>e.loginModal.step="login"),onGoToPasswordReset:t[4]||(t[4]=m=>e.loginModal.step="reset-password"),onRegistrationSuccessful:s.registrationSuccessful,onFinishRegistration:s.openSSOFinishRegisterForm,onLoginSuccessful:s.loginSuccessful},null,8,["onRegistrationSuccessful","onFinishRegistration","onLoginSuccessful"])],32)])]),footer:De(()=>t[22]||(t[22]=[se("div",null,null,-1)])),_:1},8,["title","onClose"])):e.loginModal.step==="enter-registration-code"?(ee(),Se(u,{key:2,title:e.$t("Set your password"),"dispatch-close":!1,closable:!1,onClose:s.close},{content:De(()=>[se("div",lO,[se("form",{id:"verify-code",class:"form gap-6",autocomplete:"off",onSubmit:t[9]||(t[9]=Je((...m)=>s.setPassword&&s.setPassword(...m),["prevent"]))},[He(be(e.$t("A code has been sent to your email address."))+" ",1),se("button",{disabled:r.resendingVerificationCode,class:"btn sm",onClick:t[6]||(t[6]=Je((...m)=>s.resendVerificationCode&&s.resendVerificationCode(...m),["prevent"]))},[t[23]||(t[23]=He(" Resend code ")),r.resendingVerificationCode?(ee(),Se(h,{key:0,size:"sm",class:"d-flex-inline"})):xe("",!0),r.resendingVerificationCodeCompleted?(ee(),Se(a,{key:1,name:"check"})):xe("",!0)],8,cO),r.passwordResetError?(ee(),Se(l,{key:0,"model-value":!0,closable:!1,type:"error"},{default:De(()=>[He(be(r.passwordResetError),1)]),_:1})):xe("",!0),ve(f,{modelValue:r.verificationCode,"onUpdate:modelValue":t[7]||(t[7]=m=>r.verificationCode=m),attributes:{name:"verification-code",autocomplete:"off",required:!0,type:"text"},label:e.$t("Verification code"),definition:"plain-text-single-row"},null,8,["modelValue","label"]),ve(d,{modelValue:r.newPassword,"onUpdate:modelValue":t[8]||(t[8]=m=>r.newPassword=m)},null,8,["modelValue"])],32)])]),footer:De(()=>[se("div",uO,[se("button",{type:"submit",form:"verify-code",class:"btn",disabled:r.settingPassword||!r.newPassword||!r.verificationCode},[r.settingPassword?(ee(),Se(h,{key:0})):(ee(),ae(Oe,{key:1},[He(be(e.$t("Set password")),1)],64))],8,hO)])]),_:1},8,["title","onClose"])):e.loginModal.step==="finish-register-sso"?(ee(),Se(u,{key:3,title:e.$t("Complete your registration"),"dispatch-close":!1,closable:!1,onClose:s.close},{content:De(()=>[se("div",dO,[se("form",{class:"form gap-6",onSubmit:t[10]||(t[10]=Je(()=>{},["prevent"]))},[ve(p,{"is-inside-modal":"","passed-credentials":e.loginModal.passedCredentials},null,8,["passed-credentials"])],32)])]),footer:De(()=>t[24]||(t[24]=[se("div",null,null,-1)])),_:1},8,["title","onClose"])):e.loginModal.step==="prompt"?(ee(),Se(u,ut({key:4},r.promptLoginModal,{"dispatch-close":!1,onClose:s.close}),{footer:De(()=>[se("div",fO,[se("button",{class:"btn secondary m-1 modal-button",onClick:t[11]||(t[11]=m=>e.loginModal.step="register")},be(e.$t("Register")),1),se("button",{class:"btn m-1 modal-button",onClick:t[12]||(t[12]=m=>e.loginModal.step="login")},be(e.$t("Login")),1)])]),_:1},16,["onClose"])):e.loginModal.step==="TOS"?(ee(),Se(u,{key:5,title:e.$t("Terms of service"),"dispatch-close":!1,onClose:s.close},{content:De(()=>[ve(g,ut(e.loginModal.passthroughParams,{class:"p-3",onTosAccepted:t[13]||(t[13]=m=>e.loginModal.show=!1),onLoginRequired:t[14]||(t[14]=m=>e.loginModal.step="login")}),null,16)]),footer:De(()=>t[25]||(t[25]=[se("div",null,null,-1)])),_:1},8,["title","onClose"])):e.loginModal.step==="reset-password"?(ee(),Se(u,{key:6,title:e.$t("Reset password"),"dispatch-close":!1,onClose:s.close},{content:De(()=>[se("div",pO,[se("form",{id:"reset-password-email",class:"form gap-6",onSubmit:t[16]||(t[16]=Je((...m)=>s.sentPasswordResetCode&&s.sentPasswordResetCode(...m),["prevent"]))},[se("p",null,be(e.$t("Enter the email associated with your account to change your password.")),1),ve(f,{modelValue:r.resetPasswordEmail,"onUpdate:modelValue":t[15]||(t[15]=m=>r.resetPasswordEmail=m),attributes:{name:"reset-email",required:!0,type:"email"},label:e.$t("Email"),definition:"plain-text-single-row"},null,8,["modelValue","label"])],32)])]),footer:De(()=>[se("div",gO,[se("button",{type:"submit",form:"reset-password-email",class:"btn",disabled:!r.resetPasswordEmail},be(e.$t("Next")),9,mO)])]),_:1},8,["title","onClose"])):e.loginModal.step==="reset-password-enter-password"?(ee(),Se(u,{key:7,title:e.$t("Set new password"),"dispatch-close":!1,onClose:s.close},{content:De(()=>[se("div",vO,[se("form",{id:"reset-password-password",autocomplete:"off",class:"form gap-6",onSubmit:t[20]||(t[20]=Je((...m)=>s.resetPassword&&s.resetPassword(...m),["prevent"]))},[He(be(e.$t("We sent you a code to your email address."))+" ",1),se("button",{disabled:r.resendingPasswordResetCode,class:"btn sm",onClick:t[17]||(t[17]=Je((...m)=>s.resendPasswordResetCode&&s.resendPasswordResetCode(...m),["prevent"]))},[t[26]||(t[26]=He(" Resend code ")),r.resendingPasswordResetCode?(ee(),Se(h,{key:0,size:"sm",class:"d-flex-inline"})):xe("",!0),r.resendingPasswordResetCodeCompleted?(ee(),Se(a,{key:1,name:"check"})):xe("",!0)],8,yO),r.passwordResetError?(ee(),Se(l,{key:0,"model-value":!0,closable:!1,type:"error"},{default:De(()=>[He(be(r.passwordResetError),1)]),_:1})):xe("",!0),ve(f,{modelValue:r.verificationCode,"onUpdate:modelValue":t[18]||(t[18]=m=>r.verificationCode=m),attributes:{name:"verification-code",required:!0,type:"text",autocomplete:"off"},label:e.$t("Verification code"),definition:"plain-text-single-row"},null,8,["modelValue","label"]),ve(d,{modelValue:r.newPassword,"onUpdate:modelValue":t[19]||(t[19]=m=>r.newPassword=m)},null,8,["modelValue"])],32)])]),footer:De(()=>[se("div",bO,[se("button",{type:"submit",form:"reset-password-password",class:"btn",disabled:r.settingPassword||!r.newPassword||!r.verificationCode},[r.settingPassword?(ee(),Se(h,{key:0})):(ee(),ae(Oe,{key:1},[He(be(e.$t("Set password")),1)],64))],8,_O)])]),_:1},8,["title","onClose"])):xe("",!0)}const SO=$e(sO,[["render",wO]]),AO={name:"AcceptTOSModal",components:{Modal:ty},data(){return{tosAccepted:!0}},computed:{...jg(js,{showFlaiInfoModal:"showFlaiInfoModal"})},async created(){try{this.tosAccepted=JSON.parse(localStorage.getItem("tosAccepted"))}catch{this.tosAccepted=!1}},methods:{acceptTOS(){localStorage.setItem("tosAccepted",JSON.stringify(!0)),this.tosAccepted=!0,this.showFlaiInfoModal=!0}}},CO={class:"m-4"},xO={href:"https://www.flai.ai/legal/terms-of-use"},TO={href:"https://www.flai.ai/legal/privacy-policy"};function $O(e,t,i,n,r,s){const c=Ae("i18n-t"),u=Ae("modal");return r.tosAccepted?xe("",!0):(ee(),Se(u,{key:0,title:e.$t("Terms of service"),"confirm-button":{text:e.$t("Accept"),onClick:()=>{s.acceptTOS()}},"cancel-button":null,closable:!1,"dispatch-close":!1},{content:De(()=>[se("div",CO,[ve(c,{keypath:"In order to use this application, you need to accept {TOS} and {privacyPolicy}.",tag:"span",scope:"global"},{TOS:De(()=>[se("a",xO,be(e.$t("Flai Terms of Use")),1)]),privacyPolicy:De(()=>[se("a",TO,be(e.$t("Privacy Policy")),1)]),_:1})])]),_:1},8,["title","confirm-button"]))}const MO=$e(AO,[["render",$O]]);const EO={props:{tip:{type:Object,required:!0},hasPrev:{type:Boolean,required:!0},hasNext:{type:Boolean,required:!0}},emits:["prev-tip","next-tip","close-tips"],data(){return{element:null,openerStyle:{}}},watch:{tip:{async handler(e,t){t&&this.element&&this.element.classList.remove("user-tip-highlight");const{selector:i,customClass:n}=this.tip;try{this.element=await this.waitForElement(i),this.element.classList.add("user-tip-highlight"),n&&this.element.classList.add(n),this.$nextTick(()=>{const{x:r,y:s,top:c,bottom:u,left:o,right:h,width:a,height:l}=this.element.getBoundingClientRect();this.openerStyle={x:r,y:s,top:`${c}px`,bottom:`${u}px`,left:`${o}px`,right:`${h}px`,width:`${a}px`,height:`${l}px`,position:"absolute","pointer-events":"none"},this.$refs.opener.click()})}catch(r){this.$emit("close-tips"),console.error(r)}},immediate:!0}},beforeUnmount(){this.element&&this.element.classList.remove("user-tip-highlight")},methods:{waitForElement(e,t=5e3){const i=Date.now();return new Promise((n,r)=>{const s=setInterval(()=>{const c=document.querySelector(e);c?(clearInterval(s),n(c)):Date.now()-i>t&&(clearInterval(s),r(new Error(`${e} not found on page`)))},50)})}}},kO=["onClick"],PO={class:"p-3 user-tip-box"},LO={class:"text-gray"},RO={class:"d-flex justify-between mt-2"},IO={key:0,class:"d-flex justify-end gap-2"},OO=["disabled"],NO=["disabled"];function DO(e,t,i,n,r,s){const c=Ae("flai-popover");return r.element?(ee(),Se(c,{key:r.element,width:i.tip.width,closable:!1,"z-index":1000001,position:i.tip.position,"hide-close-icon":"","hide-arrow":""},{button:De(({openPopover:u})=>[se("div",{ref:"opener",style:dt(r.openerStyle),onClick:u},null,12,kO)]),default:De(()=>[se("div",PO,[se("h3",null,be(i.tip.title),1),se("div",LO,be(i.tip.text),1),se("div",RO,[se("button",{class:"btn sm",onClick:t[0]||(t[0]=u=>e.$emit("close-tips"))},be(e.$t("Close")),1),i.hasPrev||i.hasNext?(ee(),ae("div",IO,[se("button",{disabled:!i.hasPrev,class:"btn sm",onClick:t[1]||(t[1]=u=>e.$emit("prev-tip"))},be(e.$t("Prev")),9,OO),se("button",{disabled:!i.hasNext,class:"btn sm",onClick:t[2]||(t[2]=u=>e.$emit("next-tip"))},be(e.$t("Next")),9,NO)])):xe("",!0)])])]),_:1},8,["width","position"])):xe("",!0)}const FO=$e(EO,[["render",DO]]);const BO={components:{UserTip:FO},data(){return{currentTipIndex:0}},computed:{tips(){return(this.$store.state.UserTips.visibleTips||[]).filter(t=>t.showOnMobile!==!this.$isMobile())}},methods:{prevTip(){this.currentTipIndex>=1&&this.currentTipIndex--},nextTip(){this.currentTipIndex<this.tips.length-1&&this.currentTipIndex++},closeTips(){this.$store.dispatch("UserTips/hideTips"),this.currentTipIndex=0}}},VO={key:0,class:"flai-modal user-tips-controller"};function zO(e,t,i,n,r,s){const c=Ae("user-tip");return ee(),Se(or,{to:"#root-portal"},[s.tips.length>0?(ee(),ae("div",VO,[ve(c,{tip:s.tips[r.currentTipIndex],"has-prev":r.currentTipIndex>0,"has-next":r.currentTipIndex<s.tips.length-1,onPrevTip:s.prevTip,onNextTip:s.nextTip,onCloseTips:s.closeTips},null,8,["tip","has-prev","has-next","onPrevTip","onNextTip","onCloseTips"])])):xe("",!0)])}const HO=$e(BO,[["render",zO],["__scopeId","data-v-ad33ad4d"]]),UO={components:{PromptLoginModal:SO,AcceptTosModal:MO,ToastNotifications:hI,UserTipsController:HO},data(){return{loading:!0}},computed:{...Wg(js,{loginModal:"loginModal"})},created(){this.$store.dispatch("Auth/attemptLogin").finally(()=>{this.loading=!1})}},WO={class:"d-flex w-full h-full overflow-auto"};function jO(e,t,i,n,r,s){const c=Ae("toast-notifications"),u=Ae("user-tips-controller"),o=Ae("prompt-login-modal"),h=Ae("accept-tos-modal"),a=Ae("router-view");return ee(),ae("div",WO,[(ee(),Se(or,{to:"#root-portal"},[ve(c)])),ve(u),e.loginModal.show?(ee(),Se(o,{key:0,onClose:t[0]||(t[0]=l=>e.loginModal.show=!1)})):xe("",!0),ve(h),r.loading?xe("",!0):(ee(),Se(a,{key:1}))])}const GO=$e(UO,[["render",jO]]);function $c(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function Rf(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),i.push.apply(i,n)}return i}function Mc(e){for(var t=1;t<arguments.length;t++){var i=arguments[t]!=null?arguments[t]:{};t%2?Rf(Object(i),!0).forEach(function(n){$c(e,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Rf(Object(i)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))})}return e}var qO=function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return new Promise(function(n,r){if(!(typeof document>"u")){var s=document.head||document.getElementsByTagName("head")[0],c=document.createElement("script");if(c.async=!0,c.src=t,c.defer=i.defer,i.preconnectOrigin){var u=document.createElement("link");u.href=i.preconnectOrigin,u.rel="preconnect",s.appendChild(u)}s.appendChild(c),c.onload=n,c.onerror=r}})},KO=function e(t){for(var i=arguments.length,n=new Array(i>1?i-1:0),r=1;r<i;r++)n[r-1]=arguments[r];if(!n.length)return t;var s=n.shift();if(!(!Gn(t)||!Gn(s))){for(var c in s)Gn(s[c])?(t[c]||Object.assign(t,$c({},c,{})),e(t[c],s[c])):Object.assign(t,$c({},c,s[c]));return e.apply(void 0,[t].concat(n))}},ao=function(){return!(typeof window>"u"||typeof document>"u")},If=function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;ao()},YO=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return If('Missing "appName" property inside the plugin options.',t.app_name==null),If('Missing "name" property in the route.',t.screen_name==null),t};function XO(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",i=e.split("/"),n=t.split("/");return i[0]===""&&t[t.length-1]==="/"&&i.shift(),n.join("/")+i.join("/")}var QO=function(){return{bootstrap:!0,onReady:null,onError:null,onBeforeTrack:null,onAfterTrack:null,pageTrackerTemplate:null,customResourceURL:"https://www.googletagmanager.com/gtag/js",customPreconnectOrigin:"https://www.googletagmanager.com",deferScriptLoad:!1,pageTrackerExcludedRoutes:[],pageTrackerEnabled:!0,enabled:!0,disableScriptLoad:!1,pageTrackerScreenviewEnabled:!1,appName:null,pageTrackerUseFullPath:!1,pageTrackerPrependBase:!0,pageTrackerSkipSamePath:!0,globalDataLayerName:"dataLayer",globalObjectName:"gtag",defaultGroupName:"default",includes:null,config:{id:null,params:{send_page_view:!1}}}},ny={},JO=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=QO();ny=KO(i,t)},ai=function(){return ny},ir=function(){var e,t=ai(),i=t.globalObjectName;!ao()||typeof window[i]>"u"||(e=window)[i].apply(e,arguments)},zu=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var n=ai(),r=n.config,s=n.includes;ir.apply(void 0,["config",r.id].concat(t)),Array.isArray(s)&&s.forEach(function(c){ir.apply(void 0,["config",c.id].concat(t))})},Of=function(t,i){!ao()||(window["ga-disable-".concat(t)]=i)},ry=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,t=ai(),i=t.config,n=t.includes;Of(i.id,e),Array.isArray(n)&&n.forEach(function(r){return Of(r.id,e)})},sy=function(){ry(!0)},ZO=function(){ry(!1)},oy,eN=function(t){oy=t},Hu=function(){return oy},ur=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=ai(),n=i.includes,r=i.defaultGroupName;t.send_to==null&&Array.isArray(n)&&n.length&&(t.send_to=n.map(function(s){return s.id}).concat(r)),ir("event",e,t)},ay=function(e){if(!!ao()){var t;if(typeof e=="string")t={page_path:e};else if(e.path||e.fullPath){var i=ai(),n=i.pageTrackerUseFullPath,r=i.pageTrackerPrependBase,s=Hu(),c=s&&s.options.base,u=n?e.fullPath:e.path;t=Mc(Mc({},e.name&&{page_title:e.name}),{},{page_path:r?XO(u,c):u})}else t=e;t.page_location==null&&(t.page_location=window.location.href),t.send_page_view==null&&(t.send_page_view=!0),ur("page_view",t)}},ly=function(e){var t=ai(),i=t.appName;if(!!e){var n;typeof e=="string"?n={screen_name:e}:n=e,n.app_name=n.app_name||i,ur("screen_view",n)}},tN=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];ur.apply(void 0,["exception"].concat(t))},iN=function(e){zu("linker",e)},nN=function(e){ur("timing_complete",e)},rN=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];ir.apply(void 0,["set"].concat(t))},sN=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];ur.apply(void 0,["refund"].concat(t))},oN=function(e){ur("purchase",e)},aN=function(e){zu({custom_map:e})},lN=Object.freeze({__proto__:null,query:ir,config:zu,optOut:sy,optIn:ZO,pageview:ay,screenview:ly,exception:tN,linker:iN,time:nN,set:rN,refund:sN,purchase:oN,customMap:aN,event:ur}),cN=function(t){t.config.globalProperties.$gtag=lN},uN=function(){if(!!ao()){var e=ai(),t=e.enabled,i=e.globalObjectName,n=e.globalDataLayerName;return window[i]==null&&(window[n]=window[n]||[],window[i]=function(){window[n].push(arguments)}),window[i]("js",new Date),t||sy(),window[i]}},Nf=function(t){return Mc({send_page_view:!1},t)},cy=function(){var e=ai(),t=e.config,i=e.includes;ir("config",t.id,Nf(t.params)),Array.isArray(i)&&i.forEach(function(n){ir("config",n.id,Nf(n.params))})},Df=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=ai(),n=i.appName,r=i.pageTrackerTemplate,s=i.pageTrackerScreenviewEnabled,c=i.pageTrackerSkipSamePath;if(!(c&&e.path===t.path)){var u=e;if(Te(r)?u=r(e,t):s&&(u=YO({app_name:n,screen_name:e.name})),s){ly(u);return}ay(u)}},Ff=function(t){var i=ai(),n=i.pageTrackerExcludedRoutes;return n.includes(t.path)||n.includes(t.name)},hN=function(){var e=ai(),t=e.onBeforeTrack,i=e.onAfterTrack,n=Hu();n.isReady().then(function(){tn().then(function(){var r=n.currentRoute;cy(),!Ff(r.value)&&Df(r.value)}),n.afterEach(function(r,s){tn().then(function(){Ff(r)||(Te(t)&&t(r,s),Df(r,s),Te(i)&&i(r,s))})})})},dN=function(){var e=ai(),t=e.onReady,i=e.onError,n=e.globalObjectName,r=e.globalDataLayerName,s=e.config,c=e.customResourceURL,u=e.customPreconnectOrigin,o=e.deferScriptLoad,h=e.pageTrackerEnabled,a=e.disableScriptLoad,l=Boolean(h&&Hu());if(uN(),l?hN():cy(),!a)return qO("".concat(c,"?id=").concat(s.id,"&l=").concat(r),{preconnectOrigin:u,defer:o}).then(function(){t&&t(window[n])}).catch(function(f){return i&&i(f),f})},fN=function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;cN(t),JO(i),eN(n),ai().bootstrap&&dN()};const pN={},gN={},mN={getTranslations(){return{}}},vN={},yN={namespaced:!0,state:pN,getters:mN,mutations:gN,actions:vN};class Be{static getDatasets(t,i){return V.request(`/organization/${t}/datasets`,{type:"GET",params:{...i}})}static getDatasetsAdmin(t){return V.request("/admin/datasets",{type:"GET",params:{...t}})}static getDataset(t,i,n){return V.request(`/organization/${t}/datasets/${i}`,{type:"GET",params:{...n}})}static createDataset(t,i){return V.request(`/organization/${t}/datasets`,{type:"POST",data:i})}static editDataset(t,i,n){return V.request(`/organization/${t}/datasets/${i}`,{type:"PUT",data:n})}static deleteDataset(t,i){return V.request(`/organization/${t}/datasets?dataset_ids=${i.join(",")}`,{type:"DELETE"})}static getImages(t,i){return V.request(`/organization/${t}/datasets/${i}/images`,{type:"GET"})}static duplicateDataset(t,i){return V.request(`/organization/${t}/datasets/${i}/duplicate`,{type:"POST"})}static preprocess(t,i){return V.request(`/organization/${t}/datasets/${i}/preprocess`,{type:"POST"})}static retile(t,i){return V.request(`/organization/${t}/datasets/${i}/retile`,{type:"POST"})}static runAllCommands(t,i){return V.request(`/organization/${t}/datasets/${i}/run-all-commands`,{type:"POST"})}static runUserCommands(t,i){return V.request(`/organization/${t}/datasets/${i}/run-user-commands`,{type:"POST"})}static deletePointWorkerCommand(t,i,n){return V.request(`/organization/${t}/datasets/${i}/point-worker/${n}`,{type:"DELETE"})}static createVirtualTiles(t,i,n){return V.request(`/organization/${t}/datasets/${i}/virtual_tiles`,{type:"POST",data:n})}static removeVirtualTiles(t,i){return V.request(`/organization/${t}/datasets/${i}/virtual_tiles`,{type:"DELETE"})}static getVirtualTiles(t,i,n){return V.request(`/organization/${t}/datasets/${i}/virtual_tiles`,{type:"GET",params:n})}static updateVirtualTile(t,i,n,r){return V.request(`/organization/${t}/datasets/${i}/virtual_tiles/${n}`,{type:"PUT",data:r})}static bulkUpdateVirtualTiles(t,i,n){return V.request(`/organization/${t}/datasets/${i}/virtual_tiles/bulk_update`,{type:"POST",data:n})}static getDatasetRasters(t,i){return V.request(`/organization/${t}/datasets/${i}/rasters_visualize`,{type:"GET"})}static getPresignedRasterUrl(t,i){return V.request(`/organization/${t}/rasters/${i}/presign`,{type:"GET"})}static get3DObjects(t,i){return V.request(`/organization/${t}/datasets/${i}/objects`,{type:"GET"})}static shareDataset(t,i,n){return V.request(`/organization/${t}/share-with-user`,{type:"POST",data:{asset_model:"App\\Domains\\Datasets\\Models\\DatasetModel",asset_id:i,action:"read",user_email:n}})}static setDatasetFreeToDownload(t,i){return V.request("/admin/free-datasets",{type:"POST",data:{dataset_id:t,enabled:i}})}static getVectorDatasetVectors(t,i){return V.request(`/organization/${t}/datasets/${i}/vectors`,{type:"GET"})}static editVectorDatasetVector(t,i,n,r){return V.request(`/organization/${t}/datasets/${i}/vectors/${n}`,{type:"PUT",data:r})}static deleteVectorDatasetVector(t,i,n){return V.request(`/organization/${t}/datasets/${i}/vectors/${n}`,{type:"DELETE"})}static getForestInventoryReport(t,i){return V.request(`/organization/${t}/datasets/${i}/forest_inventory_report/show`,{type:"GET"})}static getForestInventoryReportV2(t,i){return V.request(`/organization/${t}/datasets/${i}/forest_inventory_report_v2/show`,{type:"GET"})}static convertSchema(t,i,n){return V.request(`/admin/datasets/pointclouds/${t}/convert-schema`,{type:"PUT",data:{pointcloud_schema:i,source_folder:n}})}}const{t:rt}=nt.global;function Bf(){this.status=404,this.data={message:"Dataset not found"}}const bN={stroke:{color:"#3399CC",width:1.25},fill:{color:"#ffffff",opacity:.4},point:{radius:5,fill:{color:"#ffffff",opacity:.4},stroke:{color:"#3399CC",width:1.25}}},_N={datasets:[],virtualTiles:{},pagination:{},DEFAULT_VECTOR_STYLES:bN},wN={set(e,t){const i=e.datasets.findIndex(n=>n.id===t.id);i>=0?e.datasets.splice(i,1,t):e.datasets.push(t)}},SN={get(e){return t=>e.datasets.find(i=>i.id===t)},getVirtualTiles(e){return t=>e.virtualTiles[t]||[]},baseDatasetDecorators(e,t,i){var n,r;return(r=(n=i.Auth)==null?void 0:n.user)!=null&&r.is_guest?[ke.dataset.user]:[ke.dataset.user,ke.dataset.tags]},getDatasetOrganizationId(e,t,i){return n=>{var s;const r=t.get(n);return r&&r.organization_id?r.organization_id:(s=i.Auth)==null?void 0:s.organization.id}}},AN={getAsync({dispatch:e,getters:t,rootState:i},{datasetId:n,organizationId:r,params:s}){return r===void 0&&(r=i.Auth.organization.id),Be.getDataset(r,n,{...s,decorators:[...(s==null?void 0:s.decorators)||[],...t.baseDatasetDecorators]}).then(({data:c})=>{if(c.length===0)throw new Bf;return e("set",c)})},getAsyncAdmin({dispatch:e,getters:t},{datasetId:i,params:n}){return Be.getDatasetsAdmin({"filter[id]":`i=${i}`,...n,decorators:[...(n==null?void 0:n.decorators)||[],...t.baseDatasetDecorators]}).then(({data:r})=>{if((r==null?void 0:r.items.length)===0)throw new Bf;return e("set",r==null?void 0:r.items[0])})},getDatasetsAsync({dispatch:e,state:t,rootState:i,getters:n},r){return Be.getDatasets(i.Auth.organization.id,{order_by:"created_at",order_direction:"desc",...r,decorators:[...(r==null?void 0:r.decorators)||[],...n.baseDatasetDecorators]}).then(({data:s})=>{t.datasets=[],s.items.map(c=>e("set",c)),t.pagination=s.pagination}).then(()=>t.datasets)},createDataset(e,t){return Be.createDataset(e.rootState.Auth.organization.id,t).then(({data:i})=>(e.dispatch("Notifications/displayToastNotification",{msg:rt("Dataset created successfully."),type:"success"},{root:!0}),i)).catch(i=>{throw e.dispatch("Notifications/displayToastNotification",{msg:rt("Dataset creation failed."),type:"error"},{root:!0}),i})},duplicateDataset(e,t){return Be.duplicateDataset(e.rootState.Auth.organization.id,t).then(({data:i})=>(e.dispatch("Notifications/displayToastNotification",{msg:rt("Dataset duplicated successfully."),type:"success"},{root:!0}),i)).catch(i=>{throw e.dispatch("Notifications/displayToastNotification",{msg:rt("Dataset duplication failed."),type:"error"},{root:!0}),i})},preprocess(e,t){return Be.preprocess(e.rootState.Auth.organization.id,t).then(({data:i})=>(e.dispatch("Notifications/displayToastNotification",{msg:rt("Dataset preprocessing started successfully."),type:"success"},{root:!0}),i)).catch(i=>{throw e.dispatch("Notifications/displayToastNotification",{msg:rt("Dataset preprocess failed."),type:"error"},{root:!0}),i})},retile(e,t){return Be.retile(e.rootState.Auth.organization.id,t).then(({data:i})=>(e.dispatch("Notifications/displayToastNotification",{msg:rt("Dataset re-tiling started successfully."),type:"success"},{root:!0}),i)).catch(i=>{throw e.dispatch("Notifications/displayToastNotification",{msg:rt("Dataset re-tile failed."),type:"error"},{root:!0}),i})},runAllCommands(e,t){return Be.runAllCommands(e.rootState.Auth.organization.id,t).then(({data:i})=>(e.dispatch("Notifications/displayToastNotification",{msg:rt("Dataset applying all commands started successfully."),type:"success"},{root:!0}),i)).catch(i=>{throw e.dispatch("Notifications/displayToastNotification",{msg:rt("Dataset run all commands failed."),type:"error"},{root:!0}),i})},runUserCommands(e,t){return Be.runUserCommands(e.rootState.Auth.organization.id,t).then(({data:i})=>i)},editDataset(e,t){return t!=null&&t.tags&&(t.tags=t.tags.map(i=>typeof i!="string"?i.tag_id:i)),Be.editDataset(e.rootState.Auth.organization.id,t.id,t).then(({data:i})=>(e.dispatch("Notifications/displayToastNotification",{msg:rt("Dataset updated successfully."),type:"success"},{root:!0}),i)).catch(i=>{throw e.dispatch("Notifications/displayToastNotification",{msg:rt("Dataset update failed."),type:"error"},{root:!0}),i})},delete({commit:e,dispatch:t,rootGetters:i,rootState:n},r){return Be.deleteDataset(n.Auth.organization.id,[r]).then(async({data:s})=>{const c=i["AppState/ImageDatasets/getDatasetImageDataset"](r);return c&&await e("AppState/ImageDatasets/delete",c.id,{root:!0}),t("Notifications/displayToastNotification",{msg:rt("Dataset deleted successfully."),type:"success"},{root:!0}),s[0]}).catch(s=>{throw t("Notifications/displayToastNotification",{msg:rt("Dataset deletion failed."),type:"error"},{root:!0}),s})},bulkDelete({commit:e,dispatch:t,rootGetters:i,rootState:n},r){return Be.deleteDataset(n.Auth.organization.id,[r]).then(async({data:s,index:c})=>{const u=i["AppState/ImageDatasets/getDatasetImageDataset"](r[c]);return u&&await e("AppState/ImageDatasets/delete",u.id,{root:!0}),t("Notifications/displayToastNotification",{msg:rt("{value} datasets deleted successfully.",{value:s.length}),type:"success"},{root:!0}),s}).catch(s=>{throw t("Notifications/displayToastNotification",{msg:rt("Datasets deletion failed."),type:"error"},{root:!0}),s})},getPointcloudDataset(e,t){return Be.getDataset(e.getters.getDatasetOrganizationId(t),t,{decorators:[ke.dataset.datasource,ke.dataset.pointcloudDataset,ke.dataset.pointclouds]}).then(({data:i})=>i)},getImages(e,t){return Be.getImages(e.rootState.Auth.organization.id,t).then(({data:i})=>i)},async set({dispatch:e,commit:t,getters:i},n){const{image_dataset:r,user:s,datasource:c}=n;return r&&await e("AppState/ImageDatasets/set",r,{root:!0}),s&&await e("AppState/Users/set",s,{root:!0}),c&&await e("AppState/Datasources/set",c,{root:!0}),t("set",n),i.get(n.id)},deletePointWorkerCommand(e,{datasetId:t,commandId:i}){return Be.deletePointWorkerCommand(e.rootState.Auth.organization.id,t,i).then(({data:n})=>n)},createVirtualTiles(e,{datasetId:t,method:i,length:n}){return Be.createVirtualTiles(e.rootState.Auth.organization.id,t,{method:i,length:n}).then(({data:r})=>r)},getVirtualTiles({state:e,rootState:t},{datasetId:i,params:n}){return Be.getVirtualTiles(t.Auth.organization.id,i,n).then(({data:r})=>(e.virtualTiles[i]=r,r))},removeVirtualTiles({state:e,rootState:t},i){return Be.removeVirtualTiles(t.Auth.organization.id,i).then(({data:n})=>(e.virtualTiles[i]=[],n))},updateVirtualTile({state:e,rootState:t},{datasetId:i,tileId:n,assignee:r,status:s,timeSpent:c}){return Be.updateVirtualTile(t.Auth.organization.id,i,n,{assignee:r,qc_status:s,time_spent:c}).then(({data:u})=>{const o=e.virtualTiles[i].findIndex(h=>h.id===n);return e.virtualTiles[i].splice(o,1,{...e.virtualTiles[i][o],assignee:r,qc_status:s,time_spent:c}),u})},async bulkUpdateVirtualTiles({rootState:e,dispatch:t},{datasetId:i,tileIds:n,assignee:r,status:s}){try{const{data:c}=await Be.bulkUpdateVirtualTiles(e.Auth.organization.id,i,{tile_ids:n,assignee:r,qc_status:s});return await t("getVirtualTiles",{datasetId:i}),c}catch(c){throw t("Notifications/displayToastNotification",{msg:rt("Failed to update virtual tiles"),type:"error"},{root:!0}),c}},getDatasetRasters(e,{datasetOrganizationId:t,datasetId:i}){return Be.getDatasetRasters(t,i).then(({data:n})=>n)},getPresignedRasterUrl(e,{rasterOrganizationId:t,rasterId:i}){return Be.getPresignedRasterUrl(t,i).then(({data:n})=>n)},get3DObjects(e,t){return Be.get3DObjects(e.rootState.Auth.organization.id,t).then(({data:i})=>i)},shareDataset(e,{datasetId:t,email:i}){return Be.shareDataset(e.rootState.Auth.organization.id,t,i).then(({data:n})=>(e.dispatch("Notifications/displayToastNotification",{msg:rt("Dataset shared successfully."),type:"success"},{root:!0}),n)).catch(n=>{throw e.dispatch("Notifications/displayToastNotification",{msg:rt("Failed to share dataset."),type:"error"},{root:!0}),n})},setDatasetFreeToDownload(e,{datasetId:t,enabled:i}){return Be.setDatasetFreeToDownload(t,i).then(()=>{e.dispatch("Notifications/displayToastNotification",{msg:rt(i?"Dataset was made free to download.":"Dataset was made pay to download."),type:"success"},{root:!0})}).catch(n=>{var s,c,u;let r=rt(i?"Failed to make dataset free to download.":"Failed to make dataset pay to download.");throw n.status===422&&((u=(c=(s=n==null?void 0:n.data)==null?void 0:s.errors)==null?void 0:c.dataset_id)==null?void 0:u.includes("The dataset id has already been taken."))&&(r=rt("Dataset was already made free to download.")),e.dispatch("Notifications/displayToastNotification",{msg:r,type:"error"},{root:!0}),n})},getVectorDatasetVectors(e,{datasetId:t}){return Be.getVectorDatasetVectors(e.rootState.Auth.organization.id,t).then(({data:i})=>i)},editVectorDatasetVector({dispatch:e,rootState:t},{datasetId:i,vectorId:n,payload:r}){return Be.editVectorDatasetVector(t.Auth.organization.id,i,n,r).then(({data:s})=>(e("Notifications/displayToastNotification",{msg:"Vector updated successfully.",type:"success"},{root:!0}),s)).catch(s=>{throw e("Notifications/displayToastNotification",{msg:"Vector update failed.",type:"error"},{root:!0}),s})},deleteVectorDatasetVector({dispatch:e,rootState:t},{datasetId:i,vectorId:n}){return Be.deleteVectorDatasetVector(t.Auth.organization.id,i,n).then(({data:r})=>(e("Notifications/displayToastNotification",{msg:"Vector deleted successfully.",type:"success"},{root:!0}),r)).catch(r=>{throw e("Notifications/displayToastNotification",{msg:"Vector deletion failed.",type:"error"},{root:!0}),r})},getForestInventoryReport(e,{datasetId:t}){return Be.getForestInventoryReport(e.rootState.Auth.organization.id,t).then(({data:i})=>i)},getForestInventoryReportV2(e,{datasetId:t}){return Be.getForestInventoryReportV2(e.rootState.Auth.organization.id,t).then(({data:i})=>i)},convertSchema(e,{datasetId:t,convertTo:i,sourceFolder:n}){return Be.convertSchema(t,i,n).then(({data:r})=>r)}},CN={namespaced:!0,state:_N,getters:SN,mutations:wN,actions:AN},xN={datasources:[]},TN={set(e,t){const i=e.datasources.findIndex(n=>n.id===t.id);i>=0?e.datasources.splice(i,1,t):e.datasources.push(t)},delete(e,t){const i=e.datasources.findIndex(({id:n})=>n===t);e.datasources.splice(i,1)}},$N={get(e){return t=>e.datasources.find(({id:i})=>i===t)}},MN={async set({commit:e},t){return e("set",t),t}},EN={namespaced:!0,state:xN,getters:$N,mutations:TN,actions:MN},kN={node_types:[],loading:{},settings:{all_loaded:!1}},PN={set(e,t){const i=e.node_types.findIndex(({id:n})=>n===t.id);i>=0?e.node_types.splice(i,1,t):e.node_types.push(t)},setSetting:Cv,setLoading:xv,deleteLoading:Tv},LN={get(e){return t=>e.node_types.find(({id:i})=>i===t)},getAll(e){return()=>e.node_types},getSetting:$v},RN={getAllAsync({getters:e,dispatch:t}){return e.getSetting("all_loaded")?e.getAll():t("forceGetAll")},forceGetAll({state:e,commit:t,getters:i}){if(e.loading.all)return e.loading.all;const n=Ke.getFlowNodeTypes().then(({data:r})=>(r.forEach(s=>{t("set",s)}),t("setSetting",{key:"all_loaded",value:!0}),i.getAll())).finally(()=>{t("deleteLoading","all")});return t("setLoading",{key:"all",promise:n}),n}},IN={state:kN,getters:LN,mutations:PN,actions:RN,namespaced:!0},ON={image_datasets:[]},NN={set(e,t){const i=e.image_datasets.findIndex(n=>n.id===t.id);i>=0?e.image_datasets.splice(i,1,t):e.image_datasets.push(t)},delete(e,t){const i=e.image_datasets.findIndex(n=>n.id===t);i>=0&&e.image_datasets.splice(i,1)}},DN={getImageDatasets(e){return t=>e.image_datasets.find(i=>i.id===t)},getDatasetImageDataset(e){return t=>e.image_datasets.find(i=>i.dataset_id===t)}},FN={set({commit:e},t){return e("set",t),t}},BN={namespaced:!0,state:ON,getters:DN,mutations:NN,actions:FN};class VN{static getImages(t,i={},n={}){return V.request(`/organization/${t}/images`,{type:"GET",params:i,...n})}static getImage(t,i,n={},r={}){return V.request(`/organization/${t}/images/${i}`,{type:"GET",params:n,...r})}static createImage(t,i,n={}){return V.request(`/organization/${t}/images`,{type:"POST",data:i,...n})}static updateImage(t,i,n,r={}){return V.request(`/organization/${t}/images/${i}`,{type:"PUT",data:n,...r})}static deleteImage(t,i,n,r={}){return V.request(`/organization/${t}/images/${i}`,{type:"DELETE",data:n,...r})}}const zN={images:[]},HN={update(e,t){const i=t.id;return VN.updateImage(e.rootState.Auth.organization.id,i,t).then(({data:n})=>n)}},UN={namespaced:!0,state:zN,actions:HN};class To{static getCommands(t,i){return V.request(`/organization/${t}/point-worker/get-commands/${i}`,{type:"GET"})}static setCommand(t,i){return V.request(`/organization/${t}/point-worker/set-command`,{type:"POST",data:i})}static getCommandById(t,i){return V.request(`/organization/${t}/point-worker/get-command-by-id/${i}`,{type:"GET"})}static getNextInstanceId(t,i){return V.request(`/organization/${t}/point-worker/get-next-instance-id/${i}`,{type:"GET"})}}const WN={pendingCommands:{}},jN={setPendingCommands(e,{datasetId:t,commands:i}){e.pendingCommands[t]=i},removePendingCommands(e,{datasetId:t,commandIds:i}){e.pendingCommands[t]=e.pendingCommands[t].filter(n=>!i.includes(n.id))},addPendingCommand(e,{datasetId:t,command:i}){e.pendingCommands[t]||(e.pendingCommands[t]=[]),e.pendingCommands[t].push(i)}},GN={},qN={getCommands(e,t){return To.getCommands(e.rootState.Auth.organization.id,t).then(({data:i})=>(e.commit("setPendingCommands",{datasetId:t,commands:i.filter(n=>n.potree_status==="pending")}),i))},getCommandById(e,t){return To.getCommandById(e.rootState.Auth.organization.id,t).then(({data:i})=>i)},setCommand(e,t){return To.setCommand(e.rootState.Auth.organization.id,t).then(({data:i})=>{if(e.rootState.Auth.organization.apply_point_worker_commands)return i;const n=e.rootState.Auth.user.id;return e.commit("addPendingCommand",{datasetId:t.dataset_id,command:{id:i.id,potree_status:"pending",created_by:n}}),i})},async undoCommand(e,t){const i=e.state.pendingCommands[t].slice(-1)[0].id;return e.dispatch("AppState/Datasets/deletePointWorkerCommand",{datasetId:t,commandId:i},{root:!0}).then(({success:n})=>(e.commit("removePendingCommands",{datasetId:t,commandIds:[n]}),n)).catch(n=>{n.status===404&&e.commit("removePendingCommands",{datasetId:t,commandIds:[i]})})},runAllCommands(e,t){return e.dispatch("AppState/Datasets/runAllCommands",t,{root:!0}).then(i=>(e.commit("removePendingCommands",{datasetId:t,commandIds:i}),i))},runUserCommands(e,t){return e.dispatch("AppState/Datasets/runUserCommands",t,{root:!0}).then(i=>(e.commit("removePendingCommands",{datasetId:t,commandIds:i}),i))},getNextInstanceId(e,t){return To.getNextInstanceId(e.rootState.Auth.organization.id,t).then(({data:i})=>i)}},KN={namespaced:!0,state:WN,getters:GN,mutations:jN,actions:qN};class Hn{static getProjects(t,i,n={}){return V.request(`/organization/${t}/projects`,{type:"GET",params:i,...n})}static getProjectsAdmin(t){return V.request("/admin/projects",{type:"GET",params:t})}static getProject(t,i,n,r={}){return V.request(`/organization/${t}/projects/${i}`,{type:"GET",params:n,...r})}static createProject(t,i,n={}){return V.request(`/organization/${t}/projects`,{type:"POST",data:i,...n})}static editProject(t,i,n,r={}){return V.request(`/organization/${t}/projects/${i}`,{type:"PUT",data:n,...r})}static removeProject(t,i,n={}){return V.request(`/organization/${t}/projects/${i}`,{type:"DELETE",...n})}}const YN={projectId:null,datasets:[],datasetsPagination:{},flows:[],flowsPagination:{},flowExecutions:[],flowExecutionsPagination:{},multiViews:[],multiViewsPagination:{},loading:{datasets:!0,flows:!0,flowExecutions:!0,multiViews:!0}},XN={setDatasets(e,{items:t,pagination:i}){e.datasets=t,e.datasetsPagination=i},setFlows(e,{items:t,pagination:i}){e.flows=t,e.flowsPagination=i},setFlowExecutions(e,{items:t,pagination:i}){e.flowExecutions=t,e.flowExecutionsPagination=i},setMultiViews(e,{items:t,pagination:i}){e.multiViews=t,e.multiViewsPagination=i},setLoading(e,{key:t,value:i}){e.loading[t]=i}},QN={async setProjectId({state:e},t){e.projectId=t},async getDatasets({state:e,commit:t,rootState:i},n){var r,s;return t("setLoading",{key:"datasets",value:!0}),Be.getDatasets(i.Auth.organization.id,{order_by:"created_at",order_direction:"desc",attributes:"with_project_id","filter[project_id]":e.projectId,...n,decorators:[...(n==null?void 0:n.decorators)||[],...(s=(r=i.Auth)==null?void 0:r.user)!=null&&s.is_guest?[ke.dataset.user]:[ke.dataset.user,ke.dataset.tags]]}).then(({data:c})=>(t("setDatasets",c),e.datasets)).finally(()=>{t("setLoading",{key:"datasets",value:!1})})},getFlows({state:e,commit:t,rootState:i},n){return t("setLoading",{key:"flows",value:!0}),Ke.getFlows(i.Auth.organization.id,{order_by:"created_at",order_direction:"desc",decorators:[ke.flow.flow_details],"filter[project_id]":e.projectId,"filter[is_template]":"b=0",...n}).then(({data:r})=>(t("setFlows",r),e.flows)).finally(()=>{t("setLoading",{key:"flows",value:!1})})},getFlowExecutions({state:e,commit:t,rootState:i},n){return t("setLoading",{key:"flowExecutions",value:!0}),Ke.getFlowExecutions(i.Auth.organization.id,{"filter[project_id]":`u=${e.projectId}`,order_by:"created_at",order_direction:"desc",...n}).then(({data:r})=>(t("setFlowExecutions",r),e.flowExecutions)).finally(()=>{t("setLoading",{key:"flowExecutions",value:!1})})},async getMultiViews({state:e,commit:t,dispatch:i},n){t("setLoading",{key:"multiViews",value:!0});const r=await i("AppState/MultiViews/getMultiViewsWithViewports",{projectId:e.projectId,params:{order_by:"created_at",order_direction:"desc",...n}},{root:!0}),s={id:`project-${e.projectId}`,multiview_title:"Default",isDefault:!0,projectId:e.projectId,sync_viewports:!1,viewports:[],viewportRows:[]};return r.items.unshift(s),t("setMultiViews",r),t("setLoading",{key:"multiViews",value:!1}),e.multiViews}},JN={namespaced:!0,state:YN,mutations:XN,actions:QN},{t:Wn}=nt.global;function Il(){this.status=404,this.data={message:Wn("Project not found")}}const ZN={projects:[],pagination:{}},eD={SET_PROJECTS:(e,t=[])=>{e.projects=t},delete(e,t){const i=e.projects.findIndex(({id:n})=>n===t);e.projects.splice(i,1)}},tD={getAsync(e,{projectId:t,params:i}){return Hn.getProject(e.rootState.Auth.organization.id,t,i).then(({data:n})=>{if(n.length===0)throw new Il;return n})},getProjects({state:e,commit:t,rootState:i},n){return Hn.getProjects(i.Auth.organization.id,{decorators:[ke.project.user],order_by:"created_at",order_direction:"desc",...n}).then(({data:r})=>(t("SET_PROJECTS",r.items),e.pagination=r.pagination,r.items))},getProject(e,t){const i={decorators:[ke.project.user]};return Hn.getProject(e.rootState.Auth.organization.id,t,i).then(({data:n})=>{if(n.length===0)throw new Il;return n})},getProjectAdmin(e,t){const i={decorators:[ke.project.user]};return Hn.getProjectsAdmin({"filter[id]":`i=${t}`,...i}).then(({data:n})=>{if((n==null?void 0:n.items.length)===0)throw new Il;return n.items[0]})},create(e,t){return Hn.createProject(e.rootState.Auth.organization.id,t).then(({data:i})=>(e.dispatch("Notifications/displayToastNotification",{msg:Wn("Project created successfully."),type:"success"},{root:!0}),i)).catch(i=>{throw e.dispatch("Notifications/displayToastNotification",{msg:Wn("Project creation failed."),type:"error"},{root:!0}),i})},update(e,t){const i=t.id;return Hn.editProject(e.rootState.Auth.organization.id,i,t).then(({data:n})=>(e.dispatch("Notifications/displayToastNotification",{msg:Wn("Project updated successfully."),type:"success"},{root:!0}),n)).catch(n=>{throw e.dispatch("Notifications/displayToastNotification",{msg:Wn("Project update failed."),type:"error"},{root:!0}),n})},delete({commit:e,dispatch:t,rootState:i},n){return Hn.removeProject(i.Auth.organization.id,n).then(({data:r})=>(t("Notifications/displayToastNotification",{msg:Wn("Project deleted successfully."),type:"success"},{root:!0}),e("delete",n),r)).catch(r=>{throw t("Notifications/displayToastNotification",{msg:Wn("Project deletion failed."),type:"error"},{root:!0}),r})}},iD={namespaced:!0,state:ZN,mutations:eD,actions:tD,modules:{Details:JN}};class Ol{static createProjectDataset(t,i,n={}){return V.request(`/organization/${t}/project_datasets`,{type:"POST",data:i,...n})}static removeProjectDataset(t,i,n={}){return V.request(`/organization/${t}/project_datasets/${i}`,{type:"DELETE",...n})}static downloadProjectDatasets(t,i){return V.request(`/organization/${t}/project_datasets/${i}/download`,{type:"POST"})}}const{t:$o}=nt.global,nD={project_datasets:[]},rD={},sD={create(e,t){return Ol.createProjectDataset(e.rootState.Auth.organization.id,t).then(({data:i})=>(e.dispatch("Notifications/displayToastNotification",{msg:$o("Dataset successfully added to project."),type:"success"},{root:!0}),i)).catch(i=>{throw e.dispatch("Notifications/displayToastNotification",{msg:$o("Failed to to add dataset to project."),type:"error"},{root:!0}),i})},remove(e,t){return Ol.removeProjectDataset(e.rootState.Auth.organization.id,t).then(({data:i})=>(e.dispatch("Notifications/displayToastNotification",{msg:$o("Dataset successfully removed from project."),type:"success"},{root:!0}),i)).catch(i=>{throw e.dispatch("Notifications/displayToastNotification",{msg:$o("Failed to to remove dataset from project."),type:"error"},{root:!0}),i})},downloadDatasets(e,t){return Ol.downloadProjectDatasets(e.rootState.Auth.organization.id,t).then(({data:i})=>i)}},oD={namespaced:!0,state:nD,mutations:rD,actions:sD},Vf={decorators:[ke.session.user,ke.session.input_ai_model,ke.session.training_dataset,ke.session.validation_dataset]};class hs{static getSessions(t){return V.request(`/organization/${t}/ai-models/ai-training-sessions`,{type:"GET",params:Vf})}static getSession(t,i){return V.request(`/organization/${t}/ai-models/ai-training-sessions/${i}`,{type:"GET",params:Vf})}static createSession(t,i){return V.request(`/organization/${t}/ai-models/ai-training-sessions`,{type:"POST",data:i})}static deleteSession(t,i){return V.request(`/organization/${t}/ai-models/ai-training-sessions/${i}`,{type:"DELETE"})}static getSessionDatasetValidationMetrics(t,i){return V.request(`/organization/${t}/ai-models/ai-training-sessions/${i}/dataset-validation-metrics`,{type:"GET"})}}const{t:Mo}=nt.global,aD={sessions:[]},lD={SET_SESSIONS:(e,t=[])=>{e.sessions=t},REMOVE_SESSION:(e,t)=>{const i=e.sessions.findIndex(n=>n.id===t);i>=0&&e.sessions.splice(i)}},cD={getSessions({commit:e,rootState:t}){return hs.getSessions(t.Auth.organization.id).then(({data:i})=>{e("SET_SESSIONS",i)})},getSession(e,t){return hs.getSession(e.rootState.Auth.organization.id,t).then(({data:i})=>i)},createSession(e,t){return hs.createSession(e.rootState.Auth.organization.id,t).then(({data:i})=>(e.dispatch("Notifications/displayToastNotification",{msg:Mo("Session created successfully."),type:"success"},{root:!0}),i)).catch(i=>{throw e.dispatch("Notifications/displayToastNotification",{msg:Mo("Session creation failed."),type:"error"},{root:!0}),i})},deleteSession(e,{sessionId:t}){return hs.deleteSession(e.rootState.Auth.organization.id,t).then(({data:i})=>(e.dispatch("Notifications/displayToastNotification",{msg:Mo("Session deleted successfully."),type:"success"},{root:!0}),e.commit("REMOVE_SESSION",i.id),i)).catch(i=>{throw e.dispatch("Notifications/displayToastNotification",{msg:Mo("Session deletion failed."),type:"error"},{root:!0}),i})},getSessionDatasetValidationMetrics(e,{sessionId:t}){return hs.getSessionDatasetValidationMetrics(e.rootState.Auth.organization.id,t).then(({data:i})=>i)}},uD={namespaced:!0,state:aD,mutations:lD,actions:cD},st={MAIN_NAVIGATION_TOP:"MAIN_NAVIGATION_TOP",MAIN_NAVIGATION_BOTTOM:"MAIN_NAVIGATION_BOTTOM",MAIN_HEADER_LEFT:"MAIN_HEADER_LEFT",MAIN_HEADER_RIGHT:"MAIN_HEADER_RIGHT",MAIN_CONTENT:"MAIN_CONTENT"},zf="label",si="tool",hD={},dD={pages:{type:zf},"pages/dashboard":{type:si,positions:[{group:1,order:1,contentPosition:st.MAIN_CONTENT,buttonPosition:st.MAIN_NAVIGATION_TOP}],settings:{}},"pages/projects":{type:si,positions:[{group:1,order:2,contentPosition:st.MAIN_CONTENT,buttonPosition:st.MAIN_NAVIGATION_TOP}]},"pages/catalogue":{type:si,positions:[{group:1,order:3,contentPosition:st.MAIN_CONTENT,buttonPosition:st.MAIN_NAVIGATION_TOP}]},"general/flai-hub":{type:si,positions:[{group:1,order:4,contentPosition:st.MAIN_CONTENT,buttonPosition:st.MAIN_NAVIGATION_TOP}]},"pages/ai-models":{type:si,positions:[{group:1,order:5,contentPosition:st.MAIN_CONTENT,buttonPosition:st.MAIN_NAVIGATION_TOP}]},"pages/ai-learning-point":{type:si,positions:[{group:1,order:6,contentPosition:st.MAIN_CONTENT,buttonPosition:st.MAIN_NAVIGATION_TOP}]},"pages/downloads":{type:si,positions:[{group:1,order:7,contentPosition:st.MAIN_CONTENT,buttonPosition:st.MAIN_NAVIGATION_TOP}]},"pages/cli-dashboard":{type:si,positions:[{group:1,order:8,contentPosition:st.MAIN_CONTENT,buttonPosition:st.MAIN_NAVIGATION_TOP}]},"pages/reseller-dashboard":{type:si,positions:[{group:1,order:10,contentPosition:st.MAIN_CONTENT,buttonPosition:st.MAIN_NAVIGATION_TOP}],settings:{}},"pages/admin":{type:si,positions:[{group:1,order:11,contentPosition:st.MAIN_CONTENT,buttonPosition:st.MAIN_NAVIGATION_TOP}],settings:{}},general:{type:zf},"general/user-profile":{type:si,positions:[{group:1,order:1,buttonPosition:st.MAIN_HEADER_RIGHT}]},"general/docs":{type:si,positions:[{group:2,order:1,buttonPosition:st.MAIN_NAVIGATION_BOTTOM}]},"general/support":{type:si,positions:[{group:2,order:2,buttonPosition:st.MAIN_NAVIGATION_BOTTOM}]},...hD},fD={tools:Object.freeze(dD),placeholders:Object.freeze(st),superAdminTools:["pages/admin"],resellerTools:["pages/reseller-dashboard"]},pD={toolsOnPlaceholder(e,t,i,n){let r=window.ENV_VARS.DISABLED_TOOLS||[];return n["Auth/isSuperAdmin"]||(r=r.concat(e.superAdminTools)),n["Auth/isReseller"]||(r=r.concat(e.resellerTools)),Object.keys(e.placeholders).reduce((s,c)=>(s.button[c]=[],s.content[c]=[],Object.entries(e.tools).filter(([u,o])=>!r.includes(u)&&o.positions).forEach(([u,o])=>{o.positions.forEach(h=>{h.buttonPosition===c&&s.button[c].push(u),h.contentPosition===c&&s.content[c].push(u)})}),s),{button:{},content:{}})}},gD={state:fD,getters:pD,namespaced:!0};class Pi{static getUsers(t,i={}){return V.request(`/organization/${t}/users`,{type:"GET",...i})}static inviteUser(t,i,n={}){return V.request(`/organization/${t}/user/invite`,{type:"POST",data:i,...n})}static createUser(t,i){return V.request(`/organization/${t}/users`,{type:"POST",data:i})}static resendInvite(t,i,n={}){return V.request(`/organization/${t}/user/${i}/resend-invitation`,{type:"POST",...n})}static deleteUser(t,i,n={}){return V.request(`/organization/${t}/users/${i}`,{type:"DELETE",...n})}static updateUser(t,i,n,r={}){return V.request(`/organization/${t}/users/${i}`,{type:"PUT",data:n,...r})}static switchToOrganization(t,i={}){return V.request(`/organization/${t}/switch`,{type:"post",...i})}static adminUpdateUserPassword(t,i,n){return V.request(`/organization/${t}/user/${i}/update-password`,{type:"PUT",data:{password:n}})}}const{t:ci}=nt.global,mD={users:[]},vD={set(e,t){const i=e.users.findIndex(({id:n})=>n===t.id);i>=0?e.users.splice(i,1,t):e.users.push(t)},SET_USERS:(e,t=[])=>{e.users=t},delete(e,t){const i=e.users.findIndex(({id:n})=>n===t);e.users.splice(i,1)}},yD={get(e){return t=>e.users.find(({id:i})=>i===t)}},bD={set({commit:e},t){return e("set",t),t},getUsers({commit:e,rootState:t}){return Pi.getUsers(t.Auth.organization.id).then(({data:i})=>{e("SET_USERS",i)})},invite(e,t){return Pi.inviteUser(e.rootState.Auth.organization.id,t).then(({data:i})=>(e.dispatch("Notifications/displayToastNotification",{msg:ci("User invitation successful."),type:"success"},{root:!0}),i)).catch(i=>{throw e.dispatch("Notifications/displayToastNotification",{msg:ci("User invitation failed."),type:"error"},{root:!0}),i})},createUser(e,t){return Pi.createUser(e.rootState.Auth.organization.id,t).then(({data:i})=>(e.dispatch("Notifications/displayToastNotification",{msg:ci("User creation successful."),type:"success"},{root:!0}),i)).catch(i=>{throw e.dispatch("Notifications/displayToastNotification",{msg:ci("User creation failed."),type:"error"},{root:!0}),i})},resendInvite(e,t){return Pi.resendInvite(e.rootState.Auth.organization.id,t).then(({data:i})=>(e.dispatch("Notifications/displayToastNotification",{msg:ci("Successfully resend user invite."),type:"success"},{root:!0}),i)).catch(i=>{throw e.dispatch("Notifications/displayToastNotification",{msg:ci("Failed to resend user invite."),type:"error"},{root:!0}),i})},switch(e,t){return Pi.switchToOrganization(t).then(()=>e.dispatch("Auth/logout",{},{root:!0})).then(()=>window.location.reload())},delete({commit:e,dispatch:t,rootState:i},n){return Pi.deleteUser(i.Auth.organization.id,n).then(({data:r})=>(t("Notifications/displayToastNotification",{msg:ci("User deleted successfully."),type:"success"},{root:!0}),e("delete",n),r)).catch(r=>{throw t("Notifications/displayToastNotification",{msg:ci("User deletion failed."),type:"error"},{root:!0}),r})},update(e,t){const i=t.id;return Pi.updateUser(e.rootState.Auth.organization.id,i,t).then(({data:n})=>(e.dispatch("Notifications/displayToastNotification",{msg:ci("User updated successfully."),type:"success"},{root:!0}),n)).catch(n=>{throw e.dispatch("Notifications/displayToastNotification",{msg:ci("User update failed."),type:"error"},{root:!0}),n})},adminUpdateUserPassword(e,{id:t,password:i}){return Pi.adminUpdateUserPassword(e.rootState.Auth.user_active_organization_id,t,i).then(({data:n})=>(e.dispatch("Notifications/displayToastNotification",{msg:ci("User password updated successfully."),type:"success"},{root:!0}),n)).catch(n=>{throw e.dispatch("Notifications/displayToastNotification",{msg:ci("User password update failed."),type:"error"},{root:!0}),n})}},_D={state:mD,getters:yD,mutations:vD,actions:bD,namespaced:!0};class xn{static getOrganizations(t,i={}){return V.request("/organizations",{type:"GET",params:t,...i})}static getOrganization(t,i,n={}){return V.request(`/organizations/${t}/show`,{type:"GET",params:i,...n})}static createOrganization(t,i,n={}){return V.request("/organizations",{type:"POST",data:t,params:i,...n})}static updateOrganization(t,i,n={}){return V.request(`/organizations/${t}`,{type:"PUT",data:i,...n})}}const{t:Eo}=nt.global,wD={organizations:[],pagination:{}},SD={SET_ORGANIZATIONS:(e,t=[])=>{e.organizations=t.items,e.pagination=t.pagination}},AD={getAsync(e,{organizationId:t,params:i}){return xn.getOrganization(t,i).then(({data:n})=>n)},getOrganizations({commit:e},t){return xn.getOrganizations(t).then(({data:i})=>(e("SET_ORGANIZATIONS",i),i.items))},create(e,t){return xn.createOrganization(t).then(({data:i})=>(e.dispatch("Notifications/displayToastNotification",{msg:Eo("Organization created successfully."),type:"success"},{root:!0}),i)).catch(i=>{throw e.dispatch("Notifications/displayToastNotification",{msg:Eo("Organization creation failed."),type:"error"},{root:!0}),i})},updateOrganization(e,t){return xn.updateOrganization(t.id,t).then(({data:i})=>(e.dispatch("Notifications/displayToastNotification",{msg:Eo("Organization updated successfully."),type:"success"},{root:!0}),i)).catch(i=>{throw e.dispatch("Notifications/displayToastNotification",{msg:Eo("Organization update failed."),type:"error"},{root:!0}),i})}},CD={namespaced:!0,state:wD,mutations:SD,actions:AD};class xD{static getFailedJobs(t,i={}){return V.request("/failed-jobs",{type:"GET",params:t,...i})}}const TD={failed_jobs:[],pagination:{}},$D={SET_FAILED_JOBS:(e,t=[])=>{e.failed_jobs=t},SET_PAGINATION:(e,t={})=>{e.pagination=t}},MD={getFailedJobs({commit:e},t){return xD.getFailedJobs(t).then(({data:i})=>{e("SET_FAILED_JOBS",i.items),e("SET_PAGINATION",i.pagination)})}},ED={namespaced:!0,state:TD,mutations:$D,actions:MD};class Hf{static getFailedPublishEvents(t,i={}){return V.request("/failed-publish-events",{type:"GET",params:t,...i})}static republishFailedPublishEvents(t,i,n={}){return V.request(`/failed-publish-events/${t}/republish`,{type:"POST",data:{},params:i,...n})}}const kD={failedPublishEvents:[],pagination:{}},PD={SET_FAILED_PUBLISH_EVENTS:(e,t=[])=>{e.failedPublishEvents=t},SET_PAGINATION:(e,t={})=>{e.pagination=t}},LD={getFailedPublishEvents({commit:e},t){return Hf.getFailedPublishEvents(t).then(({data:i})=>{e("SET_FAILED_PUBLISH_EVENTS",i.items),e("SET_PAGINATION",i.pagination)})},republish(e,t){return Hf.republishFailedPublishEvents(t).then(({data:i})=>i)}},RD={namespaced:!0,state:kD,mutations:PD,actions:LD};class vr{static createDownload(t,{items:i,options:n,datasource:r}){return V.request(`/organization/${t}/downloads`,{type:"POST",data:{items:i,export_options:n,export_datasource:r}})}static getDownloads(t,i,n={}){return V.request(`/organization/${t}/downloads`,{type:"GET",params:{...i},...n})}static getDownloadUrl(t,i,n,r={}){return V.request(`/organization/${t}/file-downloads/${i}/download`,{type:"GET",params:{...n},...r})}static makeFreeDownload(t){return V.request(`/file-downloads/${t}/make-free`,{type:"POST"})}static getConnectedPayableItems(t,i){return V.request(`/organization/${t}/file-downloads/connected-payable-items`,{type:"GET",params:{download_file_ids:i}})}static getNonAppliedPUInfo(t,i){return V.request(`/organization/${t}/file-downloads/${i}/non-applied-pu-info`,{type:"GET"})}}const{t:ID}=nt.global,OD={projects:[],downloads:[],pagination:{}},ND={set(e,t){const i=e.downloads.findIndex(n=>n.id===t.id);i>=0?e.downloads.splice(i,1,t):e.downloads.push(t)}},DD={download({commit:e,dispatch:t,rootState:i},n){return vr.createDownload(i.Auth.organization.id,n).then(({data:r})=>r)},getDownloadsAsync({commit:e,state:t,rootState:i},n){return vr.getDownloads(i.Auth.organization.id,{decorators:["files","queue_items"],order_by:"created_at",order_direction:"desc",...n}).then(({data:r})=>{t.downloads=[],r.items.map(s=>e("set",s)),t.pagination=r.pagination}).then(()=>t.downloads)},getDownloadUrl({commit:e,dispatch:t,rootState:i},{downloadFileId:n,tryDownload:r}){return vr.getDownloadUrl(i.Auth.organization.id,n,{tryDownload:r}).then(({data:s})=>s)},makeFreeDownload(e,t){return vr.makeFreeDownload(t).then(({data:i})=>{e.commit("set",i),e.dispatch("Notifications/displayToastNotification",{msg:ID("Download is now free."),type:"success"},{root:!0})})},getConnectedPayableItems({rootState:e},t){return vr.getConnectedPayableItems(e.Auth.organization.id,t).then(({data:i})=>i)},getNonAppliedPUInfo({rootState:e},t){return vr.getNonAppliedPUInfo(e.Auth.organization.id,t).then(({data:i})=>i)}},FD={namespaced:!0,state:OD,mutations:ND,actions:DD},DB={INVOICE:"invoice",CARD:"card"},FB={SUCCESS:"success",CANCEL:"cancel"},BB={CANCEL_AT_PERIOD_END:"cancel_at_period_end"},VB={ACTIVE_SUBSCRIPTION:"active_subscription"},zB={ACTIVE:"active"};class lt{static getBillingBundles(t={},i={}){return V.request("/billing/bundles-valid",{type:"GET",params:{decorators:[ke.billing.billing_bundle_limits,ke.billing.billing_bundle_price],...t},options:i})}static getBillingBundle(t,i={},n={}){const r=`/billing/bundles/${t}`;return V.request(r,{type:"GET",params:{decorators:[ke.billing.billing_bundle_limits,ke.billing.billing_bundle_price],...i},options:n})}static createBillingOrder(t){const i="/billing/orders";return V.request(i,{type:"POST",data:t})}static cancelBillingOrderSubscription(t,i){const n=`/billing/orders/subscriptions/${t}/cancel`;return V.request(n,{type:"POST",data:i})}static renewBillingOrderSubscription(t){const i=`/billing/orders/subscriptions/${t}/renew`;return V.request(i,{type:"POST"})}static getBillingOrder(t,i={},n={}){const r=`/billing/orders/${t}`;return V.request(r,{type:"GET",params:i,options:n})}static getOrganizationBilling(t,i={},n={}){const r=`/organizations/${t}/consumption`;return V.request(r,{type:"GET",params:i,options:n})}static getOrganizationBillingByBillingPeriod(t,i,n={},r={}){const s=`/organizations/${t}/consumption/billing-period/${i}`;return V.request(s,{type:"GET",params:n,options:r})}static getAllOrganizationsBilling(t={},i={}){return V.request("/organizations/consumption",{type:"GET",params:t,options:i})}static changeOrganizationBillingPlan(t,i,n,r={}){return V.request(`/organizations/${t}/billing-bundle`,{type:"PUT",data:{billing_bundle_id:i,force_flags:n},...r})}static getOrganizationBilledFlowExecutions(t){return V.request(`/organization/${t.organizationId}/flow-execution`,{type:"GET",params:{decorators:[ke.flow_executions.node_executions_billed_processing_units],...t}})}static cancelFlowExecutionBilling(t,i){return V.request(`/flow-execution/organization/${t}/execution/${i}/cancel_processing_units`,{type:"POST"})}static getBillingCountries(t,i={}){return V.request("/billing/countries",{type:"GET",params:t,...i})}static getBillingCountry(t){return V.request(`/billing/countries/${t}`,{type:"GET"})}static orderPayableItems(t){return V.request("/billing/orders/payable-items",{type:"POST",data:t})}static getMinimumOrder(t,i={}){return V.request("/billing/minimum-order",{type:"GET",params:t,...i})}static getBulkDiscount(t){return V.request(`/public/billing/bulk-discounts/discount-pus/${t}`,{type:"GET"})}static getOrganizationOrders(t,i){return V.request(`/organizations/${t}/orders`,{type:"GET",params:i})}static getOrganizationOrder(t,i){return V.request(`/organizations/${t}/orders/${i}`,{type:"GET"})}static getAllOrganizationsOrders(t){return V.request("/organizations/orders",{type:"GET",params:t})}static getOrder(t){return V.request(`/organizations/orders/${t}`,{type:"GET"})}static getPaymentInvoicePresignUrl(t){return V.request(`/billing/payments/${t}/download-invoice`,{type:"GET"})}static cancelChildOrder(t){return V.request(`/billing/orders/subsidiary-orders/${t}/cancel`,{type:"POST"})}static getAvailableGrantedProcessingUnits(t){return V.request(`/billing/available-granted-resources/processing_units/organizations/${t}`,{type:"GET"})}}const{t:Gt}=nt.global,BD={organizationBillings:{},organizationBillingsBundle:{},organizationBillingPeriods:{},billingResourceNamePrices:{},billingBundles:[],billedFlows:[],billedFlowsPagination:{},billingCountries:[],billingCountriesPagination:{},minimumOrder:{},displayNames:{processing_units:"Processing units",storage:"Storage",users:"Users"},units:{storage:"GB",compute_execution_time:"s"},orders:[],ordersPagination:{},currencies:{eur:{symbol:"\u20AC"},jpy:{symbol:"JP\xA5"}}},VD=(e,t)=>Object.keys(t).reduce((i,n)=>(i[n]={},t[n].forEach(r=>{i[n][r.resource_name]={id:r.id,name:e.displayNames[r.resource_name]||r.resource_name,value:e.displayNames[r.value]||r.value}}),i),{}),zD={getFormattedOrganizationBillings(e){return VD(e,e.organizationBillings)},getOrganizationBillingsBundle(e){return e.organizationBillingsBundle}},HD={setOrganizationBilling(e,{billing:t,organizationId:i}){t.length!==0&&(e.organizationBillings[i]=t)},setOrganizationBillingBundle(e,{bundleInfo:t,organizationId:i}){e.organizationBillingsBundle[i]={...t,organization_name:t.name,organization_id:i,bundle_name:t.billing_bundle[0].bundle_name,limits:t.billing_bundle_limits.reduce((n,r)=>(n[r.resource_name]=r,n),{}),max_parallel_flow_executions:t.billing_bundle[0].max_parallel_flow_executions}},setOrganizationBillingPeriods(e,{billingPeriods:t,organizationId:i}){e.organizationBillingPeriods[i]=t},setOrganizationBillingPeriodConsumption(e,{billingPeriodId:t,organizationId:i,consumption:n}){const r=e.organizationBillingPeriods[i].findIndex(s=>s.id===t);e.organizationBillingPeriods[i][r].consumption=n.reduce((s,c)=>{var u;return s[c.resource_name]={name:c.resource_name,value:c.value,over_bundle_limit:(u=c.over_bundle_limit)!=null?u:null},s},{})},setBillingBundles(e,t){e.billingBundles=Object.values(t)},setBillingCountries:(e,t={})=>{e.billingCountries=t.items,e.billingCountriesPagination=t.pagination},setMinimumOrder:(e,t={})=>{e.minimumOrder=t.items},setOrders(e,t){e.orders=t},setOrdersPagination(e,t){e.ordersPagination=t}},UD={async getOrganizationBillingInfo({commit:e,rootState:t}){const{data:i}=await lt.getOrganizationBilling(t.Auth.organization.id);return e("setOrganizationBilling",{billing:i,organizationId:t.Auth.organization.id}),i},async getOrganizationBillingInfoById({commit:e},t){const{data:i}=await lt.getOrganizationBilling(t);return e("setOrganizationBilling",{billing:i,organizationId:t}),i},async getAllOrganizationsBillingInfo({commit:e}){const{data:t}=await lt.getAllOrganizationsBilling();return Object.keys(t).forEach(i=>{e("setOrganizationBilling",{billing:t[i],organizationId:i})}),t},async getOrganizationBillingBundle({commit:e},t){const{data:i}=await xn.getOrganization(t,{decorators:[ke.organization.billing_bundle,ke.organization.billing_bundle_limits,ke.organization.billing_information,ke.organization.billing_periods,ke.organization.active_billing_subscription_orders]});return e("setOrganizationBillingBundle",{bundleInfo:i,organizationId:t}),e("setOrganizationBillingPeriods",{organizationId:t,billingPeriods:i.billing_periods}),i},async getOrganizationBillingPeriodConsumption({state:e,commit:t},{organizationId:i,billingPeriodId:n}){const r=e.organizationBillingPeriods[i].find(c=>c.id===n);if(r.consumption)return r;const{data:s}=await lt.getOrganizationBillingByBillingPeriod(i,n);return t("setOrganizationBillingPeriodConsumption",{billingPeriodId:n,organizationId:i,consumption:s}),r},async getAllOrganizationsBillingBundle({commit:e}){const{data:t}=await xn.getOrganizations({decorators:[ke.organization.billing_bundle,ke.organization.billing_bundle_limits,ke.organization.billing_periods]});return t.items.forEach(i=>{e("setOrganizationBillingBundle",{bundleInfo:i,organizationId:i.id}),e("setOrganizationBillingPeriods",{billingPeriods:i.billing_periods,organizationId:i.id})}),t.items},async updateOrganizationBillingInfo({dispatch:e,state:t},{id:i,payload:n}){return xn.updateOrganization(i,n).then(({data:r})=>(e("Notifications/displayToastNotification",{msg:Gt("Billing information updated successfully."),type:"success"},{root:!0}),t.organizationBillingsBundle[i].billing_information=n,r)).catch(r=>{throw e("Notifications/displayToastNotification",{msg:Gt("Failed to update billing information."),type:"error"},{root:!0}),r})},async getBillingBundles({commit:e}){return lt.getBillingBundles().then(({data:t})=>(e("setBillingBundles",t),t))},async getBillingBundle(e,{billingBundleId:t}){return lt.getBillingBundle(t).then(({data:i})=>i)},async getBillingOrder(e,{order_id:t}){return lt.getBillingOrder(t).then(({data:i})=>i)},async changeBillingPlan({dispatch:e},{organizationId:t,billingPlanId:i,forceFlags:n,showError:r=!0}){try{return await lt.changeOrganizationBillingPlan(t,i,n),e("Notifications/displayToastNotification",{msg:Gt("Billing plan successfully changed."),type:"success"},{root:!0}),e("getOrganizationBillingBundle",t)}catch(s){throw r&&e("Notifications/displayToastNotification",{msg:Gt("Failed to change billing plan."),type:"error"},{root:!0}),s}},async getOrganizationBilledFlowExecutions({state:e},t){return t.organizationId?lt.getOrganizationBilledFlowExecutions(t).then(({data:i})=>(e.billedFlows=i.items.reduce((n,r)=>{const s=r.node_executions_billed_processing_units,c={id:r.id,flow_title:r.flow_title,finished_at:r.finished_at,created_at:r.created_at};return s&&s.length>0?(c.is_canceled=s[0].billed_processing_units[0].canceled_billing_id!==null,c.value=s.reduce((u,o)=>(u+=parseFloat(o.billed_processing_units[0].value),u),0),c.is_canceled&&(c.message="Already canceled")):c.message="Nothing to cancel",n.push(c),n},[]),e.billedFlowsPagination=i.pagination,e.billedFlows)):(e.billedFlowsPagination=[],Promise.resolve([]))},cancelFlowExecutionBilling(e,{organizationId:t,flowExecutionId:i}){return lt.cancelFlowExecutionBilling(t,i).then(({data:n})=>{const r=e.state.billedFlows.find(s=>s.id===n.canceled_billings[0]);return r&&(r.is_canceled=!0),e.dispatch("Notifications/displayToastNotification",{msg:Gt("Billing canceled successfully."),type:"success"},{root:!0}),n}).catch(n=>{throw e.dispatch("Notifications/displayToastNotification",{msg:Gt("Billing cancellation failed."),type:"error"},{root:!0}),n})},createBillingOrder(e,t){return lt.createBillingOrder(t).then(({data:i})=>(e.dispatch("Notifications/displayToastNotification",{msg:Gt("Order created successfully."),type:"success"},{root:!0}),i)).catch(i=>{throw e.dispatch("Notifications/displayToastNotification",{msg:Gt("Order creation failed."),type:"error"},{root:!0}),i})},cancelBillingOrderSubscription(e,{id:t,payload:i}){return lt.cancelBillingOrderSubscription(t,i).then(({data:n})=>(e.dispatch("Notifications/displayToastNotification",{msg:Gt("Subscription canceled successfully."),type:"success"},{root:!0}),n)).catch(n=>{throw e.dispatch("Notifications/displayToastNotification",{msg:Gt("Subscription cancellation failed."),type:"error"},{root:!0}),n})},renewBillingOrderSubscription(e,{id:t}){return lt.renewBillingOrderSubscription(t).then(({data:i})=>(e.dispatch("Notifications/displayToastNotification",{msg:Gt("Subscription renewed successfully."),type:"success"},{root:!0}),i)).catch(i=>{throw e.dispatch("Notifications/displayToastNotification",{msg:Gt("Subscription renew failed."),type:"error"},{root:!0}),i})},getBillingCountries({commit:e},t){return lt.getBillingCountries(t).then(({data:i})=>(e("setBillingCountries",i),i.items))},getBillingCountry(e,t){return lt.getBillingCountry(t).then(({data:i})=>i)},orderPayableItems(e,{flowExecutions:t,qualityControlJobs:i,paymentMethod:n="card"}){return lt.orderPayableItems({payment_type_key:n,flow_execution_ids:t,quality_control_job_ids:i}).then(({data:r})=>r)},getMinimumOrder({commit:e},t){return lt.getMinimumOrder(t).then(({data:i})=>(e("setMinimumOrder",i),i))},getBulkDiscount(e,t){return lt.getBulkDiscount(t).then(({data:i})=>i)},getOrganizationOrders({commit:e,rootState:t},i){return lt.getOrganizationOrders(t.Auth.organization.id,{order_by:"created_at",order_direction:"desc",decorators:["payments"],...i}).then(({data:n})=>{e("setOrders",n.items),e("setOrdersPagination",n.pagination)})},getPaymentInvoicePresignUrl(e,t){return lt.getPaymentInvoicePresignUrl(t).then(({data:i})=>i)},cancelChildOrder(e,t){return lt.cancelChildOrder(t).then(({data:i})=>(e.dispatch("Notifications/displayToastNotification",{msg:Gt("Order canceled successfully."),type:"success"},{root:!0}),i)).catch(i=>{throw e.dispatch("Notifications/displayToastNotification",{msg:Gt("Order cancelation failed."),type:"error"},{root:!0}),i})},getAvailableGrantedProcessingUnits({rootState:e}){return lt.getAvailableGrantedProcessingUnits(e.Auth.organization.id).then(({data:t})=>t)}},WD={state:BD,getters:zD,mutations:HD,actions:UD,namespaced:!0},Nl=["classifications","activeClassifications","selectedClassification","selectedInstanceId","editMode"],jD=["activeAttributeName","pointSize","pointSizing","shape"],Uf=["pointBudget","cameraProjection","showMeasurementPoiLabels"],GD={},qD={getTableSort(e){return t=>{var i,n;return(n=(i=e.tableSorting)==null?void 0:i[t])!=null?n:{property:null,order:"asc"}}},getTableFilters(e){return t=>{var i,n;return(n=(i=e.tableFilters)==null?void 0:i[t])!=null?n:{}}},getTablePageSize(e){return t=>{var i,n;return(n=(i=e.tablePageSize)==null?void 0:i[t])!=null?n:10}},getActiveTab(e){return t=>{var i,n;return(n=(i=e.activeTab)==null?void 0:i[t])!=null?n:0}},isNavBarCollapsed(e){return()=>{var t;return(t=e.isNavBarCollapsed)!=null?t:!1}},getDataDisplayType(e){return t=>{var i,n;return(n=(i=e.dataDisplayType)==null?void 0:i[t])!=null?n:"card"}},getVirtualTileSelectedId(e){return t=>{var i,n,r;return(r=(n=(i=e.virtualTiles)==null?void 0:i[t])==null?void 0:n.selectedId)!=null?r:null}},getMultiViewSync(e){return t=>{var i,n,r;return(r=(n=(i=e.multiView)==null?void 0:i[t])==null?void 0:n.sync)!=null?r:!1}},showCatalogueMap(e){return()=>{var t;return(t=e.showCatalogueMap)!=null?t:!1}},getForcedMinVisibleCopcFiles(e){return t=>{var i,n,r,s;return(s=(r=(n=(i=e.potree)==null?void 0:i[t])==null?void 0:n.stateProperty)==null?void 0:r.forcedMinVisibleCopcFiles)!=null?s:0}}},KD={setTableSort(e,{tableName:t,property:i,order:n}){e.tableSorting[t]={property:i,order:n}},setTableFilter(e,{tableName:t,property:i,filter:n,type:r}){e.tableFilters[t]?e.tableFilters[t][i]={filter:n,type:r}:e.tableFilters[t]={[i]:{filter:n,type:r}},(n===null||n==="")&&delete e.tableFilters[t][i],Array.isArray(n)&&n.length===0&&delete e.tableFilters[t][i],(n==null?void 0:n.from)===null&&(n==null?void 0:n.to)===null&&delete e.tableFilters[t][i]},clearTableFilters(e,{tableName:t}){delete e.tableFilters[t]},setTablePageSize(e,{tableName:t,pageSize:i}){e.tablePageSize[t]=i},setNavBarCollapsed(e,t){e.isNavBarCollapsed=t},setActiveTab(e,{tabsName:t,activeTab:i}){e.activeTab[t]=i},setDataDisplayType(e,{dataName:t,displayType:i}){e.dataDisplayType[t]=i},setVirtualTileSelectedId(e,{datasetId:t,selectedId:i}){e.virtualTiles[t]||(e.virtualTiles[t]={}),e.virtualTiles[t].selectedId=i},removeVirtualTileState(e,{datasetId:t}){delete e.virtualTiles[t]},setMultiViewSync(e,{multiViewId:t,sync:i}){var n,r;(r=(n=e.multiView)[t])!=null||(n[t]={}),e.multiView[t].sync=i},setShowCatalogueMap(e,t){e.showCatalogueMap=t},setPotreePropertiesProperty(e,{id:t,property:i,value:n,multiViewId:r,viewportId:s}){var c,u,o,h,a,l,f,d,p,g,m,v,y;if(r){(c=e.multiView)!=null||(e.multiView={}),(o=(u=e.multiView)[r])!=null||(u[r]={}),(a=(h=e.multiView[r])[s])!=null||(h[s]={potree:{}}),(f=(l=e.multiView[r][s].potree)[t])!=null||(l[t]={}),(p=(d=e.multiView[r][s].potree[t]).properties)!=null||(d.properties={}),e.multiView[r][s].potree[t].properties[i]=n;return}(m=(g=e.potree)[t])!=null||(g[t]={}),(y=(v=e.potree[t]).properties)!=null||(v.properties={}),e.potree[t].properties[i]=n},setPotreePocAttributeProperty(e,{id:t,property:i,value:n,multiViewId:r,viewportId:s}){var c,u,o,h,a,l,f,d,p,g,m,v,y;if(r){(c=e.multiView)!=null||(e.multiView={}),(o=(u=e.multiView)[r])!=null||(u[r]={}),(a=(h=e.multiView[r])[s])!=null||(h[s]={potree:{}}),(f=(l=e.multiView[r][s].potree)[t])!=null||(l[t]={}),(p=(d=e.multiView[r][s].potree[t]).pocAttributeProperty)!=null||(d.pocAttributeProperty={}),e.multiView[r][s].potree[t].pocAttributeProperty[i]=n;return}(m=(g=e.potree)[t])!=null||(g[t]={}),(y=(v=e.potree[t]).pocAttributeProperty)!=null||(v.pocAttributeProperty={}),e.potree[t].pocAttributeProperty[i]=n},setPotreeStateProperty(e,{id:t,property:i,value:n,multiViewId:r,viewportId:s}){var c,u,o,h,a,l,f,d,p,g,m,v,y;if(r){(c=e.multiView)!=null||(e.multiView={}),(o=(u=e.multiView)[r])!=null||(u[r]={}),(a=(h=e.multiView[r])[s])!=null||(h[s]={potree:{}}),(f=(l=e.multiView[r][s].potree)[t])!=null||(l[t]={}),(p=(d=e.multiView[r][s].potree[t]).stateProperty)!=null||(d.stateProperty={}),e.multiView[r][s].potree[t].stateProperty[i]=n;return}(m=(g=e.potree)[t])!=null||(g[t]={}),(y=(v=e.potree[t]).stateProperty)!=null||(v.stateProperty={}),e.potree[t].stateProperty[i]=n},setPotreeCamera(e,{id:t,value:i,multiViewId:n,viewportId:r}){var s,c,u,o,h,a,l,f,d,p,g,m,v;if(n){(s=e.multiView)!=null||(e.multiView={}),(u=(c=e.multiView)[n])!=null||(c[n]={}),(h=(o=e.multiView[n])[r])!=null||(o[r]={potree:{}}),(l=(a=e.multiView[n][r].potree)[t])!=null||(a[t]={}),(d=(f=e.multiView[n][r].potree[t]).camera)!=null||(f.camera={}),e.multiView[n][r].potree[t].camera=i;return}(g=(p=e.potree)[t])!=null||(p[t]={}),(v=(m=e.potree[t]).camera)!=null||(m.camera={}),e.potree[t].camera=i},setUserState(e,t){var i,n;if(!t){e.isNavBarCollapsed=!1,e.tableSorting={},e.tableFilters={},e.tablePageSize={},e.activeTab={},e.potree={},e.dataDisplayType={},e.virtualTiles={},e.multiView={},e.showCatalogueMap=!1;return}e.isNavBarCollapsed=(i=t==null?void 0:t.isNavBarCollapsed)!=null?i:!1,e.showCatalogueMap=(n=t==null?void 0:t.showCatalogueMap)!=null?n:!1,!t.tableSorting||Array.isArray(t.tableSorting)?e.tableSorting={}:e.tableSorting=t.tableSorting,!t.tableFilters||Array.isArray(t.tableFilters)?e.tableFilters={}:(Object.keys(t.tableFilters).forEach(r=>{Array.isArray(t.tableFilters[r])&&(t.tableFilters[r]={})}),e.tableFilters=t.tableFilters),!t.tablePageSize||Array.isArray(t.tablePageSize)?e.tablePageSize={}:e.tablePageSize=t.tablePageSize,!t.activeTab||Array.isArray(t.activeTab)?e.activeTab={}:e.activeTab=t.activeTab,!t.potree||Array.isArray(t.potree)?e.potree={}:e.potree=t.potree,!t.dataDisplayType||Array.isArray(t.dataDisplayType)?e.dataDisplayType={}:e.dataDisplayType=t.dataDisplayType,!t.virtualTiles||Array.isArray(t.virtualTiles)?e.virtualTiles={}:e.virtualTiles=t.virtualTiles,!t.multiView||Array.isArray(t.multiView)?e.multiView={}:e.multiView=t.multiView},resetUserState(e){e.activeTab={},e.isNavBarCollapsed=!1,e.potree={},e.tableSorting={},e.tableFilters={},e.tablePageSize={},e.dataDisplayType={},e.virtualTiles={},e.multiView={},e.showCatalogueMap=!1}},YD={setTableSort({commit:e,dispatch:t},{tableName:i,property:n,order:r}){e("setTableSort",{tableName:i,property:n,order:r}),t("saveStateDebounced")},setTableFilter({commit:e,dispatch:t},{tableName:i,property:n,filter:r,type:s}){e("setTableFilter",{tableName:i,property:n,filter:r,type:s}),t("saveStateDebounced")},setTablePageSize({commit:e,dispatch:t},{tableName:i,pageSize:n}){e("setTablePageSize",{tableName:i,pageSize:n}),t("saveStateDebounced")},clearTableFilters({commit:e,dispatch:t},{tableName:i}){e("clearTableFilters",{tableName:i}),t("saveStateDebounced")},setNavBarCollapsed({commit:e,dispatch:t},i){e("setNavBarCollapsed",i),t("saveStateDebounced")},setActiveTab({commit:e,dispatch:t},{tabsName:i,activeTab:n}){e("setActiveTab",{tabsName:i,activeTab:n}),t("saveStateDebounced")},setDataDisplayType({commit:e,dispatch:t},{dataName:i,displayType:n}){e("setDataDisplayType",{dataName:i,displayType:n}),t("saveStateDebounced")},setVirtualTileSelectedId({commit:e,dispatch:t},{datasetId:i,selectedId:n}){e("setVirtualTileSelectedId",{datasetId:i,selectedId:n}),t("saveStateDebounced")},removeVirtualTileState({commit:e,dispatch:t},{datasetId:i}){e("removeVirtualTileState",{datasetId:i}),t("saveStateDebounced")},setMultiViewSync({commit:e,dispatch:t},{multiViewId:i,sync:n}){e("setMultiViewSync",{multiViewId:i,sync:n}),t("saveStateDebounced")},setShowCatalogueMap({commit:e,dispatch:t},i){e("setShowCatalogueMap",i),t("saveStateDebounced")},setPotreeProperties({commit:e,dispatch:t},{id:i,type:n,property:r,value:s,multiViewId:c,viewportId:u}){if(n==="propertiesProperty")switch(r){case"classifications":{const o=Object.keys(s.json).filter(h=>s.json[h].visible).map(h=>h);e("setPotreePropertiesProperty",{property:r,value:o,id:i,multiViewId:c,viewportId:u});break}default:e("setPotreePropertiesProperty",{property:r,value:s,id:i,multiViewId:c,viewportId:u});break}n==="pocAttributeProperty"&&e("setPotreePocAttributeProperty",{property:r,value:s,id:i,multiViewId:c,viewportId:u}),n==="stateProperty"&&e("setPotreeStateProperty",{property:r,value:s,id:i,multiViewId:c,viewportId:u}),n==="camera"&&e("setPotreeCamera",{id:i,value:s,multiViewId:c,viewportId:u}),t("saveStateDebounced")},saveState({state:e,rootState:t}){var i,n;((n=(i=t.Auth)==null?void 0:i.user)==null?void 0:n.is_guest)!==!0&&Pi.updateUser(t.Auth.organization.id,t.Auth.user.id,{frontend_state:e})},saveStateDebounced:ev(({state:e,rootState:t})=>{var i,n;((n=(i=t.Auth)==null?void 0:i.user)==null?void 0:n.is_guest)!==!0&&Pi.updateUser(t.Auth.organization.id,t.Auth.user.id,{frontend_state:e})},1e3),resetUserState({commit:e,dispatch:t}){e("resetUserState"),t("saveState")}},XD={state:GD,getters:qD,mutations:KD,actions:YD,namespaced:!0},QD={user_settings:{auto_potree_reload:!1,show_editor_tips:!0}},JD={},ZD={setUserSetting(e,{property:t,value:i}){e.user_settings[t]=i}},e2={setUserSetting({commit:e},{property:t,value:i}){const n=JSON.parse(localStorage.getItem("userSettings"))||{};n[t]=i,localStorage.setItem("userSettings",JSON.stringify(n)),e("setUserSetting",{property:t,value:i})},loadUserSettings({commit:e}){const t=JSON.parse(localStorage.getItem("userSettings"));t&&typeof t=="object"&&Object.keys(t).forEach(i=>{e("setUserSetting",{property:i,value:t[i]})})}},t2={state:QD,getters:JD,mutations:ZD,actions:e2,namespaced:!0};class i2{static getNewsletters(t){return V.request("/newsletters",{type:"GET",params:t})}}const n2={getNewsletters(){return i2.getNewsletters({page_size:5,order_by:"created_at",order_direction:"desc"}).then(({data:e})=>e.items)}},r2={actions:n2,namespaced:!0};class Wf{static getSrids(t,i={}){return V.request("/srids",{type:"GET",params:t,...i})}static getSrid(t,i,n={}){return V.request(`/srids/${t}`,{type:"GET",params:i,...n})}}const s2={srids:[],pagination:{}},o2={SET_SRIDS:(e,t={})=>{e.srids=t.items,e.pagination=t.pagination}},a2={getSrids({commit:e},t){return Wf.getSrids(t).then(({data:i})=>(e("SET_SRIDS",i),i.items))},getSrid(e,t){return Wf.getSrid(t).then(({data:i})=>i)}},l2={namespaced:!0,state:s2,mutations:o2,actions:a2};var uy={exports:{}};(function(e,t){(function(i,n){e.exports=n()})(z$,function(){var i=1e3,n=6e4,r=36e5,s="millisecond",c="second",u="minute",o="hour",h="day",a="week",l="month",f="quarter",d="year",p="date",g="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(M){var A=["th","st","nd","rd"],k=M%100;return"["+M+(A[(k-20)%10]||A[k]||A[0])+"]"}},S=function(M,A,k){var P=String(M);return!P||P.length>=A?M:""+Array(A+1-P.length).join(k)+M},b={s:S,z:function(M){var A=-M.utcOffset(),k=Math.abs(A),P=Math.floor(k/60),O=k%60;return(A<=0?"+":"-")+S(P,2,"0")+":"+S(O,2,"0")},m:function M(A,k){if(A.date()<k.date())return-M(k,A);var P=12*(k.year()-A.year())+(k.month()-A.month()),O=A.clone().add(P,l),N=k-O<0,D=A.clone().add(P+(N?-1:1),l);return+(-(P+(k-O)/(N?O-D:D-O))||0)},a:function(M){return M<0?Math.ceil(M)||0:Math.floor(M)},p:function(M){return{M:l,y:d,w:a,d:h,D:p,h:o,m:u,s:c,ms:s,Q:f}[M]||String(M||"").toLowerCase().replace(/s$/,"")},u:function(M){return M===void 0}},_="en",w={};w[_]=y;var E=function(M){return M instanceof x},T=function M(A,k,P){var O;if(!A)return _;if(typeof A=="string"){var N=A.toLowerCase();w[N]&&(O=N),k&&(w[N]=k,O=N);var D=A.split("-");if(!O&&D.length>1)return M(D[0])}else{var B=A.name;w[B]=A,O=B}return!P&&O&&(_=O),O||!P&&_},$=function(M,A){if(E(M))return M.clone();var k=typeof A=="object"?A:{};return k.date=M,k.args=arguments,new x(k)},C=b;C.l=T,C.i=E,C.w=function(M,A){return $(M,{locale:A.$L,utc:A.$u,x:A.$x,$offset:A.$offset})};var x=function(){function M(k){this.$L=T(k.locale,null,!0),this.parse(k)}var A=M.prototype;return A.parse=function(k){this.$d=function(P){var O=P.date,N=P.utc;if(O===null)return new Date(NaN);if(C.u(O))return new Date;if(O instanceof Date)return new Date(O);if(typeof O=="string"&&!/Z$/i.test(O)){var D=O.match(m);if(D){var B=D[2]-1||0,U=(D[7]||"0").substring(0,3);return N?new Date(Date.UTC(D[1],B,D[3]||1,D[4]||0,D[5]||0,D[6]||0,U)):new Date(D[1],B,D[3]||1,D[4]||0,D[5]||0,D[6]||0,U)}}return new Date(O)}(k),this.$x=k.x||{},this.init()},A.init=function(){var k=this.$d;this.$y=k.getFullYear(),this.$M=k.getMonth(),this.$D=k.getDate(),this.$W=k.getDay(),this.$H=k.getHours(),this.$m=k.getMinutes(),this.$s=k.getSeconds(),this.$ms=k.getMilliseconds()},A.$utils=function(){return C},A.isValid=function(){return this.$d.toString()!==g},A.isSame=function(k,P){var O=$(k);return this.startOf(P)<=O&&O<=this.endOf(P)},A.isAfter=function(k,P){return $(k)<this.startOf(P)},A.isBefore=function(k,P){return this.endOf(P)<$(k)},A.$g=function(k,P,O){return C.u(k)?this[P]:this.set(O,k)},A.unix=function(){return Math.floor(this.valueOf()/1e3)},A.valueOf=function(){return this.$d.getTime()},A.startOf=function(k,P){var O=this,N=!!C.u(P)||P,D=C.p(k),B=function(K,Q){var ne=C.w(O.$u?Date.UTC(O.$y,Q,K):new Date(O.$y,Q,K),O);return N?ne:ne.endOf(h)},U=function(K,Q){return C.w(O.toDate()[K].apply(O.toDate("s"),(N?[0,0,0,0]:[23,59,59,999]).slice(Q)),O)},q=this.$W,H=this.$M,j=this.$D,Y="set"+(this.$u?"UTC":"");switch(D){case d:return N?B(1,0):B(31,11);case l:return N?B(1,H):B(0,H+1);case a:var ie=this.$locale().weekStart||0,W=(q<ie?q+7:q)-ie;return B(N?j-W:j+(6-W),H);case h:case p:return U(Y+"Hours",0);case o:return U(Y+"Minutes",1);case u:return U(Y+"Seconds",2);case c:return U(Y+"Milliseconds",3);default:return this.clone()}},A.endOf=function(k){return this.startOf(k,!1)},A.$set=function(k,P){var O,N=C.p(k),D="set"+(this.$u?"UTC":""),B=(O={},O[h]=D+"Date",O[p]=D+"Date",O[l]=D+"Month",O[d]=D+"FullYear",O[o]=D+"Hours",O[u]=D+"Minutes",O[c]=D+"Seconds",O[s]=D+"Milliseconds",O)[N],U=N===h?this.$D+(P-this.$W):P;if(N===l||N===d){var q=this.clone().set(p,1);q.$d[B](U),q.init(),this.$d=q.set(p,Math.min(this.$D,q.daysInMonth())).$d}else B&&this.$d[B](U);return this.init(),this},A.set=function(k,P){return this.clone().$set(k,P)},A.get=function(k){return this[C.p(k)]()},A.add=function(k,P){var O,N=this;k=Number(k);var D=C.p(P),B=function(H){var j=$(N);return C.w(j.date(j.date()+Math.round(H*k)),N)};if(D===l)return this.set(l,this.$M+k);if(D===d)return this.set(d,this.$y+k);if(D===h)return B(1);if(D===a)return B(7);var U=(O={},O[u]=n,O[o]=r,O[c]=i,O)[D]||1,q=this.$d.getTime()+k*U;return C.w(q,this)},A.subtract=function(k,P){return this.add(-1*k,P)},A.format=function(k){var P=this,O=this.$locale();if(!this.isValid())return O.invalidDate||g;var N=k||"YYYY-MM-DDTHH:mm:ssZ",D=C.z(this),B=this.$H,U=this.$m,q=this.$M,H=O.weekdays,j=O.months,Y=function(Q,ne,de,_e){return Q&&(Q[ne]||Q(P,N))||de[ne].slice(0,_e)},ie=function(Q){return C.s(B%12||12,Q,"0")},W=O.meridiem||function(Q,ne,de){var _e=Q<12?"AM":"PM";return de?_e.toLowerCase():_e},K={YY:String(this.$y).slice(-2),YYYY:C.s(this.$y,4,"0"),M:q+1,MM:C.s(q+1,2,"0"),MMM:Y(O.monthsShort,q,j,3),MMMM:Y(j,q),D:this.$D,DD:C.s(this.$D,2,"0"),d:String(this.$W),dd:Y(O.weekdaysMin,this.$W,H,2),ddd:Y(O.weekdaysShort,this.$W,H,3),dddd:H[this.$W],H:String(B),HH:C.s(B,2,"0"),h:ie(1),hh:ie(2),a:W(B,U,!0),A:W(B,U,!1),m:String(U),mm:C.s(U,2,"0"),s:String(this.$s),ss:C.s(this.$s,2,"0"),SSS:C.s(this.$ms,3,"0"),Z:D};return N.replace(v,function(Q,ne){return ne||K[Q]||D.replace(":","")})},A.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},A.diff=function(k,P,O){var N,D=C.p(P),B=$(k),U=(B.utcOffset()-this.utcOffset())*n,q=this-B,H=C.m(this,B);return H=(N={},N[d]=H/12,N[l]=H,N[f]=H/3,N[a]=(q-U)/6048e5,N[h]=(q-U)/864e5,N[o]=q/r,N[u]=q/n,N[c]=q/i,N)[D]||q,O?H:C.a(H)},A.daysInMonth=function(){return this.endOf(l).$D},A.$locale=function(){return w[this.$L]},A.locale=function(k,P){if(!k)return this.$L;var O=this.clone(),N=T(k,P,!0);return N&&(O.$L=N),O},A.clone=function(){return C.w(this.$d,this)},A.toDate=function(){return new Date(this.valueOf())},A.toJSON=function(){return this.isValid()?this.toISOString():null},A.toISOString=function(){return this.$d.toISOString()},A.toString=function(){return this.$d.toUTCString()},M}(),L=x.prototype;return $.prototype=L,[["$ms",s],["$s",c],["$m",u],["$H",o],["$W",h],["$M",l],["$y",d],["$D",p]].forEach(function(M){L[M[1]]=function(A){return this.$g(A,M[0],M[1])}}),$.extend=function(M,A){return M.$i||(M(A,x,$),M.$i=!0),$},$.locale=T,$.isDayjs=E,$.unix=function(M){return $(1e3*M)},$.en=w[_],$.Ls=w,$.p={},$})})(uy);const Vi=uy.exports;class Un{static getNotes(t,i){return V.request(`/organization/${t}/datasets/${i}/collaboration_notes`,{type:"GET"})}static getThread(t,i,n){return V.request(`/organization/${t}/datasets/${i}/collaboration_notes/${n}/thread`,{type:"GET"})}static createNote(t,i,n){return V.request(`/organization/${t}/datasets/${i}/collaboration_notes`,{type:"POST",data:n})}static deleteNote(t,i,n){return V.request(`/organization/${t}/datasets/${i}/collaboration_notes/${n}`,{type:"DELETE"})}static updateNote(t,i,n,r){return V.request(`/organization/${t}/datasets/${i}/collaboration_notes/${n}`,{type:"PUT",data:r})}}const{t:ko}=nt.global,c2={collaborationNotes:{}},u2={updateCollaborationNotes(e,{notes:t,datasetId:i}){t.forEach(n=>{const r=e.collaborationNotes[i].findIndex(s=>s.id===n.id);r>=0?e.collaborationNotes[i].splice(r,1,n):e.collaborationNotes[i].push(n)})}},Dl=(e,t)=>e?[...e].sort((n,r)=>Vi(n.created_at)-Vi(r.created_at)).reduce((n,r)=>{const s=n.find(c=>c.id===r.parent_note_id);return t==="open"&&r.resolved||t==="resolved"&&(!s&&!r.resolved||s&&!s.resolved)||(r.parent_note_id||n.push({...r,children:[]}),s&&s.children.push({...r})),n},[]):[],h2={getCollaborationThreadsAll(e){return t=>Dl(e.collaborationNotes[t],"all")},getCollaborationThreadsResolved(e){return t=>Dl(e.collaborationNotes[t],"resolved")},getCollaborationThreadsOpen(e){return t=>Dl(e.collaborationNotes[t],"open")}},d2={async createNote({dispatch:e,rootState:t},{datasetId:i,data:n}){const{data:r}=await Un.createNote(t.Auth.organization.id,i,n);return await e("getNotes",{datasetId:i}),r},deleteNote({state:e,dispatch:t,rootState:i},{datasetId:n,data:r}){return Un.deleteNote(i.Auth.organization.id,n,r.id).then(({data:s})=>{if(r.parent_note_id){const c=e.collaborationNotes[n].findIndex(u=>u.id===r.id);e.collaborationNotes[n].splice(c,1),t("getThread",{datasetId:n,parentNoteId:r.parent_note_id}).then(()=>s)}else e.collaborationNotes[n]=e.collaborationNotes[n].filter(c=>c.id!==r.id&&c.parent_note_id!==r.id)}).catch(()=>{t("Notifications/displayToastNotification",{msg:ko("Failed to delete comment."),type:"error"},{root:!0})})},updateNote({state:e,dispatch:t,rootState:i},{datasetId:n,data:r}){return Un.updateNote(i.Auth.organization.id,n,r.id,{note:r.note}).then(({data:s})=>{const c=e.collaborationNotes[n].findIndex(u=>u.id===r.id);return e.collaborationNotes[n].splice(c,1,r),s}).catch(()=>{t("Notifications/displayToastNotification",{msg:ko("Failed to update note."),type:"error"},{root:!0})})},resolveThread({state:e,dispatch:t,rootState:i},{datasetId:n,data:r}){return Un.updateNote(i.Auth.organization.id,n,r.id,{resolved:!0}).then(()=>{const s=e.collaborationNotes[n].findIndex(c=>c.id===r.id);e.collaborationNotes[n].splice(s,1,{...r,resolved:!0})}).catch(()=>{t("Notifications/displayToastNotification",{msg:ko("Failed to resolve thread."),type:"error"},{root:!0})})},reopenThread({state:e,dispatch:t,rootState:i},{datasetId:n,data:r}){return Un.updateNote(i.Auth.organization.id,n,r.id,{resolved:!1}).then(()=>{const s=e.collaborationNotes[n].findIndex(c=>c.id===r.id);e.collaborationNotes[n].splice(s,1,{...r,resolved:!1})}).catch(()=>{t("Notifications/displayToastNotification",{msg:ko("Failed to re-open thread."),type:"error"},{root:!0})})},getNotes({state:e,rootState:t},{datasetId:i}){return Un.getNotes(t.Auth.organization.id,i).then(({data:n})=>(e.collaborationNotes[i]=n,n))},getThread({commit:e,rootState:t},{datasetId:i,parentNoteId:n}){return Un.getThread(t.Auth.organization.id,i,n).then(({data:r})=>{e("updateCollaborationNotes",{notes:r,datasetId:i})})}},f2={namespaced:!0,state:c2,getters:h2,mutations:u2,actions:d2};class qt{static createMultiView(t,i,n,r={}){return V.request(`/organization/${t}/projects/${n}/multiviews`,{type:"POST",data:i,...r})}static updateMultiView(t,i,n,r={}){return V.request(`/organization/${t}/projects/${n}/multiviews/${i.id}`,{type:"PUT",data:i,...r})}static deleteMultiView(t,i,n,r={}){return V.request(`/organization/${t}/projects/${n}/multiviews/${i}`,{type:"DELETE",...r})}static createMultiViewViewportDataset(t,i,n,r,s,c={}){return V.request(`/organization/${t}/projects/${n}/multiviews/${r}/viewports/${s}/viewport_datasets`,{type:"POST",data:i,...c})}static updateMultiViewViewportDataset(t,i,n,r,s,c,u={}){return V.request(`/organization/${t}/projects/${n}/multiviews/${r}/viewports/${s}/viewport_datasets/${c}`,{type:"PUT",data:i,...u})}static deleteMultiViewViewportDatasets(t,i,n,r,s,c={}){return V.request(`/organization/${t}/projects/${i}/multiviews/${n}/viewports/${r}/viewport_datasets/${s}`,{type:"DELETE",...c})}static createMultiViewViewport(t,i,n,r,s={}){return V.request(`/organization/${t}/projects/${n}/multiviews/${r}/viewports`,{type:"POST",data:i,...s})}static deleteMultiViewViewport(t,i,n,r,s={}){return V.request(`/organization/${t}/projects/${i}/multiviews/${n}/viewports/${r}`,{type:"DELETE",...s})}static getMultiViews(t,i,n,r={}){return V.request(`/organization/${t}/projects/${i}/multiviews`,{type:"GET",params:n,...r})}static getMultiView(t,i,n,r,s={}){return V.request(`/organization/${t}/projects/${i}/multiviews/${n}`,{type:"GET",params:r,...s})}static getMultiViewViewports(t,i,n,r,s={}){return V.request(`/organization/${t}/projects/${i}/multiviews/${n}/viewports`,{type:"GET",params:r,...s})}static getMultiViewViewportDatasets(t,i,n,r,s,c={}){return V.request(`/organization/${t}/projects/${i}/multiviews/${n}/viewports/${r}/viewport_datasets`,{type:"GET",params:s,...c})}}function p2(){this.status=404,this.data={message:"Multi view not found"}}const g2={},m2={},v2={},y2={createMultiView(e,{multiView:t,projectId:i}){return qt.createMultiView(e.rootState.Auth.organization.id,t,i).then(({data:n})=>n)},async updateMultiView(e,{multiView:t,projectId:i,viewportChanges:n,removedViewports:r,addedViewports:s}){await Promise.all(Object.keys(n).flatMap(o=>["addedDatasets","removedDatasets","changedDatasets"].filter(h=>n[o][h]!==void 0).flatMap(h=>n[o][h].map(a=>h==="addedDatasets"?qt.createMultiViewViewportDataset(e.rootState.Auth.organization.id,a,i,t.id,o):h==="removedDatasets"?qt.deleteMultiViewViewportDatasets(e.rootState.Auth.organization.id,i,t.id,o,a.id):h==="changedDatasets"?qt.updateMultiViewViewportDataset(e.rootState.Auth.organization.id,a,i,t.id,o,a.id):null)))),await Promise.all(r.map(o=>qt.deleteMultiViewViewport(e.rootState.Auth.organization.id,t.id,i,o)));const c=await Promise.all(s.map(o=>qt.createMultiViewViewport(e.rootState.Auth.organization.id,{viewport_type:o.viewport_type,project_id:i,multiview_id:t.id},i,t.id)));await Promise.all(s.flatMap((o,h)=>o.datasets.map(a=>qt.createMultiViewViewportDataset(e.rootState.Auth.organization.id,{...a,viewport_id:c[h].data.id},i,t.id,c[h].data.id))));const u=s.map(o=>o.viewport_id);return t.viewports_location=t.viewports_location.map(o=>{const h=u.findIndex(a=>a===o.viewport_id);return h>=0?{...o,viewport_id:c[h].data.id}:o}),await qt.updateMultiView(e.rootState.Auth.organization.id,t,i),{id:t.id}},deleteMultiView(e,{multiViewId:t,projectId:i}){return qt.deleteMultiView(e.rootState.Auth.organization.id,t,i).then(({data:n})=>n)},getMultiViews(e,{projectId:t}){return qt.getMultiViews(e.rootState.Auth.organization.id,t).then(({data:i})=>i)},getMultiViewViewports(e,{projectId:t,multiViewId:i}){return qt.getMultiViewViewports(e.rootState.Auth.organization.id,t,i).then(({data:n})=>n)},getMultiViewViewportDatasets(e,{projectId:t,multiViewId:i,viewportId:n}){return qt.getMultiViewViewportDatasets(e.rootState.Auth.organization.id,t,i,n).then(({data:r})=>r)},async getMultiViewsWithViewports({dispatch:e,rootState:t},{projectId:i,params:n}){const{data:{items:r,pagination:s}}=await qt.getMultiViews(t.Auth.organization.id,i,n),c=await Promise.all(r.map(u=>e("getMultiViewViewports",{projectId:i,multiViewId:u.id})));return{items:r.map((u,o)=>({...u,viewports:c[o],viewportRows:u.viewports_location.reduce((h,a,l)=>{h[a.row]===void 0&&(h[a.row]={viewports:[],flexBasis:a.row_flex_basis,id:rn()});const f=a.viewport_id?c[o].find(d=>d.id===a.viewport_id):c[o][l];return h[a.row].viewports.push({flexBasis:a.flex_basis,id:f.id,viewportType:c.viewport_type}),h},[])})),pagination:s}},async getMultiViewWithViewportsAndDatasets({dispatch:e,rootState:t},{projectId:i,multiViewId:n}){if(n.split("project-").length>1)return e("getDefaultProjectMultiView",{projectId:i,multiViewId:n});const{data:r}=await qt.getMultiView(t.Auth.organization.id,i,n);if(r.length===0)throw new p2;const s=await e("getMultiViewViewports",{projectId:i,multiViewId:n}),c=await Promise.all(s.map(f=>e("getMultiViewViewportDatasets",{projectId:i,multiViewId:n,viewportId:f.id}))),u=c.flatMap(f=>f).length>0?{"filter[id]":`i=${c.flatMap(f=>f).map(f=>f.dataset_id).join(",")}`}:{},o=await e("AppState/Datasets/getDatasetsAsync",u,{root:!0}),{id:h,multiview_title:a,sync_viewports:l}=r;return{id:h,multiViewTitle:a,syncViewports:l,projectId:r.project_id,viewports:s,viewportRows:r.viewports_location.reduce((f,d,p)=>{f[d.row]===void 0&&(f[d.row]={viewports:[],flexBasis:d.row_flex_basis,id:rn()});const g=d.viewport_id?s.find(v=>v.id===d.viewport_id):s[p],m=c.find(v=>v.length>0&&v[0].viewport_id===g.id)||[];return f[d.row].viewports.push({flexBasis:d.flex_basis,id:g.id,viewport_type:g.viewport_type,datasets:[...m].sort((v,y)=>v.dataset_order-y.dataset_order).map(v=>({...o.find(y=>y.id===v.dataset_id),dataset_order:v.dataset_order,vp_dataset_id:v.id}))}),f},[])}},async getDefaultProjectMultiView({rootState:e},{projectId:t,multiViewId:i}){var u,o;const{data:{items:n}}=await Be.getDatasets(e.Auth.organization.id,{order_by:"created_at",order_direction:"desc",attributes:"with_project_id","filter[project_id]":t,page_size:50,decorators:(o=(u=e.Auth)==null?void 0:u.user)!=null&&o.is_guest?[ke.dataset.user]:[ke.dataset.user,ke.dataset.tags]}),r=n.filter(h=>h.dataset_type_key==="pointcloud"),s=n.filter(h=>h.dataset_type_key!=="pointcloud"),c=[];return r.length>0&&c.push({datasets:r,viewport_type:"potree",id:"potree"}),s.length>0&&c.push({datasets:s,viewport_type:"maps",id:"maps"}),{id:i,multiViewTitle:"All datasets (default)",syncViewports:!1,projectId:t,viewportRows:[{viewports:c}]}}},b2={state:g2,getters:m2,mutations:v2,actions:y2,namespaced:!0},Yi={BOX:"vector_3d_boxes",POINT:"vector_points",LINE_STRING:"vector_linestrings",POLYGON:"vector_polygons"},Po={attribute_code:"",attribute_name:""};class Lo{static getPois(t,i,n,r){return V.request(`/organization/${t}/datasets/${i}/${n}`,{type:"GET",params:r})}static getPoi(t,i,n,r,s){return V.request(`/organization/${t}/datasets/${i}/${n}/${r}`,{type:"GET",params:s})}static createPoi(t,i,n,r){return V.request(`/organization/${t}/datasets/${i}/${n}`,{type:"POST",data:r})}static updatePoi(t,i,n,r,s){return V.request(`/organization/${t}/datasets/${i}/${n}/${r}`,{type:"PUT",data:s})}static deletePoi(t,i,n,r){return V.request(`/organization/${t}/datasets/${i}/${n}/${r}`,{type:"DELETE"})}}const{t:yr}=nt.global,_2={pois:{}},w2={setPoi(e,{datasetId:t,poi:i}){const n=e.pois[t].findIndex(r=>r.id===i.id);n>=0?e.pois[t][n]=i:e.pois[t].push(i)},removePoi(e,{datasetId:t,id:i}){const n=e.pois[t].findIndex(r=>r.id===i);n>=0&&e.pois[t].splice(n,1)}},S2={getPois({state:e,rootState:t},{datasetId:i,params:n}){const r=Object.values(Yi).map(s=>Lo.getPois(t.Auth.organization.id,i,s,n));return Promise.all(r).then(s=>s.flatMap(({data:c},u)=>c.map(o=>({...o,type:Object.keys(Yi)[u]})))).then(s=>(e.pois[i]=s,s))},updatePoi({commit:e,dispatch:t,rootState:i},{datasetId:n,poiType:r,poi:s}){return Lo.updatePoi(i.Auth.organization.id,n,r,s.id,s).then(({data:c})=>(e("setPoi",{datasetId:n,poi:s}),t("Notifications/displayToastNotification",{msg:yr("Poi successfully updated."),type:"success"},{root:!0}),c)).catch(c=>{throw t("Notifications/displayToastNotification",{msg:yr("Failed to update Poi."),type:"error"},{root:!0}),c})},createPoi({commit:e,dispatch:t,rootState:i},{datasetId:n,poiType:r,poi:s}){return Lo.createPoi(i.Auth.organization.id,n,r,s).then(({data:c})=>(e("setPoi",{datasetId:n,poi:s}),t("Notifications/displayToastNotification",{msg:yr("Poi successfully created."),type:"success"},{root:!0}),c)).catch(c=>{throw t("Notifications/displayToastNotification",{msg:yr("Failed to create Poi."),type:"error"},{root:!0}),c})},deletePoi({commit:e,dispatch:t,rootState:i},{datasetId:n,poiType:r,id:s}){Lo.deletePoi(i.Auth.organization.id,n,r,s).then(({data:c})=>(e("removePoi",{datasetId:n,id:s}),t("Notifications/displayToastNotification",{msg:yr("Poi successfully deleted."),type:"success"},{root:!0}),c)).catch(c=>{throw t("Notifications/displayToastNotification",{msg:yr("Failed to delete Poi."),type:"error"},{root:!0}),c})}},A2={namespaced:!0,state:_2,mutations:w2,actions:S2};class ds{static cacheClear(t={}){return V.request("/admin/cache-clear",{type:"POST",...t})}static stripeProductsSync(t={}){return V.request("/admin/stripe-products-sync",{type:"POST",...t})}static stripePricesSync(t={}){return V.request("/admin/stripe-prices-sync",{type:"POST",...t})}static importOpenData(t={},i={}){return V.request("/admin/import-open-data",{type:"POST",data:t,...i})}static restoreDataset(t){return V.request(`/admin/datasets/${t}/restore`,{type:"PUT"})}}const C2={pointcloud:"pointCloudDatasets",vector:"vectorDatasets",raster:"rasterDatasets",image:"imageDatasets"},x2={pointCloudDatasets:{items:[],pagination:{}},vectorDatasets:{items:[],pagination:{}},rasterDatasets:{items:[],pagination:{}},imageDatasets:{items:[],pagination:{}},orders:{items:[],pagination:{}}},T2={},$2={setDatasets(e,{datasets:t,type:i}){e[i].items=t.items,e[i].pagination=t.pagination},setOrders(e,{orders:t}){e.orders.items=t.items,e.orders.pagination=t.pagination}},M2={getDatasetsAdmin({commit:e},t){return Be.getDatasetsAdmin({order_by:"created_at",order_direction:"desc",...t,decorators:[...(t==null?void 0:t.decorators)||[],ke.dataset.user,ke.dataset.tags]}).then(({data:i})=>{const n=C2[t["filter[dataset_type_key]"]];e("setDatasets",{datasets:i,type:n})})},getOrdersAdmin({commit:e},t){return lt.getAllOrganizationsOrders({order_by:"created_at",order_direction:"desc",decorators:[ke.billing_order.payments,ke.billing_order.organization],...t}).then(({data:i})=>{e("setOrders",{orders:i})})},cacheClear(e){return ds.cacheClear().then(t=>{e.dispatch("Notifications/displayToastNotification",{msg:t.data.message,type:"success"},{root:!0})}).catch(t=>{throw e.dispatch("Notifications/displayToastNotification",{msg:t.data.message||"Unknown error.",type:"error"},{root:!0}),t})},stripeProductsSync(e){return ds.stripeProductsSync().then(t=>{e.dispatch("Notifications/displayToastNotification",{msg:t.data.message,type:"success"},{root:!0})}).catch(t=>{throw e.dispatch("Notifications/displayToastNotification",{msg:t.data.message||"Unknown error.",type:"error"},{root:!0}),t})},stripePricesSync(e){return ds.stripePricesSync().then(t=>{e.dispatch("Notifications/displayToastNotification",{msg:t.data.message,type:"success"},{root:!0})}).catch(t=>{throw e.dispatch("Notifications/displayToastNotification",{msg:t.data.message||"Unknown error.",type:"error"},{root:!0}),t})},importOpenData(e,t){return ds.importOpenData(t).then(i=>{e.dispatch("Notifications/displayToastNotification",{msg:i.data.message,type:"success"},{root:!0})}).catch(i=>{throw e.dispatch("Notifications/displayToastNotification",{msg:i.data.message||"Unknown error.",type:"error"},{root:!0}),i})},restoreDataset(e,t){return ds.restoreDataset(t).then(i=>{e.dispatch("Notifications/displayToastNotification",{msg:i.data.message,type:"success"},{root:!0})}).catch(i=>{throw e.dispatch("Notifications/displayToastNotification",{msg:i.data.message||"Unknown error.",type:"error"},{root:!0}),i})}},E2={namespaced:!0,state:x2,getters:T2,mutations:$2,actions:M2};class jf{static getTags(t,i){return V.request(`/organization/${t}/tags`,{type:"GET",params:i})}static createTag(t,i){return V.request(`/organization/${t}/tags`,{type:"POST",data:i})}}const k2={datasetTags:[],datasetTagsPagination:{}},P2={setDatasetTags(e,t){e.datasetTags=t.items,e.datasetTagsPagination=t.pagination}},L2={},R2={getDatasetTags({state:e,commit:t,rootState:i},n){return jf.getTags(i.Auth.organization.id,{"filter[type]":"datasets",order_by:"name",order_direction:"asc",page_size:50,...n}).then(({data:r})=>(t("setDatasetTags",r),e.datasetTags))},async createTag({dispatch:e,rootState:t},i){const{data:n}=await jf.createTag(t.Auth.organization.id,i);switch(i.type){case"datasets":await e("getDatasetTags");break;default:console.warn("Tag type does not exist")}return n}},I2={state:k2,getters:L2,mutations:P2,actions:R2,namespaced:!0},O2={processingDatasets:[],runningFlows:[]},N2={},D2={},F2={getProcessingDatasets({state:e,rootState:t}){return Be.getDatasets(t.Auth.organization.id,{order_by:"created_at",order_direction:"desc","filter[status]":"i=created,importing,preprocessing","filter[user_id]":"i!=00000000-0000-0000-0000-000000000000","filter[created_at]":`t>=${Vi().subtract(7,"day").utc().format("YYYY-MM-DD HH:mm:ss")}`}).then(({data:i})=>(e.processingDatasets=i.items,i.items))},getRunningFlows({state:e,rootState:t}){return Ke.getFlowExecutions(t.Auth.organization.id,{order_by:"created_at",order_direction:"desc","filter[status]":"i!=finished,failed","filter[is_system_flow]":"b=0","filter[created_at]":`t>=${Vi().subtract(7,"day").utc().format("YYYY-MM-DD HH:mm:ss")}`}).then(({data:i})=>(e.runningFlows=i.items,i.items))},async getActiveJobs({state:e,dispatch:t}){return await t("getProcessingDatasets"),await t("getRunningFlows"),[...e.processingDatasets,...e.runningFlows]}},B2={namespaced:!0,state:O2,getters:N2,mutations:D2,actions:F2};class fs{static getQCJobs(t){return V.request(`/organization/${t}/quality-control-jobs`,{type:"GET"})}static getQCJob(t,i){return V.request(`/organization/${t}/quality-control-jobs/${i}`,{type:"GET"})}static createQCJob(t,i){return V.request(`/organization/${t}/quality-control-jobs`,{type:"POST",data:i})}static deleteQCJob(t,i){return V.request(`/organization/${t}/quality-control-jobs/${i}`,{type:"DELETE"})}static calculateQCJobPrice(t,{dataset_id:i,semantic_label_definitions_to_qc:n}){return V.request(`/organization/${t}/quality-control-jobs/calculate-price`,{type:"POST",data:{dataset_id:i,semantic_label_definitions_to_qc:n}})}}const{t:Ec}=nt.global;function V2(){this.status=404,this.data={message:Ec("Project not found")}}const z2={qcJobs:[]},H2={},U2={},W2={async getQCJobs({state:e,rootState:t}){const{data:i}=await fs.getQCJobs(t.Auth.organization.id);return e.qcJobs=i,i},async getQCJob({rootState:e},{qcJobId:t}){return fs.getQCJob(e.Auth.organization.id,t).then(({data:i})=>{if(i.length===0)throw new V2;return i})},async createQCJob({rootState:e,dispatch:t},i){return fs.createQCJob(e.Auth.organization.id,i).then(({data:n})=>(t("Notifications/displayToastNotification",{msg:Ec("QC job submitted successfully."),type:"success"},{root:!0}),n)).catch(n=>{throw t("Notifications/displayToastNotification",{msg:Ec("Failed to submit QC job."),type:"error"},{root:!0}),n})},async deleteQCJob({rootState:e},{qcJobId:t}){return fs.deleteQCJob(e.Auth.organization.id,t).then(({data:i})=>i)},async calculateQCJobPrice({rootState:e},t){return fs.calculateQCJobPrice(e.Auth.organization.id,t).then(({data:i})=>i)}},j2={namespaced:!0,state:z2,getters:H2,mutations:U2,actions:W2};class ps{static getCLIReleases(t){return V.request(`/organization/${t}/cli-releases`,{type:"GET"})}static getCLILicenseTemplates(t){return V.request(`/organization/${t}/cli-license-templates`,{type:"GET"})}static getMyCLILicenses(t){return V.request(`/organization/${t}/my-cli-licenses`,{type:"GET"})}static purchaseLicense(t,i,{number_of_licenses:n,payment_type_key:r}){return V.request(`/organization/${t}/cli-license-templates/${i}/cli-licenses`,{type:"POST",data:{number_of_licenses:n,payment_type_key:r}})}static createLicenseSA(t){return V.request("/cli-licenses",{type:"POST",data:t})}static updateLicenseSA(t,i){return V.request(`/cli-licenses/${t}`,{type:"PUT",data:i})}}const{t:Ro}=nt.global,Gf=e=>e.type==="volume"?`${e.license_name} ${Wo(e.volume_resource_amount/1e9,2)} billion points valid until ${Vi(e.valid_until).utc().format("YYYY-MM-DD")}`:`${e.license_name} valid until ${Vi(e.valid_until).utc().format("YYYY-MM-DD")}`,qf=e=>{const t=Vi(),i=Vi.utc(e.valid_until).local();return t.isAfter(i)},G2={latestCLIRelease:null,CLIReleases:[],CLILicenseTemplates:[],CLILicenses:[],CLILicensesEnabled:!1,CLIConsumption:{},CLIStats:{},adminOrganizationsCLILicenses:{},adminOrganizationsCLILicensesPagination:{}},q2={},K2={},Y2={async getCLIReleases({state:e,rootState:t}){const{data:i}=await ps.getCLIReleases(t.Auth.organization.id);return e.CLIReleases=i,e.latestCLIRelease=i.find(n=>n.is_latest),i},async getCLILicenseTemplates({state:e,rootState:t}){const{data:i}=await ps.getCLILicenseTemplates(t.Auth.organization.id);e.CLILicenseTemplates=i},async getCLILicenseInfo({state:e,rootState:t,dispatch:i}){var r,s;const n=await i("AppState/Organizations/getAsync",{organizationId:t.Auth.organization.id,params:{decorators:[ke.organization.cli_licenses,ke.organization.cli_stats,ke.organization.cli_consumption,ke.organization.billing_bundle]}},{root:!0});return e.CLILicenses=n.cli_licenses.map(c=>({...c,title:Gf(c),is_expired:qf(c)})),e.CLIConsumption=n.cli_consumption,e.CLIStats=n.cli_stats,e.CLILicensesEnabled=(s=(r=n.billing_bundle)==null?void 0:r[0].cli_licenses_enabled)!=null?s:!1,n},async purchaseLicense({rootState:e},{licenseTemplateId:t,payload:i}){return ps.purchaseLicense(e.Auth.organization.id,t,i).then(({data:n})=>n)},async createLicenseSA({dispatch:e},t){try{await ps.createLicenseSA(t),e("Notifications/displayToastNotification",{msg:Ro("License added to organization."),type:"success"},{root:!0})}catch(i){throw e("Notifications/displayToastNotification",{msg:Ro("Failed to add license to organization."),type:"error"},{root:!0}),console.error(i),i}},async updateLicenseSA({dispatch:e},{licenseId:t,payload:i}){try{await ps.updateLicenseSA(t,i),e("Notifications/displayToastNotification",{msg:Ro("License updated successfully."),type:"success"},{root:!0})}catch(n){throw e("Notifications/displayToastNotification",{msg:Ro("Failed to update license."),type:"error"},{root:!0}),console.error(n),n}},async getOrganizationsLicensesSA({state:e},t){try{const{data:i}=await xn.getOrganizations({"filter[all_licenses_count]":"n>=1",decorators:[ke.organization.cli_licenses,ke.organization.cli_stats,ke.organization.cli_consumption],...t});e.adminOrganizationsCLILicenses=i.items.map(n=>({...n,cli_licenses:n.cli_licenses.map(r=>({...r,title:Gf(r),is_expired:qf(r)})).sort((r,s)=>Vi(r.valid_until).isAfter(Vi(s.valid_until)))})),e.adminOrganizationsCLILicensesPagination=i.pagination}catch(i){throw console.error(i),i}}},X2={namespaced:!0,state:G2,getters:q2,mutations:K2,actions:Y2};class Kf{static get(t){return V.request("/admin/autoscale-config",{type:"GET",params:{...t}})}static update(t,i){return V.request(`/admin/autoscale-config/${t}`,{type:"PUT",data:i})}}const{t:Yf}=nt.global,Q2={autoscaleConfigsPagination:{},autoscaleConfigs:{}},J2={},Z2={},eF={async get({state:e},t){const{data:i}=await Kf.get(t);e.autoscaleConfigs=i.items,e.autoscaleConfigsPagination=i.pagination},async update({dispatch:e},{ascId:t,payload:i}){console.log(i);try{await Kf.update(t,i),e("Notifications/displayToastNotification",{msg:Yf("Autoscale Config updated successfully."),type:"success"},{root:!0})}catch(n){throw e("Notifications/displayToastNotification",{msg:Yf("Failed to update autoscale config."),type:"error"},{root:!0}),console.error(n),n}}},tF={namespaced:!0,state:Q2,getters:J2,mutations:Z2,actions:eF},iF={},nF={},rF={},sF={confirmDelete(){return Promise.resolve(!0)}},oF={state:iF,getters:rF,mutations:nF,actions:sF,modules:{AiModels:Av,Datasets:CN,Datasources:EN,Downloads:FD,FlowNodeDefinitions:Mv,FlowNodeTypes:IN,Flows:Sv,ImageDatasets:BN,Images:UN,PointWorker:KN,Projects:iD,ProjectDatasets:oD,Sessions:uD,Tools:gD,Users:_D,Organizations:CD,FailedJobs:ED,FailedPublishEvents:RD,Billing:WD,UserState:XD,UserSettings:t2,Newsletters:r2,SpatialRefSys:l2,CollaborationNotes:f2,MultiViews:b2,Pois:A2,Admin:E2,Tags:I2,ActiveJobs:B2,QCJobs:j2,CLILicenses:X2,AutoscaleConfig:tF},namespaced:!0},aF="view-super-admin-panel",lF="super-admin",cF="datasets-download",uF="pages:downloads",hF="pages:admin",Xf={[uF]:cF,[hF]:aF};class xt{static login(t){return V.request("/oauth/token",{type:"POST",data:t})}static register(t){return V.request("/register",{type:"POST",data:t})}static registerSso(t){return V.request("/sso/register",{type:"POST",data:t})}static requestPasswordReset(t){return V.request("/auth/invoke-password-reset",{type:"POST",data:t})}static resetPassword(t){return V.request("/auth/password-reset",{type:"POST",data:t})}static getNewAccessToken(t){return V.request("/oauth/token",{type:"POST",headers:{},data:t})}static getUserData(){return V.request("/oauth/me",{type:"GET"})}static getSsoUser(t){return V.request(`/sso/users/token/${t}`,{type:"GET"})}static changePassword(t){return V.request("/auth/password-change",{type:"POST",data:t})}static getPersonalAccessTokens(t,i){return V.request(`/organization/${t}/users/${i}/personal-access-tokens`,{type:"GET"})}static getPersonalAccessToken(t,i,n){return V.request(`/organization/${t}/users/${i}/personal-access-tokens/${n}`,{type:"GET"})}static createPersonalAccessToken(t,i,n){return V.request(`/organization/${t}/users/${i}/personal-access-tokens`,{type:"POST",data:n})}static revokePersonalAccessToken(t,i,n){return V.request(`/organization/${t}/users/${i}/personal-access-tokens/${n}`,{type:"DELETE"})}static getPersonalAccessTokenAbilities(t){return V.request(`/organizations/${t}/personal-access-token-abilities`,{type:"GET"})}static verifyGuestLogin(t){return V.request(t,{type:"GET"})}static loginSso(t){return V.request("/sso/oauth/token",{type:"POST",data:t})}static getSsoProviderRedirect(t,i){return V.request(`/sso/redirect/${t}`,{type:"GET",params:i})}}class dF{static sendConsent(t,i){return V.request(`/organization/${t}/user/consent`,{type:"POST",data:i})}}const{t:br}=nt.global,fF={is_logged_in:!1,user:null,organization:null,parent_organization:null,permissions:null,permissions_frontend:null,personalAccessTokenAbilities:{},attemptLoginPromise:null},pF={getUserInitials(e){const{first_name:t,last_name:i}=e.user;if(i)return t.charAt(0).toUpperCase()+i.charAt(0).toUpperCase();const n=t.split(" ");return n[0].charAt(0).toUpperCase()+n.slice(-1)[0].charAt(0).toUpperCase()},isSuperAdmin(e){return e.permissions?e.permissions.includes(lF):!1},getUserId(e){var t;return(t=e.user)==null?void 0:t.id},isReseller(e){var t;return e.organization.type==="parent"||e.user.organization_id===((t=e.parent_organization)==null?void 0:t.id)},hasResourcePermission:(e,t)=>i=>t.isSuperAdmin||!(i in Xf)?!0:e.permissions_frontend?!!e.permissions_frontend.includes(Xf[i]):!1,getUserCurrency(e,t,i){return{currency:e.organization.currency,symbol:i.AppState.Billing.currencies[e.organization.currency]?i.AppState.Billing.currencies[e.organization.currency].symbol:e.organization.currency}}},gF={logout:e=>{e.user=null,e.is_logged_in=!1},setIsLoggedIn:(e,t)=>{e.is_logged_in=t},setUser:(e,t)=>{e.user=t},setOrganization:(e,t)=>{e.organization=t},setParentOrganization:(e,t)=>{e.parent_organization=t},setPermissions:(e,t)=>{e.permissions=t},setPermissionsFrontend:(e,t)=>{e.permissions_frontend=t},setPersonalAccessTokenAbilities:(e,t)=>{e.personalAccessTokenAbilities=t}},mF={logout({commit:e}){return navigator.serviceWorker.controller.postMessage("clearTokens"),e("logout"),!0},attemptLogin({state:e,dispatch:t}){if(e.is_logged_in)return!0;if(e.attemptLoginPromise)return e.attemptLoginPromise;const i=t("getUserData").then(()=>!0).catch(()=>!1).finally(n=>(e.attemptLoginPromise=null,n));return e.attemptLoginPromise=i,i},login({dispatch:e},t){return xt.login({grant_type:"password",client_id:window.ENV_VARS.CLIENT_ID,client_secret:window.ENV_VARS.CLIENT_SECRET,...t}).catch(i=>{throw e("Notifications/displayToastNotification",{msg:br("Login failed."),type:"error"},{root:!0}),i}).then(async()=>{try{await e("getUserData")}catch(i){if(i.response.status===412)throw i}return!0})},loginWithAuthCode({dispatch:e},t){return xt.login({grant_type:"authorization_code_grant",client_id:window.ENV_VARS.CLIENT_ID,client_secret:window.ENV_VARS.CLIENT_SECRET,...t}).catch(i=>{throw e("Notifications/displayToastNotification",{msg:br("Login failed."),type:"error"},{root:!0}),i}).then(async()=>{try{await e("getUserData")}catch(i){if(i.response.status===412)throw i}return!0})},register(e,t){return xt.register(t)},registerSso(e,t){return xt.registerSso(t)},requestPasswordReset(e,t){return xt.requestPasswordReset(t)},resetPassword(e,t){return xt.resetPassword(t)},changePassword(e,t){return xt.changePassword(t)},setIsLoggedIn({commit:e},t=!1){e("setIsLoggedIn",t)},getUserData({state:e,dispatch:t,commit:i}){return xt.getUserData().then(({data:n})=>{var s,c;const r=(s=e==null?void 0:e.user)==null?void 0:s.id;i("setUser",n),i("setOrganization",n.organization),i("setParentOrganization",(c=n.parent_organization[0])!=null?c:null),i("setPermissions",n.user_permissions),i("setPermissionsFrontend",n.user_permissions_frontend),i("setIsLoggedIn",!0),r!==(n==null?void 0:n.id)&&i("AppState/UserState/setUserState",n.frontend_state,{root:!0}),e.userDataPromise=null}).then(()=>iE(e.user.locale)).then(()=>t("AppState/UserSettings/loadUserSettings",{},{root:!0}))},getSsoUser(e,t){return xt.getSsoUser(t).then(({data:i})=>i)},getPersonalAccessTokens({state:e}){return xt.getPersonalAccessTokens(e.organization.id,e.user.id).then(({data:t})=>t)},getPersonalAccessToken({state:e},t){return xt.getPersonalAccessToken(e.organization.id,e.user.id,t).then(({data:i})=>i)},createPersonalAccessToken({state:e,dispatch:t},i){return xt.createPersonalAccessToken(e.organization.id,e.user.id,i).then(async({data:n})=>(t("Notifications/displayToastNotification",{msg:br("Successfully created personal access token."),type:"success"},{root:!0}),n)).catch(n=>{throw t("Notifications/displayToastNotification",{msg:br("Failed to create personal access token."),type:"error"},{root:!0}),n})},revokePersonalAccessToken({state:e,dispatch:t},i){return xt.revokePersonalAccessToken(e.organization.id,e.user.id,i).then(async({data:n})=>(t("Notifications/displayToastNotification",{msg:br("Successfully revoked personal access token."),type:"success"},{root:!0}),n)).catch(n=>{throw t("Notifications/displayToastNotification",{msg:br("Failed to revoke personal access token."),type:"error"},{root:!0}),n})},async guestLogin({dispatch:e},t){try{return await xt.verifyGuestLogin(t),await e("getUserData"),!0}catch{return e("Modals/openModal",{title:"Sharing link has expired",message:"Register to try our app for free.",confirmButton:{text:"Continue"},cancelButton:null},{root:!0}),!1}},async getPersonalAccessTokenAbilities({commit:e,rootState:t}){return xt.getPersonalAccessTokenAbilities(t.Auth.organization.id).then(({data:i})=>e("setPersonalAccessTokenAbilities",i))},async loginSso({dispatch:e},t){try{return await xt.loginSso({...t,client_id:window.ENV_VARS.CLIENT_ID,client_secret:window.ENV_VARS.CLIENT_SECRET}),await e("getUserData"),!0}catch(i){if(i.response.status===412)throw i;return!1}},getSsoProviderRedirect(e,{provider:t,params:i}){return xt.getSsoProviderRedirect(t,i).then(({data:n})=>n)},sendTOSConsent(e,{organizationId:t,payload:i}){return dF.sendConsent(t,i).then(({data:n})=>n)}},vF={namespaced:!0,state:fF,mutations:gF,actions:mF,getters:pF},yF={},bF={},_F={getId(){}},wF={},SF={namespaced:!0,state:yF,getters:_F,mutations:bF,actions:wF},{t:AF}=nt.global,CF={openModals:[]},xF={closeModal(e,t){const i=e.openModals.findIndex(n=>n.id===t);i!==-1&&e.openModals.splice(i,1)},closeAllModals(e){e.openModals=[]},openModal(e,t){e.openModals.push(t)}},TF={},$F={openModal({commit:e},t){return t.id=t.id||rn(),e("openModal",t),t.id},openDeleteModal({commit:e},{title:t,message:i,content:n,onClick:r,confirmButtonText:s}){const c={id:rn(),title:t,message:i,content:n,confirmButton:{text:s||AF("Delete"),type:"delete",onClick:r}};e("openModal",c)},closeModal({commit:e},t){e("closeModal",t)},closeAllModals({commit:e}){e("closeAllModals")}},MF={namespaced:!0,state:CF,getters:TF,mutations:xF,actions:$F};var hy={};(function(e){(function(){var t={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function i(u){return r(c(u),arguments)}function n(u,o){return i.apply(null,[u].concat(o||[]))}function r(u,o){var h=1,a=u.length,l,f="",d,p,g,m,v,y,S,b;for(d=0;d<a;d++)if(typeof u[d]=="string")f+=u[d];else if(typeof u[d]=="object"){if(g=u[d],g.keys)for(l=o[h],p=0;p<g.keys.length;p++){if(l==null)throw new Error(i('[sprintf] Cannot access property "%s" of undefined value "%s"',g.keys[p],g.keys[p-1]));l=l[g.keys[p]]}else g.param_no?l=o[g.param_no]:l=o[h++];if(t.not_type.test(g.type)&&t.not_primitive.test(g.type)&&l instanceof Function&&(l=l()),t.numeric_arg.test(g.type)&&typeof l!="number"&&isNaN(l))throw new TypeError(i("[sprintf] expecting number but found %T",l));switch(t.number.test(g.type)&&(S=l>=0),g.type){case"b":l=parseInt(l,10).toString(2);break;case"c":l=String.fromCharCode(parseInt(l,10));break;case"d":case"i":l=parseInt(l,10);break;case"j":l=JSON.stringify(l,null,g.width?parseInt(g.width):0);break;case"e":l=g.precision?parseFloat(l).toExponential(g.precision):parseFloat(l).toExponential();break;case"f":l=g.precision?parseFloat(l).toFixed(g.precision):parseFloat(l);break;case"g":l=g.precision?String(Number(l.toPrecision(g.precision))):parseFloat(l);break;case"o":l=(parseInt(l,10)>>>0).toString(8);break;case"s":l=String(l),l=g.precision?l.substring(0,g.precision):l;break;case"t":l=String(!!l),l=g.precision?l.substring(0,g.precision):l;break;case"T":l=Object.prototype.toString.call(l).slice(8,-1).toLowerCase(),l=g.precision?l.substring(0,g.precision):l;break;case"u":l=parseInt(l,10)>>>0;break;case"v":l=l.valueOf(),l=g.precision?l.substring(0,g.precision):l;break;case"x":l=(parseInt(l,10)>>>0).toString(16);break;case"X":l=(parseInt(l,10)>>>0).toString(16).toUpperCase();break}t.json.test(g.type)?f+=l:(t.number.test(g.type)&&(!S||g.sign)?(b=S?"+":"-",l=l.toString().replace(t.sign,"")):b="",v=g.pad_char?g.pad_char==="0"?"0":g.pad_char.charAt(1):" ",y=g.width-(b+l).length,m=g.width&&y>0?v.repeat(y):"",f+=g.align?b+l+m:v==="0"?b+m+l:m+b+l)}return f}var s=Object.create(null);function c(u){if(s[u])return s[u];for(var o=u,h,a=[],l=0;o;){if((h=t.text.exec(o))!==null)a.push(h[0]);else if((h=t.modulo.exec(o))!==null)a.push("%");else if((h=t.placeholder.exec(o))!==null){if(h[2]){l|=1;var f=[],d=h[2],p=[];if((p=t.key.exec(d))!==null)for(f.push(p[1]);(d=d.substring(p[0].length))!=="";)if((p=t.key_access.exec(d))!==null)f.push(p[1]);else if((p=t.index_access.exec(d))!==null)f.push(p[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");h[2]=f}else l|=2;if(l===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");a.push({placeholder:h[0],param_no:h[1],keys:h[2],sign:h[3],pad_char:h[4],align:h[5],width:h[6],precision:h[7],type:h[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");o=o.substring(h[0].length)}return s[u]=a}e.sprintf=i,e.vsprintf=n,typeof window<"u"&&(window.sprintf=i,window.vsprintf=n)})()})(hy);class Fl{static getNotifications(t,i={},n={}){return V.request(`/organization/${t}/notifications`,{type:"GET",params:i,...n})}static getUnseenNotifications(t,i={},n={}){return V.request(`/organization/${t}/notifications/unseen`,{type:"GET",params:i,...n})}static markNotificationAsSeen(t,i,n={}){return V.request(`/organization/${t}/notifications/seen/${i}`,{type:"PUT",...n})}static markNotificationAsUnseen(t,i,n={}){return V.request(`/organization/${t}/notifications/unseen/${i}`,{type:"PUT",...n})}}const Qf=e=>{const t={id:e.id,userId:e.user_id,msg:e.message.replacements.length>0?hy.vsprintf(e.message.message,e.message.replacements):e.message.message,createdAt:e.created_at,seen:e.seen,title:e.class_name.split("\\").slice(-1)[0],type:e.type};return e.class_name==="App\\Domains\\Datasets\\Models\\DatasetModel"&&(t.link={name:"pages",params:{tool:"pages:catalogue",itemId:e.class_id,subpage:"show"}}),e.class_name==="App\\Domains\\Downloads\\Models\\DownloadModel"&&(t.link={name:"pages",params:{tool:"pages:downloads"}}),t},EF={notifications:[],toastNotifications:[],toastNotificationsCloseTimeouts:{},showOnlyUnseenNotifications:!0},kF={displayToastNotification(e,t){e.toastNotifications.push(t)},removeToastNotification(e,{id:t}){const i=e.toastNotifications.findIndex(n=>n.id===t);e.toastNotifications.splice(i,1)},setNotifications(e,t){e.notifications=t.filter(i=>i.type!=="system")},addNotification(e,t){e.notifications.unshift(t)},setShowOnlyUnseenNotifications(e,t){e.showOnlyUnseenNotifications=t},markNotificationAsSeen(e,{id:t}){e.notifications.find(i=>i.id===t).seen=!0},markNotificationAsUnseen(e,{id:t}){e.notifications.find(i=>i.id===t).seen=!1}},PF={getToastNotifications(e){return e.toastNotifications},getNotifications(e){return e.notifications.map(Qf)},getUnseenNotifications(e){return e.notifications.filter(t=>!t.seen).map(Qf)}},LF={async displayToastNotification({commit:e,dispatch:t},{timeout:i=1e4,...n}){const r=rn();e("displayToastNotification",{...n,id:r}),t("setToastNotificationCloseTimeout",{id:r,timeout:i})},async stopToastNotificationTimeout({dispatch:e},t){e("removeToastNotificationCloseTimeout",t)},async startToastNotificationTimeout({dispatch:e},{timeout:t=5e3,...i}){e("setToastNotificationCloseTimeout",{...i,timeout:t})},setToastNotificationCloseTimeout({state:e,commit:t},{id:i,timeout:n}){if(e.toastNotificationsCloseTimeouts[i])try{clearTimeout(e.toastNotificationsCloseTimeouts[i])}catch{}e.toastNotificationsCloseTimeouts[i]=setTimeout(()=>t("removeToastNotification",{id:i}),n)},removeToastNotificationCloseTimeout({state:e},{id:t}){if(!!e.toastNotificationsCloseTimeouts[t])try{clearTimeout(e.toastNotificationsCloseTimeouts[t]),delete e.toastNotificationsCloseTimeouts[t]}catch{}},async removeToastNotification({commit:e},t){e("removeToastNotification",t)},async getNotifications({commit:e,rootState:t}){Fl.getNotifications(t.Auth.organization.id,{"filter[type]":"!=system"}).then(({data:i})=>e("setNotifications",i))},async addNotification({commit:e},t){e("addNotification",t)},async setShowOnlyUnseenNotifications({commit:e},t){e("setShowOnlyUnseenNotifications",t)},async markNotificationAsSeen({commit:e,rootState:t},i){Fl.markNotificationAsSeen(t.Auth.organization.id,i.id),e("markNotificationAsSeen",i)},async markNotificationAsUnseen({commit:e,rootState:t},i){Fl.markNotificationAsUnseen(t.Auth.organization.id,i.id),e("markNotificationAsUnseen",i)},async toggleNotificationSeenStatus({dispatch:e},t){return t.seen?e("markNotificationAsSeen",t):e("markNotificationAsUnseen",t)}},RF={namespaced:!0,state:EF,getters:PF,mutations:kF,actions:LF},IF={entered:[],coordinates:{},dragging:{},sortable:{}},OF={getSortable(e){return t=>e.sortable[t]},getSortableListGroup(e,t){return(i,n)=>n.reduce((r,s)=>(r.list||[])[s],t.getSortable(i))},getSortableListItem(e,t){return(i,n,r)=>t.getSortableListGroup(i,n).list[r]},isItemDroppable(e,t){return(i,n,r)=>{const{droppable:s=!0}=t.getSortableListItem(i,n,r),{dragging:c={}}=e;if(!!!Object.keys(c).length)return s;const h=[...c.parent_indexes,c.item_index].reduce((a,l,f)=>l===n[f],!0);return s&&!h}},getSortableList(e){return t=>e.sortable[t].list}},NF={addChildListGroup(e,{droppedOnItem:t,movedItem:i}){t.list||(t.list=[]),t.list.push(i)},addSortable(e,{sortableId:t,sortable:i}){e.sortable[t]={...i}},clearSortable(e,t){e.sortable[t].list=[]},removeSortable(e,t){delete e.sortable[t]},setEntered(e,t=[]){e.entered=t},setCoordinates(e,t={}){e.coordinates=t},setDragging(e,t={}){e.dragging=t}},DF={reorderItems({state:e,getters:t,dispatch:i},{draggedItem:n,droppedOnItem:r}){const{pageY:s,middleY:c}=e.coordinates,u=s<=c?0:1,o=t.getSortableListGroup(r.sortable_id,r.parent_indexes),h=t.getSortableListGroup(n.sortable_id,n.parent_indexes),[a]=h.list.splice(n.item_index,1),l=r.sortable_id===n.sortable_id&&n.parent_indexes.join("")===r.parent_indexes.join(""),f=n.item_index<r.item_index;let d=r.item_index+u;return l&&f&&(d-=1),o.list.splice(d,0,a),i("cleanDraggingState")},createChildListGroup({getters:e,commit:t,dispatch:i},{sortableId:n,itemIndex:r,parentIndexes:s,draggedItem:c}){const u=e.getSortableListGroup(c.sortable_id,c.parent_indexes),[o]=u.list.splice(c.item_index,1),h=e.getSortableListGroup(n,[...s,r]);return t("addChildListGroup",{droppedOnItem:h,movedItem:o}),i("cleanDraggingState")},addNewItem({getters:e,commit:t,dispatch:i},{sortableId:n,parentIndexes:r=[],item:s}){const c=e.getSortableListGroup(n,r);return t("addChildListGroup",{droppedOnItem:c,movedItem:s}),i("cleanDraggingState")},async cleanDraggingState({commit:e}){return await k$(200),e("setEntered"),e("setDragging"),e("setCoordinates"),!0}},FF={state:IF,getters:OF,mutations:NF,actions:DF,namespaced:!0},{t:Jf}=nt.global,BF={pocAttributeProperty:{pointSize:{value:.5},shape:{value:1}},stateProperty:{pointBudget:{value:2e3*1e3}}},VF=()=>({moduleId:"",client:!1,ready:!1,loaded:!1,loadPointCloudError:!1,forcedPointCloud:!1,loadingPanoramas:!1,keyPressed:void 0,filePath:"",tilesUpdatedAt:null,cameraShouldUpdate:!1,disableKeyboardShortcuts:!1,selectingInstanceId:{selecting:!1,type:"to"},multiViewId:null,viewportId:null,selectedVector:null,copcFilesExtents:{},queueLoaderPreset:[],queueActionsPreset:[],queue:new Ba(1),properties:{selectedObject:void 0,pointcloudId:void 0,datasetId:void 0,position:{},selectedPosition:{},cameraControlMode:"orbit",moveSpeed:{sliderValue:0,displayValue:0},pointCloudsAttribute:{},classifications:{},classificationsList:[],images360:[],image360file:"",polygonClipVolumeCount:0,boxClipVolumeCount:0,clipCameraPositionStack:[],commandsCount:0,activeClassifications:[],selectedClassification:"",selectedInstanceId:0,activeInstances:[],visibleInstances:[],discolorHiddenInstances:!1,invertVisibleInstances:!1,camera:{},editMode:"CLASSIFICATION",lengthUnit:"m",showClipOutsidePoints:!1,showCopcFilesExtents:!1,pointSize:3,pointSizeType:0,pointShape:1},objects:{pointClouds:{},measurements:{},annotations:{},cameraAnimations:{},images360:{},vectors:{}},counters:{pointClouds:0,measurements:0,annotations:0,cameraAnimations:1,images360:0},editor:{wkt:"",srid:"",id:"",editing:!1,targetSettings:void 0},autoOpenPanorama:!1,forcedPosition:void 0,classificationsAll:!0,rgbGammaOptions:{min:0,max:4,step:.01},rgbBrightnessOptions:{min:-1,max:1,step:.01},rgbContrastOptions:{min:-1,max:1,step:.01},heightRangeOptions:{min:Number.MAX_SAFE_INTEGER,max:Number.MIN_SAFE_INTEGER,step:1},heightRange:{min:Number.MAX_SAFE_INTEGER,max:Number.MIN_SAFE_INTEGER},intensityRangeOptions:{min:Number.MAX_SAFE_INTEGER,max:Number.MIN_SAFE_INTEGER,step:1},intensityRange:{min:Number.MAX_SAFE_INTEGER,max:Number.MIN_SAFE_INTEGER},intensityGammaOptions:{min:0,max:4,step:.01},intensityBrightnessOptions:{min:-1,max:1,step:.01},intensityContrastOptions:{min:-1,max:1,step:.01},weightOptions:{min:0,max:1,step:.01},gradientRepeatOptions:["CLAMP","REPEAT","MIRRORED_REPEAT"],gradientRepeat:"CLAMP",pointBudgetOptions:{min:1e3*1e3,max:10*1e3*1e3,step:1e3},pointBudget:2e3*1e3,fovOptions:{min:10,max:100,step:1},fov:60,edlEnabled:!0,edlRadiusOptions:{min:1,max:4,step:.01},edlRadius:1.4,edlStrengthOptions:{min:0,max:5,step:.01},edlStrength:.4,edlOpacityOptions:{min:0,max:1,step:.01},edlOpacity:1,backgroundOptions:["skybox","gradient","black","white","none"],background:"gradient",splatQualityOptions:["standard","hq"],splatQuality:"standard",minNodeSizeOptions:{min:10,max:1e3,step:1},minNodeSize:10,showBoundingBoxes:!1,freeze:!1,showMeasurementPoiLabels:!0,clipTaskOptions:["NONE","HIGHLIGHT","SHOW_INSIDE","SHOW_OUTSIDE"],clipTask:"HIGHLIGHT",clipMethodOptions:["INSIDE_ANY","INSIDE_ALL"],clipMethod:"INSIDE_ANY",cameraProjectionOptions:["PERSPECTIVE","ORTHOGRAPHIC"],cameraProjection:"PERSPECTIVE",moveSpeedOptions:{min:0,max:1,step:.01},pointSizeOptions:{min:0,max:15,step:.01},pointSizingOptions:{0:"FIXED",1:"ATTENUATED",2:"ADAPTIVE"},shapeOptions:{0:"SQUARE",1:"CIRCLE",2:"PARABOLOID"},pointOpacityOptions:{min:0,max:1,step:.001},cameraAnimationTimeOptions:{min:0,max:1,step:.001},cameraAnimationTime:0,pocAttribute:"rgba",tracePosition:!0,traceBoundingBox:!0,tracePositionCenter:!0,recenter:!1}),zF={},HF={setStateProperty(e,{property:t,value:i}){e[t]=i},setStatePropertiesProperty(e,{property:t,value:i}){e.properties[t]=i},setStateEditorProperty(e,{property:t,value:i}){e.editor[t]=i},setStatePocAttribute(e,{uuid:t,value:i}){e.properties.pointCloudsAttribute[t]=i;const{min:n,max:r}=i.heightRange;n<e.heightRange.min&&(e.heightRange.min=Math.round(n),e.heightRangeOptions.min=Math.round(n)),r>e.heightRange.max&&(e.heightRange.max=Math.round(r),e.heightRangeOptions.max=Math.round(r))},setStatePocAttributeProperty(e,{uuid:t,property:i,value:n}){e.properties.pointCloudsAttribute[t][i]=n},setStateCountersProperty(e,{property:t,value:i}){e.counters[t]=i},setStateObjectsProperty(e,{group:t=!1,property:i,value:n}){t?e.objects[t][i]=n:e.objects[i]=n},deleteStateObjectsProperty(e,{group:t=!1,uuid:i}){t?delete e.objects[t][i]:delete e.object[i]}},UF={runFromLoaderQueue({state:e},t){return e.ready?e.queue.enqueue(t):(e.queueLoaderPreset.push(t),!0)},frameLoaded(e,t){const{commit:i}=e,n=new km(t,e,da.EDITOR);i("setStateProperty",{property:"client",value:n})},serverReady({commit:e,dispatch:t}){return e("setStateProperty",{property:"ready",value:!0}),t("loadPresets")},setFilePath({commit:e},t){e("setStateProperty",{property:"filePath",value:t})},setTilesUpdatedAt({commit:e},t){e("setStateProperty",{property:"tilesUpdatedAt",value:t})},setCommands({dispatch:e,state:t},i){return e("runFromLoaderQueue",()=>{t.client.PointWorker.setCommands({commands:i},()=>{})})},commandAdded({state:e,dispatch:t},i){const n={dataset_id:e.properties.datasetId,...i};return t("AppState/PointWorker/setCommand",n,{root:!0}).catch(r=>{var s;throw r.status===422&&r.data?t("Notifications/displayToastNotification",{msg:(s=r.data.message)!=null?s:Jf("Unknown server error."),type:"warning",timeout:1e4},{root:!0}):t("Notifications/displayToastNotification",{msg:Jf("Failed to send command to server."),type:"error"},{root:!0}),e.client.PointWorker.undoCommand({},()=>{}),r})},async reloadPointCloud({state:e,dispatch:t}){t("AppState/PointWorker/getCommands",e.properties.datasetId,{root:!0}).then(i=>t("setCommands",i)).then(()=>{e.client.PointWorker.reloadPointCloud({path:e.filePath,tilesUpdatedAt:e.tilesUpdatedAt},()=>{})})},async reloadAllPointClouds({state:e,dispatch:t}){t("AppState/PointWorker/getCommands",e.properties.datasetId,{root:!0}).then(i=>t("setCommands",i)).then(()=>{e.client.PointWorker.reloadAllPointClouds({tilesUpdatedAt:e.tilesUpdatedAt},()=>{})})},commandsChanged({commit:e},{count:t}){e("setStatePropertiesProperty",{property:"commandsCount",value:t})},updateKeyPressed({commit:e},{mainKeyCode:t,alterKeyCode:i}){setTimeout(()=>{e("setStateProperty",{property:"keyPressed",value:{mainKeyCode:t,alterKeyCode:i}})},0)},destroy({commit:e,dispatch:t,state:i}){i.client&&i.client.destroy(),e("setStateProperty",{property:"ready",value:!1}),e("setStateProperty",{property:"client",value:null}),e("setStateProperty",{property:"cameraShouldUpdate",value:!1}),t("reset")},reset({commit:e}){e("setStateProperty",{property:"loaded",value:!1}),e("setStateProperty",{property:"loadPointCloudError",value:!1}),e("setStateProperty",{property:"forcedPointCloud",value:!1}),e("setStateProperty",{property:"tilesUpdatedAt",value:null}),e("setStatePropertiesProperty",{property:"position",value:{}}),e("setStateObjectsProperty",{property:"pointClouds",value:{}}),e("setStateObjectsProperty",{property:"measurements",value:{}}),e("setStateObjectsProperty",{property:"annotations",value:{}}),e("setStateObjectsProperty",{property:"cameraAnimations",value:{}}),e("setStateObjectsProperty",{property:"images360",value:{}}),e("setStatePropertiesProperty",{property:"camera",value:{}}),e("setStateCountersProperty",{property:"pointClouds",value:0}),e("setStateCountersProperty",{property:"measurements",value:0}),e("setStateCountersProperty",{property:"annotations",value:0}),e("setStateCountersProperty",{property:"cameraAnimations",value:1}),e("setStateCountersProperty",{property:"images360",value:0}),e("setStatePropertiesProperty",{property:"image360file",value:""}),e("setStatePropertiesProperty",{property:"selectedObject",value:void 0}),e("setStateProperty",{property:"tracePosition",value:!0}),e("setStateProperty",{property:"traceBoundingBox",value:!0}),e("setStateProperty",{property:"tracePositionCenter",value:!0}),e("setStateProperty",{property:"pointSize",value:.5}),e("setStateProperty",{property:"pointSizing",value:"ADAPTIVE"}),e("setStateProperty",{property:"shape",value:"CIRCLE"}),e("setStateProperty",{property:"pointOpacity",value:1})},loadPresets({state:e}){let t;return[...e.queueLoaderPreset,...e.queueActionsPreset].forEach(i=>{t=e.queue.enqueue(i)}),e.queueLoaderPreset=[],e.queueActionsPreset=[],t||Promise.resolve()},async loadPointCloud({state:e,dispatch:t},i){e.forcedPointCloud=!0;const n=tv(i),r="n/a";return n||(i={path:i,name:r}),i.name||(i.name=r),t("loadPointCloudNoDispatch",i)},loadPointCloudNoDispatch({dispatch:e},t){return e("runFromLoaderQueue",()=>e("loadPointCloudInPotree",t))},loadPointCloudInPotree({state:e,rootState:t,commit:i,dispatch:n},{path:r,name:s,append:c=!0,classifications:u={},defaultAttribute:o,initialLoad:h=!0}){return new Promise(a=>{var l,f,d,p,g;if(h){const m=e.multiViewId?(p=(d=(f=(l=t.AppState.UserState.multiView)==null?void 0:l[e.multiViewId])==null?void 0:f[e.viewportId])==null?void 0:d.potree)==null?void 0:p[e.properties.datasetId]:t.AppState.UserState.potree[e.properties.datasetId],v=(g=m==null?void 0:m.properties)==null?void 0:g.classifications;v&&Object.keys(u).forEach(S=>{v.includes(S)?u[S].visible=!0:u[S].visible=!1});const y=Object.values(u).every(S=>S.visible);n("toggleAllVisibility",y)}e.client.PointCloudLoader.load({path:r,name:s,append:c,classifications:u,defaultAttribute:o,tilesUpdatedAt:e.tilesUpdatedAt,initialLoad:h,options:{pointSize:e.properties.pointSize,pointSizeType:e.properties.pointSizeType,pointShape:e.properties.pointShape}},m=>{if(!m){i("setStateProperty",{property:"loadPointCloudError",value:!0}),a(m);return}n("setStatePropertiesProperty",{property:"classificationsList",cmd:"Filters.classificationsList",dispatchRoot:!1}),n("setStatePropertiesProperty",{property:"classifications",cmd:"Filters.classifications",dispatchRoot:!1}),e.client.PointCloudLoader.settings(v=>{const y=[];return y.push(n("initSettings",v)),y.push(n("restoreUserState",h)),setTimeout(()=>{e.ready&&(e.cameraShouldUpdate=!0)},3e3),Promise.all(y).then(()=>{i("setStateProperty",{property:"loaded",value:m}),a(m)})}),n("updateAttributesAcrossPointClouds")})})},initSettings({state:e,commit:t},i){Object.keys(i).filter(n=>Object.prototype.hasOwnProperty.call(e,n)).forEach(n=>{t("setStateProperty",{property:n,value:i[n]})})},setObjectVisibility({state:e},t){e.client&&e.client.Measurement.visible(t)},setCameraPosition({state:e,commit:t,dispatch:i},n){t("setStatePropertiesProperty",{property:"camera",value:n}),e.cameraShouldUpdate&&i("AppState/UserState/setPotreeProperties",{type:"camera",value:n,id:e.properties.datasetId,multiViewId:e.multiViewId,viewportId:e.viewportId},{root:!0})},setSelectedPosition(){},setMoveSpeed({commit:e},t){e("setStatePropertiesProperty",{property:"moveSpeed",value:t})},updatePointCloud({state:e,commit:t},{uuid:i,data:n}){t("setStateObjectsProperty",{group:"pointClouds",property:i,value:n}),t("setStateCountersProperty",{property:"pointClouds",value:Object.keys(e.objects.pointClouds).length}),t("setStatePropertiesProperty",{property:"selectedObject",value:e.objects.pointClouds[i]}),t("setStatePropertiesProperty",{property:"pointcloudId",value:i})},updatePointCloudVisibility({state:e},{uuid:t,value:i}){e.client.Attribute.visible({uuid:t,value:i},n=>{e.objects.pointClouds[t].visible=n})},centerPointCloud({state:e},{uuid:t}){e.client.Navigation.centerPointCloud({uuid:t})},updateMeasurement({state:e,commit:t},{uuid:i,data:n}){t("setStateObjectsProperty",{group:"measurements",property:i,value:n}),t("setStatePropertiesProperty",{property:"selectedObject",value:e.objects.measurements[i]}),t("setStateCountersProperty",{property:"measurements",value:Object.keys(e.objects.measurements).length})},updateSelectedPointMeasure({commit:e},{uuid:t,data:i}){e("setStatePropertiesProperty",{property:"selectedPointMeasure",value:{uuid:t,data:i}})},removeMeasurement({state:e,commit:t},i){var n;!i||(i===((n=e.properties.selectedObject)==null?void 0:n.uuid)&&t("setStatePropertiesProperty",{property:"selectedObject",value:void 0}),t("deleteStateObjectsProperty",{group:"measurements",uuid:i}),t("setStateCountersProperty",{property:"measurements",value:Object.keys(e.objects.measurements).length}))},updateAnnotation({state:e,commit:t},{uuid:i,data:n}){t("setStateObjectsProperty",{group:"annotations",property:i,value:n}),t("setStatePropertiesProperty",{property:"selectedObject",value:e.objects.annotations[i]}),t("setStateCountersProperty",{property:"annotations",value:Object.keys(e.objects.annotations).length})},removeAnnotation({state:e,commit:t},i){t("deleteStateObjectsProperty",{group:"annotations",uuid:i}),t("setStateCountersProperty",{property:"annotations",value:Object.keys(e.objects.annotations).length})},updateCameraAnimation({state:e,commit:t},{uuid:i,data:n}){t("setStateObjectsProperty",{group:"cameraAnimations",property:i,value:n}),t("setStatePropertiesProperty",{property:"selectedObject",value:e.objects.cameraAnimations[i]}),t("setStateCountersProperty",{property:"cameraAnimations",value:Object.keys(e.objects.cameraAnimations).length})},removeCameraAnimation({state:e,commit:t},i){t("deleteStateObjectsProperty",{group:"measurements",uuid:i}),t("setStateCountersProperty",{property:"cameraAnimations",value:Object.keys(e.objects.cameraAnimations).length})},updateFov({commit:e},{fov:t}){e("setStateProperty",{property:"fov",value:t})},updateEvlOpacity({commit:e},{opacity:t}){e("setStateProperty",{property:"edlOpacity",value:t})},toggleAllVisibility({commit:e},t){e("setStateProperty",{property:"classificationsAll",value:t})},initPointCloudAttribute({state:e,commit:t},i){!e.client||e.client.Attribute.init({uuid:i},n=>{t("setStatePocAttribute",{uuid:i,value:n})})},setPocAttributeProperty({state:e,commit:t,dispatch:i},{uuid:n,property:r,cmd:s,params:c,dispatchRoot:u=!0}){const[o,h]=s.split(".");return!e.client||!o||!h?Promise.resolve():new Promise(a=>{e.client[o][h](c,l=>{t("setStatePocAttributeProperty",{uuid:n,property:r,value:l}),jD.includes(r)&&u&&i("AppState/UserState/setPotreeProperties",{type:"pocAttributeProperty",property:r,value:c,id:e.properties.datasetId,multiViewId:e.multiViewId,viewportId:e.viewportId},{root:!0}),a(l)})})},setStatePropertiesProperty({state:e,commit:t,dispatch:i},{property:n,cmd:r,params:s,dispatchRoot:c=!0}){if(!e.client)return Promise.resolve();if(!r)return t("setStatePropertiesProperty",{property:n,value:s}),Nl.includes(n)&&c&&i("AppState/UserState/setPotreeProperties",{type:"propertiesProperty",property:n,value:s,id:e.properties.datasetId,multiViewId:e.multiViewId,viewportId:e.viewportId},{root:!0}),Promise.resolve(s);const[u,o]=r.split(".");return!u||!o?Promise.resolve():s?new Promise(h=>{e.client[u][o](s,a=>{t("setStatePropertiesProperty",{property:n,value:a}),Nl.includes(n)&&c&&i("AppState/UserState/setPotreeProperties",{type:"propertiesProperty",property:n,value:a,id:e.properties.datasetId,multiViewId:e.multiViewId,viewportId:e.viewportId},{root:!0}),h(a)})}):new Promise(h=>{e.client[u][o](a=>{t("setStatePropertiesProperty",{property:n,value:a}),Nl.includes(n)&&c&&i("AppState/UserState/setPotreeProperties",{type:"propertiesProperty",property:n,value:a,id:e.properties.datasetId,multiViewId:e.multiViewId,viewportId:e.viewportId},{root:!0}),h(a)})})},setStateProperty({state:e,commit:t,dispatch:i},{property:n,cmd:r,params:s,dispatchRoot:c=!0}){const[u,o]=r.split(".");return!e.client||!u||!o?Promise.resolve():s?new Promise(h=>{e.client[u][o](s,a=>{t("setStateProperty",{property:n,value:a}),Uf.includes(n)&&c&&i("AppState/UserState/setPotreeProperties",{type:"stateProperty",property:n,value:s,id:e.properties.datasetId,multiViewId:e.multiViewId,viewportId:e.viewportId},{root:!0}),h(a)})}):new Promise(h=>{e.client[u][o](a=>{t("setStateProperty",{property:n,value:a}),Uf.includes(n)&&c&&i("AppState/UserState/setPotreeProperties",{type:"stateProperty",property:n,value:s,id:e.properties.datasetId,multiViewId:e.multiViewId,viewportId:e.viewportId},{root:!0}),h(a)})})},setStateObjectsProperty({state:e,commit:t},{group:i,property:n,cmd:r,params:s}){const[c,u]=r.split(".");return!e.client||!c||!u?Promise.resolve():new Promise(o=>{e.client[c][u](s,h=>{t("setStateObjectsProperty",{group:i,property:n,value:h}),o(h)})})},updateClipTask({state:e,commit:t},{clipTask:i}){const n=e.clipTaskOptions[i];e.client.Measurement.hideAllOutsideClip({clipTask:i}),t("setStateProperty",{property:"clipTask",value:n})},updateVirtualTile({state:e},{virtualTile:t}){const i=t?2:1;e.client.Measurement.hideAllOutsideClip({clipTask:i})},updatePolygonClipVolume({commit:e},{count:t}){e("setStatePropertiesProperty",{property:"polygonClipVolumeCount",value:t})},updateBoxClipVolume({state:e,commit:t},{count:i}){if(i>e.properties.boxClipVolumeCount)e.properties.clipCameraPositionStack.push(e.properties.camera);else{const n=e.properties.clipCameraPositionStack.pop();e.client.Navigation.moveTo(n)}t("setStatePropertiesProperty",{property:"boxClipVolumeCount",value:i})},toggleClassificationVisibility({state:e,dispatch:t},{code:i,checked:n}){!e.client||e.client.Filters.visibility({code:i,checked:n},r=>{t("setStatePropertiesProperty",{property:"classifications",params:r}),!n&&e.properties.activeClassifications.includes(i)&&t("setStatePropertiesProperty",{property:"activeClassifications",cmd:"AttributeEditor.toggleActiveClassification",params:{value:i}}),n&&e.properties.selectedClassification===""&&t("setStatePropertiesProperty",{property:"selectedClassification",cmd:"AttributeEditor.selectedClassification",params:{value:i}})})},toggleClassificationsVisibilityAll({state:e,dispatch:t}){!e.client||e.client.Filters.toggleAllVisibility(i=>{t("setStatePropertiesProperty",{property:"classifications",params:i});const n=Object.keys(i.json).filter(r=>i.json[r].visible);n.length===0?(t("setStatePropertiesProperty",{property:"selectedClassification",cmd:"AttributeEditor.selectedClassification",params:{value:""}}),t("setStatePropertiesProperty",{property:"activeClassifications",cmd:"AttributeEditor.activeClassifications",params:{list:[]}})):e.properties.selectedClassification===""&&t("setStatePropertiesProperty",{property:"selectedClassification",cmd:"AttributeEditor.selectedClassification",params:{value:n[0]}})})},changeSelectedClassification({state:e,dispatch:t},{code:i}){!e.client||e.client.AttributeEditor.selectedClassification({value:i},n=>{t("setStatePropertiesProperty",{property:"selectedClassification",params:n}),Object.keys(e.properties.classifications.json).filter(r=>e.properties.classifications.json[r].visible).includes(i)||t("setStatePropertiesProperty",{property:"classifications",cmd:"Filters.visibility",params:{code:i,checked:!0}})})},toggleActiveClassification({state:e,dispatch:t},{code:i}){!e.client||e.client.AttributeEditor.toggleActiveClassification({value:i},n=>{t("setStatePropertiesProperty",{property:"activeClassifications",params:n}),e.properties.selectedClassification===""&&t("setStatePropertiesProperty",{property:"selectedClassification",cmd:"AttributeEditor.selectedClassification",params:{value:i}}),Object.keys(e.properties.classifications.json).filter(r=>e.properties.classifications.json[r].visible).includes(i)||t("setStatePropertiesProperty",{property:"classifications",cmd:"Filters.visibility",params:{code:i,checked:!0}})})},restoreUserState({state:e,dispatch:t,rootState:i},n){var a,l,f,d,p,g,m,v,y,S;let r=e.multiViewId?(d=(f=(l=(a=i.AppState.UserState.multiView)==null?void 0:a[e.multiViewId])==null?void 0:l[e.viewportId])==null?void 0:f.potree)==null?void 0:d[e.properties.datasetId]:i.AppState.UserState.potree[e.properties.datasetId],s=[];if(r=rv(BF,r),r!=null&&r.pocAttributeProperty&&(s=s.concat(Object.keys(r.pocAttributeProperty).map(b=>{const{value:_}=r.pocAttributeProperty[b],w=e.properties.pointcloudId;return["shape","pointSizing","pointSize"].includes(b)&&t("setStatePropertiesProperty",{property:{shape:"pointShape",pointSize:"pointSize",pointSizing:"pointSizeType"}[b],params:_}),t("setPocAttributeProperty",{property:b,uuid:w,cmd:`Attribute.${b}`,dispatchRoot:!1,params:{uuid:w,value:_}})}))),!n)return Promise.all(s);(p=r==null?void 0:r.properties)!=null&&p.activeClassifications&&s.push(t("setStatePropertiesProperty",{property:"activeClassifications",cmd:"AttributeEditor.activeClassifications",dispatchRoot:!1,params:{list:r.properties.activeClassifications}}));const c=(g=r==null?void 0:r.properties)==null?void 0:g.selectedClassification,u=c&&Object.keys(e.properties.classifications.json).includes(c)?c:Object.keys(e.properties.classifications.json)[0],o=i.AppState.PointWorker.pendingCommands[e.properties.datasetId],h=o&&o.length>0?o.slice(-1)[0].command_name:null;if(((v=(m=i.Auth)==null?void 0:m.user)==null?void 0:v.is_guest)===!0?s.push(t("setStatePropertiesProperty",{property:"editMode",cmd:"AttributeEditor.classificationType",params:{value:"VIEW"}})):h?s.push(t("setStatePropertiesProperty",{property:"editMode",cmd:"AttributeEditor.classificationType",params:{value:h==="set_instance"?"INSTANCE":"CLASSIFICATION"}})):(y=r==null?void 0:r.properties)!=null&&y.editMode&&s.push(t("setStatePropertiesProperty",{property:"editMode",cmd:"AttributeEditor.classificationType",params:{value:r.properties.editMode}})),(S=r==null?void 0:r.properties)!=null&&S.selectedInstanceId&&s.push(t("setStatePropertiesProperty",{property:"selectedInstanceId",cmd:"AttributeEditor.selectedInstanceId",params:{value:r.properties.selectedInstanceId}})),s.push(t("setStatePropertiesProperty",{property:"selectedClassification",cmd:"AttributeEditor.selectedClassification",dispatchRoot:!1,params:{value:u}})),r!=null&&r.stateProperty){const{pointBudget:b,cameraProjection:_,showMeasurementPoiLabels:w}=r.stateProperty;b&&s.push(t("setStateProperty",{property:"pointBudget",cmd:"Appearance.pointBudget",dispatchRoot:!1,params:b})),_&&s.push(t("setStateProperty",{property:"cameraProjection",cmd:"Navigation.cameraProjection",dispatchRoot:!1,params:_})),w&&s.push(t("setStateProperty",{property:"showMeasurementPoiLabels",cmd:"Measurement.showHideLabels",dispatchRoot:!1,params:w}))}if(r!=null&&r.camera){const{position:b,target:_}=r.camera;[b==null?void 0:b.x,b==null?void 0:b.y,b==null?void 0:b.z,_==null?void 0:_.x,_==null?void 0:_.y,_==null?void 0:_.z].every(E=>typeof E=="number")&&e.client.Navigation.moveTo(r.camera)}return Promise.all(s)},loadNotesToPotree({state:e},{notes:t}){const i=/\(([^)]+)\)/;e.client.Measurement.removeAllAnnotations(),t.forEach(n=>{const r=n.geom.data.match(i)[1].split(" ").map(c=>parseFloat(c));let s=n.note;s.length>20&&(s=s.split(`
`)[0].slice(0,20),s+="..."),e.client.Measurement.addAnnotation({position:r,title:s,dbId:n.id})})},removeNoteFromPotree({state:e},{noteId:t}){const i=Object.values(e.objects.annotations).find(n=>n.dbId===t);e.client.Measurement.remove({uuid:i.uuid})},setCameraControlMode({state:e,commit:t},{mode:i}){!e.client||(i==="fly"&&(e.client.Navigation.fly(),t("setStateProperty",{property:"cameraControlMode",value:"fly"})),i==="orbit"&&(e.client.Navigation.orbit(),t("setStateProperty",{property:"cameraControlMode",value:"orbit"})))},selectInstanceId({state:e,dispatch:t},{uuid:i,data:n}){if(!e.selectingInstanceId.selecting)return;let r=null;switch(e.selectingInstanceId.type){case"to":r=t("setStatePropertiesProperty",{property:"selectedInstanceId",cmd:"AttributeEditor.selectedInstanceId",params:{value:n.instanceId}});break;case"from":r=t("setStatePropertiesProperty",{property:"activeInstances",cmd:"AttributeEditor.activeInstances",params:{list:[n.instanceId]}});break;case"visible":r=t("setStatePropertiesProperty",{property:"visibleInstances",cmd:"AttributeEditor.visibleInstances",params:{list:[n.instanceId]}});break}r.then(()=>{e.selectingInstanceId.selecting=!1,e.client.Measurement.remove({uuid:i})})},selectVector({commit:e},{vector:t}){e("setStateProperty",{property:"selectedVector",value:t})},updateAttributesAcrossPointClouds({state:e}){e.client.Attribute.getIntensityRangeAll(({min:t,max:i})=>{t<e.intensityRangeOptions.min&&(e.intensityRangeOptions.min=t),i>e.intensityRangeOptions.max&&(e.intensityRangeOptions.max=i),e.intensityRange.min===Number.MAX_SAFE_INTEGER&&(e.intensityRange.min=t),e.intensityRange.max===Number.MIN_SAFE_INTEGER&&(e.intensityRange.max=i)}),e.client.Attribute.getHeightRangeAll(({min:t,max:i})=>{t<e.heightRangeOptions.min&&(e.heightRangeOptions.min=t),i>e.heightRangeOptions.max&&(e.heightRangeOptions.max=i),e.heightRange.min===Number.MAX_SAFE_INTEGER&&(e.heightRange.min=t),e.heightRange.max===Number.MIN_SAFE_INTEGER&&(e.heightRange.max=i)}),e.client.Attribute.updateAttributeRanges({ranges:{intensityRange:[e.intensityRange.min,e.intensityRange.max],elevationRange:[e.heightRange.min,e.heightRange.max]}})}},WF={state:VF,getters:zF,mutations:HF,actions:UF,namespaced:!0},jF=()=>({potreeStoreId:null,enabled:!1,selectedPoi:void 0,currentColorIndex:0,attribute_names:[],active_attribute_names:[],oldSelectedPoiAttributes:{},pois:[]}),GF={setProperty(e,{key:t,value:i}){({}).hasOwnProperty.call(e,t)&&(e[t]=i)},setActiveAttributeName(e,{name:t}){const i=e.active_attribute_names.indexOf(t);i>-1?e.active_attribute_names.splice(i,1):e.active_attribute_names.push(t)}},qF={getPotreeClient(e,t,i){return i.Tools.GeneralAdvancedPotree[e.potreeStoreId].client}},KF={load({state:e,dispatch:t},{datasetId:i,params:n}){return t("AppState/Pois/getPois",{datasetId:i,params:n},{root:!0}).then(r=>(e.attribute_names=[],e.active_attribute_names=[],e.pois=[],r.forEach(s=>{const c=s==null?void 0:s.attribute_name;c&&e.pois.push(s),c&&e.attribute_names.indexOf(c)===-1&&(e.attribute_names.push(c),e.active_attribute_names.push(c))}),e.pois))},save({state:e,commit:t,dispatch:i,getters:n,rootState:r,rootGetters:s}){return new Promise((c,u)=>{const{uuid:o,data:h}=e.selectedPoi||{},a=n.getPotreeClient,{datasetId:l}=r.Tools.GeneralAdvancedPotree[e.potreeStoreId].properties,f={...e.selectedPoi.data.poiAttributes};f.id=h.poiId;const d=Yi[f.type.toUpperCase()],{srid:p}=s["AppState/Datasets/get"](l);if(d===Yi.BOX&&(f.box={bbox:h.bbox,matrix:h.matrix}),d===Yi.POINT){const g=h.points[0].position,m=`POINT Z (${g.x} ${g.y} ${g.z})`;f.geometry={srid:p,data:m}}if(d===Yi.LINE_STRING){const m=`LINESTRING Z (${h.points.map(v=>`${v.position.x} ${v.position.y} ${v.position.z}`).join(", ")})`;f.geometry={srid:p,data:m}}if(d===Yi.POLYGON){const g=h.points.map(v=>`${v.position.x} ${v.position.y} ${v.position.z}`),m=`POLYGON Z ((${g.join(", ")}, ${g[0]}))`;f.geometry={srid:p,data:m}}h.poiId?i("AppState/Pois/updatePoi",{datasetId:l,poiType:d,poi:f},{root:!0}).then(g=>{t("setProperty",{key:"selectedPoi",value:void 0});const m=f.attribute_name;m&&e.attribute_names.indexOf(m)===-1&&(e.attribute_names.push(m),e.active_attribute_names.push(m)),e.pois=[...e.pois.filter(v=>v.id!==g.id),{...f,geom:f.geometry,id:g.id}],c()}).catch(g=>u(g)):i("AppState/Pois/createPoi",{datasetId:l,poiType:d,poi:f},{root:!0}).then(g=>{t("setProperty",{key:"selectedPoi",value:void 0}),a.Poi.updatePoi({uuid:o,poiId:g.id,poiAttributes:f},v=>{v?c():u()});const m=f.attribute_name;m&&e.attribute_names.indexOf(m)===-1&&(e.attribute_names.push(m),e.active_attribute_names.push(m)),e.pois=[...e.pois,{...f,geom:f.geometry,id:g.id}]}).catch(g=>{a.Poi.remove({uuid:h.uuid,type:h.poiAttributes.type}),u(g)})})},delete({state:e,getters:t,dispatch:i,rootState:n}){return new Promise((r,s)=>{var l,f;const{data:c}=e.selectedPoi||{};if(!c.poiId){r();return}const u=t.getPotreeClient,o=(l=c==null?void 0:c.poiAttributes)==null?void 0:l.attribute_name;u.Poi.attributeNameCount({name:o},d=>{if(d<2){const p=[...e.attribute_names],g=[...e.active_attribute_names];let m=p.indexOf(o);m>-1&&(p.splice(m,1),e.attribute_names=[...p]),m=g.indexOf(o),m>-1&&(g.splice(m,1),e.active_attribute_names=[...g])}});const{datasetId:h}=n.Tools.GeneralAdvancedPotree[e.potreeStoreId].properties,a=Yi[(f=c==null?void 0:c.poiAttributes)==null?void 0:f.type.toUpperCase()];a||s(new Error(`POI type ${c.name} does not exist.`)),i("AppState/Pois/deletePoi",{datasetId:h,poiType:a,id:c.poiId},{root:!0}).then(()=>{const d=e.pois.findIndex(p=>p.id===c.poiId);d>=0&&e.pois.splice(d,1),r()}).catch(d=>{s(d)})})},showPois({getters:e},t){return new Promise((i,n)=>{e.getPotreeClient.Poi.setPois({pois:t},s=>{s?i():n()})})},removePois({getters:e}){return new Promise((t,i)=>{e.getPotreeClient.Poi.removeAll(r=>{r?t():i()})})},setPoiAttributes({state:e,getters:t},i){return new Promise((n,r)=>{if(!e.selectedPoi){n();return}const s=t.getPotreeClient;e.selectedPoi.data.poiAttributes=i,s.Poi.updatePoi({uuid:e.selectedPoi.uuid,poiAttributes:i},c=>{c?n():r()})})},updateSelectedPoi({state:e,commit:t},{uuid:i,data:n}){var c,u;const{poiAttributes:r}=((c=e.selectedPoi)==null?void 0:c.data)||{};r&&!Object.values(r).find(o=>o==="")&&t("setProperty",{key:"oldSelectedPoiAttributes",value:{...r}});const s=(u=n==null?void 0:n.poiAttributes)==null?void 0:u.type;if(!e.enabled||!s||!Object.keys(Yi).includes(s.toUpperCase())){t("setProperty",{key:"selectedPoi",value:void 0});return}t("setProperty",{key:"selectedPoi",value:{uuid:i,data:n}})},poiBox({getters:e}){e.getPotreeClient.Poi.box({attributes:{...Po}})},poiPoint({getters:e}){e.getPotreeClient.Poi.point({attributes:{...Po}})},poiLine({getters:e}){e.getPotreeClient.Poi.line({attributes:{...Po}})},poiPolygon({getters:e}){e.getPotreeClient.Poi.polygon({attributes:{...Po}})},setProperty({commit:e},t){e("setProperty",t)}},YF={namespaced:!0,state:jF,getters:qF,mutations:GF,actions:KF},Zf=e=>{const t=/\(\(([^)]+)\)\)/;return e.match(t)[1].split(",").flatMap(r=>r.split(" ").map(s=>parseFloat(s)))},XF=()=>({potreeStoreId:null,selectedUsersFilter:[],selectedStatusesFilter:[],enabled:!1,autoCenterTiles:!0}),QF={getPotreeClient(e,t,i){return i.Tools.GeneralAdvancedPotree[e.potreeStoreId].client},pointCloudId(e,t,i){return i.Tools.GeneralAdvancedPotree[e.potreeStoreId].properties.pointcloudId},datasetId(e,t,i){return i.Tools.GeneralAdvancedPotree[e.potreeStoreId].properties.datasetId},selectedIndex(e,t){const i=t.filteredVirtualTiles.findIndex(n=>n.id===t.selectedTileId);return i>=0?i:0},virtualTiles(e,t,i,n){var r;return(r=n["AppState/Datasets/getVirtualTiles"](t.datasetId))!=null?r:[]},filteredVirtualTiles(e,t){return t.virtualTiles.filter(i=>{const n=e.selectedUsersFilter.length>0?e.selectedUsersFilter.some(s=>s==="/"?[null,"/"].includes(i.assignee):i.assignee===s):!0,r=e.selectedStatusesFilter.length>0?e.selectedStatusesFilter.some(s=>s==="/"?[null,"/"].includes(i.qc_status):i.qc_status===s):!0;return n&&r})},selectedTileId(e,t,i,n){return n["AppState/UserState/getVirtualTileSelectedId"](t.datasetId)}},JF={setProperty(e,{key:t,value:i}){({}).hasOwnProperty.call(e,t)&&(e[t]=i)}},ZF={enableVirtualTiles({state:e,dispatch:t},i){e.enabled=i,t("dispatchVirtualTileToPotree")},setSelectedTileId({getters:e,dispatch:t},{tileId:i}){t("AppState/UserState/setVirtualTileSelectedId",{datasetId:e.datasetId,selectedId:i},{root:!0}),t("dispatchVirtualTileToPotree")},toggleUserFilter({state:e,getters:t,dispatch:i},n){var s,c;const r=e.selectedUsersFilter.indexOf(n);r===-1?e.selectedUsersFilter.push(n):e.selectedUsersFilter.splice(r,1),t.filteredVirtualTiles.length>0&&t.filteredVirtualTiles.findIndex(u=>u.id===t.selectedTileId)===-1&&i("setSelectedTileId",{tileId:(s=t.filteredVirtualTiles[0])==null?void 0:s.id}),t.filteredVirtualTiles.length===0&&i("setSelectedTileId",{tileId:(c=t.filteredVirtualTiles[0])==null?void 0:c.id})},toggleStatusFilter({state:e,getters:t,dispatch:i},n){var s;const r=e.selectedStatusesFilter.indexOf(n);r===-1?e.selectedStatusesFilter.push(n):e.selectedStatusesFilter.splice(r,1),t.filteredVirtualTiles.length>0&&t.filteredVirtualTiles.findIndex(c=>c.id===t.selectedTileId)===-1&&i("setSelectedTileId",{tileId:(s=t.filteredVirtualTiles[0])==null?void 0:s.id})},clearUsersFilter({state:e}){e.selectedUsersFilter=[]},clearStatusesFilter({state:e}){e.selectedStatusesFilter=[]},nextVirtualTile({state:e,getters:t,dispatch:i}){var n,r;!e.enabled||(t.selectedIndex>=t.filteredVirtualTiles.length-1?i("setSelectedTileId",{tileId:(n=t.filteredVirtualTiles[0])==null?void 0:n.id}):i("setSelectedTileId",{tileId:(r=t.filteredVirtualTiles[t.selectedIndex+1])==null?void 0:r.id}))},prevVirtualTile({state:e,getters:t,dispatch:i}){var n,r;!e.enabled||(t.selectedIndex<=0?i("setSelectedTileId",{tileId:(n=t.filteredVirtualTiles.slice(-1)[0])==null?void 0:n.id}):i("setSelectedTileId",{tileId:(r=t.filteredVirtualTiles[t.selectedIndex-1])==null?void 0:r.id}))},centerVirtualTile({state:e,getters:t}){if(!e.enabled||!t.getPotreeClient)return;const i=t.filteredVirtualTiles[t.selectedIndex];t.getPotreeClient.Navigation.centerVirtualTile({polygon:Zf(i.geom.data)})},dispatchVirtualTileToPotree({state:e,getters:t,dispatch:i}){if(!t.getPotreeClient)return;const n=t.filteredVirtualTiles[t.selectedIndex];if(!e.enabled||!n){t.getPotreeClient.ClippingEditor.setVirtualTile({virtualTile:null});return}const r=Zf(n.geom.data);t.getPotreeClient.ClippingEditor.setVirtualTile({virtualTile:r}),e.autoCenterTiles&&i("centerVirtualTile")},autoCenterTiles({state:e},t){e.autoCenterTiles=t}},e3={namespaced:!0,state:XF,mutations:JF,getters:QF,actions:ZF},{t:ep}=nt.global,t3={},i3={},n3={},r3={registerNewPotreeModule({state:e,commit:t},i){this.registerModule(["Tools","GeneralAdvancedPotree",i],WF),this.registerModule(["Tools","GeneralAdvancedPotree",i,"Poi"],YF),this.registerModule(["Tools","GeneralAdvancedPotree",i,"VirtualTiles"],e3),e.GeneralAdvancedPotree[i].moduleId=i,t(`GeneralAdvancedPotree/${i}/Poi/setProperty`,{key:"potreeStoreId",value:i}),t(`GeneralAdvancedPotree/${i}/VirtualTiles/setProperty`,{key:"potreeStoreId",value:i})},unregisterPotreeModule(e,t){this.unregisterModule(["Tools","GeneralAdvancedPotree",t])},potreeSetTilesUpdatedAt({state:e,dispatch:t},{tilesUpdatedAt:i,datasetId:n}){Object.keys(this._modules.root._children.Tools._children.GeneralAdvancedPotree._children).forEach(r=>{const{pointClouds:s}=e.GeneralAdvancedPotree[r].objects;Object.keys(s).findIndex(u=>s[u].title===n)!==-1&&t(`GeneralAdvancedPotree/${r}/setTilesUpdatedAt`,i)})},potreeReloadAllPointClouds({state:e,rootState:t,dispatch:i},{datasetId:n}){let r=!1;const s=t.AppState.UserSettings.user_settings.auto_potree_reload;Object.keys(this._modules.root._children.Tools._children.GeneralAdvancedPotree._children).forEach(c=>{const{pointClouds:u}=e.GeneralAdvancedPotree[c].objects,o=Object.keys(u).findIndex(h=>u[h].title===n)!==-1;o&&(r=!0),o&&s&&i(`GeneralAdvancedPotree/${c}/reloadAllPointClouds`)}),r&&s?i("Notifications/displayToastNotification",{msg:ep("Reclassification commands were applied to this dataset, point cloud viewer was reloaded."),type:"info",timeout:2e4},{root:!0}):r&&!s&&i("Notifications/displayToastNotification",{msg:ep("Reclassification commands were applied to this dataset, reload the page to see changes."),type:"info",timeout:2e4},{root:!0})},disableAllPotreeShortcuts({commit:e}){Object.keys(this._modules.root._children.Tools._children.GeneralAdvancedPotree._children).forEach(t=>{e(`GeneralAdvancedPotree/${t}/setStateProperty`,{property:"disableKeyboardShortcuts",value:!0})})},enableAllPotreeShortcuts({commit:e}){Object.keys(this._modules.root._children.Tools._children.GeneralAdvancedPotree._children).forEach(t=>{e(`GeneralAdvancedPotree/${t}/setStateProperty`,{property:"disableKeyboardShortcuts",value:!1})})}},s3={state:t3,getters:n3,mutations:i3,actions:r3,modules:{GeneralAdvancedPotree:{namespaced:!0}},namespaced:!0},o3={},a3={removeLoader(){}},l3={},c3={setLoader(){}},Li=Em({modules:{AppState:oF,App:yN,Auth:vF,Map:SF,Modals:MF,Notifications:RF,Sortable:FF,Tools:s3,UserTips:_v,UserTrackingEvents:Ev},state:o3,getters:l3,mutations:a3,actions:c3}),tp=/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}/,Uu=zv({history:Lv(),routes:[{path:"/",name:"dashboard",redirect:{name:"pages",params:{tool:"pages:dashboard"}},meta:{requiresAuth:!0}},{name:"pages",path:"/admin/:tool?/:itemId?/:subpage?",component:()=>$t(()=>import("./BaseTemplate.84b80cdd.js"),["assets/BaseTemplate.84b80cdd.js","assets/utc.b23fd3e3.js","assets/BaseTemplate.22f84a55.css"]),props:e=>({tool:e.params.tool.split(":").join("/"),itemId:e.params.itemId,subpage:e.params.subpage}),meta:{requiresAuth:!0}},{name:"pages_shared",path:`/admin/:tool/:organizationId(${tp.source})/:itemId(${tp.source})/:subpage?`,component:()=>$t(()=>import("./BaseTemplate.84b80cdd.js"),["assets/BaseTemplate.84b80cdd.js","assets/utc.b23fd3e3.js","assets/BaseTemplate.22f84a55.css"]),props:e=>({tool:e.params.tool.split(":").join("/"),organizationId:e.params.organizationId,itemId:e.params.itemId,subpage:e.params.subpage}),meta:{requiresAuth:!0}},{name:"login",path:"/login",component:()=>$t(()=>import("./LoginTemplate.5077cdd4.js"),["assets/LoginTemplate.5077cdd4.js","assets/public-locale.95c3950a.js","assets/FLAI-logo-main-cropped.317e0f3a.js"]),meta:{hideForAuth:!0}},{name:"login-sso",path:"/login-sso",component:()=>$t(()=>import("./LoginSsoTemplate.b448e484.js"),["assets/LoginSsoTemplate.b448e484.js","assets/FLAI-logo-main-cropped.317e0f3a.js"]),meta:{hideForAuth:!0}},{name:"maintenance",path:"/maintenance",component:()=>$t(()=>import("./MaintenanceTemplate.711417e9.js"),["assets/MaintenanceTemplate.711417e9.js","assets/FLAI-logo-main-cropped.317e0f3a.js"]),meta:{}},{name:"terms-of-use",path:"/terms-of-use",props:!0,component:()=>$t(()=>import("./TermsOfUseTemplate.713bf8a7.js"),["assets/TermsOfUseTemplate.713bf8a7.js","assets/public-locale.95c3950a.js","assets/FLAI-logo-main-cropped.317e0f3a.js"])},{name:"shared-dataset-link",path:"/verify-login/:token",component:()=>$t(()=>import("./SharedDataset.158b393b.js"),[])},{name:"register",path:"/register",component:()=>$t(()=>import("./RegisterTemplate.e1987c3b.js"),["assets/RegisterTemplate.e1987c3b.js","assets/public-locale.95c3950a.js","assets/FLAI-logo-main-cropped.317e0f3a.js"]),meta:{hideForAuth:!0}},{name:"register-sso",path:"/register-sso",component:()=>$t(()=>import("./RegisterSsoTemplate.9a27da0e.js"),["assets/RegisterSsoTemplate.9a27da0e.js","assets/FLAI-logo-main-cropped.317e0f3a.js"]),meta:{hideForAuth:!0}},{name:"password-reset",path:"/password-reset/:token?",component:()=>$t(()=>import("./PasswordResetTemplate.d6dfa231.js"),["assets/PasswordResetTemplate.d6dfa231.js","assets/public-locale.95c3950a.js","assets/FLAI-logo-main-cropped.317e0f3a.js"])},{name:"password-set",path:"/password-set/:token?",component:()=>$t(()=>import("./PasswordSetTemplate.92c9919c.js"),["assets/PasswordSetTemplate.92c9919c.js","assets/public-locale.95c3950a.js","assets/FLAI-logo-main-cropped.317e0f3a.js"])},{name:"log-viewer",path:"/log-viewer/:flowExecutionId",props:!0,component:()=>$t(()=>import("./LogViewer.8de26f39.js"),["assets/LogViewer.8de26f39.js","assets/DataTable.e9728f30.js","assets/DataTablePagination.4eb7da97.js","assets/DataTablePagination.33bf7570.css","assets/DataTable.98a4c72e.css","assets/time.08dfae61.js","assets/utc.b23fd3e3.js","assets/LogViewer.e7924c7e.css"]),meta:{requiresAuth:!0}},{name:"downloads",path:"/downloads/:downloadFileId",component:()=>$t(()=>import("./DownloadDirect.25c4ac2e.js"),["assets/DownloadDirect.25c4ac2e.js","assets/download.ebcadc29.js"]),meta:{requiresAuth:!0}},{name:"404NotFound",path:"/:patchMatch(.*)*",component:()=>$t(()=>Promise.resolve().then(()=>rI),void 0),props:{addMargin:!0}}]});Uu.beforeEach(async(e,t,i)=>{var r,s,c,u;if(e.query["hub-auth-code"]){await Li.dispatch("Auth/logout");try{await Li.dispatch("Auth/loginWithAuthCode",{code:e.query["hub-auth-code"]}),delete e.query["hub-auth-code"],i(e)}catch{delete e.query["hub-auth-code"];const o=Object.keys(e.query).length>0?`${e.path}?${Object.keys(e.query).map(h=>`${h}=${e.query[h]}`).join("&")}`:e.path;i({name:"login",query:{redirect:o}})}return}if(await Li.dispatch("Auth/attemptLogin")){if(e.meta.hideForAuth){if(e.query.redirect){i(e.query.redirect);return}i({name:"pages",params:{tool:"pages:dashboard"}});return}if(!Li.getters["Auth/hasResourcePermission"](e.params.tool)){i({name:"pages",params:{tool:"pages:dashboard"}});return}const o=Li.state.AppState.Tools.superAdminTools;if(Li.state.AppState.Tools.resellerTools.includes((s=(r=e.params)==null?void 0:r.tool)==null?void 0:s.replace(":","/"))&&!Li.getters["Auth/isReseller"]){i({name:"pages",params:{tool:"pages:dashboard"}});return}if(o.includes((u=(c=e.params)==null?void 0:c.tool)==null?void 0:u.replace(":","/"))&&!Li.getters["Auth/isSuperAdmin"]){i({name:"pages",params:{tool:"pages:dashboard"}});return}i();return}if(!e.meta.requiresAuth){i();return}i({name:"login",query:{redirect:e.fullPath}})});Uu.afterEach(e=>{var t;Li.dispatch("UserTrackingEvents/store",{event_type:"page_view",path:e.fullPath.split("?")[0]||null,utm_source:e.query.utm_source||null,utm_medium:e.query.utm_medium||null,utm_campaign:e.query.utm_campaign||null,session_id:e.query.session_id||null,user_id:((t=Li.state.Auth.user)==null?void 0:t.id)||null})});const u3={install(e){e.use(fN,{config:{appName:window.ENV_VARS.BASE_URL,pageTrackerScreenviewEnabled:!0,id:window.ENV_VARS.GOOGLE_ANALYTICS_TRACKING_ID}},Uu)}};var lo=function(t){window.__fathomClientQueue=window.__fathomClientQueue||[],window.__fathomClientQueue.push(t)},h3=function(){window.__fathomClientQueue=window.__fathomClientQueue||[],window.__fathomClientQueue.forEach(function(t){switch(t.type){case"trackPageview":dy(t.opts);return;case"trackGoal":fy(t.code,t.cents);return;case"enableTrackingForMe":p3();return;case"blockTrackingForMe":f3();return;case"setSite":g3(t.id);return}}),window.__fathomClientQueue=[]},ip=function(t){var i=/(https?)(?=:|\/|$)/;t.forEach(function(n){i.exec(n)!==null&&console.warn("The include domain ".concat(n," might fail to work as intended as it begins with a transfer protocol (http://, https://). Consider removing the protocol portion of the string."))})},d3=function(t,i){var n=document.createElement("script"),r=document.getElementsByTagName("script")[0]||document.querySelector("body");n.id="fathom-script",n.async=!0,n.setAttribute("data-site",t),n.src=i&&i.url?i.url:"https://cdn.usefathom.com/script.js",i&&(i.auto!==void 0&&n.setAttribute("data-auto","".concat(i.auto)),i.honorDNT!==void 0&&n.setAttribute("data-honor-dnt","".concat(i.honorDNT)),i.canonical!==void 0&&n.setAttribute("data-canonical","".concat(i.canonical)),i.includedDomains&&(ip(i.includedDomains),n.setAttribute("data-included-domains",i.includedDomains.join(","))),i.excludedDomains&&(ip(i.excludedDomains),n.setAttribute("data-excluded-domains",i.excludedDomains.join(","))),i.spa&&n.setAttribute("data-spa",i.spa)),n.onload=h3,r.parentNode.insertBefore(n,r)},dy=function(t){window.fathom?t?window.fathom.trackPageview(t):window.fathom.trackPageview():lo({type:"trackPageview",opts:t})},fy=function(t,i){window.fathom?window.fathom.trackGoal(t,i):lo({type:"trackGoal",code:t,cents:i})},f3=function(){window.fathom?window.fathom.blockTrackingForMe():lo({type:"blockTrackingForMe"})},p3=function(){window.fathom?window.fathom.enableTrackingForMe():lo({type:"enableTrackingForMe"})},g3=function(t){window.fathom?window.fathom.setSite(t):lo({type:"setSite",id:t})};const m3={install(e){const t={};d3(window.ENV_VARS.FANTHOM_TRACKING_ID,{spa:"hash"}),t.trackPageview=dy,t.trackGoal=(i,n=0)=>fy(i,n),e.provide("$fathom",t)}},v3=e=>{window.ENV_VARS.ENABLE_ANALYTICS==="ENABLED"&&(e.use(u3),e.use(m3))},Hi=nc(GO);Hi.config.globalProperties.$debug=!1;Hi.config.globalProperties.$isMobile=()=>window.screen.width<=820;const y3=L_();Hi.use(ym);Hi.use(Hv);Hi.use(hi);Hi.use(y3);sI(Hi);aI(Hi);v3(Hi);Hi.mount("#app");export{IB as $,rn as A,ut as B,Ke as C,FM as D,Ot as E,Oe as F,oi as G,dt as H,Gp as I,Fi as J,ot as K,Cn as L,ty as M,BL as N,$B as O,sr as P,z$ as Q,B3 as R,Qc as S,or as T,$t as U,EI as V,nt as W,OB as X,NB as Y,wi as Z,$e as _,Vi as a,U3 as a$,rO as a0,V as a1,FI as a2,WI as a3,YI as a4,ft as a5,Li as a6,H$ as a7,ke as a8,lp as a9,S3 as aA,Tn as aB,Wt as aC,_a as aD,Bl as aE,Io as aF,Mb as aG,Fp as aH,gt as aI,vB as aJ,E3 as aK,hB as aL,V3 as aM,Dr as aN,nB as aO,Mn as aP,M3 as aQ,Ai as aR,Xr as aS,nn as aT,mB as aU,u0 as aV,Z3 as aW,c0 as aX,z3 as aY,sB as aZ,ar as a_,Yo as aa,x3 as ab,T3 as ac,ab as ad,b3 as ae,Sa as af,cp as ag,$3 as ah,Vc as ai,en as aj,Xn as ak,at as al,pi as am,zc as an,Iy as ao,fb as ap,$p as aq,xp as ar,nb as as,w3 as at,Ma as au,_3 as av,Fe as aw,C3 as ax,lb as ay,A3 as az,Ae as b,cB as b$,W3 as b0,q3 as b1,j3 as b2,H3 as b3,G3 as b4,dB as b5,jc as b6,ia as b7,Zs as b8,Qr as b9,No as bA,k3 as bB,Ul as bC,oB as bD,gB as bE,Ns as bF,gh as bG,fB as bH,Pn as bI,d0 as bJ,pB as bK,mi as bL,rB as bM,X3 as bN,R3 as bO,iB as bP,f0 as bQ,Y3 as bR,I3 as bS,Dp as bT,D0 as bU,uB as bV,tB as bW,p0 as bX,g0 as bY,eB as bZ,K3 as b_,t0 as ba,O3 as bb,F3 as bc,D3 as bd,N3 as be,lB as bf,Qt as bg,N0 as bh,aB as bi,Jn as bj,Q3 as bk,J3 as bl,tn as bm,Fb as bn,qc as bo,Yc as bp,zb as bq,Bb as br,jb as bs,Ys as bt,Wb as bu,Ub as bv,Hb as bw,Pa as bx,Kc as by,P3 as bz,ae as c,L3 as c0,yB as c1,AB as c2,su as c3,nc as c4,S_ as c5,o_ as c6,_B as c7,CB as c8,xB as c9,w_ as ca,SB as cb,bB as cc,l_ as cd,wB as ce,Bs as cf,au as cg,ou as ch,m_ as ci,RB as cj,kB as ck,uF as cl,PB as cm,EB as cn,Ef as co,fl as cp,MB as cq,LB as cr,zB as cs,DB as ct,FB as cu,hy as cv,BB as cw,VB as cx,mL as cy,F_ as d,se as e,lr as f,ve as g,xe as h,Se as i,He as j,Wg as k,jg as l,TB as m,Ue as n,ee as o,T$ as p,ev as q,Wo as r,Jt as s,be as t,js as u,hi as v,De as w,St as x,Ra as y,Je as z};
