@eox/layercontrol 0.11.3 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/eox-layercontrol.js +7847 -6807
- package/dist/eox-layercontrol.umd.cjs +336 -121
- package/package.json +3 -2
- package/test/_mockMap.js +3 -0
- package/test/layersUpdate.cy.js +65 -1
|
@@ -1,73 +1,78 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(je,me){typeof exports=="object"&&typeof module<"u"?me(exports):typeof define=="function"&&define.amd?define(["exports"],me):(je=typeof globalThis<"u"?globalThis:je||self,me(je["eox-layercontrol"]={}))})(this,function(je){"use strict";var Sf=Object.defineProperty;var Pf=(je,me,Fe)=>me in je?Sf(je,me,{enumerable:!0,configurable:!0,writable:!0,value:Fe}):je[me]=Fe;var Je=(je,me,Fe)=>(Pf(je,typeof me!="symbol"?me+"":me,Fe),Fe),eu=(je,me,Fe)=>{if(!me.has(je))throw TypeError("Cannot "+Fe)};var ge=(je,me,Fe)=>(eu(je,me,"read from private field"),Fe?Fe.call(je):me.get(je)),ce=(je,me,Fe)=>{if(me.has(je))throw TypeError("Cannot add the same private member more than once");me instanceof WeakSet?me.add(je):me.set(je,Fe)},Si=(je,me,Fe,Po)=>(eu(je,me,"write to private field"),Po?Po.call(je,Fe):me.set(je,Fe),Fe);var Dr=(je,me,Fe)=>(eu(je,me,"access private method"),Fe);/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/var
|
|
5
|
+
*/var Oc,$i,ui,$a,Fc,Ma,Vc,Yo,Xo,Mi,Ha,zc,Fa,Va,za,Ua,qa,Ga,Wa,Za,Ja,Ya,Qo,Xa,Qa,Ka,ts,Uc,es,qc,Ko,ru,rs,Gc,ns,Wc,Hi,Ps,is,os,Fi,as,ss;const me=globalThis,Fe=me.ShadowRoot&&(me.ShadyCSS===void 0||me.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Po=Symbol(),nu=new WeakMap;let Zc=class{constructor(l,p,v){if(this._$cssResult$=!0,v!==Po)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=l,this.t=p}get styleSheet(){let l=this.o;const p=this.t;if(Fe&&l===void 0){const v=p!==void 0&&p.length===1;v&&(l=nu.get(p)),l===void 0&&((this.o=l=new CSSStyleSheet).replaceSync(this.cssText),v&&nu.set(p,l))}return l}toString(){return this.cssText}};const Jc=y=>new Zc(typeof y=="string"?y:y+"",void 0,Po),Yc=(y,l)=>{if(Fe)y.adoptedStyleSheets=l.map(p=>p instanceof CSSStyleSheet?p:p.styleSheet);else for(const p of l){const v=document.createElement("style"),k=me.litNonce;k!==void 0&&v.setAttribute("nonce",k),v.textContent=p.cssText,y.appendChild(v)}},iu=Fe?y=>y:y=>y instanceof CSSStyleSheet?(l=>{let p="";for(const v of l.cssRules)p+=v.cssText;return Jc(p)})(y):y;/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/const{is:
|
|
9
|
+
*/const{is:Xc,defineProperty:Qc,getOwnPropertyDescriptor:Kc,getOwnPropertyNames:th,getOwnPropertySymbols:eh,getPrototypeOf:rh}=Object,An=globalThis,ou=An.trustedTypes,nh=ou?ou.emptyScript:"",Ts=An.reactiveElementPolyfillSupport,To=(y,l)=>y,As={toAttribute(y,l){switch(l){case Boolean:y=y?nh:null;break;case Object:case Array:y=y==null?y:JSON.stringify(y)}return y},fromAttribute(y,l){let p=y;switch(l){case Boolean:p=y!==null;break;case Number:p=y===null?null:Number(y);break;case Object:case Array:try{p=JSON.parse(y)}catch{p=null}}return p}},au=(y,l)=>!Xc(y,l),su={attribute:!0,type:String,converter:As,reflect:!1,hasChanged:au};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),An.litPropertyMetadata??(An.litPropertyMetadata=new WeakMap);class Pi extends HTMLElement{static addInitializer(l){this._$Ei(),(this.l??(this.l=[])).push(l)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(l,p=su){if(p.state&&(p.attribute=!1),this._$Ei(),this.elementProperties.set(l,p),!p.noAccessor){const v=Symbol(),k=this.getPropertyDescriptor(l,v,p);k!==void 0&&Qc(this.prototype,l,k)}}static getPropertyDescriptor(l,p,v){const{get:k,set:C}=Kc(this.prototype,l)??{get(){return this[p]},set(m){this[p]=m}};return{get(){return k==null?void 0:k.call(this)},set(m){const O=k==null?void 0:k.call(this);C.call(this,m),this.requestUpdate(l,O,v)},configurable:!0,enumerable:!0}}static getPropertyOptions(l){return this.elementProperties.get(l)??su}static _$Ei(){if(this.hasOwnProperty(To("elementProperties")))return;const l=rh(this);l.finalize(),l.l!==void 0&&(this.l=[...l.l]),this.elementProperties=new Map(l.elementProperties)}static finalize(){if(this.hasOwnProperty(To("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(To("properties"))){const p=this.properties,v=[...th(p),...eh(p)];for(const k of v)this.createProperty(k,p[k])}const l=this[Symbol.metadata];if(l!==null){const p=litPropertyMetadata.get(l);if(p!==void 0)for(const[v,k]of p)this.elementProperties.set(v,k)}this._$Eh=new Map;for(const[p,v]of this.elementProperties){const k=this._$Eu(p,v);k!==void 0&&this._$Eh.set(k,p)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(l){const p=[];if(Array.isArray(l)){const v=new Set(l.flat(1/0).reverse());for(const k of v)p.unshift(iu(k))}else l!==void 0&&p.push(iu(l));return p}static _$Eu(l,p){const v=p.attribute;return v===!1?void 0:typeof v=="string"?v:typeof l=="string"?l.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var l;this._$Eg=new Promise(p=>this.enableUpdating=p),this._$AL=new Map,this._$E_(),this.requestUpdate(),(l=this.constructor.l)==null||l.forEach(p=>p(this))}addController(l){var p;(this._$ES??(this._$ES=[])).push(l),this.renderRoot!==void 0&&this.isConnected&&((p=l.hostConnected)==null||p.call(l))}removeController(l){var p;(p=this._$ES)==null||p.splice(this._$ES.indexOf(l)>>>0,1)}_$E_(){const l=new Map,p=this.constructor.elementProperties;for(const v of p.keys())this.hasOwnProperty(v)&&(l.set(v,this[v]),delete this[v]);l.size>0&&(this._$Ep=l)}createRenderRoot(){const l=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Yc(l,this.constructor.elementStyles),l}connectedCallback(){var l;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(l=this._$ES)==null||l.forEach(p=>{var v;return(v=p.hostConnected)==null?void 0:v.call(p)})}enableUpdating(l){}disconnectedCallback(){var l;(l=this._$ES)==null||l.forEach(p=>{var v;return(v=p.hostDisconnected)==null?void 0:v.call(p)})}attributeChangedCallback(l,p,v){this._$AK(l,v)}_$EO(l,p){var C;const v=this.constructor.elementProperties.get(l),k=this.constructor._$Eu(l,v);if(k!==void 0&&v.reflect===!0){const m=(((C=v.converter)==null?void 0:C.toAttribute)!==void 0?v.converter:As).toAttribute(p,v.type);this._$Em=l,m==null?this.removeAttribute(k):this.setAttribute(k,m),this._$Em=null}}_$AK(l,p){var C;const v=this.constructor,k=v._$Eh.get(l);if(k!==void 0&&this._$Em!==k){const m=v.getPropertyOptions(k),O=typeof m.converter=="function"?{fromAttribute:m.converter}:((C=m.converter)==null?void 0:C.fromAttribute)!==void 0?m.converter:As;this._$Em=k,this[k]=O.fromAttribute(p,m.type),this._$Em=null}}requestUpdate(l,p,v,k=!1,C){if(l!==void 0){if(v??(v=this.constructor.getPropertyOptions(l)),!(v.hasChanged??au)(k?C:this[l],p))return;this.C(l,p,v)}this.isUpdatePending===!1&&(this._$Eg=this._$EP())}C(l,p,v){this._$AL.has(l)||this._$AL.set(l,p),v.reflect===!0&&this._$Em!==l&&(this._$Ej??(this._$Ej=new Set)).add(l)}async _$EP(){this.isUpdatePending=!0;try{await this._$Eg}catch(p){Promise.reject(p)}const l=this.scheduleUpdate();return l!=null&&await l,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var v;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this._$Ep){for(const[C,m]of this._$Ep)this[C]=m;this._$Ep=void 0}const k=this.constructor.elementProperties;if(k.size>0)for(const[C,m]of k)m.wrapped!==!0||this._$AL.has(C)||this[C]===void 0||this.C(C,this[C],m)}let l=!1;const p=this._$AL;try{l=this.shouldUpdate(p),l?(this.willUpdate(p),(v=this._$ES)==null||v.forEach(k=>{var C;return(C=k.hostUpdate)==null?void 0:C.call(k)}),this.update(p)):this._$ET()}catch(k){throw l=!1,this._$ET(),k}l&&this._$AE(p)}willUpdate(l){}_$AE(l){var p;(p=this._$ES)==null||p.forEach(v=>{var k;return(k=v.hostUpdated)==null?void 0:k.call(v)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(l)),this.updated(l)}_$ET(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Eg}shouldUpdate(l){return!0}update(l){this._$Ej&&(this._$Ej=this._$Ej.forEach(p=>this._$EO(p,this[p]))),this._$ET()}updated(l){}firstUpdated(l){}}Pi.elementStyles=[],Pi.shadowRootOptions={mode:"open"},Pi[To("elementProperties")]=new Map,Pi[To("finalized")]=new Map,Ts==null||Ts({ReactiveElement:Pi}),(An.reactiveElementVersions??(An.reactiveElementVersions=[])).push("2.0.1");/**
|
|
10
10
|
* @license
|
|
11
11
|
* Copyright 2017 Google LLC
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/const
|
|
14
|
-
\f\r]`,
|
|
15
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g")
|
|
13
|
+
*/const Ao=globalThis,ma=Ao.trustedTypes,lu=ma?ma.createPolicy("lit-html",{createHTML:y=>y}):void 0,Ls="$lit$",bn=`lit$${(Math.random()+"").slice(9)}$`,Rs="?"+bn,ih=`<${Rs}>`,ti=document,Lo=()=>ti.createComment(""),Ro=y=>y===null||typeof y!="object"&&typeof y!="function",uu=Array.isArray,cu=y=>uu(y)||typeof(y==null?void 0:y[Symbol.iterator])=="function",Is=`[
|
|
14
|
+
\f\r]`,Io=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,hu=/-->/g,du=/>/g,ei=RegExp(`>|${Is}(?:([^\\s"'>=/]+)(${Is}*=${Is}*(?:[^
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),pu=/'/g,fu=/"/g,yu=/^(?:script|style|textarea|title)$/i,oh=y=>(l,...p)=>({_$litType$:y,strings:l,values:p}),ae=oh(1),Nr=Symbol.for("lit-noChange"),we=Symbol.for("lit-nothing"),mu=new WeakMap,ri=ti.createTreeWalker(ti,129);function bu(y,l){if(!Array.isArray(y)||!y.hasOwnProperty("raw"))throw Error("invalid template strings array");return lu!==void 0?lu.createHTML(l):l}const vu=(y,l)=>{const p=y.length-1,v=[];let k,C=l===2?"<svg>":"",m=Io;for(let O=0;O<p;O++){const r=y[O];let b,g,w=-1,x=0;for(;x<r.length&&(m.lastIndex=x,g=m.exec(r),g!==null);)x=m.lastIndex,m===Io?g[1]==="!--"?m=hu:g[1]!==void 0?m=du:g[2]!==void 0?(yu.test(g[2])&&(k=RegExp("</"+g[2],"g")),m=ei):g[3]!==void 0&&(m=ei):m===ei?g[0]===">"?(m=k??Io,w=-1):g[1]===void 0?w=-2:(w=m.lastIndex-g[2].length,b=g[1],m=g[3]===void 0?ei:g[3]==='"'?fu:pu):m===fu||m===pu?m=ei:m===hu||m===du?m=Io:(m=ei,k=void 0);const j=m===ei&&y[O+1].startsWith("/>")?" ":"";C+=m===Io?r+ih:w>=0?(v.push(b),r.slice(0,w)+Ls+r.slice(w)+bn+j):r+bn+(w===-2?O:j)}return[bu(y,C+(y[p]||"<?>")+(l===2?"</svg>":"")),v]};class Bo{constructor({strings:l,_$litType$:p},v){let k;this.parts=[];let C=0,m=0;const O=l.length-1,r=this.parts,[b,g]=vu(l,p);if(this.el=Bo.createElement(b,v),ri.currentNode=this.el.content,p===2){const w=this.el.content.firstChild;w.replaceWith(...w.childNodes)}for(;(k=ri.nextNode())!==null&&r.length<O;){if(k.nodeType===1){if(k.hasAttributes())for(const w of k.getAttributeNames())if(w.endsWith(Ls)){const x=g[m++],j=k.getAttribute(w).split(bn),E=/([.?@])?(.*)/.exec(x);r.push({type:1,index:C,name:E[2],strings:j,ctor:E[1]==="."?wu:E[1]==="?"?_u:E[1]==="@"?xu:Do}),k.removeAttribute(w)}else w.startsWith(bn)&&(r.push({type:6,index:C}),k.removeAttribute(w));if(yu.test(k.tagName)){const w=k.textContent.split(bn),x=w.length-1;if(x>0){k.textContent=ma?ma.emptyScript:"";for(let j=0;j<x;j++)k.append(w[j],Lo()),ri.nextNode(),r.push({type:2,index:++C});k.append(w[x],Lo())}}}else if(k.nodeType===8)if(k.data===Rs)r.push({type:2,index:C});else{let w=-1;for(;(w=k.data.indexOf(bn,w+1))!==-1;)r.push({type:7,index:C}),w+=bn.length-1}C++}}static createElement(l,p){const v=ti.createElement("template");return v.innerHTML=l,v}}function ni(y,l,p=y,v){var m,O;if(l===Nr)return l;let k=v!==void 0?(m=p._$Co)==null?void 0:m[v]:p._$Cl;const C=Ro(l)?void 0:l._$litDirective$;return(k==null?void 0:k.constructor)!==C&&((O=k==null?void 0:k._$AO)==null||O.call(k,!1),C===void 0?k=void 0:(k=new C(y),k._$AT(y,p,v)),v!==void 0?(p._$Co??(p._$Co=[]))[v]=k:p._$Cl=k),k!==void 0&&(l=ni(y,k._$AS(y,l.values),k,v)),l}class gu{constructor(l,p){this._$AV=[],this._$AN=void 0,this._$AD=l,this._$AM=p}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(l){const{el:{content:p},parts:v}=this._$AD,k=((l==null?void 0:l.creationScope)??ti).importNode(p,!0);ri.currentNode=k;let C=ri.nextNode(),m=0,O=0,r=v[0];for(;r!==void 0;){if(m===r.index){let b;r.type===2?b=new Ti(C,C.nextSibling,this,l):r.type===1?b=new r.ctor(C,r.name,r.strings,this,l):r.type===6&&(b=new ku(C,this,l)),this._$AV.push(b),r=v[++O]}m!==(r==null?void 0:r.index)&&(C=ri.nextNode(),m++)}return ri.currentNode=ti,k}p(l){let p=0;for(const v of this._$AV)v!==void 0&&(v.strings!==void 0?(v._$AI(l,v,p),p+=v.strings.length-2):v._$AI(l[p])),p++}}class Ti{get _$AU(){var l;return((l=this._$AM)==null?void 0:l._$AU)??this._$Cv}constructor(l,p,v,k){this.type=2,this._$AH=we,this._$AN=void 0,this._$AA=l,this._$AB=p,this._$AM=v,this.options=k,this._$Cv=(k==null?void 0:k.isConnected)??!0}get parentNode(){let l=this._$AA.parentNode;const p=this._$AM;return p!==void 0&&(l==null?void 0:l.nodeType)===11&&(l=p.parentNode),l}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(l,p=this){l=ni(this,l,p),Ro(l)?l===we||l==null||l===""?(this._$AH!==we&&this._$AR(),this._$AH=we):l!==this._$AH&&l!==Nr&&this._(l):l._$litType$!==void 0?this.g(l):l.nodeType!==void 0?this.$(l):cu(l)?this.T(l):this._(l)}k(l){return this._$AA.parentNode.insertBefore(l,this._$AB)}$(l){this._$AH!==l&&(this._$AR(),this._$AH=this.k(l))}_(l){this._$AH!==we&&Ro(this._$AH)?this._$AA.nextSibling.data=l:this.$(ti.createTextNode(l)),this._$AH=l}g(l){var C;const{values:p,_$litType$:v}=l,k=typeof v=="number"?this._$AC(l):(v.el===void 0&&(v.el=Bo.createElement(bu(v.h,v.h[0]),this.options)),v);if(((C=this._$AH)==null?void 0:C._$AD)===k)this._$AH.p(p);else{const m=new gu(k,this),O=m.u(this.options);m.p(p),this.$(O),this._$AH=m}}_$AC(l){let p=mu.get(l.strings);return p===void 0&&mu.set(l.strings,p=new Bo(l)),p}T(l){uu(this._$AH)||(this._$AH=[],this._$AR());const p=this._$AH;let v,k=0;for(const C of l)k===p.length?p.push(v=new Ti(this.k(Lo()),this.k(Lo()),this,this.options)):v=p[k],v._$AI(C),k++;k<p.length&&(this._$AR(v&&v._$AB.nextSibling,k),p.length=k)}_$AR(l=this._$AA.nextSibling,p){var v;for((v=this._$AP)==null?void 0:v.call(this,!1,!0,p);l&&l!==this._$AB;){const k=l.nextSibling;l.remove(),l=k}}setConnected(l){var p;this._$AM===void 0&&(this._$Cv=l,(p=this._$AP)==null||p.call(this,l))}}class Do{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(l,p,v,k,C){this.type=1,this._$AH=we,this._$AN=void 0,this.element=l,this.name=p,this._$AM=k,this.options=C,v.length>2||v[0]!==""||v[1]!==""?(this._$AH=Array(v.length-1).fill(new String),this.strings=v):this._$AH=we}_$AI(l,p=this,v,k){const C=this.strings;let m=!1;if(C===void 0)l=ni(this,l,p,0),m=!Ro(l)||l!==this._$AH&&l!==Nr,m&&(this._$AH=l);else{const O=l;let r,b;for(l=C[0],r=0;r<C.length-1;r++)b=ni(this,O[v+r],p,r),b===Nr&&(b=this._$AH[r]),m||(m=!Ro(b)||b!==this._$AH[r]),b===we?l=we:l!==we&&(l+=(b??"")+C[r+1]),this._$AH[r]=b}m&&!k&&this.O(l)}O(l){l===we?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,l??"")}}class wu extends Do{constructor(){super(...arguments),this.type=3}O(l){this.element[this.name]=l===we?void 0:l}}class _u extends Do{constructor(){super(...arguments),this.type=4}O(l){this.element.toggleAttribute(this.name,!!l&&l!==we)}}class xu extends Do{constructor(l,p,v,k,C){super(l,p,v,k,C),this.type=5}_$AI(l,p=this){if((l=ni(this,l,p,0)??we)===Nr)return;const v=this._$AH,k=l===we&&v!==we||l.capture!==v.capture||l.once!==v.once||l.passive!==v.passive,C=l!==we&&(v===we||k);k&&this.element.removeEventListener(this.name,this,v),C&&this.element.addEventListener(this.name,this,l),this._$AH=l}handleEvent(l){var p;typeof this._$AH=="function"?this._$AH.call(((p=this.options)==null?void 0:p.host)??this.element,l):this._$AH.handleEvent(l)}}class ku{constructor(l,p,v){this.element=l,this.type=6,this._$AN=void 0,this._$AM=p,this.options=v}get _$AU(){return this._$AM._$AU}_$AI(l){ni(this,l)}}const ah={j:Ls,P:bn,A:Rs,C:1,M:vu,L:gu,R:cu,V:ni,D:Ti,I:Do,H:_u,N:xu,U:wu,B:ku},Bs=Ao.litHtmlPolyfillSupport;Bs==null||Bs(Bo,Ti),(Ao.litHtmlVersions??(Ao.litHtmlVersions=[])).push("3.1.0");const sh=(y,l,p)=>{const v=(p==null?void 0:p.renderBefore)??l;let k=v._$litPart$;if(k===void 0){const C=(p==null?void 0:p.renderBefore)??null;v._$litPart$=k=new Ti(l.insertBefore(Lo(),C),C,void 0,p??{})}return k._$AI(y),k};/**
|
|
16
16
|
* @license
|
|
17
17
|
* Copyright 2017 Google LLC
|
|
18
18
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
19
|
-
*/let kr=class extends
|
|
19
|
+
*/let kr=class extends Pi{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var p;const l=super.createRenderRoot();return(p=this.renderOptions).renderBefore??(p.renderBefore=l.firstChild),l}update(l){const p=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(l),this._$Do=sh(p,this.renderRoot,this.renderOptions)}connectedCallback(){var l;super.connectedCallback(),(l=this._$Do)==null||l.setConnected(!0)}disconnectedCallback(){var l;super.disconnectedCallback(),(l=this._$Do)==null||l.setConnected(!1)}render(){return Nr}};kr._$litElement$=!0,kr.finalized=!0,(Oc=globalThis.litElementHydrateSupport)==null||Oc.call(globalThis,{LitElement:kr});const Ds=globalThis.litElementPolyfillSupport;Ds==null||Ds({LitElement:kr}),(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.0.1");/**
|
|
20
20
|
* @license
|
|
21
21
|
* Copyright 2021 Google LLC
|
|
22
22
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
|
-
*/function
|
|
23
|
+
*/function tn(y,l,p){return y?l(y):p==null?void 0:p(y)}/**
|
|
24
24
|
* @license
|
|
25
25
|
* Copyright 2017 Google LLC
|
|
26
26
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
27
|
-
*/const
|
|
27
|
+
*/const Ln={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Ns=y=>(...l)=>({_$litDirective$:y,values:l});class $s{constructor(l){}get _$AU(){return this._$AM._$AU}_$AT(l,p,v){this._$Ct=l,this._$AM=p,this._$Ci=v}_$AS(l,p){return this.update(l,p)}update(l,p){return this.render(...p)}}/**
|
|
28
28
|
* @license
|
|
29
29
|
* Copyright 2020 Google LLC
|
|
30
30
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
31
|
-
*/const{D:
|
|
31
|
+
*/const{D:lh}=ah,uh=y=>y.strings===void 0,Ou=()=>document.createComment(""),No=(y,l,p)=>{var C;const v=y._$AA.parentNode,k=l===void 0?y._$AB:l._$AA;if(p===void 0){const m=v.insertBefore(Ou(),k),O=v.insertBefore(Ou(),k);p=new lh(m,O,y,y.options)}else{const m=p._$AB.nextSibling,O=p._$AM,r=O!==y;if(r){let b;(C=p._$AQ)==null||C.call(p,y),p._$AM=y,p._$AP!==void 0&&(b=y._$AU)!==O._$AU&&p._$AP(b)}if(m!==k||r){let b=p._$AA;for(;b!==m;){const g=b.nextSibling;v.insertBefore(b,k),b=g}}}return p},ii=(y,l,p=y)=>(y._$AI(l,p),y),ch={},ju=(y,l=ch)=>y._$AH=l,hh=y=>y._$AH,Ms=y=>{var v;(v=y._$AP)==null||v.call(y,!1,!0);let l=y._$AA;const p=y._$AB.nextSibling;for(;l!==p;){const k=l.nextSibling;l.remove(),l=k}};/**
|
|
32
32
|
* @license
|
|
33
33
|
* Copyright 2017 Google LLC
|
|
34
34
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
35
|
-
*/const
|
|
35
|
+
*/const Eu=(y,l,p)=>{const v=new Map;for(let k=l;k<=p;k++)v.set(y[k],k);return v},dh=Ns(class extends $s{constructor(y){if(super(y),y.type!==Ln.CHILD)throw Error("repeat() can only be used in text expressions")}ht(y,l,p){let v;p===void 0?p=l:l!==void 0&&(v=l);const k=[],C=[];let m=0;for(const O of y)k[m]=v?v(O,m):m,C[m]=p(O,m),m++;return{values:C,keys:k}}render(y,l,p){return this.ht(y,l,p).values}update(y,[l,p,v]){const k=hh(y),{values:C,keys:m}=this.ht(l,p,v);if(!Array.isArray(k))return this.dt=m,C;const O=this.dt??(this.dt=[]),r=[];let b,g,w=0,x=k.length-1,j=0,E=C.length-1;for(;w<=x&&j<=E;)if(k[w]===null)w++;else if(k[x]===null)x--;else if(O[w]===m[j])r[j]=ii(k[w],C[j]),w++,j++;else if(O[x]===m[E])r[E]=ii(k[x],C[E]),x--,E--;else if(O[w]===m[E])r[E]=ii(k[w],C[E]),No(y,r[E+1],k[w]),w++,E--;else if(O[x]===m[j])r[j]=ii(k[x],C[j]),No(y,k[w],k[x]),x--,j++;else if(b===void 0&&(b=Eu(m,j,E),g=Eu(O,w,x)),b.has(O[w]))if(b.has(O[x])){const S=g.get(m[j]),T=S!==void 0?k[S]:null;if(T===null){const A=No(y,k[w]);ii(A,C[j]),r[j]=A}else r[j]=ii(T,C[j]),No(y,k[w],T),k[S]=null;j++}else Ms(k[x]),x--;else Ms(k[w]),w++;for(;j<=E;){const S=No(y,r[E+1]);ii(S,C[j]),r[j++]=S}for(;w<=x;){const S=k[w++];S!==null&&Ms(S)}return this.dt=m,ju(y,r),Nr}});/**!
|
|
36
36
|
* Sortable 1.15.1
|
|
37
37
|
* @author RubaXa <trash@rubaxa.org>
|
|
38
38
|
* @author owenm <owen23355@gmail.com>
|
|
39
39
|
* @license MIT
|
|
40
|
-
*/function Ql(w,h){var f=Object.keys(w);if(Object.getOwnPropertySymbols){var v=Object.getOwnPropertySymbols(w);h&&(v=v.filter(function(k){return Object.getOwnPropertyDescriptor(w,k).enumerable})),f.push.apply(f,v)}return f}function Gr(w){for(var h=1;h<arguments.length;h++){var f=arguments[h]!=null?arguments[h]:{};h%2?Ql(Object(f),!0).forEach(function(v){ju(w,v,f[v])}):Object.getOwnPropertyDescriptors?Object.defineProperties(w,Object.getOwnPropertyDescriptors(f)):Ql(Object(f)).forEach(function(v){Object.defineProperty(w,v,Object.getOwnPropertyDescriptor(f,v))})}return w}function ea(w){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ea=function(h){return typeof h}:ea=function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h},ea(w)}function ju(w,h,f){return h in w?Object.defineProperty(w,h,{value:f,enumerable:!0,configurable:!0,writable:!0}):w[h]=f,w}function un(){return un=Object.assign||function(w){for(var h=1;h<arguments.length;h++){var f=arguments[h];for(var v in f)Object.prototype.hasOwnProperty.call(f,v)&&(w[v]=f[v])}return w},un.apply(this,arguments)}function Ou(w,h){if(w==null)return{};var f={},v=Object.keys(w),k,S;for(S=0;S<v.length;S++)k=v[S],!(h.indexOf(k)>=0)&&(f[k]=w[k]);return f}function Eu(w,h){if(w==null)return{};var f=Ou(w,h),v,k;if(Object.getOwnPropertySymbols){var S=Object.getOwnPropertySymbols(w);for(k=0;k<S.length;k++)v=S[k],!(h.indexOf(v)>=0)&&Object.prototype.propertyIsEnumerable.call(w,v)&&(f[v]=w[v])}return f}var Cu="1.15.1";function hn(w){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(w)}var dn=hn(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),jo=hn(/Edge/i),Kl=hn(/firefox/i),Oo=hn(/safari/i)&&!hn(/chrome/i)&&!hn(/android/i),tc=hn(/iP(ad|od|hone)/i),ec=hn(/chrome/i)&&hn(/android/i),rc={capture:!1,passive:!1};function de(w,h,f){w.addEventListener(h,f,!dn&&rc)}function se(w,h,f){w.removeEventListener(h,f,!dn&&rc)}function ra(w,h){if(h){if(h[0]===">"&&(h=h.substring(1)),w)try{if(w.matches)return w.matches(h);if(w.msMatchesSelector)return w.msMatchesSelector(h);if(w.webkitMatchesSelector)return w.webkitMatchesSelector(h)}catch{return!1}return!1}}function Su(w){return w.host&&w!==document&&w.host.nodeType?w.host:w.parentNode}function Wr(w,h,f,v){if(w){f=f||document;do{if(h!=null&&(h[0]===">"?w.parentNode===f&&ra(w,h):ra(w,h))||v&&w===f)return w;if(w===f)break}while(w=Su(w))}return null}var nc=/\s+/g;function jr(w,h,f){if(w&&h)if(w.classList)w.classList[f?"add":"remove"](h);else{var v=(" "+w.className+" ").replace(nc," ").replace(" "+h+" "," ");w.className=(v+(f?" "+h:"")).replace(nc," ")}}function At(w,h,f){var v=w&&w.style;if(v){if(f===void 0)return document.defaultView&&document.defaultView.getComputedStyle?f=document.defaultView.getComputedStyle(w,""):w.currentStyle&&(f=w.currentStyle),h===void 0?f:f[h];!(h in v)&&h.indexOf("webkit")===-1&&(h="-webkit-"+h),v[h]=f+(typeof f=="string"?"":"px")}}function gi(w,h){var f="";if(typeof w=="string")f=w;else do{var v=At(w,"transform");v&&v!=="none"&&(f=v+" "+f)}while(!h&&(w=w.parentNode));var k=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return k&&new k(f)}function ic(w,h,f){if(w){var v=w.getElementsByTagName(h),k=0,S=v.length;if(f)for(;k<S;k++)f(v[k],k);return v}return[]}function Zr(){var w=document.scrollingElement;return w||document.documentElement}function Ge(w,h,f,v,k){if(!(!w.getBoundingClientRect&&w!==window)){var S,m,j,r,y,b,g;if(w!==window&&w.parentNode&&w!==Zr()?(S=w.getBoundingClientRect(),m=S.top,j=S.left,r=S.bottom,y=S.right,b=S.height,g=S.width):(m=0,j=0,r=window.innerHeight,y=window.innerWidth,b=window.innerHeight,g=window.innerWidth),(h||f)&&w!==window&&(k=k||w.parentNode,!dn))do if(k&&k.getBoundingClientRect&&(At(k,"transform")!=="none"||f&&At(k,"position")!=="static")){var x=k.getBoundingClientRect();m-=x.top+parseInt(At(k,"border-top-width")),j-=x.left+parseInt(At(k,"border-left-width")),r=m+S.height,y=j+S.width;break}while(k=k.parentNode);if(v&&w!==window){var O=gi(k||w),E=O&&O.a,C=O&&O.d;O&&(m/=C,j/=E,g/=E,b/=C,r=m+b,y=j+g)}return{top:m,left:j,bottom:r,right:y,width:g,height:b}}}function oc(w){var h=Ge(w),f=parseInt(At(w,"padding-left")),v=parseInt(At(w,"padding-top")),k=parseInt(At(w,"padding-right")),S=parseInt(At(w,"padding-bottom"));return h.top+=v+parseInt(At(w,"border-top-width")),h.left+=f+parseInt(At(w,"border-left-width")),h.width=w.clientWidth-f-k,h.height=w.clientHeight-v-S,h.bottom=h.top+h.height,h.right=h.left+h.width,h}function ac(w,h,f){for(var v=kn(w,!0),k=Ge(w)[h];v;){var S=Ge(v)[f],m=void 0;if(f==="top"||f==="left"?m=k>=S:m=k<=S,!m)return v;if(v===Zr())break;v=kn(v,!1)}return!1}function wi(w,h,f,v){for(var k=0,S=0,m=w.children;S<m.length;){if(m[S].style.display!=="none"&&m[S]!==Ft.ghost&&(v||m[S]!==Ft.dragged)&&Wr(m[S],f.draggable,w,!1)){if(k===h)return m[S];k++}S++}return null}function ms(w,h){for(var f=w.lastElementChild;f&&(f===Ft.ghost||At(f,"display")==="none"||h&&!ra(f,h));)f=f.previousElementSibling;return f||null}function Tr(w,h){var f=0;if(!w||!w.parentNode)return-1;for(;w=w.previousElementSibling;)w.nodeName.toUpperCase()!=="TEMPLATE"&&w!==Ft.clone&&(!h||ra(w,h))&&f++;return f}function sc(w){var h=0,f=0,v=Zr();if(w)do{var k=gi(w),S=k.a,m=k.d;h+=w.scrollLeft*S,f+=w.scrollTop*m}while(w!==v&&(w=w.parentNode));return[h,f]}function Pu(w,h){for(var f in w)if(w.hasOwnProperty(f)){for(var v in h)if(h.hasOwnProperty(v)&&h[v]===w[f][v])return Number(f)}return-1}function kn(w,h){if(!w||!w.getBoundingClientRect)return Zr();var f=w,v=!1;do if(f.clientWidth<f.scrollWidth||f.clientHeight<f.scrollHeight){var k=At(f);if(f.clientWidth<f.scrollWidth&&(k.overflowX=="auto"||k.overflowX=="scroll")||f.clientHeight<f.scrollHeight&&(k.overflowY=="auto"||k.overflowY=="scroll")){if(!f.getBoundingClientRect||f===document.body)return Zr();if(v||h)return f;v=!0}}while(f=f.parentNode);return Zr()}function Tu(w,h){if(w&&h)for(var f in h)h.hasOwnProperty(f)&&(w[f]=h[f]);return w}function vs(w,h){return Math.round(w.top)===Math.round(h.top)&&Math.round(w.left)===Math.round(h.left)&&Math.round(w.height)===Math.round(h.height)&&Math.round(w.width)===Math.round(h.width)}var Eo;function lc(w,h){return function(){if(!Eo){var f=arguments,v=this;f.length===1?w.call(v,f[0]):w.apply(v,f),Eo=setTimeout(function(){Eo=void 0},h)}}}function Lu(){clearTimeout(Eo),Eo=void 0}function cc(w,h,f){w.scrollLeft+=h,w.scrollTop+=f}function uc(w){var h=window.Polymer,f=window.jQuery||window.Zepto;return h&&h.dom?h.dom(w).cloneNode(!0):f?f(w).clone(!0)[0]:w.cloneNode(!0)}var Or="Sortable"+new Date().getTime();function Au(){var w=[],h;return{captureAnimationState:function(){if(w=[],!!this.options.animation){var v=[].slice.call(this.el.children);v.forEach(function(k){if(!(At(k,"display")==="none"||k===Ft.ghost)){w.push({target:k,rect:Ge(k)});var S=Gr({},w[w.length-1].rect);if(k.thisAnimationDuration){var m=gi(k,!0);m&&(S.top-=m.f,S.left-=m.e)}k.fromRect=S}})}},addAnimationState:function(v){w.push(v)},removeAnimationState:function(v){w.splice(Pu(w,{target:v}),1)},animateAll:function(v){var k=this;if(!this.options.animation){clearTimeout(h),typeof v=="function"&&v();return}var S=!1,m=0;w.forEach(function(j){var r=0,y=j.target,b=y.fromRect,g=Ge(y),x=y.prevFromRect,O=y.prevToRect,E=j.rect,C=gi(y,!0);C&&(g.top-=C.f,g.left-=C.e),y.toRect=g,y.thisAnimationDuration&&vs(x,g)&&!vs(b,g)&&(E.top-g.top)/(E.left-g.left)===(b.top-g.top)/(b.left-g.left)&&(r=Iu(E,x,O,k.options)),vs(g,b)||(y.prevFromRect=b,y.prevToRect=g,r||(r=k.options.animation),k.animate(y,E,g,r)),r&&(S=!0,m=Math.max(m,r),clearTimeout(y.animationResetTimer),y.animationResetTimer=setTimeout(function(){y.animationTime=0,y.prevFromRect=null,y.fromRect=null,y.prevToRect=null,y.thisAnimationDuration=null},r),y.thisAnimationDuration=r)}),clearTimeout(h),S?h=setTimeout(function(){typeof v=="function"&&v()},m):typeof v=="function"&&v(),w=[]},animate:function(v,k,S,m){if(m){At(v,"transition",""),At(v,"transform","");var j=gi(this.el),r=j&&j.a,y=j&&j.d,b=(k.left-S.left)/(r||1),g=(k.top-S.top)/(y||1);v.animatingX=!!b,v.animatingY=!!g,At(v,"transform","translate3d("+b+"px,"+g+"px,0)"),this.forRepaintDummy=Ru(v),At(v,"transition","transform "+m+"ms"+(this.options.easing?" "+this.options.easing:"")),At(v,"transform","translate3d(0,0,0)"),typeof v.animated=="number"&&clearTimeout(v.animated),v.animated=setTimeout(function(){At(v,"transition",""),At(v,"transform",""),v.animated=!1,v.animatingX=!1,v.animatingY=!1},m)}}}}function Ru(w){return w.offsetWidth}function Iu(w,h,f,v){return Math.sqrt(Math.pow(h.top-w.top,2)+Math.pow(h.left-w.left,2))/Math.sqrt(Math.pow(h.top-f.top,2)+Math.pow(h.left-f.left,2))*v.animation}var _i=[],bs={initializeByDefault:!0},Co={mount:function(h){for(var f in bs)bs.hasOwnProperty(f)&&!(f in h)&&(h[f]=bs[f]);_i.forEach(function(v){if(v.pluginName===h.pluginName)throw"Sortable: Cannot mount plugin ".concat(h.pluginName," more than once")}),_i.push(h)},pluginEvent:function(h,f,v){var k=this;this.eventCanceled=!1,v.cancel=function(){k.eventCanceled=!0};var S=h+"Global";_i.forEach(function(m){f[m.pluginName]&&(f[m.pluginName][S]&&f[m.pluginName][S](Gr({sortable:f},v)),f.options[m.pluginName]&&f[m.pluginName][h]&&f[m.pluginName][h](Gr({sortable:f},v)))})},initializePlugins:function(h,f,v,k){_i.forEach(function(j){var r=j.pluginName;if(!(!h.options[r]&&!j.initializeByDefault)){var y=new j(h,f,h.options);y.sortable=h,y.options=h.options,h[r]=y,un(v,y.defaults)}});for(var S in h.options)if(h.options.hasOwnProperty(S)){var m=this.modifyOption(h,S,h.options[S]);typeof m<"u"&&(h.options[S]=m)}},getEventProperties:function(h,f){var v={};return _i.forEach(function(k){typeof k.eventProperties=="function"&&un(v,k.eventProperties.call(f[k.pluginName],h))}),v},modifyOption:function(h,f,v){var k;return _i.forEach(function(S){h[S.pluginName]&&S.optionListeners&&typeof S.optionListeners[f]=="function"&&(k=S.optionListeners[f].call(h[S.pluginName],v))}),k}};function Bu(w){var h=w.sortable,f=w.rootEl,v=w.name,k=w.targetEl,S=w.cloneEl,m=w.toEl,j=w.fromEl,r=w.oldIndex,y=w.newIndex,b=w.oldDraggableIndex,g=w.newDraggableIndex,x=w.originalEvent,O=w.putSortable,E=w.extraEventProperties;if(h=h||f&&f[Or],!!h){var C,T=h.options,L="on"+v.charAt(0).toUpperCase()+v.substr(1);window.CustomEvent&&!dn&&!jo?C=new CustomEvent(v,{bubbles:!0,cancelable:!0}):(C=document.createEvent("Event"),C.initEvent(v,!0,!0)),C.to=m||f,C.from=j||f,C.item=k||f,C.clone=S,C.oldIndex=r,C.newIndex=y,C.oldDraggableIndex=b,C.newDraggableIndex=g,C.originalEvent=x,C.pullMode=O?O.lastPutMode:void 0;var R=Gr(Gr({},E),Co.getEventProperties(v,h));for(var I in R)C[I]=R[I];f&&f.dispatchEvent(C),T[L]&&T[L].call(h,C)}}var Du=["evt"],vr=function(h,f){var v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},k=v.evt,S=Eu(v,Du);Co.pluginEvent.bind(Ft)(h,f,Gr({dragEl:ht,parentEl:Me,ghostEl:Jt,rootEl:Le,nextEl:Jn,lastDownEl:na,cloneEl:Re,cloneHidden:jn,dragStarted:Po,putSortable:Ke,activeSortable:Ft.active,originalEvent:k,oldIndex:xi,oldDraggableIndex:So,newIndex:Er,newDraggableIndex:On,hideGhostForTarget:vc,unhideGhostForTarget:bc,cloneNowHidden:function(){jn=!0},cloneNowShown:function(){jn=!1},dispatchSortableEvent:function(j){pr({sortable:f,name:j,originalEvent:k})}},S))};function pr(w){Bu(Gr({putSortable:Ke,cloneEl:Re,targetEl:ht,rootEl:Le,oldIndex:xi,oldDraggableIndex:So,newIndex:Er,newDraggableIndex:On},w))}var ht,Me,Jt,Le,Jn,na,Re,jn,xi,Er,So,On,ia,Ke,ki=!1,oa=!1,aa=[],Yn,Nr,gs,ws,hc,dc,Po,ji,To,Lo=!1,sa=!1,la,nr,_s=[],xs=!1,ca=[],ua=typeof document<"u",ha=tc,pc=jo||dn?"cssFloat":"float",Nu=ua&&!ec&&!tc&&"draggable"in document.createElement("div"),fc=function(){if(ua){if(dn)return!1;var w=document.createElement("x");return w.style.cssText="pointer-events:auto",w.style.pointerEvents==="auto"}}(),yc=function(h,f){var v=At(h),k=parseInt(v.width)-parseInt(v.paddingLeft)-parseInt(v.paddingRight)-parseInt(v.borderLeftWidth)-parseInt(v.borderRightWidth),S=wi(h,0,f),m=wi(h,1,f),j=S&&At(S),r=m&&At(m),y=j&&parseInt(j.marginLeft)+parseInt(j.marginRight)+Ge(S).width,b=r&&parseInt(r.marginLeft)+parseInt(r.marginRight)+Ge(m).width;if(v.display==="flex")return v.flexDirection==="column"||v.flexDirection==="column-reverse"?"vertical":"horizontal";if(v.display==="grid")return v.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(S&&j.float&&j.float!=="none"){var g=j.float==="left"?"left":"right";return m&&(r.clear==="both"||r.clear===g)?"vertical":"horizontal"}return S&&(j.display==="block"||j.display==="flex"||j.display==="table"||j.display==="grid"||y>=k&&v[pc]==="none"||m&&v[pc]==="none"&&y+b>k)?"vertical":"horizontal"},$u=function(h,f,v){var k=v?h.left:h.top,S=v?h.right:h.bottom,m=v?h.width:h.height,j=v?f.left:f.top,r=v?f.right:f.bottom,y=v?f.width:f.height;return k===j||S===r||k+m/2===j+y/2},Mu=function(h,f){var v;return aa.some(function(k){var S=k[Or].options.emptyInsertThreshold;if(!(!S||ms(k))){var m=Ge(k),j=h>=m.left-S&&h<=m.right+S,r=f>=m.top-S&&f<=m.bottom+S;if(j&&r)return v=k}}),v},mc=function(h){function f(S,m){return function(j,r,y,b){var g=j.options.group.name&&r.options.group.name&&j.options.group.name===r.options.group.name;if(S==null&&(m||g))return!0;if(S==null||S===!1)return!1;if(m&&S==="clone")return S;if(typeof S=="function")return f(S(j,r,y,b),m)(j,r,y,b);var x=(m?j:r).options.group.name;return S===!0||typeof S=="string"&&S===x||S.join&&S.indexOf(x)>-1}}var v={},k=h.group;(!k||ea(k)!="object")&&(k={name:k}),v.name=k.name,v.checkPull=f(k.pull,!0),v.checkPut=f(k.put),v.revertClone=k.revertClone,h.group=v},vc=function(){!fc&&Jt&&At(Jt,"display","none")},bc=function(){!fc&&Jt&&At(Jt,"display","")};ua&&!ec&&document.addEventListener("click",function(w){if(oa)return w.preventDefault(),w.stopPropagation&&w.stopPropagation(),w.stopImmediatePropagation&&w.stopImmediatePropagation(),oa=!1,!1},!0);var Xn=function(h){if(ht){h=h.touches?h.touches[0]:h;var f=Mu(h.clientX,h.clientY);if(f){var v={};for(var k in h)h.hasOwnProperty(k)&&(v[k]=h[k]);v.target=v.rootEl=f,v.preventDefault=void 0,v.stopPropagation=void 0,f[Or]._onDragOver(v)}}},Fu=function(h){ht&&ht.parentNode[Or]._isOutsideThisEl(h.target)};function Ft(w,h){if(!(w&&w.nodeType&&w.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(w));this.el=w,this.options=h=un({},h),w[Or]=this;var f={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(w.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return yc(w,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(m,j){m.setData("Text",j.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:Ft.supportPointer!==!1&&"PointerEvent"in window&&!Oo,emptyInsertThreshold:5};Co.initializePlugins(this,w,f);for(var v in f)!(v in h)&&(h[v]=f[v]);mc(h);for(var k in this)k.charAt(0)==="_"&&typeof this[k]=="function"&&(this[k]=this[k].bind(this));this.nativeDraggable=h.forceFallback?!1:Nu,this.nativeDraggable&&(this.options.touchStartThreshold=1),h.supportPointer?de(w,"pointerdown",this._onTapStart):(de(w,"mousedown",this._onTapStart),de(w,"touchstart",this._onTapStart)),this.nativeDraggable&&(de(w,"dragover",this),de(w,"dragenter",this)),aa.push(this.el),h.store&&h.store.get&&this.sort(h.store.get(this)||[]),un(this,Au())}Ft.prototype={constructor:Ft,_isOutsideThisEl:function(h){!this.el.contains(h)&&h!==this.el&&(ji=null)},_getDirection:function(h,f){return typeof this.options.direction=="function"?this.options.direction.call(this,h,f,ht):this.options.direction},_onTapStart:function(h){if(h.cancelable){var f=this,v=this.el,k=this.options,S=k.preventOnFilter,m=h.type,j=h.touches&&h.touches[0]||h.pointerType&&h.pointerType==="touch"&&h,r=(j||h).target,y=h.target.shadowRoot&&(h.path&&h.path[0]||h.composedPath&&h.composedPath()[0])||r,b=k.filter;if(Zu(v),!ht&&!(/mousedown|pointerdown/.test(m)&&h.button!==0||k.disabled)&&!y.isContentEditable&&!(!this.nativeDraggable&&Oo&&r&&r.tagName.toUpperCase()==="SELECT")&&(r=Wr(r,k.draggable,v,!1),!(r&&r.animated)&&na!==r)){if(xi=Tr(r),So=Tr(r,k.draggable),typeof b=="function"){if(b.call(this,h,r,this)){pr({sortable:f,rootEl:y,name:"filter",targetEl:r,toEl:v,fromEl:v}),vr("filter",f,{evt:h}),S&&h.cancelable&&h.preventDefault();return}}else if(b&&(b=b.split(",").some(function(g){if(g=Wr(y,g.trim(),v,!1),g)return pr({sortable:f,rootEl:g,name:"filter",targetEl:r,fromEl:v,toEl:v}),vr("filter",f,{evt:h}),!0}),b)){S&&h.cancelable&&h.preventDefault();return}k.handle&&!Wr(y,k.handle,v,!1)||this._prepareDragStart(h,j,r)}}},_prepareDragStart:function(h,f,v){var k=this,S=k.el,m=k.options,j=S.ownerDocument,r;if(v&&!ht&&v.parentNode===S){var y=Ge(v);if(Le=S,ht=v,Me=ht.parentNode,Jn=ht.nextSibling,na=v,ia=m.group,Ft.dragged=ht,Yn={target:ht,clientX:(f||h).clientX,clientY:(f||h).clientY},hc=Yn.clientX-y.left,dc=Yn.clientY-y.top,this._lastX=(f||h).clientX,this._lastY=(f||h).clientY,ht.style["will-change"]="all",r=function(){if(vr("delayEnded",k,{evt:h}),Ft.eventCanceled){k._onDrop();return}k._disableDelayedDragEvents(),!Kl&&k.nativeDraggable&&(ht.draggable=!0),k._triggerDragStart(h,f),pr({sortable:k,name:"choose",originalEvent:h}),jr(ht,m.chosenClass,!0)},m.ignore.split(",").forEach(function(b){ic(ht,b.trim(),ks)}),de(j,"dragover",Xn),de(j,"mousemove",Xn),de(j,"touchmove",Xn),de(j,"mouseup",k._onDrop),de(j,"touchend",k._onDrop),de(j,"touchcancel",k._onDrop),Kl&&this.nativeDraggable&&(this.options.touchStartThreshold=4,ht.draggable=!0),vr("delayStart",this,{evt:h}),m.delay&&(!m.delayOnTouchOnly||f)&&(!this.nativeDraggable||!(jo||dn))){if(Ft.eventCanceled){this._onDrop();return}de(j,"mouseup",k._disableDelayedDrag),de(j,"touchend",k._disableDelayedDrag),de(j,"touchcancel",k._disableDelayedDrag),de(j,"mousemove",k._delayedDragTouchMoveHandler),de(j,"touchmove",k._delayedDragTouchMoveHandler),m.supportPointer&&de(j,"pointermove",k._delayedDragTouchMoveHandler),k._dragStartTimer=setTimeout(r,m.delay)}else r()}},_delayedDragTouchMoveHandler:function(h){var f=h.touches?h.touches[0]:h;Math.max(Math.abs(f.clientX-this._lastX),Math.abs(f.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){ht&&ks(ht),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var h=this.el.ownerDocument;se(h,"mouseup",this._disableDelayedDrag),se(h,"touchend",this._disableDelayedDrag),se(h,"touchcancel",this._disableDelayedDrag),se(h,"mousemove",this._delayedDragTouchMoveHandler),se(h,"touchmove",this._delayedDragTouchMoveHandler),se(h,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(h,f){f=f||h.pointerType=="touch"&&h,!this.nativeDraggable||f?this.options.supportPointer?de(document,"pointermove",this._onTouchMove):f?de(document,"touchmove",this._onTouchMove):de(document,"mousemove",this._onTouchMove):(de(ht,"dragend",this),de(Le,"dragstart",this._onDragStart));try{document.selection?pa(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(h,f){if(ki=!1,Le&&ht){vr("dragStarted",this,{evt:f}),this.nativeDraggable&&de(document,"dragover",Fu);var v=this.options;!h&&jr(ht,v.dragClass,!1),jr(ht,v.ghostClass,!0),Ft.active=this,h&&this._appendGhost(),pr({sortable:this,name:"start",originalEvent:f})}else this._nulling()},_emulateDragOver:function(){if(Nr){this._lastX=Nr.clientX,this._lastY=Nr.clientY,vc();for(var h=document.elementFromPoint(Nr.clientX,Nr.clientY),f=h;h&&h.shadowRoot&&(h=h.shadowRoot.elementFromPoint(Nr.clientX,Nr.clientY),h!==f);)f=h;if(ht.parentNode[Or]._isOutsideThisEl(h),f)do{if(f[Or]){var v=void 0;if(v=f[Or]._onDragOver({clientX:Nr.clientX,clientY:Nr.clientY,target:h,rootEl:f}),v&&!this.options.dragoverBubble)break}h=f}while(f=f.parentNode);bc()}},_onTouchMove:function(h){if(Yn){var f=this.options,v=f.fallbackTolerance,k=f.fallbackOffset,S=h.touches?h.touches[0]:h,m=Jt&&gi(Jt,!0),j=Jt&&m&&m.a,r=Jt&&m&&m.d,y=ha&&nr&&sc(nr),b=(S.clientX-Yn.clientX+k.x)/(j||1)+(y?y[0]-_s[0]:0)/(j||1),g=(S.clientY-Yn.clientY+k.y)/(r||1)+(y?y[1]-_s[1]:0)/(r||1);if(!Ft.active&&!ki){if(v&&Math.max(Math.abs(S.clientX-this._lastX),Math.abs(S.clientY-this._lastY))<v)return;this._onDragStart(h,!0)}if(Jt){m?(m.e+=b-(gs||0),m.f+=g-(ws||0)):m={a:1,b:0,c:0,d:1,e:b,f:g};var x="matrix(".concat(m.a,",").concat(m.b,",").concat(m.c,",").concat(m.d,",").concat(m.e,",").concat(m.f,")");At(Jt,"webkitTransform",x),At(Jt,"mozTransform",x),At(Jt,"msTransform",x),At(Jt,"transform",x),gs=b,ws=g,Nr=S}h.cancelable&&h.preventDefault()}},_appendGhost:function(){if(!Jt){var h=this.options.fallbackOnBody?document.body:Le,f=Ge(ht,!0,ha,!0,h),v=this.options;if(ha){for(nr=h;At(nr,"position")==="static"&&At(nr,"transform")==="none"&&nr!==document;)nr=nr.parentNode;nr!==document.body&&nr!==document.documentElement?(nr===document&&(nr=Zr()),f.top+=nr.scrollTop,f.left+=nr.scrollLeft):nr=Zr(),_s=sc(nr)}Jt=ht.cloneNode(!0),jr(Jt,v.ghostClass,!1),jr(Jt,v.fallbackClass,!0),jr(Jt,v.dragClass,!0),At(Jt,"transition",""),At(Jt,"transform",""),At(Jt,"box-sizing","border-box"),At(Jt,"margin",0),At(Jt,"top",f.top),At(Jt,"left",f.left),At(Jt,"width",f.width),At(Jt,"height",f.height),At(Jt,"opacity","0.8"),At(Jt,"position",ha?"absolute":"fixed"),At(Jt,"zIndex","100000"),At(Jt,"pointerEvents","none"),Ft.ghost=Jt,h.appendChild(Jt),At(Jt,"transform-origin",hc/parseInt(Jt.style.width)*100+"% "+dc/parseInt(Jt.style.height)*100+"%")}},_onDragStart:function(h,f){var v=this,k=h.dataTransfer,S=v.options;if(vr("dragStart",this,{evt:h}),Ft.eventCanceled){this._onDrop();return}vr("setupClone",this),Ft.eventCanceled||(Re=uc(ht),Re.removeAttribute("id"),Re.draggable=!1,Re.style["will-change"]="",this._hideClone(),jr(Re,this.options.chosenClass,!1),Ft.clone=Re),v.cloneId=pa(function(){vr("clone",v),!Ft.eventCanceled&&(v.options.removeCloneOnHide||Le.insertBefore(Re,ht),v._hideClone(),pr({sortable:v,name:"clone"}))}),!f&&jr(ht,S.dragClass,!0),f?(oa=!0,v._loopId=setInterval(v._emulateDragOver,50)):(se(document,"mouseup",v._onDrop),se(document,"touchend",v._onDrop),se(document,"touchcancel",v._onDrop),k&&(k.effectAllowed="move",S.setData&&S.setData.call(v,k,ht)),de(document,"drop",v),At(ht,"transform","translateZ(0)")),ki=!0,v._dragStartId=pa(v._dragStarted.bind(v,f,h)),de(document,"selectstart",v),Po=!0,Oo&&At(document.body,"user-select","none")},_onDragOver:function(h){var f=this.el,v=h.target,k,S,m,j=this.options,r=j.group,y=Ft.active,b=ia===r,g=j.sort,x=Ke||y,O,E=this,C=!1;if(xs)return;function T(mt,ct){vr(mt,E,Gr({evt:h,isOwner:b,axis:O?"vertical":"horizontal",revert:m,dragRect:k,targetRect:S,canSort:g,fromSortable:x,target:v,completed:R,onMove:function(Tt,Ht){return da(Le,f,ht,k,Tt,Ge(Tt),h,Ht)},changed:I},ct))}function L(){T("dragOverAnimationCapture"),E.captureAnimationState(),E!==x&&x.captureAnimationState()}function R(mt){return T("dragOverCompleted",{insertion:mt}),mt&&(b?y._hideClone():y._showClone(E),E!==x&&(jr(ht,Ke?Ke.options.ghostClass:y.options.ghostClass,!1),jr(ht,j.ghostClass,!0)),Ke!==E&&E!==Ft.active?Ke=E:E===Ft.active&&Ke&&(Ke=null),x===E&&(E._ignoreWhileAnimating=v),E.animateAll(function(){T("dragOverAnimationComplete"),E._ignoreWhileAnimating=null}),E!==x&&(x.animateAll(),x._ignoreWhileAnimating=null)),(v===ht&&!ht.animated||v===f&&!v.animated)&&(ji=null),!j.dragoverBubble&&!h.rootEl&&v!==document&&(ht.parentNode[Or]._isOutsideThisEl(h.target),!mt&&Xn(h)),!j.dragoverBubble&&h.stopPropagation&&h.stopPropagation(),C=!0}function I(){Er=Tr(ht),On=Tr(ht,j.draggable),pr({sortable:E,name:"change",toEl:f,newIndex:Er,newDraggableIndex:On,originalEvent:h})}if(h.preventDefault!==void 0&&h.cancelable&&h.preventDefault(),v=Wr(v,j.draggable,f,!0),T("dragOver"),Ft.eventCanceled)return C;if(ht.contains(h.target)||v.animated&&v.animatingX&&v.animatingY||E._ignoreWhileAnimating===v)return R(!1);if(oa=!1,y&&!j.disabled&&(b?g||(m=Me!==Le):Ke===this||(this.lastPutMode=ia.checkPull(this,y,ht,h))&&r.checkPut(this,y,ht,h))){if(O=this._getDirection(h,v)==="vertical",k=Ge(ht),T("dragOverValid"),Ft.eventCanceled)return C;if(m)return Me=Le,L(),this._hideClone(),T("revert"),Ft.eventCanceled||(Jn?Le.insertBefore(ht,Jn):Le.appendChild(ht)),R(!0);var $=ms(f,j.draggable);if(!$||qu(h,O,this)&&!$.animated){if($===ht)return R(!1);if($&&f===h.target&&(v=$),v&&(S=Ge(v)),da(Le,f,ht,k,v,S,h,!!v)!==!1)return L(),$&&$.nextSibling?f.insertBefore(ht,$.nextSibling):f.appendChild(ht),Me=f,I(),R(!0)}else if($&&zu(h,O,this)){var M=wi(f,0,j,!0);if(M===ht)return R(!1);if(v=M,S=Ge(v),da(Le,f,ht,k,v,S,h,!1)!==!1)return L(),f.insertBefore(ht,M),Me=f,I(),R(!0)}else if(v.parentNode===f){S=Ge(v);var B=0,U,H=ht.parentNode!==f,N=!$u(ht.animated&&ht.toRect||k,v.animated&&v.toRect||S,O),q=O?"top":"left",F=ac(v,"top","top")||ac(ht,"top","top"),X=F?F.scrollTop:void 0;ji!==v&&(U=S[q],Lo=!1,sa=!N&&j.invertSwap||H),B=Uu(h,v,S,O,N?1:j.swapThreshold,j.invertedSwapThreshold==null?j.swapThreshold:j.invertedSwapThreshold,sa,ji===v);var Y;if(B!==0){var Q=Tr(ht);do Q-=B,Y=Me.children[Q];while(Y&&(At(Y,"display")==="none"||Y===Jt))}if(B===0||Y===v)return R(!1);ji=v,To=B;var tt=v.nextElementSibling,it=!1;it=B===1;var st=da(Le,f,ht,k,v,S,h,it);if(st!==!1)return(st===1||st===-1)&&(it=st===1),xs=!0,setTimeout(Vu,30),L(),it&&!tt?f.appendChild(ht):v.parentNode.insertBefore(ht,it?tt:v),F&&cc(F,0,X-F.scrollTop),Me=ht.parentNode,U!==void 0&&!sa&&(la=Math.abs(U-Ge(v)[q])),I(),R(!0)}if(f.contains(ht))return R(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){se(document,"mousemove",this._onTouchMove),se(document,"touchmove",this._onTouchMove),se(document,"pointermove",this._onTouchMove),se(document,"dragover",Xn),se(document,"mousemove",Xn),se(document,"touchmove",Xn)},_offUpEvents:function(){var h=this.el.ownerDocument;se(h,"mouseup",this._onDrop),se(h,"touchend",this._onDrop),se(h,"pointerup",this._onDrop),se(h,"touchcancel",this._onDrop),se(document,"selectstart",this)},_onDrop:function(h){var f=this.el,v=this.options;if(Er=Tr(ht),On=Tr(ht,v.draggable),vr("drop",this,{evt:h}),Me=ht&&ht.parentNode,Er=Tr(ht),On=Tr(ht,v.draggable),Ft.eventCanceled){this._nulling();return}ki=!1,sa=!1,Lo=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),js(this.cloneId),js(this._dragStartId),this.nativeDraggable&&(se(document,"drop",this),se(f,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Oo&&At(document.body,"user-select",""),At(ht,"transform",""),h&&(Po&&(h.cancelable&&h.preventDefault(),!v.dropBubble&&h.stopPropagation()),Jt&&Jt.parentNode&&Jt.parentNode.removeChild(Jt),(Le===Me||Ke&&Ke.lastPutMode!=="clone")&&Re&&Re.parentNode&&Re.parentNode.removeChild(Re),ht&&(this.nativeDraggable&&se(ht,"dragend",this),ks(ht),ht.style["will-change"]="",Po&&!ki&&jr(ht,Ke?Ke.options.ghostClass:this.options.ghostClass,!1),jr(ht,this.options.chosenClass,!1),pr({sortable:this,name:"unchoose",toEl:Me,newIndex:null,newDraggableIndex:null,originalEvent:h}),Le!==Me?(Er>=0&&(pr({rootEl:Me,name:"add",toEl:Me,fromEl:Le,originalEvent:h}),pr({sortable:this,name:"remove",toEl:Me,originalEvent:h}),pr({rootEl:Me,name:"sort",toEl:Me,fromEl:Le,originalEvent:h}),pr({sortable:this,name:"sort",toEl:Me,originalEvent:h})),Ke&&Ke.save()):Er!==xi&&Er>=0&&(pr({sortable:this,name:"update",toEl:Me,originalEvent:h}),pr({sortable:this,name:"sort",toEl:Me,originalEvent:h})),Ft.active&&((Er==null||Er===-1)&&(Er=xi,On=So),pr({sortable:this,name:"end",toEl:Me,originalEvent:h}),this.save()))),this._nulling()},_nulling:function(){vr("nulling",this),Le=ht=Me=Jt=Jn=Re=na=jn=Yn=Nr=Po=Er=On=xi=So=ji=To=Ke=ia=Ft.dragged=Ft.ghost=Ft.clone=Ft.active=null,ca.forEach(function(h){h.checked=!0}),ca.length=gs=ws=0},handleEvent:function(h){switch(h.type){case"drop":case"dragend":this._onDrop(h);break;case"dragenter":case"dragover":ht&&(this._onDragOver(h),Hu(h));break;case"selectstart":h.preventDefault();break}},toArray:function(){for(var h=[],f,v=this.el.children,k=0,S=v.length,m=this.options;k<S;k++)f=v[k],Wr(f,m.draggable,this.el,!1)&&h.push(f.getAttribute(m.dataIdAttr)||Wu(f));return h},sort:function(h,f){var v={},k=this.el;this.toArray().forEach(function(S,m){var j=k.children[m];Wr(j,this.options.draggable,k,!1)&&(v[S]=j)},this),f&&this.captureAnimationState(),h.forEach(function(S){v[S]&&(k.removeChild(v[S]),k.appendChild(v[S]))}),f&&this.animateAll()},save:function(){var h=this.options.store;h&&h.set&&h.set(this)},closest:function(h,f){return Wr(h,f||this.options.draggable,this.el,!1)},option:function(h,f){var v=this.options;if(f===void 0)return v[h];var k=Co.modifyOption(this,h,f);typeof k<"u"?v[h]=k:v[h]=f,h==="group"&&mc(v)},destroy:function(){vr("destroy",this);var h=this.el;h[Or]=null,se(h,"mousedown",this._onTapStart),se(h,"touchstart",this._onTapStart),se(h,"pointerdown",this._onTapStart),this.nativeDraggable&&(se(h,"dragover",this),se(h,"dragenter",this)),Array.prototype.forEach.call(h.querySelectorAll("[draggable]"),function(f){f.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),aa.splice(aa.indexOf(this.el),1),this.el=h=null},_hideClone:function(){if(!jn){if(vr("hideClone",this),Ft.eventCanceled)return;At(Re,"display","none"),this.options.removeCloneOnHide&&Re.parentNode&&Re.parentNode.removeChild(Re),jn=!0}},_showClone:function(h){if(h.lastPutMode!=="clone"){this._hideClone();return}if(jn){if(vr("showClone",this),Ft.eventCanceled)return;ht.parentNode==Le&&!this.options.group.revertClone?Le.insertBefore(Re,ht):Jn?Le.insertBefore(Re,Jn):Le.appendChild(Re),this.options.group.revertClone&&this.animate(ht,Re),At(Re,"display",""),jn=!1}}};function Hu(w){w.dataTransfer&&(w.dataTransfer.dropEffect="move"),w.cancelable&&w.preventDefault()}function da(w,h,f,v,k,S,m,j){var r,y=w[Or],b=y.options.onMove,g;return window.CustomEvent&&!dn&&!jo?r=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(r=document.createEvent("Event"),r.initEvent("move",!0,!0)),r.to=h,r.from=w,r.dragged=f,r.draggedRect=v,r.related=k||h,r.relatedRect=S||Ge(h),r.willInsertAfter=j,r.originalEvent=m,w.dispatchEvent(r),b&&(g=b.call(y,r,m)),g}function ks(w){w.draggable=!1}function Vu(){xs=!1}function zu(w,h,f){var v=Ge(wi(f.el,0,f.options,!0)),k=oc(f.el),S=10;return h?w.clientX<k.left-S||w.clientY<v.top&&w.clientX<v.right:w.clientY<k.top-S||w.clientY<v.bottom&&w.clientX<v.left}function qu(w,h,f){var v=Ge(ms(f.el,f.options.draggable)),k=oc(f.el),S=10;return h?w.clientX>k.right+S||w.clientY>v.bottom&&w.clientX>v.left:w.clientY>k.bottom+S||w.clientX>v.right&&w.clientY>v.top}function Uu(w,h,f,v,k,S,m,j){var r=v?w.clientY:w.clientX,y=v?f.height:f.width,b=v?f.top:f.left,g=v?f.bottom:f.right,x=!1;if(!m){if(j&&la<y*k){if(!Lo&&(To===1?r>b+y*S/2:r<g-y*S/2)&&(Lo=!0),Lo)x=!0;else if(To===1?r<b+la:r>g-la)return-To}else if(r>b+y*(1-k)/2&&r<g-y*(1-k)/2)return Gu(h)}return x=x||m,x&&(r<b+y*S/2||r>g-y*S/2)?r>b+y/2?1:-1:0}function Gu(w){return Tr(ht)<Tr(w)?1:-1}function Wu(w){for(var h=w.tagName+w.className+w.src+w.href+w.textContent,f=h.length,v=0;f--;)v+=h.charCodeAt(f);return v.toString(36)}function Zu(w){ca.length=0;for(var h=w.getElementsByTagName("input"),f=h.length;f--;){var v=h[f];v.checked&&ca.push(v)}}function pa(w){return setTimeout(w,0)}function js(w){return clearTimeout(w)}ua&&de(document,"touchmove",function(w){(Ft.active||ki)&&w.cancelable&&w.preventDefault()}),Ft.utils={on:de,off:se,css:At,find:ic,is:function(h,f){return!!Wr(h,f,h,!1)},extend:Tu,throttle:lc,closest:Wr,toggleClass:jr,clone:uc,index:Tr,nextTick:pa,cancelNextTick:js,detectDirection:yc,getChild:wi},Ft.get=function(w){return w[Or]},Ft.mount=function(){for(var w=arguments.length,h=new Array(w),f=0;f<w;f++)h[f]=arguments[f];h[0].constructor===Array&&(h=h[0]),h.forEach(function(v){if(!v.prototype||!v.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(v));v.utils&&(Ft.utils=Gr(Gr({},Ft.utils),v.utils)),Co.mount(v)})},Ft.create=function(w,h){return new Ft(w,h)},Ft.version=Cu;var We=[],Ao,Os,Es=!1,Cs,Ss,fa,Ro;function Ju(){function w(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var h in this)h.charAt(0)==="_"&&typeof this[h]=="function"&&(this[h]=this[h].bind(this))}return w.prototype={dragStarted:function(f){var v=f.originalEvent;this.sortable.nativeDraggable?de(document,"dragover",this._handleAutoScroll):this.options.supportPointer?de(document,"pointermove",this._handleFallbackAutoScroll):v.touches?de(document,"touchmove",this._handleFallbackAutoScroll):de(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(f){var v=f.originalEvent;!this.options.dragOverBubble&&!v.rootEl&&this._handleAutoScroll(v)},drop:function(){this.sortable.nativeDraggable?se(document,"dragover",this._handleAutoScroll):(se(document,"pointermove",this._handleFallbackAutoScroll),se(document,"touchmove",this._handleFallbackAutoScroll),se(document,"mousemove",this._handleFallbackAutoScroll)),gc(),ya(),Lu()},nulling:function(){fa=Os=Ao=Es=Ro=Cs=Ss=null,We.length=0},_handleFallbackAutoScroll:function(f){this._handleAutoScroll(f,!0)},_handleAutoScroll:function(f,v){var k=this,S=(f.touches?f.touches[0]:f).clientX,m=(f.touches?f.touches[0]:f).clientY,j=document.elementFromPoint(S,m);if(fa=f,v||this.options.forceAutoScrollFallback||jo||dn||Oo){Ps(f,this.options,j,v);var r=kn(j,!0);Es&&(!Ro||S!==Cs||m!==Ss)&&(Ro&&gc(),Ro=setInterval(function(){var y=kn(document.elementFromPoint(S,m),!0);y!==r&&(r=y,ya()),Ps(f,k.options,y,v)},10),Cs=S,Ss=m)}else{if(!this.options.bubbleScroll||kn(j,!0)===Zr()){ya();return}Ps(f,this.options,kn(j,!1),!1)}}},un(w,{pluginName:"scroll",initializeByDefault:!0})}function ya(){We.forEach(function(w){clearInterval(w.pid)}),We=[]}function gc(){clearInterval(Ro)}var Ps=lc(function(w,h,f,v){if(h.scroll){var k=(w.touches?w.touches[0]:w).clientX,S=(w.touches?w.touches[0]:w).clientY,m=h.scrollSensitivity,j=h.scrollSpeed,r=Zr(),y=!1,b;Os!==f&&(Os=f,ya(),Ao=h.scroll,b=h.scrollFn,Ao===!0&&(Ao=kn(f,!0)));var g=0,x=Ao;do{var O=x,E=Ge(O),C=E.top,T=E.bottom,L=E.left,R=E.right,I=E.width,$=E.height,M=void 0,B=void 0,U=O.scrollWidth,H=O.scrollHeight,N=At(O),q=O.scrollLeft,F=O.scrollTop;O===r?(M=I<U&&(N.overflowX==="auto"||N.overflowX==="scroll"||N.overflowX==="visible"),B=$<H&&(N.overflowY==="auto"||N.overflowY==="scroll"||N.overflowY==="visible")):(M=I<U&&(N.overflowX==="auto"||N.overflowX==="scroll"),B=$<H&&(N.overflowY==="auto"||N.overflowY==="scroll"));var X=M&&(Math.abs(R-k)<=m&&q+I<U)-(Math.abs(L-k)<=m&&!!q),Y=B&&(Math.abs(T-S)<=m&&F+$<H)-(Math.abs(C-S)<=m&&!!F);if(!We[g])for(var Q=0;Q<=g;Q++)We[Q]||(We[Q]={});(We[g].vx!=X||We[g].vy!=Y||We[g].el!==O)&&(We[g].el=O,We[g].vx=X,We[g].vy=Y,clearInterval(We[g].pid),(X!=0||Y!=0)&&(y=!0,We[g].pid=setInterval((function(){v&&this.layer===0&&Ft.active._onTouchMove(fa);var tt=We[this.layer].vy?We[this.layer].vy*j:0,it=We[this.layer].vx?We[this.layer].vx*j:0;typeof b=="function"&&b.call(Ft.dragged.parentNode[Or],it,tt,w,fa,We[this.layer].el)!=="continue"||cc(We[this.layer].el,it,tt)}).bind({layer:g}),24))),g++}while(h.bubbleScroll&&x!==r&&(x=kn(x,!1)));Es=y}},30),wc=function(h){var f=h.originalEvent,v=h.putSortable,k=h.dragEl,S=h.activeSortable,m=h.dispatchSortableEvent,j=h.hideGhostForTarget,r=h.unhideGhostForTarget;if(f){var y=v||S;j();var b=f.changedTouches&&f.changedTouches.length?f.changedTouches[0]:f,g=document.elementFromPoint(b.clientX,b.clientY);r(),y&&!y.el.contains(g)&&(m("spill"),this.onSpill({dragEl:k,putSortable:v}))}};function Ts(){}Ts.prototype={startIndex:null,dragStart:function(h){var f=h.oldDraggableIndex;this.startIndex=f},onSpill:function(h){var f=h.dragEl,v=h.putSortable;this.sortable.captureAnimationState(),v&&v.captureAnimationState();var k=wi(this.sortable.el,this.startIndex,this.options);k?this.sortable.el.insertBefore(f,k):this.sortable.el.appendChild(f),this.sortable.animateAll(),v&&v.animateAll()},drop:wc},un(Ts,{pluginName:"revertOnSpill"});function Ls(){}Ls.prototype={onSpill:function(h){var f=h.dragEl,v=h.putSortable,k=v||this.sortable;k.captureAnimationState(),f.parentNode&&f.parentNode.removeChild(f),k.animateAll()},drop:wc},un(Ls,{pluginName:"removeOnSpill"}),Ft.mount(new Ju),Ft.mount(Ls,Ts);const Yu=(w,h,f,v)=>{let k=[],S=null;w._sortable=Ft.create(w,{handle:".drag-handle",filter:".drag-handle.disabled",swapThreshold:.5,animation:150,easing:"cubic-bezier(1, 0, 0, 1)",onStart:m=>{const j=m.item;k=Array.prototype.slice.call(j.parentNode.childNodes),k=k.filter(r=>r.nodeType!=Node.ELEMENT_NODE||!r.classList.contains("sortable-fallback"))},onMove(m){S=m.related},onEnd:m=>{const r=m.item.parentNode;for(const E of k)r.appendChild(E);if(m.oldIndex==m.newIndex)return;const y=h.getArray(),b=y.find(E=>E.get(f)===m.item.querySelector("eox-layercontrol-layer").layer.get(f)),g=y.find(E=>E.get(f)==S.dataset.layer);let x,O;for(x=0;x<y.length;x++)if(y[x]==b){h.removeAt(x);break}for(O=0;O<y.length;O++)if(y[O]===g){x>O?h.insertAt(O,b):h.insertAt(O+1,b);break}v.requestUpdate()}})};function Xu(w,h,f){w.getArray().forEach(k=>{k.get(h)||k.set(h,k.ol_uid),k.get(f)||k.set(f,`layer ${k.ol_uid}`)})}const As=(w,h,f)=>{let v=[];const k=(S,m,j)=>{v=[...v,...S.filter(y=>y.get(m)===j)];const r=S.filter(y=>y.getLayers);return r.length>0&&r.forEach(y=>k(y.getLayers().getArray(),m,j)),v};return k(w,h,f),v},Qu=(w,h)=>{var f,v,k;if(!(!w||!h))return w.getLayers?"group":(k=(f=h.getInteractions().getArray().filter(S=>S.freehand_!==void 0).map(S=>S.source_))==null?void 0:f.ol_uid)!=null&&k.includes(w.getSource?(v=w.getSource())==null?void 0:v.ol_uid:void 0)?"draw":w.declutter_!==void 0?"vector":"raster"},_c=(w,h)=>{const f=w.get("minZoom"),v=w.get("maxZoom");return!!(h&&(f!==-1/0||v!==1/0))},Ku=(w,h,f)=>{if(!w||!h)return!1;if(!_c(w,f))return!0;const v=w.get("minZoom"),k=w.get("maxZoom"),S=h.getView().getZoom();return S>v&&S<k};function th(w,h){const f=new URL(w).searchParams;Object.entries(h).forEach(([m,j])=>{typeof j=="object"&&!Array.isArray(j)&&j!==null?Object.keys(j).forEach(r=>{f.set(r,j[r])}):f.set(m,j)});const v=w.split("?")[0],k=f.toString();return`${v}?${k}`}function xc(w,h){var v;let f={};for(const k in w){const S=w[k].type;if(S&&S!=="object")f[k]=S==="number"?Number(h[k]):h[k];else if(typeof w[k]=="object"&&((v=w[k])!=null&&v.properties)){const m=xc(w[k].properties,h);Object.keys(m).length>0&&(f[k]=m)}}return f}function eh(w,h){var S;if(!w.getSource().getTileUrlFunction())return null;const f=new URL(w.getSource().getTileUrlFunction()([0,0,0])),v=Object.fromEntries(f.searchParams.entries()),k=xc(((S=h.schema)==null?void 0:S.properties)||h.schema,v);return Object.keys(k).length?k:null}/**
|
|
40
|
+
*/function Cu(y,l){var p=Object.keys(y);if(Object.getOwnPropertySymbols){var v=Object.getOwnPropertySymbols(y);l&&(v=v.filter(function(k){return Object.getOwnPropertyDescriptor(y,k).enumerable})),p.push.apply(p,v)}return p}function en(y){for(var l=1;l<arguments.length;l++){var p=arguments[l]!=null?arguments[l]:{};l%2?Cu(Object(p),!0).forEach(function(v){ph(y,v,p[v])}):Object.getOwnPropertyDescriptors?Object.defineProperties(y,Object.getOwnPropertyDescriptors(p)):Cu(Object(p)).forEach(function(v){Object.defineProperty(y,v,Object.getOwnPropertyDescriptor(p,v))})}return y}function ba(y){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ba=function(l){return typeof l}:ba=function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},ba(y)}function ph(y,l,p){return l in y?Object.defineProperty(y,l,{value:p,enumerable:!0,configurable:!0,writable:!0}):y[l]=p,y}function vn(){return vn=Object.assign||function(y){for(var l=1;l<arguments.length;l++){var p=arguments[l];for(var v in p)Object.prototype.hasOwnProperty.call(p,v)&&(y[v]=p[v])}return y},vn.apply(this,arguments)}function fh(y,l){if(y==null)return{};var p={},v=Object.keys(y),k,C;for(C=0;C<v.length;C++)k=v[C],!(l.indexOf(k)>=0)&&(p[k]=y[k]);return p}function yh(y,l){if(y==null)return{};var p=fh(y,l),v,k;if(Object.getOwnPropertySymbols){var C=Object.getOwnPropertySymbols(y);for(k=0;k<C.length;k++)v=C[k],!(l.indexOf(v)>=0)&&Object.prototype.propertyIsEnumerable.call(y,v)&&(p[v]=y[v])}return p}var mh="1.15.1";function gn(y){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(y)}var wn=gn(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),$o=gn(/Edge/i),Su=gn(/firefox/i),Mo=gn(/safari/i)&&!gn(/chrome/i)&&!gn(/android/i),Pu=gn(/iP(ad|od|hone)/i),Tu=gn(/chrome/i)&&gn(/android/i),Au={capture:!1,passive:!1};function be(y,l,p){y.addEventListener(l,p,!wn&&Au)}function he(y,l,p){y.removeEventListener(l,p,!wn&&Au)}function va(y,l){if(l){if(l[0]===">"&&(l=l.substring(1)),y)try{if(y.matches)return y.matches(l);if(y.msMatchesSelector)return y.msMatchesSelector(l);if(y.webkitMatchesSelector)return y.webkitMatchesSelector(l)}catch{return!1}return!1}}function bh(y){return y.host&&y!==document&&y.host.nodeType?y.host:y.parentNode}function rn(y,l,p,v){if(y){p=p||document;do{if(l!=null&&(l[0]===">"?y.parentNode===p&&va(y,l):va(y,l))||v&&y===p)return y;if(y===p)break}while(y=bh(y))}return null}var Lu=/\s+/g;function Ar(y,l,p){if(y&&l)if(y.classList)y.classList[p?"add":"remove"](l);else{var v=(" "+y.className+" ").replace(Lu," ").replace(" "+l+" "," ");y.className=(v+(p?" "+l:"")).replace(Lu," ")}}function Rt(y,l,p){var v=y&&y.style;if(v){if(p===void 0)return document.defaultView&&document.defaultView.getComputedStyle?p=document.defaultView.getComputedStyle(y,""):y.currentStyle&&(p=y.currentStyle),l===void 0?p:p[l];!(l in v)&&l.indexOf("webkit")===-1&&(l="-webkit-"+l),v[l]=p+(typeof p=="string"?"":"px")}}function Ai(y,l){var p="";if(typeof y=="string")p=y;else do{var v=Rt(y,"transform");v&&v!=="none"&&(p=v+" "+p)}while(!l&&(y=y.parentNode));var k=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return k&&new k(p)}function Ru(y,l,p){if(y){var v=y.getElementsByTagName(l),k=0,C=v.length;if(p)for(;k<C;k++)p(v[k],k);return v}return[]}function nn(){var y=document.scrollingElement;return y||document.documentElement}function Ye(y,l,p,v,k){if(!(!y.getBoundingClientRect&&y!==window)){var C,m,O,r,b,g,w;if(y!==window&&y.parentNode&&y!==nn()?(C=y.getBoundingClientRect(),m=C.top,O=C.left,r=C.bottom,b=C.right,g=C.height,w=C.width):(m=0,O=0,r=window.innerHeight,b=window.innerWidth,g=window.innerHeight,w=window.innerWidth),(l||p)&&y!==window&&(k=k||y.parentNode,!wn))do if(k&&k.getBoundingClientRect&&(Rt(k,"transform")!=="none"||p&&Rt(k,"position")!=="static")){var x=k.getBoundingClientRect();m-=x.top+parseInt(Rt(k,"border-top-width")),O-=x.left+parseInt(Rt(k,"border-left-width")),r=m+C.height,b=O+C.width;break}while(k=k.parentNode);if(v&&y!==window){var j=Ai(k||y),E=j&&j.a,S=j&&j.d;j&&(m/=S,O/=E,w/=E,g/=S,r=m+g,b=O+w)}return{top:m,left:O,bottom:r,right:b,width:w,height:g}}}function Iu(y){var l=Ye(y),p=parseInt(Rt(y,"padding-left")),v=parseInt(Rt(y,"padding-top")),k=parseInt(Rt(y,"padding-right")),C=parseInt(Rt(y,"padding-bottom"));return l.top+=v+parseInt(Rt(y,"border-top-width")),l.left+=p+parseInt(Rt(y,"border-left-width")),l.width=y.clientWidth-p-k,l.height=y.clientHeight-v-C,l.bottom=l.top+l.height,l.right=l.left+l.width,l}function Bu(y,l,p){for(var v=Rn(y,!0),k=Ye(y)[l];v;){var C=Ye(v)[p],m=void 0;if(p==="top"||p==="left"?m=k>=C:m=k<=C,!m)return v;if(v===nn())break;v=Rn(v,!1)}return!1}function Li(y,l,p,v){for(var k=0,C=0,m=y.children;C<m.length;){if(m[C].style.display!=="none"&&m[C]!==Ft.ghost&&(v||m[C]!==Ft.dragged)&&rn(m[C],p.draggable,y,!1)){if(k===l)return m[C];k++}C++}return null}function Hs(y,l){for(var p=y.lastElementChild;p&&(p===Ft.ghost||Rt(p,"display")==="none"||l&&!va(p,l));)p=p.previousElementSibling;return p||null}function $r(y,l){var p=0;if(!y||!y.parentNode)return-1;for(;y=y.previousElementSibling;)y.nodeName.toUpperCase()!=="TEMPLATE"&&y!==Ft.clone&&(!l||va(y,l))&&p++;return p}function Du(y){var l=0,p=0,v=nn();if(y)do{var k=Ai(y),C=k.a,m=k.d;l+=y.scrollLeft*C,p+=y.scrollTop*m}while(y!==v&&(y=y.parentNode));return[l,p]}function vh(y,l){for(var p in y)if(y.hasOwnProperty(p)){for(var v in l)if(l.hasOwnProperty(v)&&l[v]===y[p][v])return Number(p)}return-1}function Rn(y,l){if(!y||!y.getBoundingClientRect)return nn();var p=y,v=!1;do if(p.clientWidth<p.scrollWidth||p.clientHeight<p.scrollHeight){var k=Rt(p);if(p.clientWidth<p.scrollWidth&&(k.overflowX=="auto"||k.overflowX=="scroll")||p.clientHeight<p.scrollHeight&&(k.overflowY=="auto"||k.overflowY=="scroll")){if(!p.getBoundingClientRect||p===document.body)return nn();if(v||l)return p;v=!0}}while(p=p.parentNode);return nn()}function gh(y,l){if(y&&l)for(var p in l)l.hasOwnProperty(p)&&(y[p]=l[p]);return y}function Fs(y,l){return Math.round(y.top)===Math.round(l.top)&&Math.round(y.left)===Math.round(l.left)&&Math.round(y.height)===Math.round(l.height)&&Math.round(y.width)===Math.round(l.width)}var Ho;function Nu(y,l){return function(){if(!Ho){var p=arguments,v=this;p.length===1?y.call(v,p[0]):y.apply(v,p),Ho=setTimeout(function(){Ho=void 0},l)}}}function wh(){clearTimeout(Ho),Ho=void 0}function $u(y,l,p){y.scrollLeft+=l,y.scrollTop+=p}function Mu(y){var l=window.Polymer,p=window.jQuery||window.Zepto;return l&&l.dom?l.dom(y).cloneNode(!0):p?p(y).clone(!0)[0]:y.cloneNode(!0)}var Lr="Sortable"+new Date().getTime();function _h(){var y=[],l;return{captureAnimationState:function(){if(y=[],!!this.options.animation){var v=[].slice.call(this.el.children);v.forEach(function(k){if(!(Rt(k,"display")==="none"||k===Ft.ghost)){y.push({target:k,rect:Ye(k)});var C=en({},y[y.length-1].rect);if(k.thisAnimationDuration){var m=Ai(k,!0);m&&(C.top-=m.f,C.left-=m.e)}k.fromRect=C}})}},addAnimationState:function(v){y.push(v)},removeAnimationState:function(v){y.splice(vh(y,{target:v}),1)},animateAll:function(v){var k=this;if(!this.options.animation){clearTimeout(l),typeof v=="function"&&v();return}var C=!1,m=0;y.forEach(function(O){var r=0,b=O.target,g=b.fromRect,w=Ye(b),x=b.prevFromRect,j=b.prevToRect,E=O.rect,S=Ai(b,!0);S&&(w.top-=S.f,w.left-=S.e),b.toRect=w,b.thisAnimationDuration&&Fs(x,w)&&!Fs(g,w)&&(E.top-w.top)/(E.left-w.left)===(g.top-w.top)/(g.left-w.left)&&(r=kh(E,x,j,k.options)),Fs(w,g)||(b.prevFromRect=g,b.prevToRect=w,r||(r=k.options.animation),k.animate(b,E,w,r)),r&&(C=!0,m=Math.max(m,r),clearTimeout(b.animationResetTimer),b.animationResetTimer=setTimeout(function(){b.animationTime=0,b.prevFromRect=null,b.fromRect=null,b.prevToRect=null,b.thisAnimationDuration=null},r),b.thisAnimationDuration=r)}),clearTimeout(l),C?l=setTimeout(function(){typeof v=="function"&&v()},m):typeof v=="function"&&v(),y=[]},animate:function(v,k,C,m){if(m){Rt(v,"transition",""),Rt(v,"transform","");var O=Ai(this.el),r=O&&O.a,b=O&&O.d,g=(k.left-C.left)/(r||1),w=(k.top-C.top)/(b||1);v.animatingX=!!g,v.animatingY=!!w,Rt(v,"transform","translate3d("+g+"px,"+w+"px,0)"),this.forRepaintDummy=xh(v),Rt(v,"transition","transform "+m+"ms"+(this.options.easing?" "+this.options.easing:"")),Rt(v,"transform","translate3d(0,0,0)"),typeof v.animated=="number"&&clearTimeout(v.animated),v.animated=setTimeout(function(){Rt(v,"transition",""),Rt(v,"transform",""),v.animated=!1,v.animatingX=!1,v.animatingY=!1},m)}}}}function xh(y){return y.offsetWidth}function kh(y,l,p,v){return Math.sqrt(Math.pow(l.top-y.top,2)+Math.pow(l.left-y.left,2))/Math.sqrt(Math.pow(l.top-p.top,2)+Math.pow(l.left-p.left,2))*v.animation}var Ri=[],Vs={initializeByDefault:!0},Fo={mount:function(l){for(var p in Vs)Vs.hasOwnProperty(p)&&!(p in l)&&(l[p]=Vs[p]);Ri.forEach(function(v){if(v.pluginName===l.pluginName)throw"Sortable: Cannot mount plugin ".concat(l.pluginName," more than once")}),Ri.push(l)},pluginEvent:function(l,p,v){var k=this;this.eventCanceled=!1,v.cancel=function(){k.eventCanceled=!0};var C=l+"Global";Ri.forEach(function(m){p[m.pluginName]&&(p[m.pluginName][C]&&p[m.pluginName][C](en({sortable:p},v)),p.options[m.pluginName]&&p[m.pluginName][l]&&p[m.pluginName][l](en({sortable:p},v)))})},initializePlugins:function(l,p,v,k){Ri.forEach(function(O){var r=O.pluginName;if(!(!l.options[r]&&!O.initializeByDefault)){var b=new O(l,p,l.options);b.sortable=l,b.options=l.options,l[r]=b,vn(v,b.defaults)}});for(var C in l.options)if(l.options.hasOwnProperty(C)){var m=this.modifyOption(l,C,l.options[C]);typeof m<"u"&&(l.options[C]=m)}},getEventProperties:function(l,p){var v={};return Ri.forEach(function(k){typeof k.eventProperties=="function"&&vn(v,k.eventProperties.call(p[k.pluginName],l))}),v},modifyOption:function(l,p,v){var k;return Ri.forEach(function(C){l[C.pluginName]&&C.optionListeners&&typeof C.optionListeners[p]=="function"&&(k=C.optionListeners[p].call(l[C.pluginName],v))}),k}};function Oh(y){var l=y.sortable,p=y.rootEl,v=y.name,k=y.targetEl,C=y.cloneEl,m=y.toEl,O=y.fromEl,r=y.oldIndex,b=y.newIndex,g=y.oldDraggableIndex,w=y.newDraggableIndex,x=y.originalEvent,j=y.putSortable,E=y.extraEventProperties;if(l=l||p&&p[Lr],!!l){var S,T=l.options,A="on"+v.charAt(0).toUpperCase()+v.substr(1);window.CustomEvent&&!wn&&!$o?S=new CustomEvent(v,{bubbles:!0,cancelable:!0}):(S=document.createEvent("Event"),S.initEvent(v,!0,!0)),S.to=m||p,S.from=O||p,S.item=k||p,S.clone=C,S.oldIndex=r,S.newIndex=b,S.oldDraggableIndex=g,S.newDraggableIndex=w,S.originalEvent=x,S.pullMode=j?j.lastPutMode:void 0;var R=en(en({},E),Fo.getEventProperties(v,l));for(var I in R)S[I]=R[I];p&&p.dispatchEvent(S),T[A]&&T[A].call(l,S)}}var jh=["evt"],Or=function(l,p){var v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},k=v.evt,C=yh(v,jh);Fo.pluginEvent.bind(Ft)(l,p,en({dragEl:ht,parentEl:Ve,ghostEl:Yt,rootEl:Ie,nextEl:oi,lastDownEl:ga,cloneEl:De,cloneHidden:In,dragStarted:zo,putSortable:ir,activeSortable:Ft.active,originalEvent:k,oldIndex:Ii,oldDraggableIndex:Vo,newIndex:Rr,newDraggableIndex:Bn,hideGhostForTarget:Gu,unhideGhostForTarget:Wu,cloneNowHidden:function(){In=!0},cloneNowShown:function(){In=!1},dispatchSortableEvent:function(O){wr({sortable:p,name:O,originalEvent:k})}},C))};function wr(y){Oh(en({putSortable:ir,cloneEl:De,targetEl:ht,rootEl:Ie,oldIndex:Ii,oldDraggableIndex:Vo,newIndex:Rr,newDraggableIndex:Bn},y))}var ht,Ve,Yt,Ie,oi,ga,De,In,Ii,Rr,Vo,Bn,wa,ir,Bi=!1,_a=!1,xa=[],ai,qr,zs,Us,Hu,Fu,zo,Di,Uo,qo=!1,ka=!1,Oa,cr,qs=[],Gs=!1,ja=[],Ea=typeof document<"u",Ca=Pu,Vu=$o||wn?"cssFloat":"float",Eh=Ea&&!Tu&&!Pu&&"draggable"in document.createElement("div"),zu=function(){if(Ea){if(wn)return!1;var y=document.createElement("x");return y.style.cssText="pointer-events:auto",y.style.pointerEvents==="auto"}}(),Uu=function(l,p){var v=Rt(l),k=parseInt(v.width)-parseInt(v.paddingLeft)-parseInt(v.paddingRight)-parseInt(v.borderLeftWidth)-parseInt(v.borderRightWidth),C=Li(l,0,p),m=Li(l,1,p),O=C&&Rt(C),r=m&&Rt(m),b=O&&parseInt(O.marginLeft)+parseInt(O.marginRight)+Ye(C).width,g=r&&parseInt(r.marginLeft)+parseInt(r.marginRight)+Ye(m).width;if(v.display==="flex")return v.flexDirection==="column"||v.flexDirection==="column-reverse"?"vertical":"horizontal";if(v.display==="grid")return v.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(C&&O.float&&O.float!=="none"){var w=O.float==="left"?"left":"right";return m&&(r.clear==="both"||r.clear===w)?"vertical":"horizontal"}return C&&(O.display==="block"||O.display==="flex"||O.display==="table"||O.display==="grid"||b>=k&&v[Vu]==="none"||m&&v[Vu]==="none"&&b+g>k)?"vertical":"horizontal"},Ch=function(l,p,v){var k=v?l.left:l.top,C=v?l.right:l.bottom,m=v?l.width:l.height,O=v?p.left:p.top,r=v?p.right:p.bottom,b=v?p.width:p.height;return k===O||C===r||k+m/2===O+b/2},Sh=function(l,p){var v;return xa.some(function(k){var C=k[Lr].options.emptyInsertThreshold;if(!(!C||Hs(k))){var m=Ye(k),O=l>=m.left-C&&l<=m.right+C,r=p>=m.top-C&&p<=m.bottom+C;if(O&&r)return v=k}}),v},qu=function(l){function p(C,m){return function(O,r,b,g){var w=O.options.group.name&&r.options.group.name&&O.options.group.name===r.options.group.name;if(C==null&&(m||w))return!0;if(C==null||C===!1)return!1;if(m&&C==="clone")return C;if(typeof C=="function")return p(C(O,r,b,g),m)(O,r,b,g);var x=(m?O:r).options.group.name;return C===!0||typeof C=="string"&&C===x||C.join&&C.indexOf(x)>-1}}var v={},k=l.group;(!k||ba(k)!="object")&&(k={name:k}),v.name=k.name,v.checkPull=p(k.pull,!0),v.checkPut=p(k.put),v.revertClone=k.revertClone,l.group=v},Gu=function(){!zu&&Yt&&Rt(Yt,"display","none")},Wu=function(){!zu&&Yt&&Rt(Yt,"display","")};Ea&&!Tu&&document.addEventListener("click",function(y){if(_a)return y.preventDefault(),y.stopPropagation&&y.stopPropagation(),y.stopImmediatePropagation&&y.stopImmediatePropagation(),_a=!1,!1},!0);var si=function(l){if(ht){l=l.touches?l.touches[0]:l;var p=Sh(l.clientX,l.clientY);if(p){var v={};for(var k in l)l.hasOwnProperty(k)&&(v[k]=l[k]);v.target=v.rootEl=p,v.preventDefault=void 0,v.stopPropagation=void 0,p[Lr]._onDragOver(v)}}},Ph=function(l){ht&&ht.parentNode[Lr]._isOutsideThisEl(l.target)};function Ft(y,l){if(!(y&&y.nodeType&&y.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(y));this.el=y,this.options=l=vn({},l),y[Lr]=this;var p={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(y.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Uu(y,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(m,O){m.setData("Text",O.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:Ft.supportPointer!==!1&&"PointerEvent"in window&&!Mo,emptyInsertThreshold:5};Fo.initializePlugins(this,y,p);for(var v in p)!(v in l)&&(l[v]=p[v]);qu(l);for(var k in this)k.charAt(0)==="_"&&typeof this[k]=="function"&&(this[k]=this[k].bind(this));this.nativeDraggable=l.forceFallback?!1:Eh,this.nativeDraggable&&(this.options.touchStartThreshold=1),l.supportPointer?be(y,"pointerdown",this._onTapStart):(be(y,"mousedown",this._onTapStart),be(y,"touchstart",this._onTapStart)),this.nativeDraggable&&(be(y,"dragover",this),be(y,"dragenter",this)),xa.push(this.el),l.store&&l.store.get&&this.sort(l.store.get(this)||[]),vn(this,_h())}Ft.prototype={constructor:Ft,_isOutsideThisEl:function(l){!this.el.contains(l)&&l!==this.el&&(Di=null)},_getDirection:function(l,p){return typeof this.options.direction=="function"?this.options.direction.call(this,l,p,ht):this.options.direction},_onTapStart:function(l){if(l.cancelable){var p=this,v=this.el,k=this.options,C=k.preventOnFilter,m=l.type,O=l.touches&&l.touches[0]||l.pointerType&&l.pointerType==="touch"&&l,r=(O||l).target,b=l.target.shadowRoot&&(l.path&&l.path[0]||l.composedPath&&l.composedPath()[0])||r,g=k.filter;if(Nh(v),!ht&&!(/mousedown|pointerdown/.test(m)&&l.button!==0||k.disabled)&&!b.isContentEditable&&!(!this.nativeDraggable&&Mo&&r&&r.tagName.toUpperCase()==="SELECT")&&(r=rn(r,k.draggable,v,!1),!(r&&r.animated)&&ga!==r)){if(Ii=$r(r),Vo=$r(r,k.draggable),typeof g=="function"){if(g.call(this,l,r,this)){wr({sortable:p,rootEl:b,name:"filter",targetEl:r,toEl:v,fromEl:v}),Or("filter",p,{evt:l}),C&&l.cancelable&&l.preventDefault();return}}else if(g&&(g=g.split(",").some(function(w){if(w=rn(b,w.trim(),v,!1),w)return wr({sortable:p,rootEl:w,name:"filter",targetEl:r,fromEl:v,toEl:v}),Or("filter",p,{evt:l}),!0}),g)){C&&l.cancelable&&l.preventDefault();return}k.handle&&!rn(b,k.handle,v,!1)||this._prepareDragStart(l,O,r)}}},_prepareDragStart:function(l,p,v){var k=this,C=k.el,m=k.options,O=C.ownerDocument,r;if(v&&!ht&&v.parentNode===C){var b=Ye(v);if(Ie=C,ht=v,Ve=ht.parentNode,oi=ht.nextSibling,ga=v,wa=m.group,Ft.dragged=ht,ai={target:ht,clientX:(p||l).clientX,clientY:(p||l).clientY},Hu=ai.clientX-b.left,Fu=ai.clientY-b.top,this._lastX=(p||l).clientX,this._lastY=(p||l).clientY,ht.style["will-change"]="all",r=function(){if(Or("delayEnded",k,{evt:l}),Ft.eventCanceled){k._onDrop();return}k._disableDelayedDragEvents(),!Su&&k.nativeDraggable&&(ht.draggable=!0),k._triggerDragStart(l,p),wr({sortable:k,name:"choose",originalEvent:l}),Ar(ht,m.chosenClass,!0)},m.ignore.split(",").forEach(function(g){Ru(ht,g.trim(),Ws)}),be(O,"dragover",si),be(O,"mousemove",si),be(O,"touchmove",si),be(O,"mouseup",k._onDrop),be(O,"touchend",k._onDrop),be(O,"touchcancel",k._onDrop),Su&&this.nativeDraggable&&(this.options.touchStartThreshold=4,ht.draggable=!0),Or("delayStart",this,{evt:l}),m.delay&&(!m.delayOnTouchOnly||p)&&(!this.nativeDraggable||!($o||wn))){if(Ft.eventCanceled){this._onDrop();return}be(O,"mouseup",k._disableDelayedDrag),be(O,"touchend",k._disableDelayedDrag),be(O,"touchcancel",k._disableDelayedDrag),be(O,"mousemove",k._delayedDragTouchMoveHandler),be(O,"touchmove",k._delayedDragTouchMoveHandler),m.supportPointer&&be(O,"pointermove",k._delayedDragTouchMoveHandler),k._dragStartTimer=setTimeout(r,m.delay)}else r()}},_delayedDragTouchMoveHandler:function(l){var p=l.touches?l.touches[0]:l;Math.max(Math.abs(p.clientX-this._lastX),Math.abs(p.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){ht&&Ws(ht),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var l=this.el.ownerDocument;he(l,"mouseup",this._disableDelayedDrag),he(l,"touchend",this._disableDelayedDrag),he(l,"touchcancel",this._disableDelayedDrag),he(l,"mousemove",this._delayedDragTouchMoveHandler),he(l,"touchmove",this._delayedDragTouchMoveHandler),he(l,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(l,p){p=p||l.pointerType=="touch"&&l,!this.nativeDraggable||p?this.options.supportPointer?be(document,"pointermove",this._onTouchMove):p?be(document,"touchmove",this._onTouchMove):be(document,"mousemove",this._onTouchMove):(be(ht,"dragend",this),be(Ie,"dragstart",this._onDragStart));try{document.selection?Pa(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(l,p){if(Bi=!1,Ie&&ht){Or("dragStarted",this,{evt:p}),this.nativeDraggable&&be(document,"dragover",Ph);var v=this.options;!l&&Ar(ht,v.dragClass,!1),Ar(ht,v.ghostClass,!0),Ft.active=this,l&&this._appendGhost(),wr({sortable:this,name:"start",originalEvent:p})}else this._nulling()},_emulateDragOver:function(){if(qr){this._lastX=qr.clientX,this._lastY=qr.clientY,Gu();for(var l=document.elementFromPoint(qr.clientX,qr.clientY),p=l;l&&l.shadowRoot&&(l=l.shadowRoot.elementFromPoint(qr.clientX,qr.clientY),l!==p);)p=l;if(ht.parentNode[Lr]._isOutsideThisEl(l),p)do{if(p[Lr]){var v=void 0;if(v=p[Lr]._onDragOver({clientX:qr.clientX,clientY:qr.clientY,target:l,rootEl:p}),v&&!this.options.dragoverBubble)break}l=p}while(p=p.parentNode);Wu()}},_onTouchMove:function(l){if(ai){var p=this.options,v=p.fallbackTolerance,k=p.fallbackOffset,C=l.touches?l.touches[0]:l,m=Yt&&Ai(Yt,!0),O=Yt&&m&&m.a,r=Yt&&m&&m.d,b=Ca&&cr&&Du(cr),g=(C.clientX-ai.clientX+k.x)/(O||1)+(b?b[0]-qs[0]:0)/(O||1),w=(C.clientY-ai.clientY+k.y)/(r||1)+(b?b[1]-qs[1]:0)/(r||1);if(!Ft.active&&!Bi){if(v&&Math.max(Math.abs(C.clientX-this._lastX),Math.abs(C.clientY-this._lastY))<v)return;this._onDragStart(l,!0)}if(Yt){m?(m.e+=g-(zs||0),m.f+=w-(Us||0)):m={a:1,b:0,c:0,d:1,e:g,f:w};var x="matrix(".concat(m.a,",").concat(m.b,",").concat(m.c,",").concat(m.d,",").concat(m.e,",").concat(m.f,")");Rt(Yt,"webkitTransform",x),Rt(Yt,"mozTransform",x),Rt(Yt,"msTransform",x),Rt(Yt,"transform",x),zs=g,Us=w,qr=C}l.cancelable&&l.preventDefault()}},_appendGhost:function(){if(!Yt){var l=this.options.fallbackOnBody?document.body:Ie,p=Ye(ht,!0,Ca,!0,l),v=this.options;if(Ca){for(cr=l;Rt(cr,"position")==="static"&&Rt(cr,"transform")==="none"&&cr!==document;)cr=cr.parentNode;cr!==document.body&&cr!==document.documentElement?(cr===document&&(cr=nn()),p.top+=cr.scrollTop,p.left+=cr.scrollLeft):cr=nn(),qs=Du(cr)}Yt=ht.cloneNode(!0),Ar(Yt,v.ghostClass,!1),Ar(Yt,v.fallbackClass,!0),Ar(Yt,v.dragClass,!0),Rt(Yt,"transition",""),Rt(Yt,"transform",""),Rt(Yt,"box-sizing","border-box"),Rt(Yt,"margin",0),Rt(Yt,"top",p.top),Rt(Yt,"left",p.left),Rt(Yt,"width",p.width),Rt(Yt,"height",p.height),Rt(Yt,"opacity","0.8"),Rt(Yt,"position",Ca?"absolute":"fixed"),Rt(Yt,"zIndex","100000"),Rt(Yt,"pointerEvents","none"),Ft.ghost=Yt,l.appendChild(Yt),Rt(Yt,"transform-origin",Hu/parseInt(Yt.style.width)*100+"% "+Fu/parseInt(Yt.style.height)*100+"%")}},_onDragStart:function(l,p){var v=this,k=l.dataTransfer,C=v.options;if(Or("dragStart",this,{evt:l}),Ft.eventCanceled){this._onDrop();return}Or("setupClone",this),Ft.eventCanceled||(De=Mu(ht),De.removeAttribute("id"),De.draggable=!1,De.style["will-change"]="",this._hideClone(),Ar(De,this.options.chosenClass,!1),Ft.clone=De),v.cloneId=Pa(function(){Or("clone",v),!Ft.eventCanceled&&(v.options.removeCloneOnHide||Ie.insertBefore(De,ht),v._hideClone(),wr({sortable:v,name:"clone"}))}),!p&&Ar(ht,C.dragClass,!0),p?(_a=!0,v._loopId=setInterval(v._emulateDragOver,50)):(he(document,"mouseup",v._onDrop),he(document,"touchend",v._onDrop),he(document,"touchcancel",v._onDrop),k&&(k.effectAllowed="move",C.setData&&C.setData.call(v,k,ht)),be(document,"drop",v),Rt(ht,"transform","translateZ(0)")),Bi=!0,v._dragStartId=Pa(v._dragStarted.bind(v,p,l)),be(document,"selectstart",v),zo=!0,Mo&&Rt(document.body,"user-select","none")},_onDragOver:function(l){var p=this.el,v=l.target,k,C,m,O=this.options,r=O.group,b=Ft.active,g=wa===r,w=O.sort,x=ir||b,j,E=this,S=!1;if(Gs)return;function T(mt,ut){Or(mt,E,en({evt:l,isOwner:g,axis:j?"vertical":"horizontal",revert:m,dragRect:k,targetRect:C,canSort:w,fromSortable:x,target:v,completed:R,onMove:function(At,Vt){return Sa(Ie,p,ht,k,At,Ye(At),l,Vt)},changed:I},ut))}function A(){T("dragOverAnimationCapture"),E.captureAnimationState(),E!==x&&x.captureAnimationState()}function R(mt){return T("dragOverCompleted",{insertion:mt}),mt&&(g?b._hideClone():b._showClone(E),E!==x&&(Ar(ht,ir?ir.options.ghostClass:b.options.ghostClass,!1),Ar(ht,O.ghostClass,!0)),ir!==E&&E!==Ft.active?ir=E:E===Ft.active&&ir&&(ir=null),x===E&&(E._ignoreWhileAnimating=v),E.animateAll(function(){T("dragOverAnimationComplete"),E._ignoreWhileAnimating=null}),E!==x&&(x.animateAll(),x._ignoreWhileAnimating=null)),(v===ht&&!ht.animated||v===p&&!v.animated)&&(Di=null),!O.dragoverBubble&&!l.rootEl&&v!==document&&(ht.parentNode[Lr]._isOutsideThisEl(l.target),!mt&&si(l)),!O.dragoverBubble&&l.stopPropagation&&l.stopPropagation(),S=!0}function I(){Rr=$r(ht),Bn=$r(ht,O.draggable),wr({sortable:E,name:"change",toEl:p,newIndex:Rr,newDraggableIndex:Bn,originalEvent:l})}if(l.preventDefault!==void 0&&l.cancelable&&l.preventDefault(),v=rn(v,O.draggable,p,!0),T("dragOver"),Ft.eventCanceled)return S;if(ht.contains(l.target)||v.animated&&v.animatingX&&v.animatingY||E._ignoreWhileAnimating===v)return R(!1);if(_a=!1,b&&!O.disabled&&(g?w||(m=Ve!==Ie):ir===this||(this.lastPutMode=wa.checkPull(this,b,ht,l))&&r.checkPut(this,b,ht,l))){if(j=this._getDirection(l,v)==="vertical",k=Ye(ht),T("dragOverValid"),Ft.eventCanceled)return S;if(m)return Ve=Ie,A(),this._hideClone(),T("revert"),Ft.eventCanceled||(oi?Ie.insertBefore(ht,oi):Ie.appendChild(ht)),R(!0);var $=Hs(p,O.draggable);if(!$||Rh(l,j,this)&&!$.animated){if($===ht)return R(!1);if($&&p===l.target&&(v=$),v&&(C=Ye(v)),Sa(Ie,p,ht,k,v,C,l,!!v)!==!1)return A(),$&&$.nextSibling?p.insertBefore(ht,$.nextSibling):p.appendChild(ht),Ve=p,I(),R(!0)}else if($&&Lh(l,j,this)){var M=Li(p,0,O,!0);if(M===ht)return R(!1);if(v=M,C=Ye(v),Sa(Ie,p,ht,k,v,C,l,!1)!==!1)return A(),p.insertBefore(ht,M),Ve=p,I(),R(!0)}else if(v.parentNode===p){C=Ye(v);var B=0,q,F=ht.parentNode!==p,N=!Ch(ht.animated&&ht.toRect||k,v.animated&&v.toRect||C,j),U=j?"top":"left",H=Bu(v,"top","top")||Bu(ht,"top","top"),X=H?H.scrollTop:void 0;Di!==v&&(q=C[U],qo=!1,ka=!N&&O.invertSwap||F),B=Ih(l,v,C,j,N?1:O.swapThreshold,O.invertedSwapThreshold==null?O.swapThreshold:O.invertedSwapThreshold,ka,Di===v);var Y;if(B!==0){var Q=$r(ht);do Q-=B,Y=Ve.children[Q];while(Y&&(Rt(Y,"display")==="none"||Y===Yt))}if(B===0||Y===v)return R(!1);Di=v,Uo=B;var tt=v.nextElementSibling,it=!1;it=B===1;var st=Sa(Ie,p,ht,k,v,C,l,it);if(st!==!1)return(st===1||st===-1)&&(it=st===1),Gs=!0,setTimeout(Ah,30),A(),it&&!tt?p.appendChild(ht):v.parentNode.insertBefore(ht,it?tt:v),H&&$u(H,0,X-H.scrollTop),Ve=ht.parentNode,q!==void 0&&!ka&&(Oa=Math.abs(q-Ye(v)[U])),I(),R(!0)}if(p.contains(ht))return R(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){he(document,"mousemove",this._onTouchMove),he(document,"touchmove",this._onTouchMove),he(document,"pointermove",this._onTouchMove),he(document,"dragover",si),he(document,"mousemove",si),he(document,"touchmove",si)},_offUpEvents:function(){var l=this.el.ownerDocument;he(l,"mouseup",this._onDrop),he(l,"touchend",this._onDrop),he(l,"pointerup",this._onDrop),he(l,"touchcancel",this._onDrop),he(document,"selectstart",this)},_onDrop:function(l){var p=this.el,v=this.options;if(Rr=$r(ht),Bn=$r(ht,v.draggable),Or("drop",this,{evt:l}),Ve=ht&&ht.parentNode,Rr=$r(ht),Bn=$r(ht,v.draggable),Ft.eventCanceled){this._nulling();return}Bi=!1,ka=!1,qo=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Zs(this.cloneId),Zs(this._dragStartId),this.nativeDraggable&&(he(document,"drop",this),he(p,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Mo&&Rt(document.body,"user-select",""),Rt(ht,"transform",""),l&&(zo&&(l.cancelable&&l.preventDefault(),!v.dropBubble&&l.stopPropagation()),Yt&&Yt.parentNode&&Yt.parentNode.removeChild(Yt),(Ie===Ve||ir&&ir.lastPutMode!=="clone")&&De&&De.parentNode&&De.parentNode.removeChild(De),ht&&(this.nativeDraggable&&he(ht,"dragend",this),Ws(ht),ht.style["will-change"]="",zo&&!Bi&&Ar(ht,ir?ir.options.ghostClass:this.options.ghostClass,!1),Ar(ht,this.options.chosenClass,!1),wr({sortable:this,name:"unchoose",toEl:Ve,newIndex:null,newDraggableIndex:null,originalEvent:l}),Ie!==Ve?(Rr>=0&&(wr({rootEl:Ve,name:"add",toEl:Ve,fromEl:Ie,originalEvent:l}),wr({sortable:this,name:"remove",toEl:Ve,originalEvent:l}),wr({rootEl:Ve,name:"sort",toEl:Ve,fromEl:Ie,originalEvent:l}),wr({sortable:this,name:"sort",toEl:Ve,originalEvent:l})),ir&&ir.save()):Rr!==Ii&&Rr>=0&&(wr({sortable:this,name:"update",toEl:Ve,originalEvent:l}),wr({sortable:this,name:"sort",toEl:Ve,originalEvent:l})),Ft.active&&((Rr==null||Rr===-1)&&(Rr=Ii,Bn=Vo),wr({sortable:this,name:"end",toEl:Ve,originalEvent:l}),this.save()))),this._nulling()},_nulling:function(){Or("nulling",this),Ie=ht=Ve=Yt=oi=De=ga=In=ai=qr=zo=Rr=Bn=Ii=Vo=Di=Uo=ir=wa=Ft.dragged=Ft.ghost=Ft.clone=Ft.active=null,ja.forEach(function(l){l.checked=!0}),ja.length=zs=Us=0},handleEvent:function(l){switch(l.type){case"drop":case"dragend":this._onDrop(l);break;case"dragenter":case"dragover":ht&&(this._onDragOver(l),Th(l));break;case"selectstart":l.preventDefault();break}},toArray:function(){for(var l=[],p,v=this.el.children,k=0,C=v.length,m=this.options;k<C;k++)p=v[k],rn(p,m.draggable,this.el,!1)&&l.push(p.getAttribute(m.dataIdAttr)||Dh(p));return l},sort:function(l,p){var v={},k=this.el;this.toArray().forEach(function(C,m){var O=k.children[m];rn(O,this.options.draggable,k,!1)&&(v[C]=O)},this),p&&this.captureAnimationState(),l.forEach(function(C){v[C]&&(k.removeChild(v[C]),k.appendChild(v[C]))}),p&&this.animateAll()},save:function(){var l=this.options.store;l&&l.set&&l.set(this)},closest:function(l,p){return rn(l,p||this.options.draggable,this.el,!1)},option:function(l,p){var v=this.options;if(p===void 0)return v[l];var k=Fo.modifyOption(this,l,p);typeof k<"u"?v[l]=k:v[l]=p,l==="group"&&qu(v)},destroy:function(){Or("destroy",this);var l=this.el;l[Lr]=null,he(l,"mousedown",this._onTapStart),he(l,"touchstart",this._onTapStart),he(l,"pointerdown",this._onTapStart),this.nativeDraggable&&(he(l,"dragover",this),he(l,"dragenter",this)),Array.prototype.forEach.call(l.querySelectorAll("[draggable]"),function(p){p.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),xa.splice(xa.indexOf(this.el),1),this.el=l=null},_hideClone:function(){if(!In){if(Or("hideClone",this),Ft.eventCanceled)return;Rt(De,"display","none"),this.options.removeCloneOnHide&&De.parentNode&&De.parentNode.removeChild(De),In=!0}},_showClone:function(l){if(l.lastPutMode!=="clone"){this._hideClone();return}if(In){if(Or("showClone",this),Ft.eventCanceled)return;ht.parentNode==Ie&&!this.options.group.revertClone?Ie.insertBefore(De,ht):oi?Ie.insertBefore(De,oi):Ie.appendChild(De),this.options.group.revertClone&&this.animate(ht,De),Rt(De,"display",""),In=!1}}};function Th(y){y.dataTransfer&&(y.dataTransfer.dropEffect="move"),y.cancelable&&y.preventDefault()}function Sa(y,l,p,v,k,C,m,O){var r,b=y[Lr],g=b.options.onMove,w;return window.CustomEvent&&!wn&&!$o?r=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(r=document.createEvent("Event"),r.initEvent("move",!0,!0)),r.to=l,r.from=y,r.dragged=p,r.draggedRect=v,r.related=k||l,r.relatedRect=C||Ye(l),r.willInsertAfter=O,r.originalEvent=m,y.dispatchEvent(r),g&&(w=g.call(b,r,m)),w}function Ws(y){y.draggable=!1}function Ah(){Gs=!1}function Lh(y,l,p){var v=Ye(Li(p.el,0,p.options,!0)),k=Iu(p.el),C=10;return l?y.clientX<k.left-C||y.clientY<v.top&&y.clientX<v.right:y.clientY<k.top-C||y.clientY<v.bottom&&y.clientX<v.left}function Rh(y,l,p){var v=Ye(Hs(p.el,p.options.draggable)),k=Iu(p.el),C=10;return l?y.clientX>k.right+C||y.clientY>v.bottom&&y.clientX>v.left:y.clientY>k.bottom+C||y.clientX>v.right&&y.clientY>v.top}function Ih(y,l,p,v,k,C,m,O){var r=v?y.clientY:y.clientX,b=v?p.height:p.width,g=v?p.top:p.left,w=v?p.bottom:p.right,x=!1;if(!m){if(O&&Oa<b*k){if(!qo&&(Uo===1?r>g+b*C/2:r<w-b*C/2)&&(qo=!0),qo)x=!0;else if(Uo===1?r<g+Oa:r>w-Oa)return-Uo}else if(r>g+b*(1-k)/2&&r<w-b*(1-k)/2)return Bh(l)}return x=x||m,x&&(r<g+b*C/2||r>w-b*C/2)?r>g+b/2?1:-1:0}function Bh(y){return $r(ht)<$r(y)?1:-1}function Dh(y){for(var l=y.tagName+y.className+y.src+y.href+y.textContent,p=l.length,v=0;p--;)v+=l.charCodeAt(p);return v.toString(36)}function Nh(y){ja.length=0;for(var l=y.getElementsByTagName("input"),p=l.length;p--;){var v=l[p];v.checked&&ja.push(v)}}function Pa(y){return setTimeout(y,0)}function Zs(y){return clearTimeout(y)}Ea&&be(document,"touchmove",function(y){(Ft.active||Bi)&&y.cancelable&&y.preventDefault()}),Ft.utils={on:be,off:he,css:Rt,find:Ru,is:function(l,p){return!!rn(l,p,l,!1)},extend:gh,throttle:Nu,closest:rn,toggleClass:Ar,clone:Mu,index:$r,nextTick:Pa,cancelNextTick:Zs,detectDirection:Uu,getChild:Li},Ft.get=function(y){return y[Lr]},Ft.mount=function(){for(var y=arguments.length,l=new Array(y),p=0;p<y;p++)l[p]=arguments[p];l[0].constructor===Array&&(l=l[0]),l.forEach(function(v){if(!v.prototype||!v.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(v));v.utils&&(Ft.utils=en(en({},Ft.utils),v.utils)),Fo.mount(v)})},Ft.create=function(y,l){return new Ft(y,l)},Ft.version=mh;var Xe=[],Go,Js,Ys=!1,Xs,Qs,Ta,Wo;function $h(){function y(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var l in this)l.charAt(0)==="_"&&typeof this[l]=="function"&&(this[l]=this[l].bind(this))}return y.prototype={dragStarted:function(p){var v=p.originalEvent;this.sortable.nativeDraggable?be(document,"dragover",this._handleAutoScroll):this.options.supportPointer?be(document,"pointermove",this._handleFallbackAutoScroll):v.touches?be(document,"touchmove",this._handleFallbackAutoScroll):be(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(p){var v=p.originalEvent;!this.options.dragOverBubble&&!v.rootEl&&this._handleAutoScroll(v)},drop:function(){this.sortable.nativeDraggable?he(document,"dragover",this._handleAutoScroll):(he(document,"pointermove",this._handleFallbackAutoScroll),he(document,"touchmove",this._handleFallbackAutoScroll),he(document,"mousemove",this._handleFallbackAutoScroll)),Zu(),Aa(),wh()},nulling:function(){Ta=Js=Go=Ys=Wo=Xs=Qs=null,Xe.length=0},_handleFallbackAutoScroll:function(p){this._handleAutoScroll(p,!0)},_handleAutoScroll:function(p,v){var k=this,C=(p.touches?p.touches[0]:p).clientX,m=(p.touches?p.touches[0]:p).clientY,O=document.elementFromPoint(C,m);if(Ta=p,v||this.options.forceAutoScrollFallback||$o||wn||Mo){Ks(p,this.options,O,v);var r=Rn(O,!0);Ys&&(!Wo||C!==Xs||m!==Qs)&&(Wo&&Zu(),Wo=setInterval(function(){var b=Rn(document.elementFromPoint(C,m),!0);b!==r&&(r=b,Aa()),Ks(p,k.options,b,v)},10),Xs=C,Qs=m)}else{if(!this.options.bubbleScroll||Rn(O,!0)===nn()){Aa();return}Ks(p,this.options,Rn(O,!1),!1)}}},vn(y,{pluginName:"scroll",initializeByDefault:!0})}function Aa(){Xe.forEach(function(y){clearInterval(y.pid)}),Xe=[]}function Zu(){clearInterval(Wo)}var Ks=Nu(function(y,l,p,v){if(l.scroll){var k=(y.touches?y.touches[0]:y).clientX,C=(y.touches?y.touches[0]:y).clientY,m=l.scrollSensitivity,O=l.scrollSpeed,r=nn(),b=!1,g;Js!==p&&(Js=p,Aa(),Go=l.scroll,g=l.scrollFn,Go===!0&&(Go=Rn(p,!0)));var w=0,x=Go;do{var j=x,E=Ye(j),S=E.top,T=E.bottom,A=E.left,R=E.right,I=E.width,$=E.height,M=void 0,B=void 0,q=j.scrollWidth,F=j.scrollHeight,N=Rt(j),U=j.scrollLeft,H=j.scrollTop;j===r?(M=I<q&&(N.overflowX==="auto"||N.overflowX==="scroll"||N.overflowX==="visible"),B=$<F&&(N.overflowY==="auto"||N.overflowY==="scroll"||N.overflowY==="visible")):(M=I<q&&(N.overflowX==="auto"||N.overflowX==="scroll"),B=$<F&&(N.overflowY==="auto"||N.overflowY==="scroll"));var X=M&&(Math.abs(R-k)<=m&&U+I<q)-(Math.abs(A-k)<=m&&!!U),Y=B&&(Math.abs(T-C)<=m&&H+$<F)-(Math.abs(S-C)<=m&&!!H);if(!Xe[w])for(var Q=0;Q<=w;Q++)Xe[Q]||(Xe[Q]={});(Xe[w].vx!=X||Xe[w].vy!=Y||Xe[w].el!==j)&&(Xe[w].el=j,Xe[w].vx=X,Xe[w].vy=Y,clearInterval(Xe[w].pid),(X!=0||Y!=0)&&(b=!0,Xe[w].pid=setInterval((function(){v&&this.layer===0&&Ft.active._onTouchMove(Ta);var tt=Xe[this.layer].vy?Xe[this.layer].vy*O:0,it=Xe[this.layer].vx?Xe[this.layer].vx*O:0;typeof g=="function"&&g.call(Ft.dragged.parentNode[Lr],it,tt,y,Ta,Xe[this.layer].el)!=="continue"||$u(Xe[this.layer].el,it,tt)}).bind({layer:w}),24))),w++}while(l.bubbleScroll&&x!==r&&(x=Rn(x,!1)));Ys=b}},30),Ju=function(l){var p=l.originalEvent,v=l.putSortable,k=l.dragEl,C=l.activeSortable,m=l.dispatchSortableEvent,O=l.hideGhostForTarget,r=l.unhideGhostForTarget;if(p){var b=v||C;O();var g=p.changedTouches&&p.changedTouches.length?p.changedTouches[0]:p,w=document.elementFromPoint(g.clientX,g.clientY);r(),b&&!b.el.contains(w)&&(m("spill"),this.onSpill({dragEl:k,putSortable:v}))}};function tl(){}tl.prototype={startIndex:null,dragStart:function(l){var p=l.oldDraggableIndex;this.startIndex=p},onSpill:function(l){var p=l.dragEl,v=l.putSortable;this.sortable.captureAnimationState(),v&&v.captureAnimationState();var k=Li(this.sortable.el,this.startIndex,this.options);k?this.sortable.el.insertBefore(p,k):this.sortable.el.appendChild(p),this.sortable.animateAll(),v&&v.animateAll()},drop:Ju},vn(tl,{pluginName:"revertOnSpill"});function el(){}el.prototype={onSpill:function(l){var p=l.dragEl,v=l.putSortable,k=v||this.sortable;k.captureAnimationState(),p.parentNode&&p.parentNode.removeChild(p),k.animateAll()},drop:Ju},vn(el,{pluginName:"removeOnSpill"}),Ft.mount(new $h),Ft.mount(el,tl);/**
|
|
41
|
+
* wms-capabilities @0.6.0
|
|
42
|
+
* @description WMS service Capabilities > JSON, based on openlayers
|
|
43
|
+
* @license BSD-2-Clause
|
|
44
|
+
* @preserve
|
|
45
|
+
*/var ie=y=>y!==void 0,Yu=(y,l,p)=>l in y?y[l]:y[l]=p;const Zo={ELEMENT:1,ATTRIBUTE:2,TEXT:3,CDATA_SECTION:4,ENTITY_REFERENCE:5,ENTITY:6,PROCESSING_INSTRUCTION:7,COMMENT:8,DOCUMENT:9,DOCUMENT_TYPE:10,DOCUMENT_FRAGMENT:11,NOTATION:12};class Mh{constructor(l){this._parser=new l}toDocument(l){return this._parser.parseFromString(l,"application/xml")}getAllTextContent(l,p){return La(l,p).join("")}}function La(y,l){return Xu(y,l,[]).join("")}function Xu(y,l,p){if(y.nodeType===Zo.CDATA_SECTION||y.nodeType===Zo.TEXT)l?p.push(String(y.nodeValue).replace(/(\r\n|\r|\n)/g,"")):p.push(y.nodeValue);else{var v;for(v=y.firstChild;v;v=v.nextSibling)Xu(v,l,p)}return p}function Hh(y,l,p,v){for(var k=Fh(l);k;k=Vh(k)){var C=k.namespaceURI||null,m=y[C];if(ie(m)){var O=m[k.localName];ie(O)&&O.call(v,k,p)}}}function Fh(y){let l=y.firstElementChild||y.firstChild;for(;l&&l.nodeType!==Zo.ELEMENT;)l=l.nextSibling;return l}function Vh(y){let l=y.nextElementSibling||y.nextSibling;for(;l&&l.nodeType!==Zo.ELEMENT;)l=l.nextSibling;return l}function or(y,l,p){return zh(y,l,p)}function zh(y,l,p){var v=ie(p)?p:{},k,C;for(k=0,C=y.length;k<C;++k)v[y[k]]=l;return v}function Qu(y,l){return function(p,v){var k=y.call(ie(l)?l:this,p,v);if(ie(k)){var C=v[v.length-1];C.push(k)}}}function rr(y,l,p,v,k){return v.push(y),Hh(l,p,v,k),v.pop()}function Pt(y,l,p){return function(v,k){let C=y.call(ie(p)?p:this,v,k);if(ie(C)){var m=k[k.length-1],O=ie(l)?l:v.localName;m[O]=C}}}function jr(y,l,p){return function(v,k){var C=y.call(ie(p)?p:this,v,k);if(ie(C)){var m=k[k.length-1],O=ie(l)?l:v.localName,r=Yu(m,O,[]);r.push(C)}}}const Uh=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function qh(y){return y.replace(Uh,"")}function li(y){const l=/^\s*(true|1)|(false|0)\s*$/.exec(y);if(l)return ie(l[1])||!1}function Ni(y){return _n(La(y,!1))}function _n(y){const l=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*$/i.exec(y);if(l)return parseFloat(l[1])}function rl(y){return Ra(La(y,!1))}function Ra(y){const l=/^\s*(\d+)\s*$/.exec(y);if(l)return parseInt(l[1],10)}function pe(y){return qh(La(y,!1))}const Gh="http://www.w3.org/1999/xlink";function nl(y){return y.getAttributeNS(Gh,"href")}function Wh(y,l){return rr({},wd,y,l)}function Ku(y){return[_n(y.getAttribute("minx")),_n(y.getAttribute("miny")),_n(y.getAttribute("maxx")),_n(y.getAttribute("maxy"))]}function Zh(y,l){const p=Ku(y),v=[_n(y.getAttribute("resx")),_n(y.getAttribute("resy"))];return{crs:y.getAttribute("CRS")||y.getAttribute("SRS"),extent:p,res:v}}function Jh(y,l){const p=Ku(y);if(!(!ie(p[0])||!ie(p[1])||!ie(p[2])||!ie(p[3])))return p}function Yh(y,l){const p=parseFloat(y.getAttribute("min")),v=parseFloat(y.getAttribute("max"));return{min:p,max:v}}function Xh(y,l){const p=rr({},_d,y,l);if(!ie(p))return;const v=p.westBoundLongitude,k=p.southBoundLatitude,C=p.eastBoundLongitude,m=p.northBoundLatitude;if(!(!ie(v)||!ie(k)||!ie(C)||!ie(m)))return[v,k,C,m]}function Qh(y,l){return rr({},fd,y,l)}function Kh(y,l){return rr({},yd,y,l)}function td(y,l){return rr({},md,y,l)}function ed(y,l){return rr({},bd,y,l)}function rd(y,l){return rr({},vd,y,l)}function nd(y,l){return rr([],gd,y,l)}function id(y,l){const p=li(y.getAttribute("queryable"));return rr({queryable:ie(p)?p:!1},rc,y,l)}function od(y,l){var p=l[l.length-1];const v=rr({},rc,y,l);if(!ie(v))return;let k=li(y.getAttribute("queryable"));ie(k)||(k=p.queryable),v.queryable=ie(k)?k:!1;let C=Ra(y.getAttribute("cascaded"));ie(C)||(C=p.cascaded),v.cascaded=C;let m=li(y.getAttribute("opaque"));ie(m)||(m=p.opaque),v.opaque=ie(m)?m:!1;let O=li(y.getAttribute("noSubsets"));ie(O)||(O=p.noSubsets),v.noSubsets=ie(O)?O:!1;let r=_n(y.getAttribute("fixedWidth"));ie(r)||(r=p.fixedWidth),v.fixedWidth=r;let b=_n(y.getAttribute("fixedHeight"));ie(b)||(b=p.fixedHeight),v.fixedHeight=b;const g=["Style","CRS","AuthorityURL"];for(let x=0,j=g.length;x<j;x++){const E=g[x],S=p[E];if(ie(S)){let T=Yu(v,E,[]);T=T.concat(S),v[E]=T}}const w=["EX_GeographicBoundingBox","BoundingBox","Dimension","Attribution","MinScaleDenominator","MaxScaleDenominator"];for(let x=0,j=w.length;x<j;x++){const E=w[x],S=v[E];if(!ie(S)){const T=p[E];v[E]=T}}return v}function ad(y,l){return{name:y.getAttribute("name"),units:y.getAttribute("units"),unitSymbol:y.getAttribute("unitSymbol"),default:y.getAttribute("default"),multipleValues:li(y.getAttribute("multipleValues")),nearestValue:li(y.getAttribute("nearestValue")),current:li(y.getAttribute("current")),values:pe(y)}}function xn(y,l){return rr({},Cd,y,l)}function sd(y,l){return rr({},xd,y,l)}function ld(y,l){return rr({},Od,y,l)}function ud(y,l){return rr({},jd,y,l)}function il(y,l){return rr({},kd,y,l)}function tc(y,l){var p=xn(y,l);if(ie(p)){const v=[Ra(y.getAttribute("width")),Ra(y.getAttribute("height"))];return p.size=v,p}}function cd(y,l){var p=xn(y,l);if(ie(p))return p.name=y.getAttribute("name"),p}function hd(y,l){var p=xn(y,l);if(ie(p))return p.type=y.getAttribute("type"),p}function dd(y,l){return rr({},Ed,y,l)}function ec(y,l){return rr([],Sd,y,l)}const ar=[null,"http://www.opengis.net/wms"],pd=or(ar,{Service:Pt(Kh),Capability:Pt(Qh)}),fd=or(ar,{Request:Pt(sd),Exception:Pt(nd),Layer:Pt(id)}),yd=or(ar,{Name:Pt(pe),Title:Pt(pe),Abstract:Pt(pe),KeywordList:Pt(ec),OnlineResource:Pt(nl),ContactInformation:Pt(td),Fees:Pt(pe),AccessConstraints:Pt(pe),LayerLimit:Pt(rl),MaxWidth:Pt(rl),MaxHeight:Pt(rl)}),md=or(ar,{ContactPersonPrimary:Pt(ed),ContactPosition:Pt(pe),ContactAddress:Pt(rd),ContactVoiceTelephone:Pt(pe),ContactFacsimileTelephone:Pt(pe),ContactElectronicMailAddress:Pt(pe)}),bd=or(ar,{ContactPerson:Pt(pe),ContactOrganization:Pt(pe)}),vd=or(ar,{AddressType:Pt(pe),Address:Pt(pe),City:Pt(pe),StateOrProvince:Pt(pe),PostCode:Pt(pe),Country:Pt(pe)}),gd=or(ar,{Format:Qu(pe)}),rc=or(ar,{Name:Pt(pe),Title:Pt(pe),Abstract:Pt(pe),KeywordList:Pt(ec),CRS:jr(pe),SRS:jr(pe),EX_GeographicBoundingBox:Pt(Xh),LatLonBoundingBox:Pt(Jh),BoundingBox:jr(Zh),Dimension:jr(ad),Attribution:Pt(Wh),AuthorityURL:jr(cd),Identifier:jr(pe),MetadataURL:jr(hd),DataURL:jr(xn),FeatureListURL:jr(xn),Style:jr(dd),MinScaleDenominator:Pt(Ni),MaxScaleDenominator:Pt(Ni),ScaleHint:Pt(Yh),Layer:jr(od)}),wd=or(ar,{Title:Pt(pe),OnlineResource:Pt(nl),LogoURL:Pt(tc)}),_d=or(ar,{westBoundLongitude:Pt(Ni),eastBoundLongitude:Pt(Ni),southBoundLatitude:Pt(Ni),northBoundLatitude:Pt(Ni)}),xd=or(ar,{GetCapabilities:Pt(il),GetMap:Pt(il),GetFeatureInfo:Pt(il)}),kd=or(ar,{Format:jr(pe),DCPType:jr(ld)}),Od=or(ar,{HTTP:Pt(ud)}),jd=or(ar,{Get:Pt(xn),Post:Pt(xn)}),Ed=or(ar,{Name:Pt(pe),Title:Pt(pe),Abstract:Pt(pe),LegendURL:jr(tc),StyleSheetURL:Pt(xn),StyleURL:Pt(xn)}),Cd=or(ar,{Format:Pt(pe),OnlineResource:Pt(nl)}),Sd=or(ar,{Keyword:Qu(pe)});class Pd{constructor(l,p){!p&&typeof window<"u"&&(p=window.DOMParser),this.version=void 0,this._parser=new Mh(p),this._data=l}data(l){return this._data=l,this}toJSON(l){return l=l||this._data,this.parse(l)}parse(l){return this.readFromDocument(this._parser.toDocument(l))}readFromDocument(l){for(let p=l.firstChild;p;p=p.nextSibling)if(p.nodeType==Zo.ELEMENT)return this.readFromNode(p);return null}readFromNode(l){return this.version=l.getAttribute("version"),rr({version:this.version},pd,l,[])||null}}const Td=(y,l,p,v)=>{let k=[],C=null;y._sortable=Ft.create(y,{handle:".drag-handle",filter:".drag-handle.disabled",swapThreshold:.5,animation:150,easing:"cubic-bezier(1, 0, 0, 1)",onStart:m=>{const O=m.item;k=Array.prototype.slice.call(O.parentNode.childNodes),k=k.filter(r=>r.nodeType!=Node.ELEMENT_NODE||!r.classList.contains("sortable-fallback"))},onMove(m){C=m.related},onEnd:m=>{const r=m.item.parentNode;for(const E of k)r.appendChild(E);if(m.oldIndex==m.newIndex)return;const b=l.getArray(),g=b.find(E=>E.get(p)===m.item.querySelector("eox-layercontrol-layer").layer.get(p)),w=b.find(E=>E.get(p)==C.dataset.layer);let x,j;for(x=0;x<b.length;x++)if(b[x]==g){l.removeAt(x);break}for(j=0;j<b.length;j++)if(b[j]===w){x>j?l.insertAt(j,g):l.insertAt(j+1,g);break}v.requestUpdate()}})};function Ad(y,l,p){y.getArray().forEach(k=>{k.get(l)||k.set(l,k.ol_uid),k.get(p)||k.set(p,`layer ${k.ol_uid}`)})}const ol=(y,l,p)=>{let v=[];const k=(C,m,O)=>{v=[...v,...C.filter(b=>b.get(m)===O)];const r=C.filter(b=>b.getLayers);return r.length>0&&r.forEach(b=>k(b.getLayers().getArray(),m,O)),v};return k(y,l,p),v},Ld=(y,l)=>{var p,v,k;if(!(!y||!l))return y.getLayers?"group":(k=(p=l.getInteractions().getArray().filter(C=>C.freehand_!==void 0).map(C=>C.source_))==null?void 0:p.ol_uid)!=null&&k.includes(y.getSource?(v=y.getSource())==null?void 0:v.ol_uid:void 0)?"draw":y.declutter_!==void 0?"vector":"raster"},nc=(y,l)=>{const p=y.get("minZoom"),v=y.get("maxZoom");return!!(l&&(p!==-1/0||v!==1/0))},Rd=(y,l,p)=>{if(!y||!l)return!1;if(!nc(y,p))return!0;const v=y.get("minZoom"),k=y.get("maxZoom"),C=l.getView().getZoom();return C>v&&C<k};function Id(y,l){const p=new URL(y).searchParams;Object.entries(l).forEach(([m,O])=>{typeof O=="object"&&!Array.isArray(O)&&O!==null?Object.keys(O).forEach(r=>{p.set(r,O[r])}):p.set(m,O)});const v=y.split("?")[0],k=p.toString();return`${v}?${k}`}function ic(y,l){var v;let p={};for(const k in y){const C=y[k].type;if(C&&C!=="object")p[k]=C==="number"?Number(l[k]):l[k];else if(typeof y[k]=="object"&&((v=y[k])!=null&&v.properties)){const m=ic(y[k].properties,l);Object.keys(m).length>0&&(p[k]=m)}}return p}function Bd(y,l){var C;if(!y.getSource().getTileUrlFunction())return null;const p=new URL(y.getSource().getTileUrlFunction()([0,0,0])),v=Object.fromEntries(p.searchParams.entries()),k=ic(((C=l.schema)==null?void 0:C.properties)||l.schema,v);return Object.keys(k).length?k:null}function Dd(y){try{return JSON.parse(oc(y)),!!y}catch{return!1}}function Nd(y,l){l.jsonInput=y.target.value,l.requestUpdate()}function oc(y){return y.replace(/(['"])?([a-zA-Z0-9_]+)(['"])?:/g,'"$2": ').replace(/,\s*}/g,"}").replace(/,\s*]/g,"]").replace(/\s*(\{|}|\[|\]|,)\s*/g,"$1").replaceAll('": //',"://")}function ac(y){const l=JSON.parse(`{"data":${oc(y.jsonInput)}}`);Array.isArray(l.data)?l.data.forEach(p=>{y.eoxMap.addOrUpdateLayer(p)}):y.eoxMap.addOrUpdateLayer(l.data),y.jsonInput=null,y.requestUpdate()}function $d(y,l){l.urlInput=y.target.value,l.requestUpdate()}function Md(y){const p=/^(?:(?:https?|ftp):\/\/|\/\/)?(?:localhost|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|(?:\w+[\w-]*\.)+\w+)(?::\d+)?(?:\/\S*)?$/.test(y),v=al(y);return!!(y&&p&&v)}function al(y){const l=/\b(?:wms|ows)\b/i,p=/{(?:z|x|y-?)}\/{(?:z|x|y-?)}\/{(?:z|x|y-?)}/i;return l.test(y)?"TileWMS":p.test(y)?"XYZ":!1}async function Hd(y){let l=new URL(y),p=l.searchParams;p.set("SERVICE","WMS"),p.set("REQUEST","GetCapabilities");let v=l.toString();const k=await fetch(v);if(k.ok){const C=await k.text();return new Pd(C).toJSON()}else throw new Error(`Error: ${k.status}`)}async function Fd(y){const l=y.urlInput;if(y.wmsCapabilities=null,y.searchLoad=!0,y.requestUpdate(),!l)return!1;if(al(l)==="XYZ")return{Name:l};try{const p=await Hd(l);y.wmsCapabilities=p}catch{}finally{y.searchLoad=!1,y.requestUpdate()}return!1}function Vd(y,l){const{Name:p}=y,v=al(l.urlInput)||"XYZ",k={type:"Tile",properties:{id:p,title:p},source:{type:v,url:l.urlInput,params:{LAYERS:p}}};l.jsonInput=JSON.stringify(k)}function zd(y,l){l.open=y||null,l.urlInput=null,l.jsonInput=null,l.wmsCapabilities=null,l.requestUpdate()}/**
|
|
41
46
|
* @license
|
|
42
47
|
* Copyright 2020 Google LLC
|
|
43
48
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
44
|
-
*/const
|
|
49
|
+
*/const sc=Ns(class extends $s{constructor(y){if(super(y),y.type!==Ln.PROPERTY&&y.type!==Ln.ATTRIBUTE&&y.type!==Ln.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!uh(y))throw Error("`live` bindings can only contain a single expression")}render(y){return y}update(y,[l]){if(l===Nr||l===we)return l;const p=y.element,v=y.name;if(y.type===Ln.PROPERTY){if(l===p[v])return Nr}else if(y.type===Ln.BOOLEAN_ATTRIBUTE){if(!!l===p.hasAttribute(v))return Nr}else if(y.type===Ln.ATTRIBUTE&&p.getAttribute(v)===l+"")return Nr;return ju(y),l}});/**
|
|
45
50
|
* @license
|
|
46
51
|
* Copyright 2017 Google LLC
|
|
47
52
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
48
|
-
*/class
|
|
53
|
+
*/class sl extends $s{constructor(l){if(super(l),this.et=we,l.type!==Ln.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(l){if(l===we||l==null)return this.vt=void 0,this.et=l;if(l===Nr)return l;if(typeof l!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(l===this.et)return this.vt;this.et=l;const p=[l];return p.raw=p,this.vt={_$litType$:this.constructor.resultType,strings:p,values:[]}}}sl.directiveName="unsafeHTML",sl.resultType=1;const Ud=Ns(sl);/**
|
|
49
54
|
* @license
|
|
50
55
|
* Copyright 2021 Google LLC
|
|
51
56
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
52
|
-
*/function*ma(w,h){if(w!==void 0){let f=0;for(const v of w)yield h(v,f++)}}var va=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function nh(w){return w&&w.__esModule&&Object.prototype.hasOwnProperty.call(w,"default")?w.default:w}var jc={exports:{}};/*! For license information please see jsoneditor.js.LICENSE.txt */(function(w,h){(function(f,v){w.exports=v()})(self,()=>(()=>{var f={9662:(m,j,r)=>{var y=r(614),b=r(6330),g=TypeError;m.exports=function(x){if(y(x))return x;throw g(b(x)+" is not a function")}},9483:(m,j,r)=>{var y=r(4411),b=r(6330),g=TypeError;m.exports=function(x){if(y(x))return x;throw g(b(x)+" is not a constructor")}},6077:(m,j,r)=>{var y=r(614),b=String,g=TypeError;m.exports=function(x){if(typeof x=="object"||y(x))return x;throw g("Can't set "+b(x)+" as a prototype")}},1223:(m,j,r)=>{var y=r(5112),b=r(30),g=r(3070).f,x=y("unscopables"),O=Array.prototype;O[x]==null&&g(O,x,{configurable:!0,value:b(null)}),m.exports=function(E){O[x][E]=!0}},1530:(m,j,r)=>{var y=r(8710).charAt;m.exports=function(b,g,x){return g+(x?y(b,g).length:1)}},5787:(m,j,r)=>{var y=r(7976),b=TypeError;m.exports=function(g,x){if(y(x,g))return g;throw b("Incorrect invocation")}},9670:(m,j,r)=>{var y=r(111),b=String,g=TypeError;m.exports=function(x){if(y(x))return x;throw g(b(x)+" is not an object")}},8533:(m,j,r)=>{var y=r(2092).forEach,b=r(9341)("forEach");m.exports=b?[].forEach:function(g){return y(this,g,arguments.length>1?arguments[1]:void 0)}},8457:(m,j,r)=>{var y=r(9974),b=r(6916),g=r(7908),x=r(3411),O=r(7659),E=r(4411),C=r(6244),T=r(6135),L=r(4121),R=r(1246),I=Array;m.exports=function($){var M=g($),B=E(this),U=arguments.length,H=U>1?arguments[1]:void 0,N=H!==void 0;N&&(H=y(H,U>2?arguments[2]:void 0));var q,F,X,Y,Q,tt,it=R(M),st=0;if(!it||this===I&&O(it))for(q=C(M),F=B?new this(q):I(q);q>st;st++)tt=N?H(M[st],st):M[st],T(F,st,tt);else for(Q=(Y=L(M,it)).next,F=B?new this:[];!(X=b(Q,Y)).done;st++)tt=N?x(Y,H,[X.value,st],!0):X.value,T(F,st,tt);return F.length=st,F}},1318:(m,j,r)=>{var y=r(5656),b=r(1400),g=r(6244),x=function(O){return function(E,C,T){var L,R=y(E),I=g(R),$=b(T,I);if(O&&C!=C){for(;I>$;)if((L=R[$++])!=L)return!0}else for(;I>$;$++)if((O||$ in R)&&R[$]===C)return O||$||0;return!O&&-1}};m.exports={includes:x(!0),indexOf:x(!1)}},2092:(m,j,r)=>{var y=r(9974),b=r(1702),g=r(8361),x=r(7908),O=r(6244),E=r(5417),C=b([].push),T=function(L){var R=L==1,I=L==2,$=L==3,M=L==4,B=L==6,U=L==7,H=L==5||B;return function(N,q,F,X){for(var Y,Q,tt=x(N),it=g(tt),st=y(q,F),mt=O(it),ct=0,Et=X||E,Tt=R?Et(N,mt):I||U?Et(N,0):void 0;mt>ct;ct++)if((H||ct in it)&&(Q=st(Y=it[ct],ct,tt),L))if(R)Tt[ct]=Q;else if(Q)switch(L){case 3:return!0;case 5:return Y;case 6:return ct;case 2:C(Tt,Y)}else switch(L){case 4:return!1;case 7:C(Tt,Y)}return B?-1:$||M?M:Tt}};m.exports={forEach:T(0),map:T(1),filter:T(2),some:T(3),every:T(4),find:T(5),findIndex:T(6),filterReject:T(7)}},1194:(m,j,r)=>{var y=r(7293),b=r(5112),g=r(7392),x=b("species");m.exports=function(O){return g>=51||!y(function(){var E=[];return(E.constructor={})[x]=function(){return{foo:1}},E[O](Boolean).foo!==1})}},9341:(m,j,r)=>{var y=r(7293);m.exports=function(b,g){var x=[][b];return!!x&&y(function(){x.call(null,g||function(){return 1},1)})}},3671:(m,j,r)=>{var y=r(9662),b=r(7908),g=r(8361),x=r(6244),O=TypeError,E=function(C){return function(T,L,R,I){y(L);var $=b(T),M=g($),B=x($),U=C?B-1:0,H=C?-1:1;if(R<2)for(;;){if(U in M){I=M[U],U+=H;break}if(U+=H,C?U<0:B<=U)throw O("Reduce of empty array with no initial value")}for(;C?U>=0:B>U;U+=H)U in M&&(I=L(I,M[U],U,$));return I}};m.exports={left:E(!1),right:E(!0)}},3658:(m,j,r)=>{var y=r(9781),b=r(3157),g=TypeError,x=Object.getOwnPropertyDescriptor,O=y&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(E){return E instanceof TypeError}}();m.exports=O?function(E,C){if(b(E)&&!x(E,"length").writable)throw g("Cannot set read only .length");return E.length=C}:function(E,C){return E.length=C}},1589:(m,j,r)=>{var y=r(1400),b=r(6244),g=r(6135),x=Array,O=Math.max;m.exports=function(E,C,T){for(var L=b(E),R=y(C,L),I=y(T===void 0?L:T,L),$=x(O(I-R,0)),M=0;R<I;R++,M++)g($,M,E[R]);return $.length=M,$}},206:(m,j,r)=>{var y=r(1702);m.exports=y([].slice)},4362:(m,j,r)=>{var y=r(1589),b=Math.floor,g=function(E,C){var T=E.length,L=b(T/2);return T<8?x(E,C):O(E,g(y(E,0,L),C),g(y(E,L),C),C)},x=function(E,C){for(var T,L,R=E.length,I=1;I<R;){for(L=I,T=E[I];L&&C(E[L-1],T)>0;)E[L]=E[--L];L!==I++&&(E[L]=T)}return E},O=function(E,C,T,L){for(var R=C.length,I=T.length,$=0,M=0;$<R||M<I;)E[$+M]=$<R&&M<I?L(C[$],T[M])<=0?C[$++]:T[M++]:$<R?C[$++]:T[M++];return E};m.exports=g},7475:(m,j,r)=>{var y=r(3157),b=r(4411),g=r(111),x=r(5112)("species"),O=Array;m.exports=function(E){var C;return y(E)&&(C=E.constructor,(b(C)&&(C===O||y(C.prototype))||g(C)&&(C=C[x])===null)&&(C=void 0)),C===void 0?O:C}},5417:(m,j,r)=>{var y=r(7475);m.exports=function(b,g){return new(y(b))(g===0?0:g)}},3411:(m,j,r)=>{var y=r(9670),b=r(9212);m.exports=function(g,x,O,E){try{return E?x(y(O)[0],O[1]):x(O)}catch(C){b(g,"throw",C)}}},7072:(m,j,r)=>{var y=r(5112)("iterator"),b=!1;try{var g=0,x={next:function(){return{done:!!g++}},return:function(){b=!0}};x[y]=function(){return this},Array.from(x,function(){throw 2})}catch{}m.exports=function(O,E){if(!E&&!b)return!1;var C=!1;try{var T={};T[y]=function(){return{next:function(){return{done:C=!0}}}},O(T)}catch{}return C}},4326:(m,j,r)=>{var y=r(1702),b=y({}.toString),g=y("".slice);m.exports=function(x){return g(b(x),8,-1)}},648:(m,j,r)=>{var y=r(1694),b=r(614),g=r(4326),x=r(5112)("toStringTag"),O=Object,E=g(function(){return arguments}())=="Arguments";m.exports=y?g:function(C){var T,L,R;return C===void 0?"Undefined":C===null?"Null":typeof(L=function(I,$){try{return I[$]}catch{}}(T=O(C),x))=="string"?L:E?g(T):(R=g(T))=="Object"&&b(T.callee)?"Arguments":R}},9920:(m,j,r)=>{var y=r(2597),b=r(3887),g=r(1236),x=r(3070);m.exports=function(O,E,C){for(var T=b(E),L=x.f,R=g.f,I=0;I<T.length;I++){var $=T[I];y(O,$)||C&&y(C,$)||L(O,$,R(E,$))}}},4964:(m,j,r)=>{var y=r(5112)("match");m.exports=function(b){var g=/./;try{"/./"[b](g)}catch{try{return g[y]=!1,"/./"[b](g)}catch{}}return!1}},8544:(m,j,r)=>{var y=r(7293);m.exports=!y(function(){function b(){}return b.prototype.constructor=null,Object.getPrototypeOf(new b)!==b.prototype})},6178:m=>{m.exports=function(j,r){return{value:j,done:r}}},8880:(m,j,r)=>{var y=r(9781),b=r(3070),g=r(9114);m.exports=y?function(x,O,E){return b.f(x,O,g(1,E))}:function(x,O,E){return x[O]=E,x}},9114:m=>{m.exports=function(j,r){return{enumerable:!(1&j),configurable:!(2&j),writable:!(4&j),value:r}}},6135:(m,j,r)=>{var y=r(4948),b=r(3070),g=r(9114);m.exports=function(x,O,E){var C=y(O);C in x?b.f(x,C,g(0,E)):x[C]=E}},5573:(m,j,r)=>{var y=r(1702),b=r(7293),g=r(6650).start,x=RangeError,O=isFinite,E=Math.abs,C=Date.prototype,T=C.toISOString,L=y(C.getTime),R=y(C.getUTCDate),I=y(C.getUTCFullYear),$=y(C.getUTCHours),M=y(C.getUTCMilliseconds),B=y(C.getUTCMinutes),U=y(C.getUTCMonth),H=y(C.getUTCSeconds);m.exports=b(function(){return T.call(new Date(-50000000000001))!="0385-07-25T07:06:39.999Z"})||!b(function(){T.call(new Date(NaN))})?function(){if(!O(L(this)))throw x("Invalid time value");var N=this,q=I(N),F=M(N),X=q<0?"-":q>9999?"+":"";return X+g(E(q),X?6:4,0)+"-"+g(U(N)+1,2,0)+"-"+g(R(N),2,0)+"T"+g($(N),2,0)+":"+g(B(N),2,0)+":"+g(H(N),2,0)+"."+g(F,3,0)+"Z"}:T},8709:(m,j,r)=>{var y=r(9670),b=r(2140),g=TypeError;m.exports=function(x){if(y(this),x==="string"||x==="default")x="string";else if(x!=="number")throw g("Incorrect hint");return b(this,x)}},7045:(m,j,r)=>{var y=r(6339),b=r(3070);m.exports=function(g,x,O){return O.get&&y(O.get,x,{getter:!0}),O.set&&y(O.set,x,{setter:!0}),b.f(g,x,O)}},8052:(m,j,r)=>{var y=r(614),b=r(3070),g=r(6339),x=r(3072);m.exports=function(O,E,C,T){T||(T={});var L=T.enumerable,R=T.name!==void 0?T.name:E;if(y(C)&&g(C,R,T),T.global)L?O[E]=C:x(E,C);else{try{T.unsafe?O[E]&&(L=!0):delete O[E]}catch{}L?O[E]=C:b.f(O,E,{value:C,enumerable:!1,configurable:!T.nonConfigurable,writable:!T.nonWritable})}return O}},3072:(m,j,r)=>{var y=r(7854),b=Object.defineProperty;m.exports=function(g,x){try{b(y,g,{value:x,configurable:!0,writable:!0})}catch{y[g]=x}return x}},5117:(m,j,r)=>{var y=r(6330),b=TypeError;m.exports=function(g,x){if(!delete g[x])throw b("Cannot delete property "+y(x)+" of "+y(g))}},9781:(m,j,r)=>{var y=r(7293);m.exports=!y(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},4154:m=>{var j=typeof document=="object"&&document.all,r=j===void 0&&j!==void 0;m.exports={all:j,IS_HTMLDDA:r}},317:(m,j,r)=>{var y=r(7854),b=r(111),g=y.document,x=b(g)&&b(g.createElement);m.exports=function(O){return x?g.createElement(O):{}}},7207:m=>{var j=TypeError;m.exports=function(r){if(r>9007199254740991)throw j("Maximum allowed index exceeded");return r}},8324:m=>{m.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},8509:(m,j,r)=>{var y=r(317)("span").classList,b=y&&y.constructor&&y.constructor.prototype;m.exports=b===Object.prototype?void 0:b},8886:(m,j,r)=>{var y=r(8113).match(/firefox\/(\d+)/i);m.exports=!!y&&+y[1]},7871:(m,j,r)=>{var y=r(3823),b=r(5268);m.exports=!y&&!b&&typeof window=="object"&&typeof document=="object"},9363:m=>{m.exports=typeof Bun=="function"&&Bun&&typeof Bun.version=="string"},3823:m=>{m.exports=typeof Deno=="object"&&Deno&&typeof Deno.version=="object"},256:(m,j,r)=>{var y=r(8113);m.exports=/MSIE|Trident/.test(y)},1528:(m,j,r)=>{var y=r(8113);m.exports=/ipad|iphone|ipod/i.test(y)&&typeof Pebble<"u"},8334:(m,j,r)=>{var y=r(8113);m.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(y)},5268:(m,j,r)=>{var y=r(4326);m.exports=typeof process<"u"&&y(process)=="process"},1036:(m,j,r)=>{var y=r(8113);m.exports=/web0s(?!.*chrome)/i.test(y)},8113:m=>{m.exports=typeof navigator<"u"&&String(navigator.userAgent)||""},7392:(m,j,r)=>{var y,b,g=r(7854),x=r(8113),O=g.process,E=g.Deno,C=O&&O.versions||E&&E.version,T=C&&C.v8;T&&(b=(y=T.split("."))[0]>0&&y[0]<4?1:+(y[0]+y[1])),!b&&x&&(!(y=x.match(/Edge\/(\d+)/))||y[1]>=74)&&(y=x.match(/Chrome\/(\d+)/))&&(b=+y[1]),m.exports=b},8008:(m,j,r)=>{var y=r(8113).match(/AppleWebKit\/(\d+)\./);m.exports=!!y&&+y[1]},748:m=>{m.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:(m,j,r)=>{var y=r(7854),b=r(1236).f,g=r(8880),x=r(8052),O=r(3072),E=r(9920),C=r(4705);m.exports=function(T,L){var R,I,$,M,B,U=T.target,H=T.global,N=T.stat;if(R=H?y:N?y[U]||O(U,{}):(y[U]||{}).prototype)for(I in L){if(M=L[I],$=T.dontCallGetSet?(B=b(R,I))&&B.value:R[I],!C(H?I:U+(N?".":"#")+I,T.forced)&&$!==void 0){if(typeof M==typeof $)continue;E(M,$)}(T.sham||$&&$.sham)&&g(M,"sham",!0),x(R,I,M,T)}}},7293:m=>{m.exports=function(j){try{return!!j()}catch{return!0}}},7007:(m,j,r)=>{r(4916);var y=r(1470),b=r(8052),g=r(2261),x=r(7293),O=r(5112),E=r(8880),C=O("species"),T=RegExp.prototype;m.exports=function(L,R,I,$){var M=O(L),B=!x(function(){var q={};return q[M]=function(){return 7},""[L](q)!=7}),U=B&&!x(function(){var q=!1,F=/a/;return L==="split"&&((F={}).constructor={},F.constructor[C]=function(){return F},F.flags="",F[M]=/./[M]),F.exec=function(){return q=!0,null},F[M](""),!q});if(!B||!U||I){var H=y(/./[M]),N=R(M,""[L],function(q,F,X,Y,Q){var tt=y(q),it=F.exec;return it===g||it===T.exec?B&&!Q?{done:!0,value:H(F,X,Y)}:{done:!0,value:tt(X,F,Y)}:{done:!1}});b(String.prototype,L,N[0]),b(T,M,N[1])}$&&E(T[M],"sham",!0)}},2104:(m,j,r)=>{var y=r(4374),b=Function.prototype,g=b.apply,x=b.call;m.exports=typeof Reflect=="object"&&Reflect.apply||(y?x.bind(g):function(){return x.apply(g,arguments)})},9974:(m,j,r)=>{var y=r(1470),b=r(9662),g=r(4374),x=y(y.bind);m.exports=function(O,E){return b(O),E===void 0?O:g?x(O,E):function(){return O.apply(E,arguments)}}},4374:(m,j,r)=>{var y=r(7293);m.exports=!y(function(){var b=(function(){}).bind();return typeof b!="function"||b.hasOwnProperty("prototype")})},7065:(m,j,r)=>{var y=r(1702),b=r(9662),g=r(111),x=r(2597),O=r(206),E=r(4374),C=Function,T=y([].concat),L=y([].join),R={},I=function($,M,B){if(!x(R,M)){for(var U=[],H=0;H<M;H++)U[H]="a["+H+"]";R[M]=C("C,a","return new C("+L(U,",")+")")}return R[M]($,B)};m.exports=E?C.bind:function($){var M=b(this),B=M.prototype,U=O(arguments,1),H=function(){var N=T(U,O(arguments));return this instanceof H?I(M,N.length,N):M.apply($,N)};return g(B)&&(H.prototype=B),H}},6916:(m,j,r)=>{var y=r(4374),b=Function.prototype.call;m.exports=y?b.bind(b):function(){return b.apply(b,arguments)}},6530:(m,j,r)=>{var y=r(9781),b=r(2597),g=Function.prototype,x=y&&Object.getOwnPropertyDescriptor,O=b(g,"name"),E=O&&(function(){}).name==="something",C=O&&(!y||y&&x(g,"name").configurable);m.exports={EXISTS:O,PROPER:E,CONFIGURABLE:C}},5668:(m,j,r)=>{var y=r(1702),b=r(9662);m.exports=function(g,x,O){try{return y(b(Object.getOwnPropertyDescriptor(g,x)[O]))}catch{}}},1470:(m,j,r)=>{var y=r(4326),b=r(1702);m.exports=function(g){if(y(g)==="Function")return b(g)}},1702:(m,j,r)=>{var y=r(4374),b=Function.prototype,g=b.call,x=y&&b.bind.bind(g,g);m.exports=y?x:function(O){return function(){return g.apply(O,arguments)}}},5005:(m,j,r)=>{var y=r(7854),b=r(614),g=function(x){return b(x)?x:void 0};m.exports=function(x,O){return arguments.length<2?g(y[x]):y[x]&&y[x][O]}},1246:(m,j,r)=>{var y=r(648),b=r(8173),g=r(8554),x=r(7497),O=r(5112)("iterator");m.exports=function(E){if(!g(E))return b(E,O)||b(E,"@@iterator")||x[y(E)]}},4121:(m,j,r)=>{var y=r(6916),b=r(9662),g=r(9670),x=r(6330),O=r(1246),E=TypeError;m.exports=function(C,T){var L=arguments.length<2?O(C):T;if(b(L))return g(y(L,C));throw E(x(C)+" is not iterable")}},8044:(m,j,r)=>{var y=r(1702),b=r(3157),g=r(614),x=r(4326),O=r(1340),E=y([].push);m.exports=function(C){if(g(C))return C;if(b(C)){for(var T=C.length,L=[],R=0;R<T;R++){var I=C[R];typeof I=="string"?E(L,I):typeof I!="number"&&x(I)!="Number"&&x(I)!="String"||E(L,O(I))}var $=L.length,M=!0;return function(B,U){if(M)return M=!1,U;if(b(this))return U;for(var H=0;H<$;H++)if(L[H]===B)return U}}}},8173:(m,j,r)=>{var y=r(9662),b=r(8554);m.exports=function(g,x){var O=g[x];return b(O)?void 0:y(O)}},647:(m,j,r)=>{var y=r(1702),b=r(7908),g=Math.floor,x=y("".charAt),O=y("".replace),E=y("".slice),C=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,T=/\$([$&'`]|\d{1,2})/g;m.exports=function(L,R,I,$,M,B){var U=I+L.length,H=$.length,N=T;return M!==void 0&&(M=b(M),N=C),O(B,N,function(q,F){var X;switch(x(F,0)){case"$":return"$";case"&":return L;case"`":return E(R,0,I);case"'":return E(R,U);case"<":X=M[E(F,1,-1)];break;default:var Y=+F;if(Y===0)return q;if(Y>H){var Q=g(Y/10);return Q===0?q:Q<=H?$[Q-1]===void 0?x(F,1):$[Q-1]+x(F,1):q}X=$[Y-1]}return X===void 0?"":X})}},7854:(m,j,r)=>{var y=function(b){return b&&b.Math==Math&&b};m.exports=y(typeof globalThis=="object"&&globalThis)||y(typeof window=="object"&&window)||y(typeof self=="object"&&self)||y(typeof r.g=="object"&&r.g)||function(){return this}()||Function("return this")()},2597:(m,j,r)=>{var y=r(1702),b=r(7908),g=y({}.hasOwnProperty);m.exports=Object.hasOwn||function(x,O){return g(b(x),O)}},3501:m=>{m.exports={}},842:m=>{m.exports=function(j,r){try{arguments.length==1?console.error(j):console.error(j,r)}catch{}}},490:(m,j,r)=>{var y=r(5005);m.exports=y("document","documentElement")},4664:(m,j,r)=>{var y=r(9781),b=r(7293),g=r(317);m.exports=!y&&!b(function(){return Object.defineProperty(g("div"),"a",{get:function(){return 7}}).a!=7})},8361:(m,j,r)=>{var y=r(1702),b=r(7293),g=r(4326),x=Object,O=y("".split);m.exports=b(function(){return!x("z").propertyIsEnumerable(0)})?function(E){return g(E)=="String"?O(E,""):x(E)}:x},9587:(m,j,r)=>{var y=r(614),b=r(111),g=r(7674);m.exports=function(x,O,E){var C,T;return g&&y(C=O.constructor)&&C!==E&&b(T=C.prototype)&&T!==E.prototype&&g(x,T),x}},2788:(m,j,r)=>{var y=r(1702),b=r(614),g=r(5465),x=y(Function.toString);b(g.inspectSource)||(g.inspectSource=function(O){return x(O)}),m.exports=g.inspectSource},9909:(m,j,r)=>{var y,b,g,x=r(4811),O=r(7854),E=r(111),C=r(8880),T=r(2597),L=r(5465),R=r(6200),I=r(3501),$="Object already initialized",M=O.TypeError,B=O.WeakMap;if(x||L.state){var U=L.state||(L.state=new B);U.get=U.get,U.has=U.has,U.set=U.set,y=function(N,q){if(U.has(N))throw M($);return q.facade=N,U.set(N,q),q},b=function(N){return U.get(N)||{}},g=function(N){return U.has(N)}}else{var H=R("state");I[H]=!0,y=function(N,q){if(T(N,H))throw M($);return q.facade=N,C(N,H,q),q},b=function(N){return T(N,H)?N[H]:{}},g=function(N){return T(N,H)}}m.exports={set:y,get:b,has:g,enforce:function(N){return g(N)?b(N):y(N,{})},getterFor:function(N){return function(q){var F;if(!E(q)||(F=b(q)).type!==N)throw M("Incompatible receiver, "+N+" required");return F}}}},7659:(m,j,r)=>{var y=r(5112),b=r(7497),g=y("iterator"),x=Array.prototype;m.exports=function(O){return O!==void 0&&(b.Array===O||x[g]===O)}},3157:(m,j,r)=>{var y=r(4326);m.exports=Array.isArray||function(b){return y(b)=="Array"}},614:(m,j,r)=>{var y=r(4154),b=y.all;m.exports=y.IS_HTMLDDA?function(g){return typeof g=="function"||g===b}:function(g){return typeof g=="function"}},4411:(m,j,r)=>{var y=r(1702),b=r(7293),g=r(614),x=r(648),O=r(5005),E=r(2788),C=function(){},T=[],L=O("Reflect","construct"),R=/^\s*(?:class|function)\b/,I=y(R.exec),$=!R.exec(C),M=function(U){if(!g(U))return!1;try{return L(C,T,U),!0}catch{return!1}},B=function(U){if(!g(U))return!1;switch(x(U)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return $||!!I(R,E(U))}catch{return!0}};B.sham=!0,m.exports=!L||b(function(){var U;return M(M.call)||!M(Object)||!M(function(){U=!0})||U})?B:M},5032:(m,j,r)=>{var y=r(2597);m.exports=function(b){return b!==void 0&&(y(b,"value")||y(b,"writable"))}},4705:(m,j,r)=>{var y=r(7293),b=r(614),g=/#|\.prototype\./,x=function(L,R){var I=E[O(L)];return I==T||I!=C&&(b(R)?y(R):!!R)},O=x.normalize=function(L){return String(L).replace(g,".").toLowerCase()},E=x.data={},C=x.NATIVE="N",T=x.POLYFILL="P";m.exports=x},8554:m=>{m.exports=function(j){return j==null}},111:(m,j,r)=>{var y=r(614),b=r(4154),g=b.all;m.exports=b.IS_HTMLDDA?function(x){return typeof x=="object"?x!==null:y(x)||x===g}:function(x){return typeof x=="object"?x!==null:y(x)}},1913:m=>{m.exports=!1},7850:(m,j,r)=>{var y=r(111),b=r(4326),g=r(5112)("match");m.exports=function(x){var O;return y(x)&&((O=x[g])!==void 0?!!O:b(x)=="RegExp")}},2190:(m,j,r)=>{var y=r(5005),b=r(614),g=r(7976),x=r(3307),O=Object;m.exports=x?function(E){return typeof E=="symbol"}:function(E){var C=y("Symbol");return b(C)&&g(C.prototype,O(E))}},408:(m,j,r)=>{var y=r(9974),b=r(6916),g=r(9670),x=r(6330),O=r(7659),E=r(6244),C=r(7976),T=r(4121),L=r(1246),R=r(9212),I=TypeError,$=function(B,U){this.stopped=B,this.result=U},M=$.prototype;m.exports=function(B,U,H){var N,q,F,X,Y,Q,tt,it=H&&H.that,st=!(!H||!H.AS_ENTRIES),mt=!(!H||!H.IS_RECORD),ct=!(!H||!H.IS_ITERATOR),Et=!(!H||!H.INTERRUPTED),Tt=y(U,it),Ht=function(wt){return N&&R(N,"normal",wt),new $(!0,wt)},lt=function(wt){return st?(g(wt),Et?Tt(wt[0],wt[1],Ht):Tt(wt[0],wt[1])):Et?Tt(wt,Ht):Tt(wt)};if(mt)N=B.iterator;else if(ct)N=B;else{if(!(q=L(B)))throw I(x(B)+" is not iterable");if(O(q)){for(F=0,X=E(B);X>F;F++)if((Y=lt(B[F]))&&C(M,Y))return Y;return new $(!1)}N=T(B,q)}for(Q=mt?B.next:N.next;!(tt=b(Q,N)).done;){try{Y=lt(tt.value)}catch(wt){R(N,"throw",wt)}if(typeof Y=="object"&&Y&&C(M,Y))return Y}return new $(!1)}},9212:(m,j,r)=>{var y=r(6916),b=r(9670),g=r(8173);m.exports=function(x,O,E){var C,T;b(x);try{if(!(C=g(x,"return"))){if(O==="throw")throw E;return E}C=y(C,x)}catch(L){T=!0,C=L}if(O==="throw")throw E;if(T)throw C;return b(C),E}},3061:(m,j,r)=>{var y=r(3383).IteratorPrototype,b=r(30),g=r(9114),x=r(8003),O=r(7497),E=function(){return this};m.exports=function(C,T,L,R){var I=T+" Iterator";return C.prototype=b(y,{next:g(+!R,L)}),x(C,I,!1,!0),O[I]=E,C}},1656:(m,j,r)=>{var y=r(2109),b=r(6916),g=r(1913),x=r(6530),O=r(614),E=r(3061),C=r(9518),T=r(7674),L=r(8003),R=r(8880),I=r(8052),$=r(5112),M=r(7497),B=r(3383),U=x.PROPER,H=x.CONFIGURABLE,N=B.IteratorPrototype,q=B.BUGGY_SAFARI_ITERATORS,F=$("iterator"),X="keys",Y="values",Q="entries",tt=function(){return this};m.exports=function(it,st,mt,ct,Et,Tt,Ht){E(mt,st,ct);var lt,wt,_t,zt=function(xt){if(xt===Et&&It)return It;if(!q&&xt in St)return St[xt];switch(xt){case X:case Y:case Q:return function(){return new mt(this,xt)}}return function(){return new mt(this)}},Xt=st+" Iterator",ce=!1,St=it.prototype,jt=St[F]||St["@@iterator"]||Et&&St[Et],It=!q&&jt||zt(Et),qt=st=="Array"&&St.entries||jt;if(qt&&(lt=C(qt.call(new it)))!==Object.prototype&<.next&&(g||C(lt)===N||(T?T(lt,N):O(lt[F])||I(lt,F,tt)),L(lt,Xt,!0,!0),g&&(M[Xt]=tt)),U&&Et==Y&&jt&&jt.name!==Y&&(!g&&H?R(St,"name",Y):(ce=!0,It=function(){return b(jt,this)})),Et)if(wt={values:zt(Y),keys:Tt?It:zt(X),entries:zt(Q)},Ht)for(_t in wt)(q||ce||!(_t in St))&&I(St,_t,wt[_t]);else y({target:st,proto:!0,forced:q||ce},wt);return g&&!Ht||St[F]===It||I(St,F,It,{name:Et}),M[st]=It,wt}},3383:(m,j,r)=>{var y,b,g,x=r(7293),O=r(614),E=r(111),C=r(30),T=r(9518),L=r(8052),R=r(5112),I=r(1913),$=R("iterator"),M=!1;[].keys&&("next"in(g=[].keys())?(b=T(T(g)))!==Object.prototype&&(y=b):M=!0),!E(y)||x(function(){var B={};return y[$].call(B)!==B})?y={}:I&&(y=C(y)),O(y[$])||L(y,$,function(){return this}),m.exports={IteratorPrototype:y,BUGGY_SAFARI_ITERATORS:M}},7497:m=>{m.exports={}},6244:(m,j,r)=>{var y=r(7466);m.exports=function(b){return y(b.length)}},6339:(m,j,r)=>{var y=r(1702),b=r(7293),g=r(614),x=r(2597),O=r(9781),E=r(6530).CONFIGURABLE,C=r(2788),T=r(9909),L=T.enforce,R=T.get,I=String,$=Object.defineProperty,M=y("".slice),B=y("".replace),U=y([].join),H=O&&!b(function(){return $(function(){},"length",{value:8}).length!==8}),N=String(String).split("String"),q=m.exports=function(F,X,Y){M(I(X),0,7)==="Symbol("&&(X="["+B(I(X),/^Symbol\(([^)]*)\)/,"$1")+"]"),Y&&Y.getter&&(X="get "+X),Y&&Y.setter&&(X="set "+X),(!x(F,"name")||E&&F.name!==X)&&(O?$(F,"name",{value:X,configurable:!0}):F.name=X),H&&Y&&x(Y,"arity")&&F.length!==Y.arity&&$(F,"length",{value:Y.arity});try{Y&&x(Y,"constructor")&&Y.constructor?O&&$(F,"prototype",{writable:!1}):F.prototype&&(F.prototype=void 0)}catch{}var Q=L(F);return x(Q,"source")||(Q.source=U(N,typeof X=="string"?X:"")),F};Function.prototype.toString=q(function(){return g(this)&&R(this).source||C(this)},"toString")},4758:m=>{var j=Math.ceil,r=Math.floor;m.exports=Math.trunc||function(y){var b=+y;return(b>0?r:j)(b)}},5948:(m,j,r)=>{var y,b,g,x,O,E=r(7854),C=r(9974),T=r(1236).f,L=r(261).set,R=r(8572),I=r(8334),$=r(1528),M=r(1036),B=r(5268),U=E.MutationObserver||E.WebKitMutationObserver,H=E.document,N=E.process,q=E.Promise,F=T(E,"queueMicrotask"),X=F&&F.value;if(!X){var Y=new R,Q=function(){var tt,it;for(B&&(tt=N.domain)&&tt.exit();it=Y.get();)try{it()}catch(st){throw Y.head&&y(),st}tt&&tt.enter()};I||B||M||!U||!H?!$&&q&&q.resolve?((x=q.resolve(void 0)).constructor=q,O=C(x.then,x),y=function(){O(Q)}):B?y=function(){N.nextTick(Q)}:(L=C(L,E),y=function(){L(Q)}):(b=!0,g=H.createTextNode(""),new U(Q).observe(g,{characterData:!0}),y=function(){g.data=b=!b}),X=function(tt){Y.head||y(),Y.add(tt)}}m.exports=X},8523:(m,j,r)=>{var y=r(9662),b=TypeError,g=function(x){var O,E;this.promise=new x(function(C,T){if(O!==void 0||E!==void 0)throw b("Bad Promise constructor");O=C,E=T}),this.resolve=y(O),this.reject=y(E)};m.exports.f=function(x){return new g(x)}},3929:(m,j,r)=>{var y=r(7850),b=TypeError;m.exports=function(g){if(y(g))throw b("The method doesn't accept regular expressions");return g}},2814:(m,j,r)=>{var y=r(7854),b=r(7293),g=r(1702),x=r(1340),O=r(3111).trim,E=r(1361),C=g("".charAt),T=y.parseFloat,L=y.Symbol,R=L&&L.iterator,I=1/T(E+"-0")!=-1/0||R&&!b(function(){T(Object(R))});m.exports=I?function($){var M=O(x($)),B=T(M);return B===0&&C(M,0)=="-"?-0:B}:T},3009:(m,j,r)=>{var y=r(7854),b=r(7293),g=r(1702),x=r(1340),O=r(3111).trim,E=r(1361),C=y.parseInt,T=y.Symbol,L=T&&T.iterator,R=/^[+-]?0x/i,I=g(R.exec),$=C(E+"08")!==8||C(E+"0x16")!==22||L&&!b(function(){C(Object(L))});m.exports=$?function(M,B){var U=O(x(M));return C(U,B>>>0||(I(R,U)?16:10))}:C},1574:(m,j,r)=>{var y=r(9781),b=r(1702),g=r(6916),x=r(7293),O=r(1956),E=r(5181),C=r(5296),T=r(7908),L=r(8361),R=Object.assign,I=Object.defineProperty,$=b([].concat);m.exports=!R||x(function(){if(y&&R({b:1},R(I({},"a",{enumerable:!0,get:function(){I(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var M={},B={},U=Symbol(),H="abcdefghijklmnopqrst";return M[U]=7,H.split("").forEach(function(N){B[N]=N}),R({},M)[U]!=7||O(R({},B)).join("")!=H})?function(M,B){for(var U=T(M),H=arguments.length,N=1,q=E.f,F=C.f;H>N;)for(var X,Y=L(arguments[N++]),Q=q?$(O(Y),q(Y)):O(Y),tt=Q.length,it=0;tt>it;)X=Q[it++],y&&!g(F,Y,X)||(U[X]=Y[X]);return U}:R},30:(m,j,r)=>{var y,b=r(9670),g=r(6048),x=r(748),O=r(3501),E=r(490),C=r(317),T=r(6200),L="prototype",R="script",I=T("IE_PROTO"),$=function(){},M=function(H){return"<"+R+">"+H+"</"+R+">"},B=function(H){H.write(M("")),H.close();var N=H.parentWindow.Object;return H=null,N},U=function(){try{y=new ActiveXObject("htmlfile")}catch{}var H,N,q;U=typeof document<"u"?document.domain&&y?B(y):(N=C("iframe"),q="java"+R+":",N.style.display="none",E.appendChild(N),N.src=String(q),(H=N.contentWindow.document).open(),H.write(M("document.F=Object")),H.close(),H.F):B(y);for(var F=x.length;F--;)delete U[L][x[F]];return U()};O[I]=!0,m.exports=Object.create||function(H,N){var q;return H!==null?($[L]=b(H),q=new $,$[L]=null,q[I]=H):q=U(),N===void 0?q:g.f(q,N)}},6048:(m,j,r)=>{var y=r(9781),b=r(3353),g=r(3070),x=r(9670),O=r(5656),E=r(1956);j.f=y&&!b?Object.defineProperties:function(C,T){x(C);for(var L,R=O(T),I=E(T),$=I.length,M=0;$>M;)g.f(C,L=I[M++],R[L]);return C}},3070:(m,j,r)=>{var y=r(9781),b=r(4664),g=r(3353),x=r(9670),O=r(4948),E=TypeError,C=Object.defineProperty,T=Object.getOwnPropertyDescriptor,L="enumerable",R="configurable",I="writable";j.f=y?g?function($,M,B){if(x($),M=O(M),x(B),typeof $=="function"&&M==="prototype"&&"value"in B&&I in B&&!B[I]){var U=T($,M);U&&U[I]&&($[M]=B.value,B={configurable:R in B?B[R]:U[R],enumerable:L in B?B[L]:U[L],writable:!1})}return C($,M,B)}:C:function($,M,B){if(x($),M=O(M),x(B),b)try{return C($,M,B)}catch{}if("get"in B||"set"in B)throw E("Accessors not supported");return"value"in B&&($[M]=B.value),$}},1236:(m,j,r)=>{var y=r(9781),b=r(6916),g=r(5296),x=r(9114),O=r(5656),E=r(4948),C=r(2597),T=r(4664),L=Object.getOwnPropertyDescriptor;j.f=y?L:function(R,I){if(R=O(R),I=E(I),T)try{return L(R,I)}catch{}if(C(R,I))return x(!b(g.f,R,I),R[I])}},1156:(m,j,r)=>{var y=r(4326),b=r(5656),g=r(8006).f,x=r(1589),O=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];m.exports.f=function(E){return O&&y(E)=="Window"?function(C){try{return g(C)}catch{return x(O)}}(E):g(b(E))}},8006:(m,j,r)=>{var y=r(6324),b=r(748).concat("length","prototype");j.f=Object.getOwnPropertyNames||function(g){return y(g,b)}},5181:(m,j)=>{j.f=Object.getOwnPropertySymbols},9518:(m,j,r)=>{var y=r(2597),b=r(614),g=r(7908),x=r(6200),O=r(8544),E=x("IE_PROTO"),C=Object,T=C.prototype;m.exports=O?C.getPrototypeOf:function(L){var R=g(L);if(y(R,E))return R[E];var I=R.constructor;return b(I)&&R instanceof I?I.prototype:R instanceof C?T:null}},7976:(m,j,r)=>{var y=r(1702);m.exports=y({}.isPrototypeOf)},6324:(m,j,r)=>{var y=r(1702),b=r(2597),g=r(5656),x=r(1318).indexOf,O=r(3501),E=y([].push);m.exports=function(C,T){var L,R=g(C),I=0,$=[];for(L in R)!b(O,L)&&b(R,L)&&E($,L);for(;T.length>I;)b(R,L=T[I++])&&(~x($,L)||E($,L));return $}},1956:(m,j,r)=>{var y=r(6324),b=r(748);m.exports=Object.keys||function(g){return y(g,b)}},5296:(m,j)=>{var r={}.propertyIsEnumerable,y=Object.getOwnPropertyDescriptor,b=y&&!r.call({1:2},1);j.f=b?function(g){var x=y(this,g);return!!x&&x.enumerable}:r},7674:(m,j,r)=>{var y=r(5668),b=r(9670),g=r(6077);m.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var x,O=!1,E={};try{(x=y(Object.prototype,"__proto__","set"))(E,[]),O=E instanceof Array}catch{}return function(C,T){return b(C),g(T),O?x(C,T):C.__proto__=T,C}}():void 0)},4699:(m,j,r)=>{var y=r(9781),b=r(1702),g=r(1956),x=r(5656),O=b(r(5296).f),E=b([].push),C=function(T){return function(L){for(var R,I=x(L),$=g(I),M=$.length,B=0,U=[];M>B;)R=$[B++],y&&!O(I,R)||E(U,T?[R,I[R]]:I[R]);return U}};m.exports={entries:C(!0),values:C(!1)}},288:(m,j,r)=>{var y=r(1694),b=r(648);m.exports=y?{}.toString:function(){return"[object "+b(this)+"]"}},2140:(m,j,r)=>{var y=r(6916),b=r(614),g=r(111),x=TypeError;m.exports=function(O,E){var C,T;if(E==="string"&&b(C=O.toString)&&!g(T=y(C,O))||b(C=O.valueOf)&&!g(T=y(C,O))||E!=="string"&&b(C=O.toString)&&!g(T=y(C,O)))return T;throw x("Can't convert object to primitive value")}},3887:(m,j,r)=>{var y=r(5005),b=r(1702),g=r(8006),x=r(5181),O=r(9670),E=b([].concat);m.exports=y("Reflect","ownKeys")||function(C){var T=g.f(O(C)),L=x.f;return L?E(T,L(C)):T}},857:(m,j,r)=>{var y=r(7854);m.exports=y},2534:m=>{m.exports=function(j){try{return{error:!1,value:j()}}catch(r){return{error:!0,value:r}}}},3702:(m,j,r)=>{var y=r(7854),b=r(2492),g=r(614),x=r(4705),O=r(2788),E=r(5112),C=r(7871),T=r(3823),L=r(1913),R=r(7392),I=b&&b.prototype,$=E("species"),M=!1,B=g(y.PromiseRejectionEvent),U=x("Promise",function(){var H=O(b),N=H!==String(b);if(!N&&R===66||L&&(!I.catch||!I.finally))return!0;if(!R||R<51||!/native code/.test(H)){var q=new b(function(X){X(1)}),F=function(X){X(function(){},function(){})};if((q.constructor={})[$]=F,!(M=q.then(function(){})instanceof F))return!0}return!N&&(C||T)&&!B});m.exports={CONSTRUCTOR:U,REJECTION_EVENT:B,SUBCLASSING:M}},2492:(m,j,r)=>{var y=r(7854);m.exports=y.Promise},9478:(m,j,r)=>{var y=r(9670),b=r(111),g=r(8523);m.exports=function(x,O){if(y(x),b(O)&&O.constructor===x)return O;var E=g.f(x);return(0,E.resolve)(O),E.promise}},612:(m,j,r)=>{var y=r(2492),b=r(7072),g=r(3702).CONSTRUCTOR;m.exports=g||!b(function(x){y.all(x).then(void 0,function(){})})},2626:(m,j,r)=>{var y=r(3070).f;m.exports=function(b,g,x){x in b||y(b,x,{configurable:!0,get:function(){return g[x]},set:function(O){g[x]=O}})}},8572:m=>{var j=function(){this.head=null,this.tail=null};j.prototype={add:function(r){var y={item:r,next:null},b=this.tail;b?b.next=y:this.head=y,this.tail=y},get:function(){var r=this.head;if(r)return(this.head=r.next)===null&&(this.tail=null),r.item}},m.exports=j},7651:(m,j,r)=>{var y=r(6916),b=r(9670),g=r(614),x=r(4326),O=r(2261),E=TypeError;m.exports=function(C,T){var L=C.exec;if(g(L)){var R=y(L,C,T);return R!==null&&b(R),R}if(x(C)==="RegExp")return y(O,C,T);throw E("RegExp#exec called on incompatible receiver")}},2261:(m,j,r)=>{var y,b,g=r(6916),x=r(1702),O=r(1340),E=r(7066),C=r(2999),T=r(2309),L=r(30),R=r(9909).get,I=r(9441),$=r(7168),M=T("native-string-replace",String.prototype.replace),B=RegExp.prototype.exec,U=B,H=x("".charAt),N=x("".indexOf),q=x("".replace),F=x("".slice),X=(b=/b*/g,g(B,y=/a/,"a"),g(B,b,"a"),y.lastIndex!==0||b.lastIndex!==0),Y=C.BROKEN_CARET,Q=/()??/.exec("")[1]!==void 0;(X||Q||Y||I||$)&&(U=function(tt){var it,st,mt,ct,Et,Tt,Ht,lt=this,wt=R(lt),_t=O(tt),zt=wt.raw;if(zt)return zt.lastIndex=lt.lastIndex,it=g(U,zt,_t),lt.lastIndex=zt.lastIndex,it;var Xt=wt.groups,ce=Y&<.sticky,St=g(E,lt),jt=lt.source,It=0,qt=_t;if(ce&&(St=q(St,"y",""),N(St,"g")===-1&&(St+="g"),qt=F(_t,lt.lastIndex),lt.lastIndex>0&&(!lt.multiline||lt.multiline&&H(_t,lt.lastIndex-1)!==`
|
|
53
|
-
`)&&(
|
|
54
|
-
`)&&
|
|
55
|
-
\v\f\r \u2028\u2029\uFEFF`},2222:(m,j,r)=>{var y=r(2109),b=r(7293),g=r(3157),x=r(111),O=r(7908),E=r(6244),C=r(7207),T=r(6135),L=r(5417),R=r(1194),I=r(5112),$=r(7392),M=I("isConcatSpreadable"),B=$>=51||!b(function(){var H=[];return H[M]=!1,H.concat()[0]!==H}),U=function(H){if(!x(H))return!1;var N=H[M];return N!==void 0?!!N:g(H)};y({target:"Array",proto:!0,arity:1,forced:!B||!R("concat")},{concat:function(H){var N,q,F,X,Y,Q=O(this),tt=L(Q,0),it=0;for(N=-1,F=arguments.length;N<F;N++)if(U(Y=N===-1?Q:arguments[N]))for(X=E(Y),C(it+X),q=0;q<X;q++,it++)q in Y&&T(tt,it,Y[q]);else C(it+1),T(tt,it++,Y);return tt.length=it,tt}})},6541:(m,j,r)=>{var y=r(2109),b=r(2092).every;y({target:"Array",proto:!0,forced:!r(9341)("every")},{every:function(g){return b(this,g,arguments.length>1?arguments[1]:void 0)}})},7327:(m,j,r)=>{var y=r(2109),b=r(2092).filter;y({target:"Array",proto:!0,forced:!r(1194)("filter")},{filter:function(g){return b(this,g,arguments.length>1?arguments[1]:void 0)}})},9826:(m,j,r)=>{var y=r(2109),b=r(2092).find,g=r(1223),x="find",O=!0;x in[]&&Array(1)[x](function(){O=!1}),y({target:"Array",proto:!0,forced:O},{find:function(E){return b(this,E,arguments.length>1?arguments[1]:void 0)}}),g(x)},9554:(m,j,r)=>{var y=r(2109),b=r(8533);y({target:"Array",proto:!0,forced:[].forEach!=b},{forEach:b})},1038:(m,j,r)=>{var y=r(2109),b=r(8457);y({target:"Array",stat:!0,forced:!r(7072)(function(g){Array.from(g)})},{from:b})},6699:(m,j,r)=>{var y=r(2109),b=r(1318).includes,g=r(7293),x=r(1223);y({target:"Array",proto:!0,forced:g(function(){return!Array(1).includes()})},{includes:function(O){return b(this,O,arguments.length>1?arguments[1]:void 0)}}),x("includes")},2772:(m,j,r)=>{var y=r(2109),b=r(1470),g=r(1318).indexOf,x=r(9341),O=b([].indexOf),E=!!O&&1/O([1],1,-0)<0;y({target:"Array",proto:!0,forced:E||!x("indexOf")},{indexOf:function(C){var T=arguments.length>1?arguments[1]:void 0;return E?O(this,C,T)||0:g(this,C,T)}})},9753:(m,j,r)=>{r(2109)({target:"Array",stat:!0},{isArray:r(3157)})},6992:(m,j,r)=>{var y=r(5656),b=r(1223),g=r(7497),x=r(9909),O=r(3070).f,E=r(1656),C=r(6178),T=r(1913),L=r(9781),R="Array Iterator",I=x.set,$=x.getterFor(R);m.exports=E(Array,"Array",function(B,U){I(this,{type:R,target:y(B),index:0,kind:U})},function(){var B=$(this),U=B.target,H=B.kind,N=B.index++;return!U||N>=U.length?(B.target=void 0,C(void 0,!0)):C(H=="keys"?N:H=="values"?U[N]:[N,U[N]],!1)},"values");var M=g.Arguments=g.Array;if(b("keys"),b("values"),b("entries"),!T&&L&&M.name!=="values")try{O(M,"name",{value:"values"})}catch{}},9600:(m,j,r)=>{var y=r(2109),b=r(1702),g=r(8361),x=r(5656),O=r(9341),E=b([].join);y({target:"Array",proto:!0,forced:g!=Object||!O("join",",")},{join:function(C){return E(x(this),C===void 0?",":C)}})},1249:(m,j,r)=>{var y=r(2109),b=r(2092).map;y({target:"Array",proto:!0,forced:!r(1194)("map")},{map:function(g){return b(this,g,arguments.length>1?arguments[1]:void 0)}})},5827:(m,j,r)=>{var y=r(2109),b=r(3671).left,g=r(9341),x=r(7392);y({target:"Array",proto:!0,forced:!r(5268)&&x>79&&x<83||!g("reduce")},{reduce:function(O){var E=arguments.length;return b(this,O,E,E>1?arguments[1]:void 0)}})},5069:(m,j,r)=>{var y=r(2109),b=r(1702),g=r(3157),x=b([].reverse),O=[1,2];y({target:"Array",proto:!0,forced:String(O)===String(O.reverse())},{reverse:function(){return g(this)&&(this.length=this.length),x(this)}})},7042:(m,j,r)=>{var y=r(2109),b=r(3157),g=r(4411),x=r(111),O=r(1400),E=r(6244),C=r(5656),T=r(6135),L=r(5112),R=r(1194),I=r(206),$=R("slice"),M=L("species"),B=Array,U=Math.max;y({target:"Array",proto:!0,forced:!$},{slice:function(H,N){var q,F,X,Y=C(this),Q=E(Y),tt=O(H,Q),it=O(N===void 0?Q:N,Q);if(b(Y)&&(q=Y.constructor,(g(q)&&(q===B||b(q.prototype))||x(q)&&(q=q[M])===null)&&(q=void 0),q===B||q===void 0))return I(Y,tt,it);for(F=new(q===void 0?B:q)(U(it-tt,0)),X=0;tt<it;tt++,X++)tt in Y&&T(F,X,Y[tt]);return F.length=X,F}})},5212:(m,j,r)=>{var y=r(2109),b=r(2092).some;y({target:"Array",proto:!0,forced:!r(9341)("some")},{some:function(g){return b(this,g,arguments.length>1?arguments[1]:void 0)}})},2707:(m,j,r)=>{var y=r(2109),b=r(1702),g=r(9662),x=r(7908),O=r(6244),E=r(5117),C=r(1340),T=r(7293),L=r(4362),R=r(9341),I=r(8886),$=r(256),M=r(7392),B=r(8008),U=[],H=b(U.sort),N=b(U.push),q=T(function(){U.sort(void 0)}),F=T(function(){U.sort(null)}),X=R("sort"),Y=!T(function(){if(M)return M<70;if(!(I&&I>3)){if($)return!0;if(B)return B<603;var Q,tt,it,st,mt="";for(Q=65;Q<76;Q++){switch(tt=String.fromCharCode(Q),Q){case 66:case 69:case 70:case 72:it=3;break;case 68:case 71:it=4;break;default:it=2}for(st=0;st<47;st++)U.push({k:tt+st,v:it})}for(U.sort(function(ct,Et){return Et.v-ct.v}),st=0;st<U.length;st++)tt=U[st].k.charAt(0),mt.charAt(mt.length-1)!==tt&&(mt+=tt);return mt!=="DGBEFHACIJK"}});y({target:"Array",proto:!0,forced:q||!F||!X||!Y},{sort:function(Q){Q!==void 0&&g(Q);var tt=x(this);if(Y)return Q===void 0?H(tt):H(tt,Q);var it,st,mt=[],ct=O(tt);for(st=0;st<ct;st++)st in tt&&N(mt,tt[st]);for(L(mt,function(Et){return function(Tt,Ht){return Ht===void 0?-1:Tt===void 0?1:Et!==void 0?+Et(Tt,Ht)||0:C(Tt)>C(Ht)?1:-1}}(Q)),it=O(mt),st=0;st<it;)tt[st]=mt[st++];for(;st<ct;)E(tt,st++);return tt}})},561:(m,j,r)=>{var y=r(2109),b=r(7908),g=r(1400),x=r(9303),O=r(6244),E=r(3658),C=r(7207),T=r(5417),L=r(6135),R=r(5117),I=r(1194)("splice"),$=Math.max,M=Math.min;y({target:"Array",proto:!0,forced:!I},{splice:function(B,U){var H,N,q,F,X,Y,Q=b(this),tt=O(Q),it=g(B,tt),st=arguments.length;for(st===0?H=N=0:st===1?(H=0,N=tt-it):(H=st-2,N=M($(x(U),0),tt-it)),C(tt+H-N),q=T(Q,N),F=0;F<N;F++)(X=it+F)in Q&&L(q,F,Q[X]);if(q.length=N,H<N){for(F=it;F<tt-N;F++)Y=F+H,(X=F+N)in Q?Q[Y]=Q[X]:R(Q,Y);for(F=tt;F>tt-N+H;F--)R(Q,F-1)}else if(H>N)for(F=tt-N;F>it;F--)Y=F+H-1,(X=F+N-1)in Q?Q[Y]=Q[X]:R(Q,Y);for(F=0;F<H;F++)Q[F+it]=arguments[F+2];return E(Q,tt-N+H),q}})},3843:(m,j,r)=>{var y=r(2109),b=r(1702),g=Date,x=b(g.prototype.getTime);y({target:"Date",stat:!0},{now:function(){return x(new g)}})},8733:(m,j,r)=>{var y=r(2109),b=r(5573);y({target:"Date",proto:!0,forced:Date.prototype.toISOString!==b},{toISOString:b})},6078:(m,j,r)=>{var y=r(2597),b=r(8052),g=r(8709),x=r(5112)("toPrimitive"),O=Date.prototype;y(O,x)||b(O,x,g)},3710:(m,j,r)=>{var y=r(1702),b=r(8052),g=Date.prototype,x="Invalid Date",O="toString",E=y(g[O]),C=y(g.getTime);String(new Date(NaN))!=x&&b(g,O,function(){var T=C(this);return T==T?E(this):x})},4812:(m,j,r)=>{var y=r(2109),b=r(7065);y({target:"Function",proto:!0,forced:Function.bind!==b},{bind:b})},8309:(m,j,r)=>{var y=r(9781),b=r(6530).EXISTS,g=r(1702),x=r(7045),O=Function.prototype,E=g(O.toString),C=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,T=g(C.exec);y&&!b&&x(O,"name",{configurable:!0,get:function(){try{return T(C,E(this))[1]}catch{return""}}})},8862:(m,j,r)=>{var y=r(2109),b=r(5005),g=r(2104),x=r(6916),O=r(1702),E=r(7293),C=r(614),T=r(2190),L=r(206),R=r(8044),I=r(6293),$=String,M=b("JSON","stringify"),B=O(/./.exec),U=O("".charAt),H=O("".charCodeAt),N=O("".replace),q=O(1 .toString),F=/[\uD800-\uDFFF]/g,X=/^[\uD800-\uDBFF]$/,Y=/^[\uDC00-\uDFFF]$/,Q=!I||E(function(){var mt=b("Symbol")();return M([mt])!="[null]"||M({a:mt})!="{}"||M(Object(mt))!="{}"}),tt=E(function(){return M("\uDF06\uD834")!=='"\\udf06\\ud834"'||M("\uDEAD")!=='"\\udead"'}),it=function(mt,ct){var Et=L(arguments),Tt=R(ct);if(C(Tt)||mt!==void 0&&!T(mt))return Et[1]=function(Ht,lt){if(C(Tt)&&(lt=x(Tt,this,$(Ht),lt)),!T(lt))return lt},g(M,null,Et)},st=function(mt,ct,Et){var Tt=U(Et,ct-1),Ht=U(Et,ct+1);return B(X,mt)&&!B(Y,Ht)||B(Y,mt)&&!B(X,Tt)?"\\u"+q(H(mt,0),16):mt};M&&y({target:"JSON",stat:!0,arity:3,forced:Q||tt},{stringify:function(mt,ct,Et){var Tt=L(arguments),Ht=g(Q?it:M,null,Tt);return tt&&typeof Ht=="string"?N(Ht,F,st):Ht}})},3706:(m,j,r)=>{var y=r(7854);r(8003)(y.JSON,"JSON",!0)},2703:(m,j,r)=>{r(8003)(Math,"Math",!0)},9653:(m,j,r)=>{var y=r(2109),b=r(1913),g=r(9781),x=r(7854),O=r(857),E=r(1702),C=r(4705),T=r(2597),L=r(9587),R=r(7976),I=r(2190),$=r(7593),M=r(7293),B=r(8006).f,U=r(1236).f,H=r(3070).f,N=r(863),q=r(3111).trim,F="Number",X=x[F],Y=O[F],Q=X.prototype,tt=x.TypeError,it=E("".slice),st=E("".charCodeAt),mt=function(wt){var _t=$(wt,"number");return typeof _t=="bigint"?_t:ct(_t)},ct=function(wt){var _t,zt,Xt,ce,St,jt,It,qt,xt=$(wt,"number");if(I(xt))throw tt("Cannot convert a Symbol value to a number");if(typeof xt=="string"&&xt.length>2){if(xt=q(xt),(_t=st(xt,0))===43||_t===45){if((zt=st(xt,2))===88||zt===120)return NaN}else if(_t===48){switch(st(xt,1)){case 66:case 98:Xt=2,ce=49;break;case 79:case 111:Xt=8,ce=55;break;default:return+xt}for(jt=(St=it(xt,2)).length,It=0;It<jt;It++)if((qt=st(St,It))<48||qt>ce)return NaN;return parseInt(St,Xt)}}return+xt},Et=C(F,!X(" 0o1")||!X("0b1")||X("+0x1")),Tt=function(wt){return R(Q,wt)&&M(function(){N(wt)})},Ht=function(wt){var _t=arguments.length<1?0:X(mt(wt));return Tt(this)?L(Object(_t),this,Ht):_t};Ht.prototype=Q,Et&&!b&&(Q.constructor=Ht),y({global:!0,constructor:!0,wrap:!0,forced:Et},{Number:Ht});var lt=function(wt,_t){for(var zt,Xt=g?B(_t):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),ce=0;Xt.length>ce;ce++)T(_t,zt=Xt[ce])&&!T(wt,zt)&&H(wt,zt,U(_t,zt))};b&&Y&<(O[F],Y),(Et||b)&<(O[F],X)},6977:(m,j,r)=>{var y=r(2109),b=r(1702),g=r(9303),x=r(863),O=r(8415),E=r(7293),C=RangeError,T=String,L=Math.floor,R=b(O),I=b("".slice),$=b(1 .toFixed),M=function(N,q,F){return q===0?F:q%2==1?M(N,q-1,F*N):M(N*N,q/2,F)},B=function(N,q,F){for(var X=-1,Y=F;++X<6;)Y+=q*N[X],N[X]=Y%1e7,Y=L(Y/1e7)},U=function(N,q){for(var F=6,X=0;--F>=0;)X+=N[F],N[F]=L(X/q),X=X%q*1e7},H=function(N){for(var q=6,F="";--q>=0;)if(F!==""||q===0||N[q]!==0){var X=T(N[q]);F=F===""?X:F+R("0",7-X.length)+X}return F};y({target:"Number",proto:!0,forced:E(function(){return $(8e-5,3)!=="0.000"||$(.9,0)!=="1"||$(1.255,2)!=="1.25"||$(0xde0b6b3a7640080,0)!=="1000000000000000128"})||!E(function(){$({})})},{toFixed:function(N){var q,F,X,Y,Q=x(this),tt=g(N),it=[0,0,0,0,0,0],st="",mt="0";if(tt<0||tt>20)throw C("Incorrect fraction digits");if(Q!=Q)return"NaN";if(Q<=-1e21||Q>=1e21)return T(Q);if(Q<0&&(st="-",Q=-Q),Q>1e-21)if(F=(q=function(ct){for(var Et=0,Tt=ct;Tt>=4096;)Et+=12,Tt/=4096;for(;Tt>=2;)Et+=1,Tt/=2;return Et}(Q*M(2,69,1))-69)<0?Q*M(2,-q,1):Q/M(2,q,1),F*=4503599627370496,(q=52-q)>0){for(B(it,0,F),X=tt;X>=7;)B(it,1e7,0),X-=7;for(B(it,M(10,X,1),0),X=q-1;X>=23;)U(it,8388608),X-=23;U(it,1<<X),B(it,1,1),U(it,2),mt=H(it)}else B(it,0,F),B(it,1<<-q,0),mt=H(it)+R("0",tt);return tt>0?st+((Y=mt.length)<=tt?"0."+R("0",tt-Y)+mt:I(mt,0,Y-tt)+"."+I(mt,Y-tt)):st+mt}})},9601:(m,j,r)=>{var y=r(2109),b=r(1574);y({target:"Object",stat:!0,arity:2,forced:Object.assign!==b},{assign:b})},8011:(m,j,r)=>{r(2109)({target:"Object",stat:!0,sham:!r(9781)},{create:r(30)})},3321:(m,j,r)=>{var y=r(2109),b=r(9781),g=r(6048).f;y({target:"Object",stat:!0,forced:Object.defineProperties!==g,sham:!b},{defineProperties:g})},9070:(m,j,r)=>{var y=r(2109),b=r(9781),g=r(3070).f;y({target:"Object",stat:!0,forced:Object.defineProperty!==g,sham:!b},{defineProperty:g})},9720:(m,j,r)=>{var y=r(2109),b=r(4699).entries;y({target:"Object",stat:!0},{entries:function(g){return b(g)}})},5003:(m,j,r)=>{var y=r(2109),b=r(7293),g=r(5656),x=r(1236).f,O=r(9781);y({target:"Object",stat:!0,forced:!O||b(function(){x(1)}),sham:!O},{getOwnPropertyDescriptor:function(E,C){return x(g(E),C)}})},9337:(m,j,r)=>{var y=r(2109),b=r(9781),g=r(3887),x=r(5656),O=r(1236),E=r(6135);y({target:"Object",stat:!0,sham:!b},{getOwnPropertyDescriptors:function(C){for(var T,L,R=x(C),I=O.f,$=g(R),M={},B=0;$.length>B;)(L=I(R,T=$[B++]))!==void 0&&E(M,T,L);return M}})},9660:(m,j,r)=>{var y=r(2109),b=r(6293),g=r(7293),x=r(5181),O=r(7908);y({target:"Object",stat:!0,forced:!b||g(function(){x.f(1)})},{getOwnPropertySymbols:function(E){var C=x.f;return C?C(O(E)):[]}})},489:(m,j,r)=>{var y=r(2109),b=r(7293),g=r(7908),x=r(9518),O=r(8544);y({target:"Object",stat:!0,forced:b(function(){x(1)}),sham:!O},{getPrototypeOf:function(E){return x(g(E))}})},7941:(m,j,r)=>{var y=r(2109),b=r(7908),g=r(1956);y({target:"Object",stat:!0,forced:r(7293)(function(){g(1)})},{keys:function(x){return g(b(x))}})},8304:(m,j,r)=>{r(2109)({target:"Object",stat:!0},{setPrototypeOf:r(7674)})},1539:(m,j,r)=>{var y=r(1694),b=r(8052),g=r(288);y||b(Object.prototype,"toString",g,{unsafe:!0})},6833:(m,j,r)=>{var y=r(2109),b=r(4699).values;y({target:"Object",stat:!0},{values:function(g){return b(g)}})},4678:(m,j,r)=>{var y=r(2109),b=r(2814);y({global:!0,forced:parseFloat!=b},{parseFloat:b})},1058:(m,j,r)=>{var y=r(2109),b=r(3009);y({global:!0,forced:parseInt!=b},{parseInt:b})},821:(m,j,r)=>{var y=r(2109),b=r(6916),g=r(9662),x=r(8523),O=r(2534),E=r(408);y({target:"Promise",stat:!0,forced:r(612)},{all:function(C){var T=this,L=x.f(T),R=L.resolve,I=L.reject,$=O(function(){var M=g(T.resolve),B=[],U=0,H=1;E(C,function(N){var q=U++,F=!1;H++,b(M,T,N).then(function(X){F||(F=!0,B[q]=X,--H||R(B))},I)}),--H||R(B)});return $.error&&I($.value),L.promise}})},4164:(m,j,r)=>{var y=r(2109),b=r(1913),g=r(3702).CONSTRUCTOR,x=r(2492),O=r(5005),E=r(614),C=r(8052),T=x&&x.prototype;if(y({target:"Promise",proto:!0,forced:g,real:!0},{catch:function(R){return this.then(void 0,R)}}),!b&&E(x)){var L=O("Promise").prototype.catch;T.catch!==L&&C(T,"catch",L,{unsafe:!0})}},3401:(m,j,r)=>{var y,b,g,x=r(2109),O=r(1913),E=r(5268),C=r(7854),T=r(6916),L=r(8052),R=r(7674),I=r(8003),$=r(6340),M=r(9662),B=r(614),U=r(111),H=r(5787),N=r(6707),q=r(261).set,F=r(5948),X=r(842),Y=r(2534),Q=r(8572),tt=r(9909),it=r(2492),st=r(3702),mt=r(8523),ct="Promise",Et=st.CONSTRUCTOR,Tt=st.REJECTION_EVENT,Ht=st.SUBCLASSING,lt=tt.getterFor(ct),wt=tt.set,_t=it&&it.prototype,zt=it,Xt=_t,ce=C.TypeError,St=C.document,jt=C.process,It=mt.f,qt=It,xt=!!(St&&St.createEvent&&C.dispatchEvent),tr="unhandledrejection",le=function(ot){var vt;return!(!U(ot)||!B(vt=ot.then))&&vt},Ie=function(ot,vt){var Mt,$t,Qt,Ue=vt.value,Ze=vt.state==1,fr=Ze?ot.ok:ot.fail,Je=ot.resolve,ar=ot.reject,xe=ot.domain;try{fr?(Ze||(vt.rejection===2&&Se(vt),vt.rejection=1),fr===!0?Mt=Ue:(xe&&xe.enter(),Mt=fr(Ue),xe&&(xe.exit(),Qt=!0)),Mt===ot.promise?ar(ce("Promise-chain cycle")):($t=le(Mt))?T($t,Mt,Je,ar):Je(Mt)):ar(Ue)}catch(En){xe&&!Qt&&xe.exit(),ar(En)}},fe=function(ot,vt){ot.notified||(ot.notified=!0,F(function(){for(var Mt,$t=ot.reactions;Mt=$t.get();)Ie(Mt,ot);ot.notified=!1,vt&&!ot.rejection&&Ce(ot)}))},er=function(ot,vt,Mt){var $t,Qt;xt?(($t=St.createEvent("Event")).promise=vt,$t.reason=Mt,$t.initEvent(ot,!1,!0),C.dispatchEvent($t)):$t={promise:vt,reason:Mt},!Tt&&(Qt=C["on"+ot])?Qt($t):ot===tr&&X("Unhandled promise rejection",Mt)},Ce=function(ot){T(q,C,function(){var vt,Mt=ot.facade,$t=ot.value;if(ir(ot)&&(vt=Y(function(){E?jt.emit("unhandledRejection",$t,Mt):er(tr,Mt,$t)}),ot.rejection=E||ir(ot)?2:1,vt.error))throw vt.value})},ir=function(ot){return ot.rejection!==1&&!ot.parent},Se=function(ot){T(q,C,function(){var vt=ot.facade;E?jt.emit("rejectionHandled",vt):er("rejectionhandled",vt,ot.value)})},qe=function(ot,vt,Mt){return function($t){ot(vt,$t,Mt)}},_e=function(ot,vt,Mt){ot.done||(ot.done=!0,Mt&&(ot=Mt),ot.value=vt,ot.state=2,fe(ot,!0))},or=function(ot,vt,Mt){if(!ot.done){ot.done=!0,Mt&&(ot=Mt);try{if(ot.facade===vt)throw ce("Promise can't be resolved itself");var $t=le(vt);$t?F(function(){var Qt={done:!1};try{T($t,vt,qe(or,Qt,ot),qe(_e,Qt,ot))}catch(Ue){_e(Qt,Ue,ot)}}):(ot.value=vt,ot.state=1,fe(ot,!1))}catch(Qt){_e({done:!1},Qt,ot)}}};if(Et&&(Xt=(zt=function(ot){H(this,Xt),M(ot),T(y,this);var vt=lt(this);try{ot(qe(or,vt),qe(_e,vt))}catch(Mt){_e(vt,Mt)}}).prototype,(y=function(ot){wt(this,{type:ct,done:!1,notified:!1,parent:!1,reactions:new Q,rejection:!1,state:0,value:void 0})}).prototype=L(Xt,"then",function(ot,vt){var Mt=lt(this),$t=It(N(this,zt));return Mt.parent=!0,$t.ok=!B(ot)||ot,$t.fail=B(vt)&&vt,$t.domain=E?jt.domain:void 0,Mt.state==0?Mt.reactions.add($t):F(function(){Ie($t,Mt)}),$t.promise}),b=function(){var ot=new y,vt=lt(ot);this.promise=ot,this.resolve=qe(or,vt),this.reject=qe(_e,vt)},mt.f=It=function(ot){return ot===zt||ot===void 0?new b(ot):qt(ot)},!O&&B(it)&&_t!==Object.prototype)){g=_t.then,Ht||L(_t,"then",function(ot,vt){var Mt=this;return new zt(function($t,Qt){T(g,Mt,$t,Qt)}).then(ot,vt)},{unsafe:!0});try{delete _t.constructor}catch{}R&&R(_t,Xt)}x({global:!0,constructor:!0,wrap:!0,forced:Et},{Promise:zt}),I(zt,ct,!1,!0),$(ct)},8674:(m,j,r)=>{r(3401),r(821),r(4164),r(6027),r(683),r(6294)},6027:(m,j,r)=>{var y=r(2109),b=r(6916),g=r(9662),x=r(8523),O=r(2534),E=r(408);y({target:"Promise",stat:!0,forced:r(612)},{race:function(C){var T=this,L=x.f(T),R=L.reject,I=O(function(){var $=g(T.resolve);E(C,function(M){b($,T,M).then(L.resolve,R)})});return I.error&&R(I.value),L.promise}})},683:(m,j,r)=>{var y=r(2109),b=r(6916),g=r(8523);y({target:"Promise",stat:!0,forced:r(3702).CONSTRUCTOR},{reject:function(x){var O=g.f(this);return b(O.reject,void 0,x),O.promise}})},6294:(m,j,r)=>{var y=r(2109),b=r(5005),g=r(1913),x=r(2492),O=r(3702).CONSTRUCTOR,E=r(9478),C=b("Promise"),T=g&&!O;y({target:"Promise",stat:!0,forced:g||O},{resolve:function(L){return E(T&&this===C?x:this,L)}})},2419:(m,j,r)=>{var y=r(2109),b=r(5005),g=r(2104),x=r(7065),O=r(9483),E=r(9670),C=r(111),T=r(30),L=r(7293),R=b("Reflect","construct"),I=Object.prototype,$=[].push,M=L(function(){function H(){}return!(R(function(){},[],H)instanceof H)}),B=!L(function(){R(function(){})}),U=M||B;y({target:"Reflect",stat:!0,forced:U,sham:U},{construct:function(H,N){O(H),E(N);var q=arguments.length<3?H:O(arguments[2]);if(B&&!M)return R(H,N,q);if(H==q){switch(N.length){case 0:return new H;case 1:return new H(N[0]);case 2:return new H(N[0],N[1]);case 3:return new H(N[0],N[1],N[2]);case 4:return new H(N[0],N[1],N[2],N[3])}var F=[null];return g($,F,N),new(g(x,H,F))}var X=q.prototype,Y=T(C(X)?X:I),Q=g(H,Y,N);return C(Q)?Q:Y}})},4819:(m,j,r)=>{var y=r(2109),b=r(6916),g=r(111),x=r(9670),O=r(5032),E=r(1236),C=r(9518);y({target:"Reflect",stat:!0},{get:function T(L,R){var I,$,M=arguments.length<3?L:arguments[2];return x(L)===M?L[R]:(I=E.f(L,R))?O(I)?I.value:I.get===void 0?void 0:b(I.get,M):g($=C(L))?T($,R,M):void 0}})},4603:(m,j,r)=>{var y=r(9781),b=r(7854),g=r(1702),x=r(4705),O=r(9587),E=r(8880),C=r(8006).f,T=r(7976),L=r(7850),R=r(1340),I=r(4706),$=r(2999),M=r(2626),B=r(8052),U=r(7293),H=r(2597),N=r(9909).enforce,q=r(6340),F=r(5112),X=r(9441),Y=r(7168),Q=F("match"),tt=b.RegExp,it=tt.prototype,st=b.SyntaxError,mt=g(it.exec),ct=g("".charAt),Et=g("".replace),Tt=g("".indexOf),Ht=g("".slice),lt=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,wt=/a/g,_t=/a/g,zt=new tt(wt)!==wt,Xt=$.MISSED_STICKY,ce=$.UNSUPPORTED_Y;if(x("RegExp",y&&(!zt||Xt||X||Y||U(function(){return _t[Q]=!1,tt(wt)!=wt||tt(_t)==_t||tt(wt,"i")!="/a/i"})))){for(var St=function(qt,xt){var tr,le,Ie,fe,er,Ce,ir=T(it,this),Se=L(qt),qe=xt===void 0,_e=[],or=qt;if(!ir&&Se&&qe&&qt.constructor===St)return qt;if((Se||T(it,qt))&&(qt=qt.source,qe&&(xt=I(or))),qt=qt===void 0?"":R(qt),xt=xt===void 0?"":R(xt),or=qt,X&&"dotAll"in wt&&(le=!!xt&&Tt(xt,"s")>-1)&&(xt=Et(xt,/s/g,"")),tr=xt,Xt&&"sticky"in wt&&(Ie=!!xt&&Tt(xt,"y")>-1)&&ce&&(xt=Et(xt,/y/g,"")),Y&&(fe=function(ot){for(var vt,Mt=ot.length,$t=0,Qt="",Ue=[],Ze={},fr=!1,Je=!1,ar=0,xe="";$t<=Mt;$t++){if((vt=ct(ot,$t))==="\\")vt+=ct(ot,++$t);else if(vt==="]")fr=!1;else if(!fr)switch(!0){case vt==="[":fr=!0;break;case vt==="(":mt(lt,Ht(ot,$t+1))&&($t+=2,Je=!0),Qt+=vt,ar++;continue;case(vt===">"&&Je):if(xe===""||H(Ze,xe))throw new st("Invalid capture group name");Ze[xe]=!0,Ue[Ue.length]=[xe,ar],Je=!1,xe="";continue}Je?xe+=vt:Qt+=vt}return[Qt,Ue]}(qt),qt=fe[0],_e=fe[1]),er=O(tt(qt,xt),ir?this:it,St),(le||Ie||_e.length)&&(Ce=N(er),le&&(Ce.dotAll=!0,Ce.raw=St(function(ot){for(var vt,Mt=ot.length,$t=0,Qt="",Ue=!1;$t<=Mt;$t++)(vt=ct(ot,$t))!=="\\"?Ue||vt!=="."?(vt==="["?Ue=!0:vt==="]"&&(Ue=!1),Qt+=vt):Qt+="[\\s\\S]":Qt+=vt+ct(ot,++$t);return Qt}(qt),tr)),Ie&&(Ce.sticky=!0),_e.length&&(Ce.groups=_e)),qt!==or)try{E(er,"source",or===""?"(?:)":or)}catch{}return er},jt=C(tt),It=0;jt.length>It;)M(St,tt,jt[It++]);it.constructor=St,St.prototype=it,B(b,"RegExp",St,{constructor:!0})}q("RegExp")},4916:(m,j,r)=>{var y=r(2109),b=r(2261);y({target:"RegExp",proto:!0,forced:/./.exec!==b},{exec:b})},9714:(m,j,r)=>{var y=r(6530).PROPER,b=r(8052),g=r(9670),x=r(1340),O=r(7293),E=r(4706),C="toString",T=RegExp.prototype[C],L=O(function(){return T.call({source:"a",flags:"b"})!="/a/b"}),R=y&&T.name!=C;(L||R)&&b(RegExp.prototype,C,function(){var I=g(this);return"/"+x(I.source)+"/"+x(E(I))},{unsafe:!0})},2023:(m,j,r)=>{var y=r(2109),b=r(1702),g=r(3929),x=r(4488),O=r(1340),E=r(4964),C=b("".indexOf);y({target:"String",proto:!0,forced:!E("includes")},{includes:function(T){return!!~C(O(x(this)),O(g(T)),arguments.length>1?arguments[1]:void 0)}})},8783:(m,j,r)=>{var y=r(8710).charAt,b=r(1340),g=r(9909),x=r(1656),O=r(6178),E="String Iterator",C=g.set,T=g.getterFor(E);x(String,"String",function(L){C(this,{type:E,string:b(L),index:0})},function(){var L,R=T(this),I=R.string,$=R.index;return $>=I.length?O(void 0,!0):(L=y(I,$),R.index+=L.length,O(L,!1))})},4723:(m,j,r)=>{var y=r(6916),b=r(7007),g=r(9670),x=r(8554),O=r(7466),E=r(1340),C=r(4488),T=r(8173),L=r(1530),R=r(7651);b("match",function(I,$,M){return[function(B){var U=C(this),H=x(B)?void 0:T(B,I);return H?y(H,B,U):new RegExp(B)[I](E(U))},function(B){var U=g(this),H=E(B),N=M($,U,H);if(N.done)return N.value;if(!U.global)return R(U,H);var q=U.unicode;U.lastIndex=0;for(var F,X=[],Y=0;(F=R(U,H))!==null;){var Q=E(F[0]);X[Y]=Q,Q===""&&(U.lastIndex=L(H,O(U.lastIndex),q)),Y++}return Y===0?null:X}]})},5306:(m,j,r)=>{var y=r(2104),b=r(6916),g=r(1702),x=r(7007),O=r(7293),E=r(9670),C=r(614),T=r(8554),L=r(9303),R=r(7466),I=r(1340),$=r(4488),M=r(1530),B=r(8173),U=r(647),H=r(7651),N=r(5112)("replace"),q=Math.max,F=Math.min,X=g([].concat),Y=g([].push),Q=g("".indexOf),tt=g("".slice),it="a".replace(/./,"$0")==="$0",st=!!/./[N]&&/./[N]("a","$0")==="";x("replace",function(mt,ct,Et){var Tt=st?"$":"$0";return[function(Ht,lt){var wt=$(this),_t=T(Ht)?void 0:B(Ht,N);return _t?b(_t,Ht,wt,lt):b(ct,I(wt),Ht,lt)},function(Ht,lt){var wt=E(this),_t=I(Ht);if(typeof lt=="string"&&Q(lt,Tt)===-1&&Q(lt,"$<")===-1){var zt=Et(ct,wt,_t,lt);if(zt.done)return zt.value}var Xt=C(lt);Xt||(lt=I(lt));var ce=wt.global;if(ce){var St=wt.unicode;wt.lastIndex=0}for(var jt=[];;){var It=H(wt,_t);if(It===null||(Y(jt,It),!ce))break;I(It[0])===""&&(wt.lastIndex=M(_t,R(wt.lastIndex),St))}for(var qt,xt="",tr=0,le=0;le<jt.length;le++){for(var Ie=I((It=jt[le])[0]),fe=q(F(L(It.index),_t.length),0),er=[],Ce=1;Ce<It.length;Ce++)Y(er,(qt=It[Ce])===void 0?qt:String(qt));var ir=It.groups;if(Xt){var Se=X([Ie],er,fe,_t);ir!==void 0&&Y(Se,ir);var qe=I(y(lt,void 0,Se))}else qe=U(Ie,_t,fe,er,ir,lt);fe>=tr&&(xt+=tt(_t,tr,fe)+qe,tr=fe+Ie.length)}return xt+tt(_t,tr)}]},!!O(function(){var mt=/./;return mt.exec=function(){var ct=[];return ct.groups={a:"7"},ct},"".replace(mt,"$<a>")!=="7"})||!it||st)},6755:(m,j,r)=>{var y,b=r(2109),g=r(1470),x=r(1236).f,O=r(7466),E=r(1340),C=r(3929),T=r(4488),L=r(4964),R=r(1913),I=g("".startsWith),$=g("".slice),M=Math.min,B=L("startsWith");b({target:"String",proto:!0,forced:!(!R&&!B&&(y=x(String.prototype,"startsWith"),y&&!y.writable)||B)},{startsWith:function(U){var H=E(T(this));C(U);var N=O(M(arguments.length>1?arguments[1]:void 0,H.length)),q=E(U);return I?I(H,q,N):$(H,N,N+q.length)===q}})},3210:(m,j,r)=>{var y=r(2109),b=r(3111).trim;y({target:"String",proto:!0,forced:r(6091)("trim")},{trim:function(){return b(this)}})},2443:(m,j,r)=>{r(6800)("asyncIterator")},4032:(m,j,r)=>{var y=r(2109),b=r(7854),g=r(6916),x=r(1702),O=r(1913),E=r(9781),C=r(6293),T=r(7293),L=r(2597),R=r(7976),I=r(9670),$=r(5656),M=r(4948),B=r(1340),U=r(9114),H=r(30),N=r(1956),q=r(8006),F=r(1156),X=r(5181),Y=r(1236),Q=r(3070),tt=r(6048),it=r(5296),st=r(8052),mt=r(7045),ct=r(2309),Et=r(6200),Tt=r(3501),Ht=r(9711),lt=r(5112),wt=r(6061),_t=r(6800),zt=r(6532),Xt=r(8003),ce=r(9909),St=r(2092).forEach,jt=Et("hidden"),It="Symbol",qt="prototype",xt=ce.set,tr=ce.getterFor(It),le=Object[qt],Ie=b.Symbol,fe=Ie&&Ie[qt],er=b.TypeError,Ce=b.QObject,ir=Y.f,Se=Q.f,qe=F.f,_e=it.f,or=x([].push),ot=ct("symbols"),vt=ct("op-symbols"),Mt=ct("wks"),$t=!Ce||!Ce[qt]||!Ce[qt].findChild,Qt=E&&T(function(){return H(Se({},"a",{get:function(){return Se(this,"a",{value:7}).a}})).a!=7})?function(Dt,Kt,Yt){var oe=ir(le,Kt);oe&&delete le[Kt],Se(Dt,Kt,Yt),oe&&Dt!==le&&Se(le,Kt,oe)}:Se,Ue=function(Dt,Kt){var Yt=ot[Dt]=H(fe);return xt(Yt,{type:It,tag:Dt,description:Kt}),E||(Yt.description=Kt),Yt},Ze=function(Dt,Kt,Yt){Dt===le&&Ze(vt,Kt,Yt),I(Dt);var oe=M(Kt);return I(Yt),L(ot,oe)?(Yt.enumerable?(L(Dt,jt)&&Dt[jt][oe]&&(Dt[jt][oe]=!1),Yt=H(Yt,{enumerable:U(0,!1)})):(L(Dt,jt)||Se(Dt,jt,U(1,{})),Dt[jt][oe]=!0),Qt(Dt,oe,Yt)):Se(Dt,oe,Yt)},fr=function(Dt,Kt){I(Dt);var Yt=$(Kt),oe=N(Yt).concat(En(Yt));return St(oe,function(Fe){E&&!g(Je,Yt,Fe)||Ze(Dt,Fe,Yt[Fe])}),Dt},Je=function(Dt){var Kt=M(Dt),Yt=g(_e,this,Kt);return!(this===le&&L(ot,Kt)&&!L(vt,Kt))&&(!(Yt||!L(this,Kt)||!L(ot,Kt)||L(this,jt)&&this[jt][Kt])||Yt)},ar=function(Dt,Kt){var Yt=$(Dt),oe=M(Kt);if(Yt!==le||!L(ot,oe)||L(vt,oe)){var Fe=ir(Yt,oe);return!Fe||!L(ot,oe)||L(Yt,jt)&&Yt[jt][oe]||(Fe.enumerable=!0),Fe}},xe=function(Dt){var Kt=qe($(Dt)),Yt=[];return St(Kt,function(oe){L(ot,oe)||L(Tt,oe)||or(Yt,oe)}),Yt},En=function(Dt){var Kt=Dt===le,Yt=qe(Kt?vt:$(Dt)),oe=[];return St(Yt,function(Fe){!L(ot,Fe)||Kt&&!L(le,Fe)||or(oe,ot[Fe])}),oe};C||(st(fe=(Ie=function(){if(R(fe,this))throw er("Symbol is not a constructor");var Dt=arguments.length&&arguments[0]!==void 0?B(arguments[0]):void 0,Kt=Ht(Dt),Yt=function(oe){this===le&&g(Yt,vt,oe),L(this,jt)&&L(this[jt],Kt)&&(this[jt][Kt]=!1),Qt(this,Kt,U(1,oe))};return E&&$t&&Qt(le,Kt,{configurable:!0,set:Yt}),Ue(Kt,Dt)})[qt],"toString",function(){return tr(this).tag}),st(Ie,"withoutSetter",function(Dt){return Ue(Ht(Dt),Dt)}),it.f=Je,Q.f=Ze,tt.f=fr,Y.f=ar,q.f=F.f=xe,X.f=En,wt.f=function(Dt){return Ue(lt(Dt),Dt)},E&&(mt(fe,"description",{configurable:!0,get:function(){return tr(this).description}}),O||st(le,"propertyIsEnumerable",Je,{unsafe:!0}))),y({global:!0,constructor:!0,wrap:!0,forced:!C,sham:!C},{Symbol:Ie}),St(N(Mt),function(Dt){_t(Dt)}),y({target:It,stat:!0,forced:!C},{useSetter:function(){$t=!0},useSimple:function(){$t=!1}}),y({target:"Object",stat:!0,forced:!C,sham:!E},{create:function(Dt,Kt){return Kt===void 0?H(Dt):fr(H(Dt),Kt)},defineProperty:Ze,defineProperties:fr,getOwnPropertyDescriptor:ar}),y({target:"Object",stat:!0,forced:!C},{getOwnPropertyNames:xe}),zt(),Xt(Ie,It),Tt[jt]=!0},1817:(m,j,r)=>{var y=r(2109),b=r(9781),g=r(7854),x=r(1702),O=r(2597),E=r(614),C=r(7976),T=r(1340),L=r(7045),R=r(9920),I=g.Symbol,$=I&&I.prototype;if(b&&E(I)&&(!("description"in $)||I().description!==void 0)){var M={},B=function(){var Y=arguments.length<1||arguments[0]===void 0?void 0:T(arguments[0]),Q=C($,this)?new I(Y):Y===void 0?I():I(Y);return Y===""&&(M[Q]=!0),Q};R(B,I),B.prototype=$,$.constructor=B;var U=String(I("test"))=="Symbol(test)",H=x($.valueOf),N=x($.toString),q=/^Symbol\((.*)\)[^)]+$/,F=x("".replace),X=x("".slice);L($,"description",{configurable:!0,get:function(){var Y=H(this);if(O(M,Y))return"";var Q=N(Y),tt=U?X(Q,7,-1):F(Q,q,"$1");return tt===""?void 0:tt}}),y({global:!0,constructor:!0,forced:!0},{Symbol:B})}},763:(m,j,r)=>{var y=r(2109),b=r(5005),g=r(2597),x=r(1340),O=r(2309),E=r(2015),C=O("string-to-symbol-registry"),T=O("symbol-to-string-registry");y({target:"Symbol",stat:!0,forced:!E},{for:function(L){var R=x(L);if(g(C,R))return C[R];var I=b("Symbol")(R);return C[R]=I,T[I]=R,I}})},2165:(m,j,r)=>{r(6800)("iterator")},2526:(m,j,r)=>{r(4032),r(763),r(6620),r(8862),r(9660)},6620:(m,j,r)=>{var y=r(2109),b=r(2597),g=r(2190),x=r(6330),O=r(2309),E=r(2015),C=O("symbol-to-string-registry");y({target:"Symbol",stat:!0,forced:!E},{keyFor:function(T){if(!g(T))throw TypeError(x(T)+" is not a symbol");if(b(C,T))return C[T]}})},6649:(m,j,r)=>{var y=r(6800),b=r(6532);y("toPrimitive"),b()},3680:(m,j,r)=>{var y=r(5005),b=r(6800),g=r(8003);b("toStringTag"),g(y("Symbol"),"Symbol")},4747:(m,j,r)=>{var y=r(7854),b=r(8324),g=r(8509),x=r(8533),O=r(8880),E=function(T){if(T&&T.forEach!==x)try{O(T,"forEach",x)}catch{T.forEach=x}};for(var C in b)b[C]&&E(y[C]&&y[C].prototype);E(g)},3948:(m,j,r)=>{var y=r(7854),b=r(8324),g=r(8509),x=r(6992),O=r(8880),E=r(5112),C=E("iterator"),T=E("toStringTag"),L=x.values,R=function($,M){if($){if($[C]!==L)try{O($,C,L)}catch{$[C]=L}if($[T]||O($,T,M),b[M]){for(var B in x)if($[B]!==x[B])try{O($,B,x[B])}catch{$[B]=x[B]}}}};for(var I in b)R(y[I]&&y[I].prototype,I);R(g,"DOMTokenList")},6815:(m,j,r)=>{var y=r(2109),b=r(7854),g=r(7152)(b.setInterval,!0);y({global:!0,bind:!0,forced:b.setInterval!==g},{setInterval:g})},8417:(m,j,r)=>{var y=r(2109),b=r(7854),g=r(7152)(b.setTimeout,!0);y({global:!0,bind:!0,forced:b.setTimeout!==g},{setTimeout:g})},2564:(m,j,r)=>{r(6815),r(8417)}},v={};function k(m){var j=v[m];if(j!==void 0)return j.exports;var r=v[m]={exports:{}};return f[m](r,r.exports,k),r.exports}k.d=(m,j)=>{for(var r in j)k.o(j,r)&&!k.o(m,r)&&Object.defineProperty(m,r,{enumerable:!0,get:j[r]})},k.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),k.o=(m,j)=>Object.prototype.hasOwnProperty.call(m,j),k.r=m=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(m,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(m,"__esModule",{value:!0})};var S={};return(()=>{k.r(S),k.d(S,{JSONEditor:()=>wn}),k(3710),k(1539),k(9714),k(5827),k(6833),k(9826),k(9554),k(4747),k(7941),k(2222),k(9601),k(6649),k(6078),k(2526),k(1817),k(9653),k(9070),k(8674),k(2165),k(6992),k(8783),k(3948),k(2443),k(3680),k(3706),k(2703),k(8011),k(489),k(8309),k(8304),k(5069),k(7042),k(9753),k(1038),k(4916),k(9720),k(5306),k(4603),k(6699);var m=["actionscript","batchfile","c","c++","cpp","coffee","csharp","css","dart","django","ejs","erlang","golang","groovy","handlebars","haskell","haxe","html","ini","jade","java","javascript","json","less","lisp","lua","makefile","matlab","mysql","objectivec","pascal","perl","pgsql","php","python","prql","r","ruby","rust","sass","scala","scss","sh","smarty","sql","sqlserver","stylus","svg","typescript","twig","vbscript","xml","yaml","zig"],j=[function(l){return l.type==="string"&&l.format==="color"&&"colorpicker"},function(l){return l.type==="string"&&["ip","ipv4","ipv6","hostname"].includes(l.format)&&"ip"},function(l){return l.type==="string"&&m.includes(l.format)&&"ace"},function(l){return l.type==="string"&&["xhtml","bbcode"].includes(l.format)&&"sceditor"},function(l){return l.type==="string"&&l.format==="markdown"&&"simplemde"},function(l){return l.type==="string"&&l.format==="jodit"&&"jodit"},function(l){return l.type==="string"&&l.format==="autocomplete"&&"autocomplete"},function(l){return l.type==="string"&&l.format==="uuid"&&"uuid"},function(l){return l.format==="info"&&"info"},function(l){return l.format==="button"&&"button"},function(l){if((l.type==="integer"||l.type==="number")&&l.format==="stepper")return"stepper"},function(l){if(l.links){for(var n=0;n<l.links.length;n++)if(l.links[n].rel&&l.links[n].rel.toLowerCase()==="describedby")return"describedBy"}},function(l){return["string","integer"].includes(l.type)&&["starrating","rating"].includes(l.format)&&"starrating"},function(l){return["string","integer"].includes(l.type)&&["date","time","datetime-local"].includes(l.format)&&"datetime"},function(l){return(l.oneOf||l.anyOf)&&"multiple"},function(l){return l.if&&"multiple"},function(l,n){if(l.items&&(l.items=n.expandSchema(l.items)),l.type==="array"&&l.items&&!Array.isArray(l.items)&&["string","number","integer"].includes(l.items.type)){if(l.format==="choices")return"arrayChoices";if(l.uniqueItems){if(l.format==="selectize")return"arraySelectize";if(l.format==="select2")return"arraySelect2";if(l.items.enum)return"multiselect"}}},function(l){if(l.enum){if(l.type==="array"||l.type==="object")return"enum";if(l.type==="number"||l.type==="integer"||l.type==="string")return l.format==="radio"?"radio":l.format==="select2"?"select2":l.format==="selectize"?"selectize":l.format==="choices"?"choices":"select"}},function(l){if(l.enumSource)return l.format==="radio"?"radio":l.format==="select2"?"select2":l.format==="selectize"?"selectize":l.format==="choices"?"choices":"select"},function(l){return l.type==="array"&&l.format==="table"&&"table"},function(l){return l.type==="string"&&l.format==="url"&&window.FileReader&&l.options&&l.options.upload===Object(l.options.upload)&&"upload"},function(l){return l.type==="string"&&l.media&&l.media.binaryEncoding==="base64"&&"base64"},function(l){return l.type==="any"&&"multiple"},function(l){if(l.type==="boolean")return l.format==="checkbox"||l.options&&l.options.checkbox?"checkbox":l.format==="select2"?"select2":l.format==="selectize"?"selectize":l.format==="choices"?"choices":"select"},function(l){return l.type==="string"&&l.format==="signature"&&"signature"},function(l){return typeof l.type=="string"&&l.type},function(l){return!l.type&&l.properties&&"object"},function(l){return typeof l.type!="string"&&"multiple"}];function r(l,n,p){return(n=function(i){var u=function(a,s){if(y(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(y(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i);return y(u)==="symbol"?u:String(u)}(n))in l?Object.defineProperty(l,n,{value:p,enumerable:!0,configurable:!0,writable:!0}):l[n]=p,l}function y(l){return y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},y(l)}function b(l){return!(l===null||y(l)!=="object"||l.nodeType||l===l.window||l.constructor&&!C(l.constructor.prototype,"isPrototypeOf"))}function g(l){return b(l)?x({},l):Array.isArray(l)?l.map(g):l}function x(l){for(var n=arguments.length,p=new Array(n>1?n-1:0),i=1;i<n;i++)p[i-1]=arguments[i];return p.forEach(function(u){u&&Object.keys(u).forEach(function(a){u[a]&&b(u[a])?(C(l,a)||(l[a]={}),x(l[a],u[a])):Array.isArray(u[a])?l[a]=g(u[a]):l[a]=u[a]})}),l}function O(l,n){var p=document.createEvent("HTMLEvents");p.initEvent(n,!0,!0),l.dispatchEvent(p)}function E(l){return l&&(l.toString()==="[object ShadowRoot]"?l:E(l.parentNode))}function C(l,n){return l&&Object.prototype.hasOwnProperty.call(l,n)}k(4812),k(2419),k(4819),k(5003),k(4723),k(2023),k(9600),k(6755),k(5212),k(1249),k(4678),k(1058);var T=/^\s*(-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,L=/^\s*(-|\+)?(\d+)\s*$/;function R(){var l=new Date().getTime();return typeof performance<"u"&&typeof performance.now=="function"&&(l+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){var p=(l+16*Math.random())%16|0;return l=Math.floor(l/16),(n==="x"?p:3&p|8).toString(16)})}function I(l){return l&&y(l)==="object"&&!Array.isArray(l)}function $(l){for(var n=arguments.length,p=new Array(n>1?n-1:0),i=1;i<n;i++)p[i-1]=arguments[i];if(!p.length)return l;var u=p.shift();if(I(l)&&I(u))for(var a in u)I(u[a])?(l[a]||Object.assign(l,r({},a,{})),$(l[a],u[a])):Object.assign(l,r({},a,u[a]));return $.apply(void 0,[l].concat(p))}function M(l,n){(n==null||n>l.length)&&(n=l.length);for(var p=0,i=new Array(n);p<n;p++)i[p]=l[p];return i}function B(l){return B=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},B(l)}function U(l,n){for(var p=0;p<n.length;p++){var i=n[p];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(l,(u=function(a,s){if(B(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(B(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),B(u)==="symbol"?u:String(u)),i)}var u}var H=function(){function l(i,u){(function(a,s){if(!(a instanceof s))throw new TypeError("Cannot call a class as a function")})(this,l),this.defaults=u,this.jsoneditor=i.jsoneditor,this.theme=this.jsoneditor.theme,this.template_engine=this.jsoneditor.template,this.iconlib=this.jsoneditor.iconlib,this.translate=this.jsoneditor.translate||this.defaults.translate,this.translateProperty=this.jsoneditor.translateProperty||this.defaults.translateProperty,this.original_schema=i.schema,this.schema=this.jsoneditor.expandSchema(this.original_schema),this.active=!0,this.options=x({},this.options||{},this.schema.options||{},i.schema.options||{},i),this.formname=this.jsoneditor.options.form_name_root||"root",i.path||this.schema.id||(this.schema.id=this.formname),this.path=i.path||this.formname,this.formname=i.formname||this.path.replace(/\.([^.]+)/g,"[$1]"),this.parent=i.parent,this.key=this.parent!==void 0?this.path.split(".").slice(this.parent.path.split(".").length).join("."):this.path,this.link_watchers=[],this.watchLoop=!1,i.container&&this.setContainer(i.container),this.registerDependencies()}var n,p;return n=l,p=[{key:"onChildEditorChange",value:function(i){this.onChange(!0)}},{key:"notify",value:function(){this.path&&this.jsoneditor.notifyWatchers(this.path)}},{key:"change",value:function(){this.parent?this.parent.onChildEditorChange(this):this.jsoneditor&&this.jsoneditor.onChange()}},{key:"onChange",value:function(i){this.notify(),this.watch_listener&&this.watch_listener(),i&&this.change()}},{key:"register",value:function(){this.jsoneditor.registerEditor(this),this.onChange()}},{key:"unregister",value:function(){this.jsoneditor&&this.jsoneditor.unregisterEditor(this)}},{key:"getNumColumns",value:function(){return 12}},{key:"isActive",value:function(){return this.active}},{key:"activate",value:function(){this.active=!0,this.optInCheckbox.checked=!0,this.enable(),this.change()}},{key:"deactivate",value:function(){this.isRequired()||(this.active=!1,this.optInCheckbox.checked=!1,this.disable(),this.change())}},{key:"registerDependencies",value:function(){var i=this;this.dependenciesFulfilled=!0;var u=this.options.dependencies;u&&Object.keys(u).forEach(function(a){var s;a.startsWith(i.jsoneditor.root.path)?s=a:((s=i.path.split("."))[s.length-1]=a,s=s.join(".")),i.jsoneditor.watch(s,function(){i.evaluateDependencies()})})}},{key:"evaluateDependencies",value:function(){var i=this,u=this.container||this.control;if(u&&this.jsoneditor!==null){var a=this.options.dependencies;if(a){var s=this.dependenciesFulfilled;this.dependenciesFulfilled=!0,Object.keys(a).forEach(function(e){var o;e.startsWith(i.jsoneditor.root.path)?o=e:((o=i.path.split("."))[o.length-1]=e,o=o.join("."));var c=a[e];i.checkDependency(o,c)}),this.dependenciesFulfilled!==s&&this.notify();var t=this.dependenciesFulfilled?"block":"none";this.options.hidden&&(t="none"),u.tagName==="TD"?Object.keys(u.childNodes).forEach(function(e){return u.childNodes[e].style.display=t}):u.style.display=t}}}},{key:"checkDependency",value:function(i,u){var a=this;if(this.path!==i&&this.jsoneditor!==null){var s=this.jsoneditor.getEditor(i),t=s?s.getValue():void 0;s&&s.dependenciesFulfilled?Array.isArray(u)?this.dependenciesFulfilled=u.some(function(e){if(JSON.stringify(t)===JSON.stringify(e))return!0}):B(u)==="object"?B(t)!=="object"?this.dependenciesFulfilled=u===t:Object.keys(u).some(function(e){return!!C(u,e)&&(C(t,e)&&u[e]===t[e]?void 0:(a.dependenciesFulfilled=!1,!0))}):typeof u=="string"||typeof u=="number"?this.dependenciesFulfilled=this.dependenciesFulfilled&&t===u:typeof u=="boolean"&&(this.dependenciesFulfilled=u?this.dependenciesFulfilled&&(t||t.length>0):this.dependenciesFulfilled&&(!t||t.length===0)):this.dependenciesFulfilled=!1}}},{key:"setContainer",value:function(i){this.container=i,this.setContainerAttributes(),this.schema.id&&this.container.setAttribute("data-schemaid",this.schema.id),this.schema.type&&typeof this.schema.type=="string"&&this.container.setAttribute("data-schematype",this.schema.type),this.container.setAttribute("data-schemapath",this.path)}},{key:"setOptInCheckbox",value:function(i){var u=this;this.optInCheckbox=document.createElement("input"),this.optInCheckbox.setAttribute("type","checkbox"),this.optInCheckbox.setAttribute("style","margin: 0 10px 0 0;"),this.optInCheckbox.classList.add("json-editor-opt-in"),this.optInCheckbox.addEventListener("click",function(){u.isActive()?u.deactivate():u.activate()});var a=this.jsoneditor.options.show_opt_in,s=this.parent.options.show_opt_in!==void 0,t=s&&this.parent.options.show_opt_in===!0,e=s&&this.parent.options.show_opt_in===!1;(t||!e&&a||!s&&a)&&this.parent&&this.parent.schema.type==="object"&&!this.isRequired()&&this.header&&(this.header.appendChild(this.optInCheckbox),this.header.insertBefore(this.optInCheckbox,this.header.firstChild))}},{key:"preBuild",value:function(){}},{key:"build",value:function(){}},{key:"postBuild",value:function(){this.setupWatchListeners(),this.addLinks(),this.register(),this.setValue(this.getDefault(),!0),this.updateHeaderText(),this.onWatchedFieldChange()}},{key:"setupWatchListeners",value:function(){var i=this;if(this.watched={},this.schema.vars&&(this.schema.watch=this.schema.vars),this.watched_values={},this.watch_listener=function(){i.refreshWatchedFieldValues()&&i.onWatchedFieldChange()},C(this.schema,"watch")){var u,a,s,t,e,o=this.container.getAttribute("data-schemapath");Object.keys(this.schema.watch).forEach(function(c){if(u=i.schema.watch[c],Array.isArray(u)){if(u.length<2)return;a=[u[0]].concat(u[1].split("."))}else a=u.split("."),i.theme.closest(i.container,'[data-schemaid="'.concat(a[0],'"]'))||a.unshift("#");if((s=a.shift())==="#"&&(s=i.jsoneditor.schema.id||i.jsoneditor.root.formname),!(t=i.theme.closest(i.container,'[data-schemaid="'.concat(s,'"]'))))throw new Error("Could not find ancestor node with id ".concat(s));e="".concat(t.getAttribute("data-schemapath"),".").concat(a.join(".")),o.startsWith(e)&&(i.watchLoop=!0),i.jsoneditor.watch(e,i.watch_listener),i.watched[c]=e})}this.schema.headerTemplate&&(this.header_template=this.jsoneditor.compileTemplate(this.schema.headerTemplate,this.template_engine))}},{key:"addLinks",value:function(){if(!this.no_link_holder&&(this.link_holder=this.theme.getLinksHolder(),this.description!==void 0?this.description.parentNode.insertBefore(this.link_holder,this.description):this.container.appendChild(this.link_holder),this.schema.links))for(var i=0;i<this.schema.links.length;i++)this.addLink(this.getLink(this.schema.links[i]))}},{key:"onMove",value:function(){}},{key:"getButton",value:function(i,u,a){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[],t="json-editor-btn-".concat(u);u=this.iconlib?this.iconlib.getIcon(u):null,i=this.translate(i,s),a=this.translate(a,s),!u&&a&&(i=a,a=null);var e=this.theme.getButton(i,u,a);return e.classList.add(t),e}},{key:"setButtonText",value:function(i,u,a,s){var t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:[];return a=this.iconlib?this.iconlib.getIcon(a):null,u=this.translate(u,t),s=this.translate(s,t),!a&&s&&(u=s,s=null),this.theme.setButtonText(i,u,a,s)}},{key:"addLink",value:function(i){this.link_holder&&this.link_holder.appendChild(i)}},{key:"getLink",value:function(i){var u,a,s=(i.mediaType||"application/javascript").split("/")[0],t=this.jsoneditor.compileTemplate(i.href,this.template_engine),e=this.jsoneditor.compileTemplate(i.rel?i.rel:i.href,this.template_engine),o=null;if(i.download&&(o=i.download),o&&o!==!0&&(o=this.jsoneditor.compileTemplate(o,this.template_engine)),s==="image"){u=this.theme.getBlockLinkHolder(),(a=document.createElement("a")).setAttribute("target","_blank");var c=document.createElement("img");this.theme.createImageLink(u,a,c),this.link_watchers.push(function(_){var P=t(_),D=e(_);a.setAttribute("href",P),a.setAttribute("title",D||P),c.setAttribute("src",P)})}else if(["audio","video"].includes(s)){u=this.theme.getBlockLinkHolder(),(a=this.theme.getBlockLink()).setAttribute("target","_blank");var d=document.createElement(s);d.setAttribute("controls","controls"),this.theme.createMediaLink(u,a,d),this.link_watchers.push(function(_){var P=t(_),D=e(_);a.setAttribute("href",P),a.textContent=D||P,d.setAttribute("src",P)})}else a=u=this.theme.getBlockLink(),u.setAttribute("target","_blank"),u.textContent=i.rel,u.style.display="none",this.link_watchers.push(function(_){var P=t(_),D=e(_);P&&(u.style.display=""),u.setAttribute("href",P),u.textContent=D||P});return o&&a&&(o===!0?a.setAttribute("download",""):this.link_watchers.push(function(_){a.setAttribute("download",o(_))})),i.class&&a.classList.add(i.class),u}},{key:"refreshWatchedFieldValues",value:function(){var i=this;if(this.watched_values){var u={},a=!1;return this.watched&&Object.keys(this.watched).forEach(function(s){var t=i.jsoneditor.getEditor(i.watched[s]),e=t?t.getValue():null;i.watched_values[s]!==e&&(a=!0),u[s]=e}),u.self=this.getValue(),this.watched_values.self!==u.self&&(a=!0),this.watched_values=u,a}}},{key:"getWatchedFieldValues",value:function(){return this.watched_values}},{key:"updateHeaderText",value:function(){if(this.header){var i=this.getHeaderText();if(this.header.children.length){for(var u=0;u<this.header.childNodes.length;u++)if(this.header.childNodes[u].nodeType===3){this.header.childNodes[u].nodeValue=this.cleanText(i);break}}else window.DOMPurify?this.header.innerHTML=window.DOMPurify.sanitize(i):this.header.textContent=this.cleanText(i)}}},{key:"getHeaderText",value:function(i){return this.header_text?this.header_text:i?this.translateProperty(this.schema.title):this.getTitle()}},{key:"getPathDepth",value:function(){return this.path.split(".").length}},{key:"cleanText",value:function(i){var u=document.createElement("div");return u.innerHTML=i,u.textContent||u.innerText}},{key:"onWatchedFieldChange",value:function(){var i;if(this.header_template){i=x(this.getWatchedFieldValues(),{key:this.key,i:this.key,i0:1*this.key,i1:1*this.key+1,title:this.getTitle()});var u=this.header_template(i);u!==this.header_text&&(this.header_text=u,this.updateHeaderText(),this.notify())}if(this.link_watchers.length){i=this.getWatchedFieldValues();for(var a=0;a<this.link_watchers.length;a++)this.link_watchers[a](i)}}},{key:"setValue",value:function(i){this.value=i}},{key:"getValue",value:function(){if(this.dependenciesFulfilled)return this.value}},{key:"refreshValue",value:function(){}},{key:"getChildEditors",value:function(){return!1}},{key:"destroy",value:function(){var i=this;this.unregister(this),this.watched&&Object.values(this.watched).forEach(function(u){return i.jsoneditor.unwatch(u,i.watch_listener)}),this.watched=null,this.watched_values=null,this.watch_listener=null,this.header_text=null,this.header_template=null,this.value=null,this.container&&this.container.parentNode&&this.container.parentNode.removeChild(this.container),this.container=null,this.jsoneditor=null,this.schema=null,this.path=null,this.key=null,this.parent=null}},{key:"isDefaultRequired",value:function(){return this.isRequired()||!!this.jsoneditor.options.use_default_values}},{key:"getDefault",value:function(){if(this.schema.default!==void 0)return this.schema.default;if(this.schema.enum!==void 0)return this.schema.enum[0];var i=this.schema.type||this.schema.oneOf;if(i&&Array.isArray(i)&&(i=i[0]),i&&B(i)==="object"&&(i=i.type),i&&Array.isArray(i)&&(i=i[0]),typeof i=="string"){if(i==="number")return this.isDefaultRequired()?0:void 0;if(i==="boolean")return!this.isDefaultRequired()&&void 0;if(i==="integer")return this.isDefaultRequired()?0:void 0;if(i==="string")return this.isDefaultRequired()?"":void 0;if(i==="null")return null;if(i==="object")return{};if(i==="array")return[]}}},{key:"getTitle",value:function(){return this.translateProperty(this.schema.title||this.key)}},{key:"enable",value:function(){this.disabled=!1}},{key:"disable",value:function(){this.disabled=!0}},{key:"isEnabled",value:function(){return!this.disabled}},{key:"isRequired",value:function(){return typeof this.schema.required=="boolean"?this.schema.required:this.parent&&this.parent.schema&&Array.isArray(this.parent.schema.required)?this.parent.schema.required.includes(this.key):!!this.jsoneditor.options.required_by_default}},{key:"getDisplayText",value:function(i){var u=[],a={};i.forEach(function(t){t.title&&(a[t.title]=a[t.title]||0,a[t.title]++),t.description&&(a[t.description]=a[t.description]||0,a[t.description]++),t.format&&(a[t.format]=a[t.format]||0,a[t.format]++),t.type&&(a[t.type]=a[t.type]||0,a[t.type]++)}),i.forEach(function(t){var e;e=typeof t=="string"?t:t.title&&a[t.title]<=1?t.title:t.format&&a[t.format]<=1?t.format:t.type&&a[t.type]<=1?t.type:t.description&&a[t.description]<=1?t.description:t.title?t.title:t.format?t.format:t.type?t.type:t.description?t.description:JSON.stringify(t).length<500?JSON.stringify(t):"type",u.push(e)});var s={};return u.forEach(function(t,e){s[t]=s[t]||0,s[t]++,a[t]>1&&(u[e]="".concat(t," ").concat(s[t]))}),u}},{key:"getValidId",value:function(i){return(i=i===void 0?"":i.toString()).replace(/\s+/g,"-")}},{key:"setInputAttributes",value:function(i){var u=this;if(this.schema.options&&this.schema.options.inputAttributes){var a=this.schema.options.inputAttributes,s=["name","type"].concat(i);Object.keys(a).forEach(function(t){s.includes(t.toLowerCase())||u.input.setAttribute(t,a[t])})}}},{key:"setContainerAttributes",value:function(){var i=this;if(this.schema.options&&this.schema.options.containerAttributes){var u=this.schema.options.containerAttributes,a=["data-schemapath","data-schematype","data-schemaid"];Object.keys(u).forEach(function(s){a.includes(s.toLowerCase())||i.container.setAttribute(s,u[s])})}}},{key:"expandCallbacks",value:function(i,u){var a=this,s=this.defaults.callbacks[i];return Object.entries(u).forEach(function(t){var e,o,c=(o=2,function(P){if(Array.isArray(P))return P}(e=t)||function(P,D){var J=P==null?null:typeof Symbol<"u"&&P[Symbol.iterator]||P["@@iterator"];if(J!=null){var nt,ut,dt,kt,Ct=[],Nt=!0,re=!1;try{if(dt=(J=J.call(P)).next,D===0){if(Object(J)!==J)return;Nt=!1}else for(;!(Nt=(nt=dt.call(J)).done)&&(Ct.push(nt.value),Ct.length!==D);Nt=!0);}catch(Pe){re=!0,ut=Pe}finally{try{if(!Nt&&J.return!=null&&(kt=J.return(),Object(kt)!==kt))return}finally{if(re)throw ut}}return Ct}}(e,o)||function(P,D){if(P){if(typeof P=="string")return M(P,D);var J=Object.prototype.toString.call(P).slice(8,-1);return J==="Object"&&P.constructor&&(J=P.constructor.name),J==="Map"||J==="Set"?Array.from(P):J==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(J)?M(P,D):void 0}}(e,o)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
56
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()),d=c[0],_=c[1];_===Object(_)?u[d]=a.expandCallbacks(i,_):typeof _=="string"&&B(s)==="object"&&typeof s[_]=="function"&&(u[d]=s[_].bind(null,a))}),u}},{key:"showValidationErrors",value:function(i){}}],p&&U(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),l}();function N(l){return N=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},N(l)}function q(l,n){for(var p=0;p<n.length;p++){var i=n[p];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(l,(u=function(a,s){if(N(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(N(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),N(u)==="symbol"?u:String(u)),i)}var u}function F(){return F=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,n,p){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=Y(a))!==null;);return a}(l,n);if(i){var u=Object.getOwnPropertyDescriptor(i,n);return u.get?u.get.call(arguments.length<3?l:p):u.value}},F.apply(this,arguments)}function X(l,n){return X=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},X(l,n)}function Y(l){return Y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Y(l)}var Q=function(l){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&X(t,e)})(s,l);var n,p,i,u,a=(i=s,u=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Y(i);if(u){var o=Y(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(N(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(p=[{key:"register",value:function(){F(Y(s.prototype),"register",this).call(this),this.input&&(this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname),this.input.setAttribute("aria-label",this.formname))}},{key:"unregister",value:function(){F(Y(s.prototype),"unregister",this).call(this),this.input&&(this.input.removeAttribute("name"),this.input.removeAttribute("aria-label"))}},{key:"setValue",value:function(t,e,o){if((!this.template||o)&&(this.shouldBeUnset()||t!=null?N(t)==="object"?t=JSON.stringify(t):this.shouldBeUnset()||typeof t=="string"||(t="".concat(t)):t="",t!==this.serialized)){var c=this.sanitize(t);if(this.input.value!==c){if(this.setValueToInputField(c),this.format==="range"){var d=this.control.querySelector("output");d&&(d.value=c)}var _=o||this.getValue()!==t;return this.refreshValue(),e?this.is_dirty=!1:this.jsoneditor.options.show_errors==="change"&&(this.is_dirty=!0),this.adjust_height&&this.adjust_height(this.input),this.onChange(_),{changed:_,value:c}}}}},{key:"setValueToInputField",value:function(t){this.input.value=t===void 0?"":t}},{key:"getNumColumns",value:function(){var t,e=Math.ceil(Math.max(this.getTitle().length,this.schema.maxLength||0,this.schema.minLength||0)/5);return t=this.input_type==="textarea"?6:["text","email"].includes(this.input_type)?4:2,Math.min(12,Math.max(e,t))}},{key:"build",value:function(){var t=this;if(this.options.compact||(this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired())),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.translateProperty(this.schema.description))),this.options.infoText&&(this.infoButton=this.theme.getInfoButton(this.translateProperty(this.options.infoText))),this.format=this.schema.format,!this.format&&this.schema.media&&this.schema.media.type&&(this.format=this.schema.media.type.replace(/(^(application|text)\/(x-)?(script\.)?)|(-source$)/g,"")),!this.format&&this.options.default_format&&(this.format=this.options.default_format),this.options.format&&(this.format=this.options.format),this.format)if(this.format==="textarea")this.input_type="textarea",this.input=this.theme.getTextareaInput();else if(this.format==="range"){this.input_type="range";var e=this.schema.minimum||0,o=this.schema.maximum||Math.max(100,e+1),c=1;this.schema.multipleOf&&(e%this.schema.multipleOf&&(e=Math.ceil(e/this.schema.multipleOf)*this.schema.multipleOf),o%this.schema.multipleOf&&(o=Math.floor(o/this.schema.multipleOf)*this.schema.multipleOf),c=this.schema.multipleOf),this.input=this.theme.getRangeInput(e,o,c)}else this.input_type="text",["button","checkbox","color","date","datetime-local","email","file","hidden","image","month","number","password","radio","reset","search","submit","tel","text","time","url","week"].includes(this.format)&&(this.input_type=this.format),this.input=this.theme.getFormInputField(this.input_type);else this.input_type="text",this.input=this.theme.getFormInputField(this.input_type);this.schema.maxLength!==void 0&&this.input.setAttribute("maxlength",this.schema.maxLength),this.schema.pattern!==void 0?this.input.setAttribute("pattern",this.schema.pattern):this.schema.minLength!==void 0&&this.input.setAttribute("pattern",".{".concat(this.schema.minLength,",}")),this.options.compact?this.container.classList.add("compact"):this.options.input_width&&(this.input.style.width=this.options.input_width),(this.schema.readOnly||this.schema.readonly||this.schema.template)&&(this.disable(!0),this.input.setAttribute("readonly","true")),this.setInputAttributes(["maxlength","pattern","readonly","min","max","step"]),this.input.addEventListener("change",function(P){if(P.preventDefault(),P.stopPropagation(),t.schema.template)P.currentTarget.value=t.value;else{var D=P.currentTarget.value,J=t.sanitize(D);D!==J&&(P.currentTarget.value=J),t.is_dirty=!0,t.refreshValue(),t.onChange(!0)}}),this.options.input_height&&(this.input.style.height=this.options.input_height),this.options.expand_height&&(this.adjust_height=function(P){if(P){var D,J=P.offsetHeight;if(P.offsetHeight<P.scrollHeight)for(D=0;P.offsetHeight<P.scrollHeight+3&&!(D>100);)D++,J++,P.style.height="".concat(J,"px");else{for(D=0;P.offsetHeight>=P.scrollHeight+3&&!(D>100);)D++,J--,P.style.height="".concat(J,"px");P.style.height="".concat(J+1,"px")}}},this.input.addEventListener("keyup",function(P){t.adjust_height(P.currentTarget)}),this.input.addEventListener("change",function(P){t.adjust_height(P.currentTarget)}),this.adjust_height()),this.format&&this.input.setAttribute("data-schemaformat",this.format);var d=this.input;if(this.format==="range"&&(d=this.theme.getRangeControl(this.input,this.theme.getRangeOutput(this.input,this.schema.default||Math.max(this.schema.minimum||0,0)))),this.control=this.theme.getFormControl(this.label,d,this.description,this.infoButton,this.formname),this.container.appendChild(this.control),window.requestAnimationFrame(function(){t.input.parentNode&&t.afterInputReady(),t.adjust_height&&t.adjust_height(t.input),t.format==="range"&&(t.control.querySelector("output").value=t.input.value)}),this.schema.template){var _=this.expandCallbacks("template",{template:this.schema.template});typeof _.template=="function"?this.template=_.template:this.template=this.jsoneditor.compileTemplate(this.schema.template,this.template_engine),this.refreshValue()}else this.refreshValue()}},{key:"setupCleave",value:function(t){var e=this.expandCallbacks("cleave",x({},this.defaults.options.cleave||{},this.options.cleave||{}));N(e)==="object"&&Object.keys(e).length>0&&(this.cleave_instance=new window.Cleave(t,e))}},{key:"setupImask",value:function(t){var e=this.expandCallbacks("imask",x({},this.defaults.options.imask||{},this.options.imask||{}));N(e)==="object"&&Object.keys(e).length>0&&(this.imask_instance=window.IMask(t,this.ajustIMaskOptions(e)))}},{key:"ajustIMaskOptions",value:function(t){var e=this;return Object.keys(t).forEach(function(o){if(t[o]===Object(t[o]))t[o]=e.ajustIMaskOptions(t[o]);else if(o==="mask")if(t[o].substr(0,6)==="regex:"){var c=t[o].match(/^regex:\/(.*)\/([gimsuy]*)$/);if(c!==null)try{t[o]=new RegExp(c[1],c[2])}catch{}}else t[o]=e.getGlobalPropertyFromString(t[o])}),t}},{key:"getGlobalPropertyFromString",value:function(t){if(t.includes(".")){var e=t.split("."),o=e[0],c=e[1];if(window[o]!==void 0&&window[o][c]!==void 0)return window[o][c]}else if(window[t]!==void 0)return window[t];return t}},{key:"shouldBeUnset",value:function(){return!this.jsoneditor.options.use_default_values&&!this.is_dirty}},{key:"getValue",value:function(){var t=!(!this.input||!this.input.value);if(!this.shouldBeUnset()||t)return this.imask_instance&&this.dependenciesFulfilled&&this.options.imask.returnUnmasked?this.imask_instance.unmaskedValue:F(Y(s.prototype),"getValue",this).call(this)}},{key:"enable",value:function(){this.always_disabled||(this.input.disabled=!1,F(Y(s.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.input.disabled=!0,F(Y(s.prototype),"disable",this).call(this)}},{key:"afterInputReady",value:function(){this.theme.afterInputReady(this.input),window.Cleave&&!this.cleave_instance?this.setupCleave(this.input):window.IMask&&!this.imask_instance&&this.setupImask(this.input)}},{key:"refreshValue",value:function(){this.input&&(this.value=this.input.value,typeof this.value=="string"||this.shouldBeUnset()||(this.value=""),this.serialized=this.value)}},{key:"destroy",value:function(){this.cleave_instance&&this.cleave_instance.destroy(),this.imask_instance&&this.imask_instance.destroy(),this.template=null,this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),this.label&&this.label.parentNode&&this.label.parentNode.removeChild(this.label),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),F(Y(s.prototype),"destroy",this).call(this)}},{key:"sanitize",value:function(t){return t}},{key:"onWatchedFieldChange",value:function(){var t;this.template&&(t=this.getWatchedFieldValues(),this.setValue(this.template(t),!1,!0)),F(Y(s.prototype),"onWatchedFieldChange",this).call(this)}},{key:"showValidationErrors",value:function(t){var e=this;if(this.jsoneditor.options.show_errors!=="always"){if(!this.is_dirty&&this.previous_error_setting===this.jsoneditor.options.show_errors)return}this.previous_error_setting=this.jsoneditor.options.show_errors;var o=t.reduce(function(c,d){return d.path===e.path&&c.push(d.message),c},[]);o.length?this.theme.addInputError(this.input,"".concat(o.join(". "),".")):this.theme.removeInputError(this.input)}}])&&q(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(H);function tt(l){return tt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},tt(l)}function it(l,n){for(var p=0;p<n.length;p++){var i=n[p];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(l,(u=function(a,s){if(tt(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(tt(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),tt(u)==="symbol"?u:String(u)),i)}var u}function st(){return st=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,n,p){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=ct(a))!==null;);return a}(l,n);if(i){var u=Object.getOwnPropertyDescriptor(i,n);return u.get?u.get.call(arguments.length<3?l:p):u.value}},st.apply(this,arguments)}function mt(l,n){return mt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},mt(l,n)}function ct(l){return ct=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ct(l)}var Et=function(l){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&mt(t,e)})(s,l);var n,p,i,u,a=(i=s,u=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=ct(i);if(u){var o=ct(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(tt(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(p=[{key:"setValue",value:function(t,e,o){var c=st(ct(s.prototype),"setValue",this).call(this,t,e,o);c!==void 0&&c.changed&&this.ace_editor_instance&&(this.ace_editor_instance.setValue(c.value),this.ace_editor_instance.session.getSelection().clearSelection(),this.ace_editor_instance.resize())}},{key:"build",value:function(){this.options.format="textarea",st(ct(s.prototype),"build",this).call(this),this.input_type=this.schema.format,this.input.setAttribute("data-schemaformat",this.input_type)}},{key:"afterInputReady",value:function(){var t,e=this;if(window.ace){var o=this.input_type;o!=="cpp"&&o!=="c++"&&o!=="c"||(o="c_cpp"),t=this.expandCallbacks("ace",x({},{selectionStyle:"text",minLines:30,maxLines:30},this.defaults.options.ace||{},this.options.ace||{},{mode:"ace/mode/".concat(o)})),this.ace_container=document.createElement("div"),this.ace_container.style.width="100%",this.ace_container.style.position="relative",this.input.parentNode.insertBefore(this.ace_container,this.input),this.input.style.display="none",this.ace_editor_instance=window.ace.edit(this.ace_container,t),this.ace_editor_instance.setValue(this.getValue()),this.ace_editor_instance.session.getSelection().clearSelection(),this.ace_editor_instance.resize(),(this.schema.readOnly||this.schema.readonly||this.schema.template)&&this.ace_editor_instance.setReadOnly(!0),this.ace_editor_instance.on("change",function(){e.input.value=e.ace_editor_instance.getValue(),e.refreshValue(),e.is_dirty=!0,e.onChange(!0)}),this.theme.afterInputReady(this.input)}else st(ct(s.prototype),"afterInputReady",this).call(this)}},{key:"getNumColumns",value:function(){return 6}},{key:"enable",value:function(){!this.always_disabled&&this.ace_editor_instance&&this.ace_editor_instance.setReadOnly(!1),st(ct(s.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.ace_editor_instance&&this.ace_editor_instance.setReadOnly(!0),st(ct(s.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.ace_editor_instance&&(this.ace_editor_instance.destroy(),this.ace_editor_instance=null),st(ct(s.prototype),"destroy",this).call(this)}}])&&it(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(Q);function Tt(l){return Tt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Tt(l)}function Ht(l,n){for(var p=0;p<n.length;p++){var i=n[p];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(l,(u=function(a,s){if(Tt(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Tt(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Tt(u)==="symbol"?u:String(u)),i)}var u}function lt(){return lt=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,n,p){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=_t(a))!==null;);return a}(l,n);if(i){var u=Object.getOwnPropertyDescriptor(i,n);return u.get?u.get.call(arguments.length<3?l:p):u.value}},lt.apply(this,arguments)}function wt(l,n){return wt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},wt(l,n)}function _t(l){return _t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},_t(l)}k(7327);var zt=function(l){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&wt(t,e)})(s,l);var n,p,i,u,a=(i=s,u=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=_t(i);if(u){var o=_t(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(Tt(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,p=[{key:"askConfirmation",value:function(){return this.jsoneditor.options.prompt_before_delete!==!0||window.confirm(this.translate("button_delete_node_warning"))!==!1}},{key:"getDefault",value:function(){return this.schema.default||[]}},{key:"register",value:function(){lt(_t(s.prototype),"register",this).call(this),this.rows&&this.rows.forEach(function(t){return t.register()})}},{key:"unregister",value:function(){lt(_t(s.prototype),"unregister",this).call(this),this.rows&&this.rows.forEach(function(t){return t.unregister()})}},{key:"getNumColumns",value:function(){var t=this.getItemInfo(0);return this.tabs_holder&&this.schema.format!=="tabs-top"?Math.max(Math.min(12,t.width+2),4):t.width}},{key:"enable",value:function(){var t=this;this.always_disabled||(this.setAvailability(this,!1),this.rows&&this.rows.forEach(function(e){e.enable(),t.setAvailability(e,!1)}),lt(_t(s.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){var e=this;t&&(this.always_disabled=!0),this.setAvailability(this,!0),this.rows&&this.rows.forEach(function(o){o.disable(t),e.setAvailability(o,!0)}),lt(_t(s.prototype),"disable",this).call(this)}},{key:"setAvailability",value:function(t,e){t.add_row_button&&(t.add_row_button.disabled=e),t.remove_all_rows_button&&(t.remove_all_rows_button.disabled=e),t.delete_last_row_button&&(t.delete_last_row_button.disabled=e),t.copy_button&&(t.copy_button.disabled=e),t.delete_button&&(t.delete_button.disabled=e),t.moveup_button&&(t.moveup_button.disabled=e),t.movedown_button&&(t.movedown_button.disabled=e)}},{key:"preBuild",value:function(){lt(_t(s.prototype),"preBuild",this).call(this),this.rows=[],this.row_cache=[],this.hide_delete_buttons=this.options.disable_array_delete||this.jsoneditor.options.disable_array_delete,this.hide_delete_all_rows_buttons=this.hide_delete_buttons||this.options.disable_array_delete_all_rows||this.jsoneditor.options.disable_array_delete_all_rows,this.hide_delete_last_row_buttons=this.hide_delete_buttons||this.options.disable_array_delete_last_row||this.jsoneditor.options.disable_array_delete_last_row,this.hide_move_buttons=this.options.disable_array_reorder||this.jsoneditor.options.disable_array_reorder,this.hide_add_button=this.options.disable_array_add||this.jsoneditor.options.disable_array_add,this.show_copy_button=this.options.enable_array_copy||this.jsoneditor.options.enable_array_copy,this.array_controls_top=this.options.array_controls_top||this.jsoneditor.options.array_controls_top}},{key:"build",value:function(){this.options.compact?(this.title=this.theme.getHeader("",this.getPathDepth()),this.container.appendChild(this.title),this.panel=this.theme.getIndentedPanel(),this.container.appendChild(this.panel),this.title_controls=this.theme.getHeaderButtonHolder(),this.title.appendChild(this.title_controls),this.controls=this.theme.getHeaderButtonHolder(),this.title.appendChild(this.controls),this.row_holder=document.createElement("div"),this.panel.appendChild(this.row_holder)):(this.header=document.createElement("label"),this.header.textContent=this.getTitle(),this.title=this.theme.getHeader(this.header,this.getPathDepth()),this.container.appendChild(this.title),this.options.infoText&&(this.infoButton=this.theme.getInfoButton(this.translateProperty(this.options.infoText)),this.container.appendChild(this.infoButton)),this.title_controls=this.theme.getHeaderButtonHolder(),this.title.appendChild(this.title_controls),this.schema.description&&(this.description=this.theme.getDescription(this.translateProperty(this.schema.description)),this.container.appendChild(this.description)),this.error_holder=document.createElement("div"),this.container.appendChild(this.error_holder),this.schema.format==="tabs-top"?(this.controls=this.theme.getHeaderButtonHolder(),this.title.appendChild(this.controls),this.tabs_holder=this.theme.getTopTabHolder(this.getValidId(this.getItemTitle())),this.container.appendChild(this.tabs_holder),this.row_holder=this.theme.getTopTabContentHolder(this.tabs_holder),this.active_tab=null):this.schema.format==="tabs"?(this.controls=this.theme.getHeaderButtonHolder(),this.title.appendChild(this.controls),this.tabs_holder=this.theme.getTabHolder(this.getValidId(this.getItemTitle())),this.container.appendChild(this.tabs_holder),this.row_holder=this.theme.getTabContentHolder(this.tabs_holder),this.active_tab=null):(this.panel=this.theme.getIndentedPanel(),this.container.appendChild(this.panel),this.row_holder=document.createElement("div"),this.panel.appendChild(this.row_holder),this.controls=this.theme.getButtonHolder(),this.array_controls_top?this.title.appendChild(this.controls):this.panel.appendChild(this.controls))),this.addControls()}},{key:"onChildEditorChange",value:function(t){this.refreshValue(),this.refreshTabs(!0),lt(_t(s.prototype),"onChildEditorChange",this).call(this,t)}},{key:"getItemTitle",value:function(){if(!this.item_title)if(this.schema.items&&!Array.isArray(this.schema.items)){var t=this.jsoneditor.expandRefs(this.schema.items);this.item_title=this.translateProperty(t.title)||this.translate("default_array_item_title")}else this.item_title=this.translate("default_array_item_title");return this.cleanText(this.item_title)}},{key:"getItemSchema",value:function(t){return Array.isArray(this.schema.items)?t>=this.schema.items.length?this.schema.additionalItems===!0?{}:this.schema.additionalItems?x({},this.schema.additionalItems):void 0:x({},this.schema.items[t]):this.schema.items?x({},this.schema.items):{}}},{key:"getItemInfo",value:function(t){var e=this.getItemSchema(t);this.item_info=this.item_info||{};var o=JSON.stringify(e);return this.item_info[o]!==void 0||(e=this.jsoneditor.expandRefs(e),this.item_info[o]={title:this.translateProperty(e.title)||this.translate("default_array_item_title"),default:e.default,width:12,child_editors:e.properties||e.items}),this.item_info[o]}},{key:"getElementEditor",value:function(t){var e=this.getItemInfo(t),o=this.getItemSchema(t);(o=this.jsoneditor.expandRefs(o)).title="".concat(e.title," ").concat(t+1);var c,d=this.jsoneditor.getEditorClass(o);this.tabs_holder?(c=this.schema.format==="tabs-top"?this.theme.getTopTabContent():this.theme.getTabContent()).id="".concat(this.path,".").concat(t):c=e.child_editors?this.theme.getChildEditorHolder():this.theme.getIndentedPanel(),this.row_holder.appendChild(c);var _=this.jsoneditor.createEditor(d,{jsoneditor:this.jsoneditor,schema:o,container:c,path:"".concat(this.path,".").concat(t),parent:this,required:!0});return _.preBuild(),_.build(),_.postBuild(),_.title_controls||(_.array_controls=this.theme.getButtonHolder(),c.appendChild(_.array_controls)),_}},{key:"checkParent",value:function(t){return t&&t.parentNode}},{key:"destroy",value:function(){this.empty(!0),this.checkParent(this.title)&&this.title.parentNode.removeChild(this.title),this.checkParent(this.description)&&this.description.parentNode.removeChild(this.description),this.checkParent(this.row_holder)&&this.row_holder.parentNode.removeChild(this.row_holder),this.checkParent(this.controls)&&this.controls.parentNode.removeChild(this.controls),this.checkParent(this.panel)&&this.panel.parentNode.removeChild(this.panel),this.rows=this.row_cache=this.title=this.description=this.row_holder=this.panel=this.controls=null,lt(_t(s.prototype),"destroy",this).call(this)}},{key:"empty",value:function(t){var e=this;this.rows&&(this.rows.forEach(function(o,c){t&&(e.checkParent(o.tab)&&o.tab.parentNode.removeChild(o.tab),e.destroyRow(o,!0),e.row_cache[c]=null),e.rows[c]=null}),this.rows=[],t&&(this.row_cache=[]))}},{key:"destroyRow",value:function(t,e){var o=t.container;e?(t.destroy(),o.parentNode&&o.parentNode.removeChild(o),this.checkParent(t.tab)&&t.tab.parentNode.removeChild(t.tab)):(t.tab&&(t.tab.style.display="none"),o.style.display="none",t.unregister())}},{key:"getMax",value:function(){return Array.isArray(this.schema.items)&&this.schema.additionalItems===!1?Math.min(this.schema.items.length,this.schema.maxItems||1/0):this.schema.maxItems||1/0}},{key:"refreshTabs",value:function(t){var e=this;this.rows.forEach(function(o){o.tab&&(t?o.tab_text.textContent=o.getHeaderText():o.tab===e.active_tab?e.theme.markTabActive(o):e.theme.markTabInactive(o))})}},{key:"ensureArraySize",value:function(t){if(Array.isArray(t)||(t=[t]),this.schema.minItems)for(;t.length<this.schema.minItems;)t.push(this.getItemInfo(t.length).default);return this.getMax()&&t.length>this.getMax()&&(t=t.slice(0,this.getMax())),t}},{key:"setValue",value:function(){var t=this,e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],o=arguments.length>1?arguments[1]:void 0;if(e=this.ensureArraySize(e),JSON.stringify(e)!==this.serialized){e.forEach(function(P,D){if(t.rows[D])t.rows[D].setValue(P,o);else if(t.row_cache[D])t.rows[D]=t.row_cache[D],t.rows[D].setValue(P,o),t.rows[D].container.style.display="",t.rows[D].tab&&(t.rows[D].tab.style.display=""),t.rows[D].register(),t.jsoneditor.trigger("addRow",t.rows[D]);else{var J=t.addRow(P,o);t.jsoneditor.trigger("addRow",J)}});for(var c=e.length;c<this.rows.length;c++)this.destroyRow(this.rows[c]),this.rows[c]=null;this.rows=this.rows.slice(0,e.length);var d=this.rows.find(function(P){return P.tab===t.active_tab}),_=d!==void 0?d.tab:null;!_&&this.rows.length&&(_=this.rows[0].tab),this.active_tab=_,this.refreshValue(o),this.refreshTabs(!0),this.refreshTabs(),this.onChange()}}},{key:"setButtonState",value:function(t,e){switch(this.options.button_state_mode||this.jsoneditor.options.button_state_mode){case 1:default:t.style.display=e?"":"none";break;case 2:t.disabled=!e}}},{key:"setupButtons",value:function(t){var e=[];if(this.value.length)if(this.value.length===1){this.setButtonState(this.remove_all_rows_button,!1);var o=!(t||this.hide_delete_last_row_buttons);this.setButtonState(this.delete_last_row_button,o),e.push(o)}else{var c=!(t||this.hide_delete_last_row_buttons);this.setButtonState(this.delete_last_row_button,c),e.push(c);var d=!(t||this.hide_delete_all_rows_buttons);this.setButtonState(this.remove_all_rows_button,d),e.push(d)}else this.setButtonState(this.delete_last_row_button,!1),this.setButtonState(this.remove_all_rows_button,!1);var _=!(this.getMax()&&this.getMax()<=this.rows.length||this.hide_add_button);return this.setButtonState(this.add_row_button,_),e.push(_),e.some(function(P){return P})}},{key:"refreshValue",value:function(t){var e=this,o=this.value?this.value.length:0;if(this.value=this.rows.map(function(d){return d.getValue()}),o!==this.value.length||t){var c=this.schema.minItems&&this.schema.minItems>=this.rows.length;this.rows.forEach(function(d,_){if(d.movedown_button){var P=_!==e.rows.length-1;e.setButtonState(d.movedown_button,P)}d.delete_button&&e.setButtonState(d.delete_button,!c),e.value[_]=d.getValue()}),!this.collapsed&&this.setupButtons(c)?this.controls.style.display="inline-block":this.controls.style.display="none"}this.serialized=JSON.stringify(this.value)}},{key:"addRow",value:function(t,e){var o=this,c=this.rows.length;this.rows[c]=this.getElementEditor(c),this.row_cache[c]=this.rows[c],this.tabs_holder&&(this.rows[c].tab_text=document.createElement("span"),this.rows[c].tab_text.textContent=this.rows[c].getHeaderText(),this.schema.format==="tabs-top"?(this.rows[c].tab=this.theme.getTopTab(this.rows[c].tab_text,this.getValidId(this.rows[c].path)),this.theme.addTopTab(this.tabs_holder,this.rows[c].tab)):(this.rows[c].tab=this.theme.getTab(this.rows[c].tab_text,this.getValidId(this.rows[c].path)),this.theme.addTab(this.tabs_holder,this.rows[c].tab)),this.rows[c].tab.addEventListener("click",function(_){o.active_tab=o.rows[c].tab,o.refreshTabs(),_.preventDefault(),_.stopPropagation()}));var d=this.rows[c].title_controls||this.rows[c].array_controls;return this.hide_delete_buttons||(this.rows[c].delete_button=this._createDeleteButton(c,d)),this.show_copy_button&&(this.rows[c].copy_button=this._createCopyButton(c,d)),c&&!this.hide_move_buttons&&(this.rows[c].moveup_button=this._createMoveUpButton(c,d)),this.hide_move_buttons||(this.rows[c].movedown_button=this._createMoveDownButton(c,d)),t!==void 0&&this.rows[c].setValue(t,e),this.refreshTabs(),this.rows[c]}},{key:"_createDeleteButton",value:function(t,e){var o=this,c=this.getButton(this.getItemTitle(),"delete","button_delete_row_title",[this.getItemTitle()]);return c.classList.add("delete","json-editor-btntype-delete"),c.setAttribute("data-i",t),c.addEventListener("click",function(d){if(d.preventDefault(),d.stopPropagation(),!o.askConfirmation())return!1;var _=1*d.currentTarget.getAttribute("data-i"),P=o.getValue().filter(function(nt,ut){return ut!==_}),D=null,J=o.rows[_].getValue();o.setValue(P),o.rows[_]?D=o.rows[_].tab:o.rows[_-1]&&(D=o.rows[_-1].tab),D&&(o.active_tab=D,o.refreshTabs()),o.onChange(!0),o.jsoneditor.trigger("deleteRow",J)}),e&&e.appendChild(c),c}},{key:"_createCopyButton",value:function(t,e){var o=this,c=this.getButton(this.getItemTitle(),"copy","button_copy_row_title",[this.getItemTitle()]),d=this.schema;return c.classList.add("copy","json-editor-btntype-copy"),c.setAttribute("data-i",t),c.addEventListener("click",function(_){var P=o.getValue();_.preventDefault(),_.stopPropagation();var D=1*_.currentTarget.getAttribute("data-i");P.forEach(function(J,nt){if(nt===D){if(d.items.type==="string"&&d.items.format==="uuid")J=R();else if(d.items.type==="object"&&d.items.properties)for(var ut=0,dt=Object.keys(J);ut<dt.length;ut++){var kt=dt[ut];d.items.properties&&d.items.properties[kt]&&d.items.properties[kt].format==="uuid"&&(J[kt]=R())}P.push(J)}}),o.setValue(P),o.refreshValue(!0),o.onChange(!0)}),e.appendChild(c),c}},{key:"_createMoveUpButton",value:function(t,e){var o=this,c=this.getButton("",this.schema.format==="tabs-top"?"moveleft":"moveup","button_move_up_title");return c.classList.add("moveup","json-editor-btntype-move"),c.setAttribute("data-i",t),c.addEventListener("click",function(d){d.preventDefault(),d.stopPropagation();var _=1*d.currentTarget.getAttribute("data-i");if(!(_<=0)){var P=o.getValue(),D=P[_-1];P[_-1]=P[_],P[_]=D,o.setValue(P),o.active_tab=o.rows[_-1].tab,o.refreshTabs(),o.onChange(!0),o.jsoneditor.trigger("moveRow",o.rows[_-1])}}),e&&e.appendChild(c),c}},{key:"_createMoveDownButton",value:function(t,e){var o=this,c=this.getButton("",this.schema.format==="tabs-top"?"moveright":"movedown","button_move_down_title");return c.classList.add("movedown","json-editor-btntype-move"),c.setAttribute("data-i",t),c.addEventListener("click",function(d){d.preventDefault(),d.stopPropagation();var _=1*d.currentTarget.getAttribute("data-i"),P=o.getValue();if(!(_>=P.length-1)){var D=P[_+1];P[_+1]=P[_],P[_]=D,o.setValue(P),o.active_tab=o.rows[_+1].tab,o.refreshTabs(),o.onChange(!0),o.jsoneditor.trigger("moveRow",o.rows[_+1])}}),e&&e.appendChild(c),c}},{key:"addControls",value:function(){this.collapsed=!1,this.toggle_button=this._createToggleButton(),this.options.collapsed&&O(this.toggle_button,"click"),this.schema.options&&this.schema.options.disable_collapse!==void 0?this.schema.options.disable_collapse&&(this.toggle_button.style.display="none"):this.jsoneditor.options.disable_collapse&&(this.toggle_button.style.display="none"),this.add_row_button=this._createAddRowButton(),this.delete_last_row_button=this._createDeleteLastRowButton(),this.remove_all_rows_button=this._createRemoveAllRowsButton(),this.tabs&&(this.add_row_button.classList.add("je-array-control-btn"),this.delete_last_row_button.classList.add("je-array-control-btn"),this.remove_all_rows_button.classList.add("je-array-control-btn"))}},{key:"_createToggleButton",value:function(){var t=this,e=this.getButton("","collapse","button_collapse");e.classList.add("json-editor-btntype-toggle"),this.title.insertBefore(e,this.title.childNodes[0]);var o=this.row_holder.style.display,c=this.controls.style.display;return e.addEventListener("click",function(d){d.preventDefault(),d.stopPropagation(),t.panel&&t.setButtonState(t.panel,t.collapsed),t.tabs_holder&&t.setButtonState(t.tabs_holder,t.collapsed),t.collapsed?(t.collapsed=!1,t.row_holder.style.display=o,t.controls.style.display=c,t.setButtonText(d.currentTarget,"","collapse","button_collapse")):(t.collapsed=!0,t.row_holder.style.display="none",t.controls.style.display="none",t.setButtonText(d.currentTarget,"","expand","button_expand"))}),e}},{key:"_createAddRowButton",value:function(){var t=this,e=this.getButton(this.getItemTitle(),"add","button_add_row_title",[this.getItemTitle()]);return e.classList.add("json-editor-btntype-add"),e.addEventListener("click",function(o){o.preventDefault(),o.stopPropagation();var c,d=t.rows.length;t.row_cache[d]?(c=t.rows[d]=t.row_cache[d],t.rows[d].setValue(t.rows[d].getDefault(),!0),t.rows[d].container.style.display="",t.rows[d].tab&&(t.rows[d].tab.style.display=""),t.rows[d].register()):c=t.addRow(),t.active_tab=t.rows[d].tab,t.refreshTabs(),t.refreshValue(),t.onChange(!0),t.jsoneditor.trigger("addRow",c)}),this.controls.appendChild(e),e}},{key:"_createDeleteLastRowButton",value:function(){var t=this,e=this.getButton("button_delete_last","subtract","button_delete_last_title",[this.getItemTitle()]);return e.classList.add("json-editor-btntype-deletelast"),e.addEventListener("click",function(o){if(o.preventDefault(),o.stopPropagation(),!t.askConfirmation())return!1;var c=t.getValue(),d=null,_=c.pop();t.setValue(c),t.rows[t.rows.length-1]&&(d=t.rows[t.rows.length-1].tab),d&&(t.active_tab=d,t.refreshTabs()),t.onChange(!0),t.jsoneditor.trigger("deleteRow",_)}),this.controls.appendChild(e),e}},{key:"_createRemoveAllRowsButton",value:function(){var t=this,e=this.getButton("button_delete_all","delete","button_delete_all_title");return e.classList.add("json-editor-btntype-deleteall"),e.addEventListener("click",function(o){if(o.preventDefault(),o.stopPropagation(),!t.askConfirmation())return!1;var c=t.getValue();t.empty(!0),t.setValue([]),t.onChange(!0),t.jsoneditor.trigger("deleteAllRows",c)}),this.controls.appendChild(e),e}},{key:"showValidationErrors",value:function(t){var e=this,o=[],c=[];t.forEach(function(d){d.path===e.path?o.push(d):c.push(d)}),this.error_holder&&(o.length?(this.error_holder.innerHTML="",this.error_holder.style.display="",o.forEach(function(d){e.error_holder.appendChild(e.theme.getErrorMessage(d.message))})):this.error_holder.style.display="none"),this.rows.forEach(function(d){return d.showValidationErrors(c)})}}],p&&Ht(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(H);function Xt(l){return Xt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Xt(l)}function ce(l,n){for(var p=0;p<n.length;p++){var i=n[p];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(l,(u=function(a,s){if(Xt(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Xt(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Xt(u)==="symbol"?u:String(u)),i)}var u}function St(){return St=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,n,p){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=It(a))!==null;);return a}(l,n);if(i){var u=Object.getOwnPropertyDescriptor(i,n);return u.get?u.get.call(arguments.length<3?l:p):u.value}},St.apply(this,arguments)}function jt(l,n){return jt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},jt(l,n)}function It(l){return It=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},It(l)}zt.rules={".json-editor-btntype-toggle":"margin:0%2010px%200%200",".je-array-control-btn":"width:100%25;text-align:left;margin-bottom:3px"};var qt=function(l){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&jt(t,e)})(s,l);var n,p,i,u,a=(i=s,u=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=It(i);if(u){var o=It(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(Xt(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(p=[{key:"onInputChange",value:function(){this.value=this.input.value,this.onChange(!0)}},{key:"register",value:function(){St(It(s.prototype),"register",this).call(this),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}},{key:"unregister",value:function(){St(It(s.prototype),"unregister",this).call(this),this.input&&this.input.removeAttribute("name")}},{key:"getNumColumns",value:function(){var t=this,e=this.getTitle().length;return Object.keys(this.select_values).forEach(function(o){return e=Math.max(e,"".concat(t.select_values[o]).length+4)}),Math.min(12,Math.max(e/7,2))}},{key:"preBuild",value:function(){var t;St(It(s.prototype),"preBuild",this).call(this),this.select_options={},this.select_values={},this.option_titles=[],this.option_keys=[],this.option_enum=[];var e=this.jsoneditor.expandRefs(this.schema.items||{}),o=e.enum||[],c=e.options&&e.options.enum||[],d=e.options&&e.options.enum_titles||[];for(t=0;t<o.length;t++)if(this.sanitize(o[t])===o[t]){var _=c[t]||{};"title"in _||(_.title="".concat(d[t]||o[t])),this.option_keys.push("".concat(o[t])),this.option_enum.push(_),this.select_values["".concat(o[t])]=o[t]}}},{key:"build",value:function(){var t,e=this;if(this.options.compact||(this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired())),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.translateProperty(this.schema.description))),this.options.infoText&&(this.infoButton=this.theme.getInfoButton(this.translateProperty(this.options.infoText))),this.options.compact&&this.container.classList.add("compact"),!this.schema.format&&this.option_keys.length<8||this.schema.format==="checkbox"){for(this.input_type="checkboxes",this.inputs={},this.controls={},t=0;t<this.option_keys.length;t++){var o=this.formname+t.toString();this.inputs[this.option_keys[t]]=this.theme.getCheckbox(),this.inputs[this.option_keys[t]].id=o,this.select_options[this.option_keys[t]]=this.inputs[this.option_keys[t]];var c=this.theme.getCheckboxLabel(this.option_enum[t].title);if(c.htmlFor=o,this.option_enum[t].infoText){var d=this.theme.getInfoButton(this.translateProperty(this.option_enum[t].infoText));c.appendChild(d)}this.controls["_"+this.option_keys[t]]=this.theme.getFormControl(c,this.inputs[this.option_keys[t]])}this.control=this.theme.getMultiCheckboxHolder(this.controls,this.label,this.description,this.infoButton),this.inputs.controlgroup=this.inputs.controls=this.control}else{for(this.input_type="select",this.input=this.theme.getSelectInput(this.option_keys,!0),this.theme.setSelectOptions(this.input,this.option_keys,this.option_enum.map(function(_){return _.title})),this.input.setAttribute("multiple","multiple"),this.input.size=Math.min(10,this.option_keys.length),t=0;t<this.option_keys.length;t++)this.select_options[this.option_keys[t]]=this.input.children[t];this.control=this.theme.getFormControl(this.label,this.input,this.description,this.infoButton)}(this.schema.readOnly||this.schema.readonly)&&this.disable(!0),this.container.appendChild(this.control),this.multiselectChangeHandler=function(_){var P=[];for(t=0;t<e.option_keys.length;t++)e.select_options[e.option_keys[t]]&&(e.select_options[e.option_keys[t]].selected||e.select_options[e.option_keys[t]].checked)&&P.push(e.select_values[e.option_keys[t]]);e.updateValue(P),e.onChange(!0)},this.control.addEventListener("change",this.multiselectChangeHandler,!1),window.requestAnimationFrame(function(){e.afterInputReady()})}},{key:"postBuild",value:function(){St(It(s.prototype),"postBuild",this).call(this)}},{key:"afterInputReady",value:function(){this.theme.afterInputReady(this.input||this.inputs)}},{key:"setValue",value:function(t,e){var o=this;t=t||[],Array.isArray(t)||(t=[t]),t=t.map(function(c){return"".concat(c)}),Object.keys(this.select_options).forEach(function(c){o.select_options[c][o.input_type==="select"?"selected":"checked"]=t.includes(c)}),this.updateValue(t),this.onChange(!0)}},{key:"removeValue",value:function(t){t=[].concat(t),this.setValue(this.getValue().filter(function(e){return!t.includes(e)}))}},{key:"addValue",value:function(t){this.setValue(this.getValue().concat(t))}},{key:"updateValue",value:function(t){for(var e=!1,o=[],c=0;c<t.length;c++)if(this.select_options["".concat(t[c])]){var d=this.sanitize(this.select_values[t[c]]);o.push(d),d!==t[c]&&(e=!0)}else e=!0;return this.value=o,e}},{key:"sanitize",value:function(t){return this.schema.items.type==="boolean"?!!t:this.schema.items.type==="number"?1*t||0:this.schema.items.type==="integer"?Math.floor(1*t||0):"".concat(t)}},{key:"enable",value:function(){var t=this;this.always_disabled||(this.input?this.input.disabled=!1:this.inputs&&Object.keys(this.inputs).forEach(function(e){return t.inputs[e].disabled=!1}),St(It(s.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){var e=this;t&&(this.always_disabled=!0),this.input?this.input.disabled=!0:this.inputs&&Object.keys(this.inputs).forEach(function(o){return e.inputs[o].disabled=!0}),St(It(s.prototype),"disable",this).call(this)}},{key:"destroy",value:function(){St(It(s.prototype),"destroy",this).call(this)}},{key:"escapeRegExp",value:function(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}},{key:"showValidationErrors",value:function(t){var e=new RegExp("^".concat(this.escapeRegExp(this.path),"(\\.\\d+)?$")),o=t.reduce(function(c,d){return d.path.match(e)&&c.push(d.message),c},[]);o.length?this.theme.addInputError(this.input||this.inputs,"".concat(o.join(". "),".")):this.theme.removeInputError(this.input||this.inputs)}}])&&ce(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(H);function xt(l){return xt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},xt(l)}function tr(l,n){for(var p=0;p<n.length;p++){var i=n[p];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(l,(u=function(a,s){if(xt(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(xt(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),xt(u)==="symbol"?u:String(u)),i)}var u}function le(){return le=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,n,p){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=fe(a))!==null;);return a}(l,n);if(i){var u=Object.getOwnPropertyDescriptor(i,n);return u.get?u.get.call(arguments.length<3?l:p):u.value}},le.apply(this,arguments)}function Ie(l,n){return Ie=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},Ie(l,n)}function fe(l){return fe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},fe(l)}var er=function(l){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ie(t,e)})(s,l);var n,p,i,u,a=(i=s,u=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=fe(i);if(u){var o=fe(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(xt(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(p=[{key:"setValue",value:function(t,e){this.choices_instance?(t=[].concat(t).map(function(o){return"".concat(o)}),this.updateValue(t),this.choices_instance.removeActiveItems(),this.choices_instance.setChoiceByValue(this.value),this.onChange(!0)):le(fe(s.prototype),"setValue",this).call(this,t,e)}},{key:"afterInputReady",value:function(){var t=this;if(window.Choices&&!this.choices_instance){var e=this.expandCallbacks("choices",x({},{removeItems:!0,removeItemButton:!0},this.defaults.options.choices||{},this.options.choices||{},{addItems:!0,editItems:!1,duplicateItemsAllowed:!1}));this.newEnumAllowed=!1,this.choices_instance=new window.Choices(this.input,e),this.control.removeEventListener("change",this.multiselectChangeHandler),this.multiselectChangeHandler=function(o){var c=t.choices_instance.getValue(!0);t.updateValue(c),t.onChange(!0)},this.control.addEventListener("change",this.multiselectChangeHandler,!1)}le(fe(s.prototype),"afterInputReady",this).call(this)}},{key:"updateValue",value:function(t){t=[].concat(t);for(var e=!1,o=[],c=0;c<t.length;c++)if(!(!this.select_values["".concat(t[c])]&&(e=!0,!this.newEnumAllowed||!this.addNewOption(t[c])))){var d=this.sanitize(this.select_values[t[c]]);o.push(d),d!==t[c]&&(e=!0)}return this.value=o,e}},{key:"addNewOption",value:function(t){return this.option_keys.push("".concat(t)),this.option_titles.push("".concat(t)),this.select_values["".concat(t)]=t,this.schema.items.enum.push(t),this.choices_instance.setChoices([{value:"".concat(t),label:"".concat(t)}],"value","label",!1),!0}},{key:"enable",value:function(){!this.always_disabled&&this.choices_instance&&this.choices_instance.enable(),le(fe(s.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.choices_instance&&this.choices_instance.disable(),le(fe(s.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.choices_instance&&(this.choices_instance.destroy(),this.choices_instance=null),le(fe(s.prototype),"destroy",this).call(this)}}])&&tr(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(qt);function Ce(l){return Ce=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Ce(l)}function ir(l,n){for(var p=0;p<n.length;p++){var i=n[p];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(l,(u=function(a,s){if(Ce(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Ce(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Ce(u)==="symbol"?u:String(u)),i)}var u}function Se(){return Se=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,n,p){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=_e(a))!==null;);return a}(l,n);if(i){var u=Object.getOwnPropertyDescriptor(i,n);return u.get?u.get.call(arguments.length<3?l:p):u.value}},Se.apply(this,arguments)}function qe(l,n){return qe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},qe(l,n)}function _e(l){return _e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},_e(l)}var or=function(l){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&qe(t,e)})(s,l);var n,p,i,u,a=(i=s,u=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=_e(i);if(u){var o=_e(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(Ce(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(p=[{key:"setValue",value:function(t,e){this.select2_instance?(t=[].concat(t).map(function(o){return"".concat(o)}),this.updateValue(t),this.select2v4?this.select2_instance.val(this.value).change():this.select2_instance.select2("val",this.value),this.onChange(!0)):Se(_e(s.prototype),"setValue",this).call(this,t,e)}},{key:"afterInputReady",value:function(){var t,e=this;window.jQuery&&window.jQuery.fn&&window.jQuery.fn.select2&&!this.select2_instance&&(t=this.expandCallbacks("select2",x({},{tags:!0,width:"100%"},this.defaults.options.select2||{},this.options.select2||{})),this.newEnumAllowed=t.tags=!!t.tags&&this.schema.items&&this.schema.items.type==="string",this.select2_instance=window.jQuery(this.input).select2(t),this.select2v4=C(this.select2_instance.select2,"amd"),this.selectChangeHandler=function(){var o=e.select2v4?e.select2_instance.val():e.select2_instance.select2("val");e.updateValue(o),e.onChange(!0)},this.select2_instance.on("select2-blur",this.selectChangeHandler),this.select2_instance.on("change",this.selectChangeHandler)),Se(_e(s.prototype),"afterInputReady",this).call(this)}},{key:"updateValue",value:function(t){t=[].concat(t);for(var e=!1,o=[],c=0;c<t.length;c++)if(!(!this.select_values["".concat(t[c])]&&(e=!0,!this.newEnumAllowed||!this.addNewOption(t[c])))){var d=this.sanitize(this.select_values[t[c]]);o.push(d),d!==t[c]&&(e=!0)}return this.value=o,e}},{key:"addNewOption",value:function(t){this.option_keys.push("".concat(t)),this.option_titles.push("".concat(t)),this.select_values["".concat(t)]=t,this.schema.items.enum.push(t);var e=this.input.querySelector('option[value="'.concat(t,'"]'));return e?e.removeAttribute("data-select2-tag"):this.input.appendChild(new Option(t,t,!1,!1)).trigger("change"),!0}},{key:"enable",value:function(){!this.always_disabled&&this.select2_instance&&(this.select2v4?this.select2_instance.prop("disabled",!1):this.select2_instance.select2("enable",!0)),Se(_e(s.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.select2_instance&&(this.select2v4?this.select2_instance.prop("disabled",!0):this.select2_instance.select2("enable",!1)),Se(_e(s.prototype),"disable",this).call(this)}},{key:"destroy",value:function(){this.select2_instance&&(this.select2_instance.select2("destroy"),this.select2_instance=null),Se(_e(s.prototype),"destroy",this).call(this)}}])&&ir(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(qt);function ot(l){return ot=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ot(l)}function vt(l,n){for(var p=0;p<n.length;p++){var i=n[p];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(l,(u=function(a,s){if(ot(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(ot(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),ot(u)==="symbol"?u:String(u)),i)}var u}function Mt(){return Mt=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,n,p){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=Qt(a))!==null;);return a}(l,n);if(i){var u=Object.getOwnPropertyDescriptor(i,n);return u.get?u.get.call(arguments.length<3?l:p):u.value}},Mt.apply(this,arguments)}function $t(l,n){return $t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},$t(l,n)}function Qt(l){return Qt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Qt(l)}var Ue=function(l){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&$t(t,e)})(s,l);var n,p,i,u,a=(i=s,u=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Qt(i);if(u){var o=Qt(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(ot(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(p=[{key:"setValue",value:function(t,e){this.selectize_instance?(t=[].concat(t).map(function(o){return"".concat(o)}),this.updateValue(t),this.selectize_instance.setValue(this.value),this.onChange(!0)):Mt(Qt(s.prototype),"setValue",this).call(this,t,e)}},{key:"afterInputReady",value:function(){var t,e=this;window.jQuery&&window.jQuery.fn&&window.jQuery.fn.selectize&&!this.selectize_instance&&(t=this.expandCallbacks("selectize",x({},{plugins:["remove_button"],delimiter:!1,createOnBlur:!0,create:!0},this.defaults.options.selectize||{},this.options.selectize||{})),this.newEnumAllowed=t.create=!!t.create&&this.schema.items&&this.schema.items.type==="string",this.selectize_instance=window.jQuery(this.input).selectize(t)[0].selectize,this.control.removeEventListener("change",this.multiselectChangeHandler),this.multiselectChangeHandler=function(o){var c=e.selectize_instance.getValue();e.updateValue(c),e.onChange(!0)},this.selectize_instance.on("change",this.multiselectChangeHandler)),Mt(Qt(s.prototype),"afterInputReady",this).call(this)}},{key:"updateValue",value:function(t){t=[].concat(t);for(var e=!1,o=[],c=0;c<t.length;c++)if(!(!this.select_values["".concat(t[c])]&&(e=!0,!this.newEnumAllowed||!this.addNewOption(t[c])))){var d=this.sanitize(this.select_values[t[c]]);o.push(d),d!==t[c]&&(e=!0)}return this.value=o,e}},{key:"addNewOption",value:function(t){return this.option_keys.push("".concat(t)),this.option_titles.push("".concat(t)),this.select_values["".concat(t)]=t,this.selectize_instance.addOption({text:t,value:t}),!0}},{key:"enable",value:function(){!this.always_disabled&&this.selectize_instance&&this.selectize_instance.unlock(),Mt(Qt(s.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.selectize_instance&&this.selectize_instance.lock(),Mt(Qt(s.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.selectize_instance&&(this.selectize_instance.destroy(),this.selectize_instance=null),Mt(Qt(s.prototype),"destroy",this).call(this)}}])&&vt(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(qt);function Ze(l){return Ze=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Ze(l)}function fr(l,n){for(var p=0;p<n.length;p++){var i=n[p];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(l,(u=function(a,s){if(Ze(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Ze(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Ze(u)==="symbol"?u:String(u)),i)}var u}function Je(){return Je=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,n,p){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=xe(a))!==null;);return a}(l,n);if(i){var u=Object.getOwnPropertyDescriptor(i,n);return u.get?u.get.call(arguments.length<3?l:p):u.value}},Je.apply(this,arguments)}function ar(l,n){return ar=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},ar(l,n)}function xe(l){return xe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},xe(l)}var En=function(l){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ar(t,e)})(s,l);var n,p,i,u,a=(i=s,u=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=xe(i);if(u){var o=xe(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(Ze(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(p=[{key:"postBuild",value:function(){window.Autocomplete&&(this.autocomplete_wrapper=document.createElement("div"),this.input.parentNode.insertBefore(this.autocomplete_wrapper,this.input.nextSibling),this.autocomplete_wrapper.appendChild(this.input),this.autocomplete_dropdown=document.createElement("ul"),this.input.parentNode.insertBefore(this.autocomplete_dropdown,this.input.nextSibling)),Je(xe(s.prototype),"postBuild",this).call(this)}},{key:"afterInputReady",value:function(){var t,e=this;window.Autocomplete&&!this.autocomplete_instance&&(t=this.expandCallbacks("autocomplete",x({},{search:function(o){return console.log('No "search" callback defined for autocomplete in property "'.concat(o.key,'"')),[]},onSubmit:function(){e.input.blur()},baseClass:"autocomplete"},this.defaults.options.autocomplete||{},this.options.autocomplete||{})),this.autocomplete_wrapper.classList.add(t.baseClass),this.autocomplete_dropdown.classList.add("".concat(t.baseClass,"-result-list")),this.autocomplete_instance=new window.Autocomplete(this.autocomplete_wrapper,t)),Je(xe(s.prototype),"afterInputReady",this).call(this)}},{key:"destroy",value:function(){this.autocomplete_instance&&(this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),this.autocomplete_dropdown&&this.autocomplete_dropdown.parentNode&&this.autocomplete_dropdown.parentNode.removeChild(this.autocomplete_dropdown),this.autocomplete_wrapper&&this.autocomplete_wrapper.parentNode&&this.autocomplete_wrapper.parentNode.removeChild(this.autocomplete_wrapper),this.autocomplete_instance=null),Je(xe(s.prototype),"destroy",this).call(this)}}])&&fr(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(Q);function Dt(l){return Dt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Dt(l)}function Kt(l,n){for(var p=0;p<n.length;p++){var i=n[p];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(l,(u=function(a,s){if(Dt(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Dt(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Dt(u)==="symbol"?u:String(u)),i)}var u}function Yt(){return Yt=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,n,p){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=Fe(a))!==null;);return a}(l,n);if(i){var u=Object.getOwnPropertyDescriptor(i,n);return u.get?u.get.call(arguments.length<3?l:p):u.value}},Yt.apply(this,arguments)}function oe(l,n){return oe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},oe(l,n)}function Fe(l){return Fe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Fe(l)}k(561);var Ci=function(l){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&oe(t,e)})(s,l);var n,p,i,u,a=(i=s,u=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Fe(i);if(u){var o=Fe(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(Dt(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(p=[{key:"getNumColumns",value:function(){return 4}},{key:"setFileReaderListener",value:function(t){var e=this;t.addEventListener("load",function(o){if(e.count===e.current_item_index)e.value[e.count][e.key]=o.target.result;else{var c={};for(var d in e.parent.schema.properties)c[d]="";c[e.key]=o.target.result,e.value.splice(e.count,0,c)}e.count+=1,e.count===e.total+e.current_item_index&&e.arrayEditor.setValue(e.value)})}},{key:"build",value:function(){var t=this;if(this.options.compact||(this.title=this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired())),this.options.infoText&&(this.infoButton=this.theme.getInfoButton(this.translateProperty(this.options.infoText))),this.input=this.theme.getFormInputField("hidden"),this.container.appendChild(this.input),!this.schema.readOnly&&!this.schema.readonly){if(!window.FileReader)throw new Error("FileReader required for base64 editor");this.uploader=this.theme.getFormInputField("file"),this.uploader.style.display="none",this.schema.options&&this.schema.options.multiple&&this.schema.options.multiple===!0&&this.parent&&this.parent.schema.type==="object"&&this.parent.parent&&this.parent.parent.schema.type==="array"&&this.uploader.setAttribute("multiple",""),this.uploader.addEventListener("change",function(o){if(o.preventDefault(),o.stopPropagation(),o.currentTarget.files&&o.currentTarget.files.length)if(o.currentTarget.files.length>1&&t.schema.options&&t.schema.options.multiple&&t.schema.options.multiple===!0&&t.parent&&t.parent.schema.type==="object"&&t.parent.parent&&t.parent.parent.schema.type==="array"){t.arrayEditor=t.jsoneditor.getEditor(t.parent.parent.path),t.value=t.arrayEditor.getValue(),t.total=o.currentTarget.files.length,t.current_item_index=parseInt(t.parent.key),t.count=t.current_item_index;for(var c=0;c<t.total;c++){var d=new FileReader;t.setFileReaderListener(d),d.readAsDataURL(o.currentTarget.files[c])}}else{var _=new FileReader;_.onload=function(P){t.value=P.target.result,t.refreshPreview(),t.onChange(!0),_=null},_.readAsDataURL(o.currentTarget.files[0])}})}this.preview=this.theme.getFormInputDescription(this.translateProperty(this.schema.description)),this.container.appendChild(this.preview),this.control=this.theme.getFormControl(this.label,this.uploader||this.input,this.preview,this.infoButton),this.container.appendChild(this.control);var e=this.getButton("button_upload","upload","button_upload");e.addEventListener("click",function(){t.uploader.click()}),this.control.appendChild(e)}},{key:"refreshPreview",value:function(){if(this.last_preview!==this.value&&(this.last_preview=this.value,this.preview.innerHTML="",this.value)){var t=this.value.match(/^data:([^;,]+)[;,]/);if(t&&(t=t[1]),t){if(this.preview.innerHTML="<strong>Type:</strong> ".concat(t,", <strong>Size:</strong> ").concat(Math.floor((this.value.length-this.value.split(",")[0].length-1)/1.33333)," bytes"),t.substr(0,5)==="image"){this.preview.innerHTML+="<br>";var e=document.createElement("img");e.style.maxWidth="100%",e.style.maxHeight="100px",e.src=this.value,this.preview.appendChild(e)}}else this.preview.innerHTML="<em>Invalid data URI</em>"}}},{key:"enable",value:function(){this.always_disabled||(this.uploader&&(this.uploader.disabled=!1),Yt(Fe(s.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.uploader&&(this.uploader.disabled=!0),Yt(Fe(s.prototype),"disable",this).call(this)}},{key:"setValue",value:function(t){this.value!==t&&(this.schema.readOnly&&this.schema.enum&&!this.schema.enum.includes(t)?this.value=this.schema.enum[0]:this.value=t,this.input.value=this.value,this.refreshPreview(),this.onChange())}},{key:"destroy",value:function(){this.preview&&this.preview.parentNode&&this.preview.parentNode.removeChild(this.preview),this.title&&this.title.parentNode&&this.title.parentNode.removeChild(this.title),this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),this.uploader&&this.uploader.parentNode&&this.uploader.parentNode.removeChild(this.uploader),Yt(Fe(s.prototype),"destroy",this).call(this)}}])&&Kt(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(H);function Cn(l){return Cn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Cn(l)}function $a(l,n){for(var p=0;p<n.length;p++){var i=n[p];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(l,(u=function(a,s){if(Cn(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Cn(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Cn(u)==="symbol"?u:String(u)),i)}var u}function Kn(){return Kn=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,n,p){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=$r(a))!==null;);return a}(l,n);if(i){var u=Object.getOwnPropertyDescriptor(i,n);return u.get?u.get.call(arguments.length<3?l:p):u.value}},Kn.apply(this,arguments)}function Jr(l,n){return Jr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},Jr(l,n)}function $r(l){return $r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},$r(l)}var Ma=function(l){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Jr(t,e)})(s,l);var n,p,i,u,a=(i=s,u=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=$r(i);if(u){var o=$r(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(Cn(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(t,e){var o;return function(c,d){if(!(c instanceof d))throw new TypeError("Cannot call a class as a function")}(this,s),(o=a.call(this,t,e)).active=!1,o.parent&&o.parent.schema&&(Array.isArray(o.parent.schema.required)?o.parent.schema.required.includes(o.key)||o.parent.schema.required.push(o.key):o.parent.schema.required=[o.key]),o}return n=s,(p=[{key:"build",value:function(){var t=this;this.options.compact=!0;var e=this.translateProperty(this.schema.title)||this.key,o=this.expandCallbacks("button",x({},{icon:"",validated:!1,align:"left",action:function(c,d){window.alert('No button action defined for "'.concat(c.path,'"'))}},this.defaults.options.button||{},this.options.button||{}));this.input=this.getButton(e,o.icon,e),this.input.addEventListener("click",o.action,!1),(this.schema.readOnly||this.schema.readonly||this.schema.template)&&(this.disable(!0),this.input.setAttribute("readonly","true")),this.setInputAttributes(["readonly"]),this.control=this.theme.getFormButtonHolder(o.align),this.control.appendChild(this.input),this.container.appendChild(this.control),this.changeHandler=function(){t.jsoneditor.validate(t.jsoneditor.getValue()).length>0?t.disable():t.enable()},o.validated&&this.jsoneditor.on("change",this.changeHandler)}},{key:"enable",value:function(){this.always_disabled||(this.input.disabled=!1,Kn($r(s.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.input.disabled=!0,Kn($r(s.prototype),"disable",this).call(this)}},{key:"getNumColumns",value:function(){return 2}},{key:"activate",value:function(){this.active=!1,this.enable()}},{key:"deactivate",value:function(){this.isRequired()||(this.active=!1,this.disable())}},{key:"destroy",value:function(){this.jsoneditor.off("change",this.changeHandler),this.changeHandler=null,Kn($r(s.prototype),"destroy",this).call(this)}}])&&$a(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(H);function Sn(l){return Sn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Sn(l)}function Fa(l,n){for(var p=0;p<n.length;p++){var i=n[p];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(l,(u=function(a,s){if(Sn(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Sn(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Sn(u)==="symbol"?u:String(u)),i)}var u}function pn(){return pn=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,n,p){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=Lr(a))!==null;);return a}(l,n);if(i){var u=Object.getOwnPropertyDescriptor(i,n);return u.get?u.get.call(arguments.length<3?l:p):u.value}},pn.apply(this,arguments)}function Si(l,n){return Si=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},Si(l,n)}function Lr(l){return Lr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Lr(l)}var Ha=function(l){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Si(t,e)})(s,l);var n,p,i,u,a=(i=s,u=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Lr(i);if(u){var o=Lr(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(Sn(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(p=[{key:"setValue",value:function(t,e){t=!!t;var o=this.getValue()!==t;this.value=t,this.input.checked=this.value,this.onChange(o)}},{key:"register",value:function(){pn(Lr(s.prototype),"register",this).call(this),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}},{key:"unregister",value:function(){pn(Lr(s.prototype),"unregister",this).call(this),this.input&&this.input.removeAttribute("name")}},{key:"getNumColumns",value:function(){return Math.min(12,Math.max(this.getTitle().length/7,2))}},{key:"build",value:function(){var t=this;this.parent.options.table_row||(this.label=this.header=this.theme.getCheckboxLabel(this.getTitle(),this.isRequired()),this.label.htmlFor=this.formname),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.translateProperty(this.schema.description))),this.options.infoText&&!this.options.compact&&(this.infoButton=this.theme.getInfoButton(this.translateProperty(this.options.infoText))),this.options.compact&&this.container.classList.add("compact"),this.input=this.theme.getCheckbox(),this.input.id=this.formname,this.control=this.theme.getFormControl(this.label,this.input,this.description,this.infoButton),(this.schema.readOnly||this.schema.readonly)&&(this.disable(!0),this.input.disabled=!0),this.input.addEventListener("change",function(e){e.preventDefault(),e.stopPropagation(),t.value=e.currentTarget.checked,t.onChange(!0)}),this.container.appendChild(this.control)}},{key:"enable",value:function(){this.always_disabled||(this.input.disabled=!1,pn(Lr(s.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.input.disabled=!0,pn(Lr(s.prototype),"disable",this).call(this)}},{key:"destroy",value:function(){this.label&&this.label.parentNode&&this.label.parentNode.removeChild(this.label),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),pn(Lr(s.prototype),"destroy",this).call(this)}},{key:"showValidationErrors",value:function(t){var e=this;this.previous_error_setting=this.jsoneditor.options.show_errors;var o=t.reduce(function(c,d){return d.path===e.path&&c.push(d.message),c},[]);this.input.controlgroup=this.control,o.length?this.theme.addInputError(this.input,"".concat(o.join(". "),".")):this.theme.removeInputError(this.input)}}])&&Fa(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(H);function Pn(l){return Pn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Pn(l)}function $o(l,n){for(var p=0;p<n.length;p++){var i=n[p];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(l,(u=function(a,s){if(Pn(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Pn(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Pn(u)==="symbol"?u:String(u)),i)}var u}function br(){return br=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,n,p){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=gr(a))!==null;);return a}(l,n);if(i){var u=Object.getOwnPropertyDescriptor(i,n);return u.get?u.get.call(arguments.length<3?l:p):u.value}},br.apply(this,arguments)}function Yr(l,n){return Yr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},Yr(l,n)}function gr(l){return gr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},gr(l)}k(2772),k(2707);var ti=function(l){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Yr(t,e)})(s,l);var n,p,i,u,a=(i=s,u=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=gr(i);if(u){var o=gr(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(Pn(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(p=[{key:"setValue",value:function(t,e){var o=this.typecast(t),c=!!this.jsoneditor.options.use_default_values||this.schema.default!==void 0;(this.enum_options.length>0&&!this.enum_values.includes(o)||e&&!this.isRequired()&&!c)&&(o=this.enum_values[0]),this.value!==o&&(e?this.is_dirty=!1:this.jsoneditor.options.show_errors==="change"&&(this.is_dirty=!0),this.input.value=this.enum_options[this.enum_values.indexOf(o)],this.value=o,this.onChange(),this.change())}},{key:"register",value:function(){br(gr(s.prototype),"register",this).call(this),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}},{key:"unregister",value:function(){br(gr(s.prototype),"unregister",this).call(this),this.input&&this.input.removeAttribute("name")}},{key:"getNumColumns",value:function(){if(!this.enum_options)return 3;for(var t=this.getTitle().length,e=0;e<this.enum_options.length;e++)t=Math.max(t,this.enum_options[e].length+4);return Math.min(12,Math.max(t/7,2))}},{key:"typecast",value:function(t){return this.schema.type==="boolean"?t==="undefined"||t===void 0?void 0:!!t:this.schema.type==="number"?1*t||0:this.schema.type==="integer"?Math.floor(1*t||0):this.schema.enum&&t===void 0?void 0:"".concat(t)}},{key:"getValue",value:function(){if(this.dependenciesFulfilled)return this.typecast(this.value)}},{key:"preBuild",value:function(){var t,e,o=this;if(this.input_type="select",this.enum_options=[],this.enum_values=[],this.enum_display=[],this.schema.enum){var c=this.schema.options&&this.schema.options.enum_titles||[];this.schema.enum.forEach(function(d,_){o.enum_options[_]="".concat(d),o.enum_display[_]="".concat(o.translateProperty(c[_])||d),o.enum_values[_]=o.typecast(d)})}else if(this.schema.type==="boolean")this.enum_display=this.schema.options&&this.schema.options.enum_titles||["true","false"],this.enum_options=["1",""],this.enum_values=[!0,!1],this.isRequired()||(this.enum_display.unshift(" "),this.enum_options.unshift("undefined"),this.enum_values.unshift(void 0));else{if(!this.schema.enumSource)throw new Error("'select' editor requires the enum property to be set.");if(this.enumSource=[],this.enum_display=[],this.enum_options=[],this.enum_values=[],Array.isArray(this.schema.enumSource))for(t=0;t<this.schema.enumSource.length;t++)typeof this.schema.enumSource[t]=="string"?this.enumSource[t]={source:this.schema.enumSource[t]}:Array.isArray(this.schema.enumSource[t])?this.enumSource[t]=this.schema.enumSource[t]:this.enumSource[t]=x({},this.schema.enumSource[t]);else this.schema.enumValue?this.enumSource=[{source:this.schema.enumSource,value:this.schema.enumValue}]:this.enumSource=[{source:this.schema.enumSource}];for(t=0;t<this.enumSource.length;t++)this.enumSource[t].value&&(typeof(e=this.expandCallbacks("template",{template:this.enumSource[t].value})).template=="function"?this.enumSource[t].value=e.template:this.enumSource[t].value=this.jsoneditor.compileTemplate(this.enumSource[t].value,this.template_engine)),this.enumSource[t].title&&(typeof(e=this.expandCallbacks("template",{template:this.enumSource[t].title})).template=="function"?this.enumSource[t].title=e.template:this.enumSource[t].title=this.jsoneditor.compileTemplate(this.enumSource[t].title,this.template_engine)),this.enumSource[t].filter&&this.enumSource[t].value&&(typeof(e=this.expandCallbacks("template",{template:this.enumSource[t].filter})).template=="function"?this.enumSource[t].filter=e.template:this.enumSource[t].filter=this.jsoneditor.compileTemplate(this.enumSource[t].filter,this.template_engine))}}},{key:"build",value:function(){var t=this;this.options.compact||(this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired())),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.translateProperty(this.schema.description))),this.options.infoText&&(this.infoButton=this.theme.getInfoButton(this.translateProperty(this.options.infoText))),this.options.compact&&this.container.classList.add("compact"),this.input=this.theme.getSelectInput(this.enum_options,!1),this.theme.setSelectOptions(this.input,this.enum_options,this.enum_display),(this.schema.readOnly||this.schema.readonly)&&(this.disable(!0),this.input.disabled=!0),this.setInputAttributes([]),this.input.addEventListener("change",function(e){e.preventDefault(),e.stopPropagation(),t.onInputChange()}),this.control=this.theme.getFormControl(this.label,this.input,this.description,this.infoButton),this.container.appendChild(this.control),this.value=this.enum_values[0],window.requestAnimationFrame(function(){t.input.parentNode&&t.afterInputReady()})}},{key:"afterInputReady",value:function(){this.theme.afterInputReady(this.input)}},{key:"onInputChange",value:function(){var t,e=this.typecast(this.input.value);(t=this.enum_values.includes(e)?this.enum_values[this.enum_values.indexOf(e)]:this.enum_values[0])!==this.value&&(this.is_dirty=!0,this.value=t,this.onChange(!0))}},{key:"onWatchedFieldChange",value:function(){var t,e,o=[],c=[];if(this.enumSource){t=this.getWatchedFieldValues();for(var d=0;d<this.enumSource.length;d++)if(Array.isArray(this.enumSource[d]))o=o.concat(this.enumSource[d]),c=c.concat(this.enumSource[d]);else{var _=[];if(_=Array.isArray(this.enumSource[d].source)?this.enumSource[d].source:t[this.enumSource[d].source]){if(this.enumSource[d].slice&&(_=Array.prototype.slice.apply(_,this.enumSource[d].slice)),this.enumSource[d].filter){var P=[];for(e=0;e<_.length;e++)this.enumSource[d].filter({i:e,item:_[e],watched:t})&&P.push(_[e]);_=P}var D=[],J=[];for(e=0;e<_.length;e++){var nt=_[e];this.enumSource[d].value?J[e]=this.typecast(this.enumSource[d].value({i:e,item:nt})):J[e]=_[e],this.enumSource[d].title?D[e]=this.enumSource[d].title({i:e,item:nt}):D[e]=J[e]}this.enumSource[d].sort&&(function(dt,kt,Ct){dt.map(function(Nt,re){return{v:Nt,t:kt[re]}}).sort(function(Nt,re){return Nt.v<re.v?-Ct:Nt.v===re.v?0:Ct}).forEach(function(Nt,re){dt[re]=Nt.v,kt[re]=Nt.t})}).bind(null,J,D,this.enumSource[d].sort==="desc"?1:-1)(),o=o.concat(J),c=c.concat(D)}}var ut=this.value;this.theme.setSelectOptions(this.input,o,c),this.enum_options=o,this.enum_display=c,this.enum_values=o,o.includes(ut)||this.jsoneditor.options.enum_source_value_auto_select!==!1?(this.input.value=ut,this.value=ut):(this.input.value=o[0],this.value=this.typecast(o[0]||""),this.parent&&!this.watchLoop?this.parent.onChildEditorChange(this):this.jsoneditor.onChange(),this.jsoneditor.notifyWatchers(this.path))}br(gr(s.prototype),"onWatchedFieldChange",this).call(this)}},{key:"enable",value:function(){this.always_disabled||(this.input.disabled=!1,br(gr(s.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.input.disabled=!0,br(gr(s.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.label&&this.label.parentNode&&this.label.parentNode.removeChild(this.label),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),br(gr(s.prototype),"destroy",this).call(this)}},{key:"showValidationErrors",value:function(t){var e=this;this.previous_error_setting=this.jsoneditor.options.show_errors;var o=t.reduce(function(c,d){return d.path===e.path&&c.push(d.message),c},[]);o.length?this.theme.addInputError(this.input,"".concat(o.join(". "),".")):this.theme.removeInputError(this.input)}}])&&$o(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(H);function Tn(l){return Tn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Tn(l)}function $s(l,n){for(var p=0;p<n.length;p++){var i=n[p];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(l,(u=function(a,s){if(Tn(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Tn(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Tn(u)==="symbol"?u:String(u)),i)}var u}function Ar(){return Ar=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,n,p){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=z(a))!==null;);return a}(l,n);if(i){var u=Object.getOwnPropertyDescriptor(i,n);return u.get?u.get.call(arguments.length<3?l:p):u.value}},Ar.apply(this,arguments)}function A(l,n){return A=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},A(l,n)}function z(l){return z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},z(l)}var rt=function(l){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&A(t,e)})(s,l);var n,p,i,u,a=(i=s,u=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=z(i);if(u){var o=z(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(Tn(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(p=[{key:"setValue",value:function(t,e){if(this.choices_instance){var o=this.typecast(t||"");if(this.enum_values.includes(o)||(o=this.enum_values[0]),this.value===o)return;e?this.is_dirty=!1:this.jsoneditor.options.show_errors==="change"&&(this.is_dirty=!0),this.input.value=this.enum_options[this.enum_values.indexOf(o)],this.choices_instance.setChoiceByValue(this.input.value),this.value=o,this.onChange()}else Ar(z(s.prototype),"setValue",this).call(this,t,e)}},{key:"afterInputReady",value:function(){if(window.Choices&&!this.choices_instance){var t=this.expandCallbacks("choices",x({},this.defaults.options.choices||{},this.options.choices||{}));this.choices_instance=new window.Choices(this.input,t)}Ar(z(s.prototype),"afterInputReady",this).call(this)}},{key:"onWatchedFieldChange",value:function(){var t=this;if(Ar(z(s.prototype),"onWatchedFieldChange",this).call(this),this.choices_instance){var e=this.enum_options.map(function(o,c){return{value:o,label:t.enum_display[c]}});this.choices_instance.setChoices(e,"value","label",!0),this.choices_instance.setChoiceByValue("".concat(this.value))}}},{key:"enable",value:function(){!this.always_disabled&&this.choices_instance&&this.choices_instance.enable(),Ar(z(s.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.choices_instance&&this.choices_instance.disable(),Ar(z(s.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.choices_instance&&(this.choices_instance.destroy(),this.choices_instance=null),Ar(z(s.prototype),"destroy",this).call(this)}}])&&$s(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(ti);function K(l){return K=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},K(l)}function yt(l,n){for(var p=0;p<n.length;p++){var i=n[p];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(l,(u=function(a,s){if(K(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(K(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),K(u)==="symbol"?u:String(u)),i)}var u}function Bt(){return Bt=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,n,p){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=ft(a))!==null;);return a}(l,n);if(i){var u=Object.getOwnPropertyDescriptor(i,n);return u.get?u.get.call(arguments.length<3?l:p):u.value}},Bt.apply(this,arguments)}function Zt(l,n){return Zt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},Zt(l,n)}function ft(l){return ft=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ft(l)}rt.rules={".choices > *":"box-sizing:border-box"};var bt=function(l){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Zt(t,e)})(s,l);var n,p,i,u,a=(i=s,u=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=ft(i);if(u){var o=ft(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(K(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(p=[{key:"build",value:function(){if(Bt(ft(s.prototype),"build",this).call(this),this.input&&(this.schema.max&&typeof this.schema.max=="string"&&this.input.setAttribute("max",this.schema.max),this.schema.min&&typeof this.schema.max=="string"&&this.input.setAttribute("min",this.schema.min),window.flatpickr&&K(this.options.flatpickr)==="object")){this.options.flatpickr.enableTime=this.schema.format!=="date",this.options.flatpickr.noCalendar=this.schema.format==="time",this.schema.type==="integer"&&(this.options.flatpickr.mode="single"),this.input.setAttribute("data-input","");var t=this.input;if(this.options.flatpickr.wrap===!0){var e=[];if(this.options.flatpickr.showToggleButton!==!1){var o=this.getButton("",this.schema.format==="time"?"time":"calendar","flatpickr_toggle_button");o.setAttribute("data-toggle",""),e.push(o)}if(this.options.flatpickr.showClearButton!==!1){var c=this.getButton("","clear","flatpickr_clear_button");c.setAttribute("data-clear",""),e.push(c)}var d=this.input.parentNode,_=this.input.nextSibling,P=this.theme.getInputGroup(this.input,e);P!==void 0?(this.options.flatpickr.inline=!1,d.insertBefore(P,_),t=P):this.options.flatpickr.wrap=!1}this.flatpickr=window.flatpickr(t,this.options.flatpickr),this.options.flatpickr.inline===!0&&this.options.flatpickr.inlineHideInput===!0&&this.input.setAttribute("type","hidden")}}},{key:"getValue",value:function(){if(this.dependenciesFulfilled){if(this.schema.type==="string")return this.value;if(this.value!==""&&this.value!==void 0){var t=this.schema.format==="time"?"1970-01-01 ".concat(this.value):this.value;return parseInt(new Date(t).getTime()/1e3)}}}},{key:"setValue",value:function(t,e,o){if(this.schema.type==="string")Bt(ft(s.prototype),"setValue",this).call(this,t,e,o),this.flatpickr&&this.flatpickr.setDate(t);else if(t>0){var c=new Date(1e3*t),d=c.getFullYear(),_=this.zeroPad(c.getMonth()+1),P=this.zeroPad(c.getDate()),D=this.zeroPad(c.getHours()),J=this.zeroPad(c.getMinutes()),nt=this.zeroPad(c.getSeconds()),ut=[d,_,P].join("-"),dt=[D,J,nt].join(":"),kt="".concat(ut,"T").concat(dt);this.schema.format==="date"?kt=ut:this.schema.format==="time"&&(kt=dt),this.input.value=kt,this.refreshValue(),this.flatpickr&&this.flatpickr.setDate(kt)}}},{key:"destroy",value:function(){this.flatpickr&&this.flatpickr.destroy(),this.flatpickr=null,Bt(ft(s.prototype),"destroy",this).call(this)}},{key:"zeroPad",value:function(t){return"0".concat(t).slice(-2)}}])&&yt(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(Q);function Gt(l){return Gt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Gt(l)}function ne(l,n){for(var p=0;p<n.length;p++){var i=n[p];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(l,(u=function(a,s){if(Gt(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Gt(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Gt(u)==="symbol"?u:String(u)),i)}var u}function Pt(){return Pt=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,n,p){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=Ae(a))!==null;);return a}(l,n);if(i){var u=Object.getOwnPropertyDescriptor(i,n);return u.get?u.get.call(arguments.length<3?l:p):u.value}},Pt.apply(this,arguments)}function ae(l,n){return ae=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},ae(l,n)}function Ae(l){return Ae=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ae(l)}var Qe=function(l){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ae(t,e)})(s,l);var n,p,i,u,a=(i=s,u=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Ae(i);if(u){var o=Ae(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(Gt(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(p=[{key:"register",value:function(){if(this.editors){for(var t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].unregister();this.editors[this.currentEditor]&&this.editors[this.currentEditor].register()}Pt(Ae(s.prototype),"register",this).call(this)}},{key:"unregister",value:function(){if(Pt(Ae(s.prototype),"unregister",this).call(this),this.editors)for(var t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].unregister()}},{key:"getNumColumns",value:function(){return this.editors[this.currentEditor]?Math.max(this.editors[this.currentEditor].getNumColumns(),4):4}},{key:"enable",value:function(){if(this.editors)for(var t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].enable();Pt(Ae(s.prototype),"enable",this).call(this)}},{key:"disable",value:function(){if(this.editors)for(var t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].disable();Pt(Ae(s.prototype),"disable",this).call(this)}},{key:"switchEditor",value:function(){var t=this,e=this.getWatchedFieldValues();if(e){var o=document.location.origin+document.location.pathname+this.template(e);this.editors[this.refs[o]]||this.buildChildEditor(o),this.currentEditor=this.refs[o],this.register(),this.editors.forEach(function(c,d){c&&(t.currentEditor===d?c.container.style.display="":c.container.style.display="none")}),this.refreshValue(),this.onChange(!0)}}},{key:"buildChildEditor",value:function(t){this.refs[t]=this.editors.length;var e=this.theme.getChildEditorHolder();this.editor_holder.appendChild(e);var o=x({},this.schema,this.jsoneditor.refs[t]),c=this.jsoneditor.getEditorClass(o,this.jsoneditor),d=this.jsoneditor.createEditor(c,{jsoneditor:this.jsoneditor,schema:o,container:e,path:this.path,parent:this,required:!0});this.editors.push(d),d.preBuild(),d.build(),d.postBuild()}},{key:"preBuild",value:function(){var t;for(this.refs={},this.editors=[],this.currentEditor="",t=0;t<this.schema.links.length;t++)if(this.schema.links[t].rel.toLowerCase()==="describedby"){this.template=this.jsoneditor.compileTemplate(this.schema.links[t].href,this.template_engine);break}this.schema.links=this.schema.links.slice(0,t).concat(this.schema.links.slice(t+1)),this.schema.links.length===0&&delete this.schema.links,this.baseSchema=x({},this.schema)}},{key:"build",value:function(){this.editor_holder=document.createElement("div"),this.container.appendChild(this.editor_holder),this.switchEditor()}},{key:"onWatchedFieldChange",value:function(){this.switchEditor()}},{key:"onChildEditorChange",value:function(t){this.editors[this.currentEditor]&&this.refreshValue(),Pt(Ae(s.prototype),"onChildEditorChange",this).call(this,t)}},{key:"refreshValue",value:function(){this.editors[this.currentEditor]&&(this.value=this.editors[this.currentEditor].getValue())}},{key:"setValue",value:function(t,e){this.editors[this.currentEditor]&&(this.editors[this.currentEditor].setValue(t,e),this.refreshValue(),this.onChange())}},{key:"destroy",value:function(){this.editors.forEach(function(t){t&&t.destroy()}),this.editor_holder&&this.editor_holder.parentNode&&this.editor_holder.parentNode.removeChild(this.editor_holder),Pt(Ae(s.prototype),"destroy",this).call(this)}},{key:"showValidationErrors",value:function(t){this.editors.forEach(function(e){e&&e.showValidationErrors(t)})}}])&&ne(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(H);function Rt(l){return Rt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Rt(l)}function te(l,n){(n==null||n>l.length)&&(n=l.length);for(var p=0,i=new Array(n);p<n;p++)i[p]=l[p];return i}function Vt(l,n){for(var p=0;p<n.length;p++){var i=n[p];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(l,(u=function(a,s){if(Rt(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Rt(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Rt(u)==="symbol"?u:String(u)),i)}var u}function ue(){return ue=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,n,p){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=we(a))!==null;);return a}(l,n);if(i){var u=Object.getOwnPropertyDescriptor(i,n);return u.get?u.get.call(arguments.length<3?l:p):u.value}},ue.apply(this,arguments)}function He(l,n){return He=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},He(l,n)}function we(l){return we=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},we(l)}var Be=function(l){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&He(t,e)})(s,l);var n,p,i,u,a=(i=s,u=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=we(i);if(u){var o=we(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(Rt(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(p=[{key:"getNumColumns",value:function(){return 4}},{key:"build",value:function(){var t=this;this.title=this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired()),this.container.appendChild(this.title),this.options.enum_titles=this.options.enum_titles||[],this.enum=this.schema.enum,this.selected=0,this.select_options=[],this.html_values=[];for(var e=0;e<this.enum.length;e++)this.select_options[e]=this.options.enum_titles[e]||"Value ".concat(e+1),this.html_values[e]=this.getHTML(this.enum[e]);this.switcher=this.theme.getSwitcher(this.select_options),this.container.appendChild(this.switcher),this.display_area=this.theme.getIndentedPanel(),this.container.appendChild(this.display_area),this.options.hide_display&&(this.display_area.style.display="none"),this.switcher.addEventListener("change",function(o){t.selected=t.select_options.indexOf(o.currentTarget.value),t.value=t.enum[t.selected],t.refreshValue(),t.onChange(!0)}),this.value=this.enum[0],this.refreshValue(),this.enum.length===1&&(this.switcher.style.display="none")}},{key:"refreshValue",value:function(){var t=this;this.selected=-1;var e=JSON.stringify(this.value);this.enum.forEach(function(o,c){if(e===JSON.stringify(o))return t.selected=c,!1}),this.selected<0?this.setValue(this.enum[0]):(this.switcher.value=this.select_options[this.selected],this.display_area.innerHTML=this.html_values[this.selected])}},{key:"enable",value:function(){this.always_disabled||(this.switcher.disabled=!1,ue(we(s.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.switcher.disabled=!0,ue(we(s.prototype),"disable",this).call(this)}},{key:"getHTML",value:function(t){var e,o,c=this;if(t===null)return"<em>null</em>";if(Rt(t)==="object"){var d="";return e=t,o=function(_,P){var D=c.getHTML(P);Array.isArray(t)||(D="<div><em>".concat(_,"</em>: ").concat(D,"</div>")),d+="<li>".concat(D,"</li>")},Array.isArray(e)||typeof e.length=="number"&&e.length>0&&e.length-1 in e?Array.from(e).forEach(function(_,P){return o(P,_)}):Object.entries(e).forEach(function(_){var P,D,J=(D=2,function(dt){if(Array.isArray(dt))return dt}(P=_)||function(dt,kt){var Ct=dt==null?null:typeof Symbol<"u"&&dt[Symbol.iterator]||dt["@@iterator"];if(Ct!=null){var Nt,re,Pe,Ut,gt=[],Wt=!0,ze=!1;try{if(Pe=(Ct=Ct.call(dt)).next,kt===0){if(Object(Ct)!==Ct)return;Wt=!1}else for(;!(Wt=(Nt=Pe.call(Ct)).done)&&(gt.push(Nt.value),gt.length!==kt);Wt=!0);}catch(W){ze=!0,re=W}finally{try{if(!Wt&&Ct.return!=null&&(Ut=Ct.return(),Object(Ut)!==Ut))return}finally{if(ze)throw re}}return gt}}(P,D)||function(dt,kt){if(dt){if(typeof dt=="string")return te(dt,kt);var Ct=Object.prototype.toString.call(dt).slice(8,-1);return Ct==="Object"&&dt.constructor&&(Ct=dt.constructor.name),Ct==="Map"||Ct==="Set"?Array.from(dt):Ct==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ct)?te(dt,kt):void 0}}(P,D)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
57
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()),nt=J[0],ut=J[1];return o(nt,ut)}),d=Array.isArray(t)?"<ol>".concat(d,"</ol>"):"<ul style='margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:0;'>".concat(d,"</ul>")}return typeof t=="boolean"?t?"true":"false":typeof t=="string"?t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"):t}},{key:"setValue",value:function(t){this.value!==t&&(this.value=t,this.refreshValue(),this.onChange())}},{key:"destroy",value:function(){this.display_area&&this.display_area.parentNode&&this.display_area.parentNode.removeChild(this.display_area),this.title&&this.title.parentNode&&this.title.parentNode.removeChild(this.title),this.switcher&&this.switcher.parentNode&&this.switcher.parentNode.removeChild(this.switcher),ue(we(s.prototype),"destroy",this).call(this)}}])&&Vt(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(H);function ve(l){return ve=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ve(l)}function sr(l,n){for(var p=0;p<n.length;p++){var i=n[p];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(l,(u=function(a,s){if(ve(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(ve(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),ve(u)==="symbol"?u:String(u)),i)}var u}function De(){return De=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,n,p){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=wr(a))!==null;);return a}(l,n);if(i){var u=Object.getOwnPropertyDescriptor(i,n);return u.get?u.get.call(arguments.length<3?l:p):u.value}},De.apply(this,arguments)}function Rr(l,n){return Rr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},Rr(l,n)}function wr(l){return wr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},wr(l)}var Va=function(l){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Rr(t,e)})(s,l);var n,p,i,u,a=(i=s,u=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=wr(i);if(u){var o=wr(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(ve(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(p=[{key:"register",value:function(){De(wr(s.prototype),"register",this).call(this),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}},{key:"unregister",value:function(){De(wr(s.prototype),"unregister",this).call(this),this.input&&this.input.removeAttribute("name")}},{key:"setValue",value:function(t,e,o){if((!this.template||o)&&(t==null?t="":ve(t)==="object"?t=JSON.stringify(t):typeof t!="string"&&(t="".concat(t)),t!==this.serialized)){var c=this.sanitize(t);if(this.input.value!==c){this.input.value=c;var d=o||this.getValue()!==t;this.refreshValue(),e?this.is_dirty=!1:this.jsoneditor.options.show_errors==="change"&&(this.is_dirty=!0),this.adjust_height&&this.adjust_height(this.input),this.onChange(d)}}}},{key:"getNumColumns",value:function(){return 2}},{key:"enable",value:function(){De(wr(s.prototype),"enable",this).call(this)}},{key:"disable",value:function(){De(wr(s.prototype),"disable",this).call(this)}},{key:"refreshValue",value:function(){this.value=this.input.value,typeof this.value!="string"&&(this.value=""),this.serialized=this.value}},{key:"destroy",value:function(){this.template=null,this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),this.label&&this.label.parentNode&&this.label.parentNode.removeChild(this.label),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),De(wr(s.prototype),"destroy",this).call(this)}},{key:"sanitize",value:function(t){return t}},{key:"onWatchedFieldChange",value:function(){var t;this.template&&(t=this.getWatchedFieldValues(),this.setValue(this.template(t),!1,!0)),De(wr(s.prototype),"onWatchedFieldChange",this).call(this)}},{key:"build",value:function(){if(this.format=this.schema.format,!this.format&&this.options.default_format&&(this.format=this.options.default_format),this.options.format&&(this.format=this.options.format),this.input_type="hidden",this.input=this.theme.getFormInputField(this.input_type),this.format&&this.input.setAttribute("data-schemaformat",this.format),this.container.appendChild(this.input),this.schema.template){var t=this.expandCallbacks("template",{template:this.schema.template});typeof t.template=="function"?this.template=t.template:this.template=this.jsoneditor.compileTemplate(this.schema.template,this.template_engine),this.refreshValue()}else this.refreshValue()}}])&&sr(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(H);function Mr(l){return Mr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Mr(l)}function Ms(l,n){for(var p=0;p<n.length;p++){var i=n[p];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(l,(u=function(a,s){if(Mr(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Mr(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Mr(u)==="symbol"?u:String(u)),i)}var u}function Pi(l,n){return Pi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},Pi(l,n)}function Ir(l){return Ir=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ir(l)}var Ti=function(l){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Pi(t,e)})(s,l);var n,p,i,u,a=(i=s,u=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Ir(i);if(u){var o=Ir(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(Mr(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(p=[{key:"build",value:function(){this.options.compact=!1,this.header=this.label=this.theme.getFormInputLabel(this.getTitle()),this.description=this.theme.getDescription(this.schema.description||""),this.control=this.theme.getFormControl(this.label,this.description,null),this.container.appendChild(this.control)}},{key:"getTitle",value:function(){return this.translateProperty(this.schema.title)}},{key:"getNumColumns",value:function(){return 12}}])&&Ms(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(Ma);function fn(l){return fn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},fn(l)}function za(l,n){for(var p=0;p<n.length;p++){var i=n[p];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(l,(u=function(a,s){if(fn(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(fn(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),fn(u)==="symbol"?u:String(u)),i)}var u}function Li(){return Li=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,n,p){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=Ln(a))!==null;);return a}(l,n);if(i){var u=Object.getOwnPropertyDescriptor(i,n);return u.get?u.get.call(arguments.length<3?l:p):u.value}},Li.apply(this,arguments)}function Ai(l,n){return Ai=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},Ai(l,n)}function Ln(l){return Ln=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ln(l)}var qa=function(l){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ai(t,e)})(s,l);var n,p,i,u,a=(i=s,u=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Ln(i);if(u){var o=Ln(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(fn(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(p=[{key:"build",value:function(){if(Li(Ln(s.prototype),"build",this).call(this),this.schema.minimum!==void 0){var t=this.schema.minimum;this.schema.exclusiveMinimum!==void 0&&(t+=1),this.input.setAttribute("min",t)}if(this.schema.maximum!==void 0){var e=this.schema.maximum;this.schema.exclusiveMaximum!==void 0&&(e-=1),this.input.setAttribute("max",e)}if(this.schema.step!==void 0){var o=this.schema.step||1;this.input.setAttribute("step",o)}this.setInputAttributes(["maxlength","pattern","readonly","min","max","step"])}},{key:"getNumColumns",value:function(){return 2}},{key:"getValue",value:function(){if(this.dependenciesFulfilled)return this.schema.default||this.jsoneditor.options.use_default_values||this.value!==""?function(t){if(t==null)return!1;var e=t.match(T),o=parseFloat(t);return e!==null&&!isNaN(o)&&isFinite(o)}(this.value)?parseFloat(this.value):this.value:void(this.shouldBeUnset()&&(this.input.value=""))}}])&&za(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(Q);function Br(l){return Br=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Br(l)}function ei(l,n){for(var p=0;p<n.length;p++){var i=n[p];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(l,(u=function(a,s){if(Br(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Br(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Br(u)==="symbol"?u:String(u)),i)}var u}function Fr(l,n){return Fr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},Fr(l,n)}function Ri(l){return Ri=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ri(l)}var Ua=function(l){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Fr(t,e)})(s,l);var n,p,i,u,a=(i=s,u=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Ri(i);if(u){var o=Ri(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(Br(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(p=[{key:"getNumColumns",value:function(){return 2}},{key:"getValue",value:function(){if(this.dependenciesFulfilled)return this.schema.default||this.jsoneditor.options.use_default_values||this.value!==""?function(t){if(t==null)return!1;var e=t.match(L),o=parseInt(t);return e!==null&&!isNaN(o)&&isFinite(o)}(this.value)?parseInt(this.value):this.value:void this.shouldBeUnset()}}])&&ei(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(qa);function An(l){return An=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},An(l)}function Ii(l,n){for(var p=0;p<n.length;p++){var i=n[p];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(l,(u=function(a,s){if(An(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(An(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),An(u)==="symbol"?u:String(u)),i)}var u}function Xr(){return Xr=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,n,p){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=Hr(a))!==null;);return a}(l,n);if(i){var u=Object.getOwnPropertyDescriptor(i,n);return u.get?u.get.call(arguments.length<3?l:p):u.value}},Xr.apply(this,arguments)}function Rn(l,n){return Rn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},Rn(l,n)}function Hr(l){return Hr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Hr(l)}var Mo=function(l){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Rn(t,e)})(s,l);var n,p,i,u,a=(i=s,u=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Hr(i);if(u){var o=Hr(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(An(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(p=[{key:"preBuild",value:function(){if(Xr(Hr(s.prototype),"preBuild",this).call(this),this.schema.options||(this.schema.options={}),!this.schema.options.cleave)switch(this.format){case"ipv6":this.schema.options.cleave={delimiters:[":"],blocks:[4,4,4,4,4,4,4,4],uppercase:!0};break;case"ipv4":this.schema.options.cleave={delimiters:["."],blocks:[3,3,3,3],numericOnly:!0}}this.options=x(this.options,this.schema.options||{})}}])&&Ii(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(Q);function In(l){return In=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},In(l)}function Fs(l,n){for(var p=0;p<n.length;p++){var i=n[p];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(l,(u=function(a,s){if(In(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(In(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),In(u)==="symbol"?u:String(u)),i)}var u}function Vr(){return Vr=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,n,p){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=_r(a))!==null;);return a}(l,n);if(i){var u=Object.getOwnPropertyDescriptor(i,n);return u.get?u.get.call(arguments.length<3?l:p):u.value}},Vr.apply(this,arguments)}function Bi(l,n){return Bi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},Bi(l,n)}function _r(l){return _r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},_r(l)}var Ga=function(l){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Bi(t,e)})(s,l);var n,p,i,u,a=(i=s,u=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=_r(i);if(u){var o=_r(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(In(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(p=[{key:"setValue",value:function(t,e,o){var c=Vr(_r(s.prototype),"setValue",this).call(this,t,e,o);c!==void 0&&c.changed&&this.jodit_instance&&this.jodit_instance.setEditorValue(c.value)}},{key:"build",value:function(){this.options.format="textarea",Vr(_r(s.prototype),"build",this).call(this),this.input_type=this.schema.format,this.input.setAttribute("data-schemaformat",this.input_type)}},{key:"afterInputReady",value:function(){var t,e=this;window.Jodit?(t=this.expandCallbacks("jodit",x({},{height:300},this.defaults.options.jodit||{},this.options.jodit||{})),this.jodit_instance=new window.Jodit(this.input,t),(this.schema.readOnly||this.schema.readonly||this.schema.template)&&this.jodit_instance.setReadOnly(!0),this.jodit_instance.events.on("change",function(){e.value=e.jodit_instance.getEditorValue(),e.is_dirty=!0,e.onChange(!0)}),this.theme.afterInputReady(this.input)):Vr(_r(s.prototype),"afterInputReady",this).call(this)}},{key:"getNumColumns",value:function(){return 6}},{key:"enable",value:function(){!this.always_disabled&&this.jodit_instance&&this.jodit_instance.setReadOnly(!1),Vr(_r(s.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.jodit_instance&&this.jodit_instance.setReadOnly(!0),Vr(_r(s.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.jodit_instance&&(this.jodit_instance.destruct(),this.jodit_instance=null),Vr(_r(s.prototype),"destroy",this).call(this)}}])&&Fs(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(Q),Wa=(k(6541),k(9337),k(3321),function(l){var n=l.split(".");if(n.length!==4)throw new Error("error_ipv4");n.forEach(function(p){if(isNaN(+p)||+p<0||+p>255)throw new Error("error_ipv4")})}),Fo=function(l){if(!l.match("^(?:(?:(?:[a-fA-F0-9]{1,4}:){6}|(?=(?:[a-fA-F0-9]{0,4}:){2,6}(?:[0-9]{1,3}.){3}[0-9]{1,3}$)(([0-9a-fA-F]{1,4}:){1,5}|:)((:[0-9a-fA-F]{1,4}){1,5}:|:)|::(?:[a-fA-F0-9]{1,4}:){5})(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9]).){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])|(?:[a-fA-F0-9]{1,4}:){7}[a-fA-F0-9]{1,4}|(?=(?:[a-fA-F0-9]{0,4}:){0,7}[a-fA-F0-9]{0,4}$)(([0-9a-fA-F]{1,4}:){1,7}|:)((:[0-9a-fA-F]{1,4}){1,7}|:)|(?:[a-fA-F0-9]{1,4}:){7}:|:(:[a-fA-F0-9]{1,4}){7})$"))throw new Error("error_ipv6")},Ho=function(l){if(!l.match("(?=^.{4,253}$)(^((?!-)[a-zA-Z0-9-]{0,62}[a-zA-Z0-9].)+[a-zA-Z]{2,63}$)"))throw new Error("error_hostname")};function Vo(l,n,p,i){try{switch(l.format){case"ipv4":Wa(n);break;case"ipv6":Fo(n);break;case"hostname":Ho(n)}return[]}catch(u){return[{path:p,property:"format",message:i(u.message)}]}}function Di(l,n){var p=Object.keys(l);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(l);n&&(i=i.filter(function(u){return Object.getOwnPropertyDescriptor(l,u).enumerable})),p.push.apply(p,i)}return p}function zo(l,n,p){return(n=Ni(n))in l?Object.defineProperty(l,n,{value:p,enumerable:!0,configurable:!0,writable:!0}):l[n]=p,l}function ri(l,n){return function(p){if(Array.isArray(p))return p}(l)||function(p,i){var u=p==null?null:typeof Symbol<"u"&&p[Symbol.iterator]||p["@@iterator"];if(u!=null){var a,s,t,e,o=[],c=!0,d=!1;try{if(t=(u=u.call(p)).next,i===0){if(Object(u)!==u)return;c=!1}else for(;!(c=(a=t.call(u)).done)&&(o.push(a.value),o.length!==i);c=!0);}catch(_){d=!0,s=_}finally{try{if(!c&&u.return!=null&&(e=u.return(),Object(e)!==e))return}finally{if(d)throw s}}return o}}(l,n)||ni(l,n)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
58
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function
|
|
59
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function ni(l,n){if(l){if(typeof l=="string")return ii(l,n);var p=Object.prototype.toString.call(l).slice(8,-1);return p==="Object"&&l.constructor&&(p=l.constructor.name),p==="Map"||p==="Set"?Array.from(l):p==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(p)?ii(l,n):void 0}}function ii(l,n){(n==null||n>l.length)&&(n=l.length);for(var p=0,i=new Array(n);p<n;p++)i[p]=l[p];return i}function qo(l,n){for(var p=0;p<n.length;p++){var i=n[p];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(l,Ni(i.key),i)}}function Ni(l){var n=function(p,i){if(lr(p)!=="object"||p===null)return p;var u=p[Symbol.toPrimitive];if(u!==void 0){var a=u.call(p,"string");if(lr(a)!=="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(p)}(l);return lr(n)==="symbol"?n:String(n)}var $i=function(){function l(i,u,a,s){(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,l),this.jsoneditor=i,this.schema=u||this.jsoneditor.schema,this.options=a||{},this.translate=this.jsoneditor.translate||s.translate,this.translateProperty=this.jsoneditor.translateProperty||s.translateProperty,this.defaults=s,this._validateSubSchema={dependentRequired:function(t,e,o){var c=[];if(t.dependentRequired!==void 0){var d=[];Object.keys(t.dependentRequired).forEach(function(_){if(e[_]!==void 0){var P=t.dependentRequired[_];d=P.filter(function(D){return!C(e,D)})}}),d.length>0&&c.push({message:"Must have the required properties: "+d.join(", "),path:o})}return c},dependentSchemas:function(t,e,o){var c=this,d=[];return Object.keys(t.dependentSchemas).forEach(function(_){if(e[_]!==void 0){var P=t.dependentSchemas[_],D=c._validateSchema(P,e,o);d=[].concat(be(d),be(D))}}),d},contains:function(t,e,o){var c=this,d=[],_=0;e.forEach(function(D){c._validateSchema(t.contains,D,o).length===0&&_++});var P=_===0;return t.minContains!==void 0?_<t.minContains&&d.push({message:this.translate("error_minContains",[_,t.minContains],t),path:o}):P&&d.push({message:this.translate("error_contains",null,t),path:o}),t.maxContains!==void 0&&_>t.maxContains&&d.push({message:this.translate("error_maxContains",[_,t.maxContains],t),path:o}),d},if:function(t,e,o){if(t.then===void 0&&t.else===void 0)return[];var c=this._validateSchema(t.if,e,o),d=[],_=[];return t.then!==void 0&&(d=this._validateSchema(t.then,e,o)),t.else!==void 0&&(_=this._validateSchema(t.else,e,o)),t.if===!0?d:t.if===!1?_:c.length===0?d:c.length>0?_:[]},const:function(t,e,o){return JSON.stringify(t.const)!==JSON.stringify(e)||Array.isArray(e)||lr(e)==="object"?[{path:o,property:"const",message:this.translate("error_const",null,t)}]:[]},enum:function(t,e,o){var c=JSON.stringify(e);return t.enum.some(function(d){return c===JSON.stringify(d)})?[]:[{path:o,property:"enum",message:this.translate("error_enum",null,t)}]},extends:function(t,e,o){var c=this;return t.extends.reduce(function(d,_){return d.push.apply(d,be(c._validateSchema(_,e,o))),d},[])},allOf:function(t,e,o){var c=this;return t.allOf.reduce(function(d,_){return d.push.apply(d,be(c._validateSchema(_,e,o))),d},[])},anyOf:function(t,e,o){var c=this;return t.anyOf.some(function(d){return!c._validateSchema(d,e,o).length})?[]:[{path:o,property:"anyOf",message:this.translate("error_anyOf",null,t)}]},oneOf:function(t,e,o){var c=this,d=0,_=[];t.oneOf.forEach(function(D,J){var nt=c._validateSchema(D,e,o);nt.length||d++,nt.forEach(function(ut){ut.path="".concat(o,".oneOf[").concat(J,"]").concat(ut.path.substr(o.length))}),_.push.apply(_,be(nt))});var P=[];return d!==1&&(P.push({path:o,property:"oneOf",message:this.translate("error_oneOf",[d],t)}),P.push.apply(P,_)),P},not:function(t,e,o){return this._validateSchema(t.not,e,o).length?[]:[{path:o,property:"not",message:this.translate("error_not",null,t)}]},type:function(t,e,o){var c=this;if(Array.isArray(t.type)){if(!t.type.some(function(d){return c._checkType(d,e)}))return[{path:o,property:"type",message:this.translate("error_type_union",null,t)}]}else if(["date","time","datetime-local"].includes(t.format)&&t.type==="integer"){if(!this._checkType("string","".concat(e)))return[{path:o,property:"type",message:this.translate("error_type",[t.format],t)}]}else if(!this._checkType(t.type,e))return[{path:o,property:"type",message:this.translate("error_type",[t.type],t)}];return[]},disallow:function(t,e,o){var c=this;if(Array.isArray(t.disallow)){if(t.disallow.some(function(d){return c._checkType(d,e)}))return[{path:o,property:"disallow",message:this.translate("error_disallow_union",null,t)}]}else if(this._checkType(t.disallow,e))return[{path:o,property:"disallow",message:this.translate("error_disallow",[t.disallow],t)}];return[]}},this._validateNumberSubSchema={multipleOf:function(t,e,o){return this._validateNumberSubSchemaMultipleDivisible(t,e,o)},divisibleBy:function(t,e,o){return this._validateNumberSubSchemaMultipleDivisible(t,e,o)},maximum:function(t,e,o){var c=t.exclusiveMaximum?e<t.maximum:e<=t.maximum;return window.math?c=window.math[t.exclusiveMaximum?"smaller":"smallerEq"](window.math.bignumber(e),window.math.bignumber(t.maximum)):window.Decimal&&(c=new window.Decimal(e)[t.exclusiveMaximum?"lt":"lte"](new window.Decimal(t.maximum))),c?[]:[{path:o,property:"maximum",message:this.translate(t.exclusiveMaximum?"error_maximum_excl":"error_maximum_incl",[t.maximum],t)}]},minimum:function(t,e,o){var c=t.exclusiveMinimum?e>t.minimum:e>=t.minimum;return window.math?c=window.math[t.exclusiveMinimum?"larger":"largerEq"](window.math.bignumber(e),window.math.bignumber(t.minimum)):window.Decimal&&(c=new window.Decimal(e)[t.exclusiveMinimum?"gt":"gte"](new window.Decimal(t.minimum))),c?[]:[{path:o,property:"minimum",message:this.translate(t.exclusiveMinimum?"error_minimum_excl":"error_minimum_incl",[t.minimum],t)}]}},this._validateStringSubSchema={maxLength:function(t,e,o){var c=[];return"".concat(e).length>t.maxLength&&c.push({path:o,property:"maxLength",message:this.translate("error_maxLength",[t.maxLength],t)}),c},minLength:function(t,e,o){return"".concat(e).length<t.minLength?[{path:o,property:"minLength",message:this.translate(t.minLength===1?"error_notempty":"error_minLength",[t.minLength],t)}]:[]},pattern:function(t,e,o){return new RegExp(t.pattern).test(e)?[]:[{path:o,property:"pattern",message:t.options&&t.options.patternmessage?t.options.patternmessage:this.translate("error_pattern",[t.pattern],t)}]}},this._validateArraySubSchema={items:function(t,e,o){var c=this,d=[];if(Array.isArray(t.items))for(var _=0;_<e.length;_++)if(t.items[_])d.push.apply(d,be(this._validateSchema(t.items[_],e[_],"".concat(o,".").concat(_))));else{if(t.additionalItems===!0)break;if(!t.additionalItems){if(t.additionalItems===!1){d.push({path:o,property:"additionalItems",message:this.translate("error_additionalItems",null,t)});break}break}d.push.apply(d,be(this._validateSchema(t.additionalItems,e[_],"".concat(o,".").concat(_))))}else e.forEach(function(P,D){d.push.apply(d,be(c._validateSchema(t.items,P,"".concat(o,".").concat(D))))});return d},maxItems:function(t,e,o){return e.length>t.maxItems?[{path:o,property:"maxItems",message:this.translate("error_maxItems",[t.maxItems],t)}]:[]},minItems:function(t,e,o){return e.length<t.minItems?[{path:o,property:"minItems",message:this.translate("error_minItems",[t.minItems],t)}]:[]},uniqueItems:function(t,e,o){for(var c={},d=0;d<e.length;d++){var _=JSON.stringify(e[d]);if(c[_])return[{path:o,property:"uniqueItems",message:this.translate("error_uniqueItems",null,t)}];c[_]=!0}return[]}},this._validateObjectSubSchema={maxProperties:function(t,e,o){return Object.keys(e).length>t.maxProperties?[{path:o,property:"maxProperties",message:this.translate("error_maxProperties",[t.maxProperties],t)}]:[]},minProperties:function(t,e,o){return Object.keys(e).length<t.minProperties?[{path:o,property:"minProperties",message:this.translate("error_minProperties",[t.minProperties],t)}]:[]},required:function(t,e,o){var c=this,d=[];return Array.isArray(t.required)&&t.required.forEach(function(_){if(e[_]===void 0){var P=c.jsoneditor.getEditor("".concat(o,".").concat(_));P&&P.dependenciesFulfilled===!1||P&&["button","info"].includes(P.schema.format||P.schema.type)||d.push({path:o,property:"required",message:c.translate("error_required",[t&&t.properties&&t.properties[_]&&t.properties[_].title?t.properties[_].title:_],t)})}}),d},properties:function(t,e,o,c){var d=this,_=[];return Object.entries(t.properties).forEach(function(P){var D=ri(P,2),J=D[0],nt=D[1];c[J]=!0,_.push.apply(_,be(d._validateSchema(nt,e[J],"".concat(o,".").concat(J))))}),_},patternProperties:function(t,e,o,c){var d=this,_=[];return Object.entries(t.patternProperties).forEach(function(P){var D=ri(P,2),J=D[0],nt=D[1],ut=new RegExp(J);Object.entries(e).forEach(function(dt){var kt=ri(dt,2),Ct=kt[0],Nt=kt[1];ut.test(Ct)&&(c[Ct]=!0,_.push.apply(_,be(d._validateSchema(nt,Nt,"".concat(o,".").concat(Ct)))))})}),_}},this._validateObjectSubSchema2={propertyNames:function(t,e,o,c){for(var d=this,_=[],P=Object.keys(e),D=null,J=function(){var dt="";return D=P[nt],typeof t.propertyNames=="boolean"?t.propertyNames===!0?"continue":(_.push({path:o,property:"propertyNames",message:d.translate("error_property_names_false",[D],t)}),"break"):Object.entries(t.propertyNames).every(function(kt){var Ct=ri(kt,2),Nt=Ct[0],re=Ct[1],Pe=!1;switch(Nt){case"maxLength":if(typeof re!="number"){dt="error_property_names_maxlength";break}if(D.length>re){dt="error_property_names_exceeds_maxlength";break}return!0;case"const":if(re!==D){dt="error_property_names_const_mismatch";break}return!0;case"enum":if(!Array.isArray(re)){dt="error_property_names_enum";break}if(re.forEach(function(Ut){Ut===D&&(Pe=!0)}),!Pe){dt="error_property_names_enum_mismatch";break}return!0;case"pattern":if(typeof re!="string"){dt="error_property_names_pattern";break}if(!new RegExp(re).test(D)){dt="error_property_names_pattern_mismatch";break}return!0;default:return _.push({path:o,property:"propertyNames",message:d.translate("error_property_names_unsupported",[Nt],t)}),!1}return _.push({path:o,property:"propertyNames",message:d.translate(dt,[D],t)}),!1})?void 0:"break"},nt=0;nt<P.length;nt++){var ut=J();if(ut!=="continue"&&ut==="break")break}return _},additionalProperties:function(t,e,o,c){for(var d=[],_=Object.keys(e),P=0;P<_.length;P++){var D=_[P];if(!c[D]){if(!t.additionalProperties){d.push({path:o,property:"additionalProperties",message:this.translate("error_additional_properties",[D],t)});break}if(t.additionalProperties===!0)break;d.push.apply(d,be(this._validateSchema(t.additionalProperties,e[D],"".concat(o,".").concat(D))))}}return d},dependencies:function(t,e,o){var c=this,d=[];return Object.entries(t.dependencies).forEach(function(_){var P=ri(_,2),D=P[0],J=P[1];e[D]!==void 0&&(Array.isArray(J)?J.forEach(function(nt){e[nt]===void 0&&d.push({path:o,property:"dependencies",message:c.translate("error_dependency",[nt],t)})}):d.push.apply(d,be(c._validateSchema(J,e,o))))}),d}}}var n,p;return n=l,p=[{key:"fitTest",value:function(i,u){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1e7,s={match:0,extra:0};if(lr(i)==="object"&&i!==null){var t=this._getSchema(u);if(t.anyOf){var e,o=function(nt){for(var ut=1;ut<arguments.length;ut++){var dt=arguments[ut]!=null?arguments[ut]:{};ut%2?Di(Object(dt),!0).forEach(function(kt){zo(nt,kt,dt[kt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(nt,Object.getOwnPropertyDescriptors(dt)):Di(Object(dt)).forEach(function(kt){Object.defineProperty(nt,kt,Object.getOwnPropertyDescriptor(dt,kt))})}return nt}({},s),c=function(nt,ut){var dt=typeof Symbol<"u"&&nt[Symbol.iterator]||nt["@@iterator"];if(!dt){if(Array.isArray(nt)||(dt=ni(nt))){dt&&(nt=dt);var kt=0,Ct=function(){};return{s:Ct,n:function(){return kt>=nt.length?{done:!0}:{done:!1,value:nt[kt++]}},e:function(Ut){throw Ut},f:Ct}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
60
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Nt,re=!0,Pe=!1;return{s:function(){dt=dt.call(nt)},n:function(){var Ut=dt.next();return re=Ut.done,Ut},e:function(Ut){Pe=!0,Nt=Ut},f:function(){try{re||dt.return==null||dt.return()}finally{if(Pe)throw Nt}}}}(t.anyOf);try{for(c.s();!(e=c.n()).done;){var d=e.value,_=this.fitTest(i,d,a);(_.match>o.match||_.match===o.match&&_.extra<o.extra)&&(o=_)}}catch(nt){c.e(nt)}finally{c.f()}return o}var P=this._getSchema(u).properties;for(var D in P)if(C(P,D)){if(lr(i[D])==="object"&&lr(P[D])==="object"&&lr(P[D].properties)==="object"){var J=this.fitTest(i[D],P[D],a/100);s.match+=J.match,s.extra+=J.extra}i[D]!==void 0&&(s.match+=a)}else s.extra+=a}return s}},{key:"_getSchema",value:function(i){return i===void 0?x({},this.jsoneditor.expandRefs(this.schema)):i}},{key:"validate",value:function(i){return this._validateSchema(this.schema,i)}},{key:"_validateSchema",value:function(i,u,a){var s=this,t=[];return a=a||this.jsoneditor.root.formname,i=x({},this.jsoneditor.expandRefs(i)),u===void 0?this._validateV3Required(i,u,a):(Object.keys(i).forEach(function(e){s._validateSubSchema[e]&&t.push.apply(t,be(s._validateSubSchema[e].call(s,i,u,a)))}),t.push.apply(t,be(this._validateByValueType(i,u,a))),i.links&&i.links.forEach(function(e,o){e.rel&&e.rel.toLowerCase()==="describedby"&&(i=s._expandSchemaLink(i,o),t.push.apply(t,be(s._validateSchema(i,u,a,s.translate))))}),["date","time","datetime-local"].includes(i.format)&&t.push.apply(t,be(this._validateDateTimeSubSchema(i,u,a))),["uuid"].includes(i.format)&&t.push.apply(t,be(this._validateUUIDSchema(i,u,a))),t.push.apply(t,be(this._validateCustomValidator(i,u,a))),this._removeDuplicateErrors(t))}},{key:"_expandSchemaLink",value:function(i,u){var a=i.links[u].href,s=this.jsoneditor.root.getValue(),t=this.jsoneditor.compileTemplate(a,this.jsoneditor.template),e=document.location.origin+document.location.pathname+t(s);return i.links=i.links.slice(0,u).concat(i.links.slice(u+1)),x({},i,this.jsoneditor.refs[e])}},{key:"_validateV3Required",value:function(i,u,a){return(i.required!==void 0&&i.required===!0||i.required===void 0&&this.jsoneditor.options.required_by_default===!0)&&i.type!=="info"?[{path:a,property:"required",message:this.translate("error_notset",null,i)}]:[]}},{key:"_validateByValueType",value:function(i,u,a){var s=this,t=[];if(u===null)return t;if(typeof u=="number")Object.keys(i).forEach(function(o){s._validateNumberSubSchema[o]&&t.push.apply(t,be(s._validateNumberSubSchema[o].call(s,i,u,a)))});else if(typeof u=="string")Object.keys(i).forEach(function(o){s._validateStringSubSchema[o]&&t.push.apply(t,be(s._validateStringSubSchema[o].call(s,i,u,a)))});else if(Array.isArray(u))Object.keys(i).forEach(function(o){s._validateArraySubSchema[o]&&t.push.apply(t,be(s._validateArraySubSchema[o].call(s,i,u,a)))});else if(lr(u)==="object"){var e={};Object.keys(i).forEach(function(o){s._validateObjectSubSchema[o]&&t.push.apply(t,be(s._validateObjectSubSchema[o].call(s,i,u,a,e)))}),i.additionalProperties!==void 0||!this.jsoneditor.options.no_additional_properties||i.oneOf||i.anyOf||i.allOf||(i.additionalProperties=!1),Object.keys(i).forEach(function(o){s._validateObjectSubSchema2[o]!==void 0&&t.push.apply(t,be(s._validateObjectSubSchema2[o].call(s,i,u,a,e)))})}return t}},{key:"_validateUUIDSchema",value:function(i,u,a){return/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(u)?[]:[{path:a,property:"format",message:this.translate("error_pattern",["^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"],i)}]}},{key:"_validateNumberSubSchemaMultipleDivisible",value:function(i,u,a){var s=i.multipleOf||i.divisibleBy,t=u/s===Math.floor(u/s);return window.math?t=window.math.mod(window.math.bignumber(u),window.math.bignumber(s)).equals(0):window.Decimal&&(t=new window.Decimal(u).mod(new window.Decimal(s)).equals(0)),t?[]:[{path:a,property:i.multipleOf?"multipleOf":"divisibleBy",message:this.translate("error_multipleOf",[s],i)}]}},{key:"_validateDateTimeSubSchema",value:function(i,u,a){var s=this,t=this.jsoneditor.getEditor(a),e=t&&t.flatpickr?t.flatpickr.config.dateFormat:{date:'"YYYY-MM-DD"',time:'"HH:MM"',"datetime-local":'"YYYY-MM-DD HH:MM"'}[i.format];if(i.type==="integer")return function(o,c,d){return 1*c<1?[{path:d,property:"format",message:s.translate("error_invalid_epoch",null,o)}]:c!==Math.abs(parseInt(c))?[{path:d,property:"format",message:s.translate("error_".concat(o.format.replace(/-/g,"_")),[e],o)}]:[]}(i,u,a);if(t&&t.flatpickr){if(t)return function(o,c,d,_){if(c!==""){var P;if(_.flatpickr.config.mode!=="single"){var D=_.flatpickr.config.mode==="range"?_.flatpickr.l10n.rangeSeparator:", ";P=_.flatpickr.selectedDates.map(function(nt){return _.flatpickr.formatDate(nt,_.flatpickr.config.dateFormat)}).join(D)}try{if(P){if(P!==c)throw new Error("".concat(_.flatpickr.config.mode," mismatch"))}else if(_.flatpickr.formatDate(_.flatpickr.parseDate(c,_.flatpickr.config.dateFormat),_.flatpickr.config.dateFormat)!==c)throw new Error("mismatch")}catch{var J=_.flatpickr.config.errorDateFormat!==void 0?_.flatpickr.config.errorDateFormat:_.flatpickr.config.dateFormat;return[{path:d,property:"format",message:s.translate("error_".concat(_.format.replace(/-/g,"_")),[J],o)}]}}return[]}(i,u,a,t)}else if(!{date:/^(\d{4}\D\d{2}\D\d{2})?$/,time:/^(\d{2}:\d{2}(?::\d{2})?)?$/,"datetime-local":/^(\d{4}\D\d{2}\D\d{2}[ T]\d{2}:\d{2}(?::\d{2})?)?$/}[i.format].test(u))return[{path:a,property:"format",message:this.translate("error_".concat(i.format.replace(/-/g,"_")),[e],i)}];return[]}},{key:"_validateCustomValidator",value:function(i,u,a){var s=this,t=[];t.push.apply(t,be(Vo.call(this,i,u,a,this.translate)));var e=function(o){t.push.apply(t,be(o.call(s,i,u,a)))};return this.defaults.custom_validators.forEach(e),this.options.custom_validators&&this.options.custom_validators.forEach(e),t}},{key:"_removeDuplicateErrors",value:function(i){return i.reduce(function(u,a){var s=!0;return u||(u=[]),u.forEach(function(t){t.message===a.message&&t.path===a.path&&t.property===a.property&&(t.errorcount++,s=!1)}),s&&(a.errorcount=1,u.push(a)),u},[])}},{key:"_checkType",value:function(i,u){var a={string:function(s){return typeof s=="string"},number:function(s){return typeof s=="number"},integer:function(s){return typeof s=="number"&&s===Math.floor(s)},boolean:function(s){return typeof s=="boolean"},array:function(s){return Array.isArray(s)},object:function(s){return s!==null&&!Array.isArray(s)&&lr(s)==="object"},null:function(s){return s===null}};return typeof i=="string"?!a[i]||a[i](u):!this._validateSchema(i,u).length}}],p&&qo(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),l}();function Ve(l){return Ve=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Ve(l)}function Dr(l,n){for(var p=0;p<n.length;p++){var i=n[p];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(l,(u=function(a,s){if(Ve(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Ve(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Ve(u)==="symbol"?u:String(u)),i)}var u}function Qr(){return Qr=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,n,p){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=cr(a))!==null;);return a}(l,n);if(i){var u=Object.getOwnPropertyDescriptor(i,n);return u.get?u.get.call(arguments.length<3?l:p):u.value}},Qr.apply(this,arguments)}function Uo(l,n){return Uo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},Uo(l,n)}function cr(l){return cr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},cr(l)}var Mi=function(l){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Uo(t,e)})(s,l);var n,p,i,u,a=(i=s,u=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=cr(i);if(u){var o=cr(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(Ve(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(p=[{key:"register",value:function(){if(this.editors){for(var t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].unregister();this.editors[this.type]&&this.editors[this.type].register()}Qr(cr(s.prototype),"register",this).call(this)}},{key:"unregister",value:function(){if(Qr(cr(s.prototype),"unregister",this).call(this),this.editors)for(var t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].unregister()}},{key:"getNumColumns",value:function(){return this.editors[this.type]?Math.max(this.editors[this.type].getNumColumns(),4):4}},{key:"enable",value:function(){if(!this.always_disabled){if(this.editors)for(var t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].enable();this.switcher.disabled=!1,Qr(cr(s.prototype),"enable",this).call(this)}}},{key:"disable",value:function(t){if(t&&(this.always_disabled=!0),this.editors)for(var e=0;e<this.editors.length;e++)this.editors[e]&&this.editors[e].disable(t);this.switcher.disabled=!0,Qr(cr(s.prototype),"disable",this).call(this)}},{key:"switchEditor",value:function(t){var e=this;this.lastType=this.type,this.editors[t]||this.buildChildEditor(t);var o=this.getValue();this.type=t,this.register(),this.editors.forEach(function(c,d){var _,P;c&&(e.type===d?(e.keep_only_existing_values&&(_=c.getValue(),P=o,Object.keys(P).forEach(function(D){D in _&&(_[D]=P[D])}),o=_),(e.keep_values||e.if)&&c.setValue(o,!0),c.container.style.display=""):c.container.style.display="none")}),this.refreshValue(),this.refreshHeaderText()}},{key:"buildChildEditor",value:function(t){var e,o=this,c=this.types[t],d=this.theme.getChildEditorHolder();this.editor_holder.appendChild(d),typeof c=="string"?(e=x({},this.schema)).type=c:(e=x({},this.schema,c),e=this.jsoneditor.expandRefs(e),c&&c.required&&Array.isArray(c.required)&&this.schema.required&&Array.isArray(this.schema.required)&&(e.required=this.schema.required.concat(c.required)));var _=this.jsoneditor.getEditorClass(e);this.editors[t]=this.jsoneditor.createEditor(_,{jsoneditor:this.jsoneditor,schema:e,container:d,path:this.path,parent:this,required:!0}),this.editors[t].preBuild(),this.editors[t].build(),this.editors[t].postBuild(),this.editors[t].header&&(this.editors[t].header.style.display="none"),this.editors[t].option=this.switcher_options[t],d.addEventListener("change_header_text",function(){o.refreshHeaderText()}),t!==this.type&&(d.style.display="none")}},{key:"preBuild",value:function(){if(this.types=[],this.type=0,this.editors=[],this.validators=[],this.keep_values=!0,this.jsoneditor.options.keep_oneof_values!==void 0&&(this.keep_values=this.jsoneditor.options.keep_oneof_values),this.options.keep_oneof_values!==void 0&&(this.keep_values=this.options.keep_oneof_values),this.keep_only_existing_values=!1,this.jsoneditor.options.keep_only_existing_values!==void 0&&(this.keep_only_existing_values=this.jsoneditor.options.keep_only_existing_values),this.options.keep_only_existing_values!==void 0&&(this.keep_only_existing_values=this.options.keep_only_existing_values),this.schema.oneOf)this.oneOf=!0,this.types=this.schema.oneOf,delete this.schema.oneOf;else if(this.schema.anyOf)this.anyOf=!0,this.types=this.schema.anyOf,delete this.schema.anyOf;else if(this.schema.if)this.if=!0,this.ifSchema=JSON.parse(JSON.stringify(this.schema.if)),this.thenSchema={title:"then"},this.elseSchema={title:"else"},this.types=[],this.schema.then&&$(this.thenSchema,this.schema,this.schema.then),this.schema.else&&$(this.elseSchema,this.schema,this.schema.else),this.types.push(this.thenSchema),this.types.push(this.elseSchema),this.types.forEach(function(o){delete o.if,delete o.then,delete o.else}),delete this.schema.if;else{if(this.schema.type&&this.schema.type!=="any")Array.isArray(this.schema.type)?this.types=this.schema.type:this.types=[this.schema.type];else if(this.types=["string","number","integer","boolean","object","array","null"],this.schema.disallow){var t=this.schema.disallow;Ve(t)==="object"&&Array.isArray(t)||(t=[t]);var e=[];this.types.forEach(function(o){t.includes(o)||e.push(o)}),this.types=e}delete this.schema.type}this.display_text=this.getDisplayText(this.types)}},{key:"build",value:function(){var t=this,e=this.container;this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired()),this.switcher=this.theme.getSwitcher(this.display_text),this.if||(this.container.appendChild(this.header),e.appendChild(this.switcher)),this.switcher.addEventListener("change",function(c){c.preventDefault(),c.stopPropagation(),t.switchEditor(t.display_text.indexOf(c.currentTarget.value)),t.onChange(!0)}),this.editor_holder=document.createElement("div"),e.appendChild(this.editor_holder);var o={};this.jsoneditor.options.custom_validators&&(o.custom_validators=this.jsoneditor.options.custom_validators),this.switcher_options=this.theme.getSwitcherOptions(this.switcher),this.types.forEach(function(c,d){var _;t.editors[d]=!1,typeof c=="string"?(_=x({},t.schema)).type=c:(_=x({},t.schema,c),c.required&&Array.isArray(c.required)&&t.schema.required&&Array.isArray(t.schema.required)&&(_.required=t.schema.required.concat(c.required))),t.validators[d]=new $i(t.jsoneditor,_,o,t.defaults)}),this.jsoneditor.on("change",function(){t.switchIf()}),this.switchEditor(0)}},{key:"onChildEditorChange",value:function(t){this.editors[this.type]&&(this.refreshValue(),this.refreshHeaderText()),Qr(cr(s.prototype),"onChildEditorChange",this).call(this)}},{key:"refreshHeaderText",value:function(){var t=this.getDisplayText(this.types);Array.from(this.switcher_options).forEach(function(e,o){e.textContent=t[o]})}},{key:"refreshValue",value:function(){this.editors[this.type]&&(this.value=this.editors[this.type].getValue())}},{key:"switchIf",value:function(){if(this.ifSchema&&this.value){var t=this.getIfType(this.value);this.lastType!==t&&(this.switchEditor(t),this.editors[this.type].setValue(this.value,!0)),this.switcher.value=this.display_text[this.type]}}},{key:"getIfType",value:function(t){return this.jsoneditor.validator._validateSchema(this.ifSchema,t).length===0?0:1}},{key:"setValue",value:function(t,e){var o=this,c=this.type,d={match:0,extra:0,i:this.type},_={match:0,i:null};this.validators.forEach(function(J,nt){var ut=null;o.anyOf!==void 0&&o.anyOf&&(ut=J.fitTest(t),(d.match<ut.match||d.match===ut.match&&d.extra>ut.extra)&&((d=ut).i=nt)),J.validate(t).length||_.i!==null?d=_:(_.i=nt,ut!==null&&(_.match=ut.match))});var P=_.i;this.anyOf!==void 0&&this.anyOf&&_.match<d.match&&(P=d.i),this.if&&(P=this.getIfType(t)),P===null&&(P=this.type),this.type=P,this.switcher.value=this.display_text[P];var D=this.type!==c;D&&(this.switchEditor(this.type),this.editors[this.type].setValue(t,e)),t!==void 0&&this.editors[this.type].setValue(t,e),this.refreshValue(),this.onChange(D)}},{key:"destroy",value:function(){this.editors.forEach(function(t){t&&t.destroy()}),this.editor_holder&&this.editor_holder.parentNode&&this.editor_holder.parentNode.removeChild(this.editor_holder),this.switcher&&this.switcher.parentNode&&this.switcher.parentNode.removeChild(this.switcher),Qr(cr(s.prototype),"destroy",this).call(this)}},{key:"showValidationErrors",value:function(t){var e=this;if(this.oneOf||this.anyOf){var o=this.oneOf?"oneOf":"anyOf";this.editors.forEach(function(c,d){if(c){var _="".concat(e.path,".").concat(o,"[").concat(d,"]");c.showValidationErrors(t.reduce(function(P,D){if(D.path.startsWith(_)||D.path===_.substr(0,D.path.length)){var J=x({},D);D.path.startsWith(_)&&(J.path=e.path+J.path.substr(_.length)),P.push(J)}return P},[]))}})}else this.editors.forEach(function(c){c&&c.showValidationErrors(t)})}},{key:"addLinks",value:function(){}}])&&Dr(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(H);function yn(l){return yn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},yn(l)}function Fi(l,n){for(var p=0;p<n.length;p++){var i=n[p];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(l,(u=function(a,s){if(yn(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(yn(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),yn(u)==="symbol"?u:String(u)),i)}var u}function Bn(l,n){return Bn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},Bn(l,n)}function Dn(l){return Dn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Dn(l)}var Go=function(l){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Bn(t,e)})(s,l);var n,p,i,u,a=(i=s,u=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Dn(i);if(u){var o=Dn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(yn(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(p=[{key:"getValue",value:function(){if(this.dependenciesFulfilled)return null}},{key:"setValue",value:function(){this.onChange()}},{key:"getNumColumns",value:function(){return 2}}])&&Fi(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(H);function Hi(l,n){var p=Object.keys(l);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(l);n&&(i=i.filter(function(u){return Object.getOwnPropertyDescriptor(l,u).enumerable})),p.push.apply(p,i)}return p}function Kr(l){for(var n=1;n<arguments.length;n++){var p=arguments[n]!=null?arguments[n]:{};n%2?Hi(Object(p),!0).forEach(function(i){oi(l,i,p[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(l,Object.getOwnPropertyDescriptors(p)):Hi(Object(p)).forEach(function(i){Object.defineProperty(l,i,Object.getOwnPropertyDescriptor(p,i))})}return l}function oi(l,n,p){return(n=zi(n))in l?Object.defineProperty(l,n,{value:p,enumerable:!0,configurable:!0,writable:!0}):l[n]=p,l}function mn(l,n){return function(p){if(Array.isArray(p))return p}(l)||function(p,i){var u=p==null?null:typeof Symbol<"u"&&p[Symbol.iterator]||p["@@iterator"];if(u!=null){var a,s,t,e,o=[],c=!0,d=!1;try{if(t=(u=u.call(p)).next,i===0){if(Object(u)!==u)return;c=!1}else for(;!(c=(a=t.call(u)).done)&&(o.push(a.value),o.length!==i);c=!0);}catch(_){d=!0,s=_}finally{try{if(!c&&u.return!=null&&(e=u.return(),Object(e)!==e))return}finally{if(d)throw s}}return o}}(l,n)||function(p,i){if(p){if(typeof p=="string")return Vi(p,i);var u=Object.prototype.toString.call(p).slice(8,-1);return u==="Object"&&p.constructor&&(u=p.constructor.name),u==="Map"||u==="Set"?Array.from(p):u==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u)?Vi(p,i):void 0}}(l,n)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
61
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Vi(l,n){(n==null||n>l.length)&&(n=l.length);for(var p=0,i=new Array(n);p<n;p++)i[p]=l[p];return i}function Cr(l){return Cr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Cr(l)}function Wo(l,n){for(var p=0;p<n.length;p++){var i=n[p];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(l,zi(i.key),i)}}function zi(l){var n=function(p,i){if(Cr(p)!=="object"||p===null)return p;var u=p[Symbol.toPrimitive];if(u!==void 0){var a=u.call(p,"string");if(Cr(a)!=="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(p)}(l);return Cr(n)==="symbol"?n:String(n)}function xr(){return xr=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,n,p){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=ur(a))!==null;);return a}(l,n);if(i){var u=Object.getOwnPropertyDescriptor(i,n);return u.get?u.get.call(arguments.length<3?l:p):u.value}},xr.apply(this,arguments)}function qi(l,n){return qi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},qi(l,n)}function ur(l){return ur=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ur(l)}var ai=function(l){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&qi(t,e)})(s,l);var n,p,i,u,a=(i=s,u=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=ur(i);if(u){var o=ur(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(Cr(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(t,e,o){var c;return function(d,_){if(!(d instanceof _))throw new TypeError("Cannot call a class as a function")}(this,s),(c=a.call(this,t,e)).currentDepth=o,c}return n=s,(p=[{key:"getDefault",value:function(){return x({},this.schema.default||{})}},{key:"getChildEditors",value:function(){return this.editors}},{key:"register",value:function(){xr(ur(s.prototype),"register",this).call(this),this.editors&&Object.values(this.editors).forEach(function(t){return t.register()})}},{key:"unregister",value:function(){xr(ur(s.prototype),"unregister",this).call(this),this.editors&&Object.values(this.editors).forEach(function(t){return t.unregister()})}},{key:"getNumColumns",value:function(){return Math.max(Math.min(12,this.maxwidth),3)}},{key:"enable",value:function(){this.always_disabled||(this.editjson_control&&(this.editjson_control.disabled=!1),this.addproperty_button&&(this.addproperty_button.disabled=!1),xr(ur(s.prototype),"enable",this).call(this),this.editors&&Object.values(this.editors).forEach(function(t){t.isActive()&&t.enable(),t.optInCheckbox.disabled=!1}))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.editjson_control&&(this.editjson_control.disabled=!0),this.addproperty_button&&(this.addproperty_button.disabled=!0),this.hideEditJSON(),xr(ur(s.prototype),"disable",this).call(this),this.editors&&Object.values(this.editors).forEach(function(e){e.isActive()&&e.disable(t),e.optInCheckbox.disabled=!0})}},{key:"layoutEditors",value:function(){var t,e,o=this;if(this.row_container){var c;this.property_order=Object.keys(this.editors),this.property_order=this.property_order.sort(function(Ut,gt){var Wt=o.editors[Ut].schema.propertyOrder,ze=o.editors[gt].schema.propertyOrder;return typeof Wt!="number"&&(Wt=1e3),typeof ze!="number"&&(ze=1e3),Wt-ze});var d,_=this.format==="categories",P=[],D=null,J=null;if(this.format==="grid-strict"){var nt=0;if(d=[],this.property_order.forEach(function(Ut){var gt=o.editors[Ut];if(!gt.property_removed){var Wt=gt.options.hidden?0:gt.options.grid_columns||gt.getNumColumns(),ze=gt.options.hidden?0:gt.options.grid_offset||0,W=!gt.options.hidden&&(gt.options.grid_break||!1),G={key:Ut,width:Wt,offset:ze,height:gt.options.hidden?0:gt.container.offsetHeight};d.push(G),P[nt]=d,W&&(nt++,d=[])}}),this.layout===JSON.stringify(P))return!1;for(this.layout=JSON.stringify(P),c=document.createElement("div"),t=0;t<P.length;t++)for(d=this.theme.getGridRow(),c.appendChild(d),e=0;e<P[t].length;e++)D=P[t][e].key,(J=this.editors[D]).options.hidden?J.container.style.display="none":this.theme.setGridColumnSize(J.container,P[t][e].width,P[t][e].offset),d.appendChild(J.container)}else if(this.format==="grid"){for(this.property_order.forEach(function(Ut){var gt=o.editors[Ut];if(!gt.property_removed){for(var Wt=!1,ze=gt.options.hidden?0:gt.options.grid_columns||gt.getNumColumns(),W=gt.options.hidden?0:gt.container.offsetHeight,G=0;G<P.length;G++)P[G].width+ze<=12&&(!W||.5*P[G].minh<W&&2*P[G].maxh>W)&&(Wt=G);Wt===!1&&(P.push({width:0,minh:999999,maxh:0,editors:[]}),Wt=P.length-1),P[Wt].editors.push({key:Ut,width:ze,height:W}),P[Wt].width+=ze,P[Wt].minh=Math.min(P[Wt].minh,W),P[Wt].maxh=Math.max(P[Wt].maxh,W)}}),t=0;t<P.length;t++)if(P[t].width<12){var ut=!1,dt=0;for(e=0;e<P[t].editors.length;e++)(ut===!1||P[t].editors[e].width>P[t].editors[ut].width)&&(ut=e),P[t].editors[e].width*=12/P[t].width,P[t].editors[e].width=Math.floor(P[t].editors[e].width),dt+=P[t].editors[e].width;dt<12&&(P[t].editors[ut].width+=12-dt),P[t].width=12}if(this.layout===JSON.stringify(P))return!1;for(this.layout=JSON.stringify(P),c=document.createElement("div"),t=0;t<P.length;t++)for(d=this.theme.getGridRow(),c.appendChild(d),e=0;e<P[t].editors.length;e++)D=P[t].editors[e].key,(J=this.editors[D]).options.hidden?J.container.style.display="none":this.theme.setGridColumnSize(J.container,P[t].editors[e].width),d.appendChild(J.container)}else{if(c=document.createElement("div"),_){var kt=document.createElement("div"),Ct=this.theme.getTopTabHolder(this.translateProperty(this.schema.title)),Nt=this.theme.getTopTabContentHolder(Ct);for(this.property_order.forEach(function(Ut){var gt=o.editors[Ut];if(!gt.property_removed){var Wt=o.theme.getTabContent(),ze=gt.schema&&(gt.schema.type==="object"||gt.schema.type==="array");Wt.isObjOrArray=ze;var W=o.theme.getGridRow();gt.tab||(o.basicPane===void 0?o.addRow(gt,Ct,Wt):o.addRow(gt,Ct,o.basicPane)),Wt.id=o.getValidId(gt.tab_text.textContent),ze?(Wt.appendChild(W),Nt.appendChild(Wt),o.theme.addTopTab(Ct,gt.tab)):(kt.appendChild(W),Nt.childElementCount>0?Nt.firstChild.isObjOrArray&&(Wt.appendChild(kt),Nt.insertBefore(Wt,Nt.firstChild),o.theme.insertBasicTopTab(gt.tab,Ct),gt.basicPane=Wt):(Wt.appendChild(kt),Nt.appendChild(Wt),o.theme.addTopTab(Ct,gt.tab),gt.basicPane=Wt)),gt.options.hidden?gt.container.style.display="none":o.theme.setGridColumnSize(gt.container,12),W.appendChild(gt.container),gt.rowPane=Wt}});this.tabPanesContainer.firstChild;)this.tabPanesContainer.removeChild(this.tabPanesContainer.firstChild);var re=this.tabs_holder.parentNode;re.removeChild(re.firstChild),re.appendChild(Ct),this.tabPanesContainer=Nt,this.tabs_holder=Ct;var Pe=this.theme.getFirstTab(this.tabs_holder);return void(Pe&&O(Pe,"click"))}this.property_order.forEach(function(Ut){var gt=o.editors[Ut];gt.property_removed||(d=o.theme.getGridRow(),c.appendChild(d),gt.options.hidden?gt.container.style.display="none":o.theme.setGridColumnSize(gt.container,12),d.appendChild(gt.container))})}for(;this.row_container.firstChild;)this.row_container.removeChild(this.row_container.firstChild);this.row_container.appendChild(c)}}},{key:"getPropertySchema",value:function(t){var e=this,o=this.schema.properties[t]||{};o=x({},o);var c=!!this.schema.properties[t];return this.schema.patternProperties&&Object.keys(this.schema.patternProperties).forEach(function(d){new RegExp(d).test(t)&&(o.allOf=o.allOf||[],o.allOf.push(e.schema.patternProperties[d]),c=!0)}),!c&&this.schema.additionalProperties&&Cr(this.schema.additionalProperties)==="object"&&(o=x({},this.schema.additionalProperties)),o}},{key:"preBuild",value:function(){var t=this;if(xr(ur(s.prototype),"preBuild",this).call(this),this.editors={},this.cached_editors={},this.format=this.options.layout||this.options.object_layout||this.schema.format||this.jsoneditor.options.object_layout||"normal",this.schema.properties=this.schema.properties||{},this.minwidth=0,this.maxwidth=0,this.options.table_row)Object.entries(this.schema.properties).forEach(function(e){var o=mn(e,2),c=o[0],d=o[1],_=t.jsoneditor.getEditorClass(d);t.editors[c]=t.jsoneditor.createEditor(_,{jsoneditor:t.jsoneditor,schema:d,path:"".concat(t.path,".").concat(c),parent:t,compact:!0,required:!0},t.currentDepth+1),t.editors[c].preBuild();var P=t.editors[c].options.hidden?0:t.editors[c].options.grid_columns||t.editors[c].getNumColumns();t.minwidth+=P,t.maxwidth+=P}),this.no_link_holder=!0;else{if(this.options.table)throw new Error("Not supported yet");this.schema.defaultProperties||(this.jsoneditor.options.display_required_only||this.options.display_required_only?this.schema.defaultProperties=Object.keys(this.schema.properties).filter(function(e){return t.isRequiredObject({key:e,schema:t.schema.properties[e]})}):this.schema.defaultProperties=Object.keys(this.schema.properties)),this.maxwidth+=1,Array.isArray(this.schema.defaultProperties)&&this.schema.defaultProperties.forEach(function(e){t.addObjectProperty(e,!0),t.editors[e]&&(t.minwidth=Math.max(t.minwidth,t.editors[e].options.grid_columns||t.editors[e].getNumColumns()),t.maxwidth+=t.editors[e].options.grid_columns||t.editors[e].getNumColumns())})}this.property_order=Object.keys(this.editors),this.property_order=this.property_order.sort(function(e,o){var c=t.editors[e].schema.propertyOrder,d=t.editors[o].schema.propertyOrder;return typeof c!="number"&&(c=1e3),typeof d!="number"&&(d=1e3),c-d})}},{key:"addTab",value:function(t){var e=this,o=this.rows[t].schema&&(this.rows[t].schema.type==="object"||this.rows[t].schema.type==="array");this.tabs_holder&&(this.rows[t].tab_text=document.createElement("span"),this.rows[t].tab_text.textContent=o?this.rows[t].getHeaderText():this.schema.basicCategoryTitle===void 0?"Basic":this.schema.basicCategoryTitle,this.rows[t].tab=this.theme.getTopTab(this.rows[t].tab_text,this.getValidId(this.rows[t].tab_text.textContent)),this.rows[t].tab.addEventListener("click",function(c){e.active_tab=e.rows[t].tab,e.refreshTabs(),c.preventDefault(),c.stopPropagation()}))}},{key:"addRow",value:function(t,e,o){var c=this.rows.length,d=t.schema.type==="object"||t.schema.type==="array";this.rows[c]=t,this.rows[c].rowPane=o,d?(this.addTab(c),this.theme.addTopTab(e,this.rows[c].tab)):this.basicTab===void 0?(this.addTab(c),this.basicTab=c,this.basicPane=o,this.theme.addTopTab(e,this.rows[c].tab)):(this.rows[c].tab=this.rows[this.basicTab].tab,this.rows[c].tab_text=this.rows[this.basicTab].tab_text,this.rows[c].rowPane=this.rows[this.basicTab].rowPane)}},{key:"refreshTabs",value:function(t){var e=this,o=this.basicTab!==void 0,c=!1;this.rows.forEach(function(d){d.tab&&d.rowPane&&d.rowPane.parentNode&&(o&&d.tab===e.rows[e.basicTab].tab&&c||(t?d.tab_text.textContent=d.getHeaderText():(o&&d.tab===e.rows[e.basicTab].tab&&(c=!0),d.tab===e.active_tab?e.theme.markTabActive(d):e.theme.markTabInactive(d))))})}},{key:"build",value:function(){var t=this,e=this.format==="categories";if(this.rows=[],this.active_tab=null,this.options.table_row)this.editor_holder=this.container,Object.entries(this.editors).forEach(function(c){var d=mn(c,2),_=d[0],P=d[1],D=t.theme.getTableCell();t.editor_holder.appendChild(D),P.setContainer(D),P.build(),P.postBuild(),P.setOptInCheckbox(P.header),P.setValue(P.getDefault(),!0),t.editors[_].options.hidden&&(D.style.display="none"),t.editors[_].options.input_width&&(D.style.width=t.editors[_].options.input_width)});else{if(this.options.table)throw new Error("Not supported yet");this.header="",this.options.compact||(this.header=document.createElement("label"),this.header.textContent=this.getTitle()),this.title=this.theme.getHeader(this.header,this.getPathDepth()),this.title.classList.add("je-object__title"),this.controls=this.theme.getButtonHolder(),this.controls.classList.add("je-object__controls"),this.container.appendChild(this.title),this.container.appendChild(this.controls),this.container.classList.add("je-object__container"),this.editjson_holder=this.theme.getModal(),this.editjson_textarea=this.theme.getTextareaInput(),this.editjson_textarea.classList.add("je-edit-json--textarea"),this.editjson_save=this.getButton("button_save","save","button_save"),this.editjson_save.classList.add("json-editor-btntype-save"),this.editjson_save.addEventListener("click",function(c){c.preventDefault(),c.stopPropagation(),t.saveJSON()}),this.editjson_copy=this.getButton("button_copy","copy","button_copy"),this.editjson_copy.classList.add("json-editor-btntype-copy"),this.editjson_copy.addEventListener("click",function(c){c.preventDefault(),c.stopPropagation(),t.copyJSON()}),this.editjson_cancel=this.getButton("button_cancel","cancel","button_cancel"),this.editjson_cancel.classList.add("json-editor-btntype-cancel"),this.editjson_cancel.addEventListener("click",function(c){c.preventDefault(),c.stopPropagation(),t.hideEditJSON()}),this.editjson_holder.appendChild(this.editjson_textarea),this.editjson_holder.appendChild(this.editjson_save),this.editjson_holder.appendChild(this.editjson_copy),this.editjson_holder.appendChild(this.editjson_cancel),this.addproperty_holder=this.theme.getModal(),this.addproperty_list=document.createElement("div"),this.addproperty_list.classList.add("property-selector"),this.addproperty_add=this.getButton("button_add","add","button_add"),this.addproperty_add.classList.add("json-editor-btntype-add"),this.addproperty_input=this.theme.getFormInputField("text"),this.addproperty_input.setAttribute("placeholder","Property name..."),this.addproperty_input.classList.add("property-selector-input"),this.addproperty_add.addEventListener("click",function(c){if(c.preventDefault(),c.stopPropagation(),t.addproperty_input.value){if(t.editors[t.addproperty_input.value])return void window.alert("there is already a property with that name");t.addObjectProperty(t.addproperty_input.value),t.editors[t.addproperty_input.value]&&t.editors[t.addproperty_input.value].disable(),t.onChange(!0)}}),this.addproperty_input.addEventListener("input",function(c){c.target.previousSibling.childNodes.forEach(function(d){var _=d.innerText,P=c.target.value;t.options.case_sensitive_property_search||t.jsoneditor.options.case_sensitive_property_search||(_=_.toLowerCase(),P=P.toLowerCase()),_.includes(P)?d.style.display="":d.style.display="none"})}),this.addproperty_holder.appendChild(this.addproperty_list),this.addproperty_holder.appendChild(this.addproperty_input),this.addproperty_holder.appendChild(this.addproperty_add);var o=document.createElement("div");o.style.clear="both",this.addproperty_holder.appendChild(o),this.onOutsideModalClickListener=this.onOutsideModalClick.bind(this),document.addEventListener("click",this.onOutsideModalClickListener,!0),this.schema.description&&(this.description=this.theme.getDescription(this.translateProperty(this.schema.description)),this.container.appendChild(this.description)),this.error_holder=document.createElement("div"),this.container.appendChild(this.error_holder),this.editor_holder=this.theme.getIndentedPanel(),this.container.appendChild(this.editor_holder),this.row_container=this.theme.getGridContainer(),e?(this.tabs_holder=this.theme.getTopTabHolder(this.getValidId(this.translateProperty(this.schema.title))),this.tabPanesContainer=this.theme.getTopTabContentHolder(this.tabs_holder),this.editor_holder.appendChild(this.tabs_holder)):(this.tabs_holder=this.theme.getTabHolder(this.getValidId(this.translateProperty(this.schema.title))),this.tabPanesContainer=this.theme.getTabContentHolder(this.tabs_holder),this.editor_holder.appendChild(this.row_container)),Object.values(this.editors).forEach(function(c){var d=t.theme.getTabContent(),_=t.theme.getGridColumn(),P=!(!c.schema||c.schema.type!=="object"&&c.schema.type!=="array");if(d.isObjOrArray=P,e){if(P){var D=t.theme.getGridContainer();D.appendChild(_),d.appendChild(D),t.tabPanesContainer.appendChild(d),t.row_container=D}else t.row_container_basic===void 0&&(t.row_container_basic=t.theme.getGridContainer(),d.appendChild(t.row_container_basic),t.tabPanesContainer.childElementCount===0?t.tabPanesContainer.appendChild(d):t.tabPanesContainer.insertBefore(d,t.tabPanesContainer.childNodes[1])),t.row_container_basic.appendChild(_);t.addRow(c,t.tabs_holder,d),d.id=t.getValidId(c.schema.title)}else t.row_container.appendChild(_);c.setContainer(_),c.build(),c.postBuild(),c.setOptInCheckbox(c.header)}),this.rows[0]&&O(this.rows[0].tab,"click"),this.collapsed=!1,this.collapse_control=this.getButton("","collapse","button_collapse"),this.collapse_control.classList.add("json-editor-btntype-toggle"),this.title.insertBefore(this.collapse_control,this.title.childNodes[0]),this.collapse_control.addEventListener("click",function(c){c.preventDefault(),c.stopPropagation(),t.collapsed?(t.editor_holder.style.display="",t.collapsed=!1,t.setButtonText(t.collapse_control,"","collapse","button_collapse")):(t.editor_holder.style.display="none",t.collapsed=!0,t.setButtonText(t.collapse_control,"","expand","button_expand"))}),this.options.collapsed&&O(this.collapse_control,"click"),this.schema.options&&this.schema.options.disable_collapse!==void 0?this.schema.options.disable_collapse&&(this.collapse_control.style.display="none"):this.jsoneditor.options.disable_collapse&&(this.collapse_control.style.display="none"),this.editjson_control=this.getButton("JSON","edit","button_edit_json"),this.editjson_control.classList.add("json-editor-btntype-editjson"),this.editjson_control.addEventListener("click",function(c){c.preventDefault(),c.stopPropagation(),t.toggleEditJSON()}),this.controls.appendChild(this.editjson_control),this.controls.insertBefore(this.editjson_holder,this.controls.childNodes[0]),this.schema.options&&this.schema.options.disable_edit_json!==void 0?this.schema.options.disable_edit_json&&(this.editjson_control.style.display="none"):this.jsoneditor.options.disable_edit_json&&(this.editjson_control.style.display="none"),this.addproperty_button=this.getButton("properties","edit_properties","button_object_properties"),this.addproperty_button.classList.add("json-editor-btntype-properties"),this.addproperty_button.addEventListener("click",function(c){c.preventDefault(),c.stopPropagation(),t.toggleAddProperty()}),this.controls.appendChild(this.addproperty_button),this.controls.insertBefore(this.addproperty_holder,this.controls.childNodes[1]),this.refreshAddProperties(),this.deactivateNonRequiredProperties()}this.options.table_row?(this.editor_holder=this.container,this.property_order.forEach(function(c){t.editor_holder.appendChild(t.editors[c].container)})):(this.layoutEditors(),this.layoutEditors())}},{key:"deactivateNonRequiredProperties",value:function(){var t=this,e=this.jsoneditor.options.show_opt_in,o=this.options.show_opt_in!==void 0,c=o&&this.options.show_opt_in===!0,d=o&&this.options.show_opt_in===!1;(c||!d&&e||!o&&e)&&Object.entries(this.editors).forEach(function(_){var P=mn(_,2),D=P[0],J=P[1];t.isRequiredObject(J)||t.editors[D].deactivate()})}},{key:"showEditJSON",value:function(){this.editjson_holder&&(this.hideAddProperty(),this.editjson_holder.style.left="".concat(this.editjson_control.offsetLeft,"px"),this.editjson_holder.style.top="".concat(this.editjson_control.offsetTop+this.editjson_control.offsetHeight,"px"),this.editjson_textarea.value=JSON.stringify(this.getValue(),null,2),this.disable(),this.editjson_holder.style.display="",this.editjson_control.disabled=!1,this.editing_json=!0)}},{key:"hideEditJSON",value:function(){this.editjson_holder&&this.editing_json&&(this.editjson_holder.style.display="none",this.enable(),this.editing_json=!1)}},{key:"copyJSON",value:function(){if(this.editjson_holder){var t=document.createElement("textarea");t.value=this.editjson_textarea.value,t.setAttribute("readonly",""),t.style.position="absolute",t.style.left="-9999px",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}}},{key:"saveJSON",value:function(){if(this.editjson_holder)try{var t=JSON.parse(this.editjson_textarea.value);this.setValue(t),this.hideEditJSON(),this.onChange(!0)}catch(e){throw window.alert("invalid JSON"),e}}},{key:"toggleEditJSON",value:function(){this.editing_json?this.hideEditJSON():this.showEditJSON()}},{key:"insertPropertyControlUsingPropertyOrder",value:function(t,e,o){var c;this.schema.properties[t]&&(c=this.schema.properties[t].propertyOrder),typeof c!="number"&&(c=1e3),e.propertyOrder=c;for(var d=0;d<o.childNodes.length;d++){var _=o.childNodes[d];if(e.propertyOrder<_.propertyOrder){this.addproperty_list.insertBefore(e,_),e=null;break}}e&&this.addproperty_list.appendChild(e)}},{key:"addPropertyCheckbox",value:function(t){var e,o=this,c=this.theme.getCheckbox();e=this.schema.properties[t]&&this.schema.properties[t].title?this.schema.properties[t].title:t;var d=this.theme.getCheckboxLabel(e),_=this.theme.getFormControl(d,c);return _.style.paddingBottom=_.style.marginBottom=_.style.paddingTop=_.style.marginTop=0,_.style.height="auto",this.insertPropertyControlUsingPropertyOrder(t,_,this.addproperty_list),c.checked=t in this.editors,c.addEventListener("change",function(){c.checked?o.addObjectProperty(t):o.removeObjectProperty(t),o.onChange(!0)}),this.addproperty_checkboxes[t]=c,c}},{key:"showAddProperty",value:function(){this.addproperty_holder&&(this.hideEditJSON(),this.addproperty_holder.style.left="".concat(this.addproperty_button.offsetLeft,"px"),this.addproperty_holder.style.top="".concat(this.addproperty_button.offsetTop+this.addproperty_button.offsetHeight,"px"),this.disable(),this.adding_property=!0,this.addproperty_button.disabled=!1,this.addproperty_holder.style.display="",this.refreshAddProperties())}},{key:"hideAddProperty",value:function(){this.addproperty_holder&&this.adding_property&&(this.addproperty_holder.style.display="none",this.enable(),this.adding_property=!1)}},{key:"toggleAddProperty",value:function(){this.adding_property?this.hideAddProperty():this.showAddProperty()}},{key:"removeObjectProperty",value:function(t){this.editors[t]&&(this.editors[t].unregister(),delete this.editors[t],this.refreshValue(),this.layoutEditors())}},{key:"getSchemaOnMaxDepth",value:function(t){return Object.keys(t).reduce(function(e,o){switch(o){case"$ref":return e;case"properties":case"items":return Kr(Kr({},e),{},oi({},o,{}));case"additionalProperties":case"propertyNames":return Kr(Kr({},e),{},oi({},o,!0));default:return Kr(Kr({},e),{},oi({},o,t[o]))}},{})}},{key:"addObjectProperty",value:function(t,e){if(!this.editors[t]){if(this.cached_editors[t]){if(this.editors[t]=this.cached_editors[t],e)return;this.editors[t].register()}else{if(!(this.canHaveAdditionalProperties()||this.schema.properties&&this.schema.properties[t]||this.schema.patternProperties&&Object.keys(this.schema.patternProperties).find(function(P){return new RegExp(P).test(t)})))return;var o=this.getPropertySchema(t);typeof o.propertyOrder!="number"&&(o.propertyOrder=Object.keys(this.editors).length+1e3);var c=this.jsoneditor.getEditorClass(o),d=this.jsoneditor.options.max_depth;if(this.editors[t]=this.jsoneditor.createEditor(c,{jsoneditor:this.jsoneditor,schema:d&&this.currentDepth>=d?this.getSchemaOnMaxDepth(o):o,path:"".concat(this.path,".").concat(t),parent:this},this.currentDepth+1),this.editors[t].preBuild(),!e){var _=this.theme.getChildEditorHolder();this.editor_holder.appendChild(_),this.editors[t].setContainer(_),this.editors[t].build(),this.editors[t].postBuild(),this.editors[t].setOptInCheckbox(c.header),this.editors[t].activate()}this.cached_editors[t]=this.editors[t]}e||(this.refreshValue(),this.layoutEditors())}}},{key:"onOutsideModalClick",value:function(t){var e=t.path||t.composedPath&&t.composedPath();this.addproperty_holder&&!this.addproperty_holder.contains(e[0])&&this.adding_property&&(t.preventDefault(),t.stopPropagation(),this.toggleAddProperty())}},{key:"onChildEditorChange",value:function(t){this.refreshValue(),xr(ur(s.prototype),"onChildEditorChange",this).call(this,t)}},{key:"canHaveAdditionalProperties",value:function(){return typeof this.schema.additionalProperties=="boolean"?this.schema.additionalProperties:Cr(this.schema.additionalProperties)==="object"&&this.schema.additionalProperties!==null||(typeof this.options.no_additional_properties=="boolean"?!this.options.no_additional_properties:typeof this.jsoneditor.options.no_additional_properties!="boolean"||!this.jsoneditor.options.no_additional_properties)}},{key:"destroy",value:function(){Object.values(this.cached_editors).forEach(function(t){return t.destroy()}),this.editor_holder&&(this.editor_holder.innerHTML=""),this.title&&this.title.parentNode&&this.title.parentNode.removeChild(this.title),this.error_holder&&this.error_holder.parentNode&&this.error_holder.parentNode.removeChild(this.error_holder),this.editors=null,this.cached_editors=null,this.editor_holder&&this.editor_holder.parentNode&&this.editor_holder.parentNode.removeChild(this.editor_holder),this.editor_holder=null,document.removeEventListener("click",this.onOutsideModalClickListener,!0),xr(ur(s.prototype),"destroy",this).call(this)}},{key:"getValue",value:function(){if(this.dependenciesFulfilled){var t=xr(ur(s.prototype),"getValue",this).call(this);return t&&(this.jsoneditor.options.remove_empty_properties||this.options.remove_empty_properties)&&Object.keys(t).forEach(function(e){var o;((o=t[e])===void 0||o===""||o===Object(o)&&Object.keys(o).length===0&&o.constructor===Object)&&delete t[e]}),t}}},{key:"refreshValue",value:function(){var t=this;this.value={},this.editors&&(Object.keys(this.editors).forEach(function(e){t.editors[e].isActive()&&(t.editors[e].refreshValue(),t.value[e]=t.editors[e].getValue())}),Object.keys(this.editors).forEach(function(e){t.editors[e].isActive()&&t.activateDependentRequired(t.editors[e].key)}),this.adding_property&&this.refreshAddProperties())}},{key:"activateDependentRequired",value:function(t){var e=this;this.getDependentRequired(t).forEach(function(o){var c;Object.entries(e.cached_editors).forEach(function(d){var _=mn(d,2),P=(_[0],_[1]);P.key===o&&(c=P)}),c&&!c.isActive()&&c.activate()})}},{key:"getDependentRequired",value:function(t){return this.schema.dependentRequired&&C(this.schema.dependentRequired,t)?this.schema.dependentRequired[t]:[]}},{key:"refreshAddProperties",value:function(){var t=this;if(this.options.disable_properties||this.options.disable_properties!==!1&&this.jsoneditor.options.disable_properties)this.addproperty_button.style.display="none";else{var e,o=0,c=!1;Object.keys(this.editors).forEach(function(d){return o++}),e=this.canHaveAdditionalProperties()&&!(this.schema.maxProperties!==void 0&&o>=this.schema.maxProperties),this.addproperty_checkboxes&&(this.addproperty_list.innerHTML=""),this.addproperty_checkboxes={},Object.keys(this.cached_editors).forEach(function(d){t.addPropertyCheckbox(d),t.isRequiredObject(t.cached_editors[d])&&d in t.editors&&(t.addproperty_checkboxes[d].disabled=!0),t.schema.minProperties!==void 0&&o<=t.schema.minProperties?(t.addproperty_checkboxes[d].disabled=t.addproperty_checkboxes[d].checked,t.addproperty_checkboxes[d].checked||(c=!0)):d in t.editors?c=!0:e||C(t.schema.properties,d)?(t.addproperty_checkboxes[d].disabled=!1,c=!0):t.addproperty_checkboxes[d].disabled=!0}),this.canHaveAdditionalProperties()&&(c=!0),Object.keys(this.schema.properties).forEach(function(d){t.cached_editors[d]||(c=!0,t.addPropertyCheckbox(d))}),c?this.canHaveAdditionalProperties()?this.addproperty_add.disabled=!e:(this.addproperty_add.style.display="none",this.addproperty_input.style.display="none"):(this.hideAddProperty(),this.addproperty_button.style.display="none")}}},{key:"isRequiredObject",value:function(t){if(t)return typeof t.schema.required=="boolean"?t.schema.required:Array.isArray(this.schema.required)?this.schema.required.includes(t.key):!!this.jsoneditor.options.required_by_default}},{key:"setValue",value:function(t,e){var o=this;(Cr(t=t||{})!=="object"||Array.isArray(t))&&(t={}),Object.entries(this.cached_editors).forEach(function(c){var d=mn(c,2),_=d[0],P=d[1];t[_]!==void 0?(o.addObjectProperty(_),P.setValue(t[_],e),P.activate()):e||o.isRequiredObject(P)?P.setValue(P.getDefault(),e):o.jsoneditor.options.show_opt_in||o.options.show_opt_in?P.deactivate():o.removeObjectProperty(_)}),Object.entries(t).forEach(function(c){var d=mn(c,2),_=d[0],P=d[1];o.cached_editors[_]||(o.addObjectProperty(_),o.editors[_]&&o.editors[_].setValue(P,e,!!o.editors[_].template))}),this.refreshValue(),this.layoutEditors(),this.onChange()}},{key:"showValidationErrors",value:function(t){var e=this,o=[],c=[];t.forEach(function(d){d.path===e.path?o.push(d):c.push(d)}),this.error_holder&&(o.length?(this.error_holder.innerHTML="",this.error_holder.style.display="",o.forEach(function(d){d.errorcount&&d.errorcount>1&&(d.message+=" (".concat(d.errorcount," errors)")),e.error_holder.appendChild(e.theme.getErrorMessage(d.message))})):this.error_holder.style.display="none"),this.options.table_row&&(o.length?this.theme.addTableRowError(this.container):this.theme.removeTableRowError(this.container)),Object.values(this.editors).forEach(function(d){d.showValidationErrors(c)})}}])&&Wo(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(H);function Nn(l){return Nn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Nn(l)}function Hs(l,n){for(var p=0;p<n.length;p++){var i=n[p];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(l,(u=function(a,s){if(Nn(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Nn(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Nn(u)==="symbol"?u:String(u)),i)}var u}function $n(){return $n=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,n,p){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=V(a))!==null;);return a}(l,n);if(i){var u=Object.getOwnPropertyDescriptor(i,n);return u.get?u.get.call(arguments.length<3?l:p):u.value}},$n.apply(this,arguments)}function Zo(l,n){return Zo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},Zo(l,n)}function V(l){return V=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},V(l)}ai.rules={".je-object__title":"display:inline-block",".je-object__controls":"margin:0%200%200%2010px",".je-object__container":"position:relative",".je-object__property-checkbox":"margin:0;height:auto",".property-selector":"width:295px;max-height:160px;padding:5px%200;overflow-y:auto;overflow-x:hidden;padding-left:5px",".property-selector-input":"width:220px;margin-bottom:0;display:inline-block",".json-editor-btntype-toggle":"margin:0%2010px%200%200",".je-edit-json--textarea":"height:170px;width:300px;display:block"};var at=function(l){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Zo(t,e)})(s,l);var n,p,i,u,a=(i=s,u=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=V(i);if(u){var o=V(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(Nn(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(p=[{key:"preBuild",value:function(){$n(V(s.prototype),"preBuild",this).call(this)}},{key:"build",value:function(){var t=this;this.label="",this.options.compact||(this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired())),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.translateProperty(this.schema.description))),this.options.infoText&&(this.infoButton=this.theme.getInfoButton(this.translateProperty(this.options.infoText))),this.options.compact&&this.container.classList.add("compact"),this.radioContainer=document.createElement("div"),this.radioGroup=[];for(var e=function(J){t.setValue(J.currentTarget.value),t.onChange(!0)},o=0;o<this.enum_values.length;o++){var c={id:"".concat(this.formname,"[").concat(o,"]"),value:this.enum_values[o]};this.jsoneditor.options.use_name_attributes&&(c.name=this.formname),this.input=this.theme.getFormRadio(c),this.setInputAttributes(["id","value","name"]),this.input.addEventListener("change",e,!1),this.radioGroup.push(this.input);var d=this.theme.getFormRadioLabel(this.enum_display[o]);d.htmlFor=this.input.id;var _=this.theme.getFormRadioControl(d,this.input,!(this.options.layout!=="horizontal"&&!this.options.compact));this.radioContainer.appendChild(_)}if(this.schema.readOnly||this.schema.readonly){this.disable(!0);for(var P=0;P<this.radioGroup.length;P++)this.radioGroup[P].disabled=!0;this.radioContainer.classList.add("readonly")}var D=this.theme.getContainer();D.appendChild(this.radioContainer),D.dataset.containerFor="radio",this.input=D,this.control=this.theme.getFormControl(this.label,D,this.description,this.infoButton),this.container.appendChild(this.control),window.requestAnimationFrame(function(){t.input.parentNode&&t.afterInputReady()})}},{key:"enable",value:function(){if(!this.always_disabled){for(var t=0;t<this.radioGroup.length;t++)this.radioGroup[t].disabled=!1;this.radioContainer.classList.remove("readonly"),$n(V(s.prototype),"enable",this).call(this)}}},{key:"disable",value:function(t){t&&(this.always_disabled=!0);for(var e=0;e<this.radioGroup.length;e++)this.radioGroup[e].disabled=!0;this.radioContainer.classList.add("readonly"),$n(V(s.prototype),"disable",this).call(this)}},{key:"destroy",value:function(){this.radioContainer.parentNode&&this.radioContainer.parentNode.parentNode&&this.radioContainer.parentNode.parentNode.removeChild(this.radioContainer.parentNode),this.label&&this.label.parentNode&&this.label.parentNode.removeChild(this.label),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),$n(V(s.prototype),"destroy",this).call(this)}},{key:"getNumColumns",value:function(){return 2}},{key:"setValue",value:function(t){typeof t!="string"&&(t=String(t));for(var e=0;e<this.radioGroup.length;e++)if(this.radioGroup[e].value===t){this.radioGroup[e].checked=!0,this.value=t,this.onChange();break}}}])&&Hs(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(ti);function Ot(l){return Ot=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Ot(l)}function pe(l,n){for(var p=0;p<n.length;p++){var i=n[p];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(l,(u=function(a,s){if(Ot(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Ot(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Ot(u)==="symbol"?u:String(u)),i)}var u}function ye(){return ye=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,n,p){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=Ne(a))!==null;);return a}(l,n);if(i){var u=Object.getOwnPropertyDescriptor(i,n);return u.get?u.get.call(arguments.length<3?l:p):u.value}},ye.apply(this,arguments)}function ie(l,n){return ie=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},ie(l,n)}function Ne(l){return Ne=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ne(l)}var Ui=function(l){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ie(t,e)})(s,l);var n,p,i,u,a=(i=s,u=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Ne(i);if(u){var o=Ne(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(Ot(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(p=[{key:"setValue",value:function(t,e,o){var c=ye(Ne(s.prototype),"setValue",this).call(this,t,e,o);c!==void 0&&c.changed&&this.sceditor_instance&&this.sceditor_instance.val(c.value)}},{key:"build",value:function(){this.options.format="textarea",ye(Ne(s.prototype),"build",this).call(this),this.input_type=this.schema.format,this.input.setAttribute("data-schemaformat",this.input_type)}},{key:"afterInputReady",value:function(){var t=this;if(window.sceditor){var e=this.expandCallbacks("sceditor",x({},{format:this.input_type,emoticonsEnabled:!1,width:"100%",height:300,readOnly:this.schema.readOnly||this.schema.readonly||this.schema.template},this.defaults.options.sceditor||{},this.options.sceditor||{},{element:this.input})),o=window.sceditor.instance(this.input);o===void 0&&window.sceditor.create(this.input,e),this.sceditor_instance=o||window.sceditor.instance(this.input),this.sceditor_instance.blur(function(){t.value=t.sceditor_instance.val(),t.sceditor_instance.updateOriginal(),t.is_dirty=!0,t.onChange(!0)}),this.theme.afterInputReady(this.input)}else ye(Ne(s.prototype),"afterInputReady",this).call(this)}},{key:"getNumColumns",value:function(){return 6}},{key:"enable",value:function(){!this.always_disabled&&this.sceditor_instance&&this.sceditor_instance.readOnly(!1),ye(Ne(s.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.sceditor_instance&&this.sceditor_instance.readOnly(!0),ye(Ne(s.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.sceditor_instance&&(this.sceditor_instance.destroy(),this.sceditor_instance=null),ye(Ne(s.prototype),"destroy",this).call(this)}}])&&pe(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(Q);function Gi(l){return Gi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Gi(l)}function Lh(l,n){for(var p=0;p<n.length;p++){var i=n[p];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(l,(u=function(a,s){if(Gi(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Gi(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Gi(u)==="symbol"?u:String(u)),i)}var u}function si(){return si=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,n,p){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=tn(a))!==null;);return a}(l,n);if(i){var u=Object.getOwnPropertyDescriptor(i,n);return u.get?u.get.call(arguments.length<3?l:p):u.value}},si.apply(this,arguments)}function Vs(l,n){return Vs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},Vs(l,n)}function tn(l){return tn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},tn(l)}var Ah=function(l){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Vs(t,e)})(s,l);var n,p,i,u,a=(i=s,u=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=tn(i);if(u){var o=tn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(Gi(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(p=[{key:"setValue",value:function(t,e){if(this.select2_instance){e?this.is_dirty=!1:this.jsoneditor.options.show_errors==="change"&&(this.is_dirty=!0);var o=this.updateValue(t);this.input.value=o,this.select2v4?this.select2_instance.val(o).trigger("change"):this.select2_instance.select2("val",o),this.onChange(!0)}else si(tn(s.prototype),"setValue",this).call(this,t,e)}},{key:"afterInputReady",value:function(){var t=this;if(window.jQuery&&window.jQuery.fn&&window.jQuery.fn.select2&&!this.select2_instance){var e=this.expandCallbacks("select2",x({},this.defaults.options.select2||{},this.options.select2||{}));this.newEnumAllowed=e.tags=!!e.tags&&this.schema.type==="string",this.select2_instance=window.jQuery(this.input).select2(e),this.select2v4=C(this.select2_instance.select2,"amd"),this.selectChangeHandler=function(){var o=t.select2v4?t.select2_instance.val():t.select2_instance.select2("val");t.updateValue(o),t.onChange(!0)},this.select2_instance.on("change",this.selectChangeHandler),this.select2_instance.on("select2-blur",this.selectChangeHandler)}si(tn(s.prototype),"afterInputReady",this).call(this)}},{key:"updateValue",value:function(t){var e=this.enum_values[0];return t=this.typecast(t||""),this.enum_values.includes(t)?e=t:this.newEnumAllowed&&(e=this.addNewOption(t)?t:e),this.value=e,e}},{key:"addNewOption",value:function(t){var e,o=this.typecast(t),c=!1;return this.enum_values.includes(o)||o===""||(this.enum_options.push("".concat(o)),this.enum_display.push("".concat(o)),this.enum_values.push(o),this.schema.enum.push(o),(e=this.input.querySelector('option[value="'.concat(o,'"]')))?e.removeAttribute("data-select2-tag"):this.input.appendChild(new Option(o,o,!1,!1)).trigger("change"),c=!0),c}},{key:"enable",value:function(){this.always_disabled||this.select2_instance&&(this.select2v4?this.select2_instance.prop("disabled",!1):this.select2_instance.select2("enable",!0)),si(tn(s.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.select2_instance&&(this.select2v4?this.select2_instance.prop("disabled",!0):this.select2_instance.select2("enable",!1)),si(tn(s.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.select2_instance&&(this.select2_instance.select2("destroy"),this.select2_instance=null),si(tn(s.prototype),"destroy",this).call(this)}}])&&Lh(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(ti);function Wi(l){return Wi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Wi(l)}function Rh(l,n){for(var p=0;p<n.length;p++){var i=n[p];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(l,(u=function(a,s){if(Wi(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Wi(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Wi(u)==="symbol"?u:String(u)),i)}var u}function Mn(){return Mn=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,n,p){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=zr(a))!==null;);return a}(l,n);if(i){var u=Object.getOwnPropertyDescriptor(i,n);return u.get?u.get.call(arguments.length<3?l:p):u.value}},Mn.apply(this,arguments)}function zs(l,n){return zs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},zs(l,n)}function zr(l){return zr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},zr(l)}var Ih=function(l){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&zs(t,e)})(s,l);var n,p,i,u,a=(i=s,u=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=zr(i);if(u){var o=zr(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(Wi(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(p=[{key:"setValue",value:function(t,e){if(this.selectize_instance){e?this.is_dirty=!1:this.jsoneditor.options.show_errors==="change"&&(this.is_dirty=!0);var o=this.updateValue(t);this.input.value=o,this.selectize_instance.clear(!0),this.selectize_instance.setValue(o),this.onChange(!0)}else Mn(zr(s.prototype),"setValue",this).call(this,t,e)}},{key:"afterInputReady",value:function(){var t=this;if(window.jQuery&&window.jQuery.fn&&window.jQuery.fn.selectize&&!this.selectize_instance){var e=this.expandCallbacks("selectize",x({},this.defaults.options.selectize||{},this.options.selectize||{}));this.newEnumAllowed=e.create=!!e.create&&this.schema.type==="string",this.selectize_instance=window.jQuery(this.input).selectize(e)[0].selectize,this.control.removeEventListener("change",this.multiselectChangeHandler),this.multiselectChangeHandler=function(o){t.updateValue(o),t.onChange(!0)},this.selectize_instance.on("change",this.multiselectChangeHandler)}Mn(zr(s.prototype),"afterInputReady",this).call(this)}},{key:"updateValue",value:function(t){var e=this.enum_values[0];return t=this.typecast(t||""),this.enum_values.includes(t)?e=t:this.newEnumAllowed&&(e=this.addNewOption(t)?t:e),this.value=e,e}},{key:"addNewOption",value:function(t){var e=this.typecast(t),o=!1;return this.enum_values.includes(e)||e===""||(this.enum_options.push("".concat(e)),this.enum_display.push("".concat(e)),this.enum_values.push(e),this.schema.enum.push(e),this.selectize_instance.addItem(e),this.selectize_instance.refreshOptions(!1),o=!0),o}},{key:"onWatchedFieldChange",value:function(){var t=this;Mn(zr(s.prototype),"onWatchedFieldChange",this).call(this),this.selectize_instance&&(this.selectize_instance.clear(!0),this.selectize_instance.clearOptions(!0),this.enum_options.forEach(function(e,o){t.selectize_instance.addOption({value:e,text:t.enum_display[o]})}),this.selectize_instance.addItem("".concat(this.value),!0))}},{key:"enable",value:function(){!this.always_disabled&&this.selectize_instance&&this.selectize_instance.unlock(),Mn(zr(s.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.selectize_instance&&this.selectize_instance.lock(),Mn(zr(s.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.selectize_instance&&(this.selectize_instance.destroy(),this.selectize_instance=null),Mn(zr(s.prototype),"destroy",this).call(this)}}])&&Rh(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(ti);function Zi(l){return Zi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Zi(l)}function Bh(l,n){for(var p=0;p<n.length;p++){var i=n[p];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(l,(u=function(a,s){if(Zi(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Zi(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Zi(u)==="symbol"?u:String(u)),i)}var u}function qs(l,n){return qs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},qs(l,n)}function Za(l){return Za=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Za(l)}var Dh=function(l){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&qs(t,e)})(s,l);var n,p,i,u,a=(i=s,u=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Za(i);if(u){var o=Za(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(Zi(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(p=[{key:"build",value:function(){var t=this;this.options.compact||(this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired())),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.translateProperty(this.schema.description)));var e=this.formname.replace(/\W/g,"");if(typeof SignaturePad=="function"){this.input=this.theme.getFormInputField("hidden"),this.container.appendChild(this.input);var o=document.createElement("div");o.classList.add("signature-container");var c=document.createElement("canvas");this.jsoneditor.options.use_name_attributes&&c.setAttribute("name",e),c.classList.add("signature"),o.appendChild(c),this.signaturePad=new window.SignaturePad(c),this.signaturePad.onEnd=function(){t.signaturePad.isEmpty()?t.input.value="":t.input.value=t.signaturePad.toDataURL(),t.is_dirty=!0,t.refreshValue(),t.watch_listener(),t.jsoneditor.notifyWatchers(t.path),t.parent?t.parent.onChildEditorChange(t):t.jsoneditor.onChange()};var d=document.createElement("div"),_=document.createElement("button");_.classList.add("tiny","button"),_.innerHTML="Clear signature",d.appendChild(_),o.appendChild(d),this.options.compact&&this.container.setAttribute("class","".concat(this.container.getAttribute("class")," compact")),(this.schema.readOnly||this.schema.readonly)&&(this.disable(!0),Array.from(this.inputs).forEach(function(D){c.setAttribute("readOnly","readOnly"),D.disabled=!0})),_.addEventListener("click",function(D){D.preventDefault(),D.stopPropagation(),t.signaturePad.clear(),t.signaturePad.strokeEnd()}),this.control=this.theme.getFormControl(this.label,o,this.description),this.container.appendChild(this.control),this.refreshValue(),c.width=o.offsetWidth,this.options&&this.options.canvas_height?c.height=this.options.canvas_height:c.height="300"}else{var P=document.createElement("p");P.innerHTML="Signature pad is not available, please include SignaturePad from https://github.com/szimek/signature_pad",this.container.appendChild(P)}}},{key:"setValue",value:function(t){if(typeof SignaturePad=="function"){var e=this.sanitize(t);return this.value===e?void 0:(this.value=e,this.input.value=this.value,this.signaturePad.clear(),t&&t!==""&&this.signaturePad.fromDataURL(t),this.watch_listener(),this.jsoneditor.notifyWatchers(this.path),!1)}}},{key:"destroy",value:function(){this.signaturePad.off(),delete this.signaturePad}}])&&Bh(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(Q);function Ji(l){return Ji=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Ji(l)}function Nh(l,n){for(var p=0;p<n.length;p++){var i=n[p];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(l,(u=function(a,s){if(Ji(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Ji(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Ji(u)==="symbol"?u:String(u)),i)}var u}function Fn(){return Fn=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,n,p){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=qr(a))!==null;);return a}(l,n);if(i){var u=Object.getOwnPropertyDescriptor(i,n);return u.get?u.get.call(arguments.length<3?l:p):u.value}},Fn.apply(this,arguments)}function Us(l,n){return Us=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},Us(l,n)}function qr(l){return qr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},qr(l)}k(2564);var $h=function(l){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Us(t,e)})(s,l);var n,p,i,u,a=(i=s,u=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=qr(i);if(u){var o=qr(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(Ji(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(p=[{key:"setValue",value:function(t,e,o){var c=Fn(qr(s.prototype),"setValue",this).call(this,t,e,o);c!==void 0&&c.changed&&this.simplemde_instance&&this.simplemde_instance.value(c.value)}},{key:"build",value:function(){this.options.format="textarea",Fn(qr(s.prototype),"build",this).call(this),this.input_type=this.schema.format,this.input.setAttribute("data-schemaformat",this.input_type)}},{key:"afterInputReady",value:function(){var t,e=this;window.SimpleMDE?(t=this.expandCallbacks("simplemde",x({},{height:300},this.defaults.options.simplemde||{},this.options.simplemde||{},{element:this.input})),this.simplemde_instance=new window.SimpleMDE(t),(this.schema.readOnly||this.schema.readonly||this.schema.template)&&(this.simplemde_instance.codemirror.options.readOnly=!0),this.simplemde_instance.codemirror.on("change",function(){e.value=e.simplemde_instance.value(),e.is_dirty=!0,e.onChange(!0)}),t.autorefresh&&this.startListening(this.simplemde_instance.codemirror,this.simplemde_instance.codemirror.state.autoRefresh={delay:250}),this.theme.afterInputReady(this.input)):Fn(qr(s.prototype),"afterInputReady",this).call(this)}},{key:"getNumColumns",value:function(){return 6}},{key:"enable",value:function(){!this.always_disabled&&this.simplemde_instance&&(this.simplemde_instance.codemirror.options.readOnly=!1),Fn(qr(s.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.simplemde_instance&&(this.simplemde_instance.codemirror.options.readOnly=!0),Fn(qr(s.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.simplemde_instance&&(this.simplemde_instance.toTextArea(),this.simplemde_instance=null),Fn(qr(s.prototype),"destroy",this).call(this)}},{key:"startListening",value:function(t,e){function o(){t.display.wrapper.offsetHeight?(this.stopListening(t,e),t.display.lastWrapHeight!==t.display.wrapper.clientHeight&&t.refresh()):e.timeout=window.setTimeout(o,e.delay)}e.timeout=window.setTimeout(o,e.delay),e.hurry=function(){window.clearTimeout(e.timeout),e.timeout=window.setTimeout(o,50)},t.on(window,"mouseup",e.hurry),t.on(window,"keyup",e.hurry)}},{key:"stopListening",value:function(t,e){window.clearTimeout(e.timeout),t.off(window,"mouseup",e.hurry),t.off(window,"keyup",e.hurry)}}])&&Nh(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(Q);function Yi(l){return Yi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Yi(l)}function Mh(l,n){for(var p=0;p<n.length;p++){var i=n[p];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(l,(u=function(a,s){if(Yi(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Yi(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Yi(u)==="symbol"?u:String(u)),i)}var u}function Gs(){return Gs=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,n,p){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=Xi(a))!==null;);return a}(l,n);if(i){var u=Object.getOwnPropertyDescriptor(i,n);return u.get?u.get.call(arguments.length<3?l:p):u.value}},Gs.apply(this,arguments)}function Ws(l,n){return Ws=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},Ws(l,n)}function Xi(l){return Xi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Xi(l)}var Fc=function(l){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ws(t,e)})(s,l);var n,p,i,u,a=(i=s,u=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Xi(i);if(u){var o=Xi(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(Yi(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(p=[{key:"build",value:function(){var t=this;if(this.options.compact||(this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired())),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.translateProperty(this.schema.description))),this.options.infoText&&(this.infoButton=this.theme.getInfoButton(this.translateProperty(this.options.infoText))),this.options.compact&&this.container.classList.add("compact"),this.ratingContainer=document.createElement("div"),this.ratingContainer.classList.add("starrating"),this.schema.enum===void 0){var e=this.schema.maximum?this.schema.maximum:5;this.schema.exclusiveMaximum&&e--,this.enum_values=[];for(var o=0;o<e;o++)this.enum_values.push(o+1)}else this.enum_values=this.schema.enum;this.radioGroup=[];for(var c=function(ut){ut.preventDefault(),ut.stopPropagation(),t.setValue(ut.currentTarget.value),t.onChange(!0)},d=this.enum_values.length-1;d>-1;d--){var _=this.formname+(d+1),P=this.theme.getFormInputField("radio");P.name="".concat(this.formname,"[starrating]"),P.value=this.enum_values[d],P.id=_,P.addEventListener("change",c,!1),this.radioGroup.push(P);var D=document.createElement("label");D.htmlFor=_,D.title=this.enum_values[d],this.options.displayValue&&D.classList.add("starrating-display-enabled"),this.ratingContainer.appendChild(P),this.ratingContainer.appendChild(D)}if(this.options.displayValue&&(this.displayRating=document.createElement("div"),this.displayRating.classList.add("starrating-display"),this.displayRating.innerText=this.enum_values[0],this.ratingContainer.appendChild(this.displayRating)),this.schema.readOnly||this.schema.readonly){this.disable(!0);for(var J=0;J<this.radioGroup.length;J++)this.radioGroup[J].disabled=!0;this.ratingContainer.classList.add("readonly")}var nt=this.theme.getContainer();nt.appendChild(this.ratingContainer),this.input=nt,this.control=this.theme.getFormControl(this.label,nt,this.description,this.infoButton),this.container.appendChild(this.control),this.refreshValue()}},{key:"enable",value:function(){if(!this.always_disabled){for(var t=0;t<this.radioGroup.length;t++)this.radioGroup[t].disabled=!1;this.ratingContainer.classList.remove("readonly"),this.disabled=!1}}},{key:"disable",value:function(t){t&&(this.always_disabled=!0);for(var e=0;e<this.radioGroup.length;e++)this.radioGroup[e].disabled=!0;this.ratingContainer.classList.add("readonly"),this.disabled=!0}},{key:"destroy",value:function(){this.ratingContainer.parentNode&&this.ratingContainer.parentNode.parentNode&&this.ratingContainer.parentNode.parentNode.removeChild(this.ratingContainer.parentNode),this.label&&this.label.parentNode&&this.label.parentNode.removeChild(this.label),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),Gs(Xi(s.prototype),"destroy",this).call(this)}},{key:"getNumColumns",value:function(){return 2}},{key:"getValue",value:function(){if(this.dependenciesFulfilled)return this.schema.type==="integer"?this.value===""?void 0:1*this.value:this.value}},{key:"setValue",value:function(t){for(var e=0;e<this.radioGroup.length;e++)if(this.radioGroup[e].value==="".concat(t)){this.radioGroup[e].checked=!0,this.value=t,this.options.displayValue&&(this.displayRating.innerHTML=this.value),this.onChange(!0);break}}}])&&Mh(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(Q);function Qi(l){return Qi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Qi(l)}function Fh(l,n){for(var p=0;p<n.length;p++){var i=n[p];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(l,(u=function(a,s){if(Qi(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Qi(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Qi(u)==="symbol"?u:String(u)),i)}var u}function Jo(){return Jo=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,n,p){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=Hn(a))!==null;);return a}(l,n);if(i){var u=Object.getOwnPropertyDescriptor(i,n);return u.get?u.get.call(arguments.length<3?l:p):u.value}},Jo.apply(this,arguments)}function Zs(l,n){return Zs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},Zs(l,n)}function Hn(l){return Hn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Hn(l)}Fc.rules={".starrating":"direction:rtl;display:inline-block;white-space:nowrap",".starrating > input":"display:none",".starrating > label:before":"content:'%5C2606';margin:1px;font-size:18px;font-style:normal;font-weight:400;line-height:1;font-family:'Arial';display:inline-block",".starrating > label":"color:%23888;cursor:pointer;margin:8px%200%202px%200",".starrating > label.starrating-display-enabled":"margin:1px%200%200%200",".starrating > input:checked ~ label":"color:%23ffca08",".starrating:not(.readonly) > input:hover ~ label":"color:%23ffca08",".starrating > input:checked ~ label:before":"content:'%5C2605';text-shadow:0%200%201px%20rgba(0%2C20%2C20%2C1)",".starrating:not(.readonly) > input:hover ~ label:before":"content:'%5C2605';text-shadow:0%200%201px%20rgba(0%2C20%2C20%2C1)",".starrating .starrating-display":"position:relative;direction:rtl;text-align:center;font-size:10px;line-height:0px"};var Hh=function(l){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Zs(t,e)})(s,l);var n,p,i,u,a=(i=s,u=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Hn(i);if(u){var o=Hn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(Qi(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(p=[{key:"build",value:function(){Jo(Hn(s.prototype),"build",this).call(this),this.input.setAttribute("type","number"),this.input.getAttribute("step")||this.input.setAttribute("step","1");var t=this.theme.getStepperButtons(this.input);this.control.appendChild(t),this.stepperDown=this.control.querySelector(".stepper-down"),this.stepperUp=this.control.querySelector(".stepper-up")}},{key:"enable",value:function(){Jo(Hn(s.prototype),"enable",this).call(this),this.stepperDown.removeAttribute("disabled"),this.stepperUp.removeAttribute("disabled")}},{key:"disable",value:function(){Jo(Hn(s.prototype),"disable",this).call(this),this.stepperDown.setAttribute("disabled",!0),this.stepperUp.setAttribute("disabled",!0)}}])&&Fh(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(Ua);function Ki(l){return Ki=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Ki(l)}function Vh(l,n){for(var p=0;p<n.length;p++){var i=n[p];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(l,(u=function(a,s){if(Ki(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Ki(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Ki(u)==="symbol"?u:String(u)),i)}var u}function li(){return li=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,n,p){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=en(a))!==null;);return a}(l,n);if(i){var u=Object.getOwnPropertyDescriptor(i,n);return u.get?u.get.call(arguments.length<3?l:p):u.value}},li.apply(this,arguments)}function Js(l,n){return Js=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},Js(l,n)}function en(l){return en=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},en(l)}var zh=function(l){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Js(t,e)})(s,l);var n,p,i,u,a=(i=s,u=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=en(i);if(u){var o=en(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(Ki(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,p=[{key:"register",value:function(){if(li(en(s.prototype),"register",this).call(this),this.rows)for(var t=0;t<this.rows.length;t++)this.rows[t].register()}},{key:"unregister",value:function(){if(li(en(s.prototype),"unregister",this).call(this),this.rows)for(var t=0;t<this.rows.length;t++)this.rows[t].unregister()}},{key:"getNumColumns",value:function(){return Math.max(Math.min(12,this.width),3)}},{key:"preBuild",value:function(){var t=this.jsoneditor.expandRefs(this.schema.items||{});this.item_title=t.title||"row",this.item_default=t.default||null,this.item_has_child_editors=t.properties||t.items,this.width=12,this.array_controls_top=this.options.array_controls_top||this.jsoneditor.options.array_controls_top,li(en(s.prototype),"preBuild",this).call(this)}},{key:"build",value:function(){this.tableContainer=this.theme.getTableContainer(),this.table=this.theme.getTable(),this.tableContainer.appendChild(this.table),this.container.appendChild(this.tableContainer),this.thead=this.theme.getTableHead(),this.table.appendChild(this.thead),this.header_row=this.theme.getTableRow(),this.thead.appendChild(this.header_row),this.row_holder=this.theme.getTableBody(),this.table.appendChild(this.row_holder);var t=this.getElementEditor(0,!0);if(this.item_default=t.getDefault(),this.width=t.getNumColumns()+2,this.options.compact?(this.panel=document.createElement("div"),this.container.appendChild(this.panel)):(this.header=document.createElement("label"),this.header.textContent=this.getTitle(),this.title=this.theme.getHeader(this.header,this.getPathDepth()),this.container.appendChild(this.title),this.options.infoText&&(this.infoButton=this.theme.getInfoButton(this.translateProperty(this.options.infoText)),this.container.appendChild(this.infoButton)),this.title_controls=this.theme.getHeaderButtonHolder(),this.title.appendChild(this.title_controls),this.schema.description&&(this.description=this.theme.getDescription(this.translateProperty(this.schema.description)),this.container.appendChild(this.description)),this.panel=this.theme.getIndentedPanel(),this.container.appendChild(this.panel),this.error_holder=document.createElement("div"),this.panel.appendChild(this.error_holder)),this.panel.appendChild(this.tableContainer),this.controls=this.theme.getButtonHolder(),this.array_controls_top?this.title.appendChild(this.controls):this.panel.appendChild(this.controls),this.item_has_child_editors)for(var e=t.getChildEditors(),o=t.property_order||Object.keys(e),c=0;c<o.length;c++){var d=this.theme.getTableHeaderCell(e[o[c]].getTitle());e[o[c]].options.hidden&&(d.style.display="none"),this.header_row.appendChild(d)}else this.header_row.appendChild(this.theme.getTableHeaderCell(this.item_title));t.destroy(),this.row_holder.innerHTML="",this.controls_header_cell=this.theme.getTableHeaderCell(" "),this.controls_header_cell.setAttribute("aria-hidden","true"),this.header_row.appendChild(this.controls_header_cell),this.addControls()}},{key:"onChildEditorChange",value:function(t){this.refreshValue(),li(en(s.prototype),"onChildEditorChange",this).call(this)}},{key:"getItemDefault",value:function(){return x({},{default:this.item_default}).default}},{key:"getItemTitle",value:function(){return this.item_title}},{key:"getElementEditor",value:function(t,e){var o=x({},this.schema.items),c=this.jsoneditor.getEditorClass(o,this.jsoneditor),d=this.row_holder.appendChild(this.theme.getTableRow()),_=d;this.item_has_child_editors||(_=this.theme.getTableCell(),d.appendChild(_));var P=this.jsoneditor.createEditor(c,{jsoneditor:this.jsoneditor,schema:o,container:_,path:"".concat(this.path,".").concat(t),parent:this,compact:!0,table_row:!0});return P.preBuild(),e||(P.build(),P.postBuild(),P.controls_cell=d.appendChild(this.theme.getTableCell()),P.row=d,P.table_controls=this.theme.getButtonHolder(),P.controls_cell.appendChild(P.table_controls),P.table_controls.style.margin=0,P.table_controls.style.padding=0),P}},{key:"destroy",value:function(){this.innerHTML="",this.checkParent(this.title)&&this.title.parentNode.removeChild(this.title),this.checkParent(this.description)&&this.description.parentNode.removeChild(this.description),this.checkParent(this.row_holder)&&this.row_holder.parentNode.removeChild(this.row_holder),this.checkParent(this.table)&&this.table.parentNode.removeChild(this.table),this.checkParent(this.panel)&&this.panel.parentNode.removeChild(this.panel),this.rows=this.title=this.description=this.row_holder=this.table=this.panel=null,li(en(s.prototype),"destroy",this).call(this)}},{key:"ensureArraySize",value:function(t){if(Array.isArray(t)||(t=[t]),this.schema.minItems)for(;t.length<this.schema.minItems;)t.push(this.getItemDefault());return this.schema.maxItems&&t.length>this.schema.maxItems&&(t=t.slice(0,this.schema.maxItems)),t}},{key:"setValue",value:function(){var t=this,e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],o=arguments.length>1?arguments[1]:void 0;if(e=this.ensureArraySize(e),JSON.stringify(e)!==this.serialized){var c=!1;e.forEach(function(P,D){t.rows[D]?t.rows[D].setValue(P):(t.addRow(P),c=!0)});for(var d=e.length;d<this.rows.length;d++){var _=this.rows[d].container;this.item_has_child_editors||this.rows[d].row.parentNode.removeChild(this.rows[d].row),this.rows[d].destroy(),_.parentNode&&_.parentNode.removeChild(_),this.rows[d]=null,c=!0}this.rows=this.rows.slice(0,e.length),this.refreshValue(),(c||o)&&this.refreshRowButtons(),this.onChange()}}},{key:"refreshRowButtons",value:function(){var t=this,e=this.schema.minItems&&this.schema.minItems>=this.rows.length,o=this.schema.maxItems&&this.schema.maxItems<=this.rows.length,c=[];this.rows.forEach(function(nt,ut){if(nt.delete_button){var dt=!e;t.setButtonState(nt.delete_button,dt),c.push(dt)}if(nt.copy_button){var kt=!o;t.setButtonState(nt.copy_button,kt),c.push(kt)}if(nt.moveup_button){var Ct=ut!==0;t.setButtonState(nt.moveup_button,Ct),c.push(Ct)}if(nt.movedown_button){var Nt=ut!==t.rows.length-1;t.setButtonState(nt.movedown_button,Nt),c.push(Nt)}});var d=c.some(function(nt){return nt});this.rows.forEach(function(nt){return t.setButtonState(nt.controls_cell,d)}),this.setButtonState(this.controls_header_cell,d),this.setButtonState(this.table,this.value.length);var _=!(o||this.hide_add_button);this.setButtonState(this.add_row_button,_);var P=!(!this.value.length||e||this.hide_delete_last_row_buttons);this.setButtonState(this.delete_last_row_button,P);var D=!(this.value.length<=1||e||this.hide_delete_all_rows_buttons);this.setButtonState(this.remove_all_rows_button,D);var J=_||P||D;this.setButtonState(this.controls,J)}},{key:"refreshValue",value:function(){var t=this;this.value=[],this.rows.forEach(function(e,o){t.value[o]=e.getValue()}),this.serialized=JSON.stringify(this.value)}},{key:"addRow",value:function(t){var e=this.rows.length;this.rows[e]=this.getElementEditor(e);var o=this.rows[e].table_controls;return this.hide_delete_buttons||(this.rows[e].delete_button=this._createDeleteButton(e,o)),this.show_copy_button&&(this.rows[e].copy_button=this._createCopyButton(e,o)),this.hide_move_buttons||(this.rows[e].moveup_button=this._createMoveUpButton(e,o)),this.hide_move_buttons||(this.rows[e].movedown_button=this._createMoveDownButton(e,o)),t!==void 0&&this.rows[e].setValue(t),this.rows[e]}},{key:"_createDeleteButton",value:function(t,e){var o=this,c=this.getButton("","delete","button_delete_row_title_short");return c.classList.add("delete","json-editor-btntype-delete"),c.setAttribute("data-i",t),c.addEventListener("click",function(d){if(d.preventDefault(),d.stopPropagation(),!o.askConfirmation())return!1;var _=1*d.currentTarget.getAttribute("data-i"),P=o.getValue(),D=o.getValue()[_];P.splice(_,1),o.setValue(P),o.onChange(!0),o.jsoneditor.trigger("deleteRow",D)}),e.appendChild(c),c}},{key:"_createCopyButton",value:function(t,e){var o=this,c=this.getButton("","copy","button_copy_row_title_short"),d=this.schema;return c.classList.add("copy","json-editor-btntype-copy"),c.setAttribute("data-i",t),c.addEventListener("click",function(_){_.preventDefault(),_.stopPropagation();var P=1*_.currentTarget.getAttribute("data-i"),D=o.getValue(),J=D[P];d.items.type==="string"&&d.items.format==="uuid"?J=R():d.items.type==="object"&&d.items.properties&&D.forEach(function(nt,ut){if(P===ut)for(var dt=0,kt=Object.keys(nt);dt<kt.length;dt++){var Ct=kt[dt];d.items.properties&&d.items.properties[Ct]&&d.items.properties[Ct].format==="uuid"&&((J=Object.assign({},D[P]))[Ct]=R())}}),D.splice(P+1,0,J),o.setValue(D),o.onChange(!0),o.jsoneditor.trigger("copyRow",o.rows[P+1])}),e.appendChild(c),c}},{key:"_createMoveUpButton",value:function(t,e){var o=this,c=this.getButton("","moveup","button_move_up_title");return c.classList.add("moveup","json-editor-btntype-move"),c.setAttribute("data-i",t),c.addEventListener("click",function(d){d.preventDefault(),d.stopPropagation();var _=1*d.currentTarget.getAttribute("data-i"),P=o.getValue();P.splice(_-1,0,P.splice(_,1)[0]),o.setValue(P),o.onChange(!0),o.jsoneditor.trigger("moveRow",o.rows[_-1])}),e.appendChild(c),c}},{key:"_createMoveDownButton",value:function(t,e){var o=this,c=this.getButton("","movedown","button_move_down_title");return c.classList.add("movedown","json-editor-btntype-move"),c.setAttribute("data-i",t),c.addEventListener("click",function(d){d.preventDefault(),d.stopPropagation();var _=1*d.currentTarget.getAttribute("data-i"),P=o.getValue();P.splice(_+1,0,P.splice(_,1)[0]),o.setValue(P),o.onChange(!0),o.jsoneditor.trigger("moveRow",o.rows[_+1])}),e.appendChild(c),c}},{key:"addControls",value:function(){var t=this;this.collapsed=!1,this.toggle_button=this._createToggleButton(),this.title_controls&&(this.title.insertBefore(this.toggle_button,this.title.childNodes[0]),this.toggle_button.addEventListener("click",function(e){e.preventDefault(),e.stopPropagation(),t.setButtonState(t.panel,t.collapsed),t.collapsed?(t.collapsed=!1,t.setButtonText(e.currentTarget,"","collapse","button_collapse")):(t.collapsed=!0,t.setButtonText(e.currentTarget,"","expand","button_expand"))}),this.options.collapsed&&O(this.toggle_button,"click"),this.schema.options&&this.schema.options.disable_collapse!==void 0?this.schema.options.disable_collapse&&(this.toggle_button.style.display="none"):this.jsoneditor.options.disable_collapse&&(this.toggle_button.style.display="none")),this.add_row_button=this._createAddRowButton(),this.delete_last_row_button=this._createDeleteLastRowButton(),this.remove_all_rows_button=this._createRemoveAllRowsButton()}},{key:"_createToggleButton",value:function(){var t=this.getButton("","collapse","button_collapse");return t.classList.add("json-editor-btntype-toggle"),t}},{key:"_createAddRowButton",value:function(){var t=this,e=this.getButton(this.getItemTitle(),"add","button_add_row_title",[this.getItemTitle()]);return e.classList.add("json-editor-btntype-add"),e.addEventListener("click",function(o){o.preventDefault(),o.stopPropagation();var c=t.addRow();t.refreshValue(),t.refreshRowButtons(),t.onChange(!0),t.jsoneditor.trigger("addRow",c)}),this.controls.appendChild(e),e}},{key:"_createDeleteLastRowButton",value:function(){var t=this,e=this.getButton("button_delete_last","subtract","button_delete_last_title",[this.getItemTitle()]);return e.classList.add("json-editor-btntype-deletelast"),e.addEventListener("click",function(o){if(o.preventDefault(),o.stopPropagation(),!t.askConfirmation())return!1;var c=t.getValue(),d=c.pop();t.setValue(c),t.onChange(!0),t.jsoneditor.trigger("deleteRow",d)}),this.controls.appendChild(e),e}},{key:"_createRemoveAllRowsButton",value:function(){var t=this,e=this.getButton("button_delete_all","delete","button_delete_all_title");return e.classList.add("json-editor-btntype-deleteall"),e.addEventListener("click",function(o){if(o.preventDefault(),o.stopPropagation(),!t.askConfirmation())return!1;var c=t.getValue();t.setValue([]),t.onChange(!0),t.jsoneditor.trigger("deleteAllRows",c)}),this.controls.appendChild(e),e}}],p&&Vh(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(zt);function to(l){return to=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},to(l)}function qh(l,n){for(var p=0;p<n.length;p++){var i=n[p];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(l,(u=function(a,s){if(to(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(to(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),to(u)==="symbol"?u:String(u)),i)}var u}function Yo(){return Yo=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,n,p){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=Vn(a))!==null;);return a}(l,n);if(i){var u=Object.getOwnPropertyDescriptor(i,n);return u.get?u.get.call(arguments.length<3?l:p):u.value}},Yo.apply(this,arguments)}function Ys(l,n){return Ys=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},Ys(l,n)}function Vn(l){return Vn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Vn(l)}function eo(l){return eo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},eo(l)}function Uh(l,n){for(var p=0;p<n.length;p++){var i=n[p];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(l,(u=function(a,s){if(eo(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(eo(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),eo(u)==="symbol"?u:String(u)),i)}var u}function Xo(){return Xo=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,n,p){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=zn(a))!==null;);return a}(l,n);if(i){var u=Object.getOwnPropertyDescriptor(i,n);return u.get?u.get.call(arguments.length<3?l:p):u.value}},Xo.apply(this,arguments)}function Xs(l,n){return Xs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},Xs(l,n)}function zn(l){return zn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},zn(l)}function ro(l){return ro=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ro(l)}function Gh(l,n){for(var p=0;p<n.length;p++){var i=n[p];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(l,(u=function(a,s){if(ro(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(ro(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),ro(u)==="symbol"?u:String(u)),i)}var u}function ci(){return ci=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,n,p){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=rn(a))!==null;);return a}(l,n);if(i){var u=Object.getOwnPropertyDescriptor(i,n);return u.get?u.get.call(arguments.length<3?l:p):u.value}},ci.apply(this,arguments)}function Qs(l,n){return Qs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},Qs(l,n)}function rn(l){return rn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},rn(l)}k(6977);var Ja={ace:Et,array:zt,arrayChoices:er,arraySelect2:or,arraySelectize:Ue,autocomplete:En,base64:Ci,button:Ma,checkbox:Ha,choices:rt,datetime:bt,describedBy:Qe,enum:Be,hidden:Va,info:Ti,integer:Ua,ip:Mo,jodit:Ga,multiple:Mi,multiselect:qt,null:Go,number:qa,object:ai,radio:at,sceditor:Ui,select:ti,select2:Ah,selectize:Ih,signature:Dh,simplemde:$h,starrating:Fc,stepper:Hh,string:Q,table:zh,upload:function(l){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ys(t,e)})(s,l);var n,p,i,u,a=(i=s,u=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Vn(i);if(u){var o=Vn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(to(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(p=[{key:"getNumColumns",value:function(){return 4}},{key:"build",value:function(){var t=this;if(this.options.compact||(this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired())),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.translateProperty(this.schema.description))),this.options.infoText&&(this.infoButton=this.theme.getInfoButton(this.translateProperty(this.options.infoText))),this.options.hidden&&(this.container.style.display="none"),this.options=this.expandCallbacks("upload",x({},{title:"Browse",icon:"",auto_upload:!1,hide_input:!1,enable_drag_drop:!1,drop_zone_text:"Drag & Drop file here",drop_zone_top:!1,alt_drop_zone:"",mime_type:"",max_upload_size:0,upload_handler:function(c,d,_,P){window.alert('No upload_handler defined for "'.concat(c.path,'". You must create your own handler to enable upload to server'))}},this.defaults.options.upload||{},this.options.upload||{})),this.options.mime_type=this.options.mime_type?[].concat(this.options.mime_type):[],this.input=this.theme.getFormInputField("hidden"),this.container.appendChild(this.input),!this.schema.readOnly&&!this.schema.readonly){if(typeof this.options.upload_handler!="function")throw new Error("Upload handler required for upload editor");if(this.uploader=this.theme.getFormInputField("file"),this.uploader.style.display="none",this.options.mime_type.length&&this.uploader.setAttribute("accept",this.options.mime_type),this.options.enable_drag_drop===!0&&this.options.hide_input===!0||(this.clickHandler=function(c){t.uploader.dispatchEvent(new window.MouseEvent("click",{view:window,bubbles:!0,cancelable:!1}))},this.browseButton=this.getButton(this.options.title,this.options.icon,this.options.title),this.browseButton.addEventListener("click",this.clickHandler),this.fileDisplay=this.theme.getFormInputField("input"),this.fileDisplay.setAttribute("readonly",!0),this.fileDisplay.value="No file selected.",this.fileDisplay.addEventListener("dblclick",this.clickHandler),this.fileUploadGroup=this.theme.getInputGroup(this.fileDisplay,[this.browseButton]),this.fileUploadGroup||(this.fileUploadGroup=document.createElement("div"),this.fileUploadGroup.appendChild(this.fileDisplay),this.fileUploadGroup.appendChild(this.browseButton))),this.options.enable_drag_drop===!0){if(this.options.alt_drop_zone!==""){if(this.altDropZone=document.querySelector(this.options.alt_drop_zone),!this.altDropZone)throw new Error('Error: alt_drop_zone selector "'.concat(this.options.alt_drop_zone,'" not found!'));this.dropZone=this.altDropZone}else this.dropZone=this.theme.getDropZone(this.options.drop_zone_text);this.dropZone&&(this.dropZone.classList.add("upload-dropzone"),this.dropZone.addEventListener("dblclick",this.clickHandler))}this.uploadHandler=function(c){c.preventDefault(),c.stopPropagation();var d=c.target.files||c.dataTransfer.files;if(d&&d.length)if(t.options.max_upload_size!==0&&d[0].size>t.options.max_upload_size)t.theme.addInputError(t.uploader,"".concat(t.translate("upload_max_size")," ").concat(t.options.max_upload_size));else if(t.options.mime_type.length===0||t.isValidMimeType(d[0].type,t.options.mime_type)){t.fileDisplay&&(t.fileDisplay.value=d[0].name);var _=new window.FileReader;_.onload=function(P){t.preview_value=P.target.result,t.refreshPreview(d),t.onChange(!0),_=null},_.readAsDataURL(d[0])}else t.theme.addInputError(t.uploader,"".concat(t.translate("upload_wrong_file_format")," ").concat(t.options.mime_type.toString()))},this.uploader.addEventListener("change",this.uploadHandler),this.dragHandler=function(c){var d=c.dataTransfer.items||c.dataTransfer.files,_=d&&d.length&&(t.options.mime_type.length===0||t.isValidMimeType(d[0].type,t.options.mime_type)),P=c.currentTarget.classList&&c.currentTarget.classList.contains("upload-dropzone")&&_;switch((c.currentTarget===window?"w_":"e_")+c.type){case"w_drop":case"w_dragover":P||(c.dataTransfer.dropEffect="none");break;case"e_dragenter":P?(t.dropZone.classList.add("valid-dropzone"),c.dataTransfer.dropEffect="copy"):t.dropZone.classList.add("invalid-dropzone");break;case"e_dragover":P&&(c.dataTransfer.dropEffect="copy");break;case"e_dragleave":t.dropZone.classList.remove("valid-dropzone","invalid-dropzone");break;case"e_drop":t.dropZone.classList.remove("valid-dropzone","invalid-dropzone"),P&&t.uploadHandler(c)}P||c.preventDefault()},this.options.enable_drag_drop===!0&&(["dragover","drop"].forEach(function(c){window.addEventListener(c,t.dragHandler,!0)}),["dragenter","dragover","dragleave","drop"].forEach(function(c){t.dropZone.addEventListener(c,t.dragHandler,!0)}))}this.preview=document.createElement("div"),this.control=this.input.controlgroup=this.theme.getFormControl(this.label,this.uploader||this.input,this.description,this.infoButton),this.uploader&&(this.uploader.controlgroup=this.control);var e=this.uploader||this.input,o=document.createElement("div");this.dropZone&&!this.altDropZone&&this.options.drop_zone_top===!0&&o.appendChild(this.dropZone),this.fileUploadGroup&&o.appendChild(this.fileUploadGroup),this.dropZone&&!this.altDropZone&&this.options.drop_zone_top!==!0&&o.appendChild(this.dropZone),o.appendChild(this.preview),e.parentNode.insertBefore(o,e.nextSibling),this.container.appendChild(this.control),window.requestAnimationFrame(function(){t.afterInputReady()})}},{key:"afterInputReady",value:function(){var t=this;if(this.value){var e=document.createElement("img");e.style.maxWidth="100%",e.style.maxHeight="100px",e.onload=function(o){t.preview.appendChild(e)},e.onerror=function(o){console.error("upload error",o,o.currentTarget)},e.src=this.container.querySelector("a").href}this.theme.afterInputReady(this.input)}},{key:"refreshPreview",value:function(t){var e=this;if(this.last_preview!==this.preview_value&&(this.last_preview=this.preview_value,this.preview.innerHTML="",this.preview_value)){var o=t[0],c=this.preview_value.match(/^data:([^;,]+)[;,]/);if(o.mimeType=c?c[1]:"unknown",o.size>0){var d=Math.floor(Math.log(o.size)/Math.log(1024));o.formattedSize="".concat(parseFloat((o.size/Math.pow(1024,d)).toFixed(2))," ").concat(["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][d])}else o.formattedSize="0 Bytes";var _=this.getButton("button_upload","upload","button_upload");_.addEventListener("click",function(P){P.preventDefault(),_.setAttribute("disabled","disabled"),e.theme.removeInputError(e.uploader),e.theme.getProgressBar&&(e.progressBar=e.theme.getProgressBar(),e.preview.appendChild(e.progressBar)),e.options.upload_handler(e.path,o,{success:function(D){e.setValue(D),e.parent?e.parent.onChildEditorChange(e):e.jsoneditor.onChange(),e.progressBar&&e.preview.removeChild(e.progressBar),_.removeAttribute("disabled")},failure:function(D){e.theme.addInputError(e.uploader,D),e.progressBar&&e.preview.removeChild(e.progressBar),_.removeAttribute("disabled")},updateProgress:function(D){e.progressBar&&(D?e.theme.updateProgressBar(e.progressBar,D):e.theme.updateProgressBarUnknown(e.progressBar))}})}),this.preview.appendChild(this.theme.getUploadPreview(o,_,this.preview_value)),this.options.auto_upload&&(_.dispatchEvent(new window.MouseEvent("click")),_.parentNode.removeChild(_))}}},{key:"enable",value:function(){this.always_disabled||(this.uploader&&(this.uploader.disabled=!1),Yo(Vn(s.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.uploader&&(this.uploader.disabled=!0),Yo(Vn(s.prototype),"disable",this).call(this)}},{key:"setValue",value:function(t){this.value!==t&&(this.value=t,this.input.value=this.value,this.onChange())}},{key:"destroy",value:function(){var t=this;this.options.enable_drag_drop===!0&&(["dragover","drop"].forEach(function(e){window.removeEventListener(e,t.dragHandler,!0)}),["dragenter","dragover","dragleave","drop"].forEach(function(e){t.dropZone.removeEventListener(e,t.dragHandler,!0)}),this.dropZone.removeEventListener("dblclick",this.clickHandler),this.dropZone&&this.dropZone.parentNode&&this.dropZone.parentNode.removeChild(this.dropZone)),this.uploader&&this.uploader.parentNode&&(this.uploader.removeEventListener("change",this.uploadHandler),this.uploader.parentNode.removeChild(this.uploader)),this.browseButton&&this.browseButton.parentNode&&(this.browseButton.removeEventListener("click",this.clickHandler),this.browseButton.parentNode.removeChild(this.browseButton)),this.fileDisplay&&this.fileDisplay.parentNode&&(this.fileDisplay.removeEventListener("dblclick",this.clickHandler),this.fileDisplay.parentNode.removeChild(this.fileDisplay)),this.fileUploadGroup&&this.fileUploadGroup.parentNode&&this.fileUploadGroup.parentNode.removeChild(this.fileUploadGroup),this.preview&&this.preview.parentNode&&this.preview.parentNode.removeChild(this.preview),this.header&&this.header.parentNode&&this.header.parentNode.removeChild(this.header),this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),Yo(Vn(s.prototype),"destroy",this).call(this)}},{key:"isValidMimeType",value:function(t,e){return e.reduce(function(o,c){return o||new RegExp(c.replace(/\*/g,".*"),"gi").test(t)},!1)}}])&&qh(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(H),uuid:function(l){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Xs(t,e)})(s,l);var n,p,i,u,a=(i=s,u=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=zn(i);if(u){var o=zn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(eo(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(p=[{key:"preBuild",value:function(){Xo(zn(s.prototype),"preBuild",this).call(this),this.schema.default=this.uuid=this.getUuid(),this.schema.options||(this.schema.options={}),this.schema.options.cleave||(this.schema.options.cleave={delimiters:["-"],blocks:[8,4,4,4,12]})}},{key:"build",value:function(){Xo(zn(s.prototype),"build",this).call(this),this.disable(!0),this.input.setAttribute("readonly","true")}},{key:"sanitize",value:function(t){return this.testUuid(t)||(t=this.uuid),t}},{key:"setValue",value:function(t,e,o){this.testUuid(t)||(t=this.uuid),this.uuid=t,Xo(zn(s.prototype),"setValue",this).call(this,t,e,o)}},{key:"getUuid",value:function(){return R()}},{key:"testUuid",value:function(t){return/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(t)}}])&&Uh(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(Q),colorpicker:function(l){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Qs(t,e)})(s,l);var n,p,i,u,a=(i=s,u=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=rn(i);if(u){var o=rn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(ro(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(p=[{key:"postBuild",value:function(){window.Picker&&(this.input.type="text"),this.input.style.padding="3px"}},{key:"setValue",value:function(t,e,o){var c=ci(rn(s.prototype),"setValue",this).call(this,t,e,o);return this.picker_instance&&this.picker_instance.domElement&&c&&c.changed&&this.picker_instance.setColor(c.value,!0),c}},{key:"getNumColumns",value:function(){return 2}},{key:"afterInputReady",value:function(){ci(rn(s.prototype),"afterInputReady",this).call(this),this.createPicker(!0)}},{key:"disable",value:function(){if(ci(rn(s.prototype),"disable",this).call(this),this.picker_instance&&this.picker_instance.domElement){this.picker_instance.domElement.style.pointerEvents="none";for(var t=this.picker_instance.domElement.querySelectorAll("button"),e=0;e<t.length;e++)t[e].disabled=!0}}},{key:"enable",value:function(){if(ci(rn(s.prototype),"enable",this).call(this),this.picker_instance&&this.picker_instance.domElement){this.picker_instance.domElement.style.pointerEvents="auto";for(var t=this.picker_instance.domElement.querySelectorAll("button"),e=0;e<t.length;e++)t[e].disabled=!1}}},{key:"destroy",value:function(){this.createPicker(!1),ci(rn(s.prototype),"destroy",this).call(this)}},{key:"createPicker",value:function(t){var e=this;if(t){if(window.Picker&&!this.picker_instance){var o=this.expandCallbacks("colorpicker",x({},{editor:!1,alpha:!1,color:this.value,popup:"bottom"},this.defaults.options.colorpicker||{},this.options.colorpicker||{},{parent:this.container})),c=function(d){var _=e.picker_instance.settings.editorFormat,P=e.picker_instance.settings.alpha;e.setValue(_==="hex"?P?d.hex:d.hex.slice(0,7):d["".concat(_+(P?"a":""),"String")])};o.popup||typeof o.onChange=="function"?o.popup&&typeof o.onDone!="function"&&(o.onDone=c):o.onChange=c,this.picker_instance=new window.Picker(o),o.popup||(this.input.style.display="none",this.theme.afterInputReady(this.picker_instance.domElement))}}else this.picker_instance&&(this.picker_instance.destroy(),this.picker_instance=null,this.input.style.display="")}}])&&Gh(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(Q)};function Hc(l,n){(n==null||n>l.length)&&(n=l.length);for(var p=0,i=new Array(n);p<n;p++)i[p]=l[p];return i}var Vc={},Ks="en",Wh=Ks;Vc.en={error_notset:"Property must be set",error_notempty:"Value required",error_enum:"Value must be one of the enumerated values",error_const:"Value must be the constant value",error_anyOf:"Value must validate against at least one of the provided schemas",error_oneOf:"Value must validate against exactly one of the provided schemas. It currently validates against {{0}} of the schemas.",error_not:"Value must not validate against the provided schema",error_type_union:"Value must be one of the provided types",error_type:"Value must be of type {{0}}",error_disallow_union:"Value must not be one of the provided disallowed types",error_disallow:"Value must not be of type {{0}}",error_multipleOf:"Value must be a multiple of {{0}}",error_maximum_excl:"Value must be less than {{0}}",error_maximum_incl:"Value must be at most {{0}}",error_minimum_excl:"Value must be greater than {{0}}",error_minimum_incl:"Value must be at least {{0}}",error_maxLength:"Value must be at most {{0}} characters long",error_contains:"No items match contains",error_minContains:"Contains match count {{0}} is less than minimum contains count of {{1}}",error_maxContains:"Contains match count {{0}} exceeds maximum contains count of {{1}}",error_minLength:"Value must be at least {{0}} characters long",error_pattern:"Value must match the pattern {{0}}",error_additionalItems:"No additional items allowed in this array",error_maxItems:"Value must have at most {{0}} items",error_minItems:"Value must have at least {{0}} items",error_uniqueItems:"Array must have unique items",error_maxProperties:"Object must have at most {{0}} properties",error_minProperties:"Object must have at least {{0}} properties",error_required:"Object is missing the required property '{{0}}'",error_additional_properties:"No additional properties allowed, but property {{0}} is set",error_property_names_exceeds_maxlength:"Property name {{0}} exceeds maxLength",error_property_names_enum_mismatch:"Property name {{0}} does not match any enum values",error_property_names_const_mismatch:"Property name {{0}} does not match the const value",error_property_names_pattern_mismatch:"Property name {{0}} does not match pattern",error_property_names_false:"Property name {{0}} fails when propertyName is false",error_property_names_maxlength:"Property name {{0}} cannot match invalid maxLength",error_property_names_enum:"Property name {{0}} cannot match invalid enum",error_property_names_pattern:"Property name {{0}} cannot match invalid pattern",error_property_names_unsupported:"Unsupported propertyName {{0}}",error_dependency:"Must have property {{0}}",error_date:"Date must be in the format {{0}}",error_time:"Time must be in the format {{0}}",error_datetime_local:"Datetime must be in the format {{0}}",error_invalid_epoch:"Date must be greater than 1 January 1970",error_ipv4:"Value must be a valid IPv4 address in the form of 4 numbers between 0 and 255, separated by dots",error_ipv6:"Value must be a valid IPv6 address",error_hostname:"The hostname has the wrong format",upload_max_size:"Filesize too large. Max size is ",upload_wrong_file_format:"Wrong file format. Allowed format(s): ",button_save:"Save",button_copy:"Copy",button_cancel:"Cancel",button_add:"Add",button_delete_all:"All",button_delete_all_title:"Delete All",button_delete_last:"Last {{0}}",button_delete_last_title:"Delete Last {{0}}",button_add_row_title:"Add {{0}}",button_move_down_title:"Move down",button_move_up_title:"Move up",button_properties:"Properties",button_object_properties:"Object Properties",button_copy_row_title:"Copy {{0}}",button_delete_row_title:"Delete {{0}}",button_delete_row_title_short:"Delete",button_copy_row_title_short:"Copy",button_collapse:"Collapse",button_expand:"Expand",button_edit_json:"Edit JSON",button_upload:"Upload",flatpickr_toggle_button:"Toggle",flatpickr_clear_button:"Clear",choices_placeholder_text:"Start typing to add value",default_array_item_title:"item",button_delete_node_warning:"Are you sure you want to remove this item?"},Object.entries(Ja).forEach(function(l){var n=function(u,a){return function(s){if(Array.isArray(s))return s}(u)||function(s,t){var e=s==null?null:typeof Symbol<"u"&&s[Symbol.iterator]||s["@@iterator"];if(e!=null){var o,c,d,_,P=[],D=!0,J=!1;try{if(d=(e=e.call(s)).next,t===0){if(Object(e)!==e)return;D=!1}else for(;!(D=(o=d.call(e)).done)&&(P.push(o.value),P.length!==t);D=!0);}catch(nt){J=!0,c=nt}finally{try{if(!D&&e.return!=null&&(_=e.return(),Object(_)!==_))return}finally{if(J)throw c}}return P}}(u,a)||function(s,t){if(s){if(typeof s=="string")return Hc(s,t);var e=Object.prototype.toString.call(s).slice(8,-1);return e==="Object"&&s.constructor&&(e=s.constructor.name),e==="Map"||e==="Set"?Array.from(s):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?Hc(s,t):void 0}}(u,a)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
62
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}(
|
|
63
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Uc(l,n){(n==null||n>l.length)&&(n=l.length);for(var p=0,i=new Array(n);p<n;p++)i[p]=l[p];return i}function rr(l){return rr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},rr(l)}function Zh(l,n){for(var p=0;p<n.length;p++){var i=n[p];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(l,(u=function(a,s){if(rr(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(rr(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),rr(u)==="symbol"?u:String(u)),i)}var u}k(8733);var Jh=function(){function l(a){(function(s,t){if(!(s instanceof t))throw new TypeError("Cannot call a class as a function")})(this,l),this.options=a||{},this.schema={},this.refs=this.options.refs||{},this.refs_with_info={},this.refs_prefix="#/counter/",this.refs_counter=1,this._subSchema1={type:function(s){rr(s.type)==="object"&&(s.type=this._expandSubSchema(s.type))},disallow:function(s){rr(s.disallow)==="object"&&(s.disallow=this._expandSubSchema(s.disallow))},anyOf:function(s){var t=this;Object.entries(s.anyOf).forEach(function(e){var o=di(e,2),c=o[0],d=o[1];s.anyOf[c]=t.expandSchema(d)})},dependencies:function(s){var t=this;Object.entries(s.dependencies).forEach(function(e){var o=di(e,2),c=o[0],d=o[1];rr(d)!=="object"||Array.isArray(d)||(s.dependencies[c]=t.expandSchema(d))})},not:function(s){s.not=this.expandSchema(s.not)}},this._subSchema2={allOf:function(s,t){var e=this,o=x({},t);return Object.entries(s.allOf).forEach(function(c){var d=di(c,2),_=d[0],P=d[1];s.allOf[_]=e.expandRefs(P,!0),o=e.extendSchemas(o,e.expandSchema(P))}),delete o.allOf,o},extends:function(s,t){var e,o=this;return delete(e=Array.isArray(s.extends)?s.extends.reduce(function(c,d,_){return o.extendSchemas(c,o.expandSchema(d))},t):this.extendSchemas(t,this.expandSchema(s.extends))).extends,e},oneOf:function(s,t){var e=this,o=x({},t);return delete o.oneOf,s.oneOf.reduce(function(c,d,_){return c.oneOf[_]=e.extendSchemas(e.expandSchema(d),o),c},t),t}}}var n,p,i,u;return n=l,p=[{key:"load",value:(u=qc(hi().mark(function a(s,t,e){return hi().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return this.schema=s,o.next=3,this._asyncloadExternalRefs(s,t,this._getFileBase(e),!0);case 3:return o.abrupt("return",this.expandRefs(s));case 4:case"end":return o.stop()}},a,this)})),function(a,s,t){return u.apply(this,arguments)})},{key:"expandRefs",value:function(a,s){var t=this,e=x({},a);if(!e.$ref)return e;var o=e.$ref.split("#");if(o.length===2&&!this.refs_with_info[e.$ref]){var c=this.expandRecursivePointer(this.schema,o[1]),d=this.extendSchemas(e,this.expandSchema(c));return delete d.$ref,d}var _=o.length>2?this.refs_with_info["#"+o[1]]:this.refs_with_info[e.$ref];delete e.$ref;var P=_.$ref.startsWith("#")?_.fetchUrl:"",D=this._getRef(P,_);if(this.refs[D]){if(s&&C(this.refs[D],"allOf")){var J=this.refs[D].allOf;Object.keys(J).forEach(function(nt){J[nt]=t.expandRefs(J[nt],!0)})}}else console.warn("reference:'".concat(D,"' not found!"));return o.length>2?this.extendSchemas(e,this.expandSchema(this.expandRecursivePointer(this.refs[D],o[2]))):this.extendSchemas(e,this.expandSchema(this.refs[D]))}},{key:"expandRecursivePointer",value:function(a,s){var t=a;return s.split("/").slice(1).forEach(function(e){t[e]&&(t=t[e])}),t.$refs&&t.$refs.startsWith("#")?this.expandRecursivePointer(a,t.$refs):t}},{key:"expandSchema",value:function(a){var s=this;Object.entries(this._subSchema1).forEach(function(e){var o=di(e,2),c=o[0],d=o[1];a[c]&&d.call(s,a)});var t=x({},a);return Object.entries(this._subSchema2).forEach(function(e){var o=di(e,2),c=o[0],d=o[1];a[c]&&(t=d.call(s,a,t))}),this.expandRefs(t)}},{key:"_getRef",value:function(a,s){var t=a+s;return this.refs[t]?t:a+decodeURIComponent(s.$ref)}},{key:"_expandSubSchema",value:function(a){var s=this;return Array.isArray(a)?a.map(function(t){return rr(t)==="object"?s.expandSchema(t):t}):this.expandSchema(a)}},{key:"_manageRecursivePointer",value:function(a,s){Object.keys(a).forEach(function(t){a[t].$ref&&a[t].$ref.indexOf("#")===0&&(a[t].$ref=s+a[t].$ref)})}},{key:"_getExternalRefs",value:function(a,s){var t=this,e=arguments.length>2&&arguments[2]!==void 0&&arguments[2];e||this._manageRecursivePointer(a,s);var o={},c=function(J){return Object.keys(J).forEach(function(nt){o[nt]=!0})};if(a.$ref&&rr(a.$ref)!=="object"&&(a.$ref.indexOf("#")!==0||!e)){var d=a.$ref,_="";d.indexOf("#")>0&&(d=d.substr(0,d.indexOf("#"))),d!==a.$ref&&(_=a.$ref.substr(a.$ref.indexOf("#")));var P=this.refs_prefix+this.refs_counter++,D=P+_;a.$ref.substr(0,1)==="#"||this.refs[a.$ref]||(o[d]=!0),this.refs_with_info[P]={fetchUrl:s,$ref:d},a.$ref=D}return Object.values(a).forEach(function(J){J&&rr(J)==="object"&&(Array.isArray(J)?Object.values(J).forEach(function(nt){nt&&rr(nt)==="object"&&c(t._getExternalRefs(nt,s,e))}):J.$ref&&typeof J.$ref=="string"&&J.$ref.startsWith("#")||c(t._getExternalRefs(J,s,e)))}),a.id&&typeof a.id=="string"&&a.id.substr(0,4)==="urn:"?this.refs[a.id]=a:a.$id&&typeof a.$id=="string"&&a.$id.substr(0,4)==="urn:"&&(this.refs[a.$id]=a),o}},{key:"_getFileBase",value:function(a){if(!a)return"/";var s=this.options.ajaxBase;return s===void 0?this._getFileBaseFromFileLocation(a):s}},{key:"_getFileBaseFromFileLocation",value:function(a){var s=a.split("/");return s.pop(),"".concat(s.join("/"),"/")}},{key:"_joinUrl",value:function(a,s){var t=a;return a.substr(0,7)!=="http://"&&a.substr(0,8)!=="https://"&&a.substr(0,5)!=="blob:"&&a.substr(0,5)!=="data:"&&a.substr(0,1)!=="#"&&a.substr(0,1)!=="/"&&(t=s+a),t.indexOf("#")>0&&(t=t.substr(0,t.indexOf("#"))),t}},{key:"_isUniformResourceName",value:function(a){return a.substr(0,4)==="urn:"}},{key:"_asyncloadExternalRefs",value:(i=qc(hi().mark(function a(s,t,e){var o,c,d,_,P,D,J=this,nt=arguments;return hi().wrap(function(ut){for(;;)switch(ut.prev=ut.next){case 0:o=nt.length>3&&nt[3]!==void 0&&nt[3],c=this._getExternalRefs(s,t,o),d=0,_=hi().mark(function dt(){var kt,Ct,Nt,re,Pe,Ut,gt,Wt,ze,W,G;return hi().wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:if((kt=D[P])!==void 0){Z.next=3;break}return Z.abrupt("return","continue");case 3:if(!J.refs[kt]){Z.next=5;break}return Z.abrupt("return","continue");case 5:if(!J._isUniformResourceName(kt)){Z.next=40;break}if(J.refs[kt]="loading",d++,Ct=J.options.urn_resolver,Nt=kt,typeof Ct=="function"){Z.next=13;break}throw console.log('No "urn_resolver" callback defined to resolve "'.concat(Nt,'"')),new Error("Must set urn_resolver option to a callback to resolve ".concat(Nt));case 13:return Nt.indexOf("#")>0&&(Nt=Nt.substr(0,Nt.indexOf("#"))),Z.prev=14,Z.next=17,Ct(Nt);case 17:re=Z.sent,Z.prev=18,Pe=JSON.parse(re),Z.next=26;break;case 22:throw Z.prev=22,Z.t0=Z.catch(18),console.log(Z.t0),new Error("Failed to parse external ref ".concat(Nt));case 26:if(!(typeof Pe!="boolean"&&rr(Pe)!=="object"||Pe===null||Array.isArray(Pe))){Z.next=28;break}throw new Error("External ref does not contain a valid schema - ".concat(Nt));case 28:return J.refs[kt]=Pe,Z.next=31,J._asyncloadExternalRefs(Pe,kt,e);case 31:Z.next=37;break;case 33:throw Z.prev=33,Z.t1=Z.catch(14),console.log(Z.t1),new Error("Failed to parse external ref ".concat(Nt));case 37:if(typeof re!="boolean"){Z.next=39;break}throw new Error("External ref does not contain a valid schema - ".concat(Nt));case 39:return Z.abrupt("return","continue");case 40:if(J.options.ajax){Z.next=42;break}throw new Error("Must set ajax option to true to load external ref ".concat(kt));case 42:if(d++,Ut=J._joinUrl(kt,e),J.options.ajax_cache_responses&&(Wt=J.cacheGet(Ut))&&(gt=Wt),gt){Z.next=61;break}return Z.next=48,new Promise(function(pt){var et=new XMLHttpRequest;J.options.ajaxCredentials&&(et.withCredentials=J.options.ajaxCredentials),et.overrideMimeType("application/json"),et.open("GET",Ut,!0),et.onload=function(){pt(et)},et.onerror=function(Lt){pt(void 0)},et.send()});case 48:if((ze=Z.sent)!==void 0){Z.next=51;break}throw new Error("Failed to fetch ref via ajax - ".concat(kt));case 51:Z.prev=51,gt=JSON.parse(ze.responseText),J.onSchemaLoaded({schema:gt,schemaUrl:Ut}),J.options.ajax_cache_responses&&J.cacheSet(Ut,gt),Z.next=61;break;case 57:throw Z.prev=57,Z.t2=Z.catch(51),console.log(Z.t2),new Error("Failed to parse external ref ".concat(Ut));case 61:if(!(typeof gt!="boolean"&&rr(gt)!=="object"||gt===null||Array.isArray(gt))){Z.next=63;break}throw new Error("External ref does not contain a valid schema - ".concat(Ut));case 63:return J.refs[kt]=gt,W=J._getFileBaseFromFileLocation(Ut),Ut!==kt&&(G=Ut.split("/"),Ut=(kt.substr(0,1)==="/"?"/":"")+G.pop()),Z.next=68,J._asyncloadExternalRefs(gt,Ut,W);case 68:case"end":return Z.stop()}},dt,null,[[14,33],[18,22],[51,57]])}),P=0,D=Object.keys(c);case 5:if(!(P<D.length)){ut.next=13;break}return ut.delegateYield(_(),"t0",7);case 7:if(ut.t0!=="continue"){ut.next=10;break}return ut.abrupt("continue",10);case 10:P++,ut.next=5;break;case 13:if(d){ut.next=15;break}return ut.abrupt("return",!0);case 15:this.onAllSchemasLoaded();case 16:case"end":return ut.stop()}},a,this)})),function(a,s,t){return i.apply(this,arguments)})},{key:"onSchemaLoaded",value:function(a){}},{key:"onAllSchemasLoaded",value:function(){}},{key:"extendSchemas",value:function(a,s){var t=this;a=x({},a),s=x({},s);var e={},o=function(c){typeof c=="string"&&(c=[c]),typeof s.type=="string"&&(s.type=[s.type]),s.type&&s.type.length?e.type=c.filter(function(d){return s.type.includes(d)}):e.type=c,e.type.length===1&&typeof e.type[0]=="string"?e.type=e.type[0]:e.type.length===0&&delete e.type};return Object.entries(a).forEach(function(c){var d=di(c,2),_=d[0],P=d[1];s[_]!==void 0?function(D,J){(function(nt,ut){return(nt==="required"||nt==="defaultProperties")&&rr(ut)==="object"&&Array.isArray(ut)})(D,J)?e[D]=J.concat(s[D]).reduce(function(nt,ut){return nt.includes(ut)||nt.push(ut),nt},[]):D!=="type"||typeof J!="string"&&!Array.isArray(J)?rr(J)!=="object"||Array.isArray(J)||J===null?e[D]=J:e[D]=t.extendSchemas(J,s[D]):o(J)}(_,P):e[_]=P}),Object.entries(s).forEach(function(c){var d=di(c,2),_=d[0],P=d[1];a[_]===void 0&&(e[_]=P)}),e}},{key:"getCacheKey",value:function(a){return["je-cache",a].join("::")}},{key:"getCacheBuster",value:function(){return this.options.ajax_cache_buster||new Date().toISOString().slice(0,10)}},{key:"cacheSet",value:function(a,s){try{window.localStorage.setItem(this.getCacheKey(a),JSON.stringify({cacheBuster:this.getCacheBuster(),schema:s}))}catch(t){console.error(t)}}},{key:"cacheGet",value:function(a){try{var s=window.localStorage.getItem(this.getCacheKey(a));if(s){var t=JSON.parse(s);if(t.cacheBuster&&t.schema&&t.cacheBuster===this.getCacheBuster())return t.schema;this.cacheDelete(a)}}catch(e){console.error(e)}}},{key:"cacheDelete",value:function(a){window.localStorage.removeItem(this.getCacheKey(a))}}],p&&Zh(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),l}(),Yh=(k(3210),{default:function(){return{compile:function(l){var n=l.match(/{{\s*([a-zA-Z0-9\-_ .]+)\s*}}/g),p=n&&n.length;if(!p)return function(){return l};for(var i=[],u=function(s){var t,e,o=n[s].replace(/[{}]+/g,"").trim().split("."),c=o.length;c>1?t=function(d){for(e=d,s=0;s<c&&(e=e[o[s]]);s++);return e}:(o=o[0],t=function(d){return d[o]}),i.push({s:n[s],r:t})},a=0;a<p;a++)u(a);return function(s){var t,e="".concat(l);for(a=0;a<p;a++)t=i[a],e=e.replace(t.s,t.r(s));return e}}}},ejs:function(){return!!window.EJS&&{compile:function(l){var n=new window.EJS({text:l});return function(p){return n.render(p)}}}},handlebars:function(){return window.Handlebars},hogan:function(){return!!window.Hogan&&{compile:function(l){var n=window.Hogan.compile(l);return function(p){return n.render(p)}}}},lodash:function(){return!!window._&&{compile:function(l){return function(n){return window._.template(l)(n)}}}},markup:function(){return!(!window.Mark||!window.Mark.up)&&{compile:function(l){return function(n){return window.Mark.up(l,n)}}}},mustache:function(){return!!window.Mustache&&{compile:function(l){return function(n){return window.Mustache.render(l,n)}}}},swig:function(){return window.swig},underscore:function(){return!!window._&&{compile:function(l){return function(n){return window._.template(l)(n)}}}}});function Qo(l){return Qo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Qo(l)}function tl(l,n){(n==null||n>l.length)&&(n=l.length);for(var p=0,i=new Array(n);p<n;p++)i[p]=l[p];return i}function Xh(l,n){for(var p=0;p<n.length;p++){var i=n[p];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(l,(u=function(a,s){if(Qo(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Qo(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Qo(u)==="symbol"?u:String(u)),i)}var u}var Qh={collapse:"",expand:"",delete:"",edit:"",add:"",cancel:"",save:"",moveup:"",movedown:""},vn=function(){function l(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Qh;(function(a,s){if(!(a instanceof s))throw new TypeError("Cannot call a class as a function")})(this,l),this.mapping=u,this.icon_prefix=i}var n,p;return n=l,(p=[{key:"getIconClass",value:function(i){return this.mapping[i]?this.icon_prefix+this.mapping[i]:this.icon_prefix+i}},{key:"getIcon",value:function(i){var u,a=this.getIconClass(i);if(!a)return null;var s,t=document.createElement("i");return(u=t.classList).add.apply(u,function(e){if(Array.isArray(e))return tl(e)}(s=a.split(" "))||function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}(s)||function(e,o){if(e){if(typeof e=="string")return tl(e,o);var c=Object.prototype.toString.call(e).slice(8,-1);return c==="Object"&&e.constructor&&(c=e.constructor.name),c==="Map"||c==="Set"?Array.from(e):c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c)?tl(e,o):void 0}}(s)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
64
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()),t}}])&&Xh(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),l}();function el(l){return el=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},el(l)}function rl(l,n){return rl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},rl(l,n)}function Ya(l){return Ya=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ya(l)}var Kh="glyphicon glyphicon-",td={collapse:"chevron-down",expand:"chevron-right",delete:"trash",edit:"pencil",add:"plus",subtract:"minus",cancel:"floppy-remove",save:"floppy-saved",moveup:"arrow-up",moveright:"arrow-right",movedown:"arrow-down",moveleft:"arrow-left",copy:"copy",clear:"remove-circle",time:"time",calendar:"calendar",edit_properties:"list"},ed=function(l){(function(s,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(t&&t.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),Object.defineProperty(s,"prototype",{writable:!1}),t&&rl(s,t)})(a,l);var n,p,i,u=(p=a,i=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var s,t=Ya(p);if(i){var e=Ya(this).constructor;s=Reflect.construct(t,arguments,e)}else s=t.apply(this,arguments);return function(o,c){if(c&&(el(c)==="object"||typeof c=="function"))return c;if(c!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}(o)}(this,s)});function a(){return function(s,t){if(!(s instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),u.call(this,Kh,td)}return n=a,Object.defineProperty(n,"prototype",{writable:!1}),n}(vn);function nl(l){return nl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},nl(l)}function il(l,n){return il=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},il(l,n)}function Xa(l){return Xa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Xa(l)}var rd="icon-",nd={collapse:"chevron-down",expand:"chevron-right",delete:"trash",edit:"pencil",add:"plus",subtract:"minus",cancel:"ban-circle",save:"save",moveup:"arrow-up",moveright:"arrow-right",movedown:"arrow-down",moveleft:"arrow-left",copy:"copy",clear:"remove-circle",time:"time",calendar:"calendar",edit_properties:"list"},id=function(l){(function(s,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(t&&t.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),Object.defineProperty(s,"prototype",{writable:!1}),t&&il(s,t)})(a,l);var n,p,i,u=(p=a,i=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var s,t=Xa(p);if(i){var e=Xa(this).constructor;s=Reflect.construct(t,arguments,e)}else s=t.apply(this,arguments);return function(o,c){if(c&&(nl(c)==="object"||typeof c=="function"))return c;if(c!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}(o)}(this,s)});function a(){return function(s,t){if(!(s instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),u.call(this,rd,nd)}return n=a,Object.defineProperty(n,"prototype",{writable:!1}),n}(vn);function ol(l){return ol=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ol(l)}function al(l,n){return al=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},al(l,n)}function Qa(l){return Qa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Qa(l)}var od="fa fa-",ad={collapse:"caret-square-o-down",expand:"caret-square-o-right",delete:"times",edit:"pencil",add:"plus",subtract:"minus",cancel:"ban",save:"save",moveup:"arrow-up",moveright:"arrow-right",movedown:"arrow-down",moveleft:"arrow-left",copy:"files-o",clear:"times-circle-o",time:"clock-o",calendar:"calendar",edit_properties:"list"},sd=function(l){(function(s,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(t&&t.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),Object.defineProperty(s,"prototype",{writable:!1}),t&&al(s,t)})(a,l);var n,p,i,u=(p=a,i=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var s,t=Qa(p);if(i){var e=Qa(this).constructor;s=Reflect.construct(t,arguments,e)}else s=t.apply(this,arguments);return function(o,c){if(c&&(ol(c)==="object"||typeof c=="function"))return c;if(c!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}(o)}(this,s)});function a(){return function(s,t){if(!(s instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),u.call(this,od,ad)}return n=a,Object.defineProperty(n,"prototype",{writable:!1}),n}(vn);function sl(l){return sl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},sl(l)}function ll(l,n){return ll=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},ll(l,n)}function Ka(l){return Ka=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ka(l)}var ld="fas fa-",cd={collapse:"caret-down",expand:"caret-right",delete:"trash",edit:"pen",add:"plus",subtract:"minus",cancel:"ban",save:"save",moveup:"arrow-up",moveright:"arrow-right",movedown:"arrow-down",moveleft:"arrow-left",copy:"copy",clear:"times-circle",time:"clock",calendar:"calendar",edit_properties:"list"},ud=function(l){(function(s,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(t&&t.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),Object.defineProperty(s,"prototype",{writable:!1}),t&&ll(s,t)})(a,l);var n,p,i,u=(p=a,i=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var s,t=Ka(p);if(i){var e=Ka(this).constructor;s=Reflect.construct(t,arguments,e)}else s=t.apply(this,arguments);return function(o,c){if(c&&(sl(c)==="object"||typeof c=="function"))return c;if(c!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}(o)}(this,s)});function a(){return function(s,t){if(!(s instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),u.call(this,ld,cd)}return n=a,Object.defineProperty(n,"prototype",{writable:!1}),n}(vn);function cl(l){return cl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},cl(l)}function ul(l,n){return ul=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},ul(l,n)}function ts(l){return ts=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ts(l)}var hd="ui-icon ui-icon-",dd={collapse:"triangle-1-s",expand:"triangle-1-e",delete:"trash",edit:"pencil",add:"plusthick",subtract:"minusthick",cancel:"closethick",save:"disk",moveup:"arrowthick-1-n",moveright:"arrowthick-1-e",movedown:"arrowthick-1-s",moveleft:"arrowthick-1-w",copy:"copy",clear:"circle-close",time:"time",calendar:"calendar",edit_properties:"note"},pd=function(l){(function(s,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(t&&t.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),Object.defineProperty(s,"prototype",{writable:!1}),t&&ul(s,t)})(a,l);var n,p,i,u=(p=a,i=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var s,t=ts(p);if(i){var e=ts(this).constructor;s=Reflect.construct(t,arguments,e)}else s=t.apply(this,arguments);return function(o,c){if(c&&(cl(c)==="object"||typeof c=="function"))return c;if(c!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}(o)}(this,s)});function a(){return function(s,t){if(!(s instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),u.call(this,hd,dd)}return n=a,Object.defineProperty(n,"prototype",{writable:!1}),n}(vn);function hl(l){return hl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},hl(l)}function dl(l,n){return dl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},dl(l,n)}function es(l){return es=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},es(l)}var fd="oi oi-",yd={collapse:"collapse-down",expand:"expand-right",delete:"trash",edit:"pencil",add:"plus",subtract:"minus",cancel:"ban",save:"file",moveup:"arrow-thick-top",moveright:"arrow-thick-right",movedown:"arrow-thick-bottom",moveleft:"arrow-thick-left",copy:"clipboard",clear:"circle-x",time:"clock",calendar:"calendar",edit_properties:"list"},md=function(l){(function(s,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(t&&t.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),Object.defineProperty(s,"prototype",{writable:!1}),t&&dl(s,t)})(a,l);var n,p,i,u=(p=a,i=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var s,t=es(p);if(i){var e=es(this).constructor;s=Reflect.construct(t,arguments,e)}else s=t.apply(this,arguments);return function(o,c){if(c&&(hl(c)==="object"||typeof c=="function"))return c;if(c!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}(o)}(this,s)});function a(){return function(s,t){if(!(s instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),u.call(this,fd,yd)}return n=a,Object.defineProperty(n,"prototype",{writable:!1}),n}(vn);function pl(l){return pl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},pl(l)}function fl(l,n){return fl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},fl(l,n)}function rs(l){return rs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},rs(l)}var vd="icon icon-",bd={collapse:"arrow-down",expand:"arrow-right",delete:"delete",edit:"edit",add:"plus",subtract:"minus",cancel:"cross",save:"check",moveup:"upward",moveright:"forward",movedown:"downward",moveleft:"back",copy:"copy",clear:"close",time:"time",calendar:"bookmark",edit_properties:"menu"},gd=function(l){(function(s,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(t&&t.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),Object.defineProperty(s,"prototype",{writable:!1}),t&&fl(s,t)})(a,l);var n,p,i,u=(p=a,i=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var s,t=rs(p);if(i){var e=rs(this).constructor;s=Reflect.construct(t,arguments,e)}else s=t.apply(this,arguments);return function(o,c){if(c&&(pl(c)==="object"||typeof c=="function"))return c;if(c!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}(o)}(this,s)});function a(){return function(s,t){if(!(s instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),u.call(this,vd,bd)}return n=a,Object.defineProperty(n,"prototype",{writable:!1}),n}(vn);function yl(l){return yl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},yl(l)}function ml(l,n){return ml=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},ml(l,n)}function ns(l){return ns=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ns(l)}var wd="bi bi-",_d={collapse:"chevron-down",expand:"chevron-right",delete:"trash",edit:"pencil",add:"plus",subtract:"dash",cancel:"x-circle",save:"save",moveup:"arrow-up",moveright:"arrow-right",movedown:"arrow-down",moveleft:"arrow-left",copy:"clipboard",clear:"x-circle",time:"clock",calendar:"calendar",edit_properties:"list-ul"},xd={bootstrap:function(l){(function(s,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(t&&t.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),Object.defineProperty(s,"prototype",{writable:!1}),t&&ml(s,t)})(a,l);var n,p,i,u=(p=a,i=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var s,t=ns(p);if(i){var e=ns(this).constructor;s=Reflect.construct(t,arguments,e)}else s=t.apply(this,arguments);return function(o,c){if(c&&(yl(c)==="object"||typeof c=="function"))return c;if(c!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}(o)}(this,s)});function a(){return function(s,t){if(!(s instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),u.call(this,wd,_d)}return n=a,Object.defineProperty(n,"prototype",{writable:!1}),n}(vn),bootstrap3:ed,fontawesome3:id,fontawesome4:sd,fontawesome5:ud,jqueryui:pd,openiconic:md,spectre:gd};function Ko(l){return Ko=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Ko(l)}function kd(l,n){for(var p=0;p<n.length;p++){var i=n[p];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(l,(u=function(a,s){if(Ko(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Ko(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Ko(u)==="symbol"?u:String(u)),i)}var u}var Gc=["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"].find(function(l){return l in document.documentElement}),bn=function(){function l(i){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{disable_theme_rules:!1};(function(a,s){if(!(a instanceof s))throw new TypeError("Cannot call a class as a function")})(this,l),this.jsoneditor=i,Object.keys(u).forEach(function(a){i.options[a]!==void 0&&(u[a]=i.options[a])}),this.options=u}var n,p;return n=l,p=[{key:"getContainer",value:function(){return document.createElement("div")}},{key:"getFloatRightLinkHolder",value:function(){var i=document.createElement("div");return i.classList.add("je-float-right-linkholder"),i}},{key:"getModal",value:function(){var i=document.createElement("div");return i.style.display="none",i.classList.add("je-modal"),i}},{key:"getGridContainer",value:function(){return document.createElement("div")}},{key:"getGridRow",value:function(){var i=document.createElement("div");return i.classList.add("row"),i}},{key:"getGridColumn",value:function(){return document.createElement("div")}},{key:"setGridColumnSize",value:function(i,u){}},{key:"getLink",value:function(i){var u=document.createElement("a");return u.setAttribute("href","#"),u.appendChild(document.createTextNode(i)),u}},{key:"disableHeader",value:function(i){i.style.color="#ccc"}},{key:"disableLabel",value:function(i){i.style.color="#ccc"}},{key:"enableHeader",value:function(i){i.style.color=""}},{key:"enableLabel",value:function(i){i.style.color=""}},{key:"getInfoButton",value:function(i){var u=document.createElement("span");u.innerText="ⓘ",u.classList.add("je-infobutton-icon");var a=document.createElement("span");return a.classList.add("je-infobutton-tooltip"),a.innerText=i,u.onmouseover=function(){a.style.visibility="visible"},u.onmouseleave=function(){a.style.visibility="hidden"},u.appendChild(a),u}},{key:"getFormInputLabel",value:function(i,u){var a=document.createElement("label");return a.appendChild(document.createTextNode(i)),u&&a.classList.add("required"),a}},{key:"getHeader",value:function(i,u){var a=document.createElement("h3");return typeof i=="string"?a.textContent=i:a.appendChild(i),a.classList.add("je-header"),a}},{key:"getCheckbox",value:function(){var i=this.getFormInputField("checkbox");return i.classList.add("je-checkbox"),i}},{key:"getCheckboxLabel",value:function(i,u){var a=document.createElement("label");return a.appendChild(document.createTextNode(" ".concat(i))),u&&a.classList.add("required"),a}},{key:"getMultiCheckboxHolder",value:function(i,u,a,s){var t=document.createElement("div");return t.classList.add("control-group"),u&&(u.style.display="block",t.appendChild(u),s&&u.appendChild(s)),Object.values(i).forEach(function(e){e.style.display="inline-block",e.style.marginRight="20px",t.appendChild(e)}),a&&t.appendChild(a),t}},{key:"getFormCheckboxControl",value:function(i,u,a){var s=document.createElement("div");return s.appendChild(i),u.style.width="auto",i.insertBefore(u,i.firstChild),a&&s.classList.add("je-checkbox-control--compact"),s}},{key:"getFormRadio",value:function(i){var u=this.getFormInputField("radio");return Object.keys(i).forEach(function(a){return u.setAttribute(a,i[a])}),u.classList.add("je-radio"),u}},{key:"getFormRadioLabel",value:function(i,u){var a=document.createElement("label");return a.appendChild(document.createTextNode(" ".concat(i))),u&&a.classList.add("required"),a}},{key:"getFormRadioControl",value:function(i,u,a){var s=document.createElement("div");return s.appendChild(i),u.style.width="auto",i.insertBefore(u,i.firstChild),a&&s.classList.add("je-radio-control--compact"),s}},{key:"getSelectInput",value:function(i,u){var a=document.createElement("select");return i&&this.setSelectOptions(a,i),a}},{key:"getSwitcher",value:function(i){var u=this.getSelectInput(i,!1);return u.classList.add("je-switcher"),u}},{key:"getSwitcherOptions",value:function(i){return i.getElementsByTagName("option")}},{key:"setSwitcherOptions",value:function(i,u,a){this.setSelectOptions(i,u,a)}},{key:"setSelectOptions",value:function(i,u){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];i.innerHTML="";for(var s=0;s<u.length;s++){var t=document.createElement("option");t.setAttribute("value",u[s]),t.textContent=a[s]||u[s],i.appendChild(t)}}},{key:"getTextareaInput",value:function(){var i=document.createElement("textarea");return i.classList.add("je-textarea"),i}},{key:"getRangeInput",value:function(i,u,a){var s=this.getFormInputField("range");return s.setAttribute("min",i),s.setAttribute("max",u),s.setAttribute("step",a),s}},{key:"getStepperButtons",value:function(i){var u=document.createElement("div"),a=document.createElement("button");a.setAttribute("type","button"),a.classList.add("stepper-down");var s=document.createElement("button");s.setAttribute("type","button"),s.classList.add("stepper-up"),i.getAttribute("readonly")&&(a.setAttribute("disabled",!0),s.setAttribute("disabled",!0)),a.textContent="-",s.textContent="+";var t=function(c,d){c.value=Number(d||c.value),c.setAttribute("initialized","1")},e=i.getAttribute("min"),o=i.getAttribute("max");return a.addEventListener("click",function(){i.getAttribute("initialized")?e?Number(i.value)>Number(e)&&i.stepDown():i.stepDown():t(i,e),O(i,"change")}),s.addEventListener("click",function(){i.getAttribute("initialized")?o?Number(i.value)<Number(o)&&i.stepUp():i.stepUp():t(i,e),O(i,"change")}),u.appendChild(a),u.appendChild(s),u}},{key:"getRangeOutput",value:function(i,u){var a=document.createElement("output"),s=function(t){a.value=t.currentTarget.value};return i.addEventListener("change",s,!1),i.addEventListener("input",s,!1),a}},{key:"getRangeControl",value:function(i,u){var a=document.createElement("div");return a.classList.add("je-range-control"),u&&a.appendChild(u),a.appendChild(i),a}},{key:"getFormInputField",value:function(i){var u=document.createElement("input");return u.setAttribute("type",i),u}},{key:"afterInputReady",value:function(i){}},{key:"getFormControl",value:function(i,u,a,s,t){var e=document.createElement("div");return e.classList.add("form-control"),i&&(e.appendChild(i),t&&i.setAttribute("for",t)),u.type!=="checkbox"&&u.type!=="radio"||!i?(s&&i&&i.appendChild(s),e.appendChild(u)):(u.style.width="auto",i.insertBefore(u,i.firstChild),s&&i.appendChild(s)),a&&e.appendChild(a),e}},{key:"getIndentedPanel",value:function(){var i=document.createElement("div");return i.classList.add("je-indented-panel"),i}},{key:"getTopIndentedPanel",value:function(){var i=document.createElement("div");return i.classList.add("je-indented-panel--top"),i}},{key:"getChildEditorHolder",value:function(){return document.createElement("div")}},{key:"getDescription",value:function(i){var u=document.createElement("p");return window.DOMPurify?u.innerHTML=window.DOMPurify.sanitize(i):u.textContent=this.cleanText(i),u}},{key:"getCheckboxDescription",value:function(i){return this.getDescription(i)}},{key:"getFormInputDescription",value:function(i){return this.getDescription(i)}},{key:"getButtonHolder",value:function(){return document.createElement("span")}},{key:"getHeaderButtonHolder",value:function(){return this.getButtonHolder()}},{key:"getFormButtonHolder",value:function(i){return this.getButtonHolder()}},{key:"getButton",value:function(i,u,a){var s=document.createElement("button");return s.type="button",this.setButtonText(s,i,u,a),s}},{key:"getFormButton",value:function(i,u,a){return this.getButton(i,u,a)}},{key:"setButtonText",value:function(i,u,a,s){for(;i.firstChild;)i.removeChild(i.firstChild);if(a&&(i.appendChild(a),u=" ".concat(u)),!this.jsoneditor.options.iconlib||!this.jsoneditor.options.remove_button_labels||!a){var t=document.createElement("span");t.appendChild(document.createTextNode(u)),i.appendChild(t)}s&&i.setAttribute("title",s)}},{key:"getTableContainer",value:function(){return document.createElement("div")}},{key:"getTable",value:function(){return document.createElement("table")}},{key:"getTableRow",value:function(){return document.createElement("tr")}},{key:"getTableHead",value:function(){return document.createElement("thead")}},{key:"getTableBody",value:function(){return document.createElement("tbody")}},{key:"getTableHeaderCell",value:function(i){var u=document.createElement("th");return u.textContent=i,u}},{key:"getTableCell",value:function(){return document.createElement("td")}},{key:"getErrorMessage",value:function(i){var u=document.createElement("p");return u.style=u.style||{},u.style.color="red",u.appendChild(document.createTextNode(i)),u}},{key:"addInputError",value:function(i,u){}},{key:"removeInputError",value:function(i){}},{key:"addTableRowError",value:function(i){}},{key:"removeTableRowError",value:function(i){}},{key:"getTabHolder",value:function(i){var u=i===void 0?"":i,a=document.createElement("div");return a.innerHTML="<div class='je-tabholder tabs'></div><div class='content' id='".concat(u,"'></div><div class='je-tabholder--clear'></div>"),a}},{key:"getTopTabHolder",value:function(i){var u=i===void 0?"":i,a=document.createElement("div");return a.innerHTML="<div class='tabs je-tabholder--top'></div><div class='je-tabholder--clear'></div><div class='content' id='".concat(u,"'></div>"),a}},{key:"applyStyles",value:function(i,u){Object.keys(u).forEach(function(a){return i.style[a]=u[a]})}},{key:"closest",value:function(i,u){for(;i&&i!==document;){if(!i[Gc])return!1;if(i[Gc](u))return i;i=i.parentNode}return!1}},{key:"insertBasicTopTab",value:function(i,u){u.firstChild.insertBefore(i,u.firstChild.firstChild)}},{key:"getTab",value:function(i,u){var a=document.createElement("div");return a.appendChild(i),a.id=u,a.classList.add("je-tab"),a}},{key:"getTopTab",value:function(i,u){var a=document.createElement("div");return a.appendChild(i),a.id=u,a.classList.add("je-tab--top"),a}},{key:"getTabContentHolder",value:function(i){return i.children[1]}},{key:"getTopTabContentHolder",value:function(i){return i.children[1]}},{key:"getTabContent",value:function(){return this.getIndentedPanel()}},{key:"getTopTabContent",value:function(){return this.getTopIndentedPanel()}},{key:"markTabActive",value:function(i){this.applyStyles(i.tab,{opacity:1,background:"white"}),i.rowPane!==void 0?i.rowPane.style.display="":i.container.style.display=""}},{key:"markTabInactive",value:function(i){this.applyStyles(i.tab,{opacity:.5,background:""}),i.rowPane!==void 0?i.rowPane.style.display="none":i.container.style.display="none"}},{key:"addTab",value:function(i,u){i.children[0].appendChild(u)}},{key:"addTopTab",value:function(i,u){i.children[0].appendChild(u)}},{key:"getBlockLink",value:function(){var i=document.createElement("a");return i.classList.add("je-block-link"),i}},{key:"getBlockLinkHolder",value:function(){return document.createElement("div")}},{key:"getLinksHolder",value:function(){return document.createElement("div")}},{key:"createMediaLink",value:function(i,u,a){i.appendChild(u),a.classList.add("je-media"),i.appendChild(a)}},{key:"createImageLink",value:function(i,u,a){i.appendChild(u),u.appendChild(a)}},{key:"getFirstTab",value:function(i){return i.firstChild.firstChild}},{key:"getInputGroup",value:function(i,u){}},{key:"cleanText",value:function(i){var u=document.createElement("div");return u.innerHTML=i,u.textContent||u.innerText}},{key:"getDropZone",value:function(i){var u=document.createElement("div");return u.setAttribute("data-text",i),u.classList.add("je-dropzone"),u}},{key:"getUploadPreview",value:function(i,u,a){var s=document.createElement("div");if(s.classList.add("je-upload-preview"),i.mimeType.substr(0,5)==="image"){var t=document.createElement("img");t.src=a,s.appendChild(t)}var e=document.createElement("div");e.innerHTML+="<strong>Name:</strong> ".concat(i.name,"<br><strong>Type:</strong> ").concat(i.type,"<br><strong>Size:</strong> ").concat(i.formattedSize),s.appendChild(e),s.appendChild(u);var o=document.createElement("div");return o.style.clear="left",s.appendChild(o),s}},{key:"getProgressBar",value:function(){var i=document.createElement("progress");return i.setAttribute("max",100),i.setAttribute("value",0),i}},{key:"updateProgressBar",value:function(i,u){i&&i.setAttribute("value",u)}},{key:"updateProgressBarUnknown",value:function(i){i&&i.removeAttribute("value")}}],p&&kd(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),l}();function no(l){return no=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},no(l)}function jd(l,n){for(var p=0;p<n.length;p++){var i=n[p];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(l,(u=function(a,s){if(no(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(no(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),no(u)==="symbol"?u:String(u)),i)}var u}function pi(){return pi=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,n,p){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=nn(a))!==null;);return a}(l,n);if(i){var u=Object.getOwnPropertyDescriptor(i,n);return u.get?u.get.call(arguments.length<3?l:p):u.value}},pi.apply(this,arguments)}function vl(l,n){return vl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},vl(l,n)}function nn(l){return nn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},nn(l)}var Wc=function(l){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&vl(t,e)})(s,l);var n,p,i,u,a=(i=s,u=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=nn(i);if(u){var o=nn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(no(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(p=[{key:"getFormInputLabel",value:function(t,e){var o=pi(nn(s.prototype),"getFormInputLabel",this).call(this,t,e);return o.classList.add("je-form-input-label"),o}},{key:"getFormInputDescription",value:function(t){var e=pi(nn(s.prototype),"getFormInputDescription",this).call(this,t);return e.classList.add("je-form-input-label"),e}},{key:"getIndentedPanel",value:function(){var t=pi(nn(s.prototype),"getIndentedPanel",this).call(this);return t.classList.add("je-indented-panel"),t}},{key:"getTopIndentedPanel",value:function(){return this.getIndentedPanel()}},{key:"getChildEditorHolder",value:function(){var t=pi(nn(s.prototype),"getChildEditorHolder",this).call(this);return t.classList.add("je-child-editor-holder"),t}},{key:"getHeaderButtonHolder",value:function(){var t=this.getButtonHolder();return t.classList.add("je-header-button-holder"),t}},{key:"getTable",value:function(){var t=pi(nn(s.prototype),"getTable",this).call(this);return t.classList.add("je-table"),t}},{key:"addInputError",value:function(t,e){var o=this.closest(t,".form-control")||t.controlgroup;t.errmsg?t.errmsg.style.display="block":(t.errmsg=document.createElement("div"),t.errmsg.setAttribute("class","errmsg"),t.errmsg.style=t.errmsg.style||{},t.errmsg.style.color="red",o.appendChild(t.errmsg)),t.errmsg.innerHTML="",t.errmsg.appendChild(document.createTextNode(e))}},{key:"removeInputError",value:function(t){t.style&&(t.style.borderColor=""),t.errmsg&&(t.errmsg.style.display="none")}}])&&jd(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(bn);function io(l){return io=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},io(l)}function Od(l,n){for(var p=0;p<n.length;p++){var i=n[p];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(l,(u=function(a,s){if(io(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(io(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),io(u)==="symbol"?u:String(u)),i)}var u}function fi(){return fi=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,n,p){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=on(a))!==null;);return a}(l,n);if(i){var u=Object.getOwnPropertyDescriptor(i,n);return u.get?u.get.call(arguments.length<3?l:p):u.value}},fi.apply(this,arguments)}function bl(l,n){return bl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},bl(l,n)}function on(l){return on=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},on(l)}Wc.rules={".je-form-input-label":"display:block;margin-bottom:3px;font-weight:bold",".je-form-input-description":"display:inline-block;margin:0;font-size:0.8em;font-style:italic",".je-indented-panel":"padding:5px;margin:10px;border-radius:3px;border:1px%20solid%20%23ddd",".je-child-editor-holder":"margin-bottom:8px",".je-header-button-holder":"display:inline-block;margin-left:10px;font-size:0.8em;vertical-align:middle",".je-table":"margin-bottom:5px;border-bottom:1px%20solid%20%23ccc",".je-upload-preview img":"float:left;margin:0%200.5rem%200.5rem%200;max-width:100%25;max-height:5rem",".je-dropzone":"position:relative;margin:0.5rem%200;border:2px%20dashed%20black;width:100%25;height:60px;background:teal;transition:all%200.5s",".je-dropzone:before":"position:absolute;content:attr(data-text);color:rgba(0%2C%200%2C%200%2C%200.6);left:50%25;top:50%25;transform:translate(-50%25%2C%20-50%25)",".je-dropzone.valid-dropzone":"background:green",".je-dropzone.invalid-dropzone":"background:red"};var Zc=function(l){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&bl(t,e)})(s,l);var n,p,i,u,a=(i=s,u=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=on(i);if(u){var o=on(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(io(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(p=[{key:"getSelectInput",value:function(t,e){var o=fi(on(s.prototype),"getSelectInput",this).call(this,t);return o.classList.add("form-control"),o}},{key:"setGridColumnSize",value:function(t,e,o){t.classList.add("col-md-".concat(e)),o&&t.classList.add("col-md-offset-".concat(o))}},{key:"afterInputReady",value:function(t){if(!t.controlgroup&&(t.controlgroup=this.closest(t,".form-group"),this.closest(t,".compact")&&(t.controlgroup.style.marginBottom=0),this.queuedInputErrorText)){var e=this.queuedInputErrorText;delete this.queuedInputErrorText,this.addInputError(t,e)}}},{key:"getTextareaInput",value:function(){var t=document.createElement("textarea");return t.classList.add("form-control"),t}},{key:"getRangeInput",value:function(t,e,o){return fi(on(s.prototype),"getRangeInput",this).call(this,t,e,o)}},{key:"getFormInputField",value:function(t){var e=fi(on(s.prototype),"getFormInputField",this).call(this,t);return t!=="checkbox"&&t!=="radio"&&e.classList.add("form-control"),e}},{key:"getFormControl",value:function(t,e,o,c){var d=document.createElement("div");return!t||e.type!=="checkbox"&&e.type!=="radio"?(d.classList.add("form-group"),t&&(t.classList.add("control-label"),d.appendChild(t),c&&t.appendChild(c)),d.appendChild(e)):(d.classList.add(e.type),c&&t.appendChild(c),t.insertBefore(e,t.firstChild),d.appendChild(t)),o&&d.appendChild(o),d}},{key:"getIndentedPanel",value:function(){var t=document.createElement("div");return t.classList.add("well","well-sm"),t.style.paddingBottom=0,t}},{key:"getInfoButton",value:function(t){var e=document.createElement("span");e.classList.add("glyphicon","glyphicon-info-sign","pull-right"),e.style.padding=".25rem",e.style.position="relative",e.style.display="inline-block";var o=document.createElement("span");return o.style["font-family"]="sans-serif",o.style.visibility="hidden",o.style["background-color"]="rgba(50, 50, 50, .75)",o.style.margin="0 .25rem",o.style.color="#FAFAFA",o.style.padding=".5rem 1rem",o.style["border-radius"]=".25rem",o.style.width="25rem",o.style.position="absolute",o.innerText=t,e.onmouseover=function(){o.style.visibility="visible"},e.onmouseleave=function(){o.style.visibility="hidden"},e.appendChild(o),e}},{key:"getFormInputDescription",value:function(t){var e=document.createElement("p");return e.classList.add("help-block"),window.DOMPurify?e.innerHTML=window.DOMPurify.sanitize(t):e.textContent=this.cleanText(t),e}},{key:"getHeaderButtonHolder",value:function(){var t=this.getButtonHolder();return t.style.marginLeft="10px",t}},{key:"getButtonHolder",value:function(){var t=document.createElement("span");return t.classList.add("btn-group"),t}},{key:"getButton",value:function(t,e,o){var c=fi(on(s.prototype),"getButton",this).call(this,t,e,o);return c.classList.add("btn","btn-default"),c}},{key:"getTableContainer",value:function(){var t=fi(on(s.prototype),"getTableContainer",this).call(this);return t.classList.add("table-responsive"),t}},{key:"getTable",value:function(){var t=document.createElement("table");return t.classList.add("table","table-bordered"),t.style.width="auto",t.style.maxWidth="none",t}},{key:"addInputError",value:function(t,e){t.controlgroup?(t.controlgroup.classList.add("has-error"),t.errmsg?t.errmsg.style.display="":(t.errmsg=document.createElement("p"),t.errmsg.classList.add("help-block","errormsg"),t.controlgroup.appendChild(t.errmsg)),t.errmsg.textContent=e):this.queuedInputErrorText=e}},{key:"removeInputError",value:function(t){t.controlgroup||delete this.queuedInputErrorText,t.errmsg&&(t.errmsg.style.display="none",t.controlgroup.classList.remove("has-error"))}},{key:"getTabHolder",value:function(t){var e=t===void 0?"":t,o=document.createElement("div");return o.innerHTML="<ul class='col-md-2 nav nav-pills nav-stacked' id='".concat(e,"' role='tablist'></ul><div class='col-md-10 tab-content active well well-small' id='").concat(e,"'></div>"),o}},{key:"getTopTabHolder",value:function(t){var e=t===void 0?"":t,o=document.createElement("div");return o.innerHTML="<ul class='nav nav-tabs' id='".concat(e,"' role='tablist'></ul><div class='tab-content active well well-small' id='").concat(e,"'></div>"),o}},{key:"getTab",value:function(t,e){var o=document.createElement("li");o.setAttribute("role","presentation");var c=document.createElement("a");return c.setAttribute("href","#".concat(e)),c.appendChild(t),c.setAttribute("aria-controls",e),c.setAttribute("role","tab"),c.setAttribute("data-toggle","tab"),o.appendChild(c),o}},{key:"getTopTab",value:function(t,e){var o=document.createElement("li");o.setAttribute("role","presentation");var c=document.createElement("a");return c.setAttribute("href","#".concat(e)),c.appendChild(t),c.setAttribute("aria-controls",e),c.setAttribute("role","tab"),c.setAttribute("data-toggle","tab"),o.appendChild(c),o}},{key:"getTabContent",value:function(){var t=document.createElement("div");return t.classList.add("tab-pane"),t.setAttribute("role","tabpanel"),t}},{key:"getTopTabContent",value:function(){var t=document.createElement("div");return t.classList.add("tab-pane"),t.setAttribute("role","tabpanel"),t}},{key:"markTabActive",value:function(t){t.tab.classList.add("active"),t.rowPane!==void 0?t.rowPane.classList.add("active"):t.container.classList.add("active")}},{key:"markTabInactive",value:function(t){t.tab.classList.remove("active"),t.rowPane!==void 0?t.rowPane.classList.remove("active"):t.container.classList.remove("active")}},{key:"getProgressBar",value:function(){var t=document.createElement("div");t.classList.add("progress");var e=document.createElement("div");return e.classList.add("progress-bar"),e.setAttribute("role","progressbar"),e.setAttribute("aria-valuenow",0),e.setAttribute("aria-valuemin",0),e.setAttribute("aria-valuenax",100),e.innerHTML="".concat(0,"%"),t.appendChild(e),t}},{key:"updateProgressBar",value:function(t,e){if(t){var o=t.firstChild,c="".concat(e,"%");o.setAttribute("aria-valuenow",e),o.style.width=c,o.innerHTML=c}}},{key:"updateProgressBarUnknown",value:function(t){if(t){var e=t.firstChild;t.classList.add("progress","progress-striped","active"),e.removeAttribute("aria-valuenow"),e.style.width="100%",e.innerHTML=""}}},{key:"getInputGroup",value:function(t,e){if(t){var o=document.createElement("div");o.classList.add("input-group"),o.appendChild(t);var c=document.createElement("div");c.classList.add("input-group-btn"),o.appendChild(c);for(var d=0;d<e.length;d++)c.appendChild(e[d]);return o}}}])&&Od(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(bn);function oo(l){return oo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},oo(l)}function Ed(l,n){for(var p=0;p<n.length;p++){var i=n[p];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(l,(u=function(a,s){if(oo(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(oo(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),oo(u)==="symbol"?u:String(u)),i)}var u}function yi(){return yi=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,n,p){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=an(a))!==null;);return a}(l,n);if(i){var u=Object.getOwnPropertyDescriptor(i,n);return u.get?u.get.call(arguments.length<3?l:p):u.value}},yi.apply(this,arguments)}function gl(l,n){return gl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},gl(l,n)}function an(l){return an=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},an(l)}Zc.rules={},k(3843);var Cd={disable_theme_rules:!1,input_size:"normal",custom_forms:!1,object_indent:!0,object_background:"bg-light",object_text:"",table_border:!1,table_zebrastyle:!1,tooltip:"bootstrap"},Jc=function(l){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&gl(t,e)})(s,l);var n,p,i,u,a=(i=s,u=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=an(i);if(u){var o=an(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(oo(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(t){return function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")}(this,s),a.call(this,t,Cd)}return n=s,(p=[{key:"getSelectInput",value:function(t,e){var o=yi(an(s.prototype),"getSelectInput",this).call(this,t);return o.classList.add("form-control"),this.options.custom_forms===!1?(this.options.input_size==="small"&&o.classList.add("form-control-sm"),this.options.input_size==="large"&&o.classList.add("form-control-lg")):(o.classList.remove("form-control"),o.classList.add("custom-select"),this.options.input_size==="small"&&o.classList.add("custom-select-sm"),this.options.input_size==="large"&&o.classList.add("custom-select-lg")),o}},{key:"getContainer",value:function(){var t=document.createElement("div");return this.options.object_indent||t.classList.add("je-noindent"),t}},{key:"setGridColumnSize",value:function(t,e,o){t.classList.add("col-md-".concat(e)),o&&t.classList.add("offset-md-".concat(o))}},{key:"afterInputReady",value:function(t){if(!t.controlgroup){var e=t.name;t.id=e;var o=t.parentNode.parentNode.getElementsByTagName("label")[0];o&&(o.htmlFor=e),t.controlgroup=this.closest(t,".form-group")}}},{key:"getTextareaInput",value:function(){var t=document.createElement("textarea");return t.classList.add("form-control"),this.options.input_size==="small"&&t.classList.add("form-control-sm"),this.options.input_size==="large"&&t.classList.add("form-control-lg"),t}},{key:"getRangeInput",value:function(t,e,o){var c=yi(an(s.prototype),"getRangeInput",this).call(this,t,e,o);return this.options.custom_forms===!0&&(c.classList.remove("form-control"),c.classList.add("custom-range")),c}},{key:"getStepperButtons",value:function(t){var e=document.createElement("div"),o=document.createElement("div"),c=document.createElement("div"),d=document.createElement("button");d.setAttribute("type","button");var _=document.createElement("button");_.setAttribute("type","button"),e.appendChild(o),e.appendChild(t),e.appendChild(c),o.appendChild(d),c.appendChild(_),e.classList.add("input-group"),o.classList.add("input-group-prepend"),c.classList.add("input-group-append"),d.classList.add("btn"),d.classList.add("btn-secondary"),d.classList.add("stepper-down"),_.classList.add("btn"),_.classList.add("btn-secondary"),_.classList.add("stepper-up"),t.getAttribute("readonly")&&(d.setAttribute("disabled",!0),_.setAttribute("disabled",!0)),d.textContent="-",_.textContent="+";var P=function(nt,ut){nt.value=Number(ut||nt.value),nt.setAttribute("initialized","1")},D=t.getAttribute("min"),J=t.getAttribute("max");return t.addEventListener("change",function(){t.getAttribute("initialized")||t.setAttribute("initialized","1")}),d.addEventListener("click",function(){t.getAttribute("initialized")?D?Number(t.value)>Number(D)&&t.stepDown():t.stepDown():P(t,D),O(t,"change")}),_.addEventListener("click",function(){t.getAttribute("initialized")?J?Number(t.value)<Number(J)&&t.stepUp():t.stepUp():P(t,D),O(t,"change")}),e}},{key:"getFormInputField",value:function(t){var e=yi(an(s.prototype),"getFormInputField",this).call(this,t);return t!=="checkbox"&&t!=="radio"&&t!=="file"&&(e.classList.add("form-control"),this.options.input_size==="small"&&e.classList.add("form-control-sm"),this.options.input_size==="large"&&e.classList.add("form-control-lg")),t==="file"&&e.classList.add("form-control-file"),e}},{key:"getFormControl",value:function(t,e,o,c){var d=document.createElement("div");if(d.classList.add("form-group"),!t||e.type!=="checkbox"&&e.type!=="radio")t&&(d.appendChild(t),c&&d.appendChild(c)),d.appendChild(e);else{var _=document.createElement("div");this.options.custom_forms===!1?(_.classList.add("form-check"),e.classList.add("form-check-input"),t.classList.add("form-check-label")):(_.classList.add("custom-control"),e.classList.add("custom-control-input"),t.classList.add("custom-control-label"),e.type==="checkbox"?_.classList.add("custom-checkbox"):_.classList.add("custom-radio"));var P=(Date.now()*Math.random()).toFixed(0);e.setAttribute("id",P),t.setAttribute("for",P),_.appendChild(e),_.appendChild(t),c&&_.appendChild(c),d.appendChild(_)}return o&&d.appendChild(o),d}},{key:"getInfoButton",value:function(t){var e=document.createElement("button");e.type="button",e.classList.add("ml-3","jsoneditor-twbs4-text-button"),e.setAttribute("data-toggle","tooltip"),e.setAttribute("data-placement","auto"),e.title=t;var o=document.createTextNode("ⓘ");return e.appendChild(o),this.options.tooltip==="bootstrap"?window.jQuery&&window.jQuery().tooltip?window.jQuery(e).tooltip():console.warn("Could not find popper jQuery plugin of Bootstrap."):this.options.tooltip==="css"&&e.classList.add("je-tooltip"),e}},{key:"getCheckbox",value:function(){return this.getFormInputField("checkbox")}},{key:"getMultiCheckboxHolder",value:function(t,e,o,c){var d=document.createElement("div");d.classList.add("form-group"),e&&(d.appendChild(e),c&&e.appendChild(c));var _=document.createElement("div");return Object.values(t).forEach(function(P){var D=P.firstChild;_.appendChild(D)}),d.appendChild(_),o&&d.appendChild(o),d}},{key:"getFormRadio",value:function(t){var e=this.getFormInputField("radio");for(var o in t)e.setAttribute(o,t[o]);return this.options.custom_forms===!1?e.classList.add("form-check-input"):e.classList.add("custom-control-input"),e}},{key:"getFormRadioLabel",value:function(t,e){var o=document.createElement("label");return this.options.custom_forms===!1?o.classList.add("form-check-label"):o.classList.add("custom-control-label"),o.appendChild(document.createTextNode(t)),o}},{key:"getFormRadioControl",value:function(t,e,o){var c=document.createElement("div");return this.options.custom_forms===!1?c.classList.add("form-check"):c.classList.add("custom-control","custom-radio"),c.appendChild(e),c.appendChild(t),o&&(this.options.custom_forms===!1?c.classList.add("form-check-inline"):c.classList.add("custom-control-inline")),c}},{key:"getIndentedPanel",value:function(){var t=document.createElement("div");return t.classList.add("card","card-body","mb-3"),this.options.object_background&&t.classList.add(this.options.object_background),this.options.object_text&&t.classList.add(this.options.object_text),t}},{key:"getFormInputDescription",value:function(t){var e=document.createElement("small");return e.classList.add("form-text"),window.DOMPurify?e.innerHTML=window.DOMPurify.sanitize(t):e.textContent=this.cleanText(t),e}},{key:"getHeader",value:function(t,e){var o=document.createElement("h3");return o.classList.add("card-title"),o.classList.add("level-"+e),typeof t=="string"?o.textContent=t:o.appendChild(t),o.style.display="inline-block",o}},{key:"getHeaderButtonHolder",value:function(){return this.getButtonHolder()}},{key:"getButtonHolder",value:function(){var t=document.createElement("span");return t.classList.add("btn-group"),t}},{key:"getFormButtonHolder",value:function(t){var e=this.getButtonHolder();return e.classList.add("d-block"),t==="center"?e.classList.add("text-center"):t==="right"&&e.classList.add("text-right"),e}},{key:"getButton",value:function(t,e,o){var c=yi(an(s.prototype),"getButton",this).call(this,t,e,o);return c.classList.add("btn","btn-secondary","btn-sm"),c}},{key:"getTableContainer",value:function(){var t=yi(an(s.prototype),"getTableContainer",this).call(this);return t.classList.add("table-responsive"),t}},{key:"getTable",value:function(){var t=document.createElement("table");return t.classList.add("table","table-sm"),this.options.table_border&&t.classList.add("table-bordered"),this.options.table_zebrastyle&&t.classList.add("table-striped"),t}},{key:"getErrorMessage",value:function(t){var e=document.createElement("div");return e.classList.add("alert","alert-danger"),e.setAttribute("role","alert"),e.appendChild(document.createTextNode(t)),e}},{key:"addInputError",value:function(t,e){t.controlgroup&&(t.controlgroup.classList.add("is-invalid"),t.errmsg||(t.errmsg=document.createElement("p"),t.errmsg.classList.add("invalid-feedback"),t.controlgroup.appendChild(t.errmsg),t.errmsg.style.display="block"),t.errmsg.style.display="block",t.errmsg.textContent=e)}},{key:"removeInputError",value:function(t){t.errmsg&&(t.errmsg.style.display="none",t.controlgroup.classList.remove("is-invalid"))}},{key:"getTabHolder",value:function(t){var e=document.createElement("div"),o=t===void 0?"":t;return e.innerHTML="<div class='col-md-2' id='".concat(o,"'><ul class='nav flex-column nav-pills'></ul></div><div class='col-md-10'><div class='tab-content' id='").concat(o,"'></div></div>"),e.classList.add("row"),e}},{key:"addTab",value:function(t,e){t.children[0].children[0].appendChild(e)}},{key:"getTabContentHolder",value:function(t){return t.children[1].children[0]}},{key:"getTopTabHolder",value:function(t){var e=t===void 0?"":t,o=document.createElement("div");return o.classList.add("card"),o.innerHTML="<div class='card-header'><ul class='nav nav-tabs card-header-tabs' id='".concat(e,"'></ul></div><div class='card-body'><div class='tab-content' id='").concat(e,"'></div></div>"),o}},{key:"getTab",value:function(t,e){var o=document.createElement("li");o.classList.add("nav-item");var c=document.createElement("a");return c.classList.add("nav-link"),c.setAttribute("href","#".concat(e)),c.setAttribute("data-toggle","tab"),c.appendChild(t),o.appendChild(c),o}},{key:"getTopTab",value:function(t,e){var o=document.createElement("li");o.classList.add("nav-item");var c=document.createElement("a");return c.classList.add("nav-link"),c.setAttribute("href","#".concat(e)),c.setAttribute("data-toggle","tab"),c.appendChild(t),o.appendChild(c),o}},{key:"getTabContent",value:function(){var t=document.createElement("div");return t.classList.add("tab-pane"),t.setAttribute("role","tabpanel"),t}},{key:"getTopTabContent",value:function(){var t=document.createElement("div");return t.classList.add("tab-pane"),t.setAttribute("role","tabpanel"),t}},{key:"markTabActive",value:function(t){t.tab.firstChild.classList.add("active"),t.rowPane!==void 0?t.rowPane.classList.add("active"):t.container.classList.add("active")}},{key:"markTabInactive",value:function(t){t.tab.firstChild.classList.remove("active"),t.rowPane!==void 0?t.rowPane.classList.remove("active"):t.container.classList.remove("active")}},{key:"insertBasicTopTab",value:function(t,e){e.children[0].children[0].insertBefore(t,e.children[0].children[0].firstChild)}},{key:"addTopTab",value:function(t,e){t.children[0].children[0].appendChild(e)}},{key:"getTopTabContentHolder",value:function(t){return t.children[1].children[0]}},{key:"getFirstTab",value:function(t){return t.firstChild.firstChild.firstChild}},{key:"getProgressBar",value:function(){var t=document.createElement("div");t.classList.add("progress");var e=document.createElement("div");return e.classList.add("progress-bar"),e.setAttribute("role","progressbar"),e.setAttribute("aria-valuenow",0),e.setAttribute("aria-valuemin",0),e.setAttribute("aria-valuenax",100),e.innerHTML="".concat(0,"%"),t.appendChild(e),t}},{key:"updateProgressBar",value:function(t,e){if(t){var o=t.firstChild,c="".concat(e,"%");o.setAttribute("aria-valuenow",e),o.style.width=c,o.innerHTML=c}}},{key:"updateProgressBarUnknown",value:function(t){if(t){var e=t.firstChild;t.classList.add("progress","progress-striped","active"),e.removeAttribute("aria-valuenow"),e.style.width="100%",e.innerHTML=""}}},{key:"getBlockLink",value:function(){var t=document.createElement("a");return t.classList.add("mb-3","d-inline-block"),t}},{key:"getLinksHolder",value:function(){return document.createElement("div")}},{key:"getInputGroup",value:function(t,e){if(t){var o=document.createElement("div");o.classList.add("input-group"),o.appendChild(t);var c=document.createElement("div");c.classList.add("input-group-append"),o.appendChild(c);for(var d=0;d<e.length;d++)e[d].classList.remove("mr-2","btn-secondary"),e[d].classList.add("btn-outline-secondary"),c.appendChild(e[d]);return o}}}])&&Ed(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(bn);function ao(l){return ao=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ao(l)}function Sd(l,n){for(var p=0;p<n.length;p++){var i=n[p];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(l,(u=function(a,s){if(ao(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(ao(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),ao(u)==="symbol"?u:String(u)),i)}var u}function mi(){return mi=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,n,p){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=sn(a))!==null;);return a}(l,n);if(i){var u=Object.getOwnPropertyDescriptor(i,n);return u.get?u.get.call(arguments.length<3?l:p):u.value}},mi.apply(this,arguments)}function wl(l,n){return wl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},wl(l,n)}function sn(l){return sn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},sn(l)}Jc.rules={".jsoneditor-twbs4-text-button":"background:none;padding:0;border:0;color:currentColor","td > .form-group":"margin-bottom:0",".json-editor-btn-upload":"margin-top:1rem",".je-noindent .card":"padding:0;border:0",".je-tooltip:hover::before":"display:block;position:absolute;font-size:0.8em;color:%23fff;border-radius:0.2em;content:attr(title);background-color:%23000;margin-top:-2.5em;padding:0.3em",".je-tooltip:hover::after":"display:block;position:absolute;font-size:0.8em;color:%23fff",".select2-container--default .select2-selection--single":"height:calc(1.5em%20%2B%200.75rem%20%2B%202px)",".select2-container--default .select2-selection--single .select2-selection__arrow":"height:calc(1.5em%20%2B%200.75rem%20%2B%202px)",".select2-container--default .select2-selection--single .select2-selection__rendered":"line-height:calc(1.5em%20%2B%200.75rem%20%2B%202px)",".selectize-control.form-control":"padding:0",".selectize-dropdown.form-control":"padding:0;height:auto",".je-upload-preview img":"float:left;margin:0%200.5rem%200.5rem%200;max-width:100%25;max-height:5rem",".je-dropzone":"position:relative;margin:0.5rem%200;border:2px%20dashed%20black;width:100%25;height:60px;background:teal;transition:all%200.5s",".je-dropzone:before":"position:absolute;content:attr(data-text);color:rgba(0%2C%200%2C%200%2C%200.6);left:50%25;top:50%25;transform:translate(-50%25%2C%20-50%25)",".je-dropzone.valid-dropzone":"background:green",".je-dropzone.invalid-dropzone":"background:red"};var Pd={disable_theme_rules:!1,input_size:"normal",object_indent:!0,object_background:"bg-light",object_text:"",table_border:!1,table_zebrastyle:!1,tooltip:"bootstrap"},Yc=function(l){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&wl(t,e)})(s,l);var n,p,i,u,a=(i=s,u=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=sn(i);if(u){var o=sn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(ao(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(t){return function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")}(this,s),a.call(this,t,Pd)}return n=s,(p=[{key:"getSelectInput",value:function(t,e){var o=mi(sn(s.prototype),"getSelectInput",this).call(this,t);return o.classList.add("form-control"),o.classList.add("form-select"),this.options.input_size==="small"&&o.classList.add("form-control-sm"),this.options.input_size==="large"&&o.classList.add("form-control-lg"),o}},{key:"getContainer",value:function(){var t=document.createElement("div");return this.options.object_indent||t.classList.add("je-noindent"),t}},{key:"setGridColumnSize",value:function(t,e,o){t.classList.add("col-md-".concat(e)),o&&t.classList.add("offset-md-".concat(o))}},{key:"afterInputReady",value:function(t){if(!t.controlgroup){var e=t.name;t.id=e;var o=t.parentNode.parentNode.getElementsByTagName("label")[0];o&&(o.classList.add("form-label"),o.htmlFor=e),t.controlgroup=this.closest(t,".form-group")}}},{key:"getTextareaInput",value:function(){var t=document.createElement("textarea");return t.classList.add("form-control"),this.options.input_size==="small"&&t.classList.add("form-control-sm"),this.options.input_size==="large"&&t.classList.add("form-control-lg"),t}},{key:"getRangeInput",value:function(t,e,o){var c=mi(sn(s.prototype),"getRangeInput",this).call(this,t,e,o);return c.classList.remove("form-control"),c.classList.add("form-range"),c}},{key:"getStepperButtons",value:function(t){var e=document.createElement("div"),o=document.createElement("button");o.setAttribute("type","button");var c=document.createElement("button");c.setAttribute("type","button"),e.appendChild(o),e.appendChild(t),e.appendChild(c),e.classList.add("input-group"),o.classList.add("btn"),o.classList.add("btn-secondary"),o.classList.add("stepper-down"),c.classList.add("btn"),c.classList.add("btn-secondary"),c.classList.add("stepper-up"),t.getAttribute("readonly")&&(o.setAttribute("disabled",!0),c.setAttribute("disabled",!0)),o.textContent="-",c.textContent="+";var d=function(D,J){D.value=Number(J||D.value),D.setAttribute("initialized","1")},_=t.getAttribute("min"),P=t.getAttribute("max");return t.addEventListener("change",function(){t.getAttribute("initialized")||t.setAttribute("initialized","1")}),o.addEventListener("click",function(){t.getAttribute("initialized")?_?Number(t.value)>Number(_)&&t.stepDown():t.stepDown():d(t,_),O(t,"change")}),c.addEventListener("click",function(){t.getAttribute("initialized")?P?Number(t.value)<Number(P)&&t.stepUp():t.stepUp():d(t,_),O(t,"change")}),e}},{key:"getFormInputField",value:function(t){var e=mi(sn(s.prototype),"getFormInputField",this).call(this,t);return t!=="checkbox"&&t!=="radio"&&(e.classList.add("form-control"),this.options.input_size==="small"&&e.classList.add("form-control-sm"),this.options.input_size==="large"&&e.classList.add("form-control-lg")),e}},{key:"getFormControl",value:function(t,e,o,c){var d=document.createElement("div");if(d.classList.add("form-group"),!t||e.type!=="checkbox"&&e.type!=="radio")t&&(t.classList.add("form-label"),d.appendChild(t),c&&d.appendChild(c)),d.appendChild(e);else{var _=document.createElement("div");_.classList.add("form-check"),e.classList.add("form-check-input"),t.classList.add("form-check-label");var P=(Date.now()*Math.random()).toFixed(0);e.setAttribute("id",P),t.setAttribute("for",P),_.appendChild(e),_.appendChild(t),c&&_.appendChild(c),d.appendChild(_)}return o&&d.appendChild(o),d}},{key:"getInfoButton",value:function(t){var e=document.createElement("button");e.type="button",e.classList.add("ms-3","jsoneditor-twbs5-text-button"),e.setAttribute("data-toggle","tooltip"),e.setAttribute("data-placement","auto"),e.title=t;var o=document.createTextNode("ⓘ");return e.appendChild(o),this.options.tooltip==="bootstrap"?window.jQuery&&window.jQuery().tooltip?window.jQuery(e).tooltip():console.warn("Could not find popper jQuery plugin of Bootstrap."):this.options.tooltip==="css"&&e.classList.add("je-tooltip"),e}},{key:"getCheckbox",value:function(){return this.getFormInputField("checkbox")}},{key:"getMultiCheckboxHolder",value:function(t,e,o,c){var d=document.createElement("div");d.classList.add("form-group"),e&&(d.appendChild(e),c&&e.appendChild(c));var _=document.createElement("div");return Object.values(t).forEach(function(P){var D=P.firstChild;_.appendChild(D)}),d.appendChild(_),o&&d.appendChild(o),d}},{key:"getFormRadio",value:function(t){var e=this.getFormInputField("radio");for(var o in t)e.setAttribute(o,t[o]);return e.classList.add("form-check-input"),e}},{key:"getFormRadioLabel",value:function(t,e){var o=document.createElement("label");return o.classList.add("form-check-label"),o.appendChild(document.createTextNode(t)),o}},{key:"getFormRadioControl",value:function(t,e,o){var c=document.createElement("div");return c.classList.add("form-check"),c.appendChild(e),c.appendChild(t),o&&c.classList.add("form-check-inline"),c}},{key:"getIndentedPanel",value:function(){var t=document.createElement("div");return t.classList.add("card","card-body","my-3"),this.options.object_background&&t.classList.add(this.options.object_background),this.options.object_text&&t.classList.add(this.options.object_text),t}},{key:"getFormInputDescription",value:function(t){var e=document.createElement("small");return e.classList.add("form-text"),e.classList.add("d-block"),window.DOMPurify?e.innerHTML=window.DOMPurify.sanitize(t):e.textContent=this.cleanText(t),e}},{key:"getHeader",value:function(t,e){var o=document.createElement("h3");return o.classList.add("card-title"),o.classList.add("level-"+e),typeof t=="string"?o.textContent=t:o.appendChild(t),o.style.display="inline-block",o}},{key:"getHeaderButtonHolder",value:function(){return this.getButtonHolder()}},{key:"getButtonHolder",value:function(){var t=document.createElement("span");return t.classList.add("btn-group"),t}},{key:"getFormButtonHolder",value:function(t){var e=this.getButtonHolder();return e.classList.add("d-block"),t==="center"?e.classList.add("text-center"):t==="right"&&e.classList.add("text-end"),e}},{key:"getButton",value:function(t,e,o){var c=mi(sn(s.prototype),"getButton",this).call(this,t,e,o);return c.classList.add("btn","btn-secondary","btn-sm"),c}},{key:"getTableContainer",value:function(){var t=mi(sn(s.prototype),"getTableContainer",this).call(this);return t.classList.add("table-responsive"),t}},{key:"getTable",value:function(){var t=document.createElement("table");return t.classList.add("table","table-sm"),this.options.table_border&&t.classList.add("table-bordered"),this.options.table_zebrastyle&&t.classList.add("table-striped"),t}},{key:"getErrorMessage",value:function(t){var e=document.createElement("div");return e.classList.add("alert","alert-danger"),e.setAttribute("role","alert"),e.appendChild(document.createTextNode(t)),e}},{key:"addInputError",value:function(t,e){t.controlgroup&&(t.controlgroup.classList.add("is-invalid"),t.errmsg||(t.errmsg=document.createElement("p"),t.errmsg.classList.add("invalid-feedback"),t.controlgroup.appendChild(t.errmsg),t.errmsg.style.display="block"),t.errmsg.style.display="block",t.errmsg.textContent=e)}},{key:"removeInputError",value:function(t){t.errmsg&&(t.errmsg.style.display="none",t.controlgroup.classList.remove("is-invalid"))}},{key:"getTabHolder",value:function(t){var e=document.createElement("div"),o=t===void 0?"":t;return e.innerHTML="<div class='col-md-2' id='".concat(o,"'><ul class='nav flex-column nav-pills'></ul></div><div class='col-md-10'><div class='tab-content' id='").concat(o,"'></div></div>"),e.classList.add("row"),e}},{key:"addTab",value:function(t,e){t.children[0].children[0].appendChild(e)}},{key:"getTabContentHolder",value:function(t){return t.children[1].children[0]}},{key:"getTopTabHolder",value:function(t){var e=t===void 0?"":t,o=document.createElement("div");return o.classList.add("card"),o.innerHTML="<div class='card-header'><ul class='nav nav-tabs card-header-tabs' id='".concat(e,"'></ul></div><div class='card-body'><div class='tab-content' id='").concat(e,"'></div></div>"),o}},{key:"getTab",value:function(t,e){var o=document.createElement("li");o.classList.add("nav-item");var c=document.createElement("a");return c.classList.add("nav-link"),c.setAttribute("href","#".concat(e)),c.setAttribute("data-toggle","tab"),c.appendChild(t),o.appendChild(c),o}},{key:"getTopTab",value:function(t,e){var o=document.createElement("li");o.classList.add("nav-item");var c=document.createElement("a");return c.classList.add("nav-link"),c.setAttribute("href","#".concat(e)),c.setAttribute("data-toggle","tab"),c.appendChild(t),o.appendChild(c),o}},{key:"getTabContent",value:function(){var t=document.createElement("div");return t.classList.add("tab-pane"),t.setAttribute("role","tabpanel"),t}},{key:"getTopTabContent",value:function(){var t=document.createElement("div");return t.classList.add("tab-pane"),t.setAttribute("role","tabpanel"),t}},{key:"markTabActive",value:function(t){t.tab.firstChild.classList.add("active"),t.rowPane!==void 0?t.rowPane.classList.add("active"):t.container.classList.add("active")}},{key:"markTabInactive",value:function(t){t.tab.firstChild.classList.remove("active"),t.rowPane!==void 0?t.rowPane.classList.remove("active"):t.container.classList.remove("active")}},{key:"insertBasicTopTab",value:function(t,e){e.children[0].children[0].insertBefore(t,e.children[0].children[0].firstChild)}},{key:"addTopTab",value:function(t,e){t.children[0].children[0].appendChild(e)}},{key:"getTopTabContentHolder",value:function(t){return t.children[1].children[0]}},{key:"getFirstTab",value:function(t){return t.firstChild.firstChild.firstChild}},{key:"getProgressBar",value:function(){var t=document.createElement("div");t.classList.add("progress");var e=document.createElement("div");return e.classList.add("progress-bar"),e.setAttribute("role","progressbar"),e.setAttribute("aria-valuenow",0),e.setAttribute("aria-valuemin",0),e.setAttribute("aria-valuenax",100),e.innerHTML="".concat(0,"%"),t.appendChild(e),t}},{key:"updateProgressBar",value:function(t,e){if(t){var o=t.firstChild,c="".concat(e,"%");o.setAttribute("aria-valuenow",e),o.style.width=c,o.innerHTML=c}}},{key:"updateProgressBarUnknown",value:function(t){if(t){var e=t.firstChild;t.classList.add("progress","progress-striped","active"),e.removeAttribute("aria-valuenow"),e.style.width="100%",e.innerHTML=""}}},{key:"getBlockLink",value:function(){var t=document.createElement("a");return t.classList.add("mb-3","d-inline-block"),t}},{key:"getLinksHolder",value:function(){return document.createElement("div")}},{key:"getInputGroup",value:function(t,e){if(t){var o=document.createElement("div");o.classList.add("input-group"),o.appendChild(t);for(var c=0;c<e.length;c++)e[c].classList.remove("me-2","btn-secondary"),e[c].classList.add("btn-outline-secondary"),o.appendChild(e[c]);return o}}}])&&Sd(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(bn);function so(l){return so=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},so(l)}function Td(l,n){for(var p=0;p<n.length;p++){var i=n[p];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(l,(u=function(a,s){if(so(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(so(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),so(u)==="symbol"?u:String(u)),i)}var u}function lo(){return lo=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,n,p){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=gn(a))!==null;);return a}(l,n);if(i){var u=Object.getOwnPropertyDescriptor(i,n);return u.get?u.get.call(arguments.length<3?l:p):u.value}},lo.apply(this,arguments)}function _l(l,n){return _l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},_l(l,n)}function gn(l){return gn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},gn(l)}Yc.rules={".form-group":"margin-bottom:1rem",".form-text":"display:block",".jsoneditor-twbs5-text-button":"background:none;padding:0;border:0;color:currentColor","td > .form-group":"margin-bottom:0",".json-editor-btn-upload":"margin-top:1rem",".je-noindent .card":"padding:0;border:0",".je-tooltip:hover::before":"display:block;position:absolute;font-size:0.8em;color:%23fff;border-radius:0.2em;content:attr(title);background-color:%23000;margin-top:-2.5em;padding:0.3em",".je-tooltip:hover::after":"display:block;position:absolute;font-size:0.8em;color:%23fff",".select2-container--default .select2-selection--single":"height:calc(1.5em%20%2B%200.75rem%20%2B%202px)",".select2-container--default .select2-selection--single .select2-selection__arrow":"height:calc(1.5em%20%2B%200.75rem%20%2B%202px)",".select2-container--default .select2-selection--single .select2-selection__rendered":"line-height:calc(1.5em%20%2B%200.75rem%20%2B%202px)",".selectize-control.form-control":"padding:0",".selectize-dropdown.form-control":"padding:0;height:auto",".je-upload-preview img":"float:left;margin:0%200.5rem%200.5rem%200;max-width:100%25;max-height:5rem",".je-dropzone":"position:relative;margin:0.5rem%200;border:2px%20dashed%20black;width:100%25;height:60px;background:teal;transition:all%200.5s",".je-dropzone:before":"position:absolute;content:attr(data-text);color:rgba(0%2C%200%2C%200%2C%200.6);left:50%25;top:50%25;transform:translate(-50%25%2C%20-50%25)",".je-dropzone.valid-dropzone":"background:green",".je-dropzone.invalid-dropzone":"background:red"};var Xc=function(l){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_l(t,e)})(s,l);var n,p,i,u,a=(i=s,u=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=gn(i);if(u){var o=gn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(so(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(p=[{key:"getTable",value:function(){var t=lo(gn(s.prototype),"getTable",this).call(this);return t.setAttribute("cellpadding",5),t.setAttribute("cellspacing",0),t}},{key:"getTableHeaderCell",value:function(t){var e=lo(gn(s.prototype),"getTableHeaderCell",this).call(this,t);return e.classList.add("ui-state-active"),e.style.fontWeight="bold",e}},{key:"getTableCell",value:function(){var t=lo(gn(s.prototype),"getTableCell",this).call(this);return t.classList.add("ui-widget-content"),t}},{key:"getHeaderButtonHolder",value:function(){var t=this.getButtonHolder();return t.style.marginLeft="10px",t.style.fontSize=".6em",t.style.display="inline-block",t}},{key:"getFormInputDescription",value:function(t){var e=this.getDescription(t);return e.style.marginLeft="10px",e.style.display="inline-block",e}},{key:"getFormControl",value:function(t,e,o,c){var d=lo(gn(s.prototype),"getFormControl",this).call(this,t,e,o,c);return e.type==="checkbox"?(d.style.lineHeight="25px",d.style.padding="3px 0"):d.style.padding="4px 0 8px 0",d}},{key:"getDescription",value:function(t){var e=document.createElement("span");return e.style.fontSize=".8em",e.style.fontStyle="italic",window.DOMPurify?e.innerHTML=window.DOMPurify.sanitize(t):e.textContent=this.cleanText(t),e}},{key:"getButtonHolder",value:function(){var t=document.createElement("div");return t.classList.add("ui-buttonset"),t.style.fontSize=".7em",t}},{key:"getFormInputLabel",value:function(t,e){var o=document.createElement("label");return o.style.fontWeight="bold",o.style.display="block",o.textContent=t,e&&o.classList.add("required"),o}},{key:"getButton",value:function(t,e,o){var c=document.createElement("button");c.classList.add("ui-button","ui-widget","ui-state-default","ui-corner-all"),e&&!t?(c.classList.add("ui-button-icon-only"),e.classList.add("ui-button-icon-primary","ui-icon-primary"),c.appendChild(e)):e?(c.classList.add("ui-button-text-icon-primary"),e.classList.add("ui-button-icon-primary","ui-icon-primary"),c.appendChild(e)):c.classList.add("ui-button-text-only");var d=document.createElement("span");return d.classList.add("ui-button-text"),d.textContent=t||o||".",c.appendChild(d),c.setAttribute("title",o),c}},{key:"setButtonText",value:function(t,e,o,c){t.innerHTML="",t.classList.add("ui-button","ui-widget","ui-state-default","ui-corner-all"),o&&!e?(t.classList.add("ui-button-icon-only"),o.classList.add("ui-button-icon-primary","ui-icon-primary"),t.appendChild(o)):o?(t.classList.add("ui-button-text-icon-primary"),o.classList.add("ui-button-icon-primary","ui-icon-primary"),t.appendChild(o)):t.classList.add("ui-button-text-only");var d=document.createElement("span");d.classList.add("ui-button-text"),d.textContent=e||c||".",t.appendChild(d),t.setAttribute("title",c)}},{key:"getIndentedPanel",value:function(){var t=document.createElement("div");return t.classList.add("ui-widget-content","ui-corner-all"),t.style.padding="1em 1.4em",t.style.marginBottom="20px",t}},{key:"afterInputReady",value:function(t){if(!t.controls&&(t.controls=this.closest(t,".form-control"),this.queuedInputErrorText)){var e=this.queuedInputErrorText;delete this.queuedInputErrorText,this.addInputError(t,e)}}},{key:"addInputError",value:function(t,e){t.controls?(t.errmsg?t.errmsg.style.display="":(t.errmsg=document.createElement("div"),t.errmsg.classList.add("ui-state-error"),t.controls.appendChild(t.errmsg)),t.errmsg.textContent=e):this.queuedInputErrorText=e}},{key:"removeInputError",value:function(t){t.controls||delete this.queuedInputErrorText,t.errmsg&&(t.errmsg.style.display="none")}},{key:"markTabActive",value:function(t){t.tab.classList.remove("ui-widget-header"),t.tab.classList.add("ui-state-active"),t.rowPane!==void 0?t.rowPane.style.display="":t.container.style.display=""}},{key:"markTabInactive",value:function(t){t.tab.classList.add("ui-widget-header"),t.tab.classList.remove("ui-state-active"),t.rowPane!==void 0?t.rowPane.style.display="none":t.container.style.display="none"}}])&&Td(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(bn);function co(l){return co=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},co(l)}function Ld(l,n){for(var p=0;p<n.length;p++){var i=n[p];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(l,(u=function(a,s){if(co(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(co(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),co(u)==="symbol"?u:String(u)),i)}var u}function xl(l,n){return xl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},xl(l,n)}function is(l){return is=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},is(l)}Xc.rules={'div[data-schemaid="root"]:after':'position:relative;color:red;margin:10px 0;font-weight:600;display:block;width:100%;text-align:center;content:"This is an old JSON-Editor 1.x Theme and might not display elements correctly when used with the 2.x version"'};var Qc=function(l){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&xl(t,e)})(s,l);var n,p,i,u,a=(i=s,u=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=is(i);if(u){var o=is(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(co(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(p=[{key:"addInputError",value:function(t,e){if(t.errmsg)t.errmsg.style.display="block";else{var o=this.closest(t,".form-control");t.errmsg=document.createElement("div"),t.errmsg.setAttribute("class","errmsg"),o.nodeName&&o.appendChild(t.errmsg)}t.errmsg.innerHTML="",t.errmsg.appendChild(document.createTextNode(e))}},{key:"removeInputError",value:function(t){t.style&&(t.style.borderColor=""),t.errmsg&&(t.errmsg.style.display="none")}}])&&Ld(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(bn);function uo(l){return uo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},uo(l)}function Ad(l,n){for(var p=0;p<n.length;p++){var i=n[p];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(l,(u=function(a,s){if(uo(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(uo(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),uo(u)==="symbol"?u:String(u)),i)}var u}function hr(){return hr=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,n,p){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=Ye(a))!==null;);return a}(l,n);if(i){var u=Object.getOwnPropertyDescriptor(i,n);return u.get?u.get.call(arguments.length<3?l:p):u.value}},hr.apply(this,arguments)}function kl(l,n){return kl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},kl(l,n)}function Ye(l){return Ye=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ye(l)}Qc.rules={".je-upload-preview img":"float:left;margin:0%200.5rem%200.5rem%200;max-width:100%25;max-height:5rem",".je-dropzone":"position:relative;margin:0.5rem%200;border:2px%20dashed%20black;width:100%25;height:60px;background:teal;transition:all%200.5s",".je-dropzone:before":"position:absolute;content:attr(data-text);color:rgba(0%2C%200%2C%200%2C%200.6);left:50%25;top:50%25;transform:translate(-50%25%2C%20-50%25)",".je-dropzone.valid-dropzone":"background:green",".je-dropzone.invalid-dropzone":"background:red"};var Rd={disable_theme_rules:!1,label_bold:!0,align_bottom:!1,object_indent:!1,object_border:!1,table_border:!1,table_zebrastyle:!1,input_size:"normal"},Kc=function(l){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&kl(t,e)})(s,l);var n,p,i,u,a=(i=s,u=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Ye(i);if(u){var o=Ye(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(uo(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(t){return function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")}(this,s),a.call(this,t,Rd)}return n=s,(p=[{key:"setGridColumnSize",value:function(t,e,o){t.classList.add("col-".concat(e)),o&&t.classList.add("col-mx-auto")}},{key:"getGridContainer",value:function(){var t=document.createElement("div");return t.classList.add("container"),this.options.object_indent||t.classList.add("je-noindent"),t}},{key:"getGridRow",value:function(){var t=document.createElement("div");return t.classList.add("columns"),t}},{key:"getGridColumn",value:function(){var t=document.createElement("div");return t.classList.add("column"),this.options.align_bottom&&t.classList.add("je-align-bottom"),t}},{key:"getIndentedPanel",value:function(){var t=document.createElement("div");return t.classList.add("je-panel"),this.options.object_border&&t.classList.add("je-border"),t}},{key:"getTopIndentedPanel",value:function(){var t=document.createElement("div");return t.classList.add("je-panel-top"),this.options.object_border&&t.classList.add("je-border"),t}},{key:"getHeaderButtonHolder",value:function(){return this.getButtonHolder()}},{key:"getButtonHolder",value:function(){var t=hr(Ye(s.prototype),"getButtonHolder",this).call(this);return t.classList.add("btn-group"),t}},{key:"getFormButtonHolder",value:function(t){var e=hr(Ye(s.prototype),"getFormButtonHolder",this).call(this);return e.classList.remove("btn-group"),e.classList.add("d-block"),t==="center"?e.classList.add("text-center"):t==="right"?e.classList.add("text-right"):e.classList.add("text-left"),e}},{key:"getFormButton",value:function(t,e,o){var c=hr(Ye(s.prototype),"getFormButton",this).call(this,t,e,o);return c.classList.add("btn","btn-primary","mx-2","my-1"),this.options.input_size!=="small"&&c.classList.remove("btn-sm"),this.options.input_size==="large"&&c.classList.add("btn-lg"),c}},{key:"getButton",value:function(t,e,o){var c=hr(Ye(s.prototype),"getButton",this).call(this,t,e,o);return c.classList.add("btn","btn-sm","btn-primary","mr-2","my-1"),c}},{key:"getHeader",value:function(t,e){var o=document.createElement("h4");return typeof t=="string"?o.textContent=t:o.appendChild(t),o.style.display="inline-block",o}},{key:"getFormInputDescription",value:function(t){var e=hr(Ye(s.prototype),"getFormInputDescription",this).call(this,t);return e.classList.add("je-desc","hide-sm"),e}},{key:"getFormInputLabel",value:function(t,e){var o=hr(Ye(s.prototype),"getFormInputLabel",this).call(this,t,e);return this.options.label_bold&&o.classList.add("je-label"),o}},{key:"getCheckbox",value:function(){return this.getFormInputField("checkbox")}},{key:"getCheckboxLabel",value:function(t,e){var o=hr(Ye(s.prototype),"getCheckboxLabel",this).call(this,t,e),c=document.createElement("i");return c.classList.add("form-icon"),o.classList.add("form-checkbox","pr-0"),o.insertBefore(c,o.firstChild),o}},{key:"getFormCheckboxControl",value:function(t,e,o){return t.insertBefore(e,t.firstChild),o&&t.classList.add("form-inline"),t}},{key:"getMultiCheckboxHolder",value:function(t,e,o,c){return hr(Ye(s.prototype),"getMultiCheckboxHolder",this).call(this,t,e,o,c)}},{key:"getFormRadio",value:function(t){var e=this.getFormInputField("radio");for(var o in t)e.setAttribute(o,t[o]);return e}},{key:"getFormRadioLabel",value:function(t,e){var o=hr(Ye(s.prototype),"getFormRadioLabel",this).call(this,t,e),c=document.createElement("i");return c.classList.add("form-icon"),o.classList.add("form-radio"),o.insertBefore(c,o.firstChild),o}},{key:"getFormRadioControl",value:function(t,e,o){return t.insertBefore(e,t.firstChild),o&&t.classList.add("form-inline"),t}},{key:"getFormInputField",value:function(t){var e=hr(Ye(s.prototype),"getFormInputField",this).call(this,t);return["checkbox","radio"].includes(t)||e.classList.add("form-input"),e}},{key:"getRangeInput",value:function(t,e,o){var c=this.getFormInputField("range");return c.classList.add("slider"),c.classList.remove("form-input"),c.setAttribute("oninput",'this.setAttribute("value", this.value)'),c.setAttribute("min",t),c.setAttribute("max",e),c.setAttribute("step",o),c}},{key:"getRangeControl",value:function(t,e){var o=hr(Ye(s.prototype),"getRangeControl",this).call(this,t,e);return o.classList.add("text-center"),o}},{key:"getSelectInput",value:function(t,e){var o=hr(Ye(s.prototype),"getSelectInput",this).call(this,t);return o.classList.add("form-select"),o}},{key:"getTextareaInput",value:function(){var t=document.createElement("textarea");return t.classList.add("form-input"),t}},{key:"getFormControl",value:function(t,e,o,c){var d=document.createElement("div");return d.classList.add("form-group"),!t||e.type!=="checkbox"&&e.type!=="radio"?(t&&(t.classList.add("form-label"),d.appendChild(t),c&&t.appendChild(c)),d.appendChild(e)):(d.classList.add(e.type),c&&t.appendChild(c),t.insertBefore(e,t.firstChild),d.appendChild(t)),this.options.input_size==="small"?e.classList.add("input-sm","select-sm"):this.options.input_size==="large"&&e.classList.add("input-lg","select-lg"),e.type!=="checkbox"&&d.appendChild(e),o&&d.appendChild(o),d}},{key:"getInputGroup",value:function(t,e){if(t){var o=document.createElement("div");o.classList.add("input-group"),o.appendChild(t);for(var c=0;c<e.length;c++)e[c].classList.add("input-group-btn"),e[c].classList.remove("btn-sm","mr-2","my-1"),o.appendChild(e[c]);return o}}},{key:"getInfoButton",value:function(t){var e=document.createElement("div");e.classList.add("popover","popover-left","float-right");var o=document.createElement("button");o.classList.add("btn","btn-secondary","btn-info","btn-action","s-circle"),o.setAttribute("tabindex","-1"),e.appendChild(o);var c=document.createTextNode("I");o.appendChild(c);var d=document.createElement("div");d.classList.add("popover-container"),e.appendChild(d);var _=document.createElement("div");_.classList.add("card"),d.appendChild(_);var P=document.createElement("div");return P.classList.add("card-body"),P.innerHTML=t,_.appendChild(P),e}},{key:"getTable",value:function(){var t=hr(Ye(s.prototype),"getTable",this).call(this);return t.classList.add("table","table-scroll"),this.options.table_border&&t.classList.add("je-table-border"),this.options.table_zebrastyle&&t.classList.add("table-striped"),t}},{key:"getProgressBar",value:function(){var t=hr(Ye(s.prototype),"getProgressBar",this).call(this);return t.classList.add("progress"),t}},{key:"getTabHolder",value:function(t){var e=t===void 0?"":t,o=document.createElement("div");return o.classList.add("columns"),o.innerHTML='<div class="column col-2"></div><div class="column col-10 content" id="'.concat(e,'"></div>'),o}},{key:"getTopTabHolder",value:function(t){var e=t===void 0?"":t,o=document.createElement("div");return o.innerHTML='<ul class="tab"></ul><div class="content" id="'.concat(e,'"></div>'),o}},{key:"getTab",value:function(t,e){var o=document.createElement("a");return o.classList.add("btn","btn-secondary","btn-block"),o.setAttribute("href","#".concat(e)),o.appendChild(t),o}},{key:"getTopTab",value:function(t,e){var o=document.createElement("li");o.id=e,o.classList.add("tab-item");var c=document.createElement("a");return c.setAttribute("href","#".concat(e)),c.appendChild(t),o.appendChild(c),o}},{key:"markTabActive",value:function(t){t.tab.classList.add("active"),t.rowPane!==void 0?t.rowPane.style.display="":t.container.style.display=""}},{key:"markTabInactive",value:function(t){t.tab.classList.remove("active"),t.rowPane!==void 0?t.rowPane.style.display="none":t.container.style.display="none"}},{key:"afterInputReady",value:function(t){if(t.localName==="select"){if(t.classList.contains("selectized")){var e=t.nextSibling;e&&(e.classList.remove("form-select"),Array.from(e.querySelectorAll(".form-select")).forEach(function(c){c.classList.remove("form-select")}))}else if(t.classList.contains("select2-hidden-accessible")){var o=t.nextSibling;o&&o.querySelector(".select2-selection--single")&&o.classList.add("form-select")}}t.controlgroup||(t.controlgroup=this.closest(t,".form-group"),this.closest(t,".compact")&&(t.controlgroup.style.marginBottom=0))}},{key:"addInputError",value:function(t,e){t.controlgroup&&(t.controlgroup.classList.add("has-error"),t.errmsg||(t.errmsg=document.createElement("p"),t.errmsg.classList.add("form-input-hint"),t.controlgroup.appendChild(t.errmsg)),t.errmsg.classList.remove("d-hide"),t.errmsg.textContent=e)}},{key:"removeInputError",value:function(t){t.errmsg&&(t.errmsg.classList.add("d-hide"),t.controlgroup.classList.remove("has-error"))}}])&&Ad(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(bn);function ho(l){return ho=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ho(l)}function Id(l,n){for(var p=0;p<n.length;p++){var i=n[p];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(l,(u=function(a,s){if(ho(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(ho(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),ho(u)==="symbol"?u:String(u)),i)}var u}function dr(){return dr=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(l,n,p){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=Xe(a))!==null;);return a}(l,n);if(i){var u=Object.getOwnPropertyDescriptor(i,n);return u.get?u.get.call(arguments.length<3?l:p):u.value}},dr.apply(this,arguments)}function jl(l,n){return jl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},jl(l,n)}function Xe(l){return Xe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Xe(l)}Kc.rules={"*":"--primary-color:%235755d9;--gray-color:%23bcc3ce;--light-color:%23fff",".slider:focus":"box-shadow:none","h4 > label + .btn-group":"margin-left:1rem",".text-right > button":"margin-right:0%20!important",".text-left > button":"margin-left:0%20!important",".property-selector":"font-size:0.7rem;font-weight:normal;max-height:260px%20!important;width:395px%20!important",".property-selector .form-checkbox":"margin:0",textarea:"width:100%25;min-height:2rem;resize:vertical",table:"border-collapse:collapse",".table td":"padding:0.4rem%200.4rem",".mr-5":"margin-right:1rem%20!important","div[data-schematype]:not([data-schematype='object'])":"transition:0.5s","div[data-schematype]:not([data-schematype='object']):hover":"background-color:%23eee",".je-table-border td":"border:0.05rem%20solid%20%23dadee4%20!important",".btn-info":"font-size:0.5rem;font-weight:bold;height:0.8rem;padding:0.15rem%200;line-height:0.8;margin:0.3rem%200%200.3rem%200.1rem",".je-label + select":"min-width:5rem",".je-label":"font-weight:600",".btn-action.btn-info":"width:0.8rem",".je-border":"border:0.05rem%20solid%20%23dadee4",".je-panel":"padding:0.2rem;margin:0.2rem;background-color:rgba(218%2C%20222%2C%20228%2C%200.1)",".je-panel-top":"padding:0.2rem;margin:0.2rem;background-color:rgba(218%2C%20222%2C%20228%2C%200.1)",".required:after":"content:%22%20*%22;color:red;font:inherit",".je-align-bottom":"margin-top:auto",".je-desc":"font-size:smaller;margin:0.2rem%200",".je-upload-preview img":"float:left;margin:0%200.5rem%200.5rem%200;max-width:100%25;max-height:5rem;border:3px%20solid%20white;box-shadow:0px%200px%208px%20rgba(0%2C%200%2C%200%2C%200.3);box-sizing:border-box",".je-dropzone":"position:relative;margin:0.5rem%200;border:2px%20dashed%20black;width:100%25;height:60px;background:teal;transition:all%200.5s",".je-dropzone:before":"position:absolute;content:attr(data-text);color:rgba(0%2C%200%2C%200%2C%200.6);left:50%25;top:50%25;transform:translate(-50%25%2C%20-50%25)",".je-dropzone.valid-dropzone":"background:green",".je-dropzone.invalid-dropzone":"background:red",".columns .container.je-noindent":"padding-left:0;padding-right:0",".selectize-control.multi .item":"background:var(--primary-color)%20!important",".select2-container--default .select2-selection--single .select2-selection__arrow":"display:none",".select2-container--default .select2-selection--single":"border:none",".select2-container .select2-selection--single .select2-selection__rendered":"padding:0",".select2-container .select2-search--inline .select2-search__field":"margin-top:0",".select2-container--default.select2-container--focus .select2-selection--multiple":"border:0.05rem%20solid%20var(--gray-color)",".select2-container--default .select2-selection--multiple .select2-selection__choice":"margin:0.4rem%200.2rem%200.2rem%200;padding:2px%205px;background-color:var(--primary-color);color:var(--light-color)",".select2-container--default .select2-search--inline .select2-search__field":"line-height:normal",".choices":"margin-bottom:auto",".choices__list--multiple .choices__item":"border:none;background-color:var(--primary-color);color:var(--light-color)",".choices[data-type*='select-multiple'] .choices__button":"border-left:0.05rem%20solid%20%232826a6",".choices__inner":"font-size:inherit;min-height:20px;padding:4px%207.5px%204px%203.75px",".choices[data-type*='select-one'] .choices__inner":"padding-bottom:4px",".choices__list--dropdown .choices__item":"font-size:inherit"};var Bd={disable_theme_rules:!1,label_bold:!1,object_panel_default:!0,object_indent:!0,object_border:!1,table_border:!1,table_hdiv:!1,table_zebrastyle:!1,input_size:"small",enable_compact:!1},tu=function(l){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&jl(t,e)})(s,l);var n,p,i,u,a=(i=s,u=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Xe(i);if(u){var o=Xe(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(ho(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(t){return function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")}(this,s),a.call(this,t,Bd)}return n=s,(p=[{key:"getGridContainer",value:function(){var t=document.createElement("div");return t.classList.add("flex","flex-col","w-full"),this.options.object_indent||t.classList.add("je-noindent"),t}},{key:"getGridRow",value:function(){var t=document.createElement("div");return t.classList.add("flex","flex-wrap","w-full"),t}},{key:"getGridColumn",value:function(){var t=document.createElement("div");return t.classList.add("flex","flex-col"),t}},{key:"setGridColumnSize",value:function(t,e,o){e>0&&e<12?t.classList.add("w-".concat(e,"/12"),"px-1"):t.classList.add("w-full","px-1"),o&&(t.style.marginLeft="".concat(100/12*o,"%"))}},{key:"getIndentedPanel",value:function(){var t=document.createElement("div");return this.options.object_panel_default?t.classList.add("w-full","p-1"):t.classList.add("relative","flex","flex-col","rounded","break-words","border","bg-white","border-0","border-blue-400","p-1","shadow-md"),this.options.object_border&&t.classList.add("je-border"),t}},{key:"getTopIndentedPanel",value:function(){var t=document.createElement("div");return this.options.object_panel_default?t.classList.add("w-full","m-2"):t.classList.add("relative","flex","flex-col","rounded","break-words","border","bg-white","border-0","border-blue-400","p-1","shadow-md"),this.options.object_border&&t.classList.add("je-border"),t}},{key:"getTitle",value:function(){return this.translateProperty(this.schema.title)}},{key:"getSelectInput",value:function(t,e){var o=dr(Xe(s.prototype),"getSelectInput",this).call(this,t);return e?o.classList.add("form-multiselect","block","py-0","h-auto","w-full","px-1","text-sm","text-black","leading-normal","bg-white","border","border-grey","rounded"):o.classList.add("form-select","block","py-0","h-6","w-full","px-1","text-sm","text-black","leading-normal","bg-white","border","border-grey","rounded"),this.options.enable_compact&&o.classList.add("compact"),o}},{key:"afterInputReady",value:function(t){t.controlgroup||(t.controlgroup=this.closest(t,".form-group"),this.closest(t,".compact")&&(t.controlgroup.style.marginBottom=0))}},{key:"getTextareaInput",value:function(){var t=dr(Xe(s.prototype),"getTextareaInput",this).call(this);return t.classList.add("block","w-full","px-1","text-sm","leading-normal","bg-white","text-black","border","border-grey","rounded"),this.options.enable_compact&&t.classList.add("compact"),t.style.height=0,t}},{key:"getRangeInput",value:function(t,e,o){var c=this.getFormInputField("range");return c.classList.add("slider"),this.options.enable_compact&&c.classList.add("compact"),c.setAttribute("oninput",'this.setAttribute("value", this.value)'),c.setAttribute("min",t),c.setAttribute("max",e),c.setAttribute("step",o),c}},{key:"getRangeControl",value:function(t,e){var o=dr(Xe(s.prototype),"getRangeControl",this).call(this,t,e);return o.classList.add("text-center","text-black"),o}},{key:"getCheckbox",value:function(){var t=this.getFormInputField("checkbox");return t.classList.add("form-checkbox","text-red-600"),t}},{key:"getCheckboxLabel",value:function(t,e){var o=dr(Xe(s.prototype),"getCheckboxLabel",this).call(this,t,e);return o.classList.add("inline-flex","items-center"),o}},{key:"getFormCheckboxControl",value:function(t,e,o){return t.insertBefore(e,t.firstChild),o&&t.classList.add("inline-flex flex-row"),t}},{key:"getMultiCheckboxHolder",value:function(t,e,o,c){var d=dr(Xe(s.prototype),"getMultiCheckboxHolder",this).call(this,t,e,o,c);return d.classList.add("inline-flex","flex-col"),d}},{key:"getFormRadio",value:function(t){var e=this.getFormInputField("radio");for(var o in e.classList.add("form-radio","text-red-600"),t)e.setAttribute(o,t[o]);return e}},{key:"getFormRadioLabel",value:function(t,e){var o=dr(Xe(s.prototype),"getFormRadioLabel",this).call(this,t,e);return o.classList.add("inline-flex","items-center","mr-2"),o}},{key:"getFormRadioControl",value:function(t,e,o){return t.insertBefore(e,t.firstChild),o&&t.classList.add("form-radio"),t}},{key:"getRadioHolder",value:function(t,e,o,c,d){var _=dr(Xe(s.prototype),"getRadioHolder",this).call(this,e,o,c,d);return t.options.layout==="h"?_.classList.add("inline-flex","flex-row"):_.classList.add("inline-flex","flex-col"),_}},{key:"getFormInputLabel",value:function(t,e){var o=dr(Xe(s.prototype),"getFormInputLabel",this).call(this,t,e);return this.options.label_bold?o.classList.add("font-bold"):o.classList.add("required"),o}},{key:"getFormInputField",value:function(t){var e=dr(Xe(s.prototype),"getFormInputField",this).call(this,t);return["checkbox","radio"].includes(t)||e.classList.add("block","w-full","px-1","text-black","text-sm","leading-normal","bg-white","border","border-grey","rounded"),this.options.enable_compact&&e.classList.add("compact"),e}},{key:"getFormInputDescription",value:function(t){var e=document.createElement("p");return e.classList.add("block","mt-1","text-xs"),window.DOMPurify?e.innerHTML=window.DOMPurify.sanitize(t):e.textContent=this.cleanText(t),e}},{key:"getFormControl",value:function(t,e,o,c){var d=document.createElement("div");return d.classList.add("form-group","mb-1","w-full"),t&&(t.classList.add("text-xs"),e.type==="checkbox"&&(e.classList.add("form-checkbox","text-xs","text-red-600","mr-1"),t.classList.add("items-center","flex"),t=this.getFormCheckboxControl(t,e,!1,c)),e.type==="radio"&&(e.classList.add("form-radio","text-red-600","mr-1"),t.classList.add("items-center","flex"),t=this.getFormRadioControl(t,e,!1,c)),d.appendChild(t),!["checkbox","radio"].includes(e.type)&&c&&d.appendChild(c)),["checkbox","radio"].includes(e.type)||(this.options.input_size==="small"?e.classList.add("text-xs"):this.options.input_size==="normal"?e.classList.add("text-base"):this.options.input_size==="large"&&e.classList.add("text-xl"),d.appendChild(e)),o&&d.appendChild(o),d}},{key:"getHeaderButtonHolder",value:function(){var t=this.getButtonHolder();return t.classList.add("text-sm"),t}},{key:"getButtonHolder",value:function(){var t=document.createElement("div");return t.classList.add("flex","relative","inline-flex","align-middle"),t}},{key:"getButton",value:function(t,e,o){var c=dr(Xe(s.prototype),"getButton",this).call(this,t,e,o);return c.classList.add("inline-block","align-middle","text-center","text-sm","bg-blue-700","text-white","py-1","pr-1","m-2","shadow","select-none","whitespace-no-wrap","rounded"),c}},{key:"getInfoButton",value:function(t){var e=document.createElement("a");e.classList.add("tooltips","float-right"),e.innerHTML="ⓘ";var o=document.createElement("span");return o.innerHTML=t,e.appendChild(o),e}},{key:"getTable",value:function(){var t=dr(Xe(s.prototype),"getTable",this).call(this);return this.options.table_border?t.classList.add("je-table-border"):t.classList.add("table","border","p-0"),t}},{key:"getTableRow",value:function(){var t=dr(Xe(s.prototype),"getTableRow",this).call(this);return this.options.table_border&&t.classList.add("je-table-border"),this.options.table_zebrastyle&&t.classList.add("je-table-zebra"),t}},{key:"getTableHeaderCell",value:function(t){var e=dr(Xe(s.prototype),"getTableHeaderCell",this).call(this,t);return this.options.table_border?e.classList.add("je-table-border"):this.options.table_hdiv?e.classList.add("je-table-hdiv"):e.classList.add("text-xs","border","p-0","m-0"),e}},{key:"getTableCell",value:function(){var t=dr(Xe(s.prototype),"getTableCell",this).call(this);return this.options.table_border?t.classList.add("je-table-border"):this.options.table_hdiv?t.classList.add("je-table-hdiv"):t.classList.add("border-0","p-0","m-0"),t}},{key:"addInputError",value:function(t,e){t.controlgroup&&(t.controlgroup.classList.add("has-error"),t.controlgroup.classList.add("text-red-600"),t.errmsg?t.errmsg.style.display="":(t.errmsg=document.createElement("p"),t.errmsg.classList.add("block","mt-1","text-xs","text-red"),t.controlgroup.appendChild(t.errmsg)),t.errmsg.textContent=e)}},{key:"removeInputError",value:function(t){t.errmsg&&(t.errmsg.style.display="none",t.controlgroup.classList.remove("text-red-600"),t.controlgroup.classList.remove("has-error"))}},{key:"getTabHolder",value:function(t){var e=document.createElement("div"),o=t===void 0?"":t;return e.innerHTML="<div class='w-2/12' id='".concat(o,"'><ul class='list-reset pl-0 mb-0'></ul></div><div class='w-10/12' id='").concat(o,"'></div>"),e.classList.add("flex"),e}},{key:"addTab",value:function(t,e){t.children[0].children[0].appendChild(e)}},{key:"getTopTabHolder",value:function(t){var e=t===void 0?"":t,o=document.createElement("div");return o.innerHTML="<ul class='nav-tabs flex list-reset pl-0 mb-0 border-b border-grey-light' id='".concat(e,"'></ul><div class='p-6 block' id='").concat(e,"'></div>"),o}},{key:"getTab",value:function(t,e){var o=document.createElement("li");o.classList.add("nav-item","flex-col","text-center","text-white","bg-blue-500","shadow-md","border","p-2","mb-2","mr-2","hover:bg-blue-400","rounded");var c=document.createElement("a");return c.classList.add("nav-link","text-center"),c.setAttribute("href","#".concat(e)),c.setAttribute("data-toggle","tab"),c.appendChild(t),o.appendChild(c),o}},{key:"getTopTab",value:function(t,e){var o=document.createElement("li");o.classList.add("nav-item","flex","border-l","border-t","border-r");var c=document.createElement("a");return c.classList.add("nav-link","-mb-px","flex-row","text-center","bg-white","p-2","hover:bg-blue-400","rounded-t"),c.setAttribute("href","#".concat(e)),c.setAttribute("data-toggle","tab"),c.appendChild(t),o.appendChild(c),o}},{key:"getTabContent",value:function(){var t=document.createElement("div");return t.setAttribute("role","tabpanel"),t}},{key:"getTopTabContent",value:function(){var t=document.createElement("div");return t.setAttribute("role","tabpanel"),t}},{key:"markTabActive",value:function(t){t.tab.firstChild.classList.add("block"),t.tab.firstChild.classList.contains("border-b")===!0?(t.tab.firstChild.classList.add("border-b-0"),t.tab.firstChild.classList.remove("border-b")):t.tab.firstChild.classList.add("border-b-0"),t.container.classList.contains("hidden")===!0&&t.container.classList.remove("hidden"),t.container.classList.add("block")}},{key:"markTabInactive",value:function(t){t.tab.firstChild.classList.contains("border-b-0")===!0?(t.tab.firstChild.classList.add("border-b"),t.tab.firstChild.classList.remove("border-b-0")):t.tab.firstChild.classList.add("border-b"),t.container.classList.contains("block")===!0&&(t.container.classList.remove("block"),t.container.classList.add("hidden"))}},{key:"getProgressBar",value:function(){var t=document.createElement("div");t.classList.add("progress");var e=document.createElement("div");return e.classList.add("bg-blue","leading-none","py-1","text-xs","text-center","text-white"),e.setAttribute("role","progressbar"),e.setAttribute("aria-valuenow",0),e.setAttribute("aria-valuemin",0),e.setAttribute("aria-valuenax",100),e.innerHTML="".concat(0,"%"),t.appendChild(e),t}},{key:"updateProgressBar",value:function(t,e){if(t){var o=t.firstChild,c="".concat(e,"%");o.setAttribute("aria-valuenow",e),o.style.width=c,o.innerHTML=c}}},{key:"updateProgressBarUnknown",value:function(t){if(t){var e=t.firstChild;t.classList.add("progress","bg-blue","leading-none","py-1","text-xs","text-center","text-white","block"),e.removeAttribute("aria-valuenow"),e.classList.add("w-full"),e.innerHTML=""}}},{key:"getInputGroup",value:function(t,e){if(t){var o=document.createElement("div");o.classList.add("relative","items-stretch","w-full"),o.appendChild(t);var c=document.createElement("div");c.classList.add("-mr-1"),o.appendChild(c);for(var d=0;d<e.length;d++)c.appendChild(e[d]);return o}}}])&&Id(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(bn);tu.rules={".slider":"-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;display:block;border:none;height:1.2rem;width:100%25",".slider:focus":"box-shadow:0%200%200%200%20rgba(87%2C%2085%2C%20217%2C%200.2);outline:none",".slider.tooltip:not([data-tooltip])::after":"content:attr(value)",".slider::-webkit-slider-thumb":"-webkit-appearance:none;background:%23f17405;border-radius:100%25;height:0.6rem;margin-top:-0.25rem;transition:transform%200.2s;width:0.6rem",".slider:active::-webkit-slider-thumb":"transform:scale(1.25);outline:none",".slider::-webkit-slider-runnable-track":"background:%23b2b4b6;border-radius:0.1rem;height:0.1rem;width:100%25","a.tooltips":"position:relative;display:inline","a.tooltips span":"position:absolute;white-space:nowrap;width:auto;padding-left:1rem;padding-right:1rem;color:%23ffffff;background:rgba(56%2C%2056%2C%2056%2C%200.85);height:1.5rem;line-height:1.5rem;text-align:center;visibility:hidden;border-radius:3px","a.tooltips span:after":"content:%22%22;position:absolute;top:50%25;left:100%25;margin-top:-5px;width:0;height:0;border-left:5px%20solid%20rgba(56%2C%2056%2C%2056%2C%200.85);border-top:5px%20solid%20transparent;border-bottom:5px%20solid%20transparent","a:hover.tooltips span":"visibility:visible;opacity:0.9;font-size:0.8rem;right:100%25;top:50%25;margin-top:-12px;margin-right:10px;z-index:999",".json-editor-btntype-properties + div":"font-size:0.8rem;font-weight:normal",textarea:"width:100%25;min-height:2rem;resize:vertical",table:"width:100%25;border-collapse:collapse",".table td":"padding:0rem%200rem","div[data-schematype]:not([data-schematype='object'])":"transition:0.5s","div[data-schematype]:not([data-schematype='object']):hover":"background-color:%23e6f4fe","div[data-schemaid='root']":"position:relative;width:inherit;display:inherit;overflow-x:hidden;z-index:10","select[multiple]":"height:auto","select[multiple].from-select":"height:auto",".je-table-zebra:nth-child(even)":"background-color:%23f2f2f2",".je-table-border":"border:0.5px%20solid%20black",".je-table-hdiv":"border-bottom:1px%20solid%20black",".je-border":"border:0.05rem%20solid%20%233182ce",".je-panel":"width:inherit;padding:0.2rem;margin:0.2rem;background-color:rgba(218%2C%20222%2C%20228%2C%200.1)",".je-panel-top":"width:100%25;padding:0.2rem;margin:0.2rem;background-color:rgba(218%2C%20222%2C%20228%2C%200.1)",".required:after":"content:%22%20*%22;color:red;font:inherit;font-weight:bold",".je-desc":"font-size:smaller;margin:0.2rem%200",".container-xl.je-noindent":"padding-left:0;padding-right:0",".json-editor-btntype-add":"color:white;margin:0.3rem;padding:0.3rem%200.8rem;background-color:%234299e1;box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-webkit-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-moz-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2)",".json-editor-btntype-deletelast":"color:white;margin:0.3rem;padding:0.3rem%200.8rem;background-color:%23e53e3e;box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-webkit-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-moz-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2)",".json-editor-btntype-deleteall":"color:white;margin:0.3rem;padding:0.3rem%200.8rem;background-color:%23000000;box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-webkit-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-moz-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2)",".json-editor-btn-save":"float:right;color:white;margin:0.3rem;padding:0.3rem%200.8rem;background-color:%232b6cb0;box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-webkit-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-moz-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2)",".json-editor-btn-back":"color:white;margin:0.3rem;padding:0.3rem%200.8rem;background-color:%232b6cb0;box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-webkit-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-moz-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2)",".json-editor-btntype-delete":"color:%23e53e3e;background-color:rgba(218%2C%20222%2C%20228%2C%200.1);margin:0.03rem;padding:0.1rem",".json-editor-btntype-move":"color:%23000000;background-color:rgba(218%2C%20222%2C%20228%2C%200.1);margin:0.03rem;padding:0.1rem",".json-editor-btn-collapse":"padding:0em%200.8rem;font-size:1.3rem;color:%23e53e3e;background-color:rgba(218%2C%20222%2C%20228%2C%200.1)",".je-upload-preview img":"float:left;margin:0%200.5rem%200.5rem%200;max-width:100%25;max-height:5rem",".je-dropzone":"position:relative;margin:0.5rem%200;border:2px%20dashed%20black;width:100%25;height:60px;background:teal;transition:all%200.5s",".je-dropzone:before":"position:absolute;content:attr(data-text);color:rgba(0%2C%200%2C%200%2C%200.6);left:50%25;top:50%25;transform:translate(-50%25%2C%20-50%25)",".je-dropzone.valid-dropzone":"background:green",".je-dropzone.invalid-dropzone":"background:red"};var Dd={html:Wc,bootstrap3:Zc,bootstrap4:Jc,bootstrap5:Yc,jqueryui:Xc,barebones:Qc,spectre:Kc,tailwind:tu};const Nd={".je-float-right-linkholder":"float:right;margin-left:10px",".je-modal":"background-color:white;border:1px%20solid%20black;box-shadow:3px%203px%20black;position:absolute;z-index:10",".je-infobutton-icon":"font-size:16px;font-weight:bold;padding:0.25rem;position:relative;display:inline-block",".je-infobutton-tooltip":"font-size:12px;font-weight:normal;font-family:sans-serif;visibility:hidden;background-color:rgba(50%2C%2050%2C%2050%2C%200.75);margin:0%200.25rem;color:%23fafafa;padding:0.5rem%201rem;border-radius:0.25rem;width:20rem;position:absolute",".je-not-loaded":"pointer-events:none",".je-header":"display:inline-block",".je-upload-preview img":"float:left;margin:0%200.5rem%200.5rem%200;max-width:100%25;max-height:5rem",".je-checkbox":"display:inline-block;width:auto",".je-checkbox-control--compact":"display:inline-block;margin-right:1rem",".je-radio":"display:inline-block;width:auto",".je-radio-control--compact":"display:inline-block;margin-right:1rem",".je-switcher":"background-color:transparent;display:inline-block;font-style:italic;font-weight:normal;height:auto;width:auto;margin-bottom:0;margin-left:5px;padding:0%200%200%203px",".je-textarea":"width:100%25;height:300px;box-sizing:border-box",".je-range-control":"text-align:center",".je-indented-panel":"padding-left:10px;margin-left:10px;border-left:1px%20solid%20%23ccc",".je-indented-panel--top":"padding-left:10px;margin-left:10px",".je-tabholder":"float:left;width:130px",".je-tabholder .content":"margin-left:120px",".je-tabholder--top":"margin-left:10px",".je-tabholder--clear":"clear:both",".je-tab":"border:1px%20solid%20%23ccc;border-width:1px%200%201px%201px;text-align:center;line-height:30px;border-radius:5px;border-bottom-right-radius:0;border-top-right-radius:0;font-weight:bold;cursor:pointer",".je-tab--top":"float:left;border:1px%20solid%20%23ccc;border-width:1px%201px%200px%201px;text-align:center;line-height:30px;border-radius:5px;padding-left:5px;padding-right:5px;border-bottom-right-radius:0;border-bottom-left-radius:0;font-weight:bold;cursor:pointer",".je-block-link":"display:block",".je-media":"width:100%25"};function po(l){return po=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},po(l)}function Ol(l,n){(n==null||n>l.length)&&(n=l.length);for(var p=0,i=new Array(n);p<n;p++)i[p]=l[p];return i}function El(){El=function(){return l};var l={},n=Object.prototype,p=n.hasOwnProperty,i=Object.defineProperty||function(W,G,Z){W[G]=Z.value},u=typeof Symbol=="function"?Symbol:{},a=u.iterator||"@@iterator",s=u.asyncIterator||"@@asyncIterator",t=u.toStringTag||"@@toStringTag";function e(W,G,Z){return Object.defineProperty(W,G,{value:Z,enumerable:!0,configurable:!0,writable:!0}),W[G]}try{e({},"")}catch{e=function(G,Z,pt){return G[Z]=pt}}function o(W,G,Z,pt){var et=G&&G.prototype instanceof _?G:_,Lt=Object.create(et.prototype),ee=new gt(pt||[]);return i(Lt,"_invoke",{value:Nt(W,Z,ee)}),Lt}function c(W,G,Z){try{return{type:"normal",arg:W.call(G,Z)}}catch(pt){return{type:"throw",arg:pt}}}l.wrap=o;var d={};function _(){}function P(){}function D(){}var J={};e(J,a,function(){return this});var nt=Object.getPrototypeOf,ut=nt&&nt(nt(Wt([])));ut&&ut!==n&&p.call(ut,a)&&(J=ut);var dt=D.prototype=_.prototype=Object.create(J);function kt(W){["next","throw","return"].forEach(function(G){e(W,G,function(Z){return this._invoke(G,Z)})})}function Ct(W,G){function Z(et,Lt,ee,ke){var je=c(W[et],W,Lt);if(je.type!=="throw"){var Sr=je.arg,Ur=Sr.value;return Ur&&po(Ur)=="object"&&p.call(Ur,"__await")?G.resolve(Ur.__await).then(function(yr){Z("next",yr,ee,ke)},function(yr){Z("throw",yr,ee,ke)}):G.resolve(Ur).then(function(yr){Sr.value=yr,ee(Sr)},function(yr){return Z("throw",yr,ee,ke)})}ke(je.arg)}var pt;i(this,"_invoke",{value:function(et,Lt){function ee(){return new G(function(ke,je){Z(et,Lt,ke,je)})}return pt=pt?pt.then(ee,ee):ee()}})}function Nt(W,G,Z){var pt="suspendedStart";return function(et,Lt){if(pt==="executing")throw new Error("Generator is already running");if(pt==="completed"){if(et==="throw")throw Lt;return{value:void 0,done:!0}}for(Z.method=et,Z.arg=Lt;;){var ee=Z.delegate;if(ee){var ke=re(ee,Z);if(ke){if(ke===d)continue;return ke}}if(Z.method==="next")Z.sent=Z._sent=Z.arg;else if(Z.method==="throw"){if(pt==="suspendedStart")throw pt="completed",Z.arg;Z.dispatchException(Z.arg)}else Z.method==="return"&&Z.abrupt("return",Z.arg);pt="executing";var je=c(W,G,Z);if(je.type==="normal"){if(pt=Z.done?"completed":"suspendedYield",je.arg===d)continue;return{value:je.arg,done:Z.done}}je.type==="throw"&&(pt="completed",Z.method="throw",Z.arg=je.arg)}}}function re(W,G){var Z=G.method,pt=W.iterator[Z];if(pt===void 0)return G.delegate=null,Z==="throw"&&W.iterator.return&&(G.method="return",G.arg=void 0,re(W,G),G.method==="throw")||Z!=="return"&&(G.method="throw",G.arg=new TypeError("The iterator does not provide a '"+Z+"' method")),d;var et=c(pt,W.iterator,G.arg);if(et.type==="throw")return G.method="throw",G.arg=et.arg,G.delegate=null,d;var Lt=et.arg;return Lt?Lt.done?(G[W.resultName]=Lt.value,G.next=W.nextLoc,G.method!=="return"&&(G.method="next",G.arg=void 0),G.delegate=null,d):Lt:(G.method="throw",G.arg=new TypeError("iterator result is not an object"),G.delegate=null,d)}function Pe(W){var G={tryLoc:W[0]};1 in W&&(G.catchLoc=W[1]),2 in W&&(G.finallyLoc=W[2],G.afterLoc=W[3]),this.tryEntries.push(G)}function Ut(W){var G=W.completion||{};G.type="normal",delete G.arg,W.completion=G}function gt(W){this.tryEntries=[{tryLoc:"root"}],W.forEach(Pe,this),this.reset(!0)}function Wt(W){if(W){var G=W[a];if(G)return G.call(W);if(typeof W.next=="function")return W;if(!isNaN(W.length)){var Z=-1,pt=function et(){for(;++Z<W.length;)if(p.call(W,Z))return et.value=W[Z],et.done=!1,et;return et.value=void 0,et.done=!0,et};return pt.next=pt}}return{next:ze}}function ze(){return{value:void 0,done:!0}}return P.prototype=D,i(dt,"constructor",{value:D,configurable:!0}),i(D,"constructor",{value:P,configurable:!0}),P.displayName=e(D,t,"GeneratorFunction"),l.isGeneratorFunction=function(W){var G=typeof W=="function"&&W.constructor;return!!G&&(G===P||(G.displayName||G.name)==="GeneratorFunction")},l.mark=function(W){return Object.setPrototypeOf?Object.setPrototypeOf(W,D):(W.__proto__=D,e(W,t,"GeneratorFunction")),W.prototype=Object.create(dt),W},l.awrap=function(W){return{__await:W}},kt(Ct.prototype),e(Ct.prototype,s,function(){return this}),l.AsyncIterator=Ct,l.async=function(W,G,Z,pt,et){et===void 0&&(et=Promise);var Lt=new Ct(o(W,G,Z,pt),et);return l.isGeneratorFunction(G)?Lt:Lt.next().then(function(ee){return ee.done?ee.value:Lt.next()})},kt(dt),e(dt,t,"Generator"),e(dt,a,function(){return this}),e(dt,"toString",function(){return"[object Generator]"}),l.keys=function(W){var G=Object(W),Z=[];for(var pt in G)Z.push(pt);return Z.reverse(),function et(){for(;Z.length;){var Lt=Z.pop();if(Lt in G)return et.value=Lt,et.done=!1,et}return et.done=!0,et}},l.values=Wt,gt.prototype={constructor:gt,reset:function(W){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(Ut),!W)for(var G in this)G.charAt(0)==="t"&&p.call(this,G)&&!isNaN(+G.slice(1))&&(this[G]=void 0)},stop:function(){this.done=!0;var W=this.tryEntries[0].completion;if(W.type==="throw")throw W.arg;return this.rval},dispatchException:function(W){if(this.done)throw W;var G=this;function Z(je,Sr){return Lt.type="throw",Lt.arg=W,G.next=je,Sr&&(G.method="next",G.arg=void 0),!!Sr}for(var pt=this.tryEntries.length-1;pt>=0;--pt){var et=this.tryEntries[pt],Lt=et.completion;if(et.tryLoc==="root")return Z("end");if(et.tryLoc<=this.prev){var ee=p.call(et,"catchLoc"),ke=p.call(et,"finallyLoc");if(ee&&ke){if(this.prev<et.catchLoc)return Z(et.catchLoc,!0);if(this.prev<et.finallyLoc)return Z(et.finallyLoc)}else if(ee){if(this.prev<et.catchLoc)return Z(et.catchLoc,!0)}else{if(!ke)throw new Error("try statement without catch or finally");if(this.prev<et.finallyLoc)return Z(et.finallyLoc)}}}},abrupt:function(W,G){for(var Z=this.tryEntries.length-1;Z>=0;--Z){var pt=this.tryEntries[Z];if(pt.tryLoc<=this.prev&&p.call(pt,"finallyLoc")&&this.prev<pt.finallyLoc){var et=pt;break}}et&&(W==="break"||W==="continue")&&et.tryLoc<=G&&G<=et.finallyLoc&&(et=null);var Lt=et?et.completion:{};return Lt.type=W,Lt.arg=G,et?(this.method="next",this.next=et.finallyLoc,d):this.complete(Lt)},complete:function(W,G){if(W.type==="throw")throw W.arg;return W.type==="break"||W.type==="continue"?this.next=W.arg:W.type==="return"?(this.rval=this.arg=W.arg,this.method="return",this.next="end"):W.type==="normal"&&G&&(this.next=G),d},finish:function(W){for(var G=this.tryEntries.length-1;G>=0;--G){var Z=this.tryEntries[G];if(Z.finallyLoc===W)return this.complete(Z.completion,Z.afterLoc),Ut(Z),d}},catch:function(W){for(var G=this.tryEntries.length-1;G>=0;--G){var Z=this.tryEntries[G];if(Z.tryLoc===W){var pt=Z.completion;if(pt.type==="throw"){var et=pt.arg;Ut(Z)}return et}}throw new Error("illegal catch attempt")},delegateYield:function(W,G,Z){return this.delegate={iterator:Wt(W),resultName:G,nextLoc:Z},this.method==="next"&&(this.arg=void 0),d}},l}function eu(l,n,p,i,u,a,s){try{var t=l[a](s),e=t.value}catch(o){return void p(o)}t.done?n(e):Promise.resolve(e).then(i,u)}function $d(l,n){for(var p=0;p<n.length;p++){var i=n[p];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(l,(u=function(a,s){if(po(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(po(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),po(u)==="symbol"?u:String(u)),i)}var u}var wn=function(){function l(a){var s=this,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(function(D,J){if(!(D instanceof J))throw new TypeError("Cannot call a class as a function")}(this,l),!(a instanceof Element))throw new Error("element should be an instance of Element");this.element=a,this.options=x({},l.defaults.options,t),this.ready=!1,this.copyClipboard=null,this.schema=this.options.schema,this.template=this.options.template,this.translate=this.options.translate||l.defaults.translate,this.translateProperty=this.options.translateProperty||l.defaults.translateProperty,this.uuid=0,this.__data={};var e=this.options.theme||l.defaults.theme,o=l.defaults.themes[e];if(!o)throw new Error("Unknown theme ".concat(e));this.element.setAttribute("data-theme",e),this.element.classList.add("je-not-loaded"),this.element.classList.remove("je-ready"),this.theme=new o(this);var c=x(Nd,this.getEditorsRules()),d=function(D,J,nt){return nt?s.addNewStyleRulesToShadowRoot(D,J,nt):s.addNewStyleRules(D,J)};if(!this.theme.options.disable_theme_rules){var _=E(this.element);d("default",c,_),o.rules!==void 0&&d(e,o.rules,_)}var P=l.defaults.iconlibs[this.options.iconlib||l.defaults.iconlib];P&&(this.iconlib=new P),this.root_container=this.theme.getContainer(),this.element.appendChild(this.root_container),this.promise=this.load()}var n,p,i,u;return n=l,p=[{key:"load",value:(i=El().mark(function a(){var s,t,e,o,c,d,_=this;return El().wrap(function(P){for(;;)switch(P.prev=P.next){case 0:return s=document.location.origin+document.location.pathname.toString(),(t=new Jh(this.options)).onSchemaLoaded=function(D){_.trigger("schemaLoaded",D)},t.onAllSchemasLoaded=function(){_.trigger("allSchemasLoaded")},this.expandSchema=function(D){return t.expandSchema(D)},this.expandRefs=function(D,J){return t.expandRefs(D,J)},e=document.location.toString(),P.next=9,t.load(this.schema,s,e);case 9:o=P.sent,c=this.options.custom_validators?{custom_validators:this.options.custom_validators}:{},this.validator=new $i(this,null,c,l.defaults),d=this.getEditorClass(o),this.root=this.createEditor(d,{jsoneditor:this,schema:o,required:!0,container:this.root_container}),this.root.preBuild(),this.root.build(),this.root.postBuild(),C(this.options,"startval")&&this.root.setValue(this.options.startval),this.validation_results=this.validator.validate(this.root.getValue()),this.root.showValidationErrors(this.validation_results),this.ready=!0,this.element.classList.remove("je-not-loaded"),this.element.classList.add("je-ready"),window.requestAnimationFrame(function(){_.ready&&(_.validation_results=_.validator.validate(_.root.getValue()),_.root.showValidationErrors(_.validation_results),_.trigger("ready"),_.trigger("change"))});case 24:case"end":return P.stop()}},a,this)}),u=function(){var a=this,s=arguments;return new Promise(function(t,e){var o=i.apply(a,s);function c(_){eu(o,t,e,c,d,"next",_)}function d(_){eu(o,t,e,c,d,"throw",_)}c(void 0)})},function(){return u.apply(this,arguments)})},{key:"getValue",value:function(){if(!this.ready)throw new Error("JSON Editor not ready yet. Make sure the load method is complete");return this.root.getValue()}},{key:"setValue",value:function(a){if(!this.ready)throw new Error("JSON Editor not ready yet. Make sure the load method is complete");return this.root.setValue(a),this}},{key:"validate",value:function(a){if(!this.ready)throw new Error("JSON Editor not ready yet. Make sure the load method is complete");return arguments.length===1?this.validator.validate(a):this.validation_results}},{key:"destroy",value:function(){this.destroyed||this.ready&&(this.schema=null,this.options=null,this.root.destroy(),this.root=null,this.root_container=null,this.validator=null,this.validation_results=null,this.theme=null,this.iconlib=null,this.template=null,this.__data=null,this.ready=!1,this.element.innerHTML="",this.element.removeAttribute("data-theme"),this.destroyed=!0)}},{key:"on",value:function(a,s){return this.callbacks=this.callbacks||{},this.callbacks[a]=this.callbacks[a]||[],this.callbacks[a].push(s),this}},{key:"off",value:function(a,s){if(a&&s){this.callbacks=this.callbacks||{},this.callbacks[a]=this.callbacks[a]||[];for(var t=[],e=0;e<this.callbacks[a].length;e++)this.callbacks[a][e]!==s&&t.push(this.callbacks[a][e]);this.callbacks[a]=t}else a?(this.callbacks=this.callbacks||{},this.callbacks[a]=[]):this.callbacks={};return this}},{key:"trigger",value:function(a,s){if(this.callbacks&&this.callbacks[a]&&this.callbacks[a].length)for(var t=0;t<this.callbacks[a].length;t++)this.callbacks[a][t].apply(this,[s]);return this}},{key:"setOption",value:function(a,s){if(a!=="show_errors")throw new Error("Option ".concat(a," must be set during instantiation and cannot be changed later"));return this.options.show_errors=s,this.onChange(),this}},{key:"getEditorsRules",value:function(){return Object.values(l.defaults.editors).reduce(function(a,s){return s.rules?x(a,s.rules):a},{})}},{key:"getEditorClass",value:function(a){var s,t=this;if(a=this.expandSchema(a),l.defaults.resolvers.find(function(e){return(s=e(a,t))&&l.defaults.editors[s]}),!s)throw new Error("Unknown editor for schema ".concat(JSON.stringify(a)));if(!l.defaults.editors[s])throw new Error("Unknown editor ".concat(s));return l.defaults.editors[s]}},{key:"createEditor",value:function(a,s){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;return new a(s=x({},a.options||{},s),l.defaults,t)}},{key:"onChange",value:function(){var a=this;if(this.ready&&!this.firing_change)return this.firing_change=!0,window.requestAnimationFrame(function(){a.firing_change=!1,a.ready&&(a.validation_results=a.validator.validate(a.root.getValue()),a.options.show_errors!=="never"?a.root.showValidationErrors(a.validation_results):a.root.showValidationErrors([]),a.trigger("change"))}),this}},{key:"compileTemplate",value:function(a){var s,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:l.defaults.template;if(typeof t=="string"){if(!l.defaults.templates[t])throw new Error("Unknown template engine ".concat(t));if(!(s=l.defaults.templates[t]()))throw new Error("Template engine ".concat(t," missing required library."))}else s=t;if(!s)throw new Error("No template engine set");if(!s.compile)throw new Error("Invalid template engine set");return s.compile(a)}},{key:"_data",value:function(a,s,t){if(arguments.length!==3)return a.hasAttribute("data-jsoneditor-".concat(s))?this.__data[a.getAttribute("data-jsoneditor-".concat(s))]:null;var e;a.hasAttribute("data-jsoneditor-".concat(s))?e=a.getAttribute("data-jsoneditor-".concat(s)):(e=this.uuid++,a.setAttribute("data-jsoneditor-".concat(s),e)),this.__data[e]=t}},{key:"registerEditor",value:function(a){return this.editors=this.editors||{},this.editors[a.path]=a,this}},{key:"unregisterEditor",value:function(a){return this.editors=this.editors||{},this.editors[a.path]=null,this}},{key:"getEditor",value:function(a){if(this.editors)return this.editors[a]}},{key:"watch",value:function(a,s){return this.watchlist=this.watchlist||{},this.watchlist[a]=this.watchlist[a]||[],this.watchlist[a].push(s),this}},{key:"unwatch",value:function(a,s){if(!this.watchlist||!this.watchlist[a])return this;if(!s)return this.watchlist[a]=null,this;for(var t=[],e=0;e<this.watchlist[a].length;e++)this.watchlist[a][e]!==s&&t.push(this.watchlist[a][e]);return this.watchlist[a]=t.length?t:null,this}},{key:"notifyWatchers",value:function(a){if(!this.watchlist||!this.watchlist[a])return this;for(var s=0;s<this.watchlist[a].length;s++)this.watchlist[a][s]()}},{key:"isEnabled",value:function(){return!this.root||this.root.isEnabled()}},{key:"enable",value:function(){this.root.enable()}},{key:"disable",value:function(){this.root.disable()}},{key:"setCopyClipboardContents",value:function(a){this.copyClipboard=a}},{key:"getCopyClipboardContents",value:function(){return this.copyClipboard}},{key:"addNewStyleRules",value:function(a,s){var t=document.querySelector("#theme-".concat(a));t||((t=document.createElement("style")).setAttribute("id","theme-".concat(a)),t.appendChild(document.createTextNode("")),document.head.appendChild(t));for(var e=t.sheet?t.sheet:t.styleSheet,o=this.element.nodeName.toLowerCase();e.cssRules.length>0;)e.deleteRule(0);Object.keys(s).forEach(function(c){var d=a==="default"?c:"".concat(o,'[data-theme="').concat(a,'"] ').concat(c);e.insertRule?e.insertRule(d+" {"+decodeURIComponent(s[c])+"}",0):e.addRule&&e.addRule(d,decodeURIComponent(s[c]),0)})}},{key:"addNewStyleRulesToShadowRoot",value:function(a,s,t){var e=this.element.nodeName.toLowerCase(),o="";Object.keys(s).forEach(function(_){var P=a==="default"?_:"".concat(e,'[data-theme="').concat(a,'"] ').concat(_);o+=P+" {"+decodeURIComponent(s[_])+`}
|
|
65
|
-
`});var c,d=new CSSStyleSheet;d.replaceSync(o),t.adoptedStyleSheets=[].concat(function(_){if(Array.isArray(_))return
|
|
66
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}(),[d])}}],
|
|
57
|
+
*/function*Ia(y,l){if(y!==void 0){let p=0;for(const v of y)yield l(v,p++)}}var Ba=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function qd(y){return y&&y.__esModule&&Object.prototype.hasOwnProperty.call(y,"default")?y.default:y}var lc={exports:{}};/*! For license information please see jsoneditor.js.LICENSE.txt */(function(y,l){(function(p,v){y.exports=v()})(self,()=>(()=>{var p={9662:(m,O,r)=>{var b=r(614),g=r(6330),w=TypeError;m.exports=function(x){if(b(x))return x;throw w(g(x)+" is not a function")}},9483:(m,O,r)=>{var b=r(4411),g=r(6330),w=TypeError;m.exports=function(x){if(b(x))return x;throw w(g(x)+" is not a constructor")}},6077:(m,O,r)=>{var b=r(614),g=String,w=TypeError;m.exports=function(x){if(typeof x=="object"||b(x))return x;throw w("Can't set "+g(x)+" as a prototype")}},1223:(m,O,r)=>{var b=r(5112),g=r(30),w=r(3070).f,x=b("unscopables"),j=Array.prototype;j[x]==null&&w(j,x,{configurable:!0,value:g(null)}),m.exports=function(E){j[x][E]=!0}},1530:(m,O,r)=>{var b=r(8710).charAt;m.exports=function(g,w,x){return w+(x?b(g,w).length:1)}},5787:(m,O,r)=>{var b=r(7976),g=TypeError;m.exports=function(w,x){if(b(x,w))return w;throw g("Incorrect invocation")}},9670:(m,O,r)=>{var b=r(111),g=String,w=TypeError;m.exports=function(x){if(b(x))return x;throw w(g(x)+" is not an object")}},8533:(m,O,r)=>{var b=r(2092).forEach,g=r(9341)("forEach");m.exports=g?[].forEach:function(w){return b(this,w,arguments.length>1?arguments[1]:void 0)}},8457:(m,O,r)=>{var b=r(9974),g=r(6916),w=r(7908),x=r(3411),j=r(7659),E=r(4411),S=r(6244),T=r(6135),A=r(4121),R=r(1246),I=Array;m.exports=function($){var M=w($),B=E(this),q=arguments.length,F=q>1?arguments[1]:void 0,N=F!==void 0;N&&(F=b(F,q>2?arguments[2]:void 0));var U,H,X,Y,Q,tt,it=R(M),st=0;if(!it||this===I&&j(it))for(U=S(M),H=B?new this(U):I(U);U>st;st++)tt=N?F(M[st],st):M[st],T(H,st,tt);else for(Q=(Y=A(M,it)).next,H=B?new this:[];!(X=g(Q,Y)).done;st++)tt=N?x(Y,F,[X.value,st],!0):X.value,T(H,st,tt);return H.length=st,H}},1318:(m,O,r)=>{var b=r(5656),g=r(1400),w=r(6244),x=function(j){return function(E,S,T){var A,R=b(E),I=w(R),$=g(T,I);if(j&&S!=S){for(;I>$;)if((A=R[$++])!=A)return!0}else for(;I>$;$++)if((j||$ in R)&&R[$]===S)return j||$||0;return!j&&-1}};m.exports={includes:x(!0),indexOf:x(!1)}},2092:(m,O,r)=>{var b=r(9974),g=r(1702),w=r(8361),x=r(7908),j=r(6244),E=r(5417),S=g([].push),T=function(A){var R=A==1,I=A==2,$=A==3,M=A==4,B=A==6,q=A==7,F=A==5||B;return function(N,U,H,X){for(var Y,Q,tt=x(N),it=w(tt),st=b(U,H),mt=j(it),ut=0,Et=X||E,At=R?Et(N,mt):I||q?Et(N,0):void 0;mt>ut;ut++)if((F||ut in it)&&(Q=st(Y=it[ut],ut,tt),A))if(R)At[ut]=Q;else if(Q)switch(A){case 3:return!0;case 5:return Y;case 6:return ut;case 2:S(At,Y)}else switch(A){case 4:return!1;case 7:S(At,Y)}return B?-1:$||M?M:At}};m.exports={forEach:T(0),map:T(1),filter:T(2),some:T(3),every:T(4),find:T(5),findIndex:T(6),filterReject:T(7)}},1194:(m,O,r)=>{var b=r(7293),g=r(5112),w=r(7392),x=g("species");m.exports=function(j){return w>=51||!b(function(){var E=[];return(E.constructor={})[x]=function(){return{foo:1}},E[j](Boolean).foo!==1})}},9341:(m,O,r)=>{var b=r(7293);m.exports=function(g,w){var x=[][g];return!!x&&b(function(){x.call(null,w||function(){return 1},1)})}},3671:(m,O,r)=>{var b=r(9662),g=r(7908),w=r(8361),x=r(6244),j=TypeError,E=function(S){return function(T,A,R,I){b(A);var $=g(T),M=w($),B=x($),q=S?B-1:0,F=S?-1:1;if(R<2)for(;;){if(q in M){I=M[q],q+=F;break}if(q+=F,S?q<0:B<=q)throw j("Reduce of empty array with no initial value")}for(;S?q>=0:B>q;q+=F)q in M&&(I=A(I,M[q],q,$));return I}};m.exports={left:E(!1),right:E(!0)}},3658:(m,O,r)=>{var b=r(9781),g=r(3157),w=TypeError,x=Object.getOwnPropertyDescriptor,j=b&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(E){return E instanceof TypeError}}();m.exports=j?function(E,S){if(g(E)&&!x(E,"length").writable)throw w("Cannot set read only .length");return E.length=S}:function(E,S){return E.length=S}},1589:(m,O,r)=>{var b=r(1400),g=r(6244),w=r(6135),x=Array,j=Math.max;m.exports=function(E,S,T){for(var A=g(E),R=b(S,A),I=b(T===void 0?A:T,A),$=x(j(I-R,0)),M=0;R<I;R++,M++)w($,M,E[R]);return $.length=M,$}},206:(m,O,r)=>{var b=r(1702);m.exports=b([].slice)},4362:(m,O,r)=>{var b=r(1589),g=Math.floor,w=function(E,S){var T=E.length,A=g(T/2);return T<8?x(E,S):j(E,w(b(E,0,A),S),w(b(E,A),S),S)},x=function(E,S){for(var T,A,R=E.length,I=1;I<R;){for(A=I,T=E[I];A&&S(E[A-1],T)>0;)E[A]=E[--A];A!==I++&&(E[A]=T)}return E},j=function(E,S,T,A){for(var R=S.length,I=T.length,$=0,M=0;$<R||M<I;)E[$+M]=$<R&&M<I?A(S[$],T[M])<=0?S[$++]:T[M++]:$<R?S[$++]:T[M++];return E};m.exports=w},7475:(m,O,r)=>{var b=r(3157),g=r(4411),w=r(111),x=r(5112)("species"),j=Array;m.exports=function(E){var S;return b(E)&&(S=E.constructor,(g(S)&&(S===j||b(S.prototype))||w(S)&&(S=S[x])===null)&&(S=void 0)),S===void 0?j:S}},5417:(m,O,r)=>{var b=r(7475);m.exports=function(g,w){return new(b(g))(w===0?0:w)}},3411:(m,O,r)=>{var b=r(9670),g=r(9212);m.exports=function(w,x,j,E){try{return E?x(b(j)[0],j[1]):x(j)}catch(S){g(w,"throw",S)}}},7072:(m,O,r)=>{var b=r(5112)("iterator"),g=!1;try{var w=0,x={next:function(){return{done:!!w++}},return:function(){g=!0}};x[b]=function(){return this},Array.from(x,function(){throw 2})}catch{}m.exports=function(j,E){if(!E&&!g)return!1;var S=!1;try{var T={};T[b]=function(){return{next:function(){return{done:S=!0}}}},j(T)}catch{}return S}},4326:(m,O,r)=>{var b=r(1702),g=b({}.toString),w=b("".slice);m.exports=function(x){return w(g(x),8,-1)}},648:(m,O,r)=>{var b=r(1694),g=r(614),w=r(4326),x=r(5112)("toStringTag"),j=Object,E=w(function(){return arguments}())=="Arguments";m.exports=b?w:function(S){var T,A,R;return S===void 0?"Undefined":S===null?"Null":typeof(A=function(I,$){try{return I[$]}catch{}}(T=j(S),x))=="string"?A:E?w(T):(R=w(T))=="Object"&&g(T.callee)?"Arguments":R}},9920:(m,O,r)=>{var b=r(2597),g=r(3887),w=r(1236),x=r(3070);m.exports=function(j,E,S){for(var T=g(E),A=x.f,R=w.f,I=0;I<T.length;I++){var $=T[I];b(j,$)||S&&b(S,$)||A(j,$,R(E,$))}}},4964:(m,O,r)=>{var b=r(5112)("match");m.exports=function(g){var w=/./;try{"/./"[g](w)}catch{try{return w[b]=!1,"/./"[g](w)}catch{}}return!1}},8544:(m,O,r)=>{var b=r(7293);m.exports=!b(function(){function g(){}return g.prototype.constructor=null,Object.getPrototypeOf(new g)!==g.prototype})},6178:m=>{m.exports=function(O,r){return{value:O,done:r}}},8880:(m,O,r)=>{var b=r(9781),g=r(3070),w=r(9114);m.exports=b?function(x,j,E){return g.f(x,j,w(1,E))}:function(x,j,E){return x[j]=E,x}},9114:m=>{m.exports=function(O,r){return{enumerable:!(1&O),configurable:!(2&O),writable:!(4&O),value:r}}},6135:(m,O,r)=>{var b=r(4948),g=r(3070),w=r(9114);m.exports=function(x,j,E){var S=b(j);S in x?g.f(x,S,w(0,E)):x[S]=E}},5573:(m,O,r)=>{var b=r(1702),g=r(7293),w=r(6650).start,x=RangeError,j=isFinite,E=Math.abs,S=Date.prototype,T=S.toISOString,A=b(S.getTime),R=b(S.getUTCDate),I=b(S.getUTCFullYear),$=b(S.getUTCHours),M=b(S.getUTCMilliseconds),B=b(S.getUTCMinutes),q=b(S.getUTCMonth),F=b(S.getUTCSeconds);m.exports=g(function(){return T.call(new Date(-50000000000001))!="0385-07-25T07:06:39.999Z"})||!g(function(){T.call(new Date(NaN))})?function(){if(!j(A(this)))throw x("Invalid time value");var N=this,U=I(N),H=M(N),X=U<0?"-":U>9999?"+":"";return X+w(E(U),X?6:4,0)+"-"+w(q(N)+1,2,0)+"-"+w(R(N),2,0)+"T"+w($(N),2,0)+":"+w(B(N),2,0)+":"+w(F(N),2,0)+"."+w(H,3,0)+"Z"}:T},8709:(m,O,r)=>{var b=r(9670),g=r(2140),w=TypeError;m.exports=function(x){if(b(this),x==="string"||x==="default")x="string";else if(x!=="number")throw w("Incorrect hint");return g(this,x)}},7045:(m,O,r)=>{var b=r(6339),g=r(3070);m.exports=function(w,x,j){return j.get&&b(j.get,x,{getter:!0}),j.set&&b(j.set,x,{setter:!0}),g.f(w,x,j)}},8052:(m,O,r)=>{var b=r(614),g=r(3070),w=r(6339),x=r(3072);m.exports=function(j,E,S,T){T||(T={});var A=T.enumerable,R=T.name!==void 0?T.name:E;if(b(S)&&w(S,R,T),T.global)A?j[E]=S:x(E,S);else{try{T.unsafe?j[E]&&(A=!0):delete j[E]}catch{}A?j[E]=S:g.f(j,E,{value:S,enumerable:!1,configurable:!T.nonConfigurable,writable:!T.nonWritable})}return j}},3072:(m,O,r)=>{var b=r(7854),g=Object.defineProperty;m.exports=function(w,x){try{g(b,w,{value:x,configurable:!0,writable:!0})}catch{b[w]=x}return x}},5117:(m,O,r)=>{var b=r(6330),g=TypeError;m.exports=function(w,x){if(!delete w[x])throw g("Cannot delete property "+b(x)+" of "+b(w))}},9781:(m,O,r)=>{var b=r(7293);m.exports=!b(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},4154:m=>{var O=typeof document=="object"&&document.all,r=O===void 0&&O!==void 0;m.exports={all:O,IS_HTMLDDA:r}},317:(m,O,r)=>{var b=r(7854),g=r(111),w=b.document,x=g(w)&&g(w.createElement);m.exports=function(j){return x?w.createElement(j):{}}},7207:m=>{var O=TypeError;m.exports=function(r){if(r>9007199254740991)throw O("Maximum allowed index exceeded");return r}},8324:m=>{m.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},8509:(m,O,r)=>{var b=r(317)("span").classList,g=b&&b.constructor&&b.constructor.prototype;m.exports=g===Object.prototype?void 0:g},8886:(m,O,r)=>{var b=r(8113).match(/firefox\/(\d+)/i);m.exports=!!b&&+b[1]},7871:(m,O,r)=>{var b=r(3823),g=r(5268);m.exports=!b&&!g&&typeof window=="object"&&typeof document=="object"},9363:m=>{m.exports=typeof Bun=="function"&&Bun&&typeof Bun.version=="string"},3823:m=>{m.exports=typeof Deno=="object"&&Deno&&typeof Deno.version=="object"},256:(m,O,r)=>{var b=r(8113);m.exports=/MSIE|Trident/.test(b)},1528:(m,O,r)=>{var b=r(8113);m.exports=/ipad|iphone|ipod/i.test(b)&&typeof Pebble<"u"},8334:(m,O,r)=>{var b=r(8113);m.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(b)},5268:(m,O,r)=>{var b=r(4326);m.exports=typeof process<"u"&&b(process)=="process"},1036:(m,O,r)=>{var b=r(8113);m.exports=/web0s(?!.*chrome)/i.test(b)},8113:m=>{m.exports=typeof navigator<"u"&&String(navigator.userAgent)||""},7392:(m,O,r)=>{var b,g,w=r(7854),x=r(8113),j=w.process,E=w.Deno,S=j&&j.versions||E&&E.version,T=S&&S.v8;T&&(g=(b=T.split("."))[0]>0&&b[0]<4?1:+(b[0]+b[1])),!g&&x&&(!(b=x.match(/Edge\/(\d+)/))||b[1]>=74)&&(b=x.match(/Chrome\/(\d+)/))&&(g=+b[1]),m.exports=g},8008:(m,O,r)=>{var b=r(8113).match(/AppleWebKit\/(\d+)\./);m.exports=!!b&&+b[1]},748:m=>{m.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:(m,O,r)=>{var b=r(7854),g=r(1236).f,w=r(8880),x=r(8052),j=r(3072),E=r(9920),S=r(4705);m.exports=function(T,A){var R,I,$,M,B,q=T.target,F=T.global,N=T.stat;if(R=F?b:N?b[q]||j(q,{}):(b[q]||{}).prototype)for(I in A){if(M=A[I],$=T.dontCallGetSet?(B=g(R,I))&&B.value:R[I],!S(F?I:q+(N?".":"#")+I,T.forced)&&$!==void 0){if(typeof M==typeof $)continue;E(M,$)}(T.sham||$&&$.sham)&&w(M,"sham",!0),x(R,I,M,T)}}},7293:m=>{m.exports=function(O){try{return!!O()}catch{return!0}}},7007:(m,O,r)=>{r(4916);var b=r(1470),g=r(8052),w=r(2261),x=r(7293),j=r(5112),E=r(8880),S=j("species"),T=RegExp.prototype;m.exports=function(A,R,I,$){var M=j(A),B=!x(function(){var U={};return U[M]=function(){return 7},""[A](U)!=7}),q=B&&!x(function(){var U=!1,H=/a/;return A==="split"&&((H={}).constructor={},H.constructor[S]=function(){return H},H.flags="",H[M]=/./[M]),H.exec=function(){return U=!0,null},H[M](""),!U});if(!B||!q||I){var F=b(/./[M]),N=R(M,""[A],function(U,H,X,Y,Q){var tt=b(U),it=H.exec;return it===w||it===T.exec?B&&!Q?{done:!0,value:F(H,X,Y)}:{done:!0,value:tt(X,H,Y)}:{done:!1}});g(String.prototype,A,N[0]),g(T,M,N[1])}$&&E(T[M],"sham",!0)}},2104:(m,O,r)=>{var b=r(4374),g=Function.prototype,w=g.apply,x=g.call;m.exports=typeof Reflect=="object"&&Reflect.apply||(b?x.bind(w):function(){return x.apply(w,arguments)})},9974:(m,O,r)=>{var b=r(1470),g=r(9662),w=r(4374),x=b(b.bind);m.exports=function(j,E){return g(j),E===void 0?j:w?x(j,E):function(){return j.apply(E,arguments)}}},4374:(m,O,r)=>{var b=r(7293);m.exports=!b(function(){var g=(function(){}).bind();return typeof g!="function"||g.hasOwnProperty("prototype")})},7065:(m,O,r)=>{var b=r(1702),g=r(9662),w=r(111),x=r(2597),j=r(206),E=r(4374),S=Function,T=b([].concat),A=b([].join),R={},I=function($,M,B){if(!x(R,M)){for(var q=[],F=0;F<M;F++)q[F]="a["+F+"]";R[M]=S("C,a","return new C("+A(q,",")+")")}return R[M]($,B)};m.exports=E?S.bind:function($){var M=g(this),B=M.prototype,q=j(arguments,1),F=function(){var N=T(q,j(arguments));return this instanceof F?I(M,N.length,N):M.apply($,N)};return w(B)&&(F.prototype=B),F}},6916:(m,O,r)=>{var b=r(4374),g=Function.prototype.call;m.exports=b?g.bind(g):function(){return g.apply(g,arguments)}},6530:(m,O,r)=>{var b=r(9781),g=r(2597),w=Function.prototype,x=b&&Object.getOwnPropertyDescriptor,j=g(w,"name"),E=j&&(function(){}).name==="something",S=j&&(!b||b&&x(w,"name").configurable);m.exports={EXISTS:j,PROPER:E,CONFIGURABLE:S}},5668:(m,O,r)=>{var b=r(1702),g=r(9662);m.exports=function(w,x,j){try{return b(g(Object.getOwnPropertyDescriptor(w,x)[j]))}catch{}}},1470:(m,O,r)=>{var b=r(4326),g=r(1702);m.exports=function(w){if(b(w)==="Function")return g(w)}},1702:(m,O,r)=>{var b=r(4374),g=Function.prototype,w=g.call,x=b&&g.bind.bind(w,w);m.exports=b?x:function(j){return function(){return w.apply(j,arguments)}}},5005:(m,O,r)=>{var b=r(7854),g=r(614),w=function(x){return g(x)?x:void 0};m.exports=function(x,j){return arguments.length<2?w(b[x]):b[x]&&b[x][j]}},1246:(m,O,r)=>{var b=r(648),g=r(8173),w=r(8554),x=r(7497),j=r(5112)("iterator");m.exports=function(E){if(!w(E))return g(E,j)||g(E,"@@iterator")||x[b(E)]}},4121:(m,O,r)=>{var b=r(6916),g=r(9662),w=r(9670),x=r(6330),j=r(1246),E=TypeError;m.exports=function(S,T){var A=arguments.length<2?j(S):T;if(g(A))return w(b(A,S));throw E(x(S)+" is not iterable")}},8044:(m,O,r)=>{var b=r(1702),g=r(3157),w=r(614),x=r(4326),j=r(1340),E=b([].push);m.exports=function(S){if(w(S))return S;if(g(S)){for(var T=S.length,A=[],R=0;R<T;R++){var I=S[R];typeof I=="string"?E(A,I):typeof I!="number"&&x(I)!="Number"&&x(I)!="String"||E(A,j(I))}var $=A.length,M=!0;return function(B,q){if(M)return M=!1,q;if(g(this))return q;for(var F=0;F<$;F++)if(A[F]===B)return q}}}},8173:(m,O,r)=>{var b=r(9662),g=r(8554);m.exports=function(w,x){var j=w[x];return g(j)?void 0:b(j)}},647:(m,O,r)=>{var b=r(1702),g=r(7908),w=Math.floor,x=b("".charAt),j=b("".replace),E=b("".slice),S=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,T=/\$([$&'`]|\d{1,2})/g;m.exports=function(A,R,I,$,M,B){var q=I+A.length,F=$.length,N=T;return M!==void 0&&(M=g(M),N=S),j(B,N,function(U,H){var X;switch(x(H,0)){case"$":return"$";case"&":return A;case"`":return E(R,0,I);case"'":return E(R,q);case"<":X=M[E(H,1,-1)];break;default:var Y=+H;if(Y===0)return U;if(Y>F){var Q=w(Y/10);return Q===0?U:Q<=F?$[Q-1]===void 0?x(H,1):$[Q-1]+x(H,1):U}X=$[Y-1]}return X===void 0?"":X})}},7854:(m,O,r)=>{var b=function(g){return g&&g.Math==Math&&g};m.exports=b(typeof globalThis=="object"&&globalThis)||b(typeof window=="object"&&window)||b(typeof self=="object"&&self)||b(typeof r.g=="object"&&r.g)||function(){return this}()||Function("return this")()},2597:(m,O,r)=>{var b=r(1702),g=r(7908),w=b({}.hasOwnProperty);m.exports=Object.hasOwn||function(x,j){return w(g(x),j)}},3501:m=>{m.exports={}},842:m=>{m.exports=function(O,r){try{arguments.length==1?console.error(O):console.error(O,r)}catch{}}},490:(m,O,r)=>{var b=r(5005);m.exports=b("document","documentElement")},4664:(m,O,r)=>{var b=r(9781),g=r(7293),w=r(317);m.exports=!b&&!g(function(){return Object.defineProperty(w("div"),"a",{get:function(){return 7}}).a!=7})},8361:(m,O,r)=>{var b=r(1702),g=r(7293),w=r(4326),x=Object,j=b("".split);m.exports=g(function(){return!x("z").propertyIsEnumerable(0)})?function(E){return w(E)=="String"?j(E,""):x(E)}:x},9587:(m,O,r)=>{var b=r(614),g=r(111),w=r(7674);m.exports=function(x,j,E){var S,T;return w&&b(S=j.constructor)&&S!==E&&g(T=S.prototype)&&T!==E.prototype&&w(x,T),x}},2788:(m,O,r)=>{var b=r(1702),g=r(614),w=r(5465),x=b(Function.toString);g(w.inspectSource)||(w.inspectSource=function(j){return x(j)}),m.exports=w.inspectSource},9909:(m,O,r)=>{var b,g,w,x=r(4811),j=r(7854),E=r(111),S=r(8880),T=r(2597),A=r(5465),R=r(6200),I=r(3501),$="Object already initialized",M=j.TypeError,B=j.WeakMap;if(x||A.state){var q=A.state||(A.state=new B);q.get=q.get,q.has=q.has,q.set=q.set,b=function(N,U){if(q.has(N))throw M($);return U.facade=N,q.set(N,U),U},g=function(N){return q.get(N)||{}},w=function(N){return q.has(N)}}else{var F=R("state");I[F]=!0,b=function(N,U){if(T(N,F))throw M($);return U.facade=N,S(N,F,U),U},g=function(N){return T(N,F)?N[F]:{}},w=function(N){return T(N,F)}}m.exports={set:b,get:g,has:w,enforce:function(N){return w(N)?g(N):b(N,{})},getterFor:function(N){return function(U){var H;if(!E(U)||(H=g(U)).type!==N)throw M("Incompatible receiver, "+N+" required");return H}}}},7659:(m,O,r)=>{var b=r(5112),g=r(7497),w=b("iterator"),x=Array.prototype;m.exports=function(j){return j!==void 0&&(g.Array===j||x[w]===j)}},3157:(m,O,r)=>{var b=r(4326);m.exports=Array.isArray||function(g){return b(g)=="Array"}},614:(m,O,r)=>{var b=r(4154),g=b.all;m.exports=b.IS_HTMLDDA?function(w){return typeof w=="function"||w===g}:function(w){return typeof w=="function"}},4411:(m,O,r)=>{var b=r(1702),g=r(7293),w=r(614),x=r(648),j=r(5005),E=r(2788),S=function(){},T=[],A=j("Reflect","construct"),R=/^\s*(?:class|function)\b/,I=b(R.exec),$=!R.exec(S),M=function(q){if(!w(q))return!1;try{return A(S,T,q),!0}catch{return!1}},B=function(q){if(!w(q))return!1;switch(x(q)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return $||!!I(R,E(q))}catch{return!0}};B.sham=!0,m.exports=!A||g(function(){var q;return M(M.call)||!M(Object)||!M(function(){q=!0})||q})?B:M},5032:(m,O,r)=>{var b=r(2597);m.exports=function(g){return g!==void 0&&(b(g,"value")||b(g,"writable"))}},4705:(m,O,r)=>{var b=r(7293),g=r(614),w=/#|\.prototype\./,x=function(A,R){var I=E[j(A)];return I==T||I!=S&&(g(R)?b(R):!!R)},j=x.normalize=function(A){return String(A).replace(w,".").toLowerCase()},E=x.data={},S=x.NATIVE="N",T=x.POLYFILL="P";m.exports=x},8554:m=>{m.exports=function(O){return O==null}},111:(m,O,r)=>{var b=r(614),g=r(4154),w=g.all;m.exports=g.IS_HTMLDDA?function(x){return typeof x=="object"?x!==null:b(x)||x===w}:function(x){return typeof x=="object"?x!==null:b(x)}},1913:m=>{m.exports=!1},7850:(m,O,r)=>{var b=r(111),g=r(4326),w=r(5112)("match");m.exports=function(x){var j;return b(x)&&((j=x[w])!==void 0?!!j:g(x)=="RegExp")}},2190:(m,O,r)=>{var b=r(5005),g=r(614),w=r(7976),x=r(3307),j=Object;m.exports=x?function(E){return typeof E=="symbol"}:function(E){var S=b("Symbol");return g(S)&&w(S.prototype,j(E))}},408:(m,O,r)=>{var b=r(9974),g=r(6916),w=r(9670),x=r(6330),j=r(7659),E=r(6244),S=r(7976),T=r(4121),A=r(1246),R=r(9212),I=TypeError,$=function(B,q){this.stopped=B,this.result=q},M=$.prototype;m.exports=function(B,q,F){var N,U,H,X,Y,Q,tt,it=F&&F.that,st=!(!F||!F.AS_ENTRIES),mt=!(!F||!F.IS_RECORD),ut=!(!F||!F.IS_ITERATOR),Et=!(!F||!F.INTERRUPTED),At=b(q,it),Vt=function(wt){return N&&R(N,"normal",wt),new $(!0,wt)},lt=function(wt){return st?(w(wt),Et?At(wt[0],wt[1],Vt):At(wt[0],wt[1])):Et?At(wt,Vt):At(wt)};if(mt)N=B.iterator;else if(ut)N=B;else{if(!(U=A(B)))throw I(x(B)+" is not iterable");if(j(U)){for(H=0,X=E(B);X>H;H++)if((Y=lt(B[H]))&&S(M,Y))return Y;return new $(!1)}N=T(B,U)}for(Q=mt?B.next:N.next;!(tt=g(Q,N)).done;){try{Y=lt(tt.value)}catch(wt){R(N,"throw",wt)}if(typeof Y=="object"&&Y&&S(M,Y))return Y}return new $(!1)}},9212:(m,O,r)=>{var b=r(6916),g=r(9670),w=r(8173);m.exports=function(x,j,E){var S,T;g(x);try{if(!(S=w(x,"return"))){if(j==="throw")throw E;return E}S=b(S,x)}catch(A){T=!0,S=A}if(j==="throw")throw E;if(T)throw S;return g(S),E}},3061:(m,O,r)=>{var b=r(3383).IteratorPrototype,g=r(30),w=r(9114),x=r(8003),j=r(7497),E=function(){return this};m.exports=function(S,T,A,R){var I=T+" Iterator";return S.prototype=g(b,{next:w(+!R,A)}),x(S,I,!1,!0),j[I]=E,S}},1656:(m,O,r)=>{var b=r(2109),g=r(6916),w=r(1913),x=r(6530),j=r(614),E=r(3061),S=r(9518),T=r(7674),A=r(8003),R=r(8880),I=r(8052),$=r(5112),M=r(7497),B=r(3383),q=x.PROPER,F=x.CONFIGURABLE,N=B.IteratorPrototype,U=B.BUGGY_SAFARI_ITERATORS,H=$("iterator"),X="keys",Y="values",Q="entries",tt=function(){return this};m.exports=function(it,st,mt,ut,Et,At,Vt){E(mt,st,ut);var lt,wt,_t,Ut=function(xt){if(xt===Et&&Bt)return Bt;if(!U&&xt in St)return St[xt];switch(xt){case X:case Y:case Q:return function(){return new mt(this,xt)}}return function(){return new mt(this)}},Qt=st+" Iterator",fe=!1,St=it.prototype,Ot=St[H]||St["@@iterator"]||Et&&St[Et],Bt=!U&&Ot||Ut(Et),qt=st=="Array"&&St.entries||Ot;if(qt&&(lt=S(qt.call(new it)))!==Object.prototype&<.next&&(w||S(lt)===N||(T?T(lt,N):j(lt[H])||I(lt,H,tt)),A(lt,Qt,!0,!0),w&&(M[Qt]=tt)),q&&Et==Y&&Ot&&Ot.name!==Y&&(!w&&F?R(St,"name",Y):(fe=!0,Bt=function(){return g(Ot,this)})),Et)if(wt={values:Ut(Y),keys:At?Bt:Ut(X),entries:Ut(Q)},Vt)for(_t in wt)(U||fe||!(_t in St))&&I(St,_t,wt[_t]);else b({target:st,proto:!0,forced:U||fe},wt);return w&&!Vt||St[H]===Bt||I(St,H,Bt,{name:Et}),M[st]=Bt,wt}},3383:(m,O,r)=>{var b,g,w,x=r(7293),j=r(614),E=r(111),S=r(30),T=r(9518),A=r(8052),R=r(5112),I=r(1913),$=R("iterator"),M=!1;[].keys&&("next"in(w=[].keys())?(g=T(T(w)))!==Object.prototype&&(b=g):M=!0),!E(b)||x(function(){var B={};return b[$].call(B)!==B})?b={}:I&&(b=S(b)),j(b[$])||A(b,$,function(){return this}),m.exports={IteratorPrototype:b,BUGGY_SAFARI_ITERATORS:M}},7497:m=>{m.exports={}},6244:(m,O,r)=>{var b=r(7466);m.exports=function(g){return b(g.length)}},6339:(m,O,r)=>{var b=r(1702),g=r(7293),w=r(614),x=r(2597),j=r(9781),E=r(6530).CONFIGURABLE,S=r(2788),T=r(9909),A=T.enforce,R=T.get,I=String,$=Object.defineProperty,M=b("".slice),B=b("".replace),q=b([].join),F=j&&!g(function(){return $(function(){},"length",{value:8}).length!==8}),N=String(String).split("String"),U=m.exports=function(H,X,Y){M(I(X),0,7)==="Symbol("&&(X="["+B(I(X),/^Symbol\(([^)]*)\)/,"$1")+"]"),Y&&Y.getter&&(X="get "+X),Y&&Y.setter&&(X="set "+X),(!x(H,"name")||E&&H.name!==X)&&(j?$(H,"name",{value:X,configurable:!0}):H.name=X),F&&Y&&x(Y,"arity")&&H.length!==Y.arity&&$(H,"length",{value:Y.arity});try{Y&&x(Y,"constructor")&&Y.constructor?j&&$(H,"prototype",{writable:!1}):H.prototype&&(H.prototype=void 0)}catch{}var Q=A(H);return x(Q,"source")||(Q.source=q(N,typeof X=="string"?X:"")),H};Function.prototype.toString=U(function(){return w(this)&&R(this).source||S(this)},"toString")},4758:m=>{var O=Math.ceil,r=Math.floor;m.exports=Math.trunc||function(b){var g=+b;return(g>0?r:O)(g)}},5948:(m,O,r)=>{var b,g,w,x,j,E=r(7854),S=r(9974),T=r(1236).f,A=r(261).set,R=r(8572),I=r(8334),$=r(1528),M=r(1036),B=r(5268),q=E.MutationObserver||E.WebKitMutationObserver,F=E.document,N=E.process,U=E.Promise,H=T(E,"queueMicrotask"),X=H&&H.value;if(!X){var Y=new R,Q=function(){var tt,it;for(B&&(tt=N.domain)&&tt.exit();it=Y.get();)try{it()}catch(st){throw Y.head&&b(),st}tt&&tt.enter()};I||B||M||!q||!F?!$&&U&&U.resolve?((x=U.resolve(void 0)).constructor=U,j=S(x.then,x),b=function(){j(Q)}):B?b=function(){N.nextTick(Q)}:(A=S(A,E),b=function(){A(Q)}):(g=!0,w=F.createTextNode(""),new q(Q).observe(w,{characterData:!0}),b=function(){w.data=g=!g}),X=function(tt){Y.head||b(),Y.add(tt)}}m.exports=X},8523:(m,O,r)=>{var b=r(9662),g=TypeError,w=function(x){var j,E;this.promise=new x(function(S,T){if(j!==void 0||E!==void 0)throw g("Bad Promise constructor");j=S,E=T}),this.resolve=b(j),this.reject=b(E)};m.exports.f=function(x){return new w(x)}},3929:(m,O,r)=>{var b=r(7850),g=TypeError;m.exports=function(w){if(b(w))throw g("The method doesn't accept regular expressions");return w}},2814:(m,O,r)=>{var b=r(7854),g=r(7293),w=r(1702),x=r(1340),j=r(3111).trim,E=r(1361),S=w("".charAt),T=b.parseFloat,A=b.Symbol,R=A&&A.iterator,I=1/T(E+"-0")!=-1/0||R&&!g(function(){T(Object(R))});m.exports=I?function($){var M=j(x($)),B=T(M);return B===0&&S(M,0)=="-"?-0:B}:T},3009:(m,O,r)=>{var b=r(7854),g=r(7293),w=r(1702),x=r(1340),j=r(3111).trim,E=r(1361),S=b.parseInt,T=b.Symbol,A=T&&T.iterator,R=/^[+-]?0x/i,I=w(R.exec),$=S(E+"08")!==8||S(E+"0x16")!==22||A&&!g(function(){S(Object(A))});m.exports=$?function(M,B){var q=j(x(M));return S(q,B>>>0||(I(R,q)?16:10))}:S},1574:(m,O,r)=>{var b=r(9781),g=r(1702),w=r(6916),x=r(7293),j=r(1956),E=r(5181),S=r(5296),T=r(7908),A=r(8361),R=Object.assign,I=Object.defineProperty,$=g([].concat);m.exports=!R||x(function(){if(b&&R({b:1},R(I({},"a",{enumerable:!0,get:function(){I(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var M={},B={},q=Symbol(),F="abcdefghijklmnopqrst";return M[q]=7,F.split("").forEach(function(N){B[N]=N}),R({},M)[q]!=7||j(R({},B)).join("")!=F})?function(M,B){for(var q=T(M),F=arguments.length,N=1,U=E.f,H=S.f;F>N;)for(var X,Y=A(arguments[N++]),Q=U?$(j(Y),U(Y)):j(Y),tt=Q.length,it=0;tt>it;)X=Q[it++],b&&!w(H,Y,X)||(q[X]=Y[X]);return q}:R},30:(m,O,r)=>{var b,g=r(9670),w=r(6048),x=r(748),j=r(3501),E=r(490),S=r(317),T=r(6200),A="prototype",R="script",I=T("IE_PROTO"),$=function(){},M=function(F){return"<"+R+">"+F+"</"+R+">"},B=function(F){F.write(M("")),F.close();var N=F.parentWindow.Object;return F=null,N},q=function(){try{b=new ActiveXObject("htmlfile")}catch{}var F,N,U;q=typeof document<"u"?document.domain&&b?B(b):(N=S("iframe"),U="java"+R+":",N.style.display="none",E.appendChild(N),N.src=String(U),(F=N.contentWindow.document).open(),F.write(M("document.F=Object")),F.close(),F.F):B(b);for(var H=x.length;H--;)delete q[A][x[H]];return q()};j[I]=!0,m.exports=Object.create||function(F,N){var U;return F!==null?($[A]=g(F),U=new $,$[A]=null,U[I]=F):U=q(),N===void 0?U:w.f(U,N)}},6048:(m,O,r)=>{var b=r(9781),g=r(3353),w=r(3070),x=r(9670),j=r(5656),E=r(1956);O.f=b&&!g?Object.defineProperties:function(S,T){x(S);for(var A,R=j(T),I=E(T),$=I.length,M=0;$>M;)w.f(S,A=I[M++],R[A]);return S}},3070:(m,O,r)=>{var b=r(9781),g=r(4664),w=r(3353),x=r(9670),j=r(4948),E=TypeError,S=Object.defineProperty,T=Object.getOwnPropertyDescriptor,A="enumerable",R="configurable",I="writable";O.f=b?w?function($,M,B){if(x($),M=j(M),x(B),typeof $=="function"&&M==="prototype"&&"value"in B&&I in B&&!B[I]){var q=T($,M);q&&q[I]&&($[M]=B.value,B={configurable:R in B?B[R]:q[R],enumerable:A in B?B[A]:q[A],writable:!1})}return S($,M,B)}:S:function($,M,B){if(x($),M=j(M),x(B),g)try{return S($,M,B)}catch{}if("get"in B||"set"in B)throw E("Accessors not supported");return"value"in B&&($[M]=B.value),$}},1236:(m,O,r)=>{var b=r(9781),g=r(6916),w=r(5296),x=r(9114),j=r(5656),E=r(4948),S=r(2597),T=r(4664),A=Object.getOwnPropertyDescriptor;O.f=b?A:function(R,I){if(R=j(R),I=E(I),T)try{return A(R,I)}catch{}if(S(R,I))return x(!g(w.f,R,I),R[I])}},1156:(m,O,r)=>{var b=r(4326),g=r(5656),w=r(8006).f,x=r(1589),j=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];m.exports.f=function(E){return j&&b(E)=="Window"?function(S){try{return w(S)}catch{return x(j)}}(E):w(g(E))}},8006:(m,O,r)=>{var b=r(6324),g=r(748).concat("length","prototype");O.f=Object.getOwnPropertyNames||function(w){return b(w,g)}},5181:(m,O)=>{O.f=Object.getOwnPropertySymbols},9518:(m,O,r)=>{var b=r(2597),g=r(614),w=r(7908),x=r(6200),j=r(8544),E=x("IE_PROTO"),S=Object,T=S.prototype;m.exports=j?S.getPrototypeOf:function(A){var R=w(A);if(b(R,E))return R[E];var I=R.constructor;return g(I)&&R instanceof I?I.prototype:R instanceof S?T:null}},7976:(m,O,r)=>{var b=r(1702);m.exports=b({}.isPrototypeOf)},6324:(m,O,r)=>{var b=r(1702),g=r(2597),w=r(5656),x=r(1318).indexOf,j=r(3501),E=b([].push);m.exports=function(S,T){var A,R=w(S),I=0,$=[];for(A in R)!g(j,A)&&g(R,A)&&E($,A);for(;T.length>I;)g(R,A=T[I++])&&(~x($,A)||E($,A));return $}},1956:(m,O,r)=>{var b=r(6324),g=r(748);m.exports=Object.keys||function(w){return b(w,g)}},5296:(m,O)=>{var r={}.propertyIsEnumerable,b=Object.getOwnPropertyDescriptor,g=b&&!r.call({1:2},1);O.f=g?function(w){var x=b(this,w);return!!x&&x.enumerable}:r},7674:(m,O,r)=>{var b=r(5668),g=r(9670),w=r(6077);m.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var x,j=!1,E={};try{(x=b(Object.prototype,"__proto__","set"))(E,[]),j=E instanceof Array}catch{}return function(S,T){return g(S),w(T),j?x(S,T):S.__proto__=T,S}}():void 0)},4699:(m,O,r)=>{var b=r(9781),g=r(1702),w=r(1956),x=r(5656),j=g(r(5296).f),E=g([].push),S=function(T){return function(A){for(var R,I=x(A),$=w(I),M=$.length,B=0,q=[];M>B;)R=$[B++],b&&!j(I,R)||E(q,T?[R,I[R]]:I[R]);return q}};m.exports={entries:S(!0),values:S(!1)}},288:(m,O,r)=>{var b=r(1694),g=r(648);m.exports=b?{}.toString:function(){return"[object "+g(this)+"]"}},2140:(m,O,r)=>{var b=r(6916),g=r(614),w=r(111),x=TypeError;m.exports=function(j,E){var S,T;if(E==="string"&&g(S=j.toString)&&!w(T=b(S,j))||g(S=j.valueOf)&&!w(T=b(S,j))||E!=="string"&&g(S=j.toString)&&!w(T=b(S,j)))return T;throw x("Can't convert object to primitive value")}},3887:(m,O,r)=>{var b=r(5005),g=r(1702),w=r(8006),x=r(5181),j=r(9670),E=g([].concat);m.exports=b("Reflect","ownKeys")||function(S){var T=w.f(j(S)),A=x.f;return A?E(T,A(S)):T}},857:(m,O,r)=>{var b=r(7854);m.exports=b},2534:m=>{m.exports=function(O){try{return{error:!1,value:O()}}catch(r){return{error:!0,value:r}}}},3702:(m,O,r)=>{var b=r(7854),g=r(2492),w=r(614),x=r(4705),j=r(2788),E=r(5112),S=r(7871),T=r(3823),A=r(1913),R=r(7392),I=g&&g.prototype,$=E("species"),M=!1,B=w(b.PromiseRejectionEvent),q=x("Promise",function(){var F=j(g),N=F!==String(g);if(!N&&R===66||A&&(!I.catch||!I.finally))return!0;if(!R||R<51||!/native code/.test(F)){var U=new g(function(X){X(1)}),H=function(X){X(function(){},function(){})};if((U.constructor={})[$]=H,!(M=U.then(function(){})instanceof H))return!0}return!N&&(S||T)&&!B});m.exports={CONSTRUCTOR:q,REJECTION_EVENT:B,SUBCLASSING:M}},2492:(m,O,r)=>{var b=r(7854);m.exports=b.Promise},9478:(m,O,r)=>{var b=r(9670),g=r(111),w=r(8523);m.exports=function(x,j){if(b(x),g(j)&&j.constructor===x)return j;var E=w.f(x);return(0,E.resolve)(j),E.promise}},612:(m,O,r)=>{var b=r(2492),g=r(7072),w=r(3702).CONSTRUCTOR;m.exports=w||!g(function(x){b.all(x).then(void 0,function(){})})},2626:(m,O,r)=>{var b=r(3070).f;m.exports=function(g,w,x){x in g||b(g,x,{configurable:!0,get:function(){return w[x]},set:function(j){w[x]=j}})}},8572:m=>{var O=function(){this.head=null,this.tail=null};O.prototype={add:function(r){var b={item:r,next:null},g=this.tail;g?g.next=b:this.head=b,this.tail=b},get:function(){var r=this.head;if(r)return(this.head=r.next)===null&&(this.tail=null),r.item}},m.exports=O},7651:(m,O,r)=>{var b=r(6916),g=r(9670),w=r(614),x=r(4326),j=r(2261),E=TypeError;m.exports=function(S,T){var A=S.exec;if(w(A)){var R=b(A,S,T);return R!==null&&g(R),R}if(x(S)==="RegExp")return b(j,S,T);throw E("RegExp#exec called on incompatible receiver")}},2261:(m,O,r)=>{var b,g,w=r(6916),x=r(1702),j=r(1340),E=r(7066),S=r(2999),T=r(2309),A=r(30),R=r(9909).get,I=r(9441),$=r(7168),M=T("native-string-replace",String.prototype.replace),B=RegExp.prototype.exec,q=B,F=x("".charAt),N=x("".indexOf),U=x("".replace),H=x("".slice),X=(g=/b*/g,w(B,b=/a/,"a"),w(B,g,"a"),b.lastIndex!==0||g.lastIndex!==0),Y=S.BROKEN_CARET,Q=/()??/.exec("")[1]!==void 0;(X||Q||Y||I||$)&&(q=function(tt){var it,st,mt,ut,Et,At,Vt,lt=this,wt=R(lt),_t=j(tt),Ut=wt.raw;if(Ut)return Ut.lastIndex=lt.lastIndex,it=w(q,Ut,_t),lt.lastIndex=Ut.lastIndex,it;var Qt=wt.groups,fe=Y&<.sticky,St=w(E,lt),Ot=lt.source,Bt=0,qt=_t;if(fe&&(St=U(St,"y",""),N(St,"g")===-1&&(St+="g"),qt=H(_t,lt.lastIndex),lt.lastIndex>0&&(!lt.multiline||lt.multiline&&F(_t,lt.lastIndex-1)!==`
|
|
58
|
+
`)&&(Ot="(?: "+Ot+")",qt=" "+qt,Bt++),st=new RegExp("^(?:"+Ot+")",St)),Q&&(st=new RegExp("^"+Ot+"$(?!\\s)",St)),X&&(mt=lt.lastIndex),ut=w(B,fe?st:lt,qt),fe?ut?(ut.input=H(ut.input,Bt),ut[0]=H(ut[0],Bt),ut.index=lt.lastIndex,lt.lastIndex+=ut[0].length):lt.lastIndex=0:X&&ut&&(lt.lastIndex=lt.global?ut.index+ut[0].length:mt),Q&&ut&&ut.length>1&&w(M,ut[0],st,function(){for(Et=1;Et<arguments.length-2;Et++)arguments[Et]===void 0&&(ut[Et]=void 0)}),ut&&Qt)for(ut.groups=At=A(null),Et=0;Et<Qt.length;Et++)At[(Vt=Qt[Et])[0]]=ut[Vt[1]];return ut}),m.exports=q},7066:(m,O,r)=>{var b=r(9670);m.exports=function(){var g=b(this),w="";return g.hasIndices&&(w+="d"),g.global&&(w+="g"),g.ignoreCase&&(w+="i"),g.multiline&&(w+="m"),g.dotAll&&(w+="s"),g.unicode&&(w+="u"),g.unicodeSets&&(w+="v"),g.sticky&&(w+="y"),w}},4706:(m,O,r)=>{var b=r(6916),g=r(2597),w=r(7976),x=r(7066),j=RegExp.prototype;m.exports=function(E){var S=E.flags;return S!==void 0||"flags"in j||g(E,"flags")||!w(j,E)?S:b(x,E)}},2999:(m,O,r)=>{var b=r(7293),g=r(7854).RegExp,w=b(function(){var E=g("a","y");return E.lastIndex=2,E.exec("abcd")!=null}),x=w||b(function(){return!g("a","y").sticky}),j=w||b(function(){var E=g("^r","gy");return E.lastIndex=2,E.exec("str")!=null});m.exports={BROKEN_CARET:j,MISSED_STICKY:x,UNSUPPORTED_Y:w}},9441:(m,O,r)=>{var b=r(7293),g=r(7854).RegExp;m.exports=b(function(){var w=g(".","s");return!(w.dotAll&&w.exec(`
|
|
59
|
+
`)&&w.flags==="s")})},7168:(m,O,r)=>{var b=r(7293),g=r(7854).RegExp;m.exports=b(function(){var w=g("(?<a>b)","g");return w.exec("b").groups.a!=="b"||"b".replace(w,"$<a>c")!=="bc"})},4488:(m,O,r)=>{var b=r(8554),g=TypeError;m.exports=function(w){if(b(w))throw g("Can't call method on "+w);return w}},7152:(m,O,r)=>{var b,g=r(7854),w=r(2104),x=r(614),j=r(9363),E=r(8113),S=r(206),T=r(8053),A=g.Function,R=/MSIE .\./.test(E)||j&&((b=g.Bun.version.split(".")).length<3||b[0]==0&&(b[1]<3||b[1]==3&&b[2]==0));m.exports=function(I,$){var M=$?2:1;return R?function(B,q){var F=T(arguments.length,1)>M,N=x(B)?B:A(B),U=F?S(arguments,M):[],H=F?function(){w(N,this,U)}:N;return $?I(H,q):I(H)}:I}},6340:(m,O,r)=>{var b=r(5005),g=r(7045),w=r(5112),x=r(9781),j=w("species");m.exports=function(E){var S=b(E);x&&S&&!S[j]&&g(S,j,{configurable:!0,get:function(){return this}})}},8003:(m,O,r)=>{var b=r(3070).f,g=r(2597),w=r(5112)("toStringTag");m.exports=function(x,j,E){x&&!E&&(x=x.prototype),x&&!g(x,w)&&b(x,w,{configurable:!0,value:j})}},6200:(m,O,r)=>{var b=r(2309),g=r(9711),w=b("keys");m.exports=function(x){return w[x]||(w[x]=g(x))}},5465:(m,O,r)=>{var b=r(7854),g=r(3072),w="__core-js_shared__",x=b[w]||g(w,{});m.exports=x},2309:(m,O,r)=>{var b=r(1913),g=r(5465);(m.exports=function(w,x){return g[w]||(g[w]=x!==void 0?x:{})})("versions",[]).push({version:"3.29.0",mode:b?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.29.0/LICENSE",source:"https://github.com/zloirock/core-js"})},6707:(m,O,r)=>{var b=r(9670),g=r(9483),w=r(8554),x=r(5112)("species");m.exports=function(j,E){var S,T=b(j).constructor;return T===void 0||w(S=b(T)[x])?E:g(S)}},8710:(m,O,r)=>{var b=r(1702),g=r(9303),w=r(1340),x=r(4488),j=b("".charAt),E=b("".charCodeAt),S=b("".slice),T=function(A){return function(R,I){var $,M,B=w(x(R)),q=g(I),F=B.length;return q<0||q>=F?A?"":void 0:($=E(B,q))<55296||$>56319||q+1===F||(M=E(B,q+1))<56320||M>57343?A?j(B,q):$:A?S(B,q,q+2):M-56320+($-55296<<10)+65536}};m.exports={codeAt:T(!1),charAt:T(!0)}},6650:(m,O,r)=>{var b=r(1702),g=r(7466),w=r(1340),x=r(8415),j=r(4488),E=b(x),S=b("".slice),T=Math.ceil,A=function(R){return function(I,$,M){var B,q,F=w(j(I)),N=g($),U=F.length,H=M===void 0?" ":w(M);return N<=U||H==""?F:((q=E(H,T((B=N-U)/H.length))).length>B&&(q=S(q,0,B)),R?F+q:q+F)}};m.exports={start:A(!1),end:A(!0)}},8415:(m,O,r)=>{var b=r(9303),g=r(1340),w=r(4488),x=RangeError;m.exports=function(j){var E=g(w(this)),S="",T=b(j);if(T<0||T==1/0)throw x("Wrong number of repetitions");for(;T>0;(T>>>=1)&&(E+=E))1&T&&(S+=E);return S}},6091:(m,O,r)=>{var b=r(6530).PROPER,g=r(7293),w=r(1361);m.exports=function(x){return g(function(){return!!w[x]()||"
"[x]()!=="
"||b&&w[x].name!==x})}},3111:(m,O,r)=>{var b=r(1702),g=r(4488),w=r(1340),x=r(1361),j=b("".replace),E=RegExp("^["+x+"]+"),S=RegExp("(^|[^"+x+"])["+x+"]+$"),T=function(A){return function(R){var I=w(g(R));return 1&A&&(I=j(I,E,"")),2&A&&(I=j(I,S,"$1")),I}};m.exports={start:T(1),end:T(2),trim:T(3)}},6293:(m,O,r)=>{var b=r(7392),g=r(7293);m.exports=!!Object.getOwnPropertySymbols&&!g(function(){var w=Symbol();return!String(w)||!(Object(w)instanceof Symbol)||!Symbol.sham&&b&&b<41})},6532:(m,O,r)=>{var b=r(6916),g=r(5005),w=r(5112),x=r(8052);m.exports=function(){var j=g("Symbol"),E=j&&j.prototype,S=E&&E.valueOf,T=w("toPrimitive");E&&!E[T]&&x(E,T,function(A){return b(S,this)},{arity:1})}},2015:(m,O,r)=>{var b=r(6293);m.exports=b&&!!Symbol.for&&!!Symbol.keyFor},261:(m,O,r)=>{var b,g,w,x,j=r(7854),E=r(2104),S=r(9974),T=r(614),A=r(2597),R=r(7293),I=r(490),$=r(206),M=r(317),B=r(8053),q=r(8334),F=r(5268),N=j.setImmediate,U=j.clearImmediate,H=j.process,X=j.Dispatch,Y=j.Function,Q=j.MessageChannel,tt=j.String,it=0,st={},mt="onreadystatechange";R(function(){b=j.location});var ut=function(lt){if(A(st,lt)){var wt=st[lt];delete st[lt],wt()}},Et=function(lt){return function(){ut(lt)}},At=function(lt){ut(lt.data)},Vt=function(lt){j.postMessage(tt(lt),b.protocol+"//"+b.host)};N&&U||(N=function(lt){B(arguments.length,1);var wt=T(lt)?lt:Y(lt),_t=$(arguments,1);return st[++it]=function(){E(wt,void 0,_t)},g(it),it},U=function(lt){delete st[lt]},F?g=function(lt){H.nextTick(Et(lt))}:X&&X.now?g=function(lt){X.now(Et(lt))}:Q&&!q?(x=(w=new Q).port2,w.port1.onmessage=At,g=S(x.postMessage,x)):j.addEventListener&&T(j.postMessage)&&!j.importScripts&&b&&b.protocol!=="file:"&&!R(Vt)?(g=Vt,j.addEventListener("message",At,!1)):g=mt in M("script")?function(lt){I.appendChild(M("script"))[mt]=function(){I.removeChild(this),ut(lt)}}:function(lt){setTimeout(Et(lt),0)}),m.exports={set:N,clear:U}},863:(m,O,r)=>{var b=r(1702);m.exports=b(1 .valueOf)},1400:(m,O,r)=>{var b=r(9303),g=Math.max,w=Math.min;m.exports=function(x,j){var E=b(x);return E<0?g(E+j,0):w(E,j)}},5656:(m,O,r)=>{var b=r(8361),g=r(4488);m.exports=function(w){return b(g(w))}},9303:(m,O,r)=>{var b=r(4758);m.exports=function(g){var w=+g;return w!=w||w===0?0:b(w)}},7466:(m,O,r)=>{var b=r(9303),g=Math.min;m.exports=function(w){return w>0?g(b(w),9007199254740991):0}},7908:(m,O,r)=>{var b=r(4488),g=Object;m.exports=function(w){return g(b(w))}},7593:(m,O,r)=>{var b=r(6916),g=r(111),w=r(2190),x=r(8173),j=r(2140),E=r(5112),S=TypeError,T=E("toPrimitive");m.exports=function(A,R){if(!g(A)||w(A))return A;var I,$=x(A,T);if($){if(R===void 0&&(R="default"),I=b($,A,R),!g(I)||w(I))return I;throw S("Can't convert object to primitive value")}return R===void 0&&(R="number"),j(A,R)}},4948:(m,O,r)=>{var b=r(7593),g=r(2190);m.exports=function(w){var x=b(w,"string");return g(x)?x:x+""}},1694:(m,O,r)=>{var b={};b[r(5112)("toStringTag")]="z",m.exports=String(b)==="[object z]"},1340:(m,O,r)=>{var b=r(648),g=String;m.exports=function(w){if(b(w)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return g(w)}},6330:m=>{var O=String;m.exports=function(r){try{return O(r)}catch{return"Object"}}},9711:(m,O,r)=>{var b=r(1702),g=0,w=Math.random(),x=b(1 .toString);m.exports=function(j){return"Symbol("+(j===void 0?"":j)+")_"+x(++g+w,36)}},3307:(m,O,r)=>{var b=r(6293);m.exports=b&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},3353:(m,O,r)=>{var b=r(9781),g=r(7293);m.exports=b&&g(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42})},8053:m=>{var O=TypeError;m.exports=function(r,b){if(r<b)throw O("Not enough arguments");return r}},4811:(m,O,r)=>{var b=r(7854),g=r(614),w=b.WeakMap;m.exports=g(w)&&/native code/.test(String(w))},6800:(m,O,r)=>{var b=r(857),g=r(2597),w=r(6061),x=r(3070).f;m.exports=function(j){var E=b.Symbol||(b.Symbol={});g(E,j)||x(E,j,{value:w.f(j)})}},6061:(m,O,r)=>{var b=r(5112);O.f=b},5112:(m,O,r)=>{var b=r(7854),g=r(2309),w=r(2597),x=r(9711),j=r(6293),E=r(3307),S=b.Symbol,T=g("wks"),A=E?S.for||S:S&&S.withoutSetter||x;m.exports=function(R){return w(T,R)||(T[R]=j&&w(S,R)?S[R]:A("Symbol."+R)),T[R]}},1361:m=>{m.exports=`
|
|
60
|
+
\v\f\r \u2028\u2029\uFEFF`},2222:(m,O,r)=>{var b=r(2109),g=r(7293),w=r(3157),x=r(111),j=r(7908),E=r(6244),S=r(7207),T=r(6135),A=r(5417),R=r(1194),I=r(5112),$=r(7392),M=I("isConcatSpreadable"),B=$>=51||!g(function(){var F=[];return F[M]=!1,F.concat()[0]!==F}),q=function(F){if(!x(F))return!1;var N=F[M];return N!==void 0?!!N:w(F)};b({target:"Array",proto:!0,arity:1,forced:!B||!R("concat")},{concat:function(F){var N,U,H,X,Y,Q=j(this),tt=A(Q,0),it=0;for(N=-1,H=arguments.length;N<H;N++)if(q(Y=N===-1?Q:arguments[N]))for(X=E(Y),S(it+X),U=0;U<X;U++,it++)U in Y&&T(tt,it,Y[U]);else S(it+1),T(tt,it++,Y);return tt.length=it,tt}})},6541:(m,O,r)=>{var b=r(2109),g=r(2092).every;b({target:"Array",proto:!0,forced:!r(9341)("every")},{every:function(w){return g(this,w,arguments.length>1?arguments[1]:void 0)}})},7327:(m,O,r)=>{var b=r(2109),g=r(2092).filter;b({target:"Array",proto:!0,forced:!r(1194)("filter")},{filter:function(w){return g(this,w,arguments.length>1?arguments[1]:void 0)}})},9826:(m,O,r)=>{var b=r(2109),g=r(2092).find,w=r(1223),x="find",j=!0;x in[]&&Array(1)[x](function(){j=!1}),b({target:"Array",proto:!0,forced:j},{find:function(E){return g(this,E,arguments.length>1?arguments[1]:void 0)}}),w(x)},9554:(m,O,r)=>{var b=r(2109),g=r(8533);b({target:"Array",proto:!0,forced:[].forEach!=g},{forEach:g})},1038:(m,O,r)=>{var b=r(2109),g=r(8457);b({target:"Array",stat:!0,forced:!r(7072)(function(w){Array.from(w)})},{from:g})},6699:(m,O,r)=>{var b=r(2109),g=r(1318).includes,w=r(7293),x=r(1223);b({target:"Array",proto:!0,forced:w(function(){return!Array(1).includes()})},{includes:function(j){return g(this,j,arguments.length>1?arguments[1]:void 0)}}),x("includes")},2772:(m,O,r)=>{var b=r(2109),g=r(1470),w=r(1318).indexOf,x=r(9341),j=g([].indexOf),E=!!j&&1/j([1],1,-0)<0;b({target:"Array",proto:!0,forced:E||!x("indexOf")},{indexOf:function(S){var T=arguments.length>1?arguments[1]:void 0;return E?j(this,S,T)||0:w(this,S,T)}})},9753:(m,O,r)=>{r(2109)({target:"Array",stat:!0},{isArray:r(3157)})},6992:(m,O,r)=>{var b=r(5656),g=r(1223),w=r(7497),x=r(9909),j=r(3070).f,E=r(1656),S=r(6178),T=r(1913),A=r(9781),R="Array Iterator",I=x.set,$=x.getterFor(R);m.exports=E(Array,"Array",function(B,q){I(this,{type:R,target:b(B),index:0,kind:q})},function(){var B=$(this),q=B.target,F=B.kind,N=B.index++;return!q||N>=q.length?(B.target=void 0,S(void 0,!0)):S(F=="keys"?N:F=="values"?q[N]:[N,q[N]],!1)},"values");var M=w.Arguments=w.Array;if(g("keys"),g("values"),g("entries"),!T&&A&&M.name!=="values")try{j(M,"name",{value:"values"})}catch{}},9600:(m,O,r)=>{var b=r(2109),g=r(1702),w=r(8361),x=r(5656),j=r(9341),E=g([].join);b({target:"Array",proto:!0,forced:w!=Object||!j("join",",")},{join:function(S){return E(x(this),S===void 0?",":S)}})},1249:(m,O,r)=>{var b=r(2109),g=r(2092).map;b({target:"Array",proto:!0,forced:!r(1194)("map")},{map:function(w){return g(this,w,arguments.length>1?arguments[1]:void 0)}})},5827:(m,O,r)=>{var b=r(2109),g=r(3671).left,w=r(9341),x=r(7392);b({target:"Array",proto:!0,forced:!r(5268)&&x>79&&x<83||!w("reduce")},{reduce:function(j){var E=arguments.length;return g(this,j,E,E>1?arguments[1]:void 0)}})},5069:(m,O,r)=>{var b=r(2109),g=r(1702),w=r(3157),x=g([].reverse),j=[1,2];b({target:"Array",proto:!0,forced:String(j)===String(j.reverse())},{reverse:function(){return w(this)&&(this.length=this.length),x(this)}})},7042:(m,O,r)=>{var b=r(2109),g=r(3157),w=r(4411),x=r(111),j=r(1400),E=r(6244),S=r(5656),T=r(6135),A=r(5112),R=r(1194),I=r(206),$=R("slice"),M=A("species"),B=Array,q=Math.max;b({target:"Array",proto:!0,forced:!$},{slice:function(F,N){var U,H,X,Y=S(this),Q=E(Y),tt=j(F,Q),it=j(N===void 0?Q:N,Q);if(g(Y)&&(U=Y.constructor,(w(U)&&(U===B||g(U.prototype))||x(U)&&(U=U[M])===null)&&(U=void 0),U===B||U===void 0))return I(Y,tt,it);for(H=new(U===void 0?B:U)(q(it-tt,0)),X=0;tt<it;tt++,X++)tt in Y&&T(H,X,Y[tt]);return H.length=X,H}})},5212:(m,O,r)=>{var b=r(2109),g=r(2092).some;b({target:"Array",proto:!0,forced:!r(9341)("some")},{some:function(w){return g(this,w,arguments.length>1?arguments[1]:void 0)}})},2707:(m,O,r)=>{var b=r(2109),g=r(1702),w=r(9662),x=r(7908),j=r(6244),E=r(5117),S=r(1340),T=r(7293),A=r(4362),R=r(9341),I=r(8886),$=r(256),M=r(7392),B=r(8008),q=[],F=g(q.sort),N=g(q.push),U=T(function(){q.sort(void 0)}),H=T(function(){q.sort(null)}),X=R("sort"),Y=!T(function(){if(M)return M<70;if(!(I&&I>3)){if($)return!0;if(B)return B<603;var Q,tt,it,st,mt="";for(Q=65;Q<76;Q++){switch(tt=String.fromCharCode(Q),Q){case 66:case 69:case 70:case 72:it=3;break;case 68:case 71:it=4;break;default:it=2}for(st=0;st<47;st++)q.push({k:tt+st,v:it})}for(q.sort(function(ut,Et){return Et.v-ut.v}),st=0;st<q.length;st++)tt=q[st].k.charAt(0),mt.charAt(mt.length-1)!==tt&&(mt+=tt);return mt!=="DGBEFHACIJK"}});b({target:"Array",proto:!0,forced:U||!H||!X||!Y},{sort:function(Q){Q!==void 0&&w(Q);var tt=x(this);if(Y)return Q===void 0?F(tt):F(tt,Q);var it,st,mt=[],ut=j(tt);for(st=0;st<ut;st++)st in tt&&N(mt,tt[st]);for(A(mt,function(Et){return function(At,Vt){return Vt===void 0?-1:At===void 0?1:Et!==void 0?+Et(At,Vt)||0:S(At)>S(Vt)?1:-1}}(Q)),it=j(mt),st=0;st<it;)tt[st]=mt[st++];for(;st<ut;)E(tt,st++);return tt}})},561:(m,O,r)=>{var b=r(2109),g=r(7908),w=r(1400),x=r(9303),j=r(6244),E=r(3658),S=r(7207),T=r(5417),A=r(6135),R=r(5117),I=r(1194)("splice"),$=Math.max,M=Math.min;b({target:"Array",proto:!0,forced:!I},{splice:function(B,q){var F,N,U,H,X,Y,Q=g(this),tt=j(Q),it=w(B,tt),st=arguments.length;for(st===0?F=N=0:st===1?(F=0,N=tt-it):(F=st-2,N=M($(x(q),0),tt-it)),S(tt+F-N),U=T(Q,N),H=0;H<N;H++)(X=it+H)in Q&&A(U,H,Q[X]);if(U.length=N,F<N){for(H=it;H<tt-N;H++)Y=H+F,(X=H+N)in Q?Q[Y]=Q[X]:R(Q,Y);for(H=tt;H>tt-N+F;H--)R(Q,H-1)}else if(F>N)for(H=tt-N;H>it;H--)Y=H+F-1,(X=H+N-1)in Q?Q[Y]=Q[X]:R(Q,Y);for(H=0;H<F;H++)Q[H+it]=arguments[H+2];return E(Q,tt-N+F),U}})},3843:(m,O,r)=>{var b=r(2109),g=r(1702),w=Date,x=g(w.prototype.getTime);b({target:"Date",stat:!0},{now:function(){return x(new w)}})},8733:(m,O,r)=>{var b=r(2109),g=r(5573);b({target:"Date",proto:!0,forced:Date.prototype.toISOString!==g},{toISOString:g})},6078:(m,O,r)=>{var b=r(2597),g=r(8052),w=r(8709),x=r(5112)("toPrimitive"),j=Date.prototype;b(j,x)||g(j,x,w)},3710:(m,O,r)=>{var b=r(1702),g=r(8052),w=Date.prototype,x="Invalid Date",j="toString",E=b(w[j]),S=b(w.getTime);String(new Date(NaN))!=x&&g(w,j,function(){var T=S(this);return T==T?E(this):x})},4812:(m,O,r)=>{var b=r(2109),g=r(7065);b({target:"Function",proto:!0,forced:Function.bind!==g},{bind:g})},8309:(m,O,r)=>{var b=r(9781),g=r(6530).EXISTS,w=r(1702),x=r(7045),j=Function.prototype,E=w(j.toString),S=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,T=w(S.exec);b&&!g&&x(j,"name",{configurable:!0,get:function(){try{return T(S,E(this))[1]}catch{return""}}})},8862:(m,O,r)=>{var b=r(2109),g=r(5005),w=r(2104),x=r(6916),j=r(1702),E=r(7293),S=r(614),T=r(2190),A=r(206),R=r(8044),I=r(6293),$=String,M=g("JSON","stringify"),B=j(/./.exec),q=j("".charAt),F=j("".charCodeAt),N=j("".replace),U=j(1 .toString),H=/[\uD800-\uDFFF]/g,X=/^[\uD800-\uDBFF]$/,Y=/^[\uDC00-\uDFFF]$/,Q=!I||E(function(){var mt=g("Symbol")();return M([mt])!="[null]"||M({a:mt})!="{}"||M(Object(mt))!="{}"}),tt=E(function(){return M("\uDF06\uD834")!=='"\\udf06\\ud834"'||M("\uDEAD")!=='"\\udead"'}),it=function(mt,ut){var Et=A(arguments),At=R(ut);if(S(At)||mt!==void 0&&!T(mt))return Et[1]=function(Vt,lt){if(S(At)&&(lt=x(At,this,$(Vt),lt)),!T(lt))return lt},w(M,null,Et)},st=function(mt,ut,Et){var At=q(Et,ut-1),Vt=q(Et,ut+1);return B(X,mt)&&!B(Y,Vt)||B(Y,mt)&&!B(X,At)?"\\u"+U(F(mt,0),16):mt};M&&b({target:"JSON",stat:!0,arity:3,forced:Q||tt},{stringify:function(mt,ut,Et){var At=A(arguments),Vt=w(Q?it:M,null,At);return tt&&typeof Vt=="string"?N(Vt,H,st):Vt}})},3706:(m,O,r)=>{var b=r(7854);r(8003)(b.JSON,"JSON",!0)},2703:(m,O,r)=>{r(8003)(Math,"Math",!0)},9653:(m,O,r)=>{var b=r(2109),g=r(1913),w=r(9781),x=r(7854),j=r(857),E=r(1702),S=r(4705),T=r(2597),A=r(9587),R=r(7976),I=r(2190),$=r(7593),M=r(7293),B=r(8006).f,q=r(1236).f,F=r(3070).f,N=r(863),U=r(3111).trim,H="Number",X=x[H],Y=j[H],Q=X.prototype,tt=x.TypeError,it=E("".slice),st=E("".charCodeAt),mt=function(wt){var _t=$(wt,"number");return typeof _t=="bigint"?_t:ut(_t)},ut=function(wt){var _t,Ut,Qt,fe,St,Ot,Bt,qt,xt=$(wt,"number");if(I(xt))throw tt("Cannot convert a Symbol value to a number");if(typeof xt=="string"&&xt.length>2){if(xt=U(xt),(_t=st(xt,0))===43||_t===45){if((Ut=st(xt,2))===88||Ut===120)return NaN}else if(_t===48){switch(st(xt,1)){case 66:case 98:Qt=2,fe=49;break;case 79:case 111:Qt=8,fe=55;break;default:return+xt}for(Ot=(St=it(xt,2)).length,Bt=0;Bt<Ot;Bt++)if((qt=st(St,Bt))<48||qt>fe)return NaN;return parseInt(St,Qt)}}return+xt},Et=S(H,!X(" 0o1")||!X("0b1")||X("+0x1")),At=function(wt){return R(Q,wt)&&M(function(){N(wt)})},Vt=function(wt){var _t=arguments.length<1?0:X(mt(wt));return At(this)?A(Object(_t),this,Vt):_t};Vt.prototype=Q,Et&&!g&&(Q.constructor=Vt),b({global:!0,constructor:!0,wrap:!0,forced:Et},{Number:Vt});var lt=function(wt,_t){for(var Ut,Qt=w?B(_t):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),fe=0;Qt.length>fe;fe++)T(_t,Ut=Qt[fe])&&!T(wt,Ut)&&F(wt,Ut,q(_t,Ut))};g&&Y&<(j[H],Y),(Et||g)&<(j[H],X)},6977:(m,O,r)=>{var b=r(2109),g=r(1702),w=r(9303),x=r(863),j=r(8415),E=r(7293),S=RangeError,T=String,A=Math.floor,R=g(j),I=g("".slice),$=g(1 .toFixed),M=function(N,U,H){return U===0?H:U%2==1?M(N,U-1,H*N):M(N*N,U/2,H)},B=function(N,U,H){for(var X=-1,Y=H;++X<6;)Y+=U*N[X],N[X]=Y%1e7,Y=A(Y/1e7)},q=function(N,U){for(var H=6,X=0;--H>=0;)X+=N[H],N[H]=A(X/U),X=X%U*1e7},F=function(N){for(var U=6,H="";--U>=0;)if(H!==""||U===0||N[U]!==0){var X=T(N[U]);H=H===""?X:H+R("0",7-X.length)+X}return H};b({target:"Number",proto:!0,forced:E(function(){return $(8e-5,3)!=="0.000"||$(.9,0)!=="1"||$(1.255,2)!=="1.25"||$(0xde0b6b3a7640080,0)!=="1000000000000000128"})||!E(function(){$({})})},{toFixed:function(N){var U,H,X,Y,Q=x(this),tt=w(N),it=[0,0,0,0,0,0],st="",mt="0";if(tt<0||tt>20)throw S("Incorrect fraction digits");if(Q!=Q)return"NaN";if(Q<=-1e21||Q>=1e21)return T(Q);if(Q<0&&(st="-",Q=-Q),Q>1e-21)if(H=(U=function(ut){for(var Et=0,At=ut;At>=4096;)Et+=12,At/=4096;for(;At>=2;)Et+=1,At/=2;return Et}(Q*M(2,69,1))-69)<0?Q*M(2,-U,1):Q/M(2,U,1),H*=4503599627370496,(U=52-U)>0){for(B(it,0,H),X=tt;X>=7;)B(it,1e7,0),X-=7;for(B(it,M(10,X,1),0),X=U-1;X>=23;)q(it,8388608),X-=23;q(it,1<<X),B(it,1,1),q(it,2),mt=F(it)}else B(it,0,H),B(it,1<<-U,0),mt=F(it)+R("0",tt);return tt>0?st+((Y=mt.length)<=tt?"0."+R("0",tt-Y)+mt:I(mt,0,Y-tt)+"."+I(mt,Y-tt)):st+mt}})},9601:(m,O,r)=>{var b=r(2109),g=r(1574);b({target:"Object",stat:!0,arity:2,forced:Object.assign!==g},{assign:g})},8011:(m,O,r)=>{r(2109)({target:"Object",stat:!0,sham:!r(9781)},{create:r(30)})},3321:(m,O,r)=>{var b=r(2109),g=r(9781),w=r(6048).f;b({target:"Object",stat:!0,forced:Object.defineProperties!==w,sham:!g},{defineProperties:w})},9070:(m,O,r)=>{var b=r(2109),g=r(9781),w=r(3070).f;b({target:"Object",stat:!0,forced:Object.defineProperty!==w,sham:!g},{defineProperty:w})},9720:(m,O,r)=>{var b=r(2109),g=r(4699).entries;b({target:"Object",stat:!0},{entries:function(w){return g(w)}})},5003:(m,O,r)=>{var b=r(2109),g=r(7293),w=r(5656),x=r(1236).f,j=r(9781);b({target:"Object",stat:!0,forced:!j||g(function(){x(1)}),sham:!j},{getOwnPropertyDescriptor:function(E,S){return x(w(E),S)}})},9337:(m,O,r)=>{var b=r(2109),g=r(9781),w=r(3887),x=r(5656),j=r(1236),E=r(6135);b({target:"Object",stat:!0,sham:!g},{getOwnPropertyDescriptors:function(S){for(var T,A,R=x(S),I=j.f,$=w(R),M={},B=0;$.length>B;)(A=I(R,T=$[B++]))!==void 0&&E(M,T,A);return M}})},9660:(m,O,r)=>{var b=r(2109),g=r(6293),w=r(7293),x=r(5181),j=r(7908);b({target:"Object",stat:!0,forced:!g||w(function(){x.f(1)})},{getOwnPropertySymbols:function(E){var S=x.f;return S?S(j(E)):[]}})},489:(m,O,r)=>{var b=r(2109),g=r(7293),w=r(7908),x=r(9518),j=r(8544);b({target:"Object",stat:!0,forced:g(function(){x(1)}),sham:!j},{getPrototypeOf:function(E){return x(w(E))}})},7941:(m,O,r)=>{var b=r(2109),g=r(7908),w=r(1956);b({target:"Object",stat:!0,forced:r(7293)(function(){w(1)})},{keys:function(x){return w(g(x))}})},8304:(m,O,r)=>{r(2109)({target:"Object",stat:!0},{setPrototypeOf:r(7674)})},1539:(m,O,r)=>{var b=r(1694),g=r(8052),w=r(288);b||g(Object.prototype,"toString",w,{unsafe:!0})},6833:(m,O,r)=>{var b=r(2109),g=r(4699).values;b({target:"Object",stat:!0},{values:function(w){return g(w)}})},4678:(m,O,r)=>{var b=r(2109),g=r(2814);b({global:!0,forced:parseFloat!=g},{parseFloat:g})},1058:(m,O,r)=>{var b=r(2109),g=r(3009);b({global:!0,forced:parseInt!=g},{parseInt:g})},821:(m,O,r)=>{var b=r(2109),g=r(6916),w=r(9662),x=r(8523),j=r(2534),E=r(408);b({target:"Promise",stat:!0,forced:r(612)},{all:function(S){var T=this,A=x.f(T),R=A.resolve,I=A.reject,$=j(function(){var M=w(T.resolve),B=[],q=0,F=1;E(S,function(N){var U=q++,H=!1;F++,g(M,T,N).then(function(X){H||(H=!0,B[U]=X,--F||R(B))},I)}),--F||R(B)});return $.error&&I($.value),A.promise}})},4164:(m,O,r)=>{var b=r(2109),g=r(1913),w=r(3702).CONSTRUCTOR,x=r(2492),j=r(5005),E=r(614),S=r(8052),T=x&&x.prototype;if(b({target:"Promise",proto:!0,forced:w,real:!0},{catch:function(R){return this.then(void 0,R)}}),!g&&E(x)){var A=j("Promise").prototype.catch;T.catch!==A&&S(T,"catch",A,{unsafe:!0})}},3401:(m,O,r)=>{var b,g,w,x=r(2109),j=r(1913),E=r(5268),S=r(7854),T=r(6916),A=r(8052),R=r(7674),I=r(8003),$=r(6340),M=r(9662),B=r(614),q=r(111),F=r(5787),N=r(6707),U=r(261).set,H=r(5948),X=r(842),Y=r(2534),Q=r(8572),tt=r(9909),it=r(2492),st=r(3702),mt=r(8523),ut="Promise",Et=st.CONSTRUCTOR,At=st.REJECTION_EVENT,Vt=st.SUBCLASSING,lt=tt.getterFor(ut),wt=tt.set,_t=it&&it.prototype,Ut=it,Qt=_t,fe=S.TypeError,St=S.document,Ot=S.process,Bt=mt.f,qt=Bt,xt=!!(St&&St.createEvent&&S.dispatchEvent),sr="unhandledrejection",de=function(ot){var bt;return!(!q(ot)||!B(bt=ot.then))&&bt},Ne=function(ot,bt){var Ht,Mt,Kt,Ze=bt.value,Qe=bt.state==1,_r=Qe?ot.ok:ot.fail,Ke=ot.resolve,pr=ot.reject,Se=ot.domain;try{_r?(Qe||(bt.rejection===2&&Le(bt),bt.rejection=1),_r===!0?Ht=Ze:(Se&&Se.enter(),Ht=_r(Ze),Se&&(Se.exit(),Kt=!0)),Ht===ot.promise?pr(fe("Promise-chain cycle")):(Mt=de(Ht))?T(Mt,Ht,Ke,pr):Ke(Ht)):pr(Ze)}catch(Dn){Se&&!Kt&&Se.exit(),pr(Dn)}},_e=function(ot,bt){ot.notified||(ot.notified=!0,H(function(){for(var Ht,Mt=ot.reactions;Ht=Mt.get();)Ne(Ht,ot);ot.notified=!1,bt&&!ot.rejection&&Ae(ot)}))},lr=function(ot,bt,Ht){var Mt,Kt;xt?((Mt=St.createEvent("Event")).promise=bt,Mt.reason=Ht,Mt.initEvent(ot,!1,!0),S.dispatchEvent(Mt)):Mt={promise:bt,reason:Ht},!At&&(Kt=S["on"+ot])?Kt(Mt):ot===sr&&X("Unhandled promise rejection",Ht)},Ae=function(ot){T(U,S,function(){var bt,Ht=ot.facade,Mt=ot.value;if(hr(ot)&&(bt=Y(function(){E?Ot.emit("unhandledRejection",Mt,Ht):lr(sr,Ht,Mt)}),ot.rejection=E||hr(ot)?2:1,bt.error))throw bt.value})},hr=function(ot){return ot.rejection!==1&&!ot.parent},Le=function(ot){T(U,S,function(){var bt=ot.facade;E?Ot.emit("rejectionHandled",bt):lr("rejectionhandled",bt,ot.value)})},We=function(ot,bt,Ht){return function(Mt){ot(bt,Mt,Ht)}},Ce=function(ot,bt,Ht){ot.done||(ot.done=!0,Ht&&(ot=Ht),ot.value=bt,ot.state=2,_e(ot,!0))},dr=function(ot,bt,Ht){if(!ot.done){ot.done=!0,Ht&&(ot=Ht);try{if(ot.facade===bt)throw fe("Promise can't be resolved itself");var Mt=de(bt);Mt?H(function(){var Kt={done:!1};try{T(Mt,bt,We(dr,Kt,ot),We(Ce,Kt,ot))}catch(Ze){Ce(Kt,Ze,ot)}}):(ot.value=bt,ot.state=1,_e(ot,!1))}catch(Kt){Ce({done:!1},Kt,ot)}}};if(Et&&(Qt=(Ut=function(ot){F(this,Qt),M(ot),T(b,this);var bt=lt(this);try{ot(We(dr,bt),We(Ce,bt))}catch(Ht){Ce(bt,Ht)}}).prototype,(b=function(ot){wt(this,{type:ut,done:!1,notified:!1,parent:!1,reactions:new Q,rejection:!1,state:0,value:void 0})}).prototype=A(Qt,"then",function(ot,bt){var Ht=lt(this),Mt=Bt(N(this,Ut));return Ht.parent=!0,Mt.ok=!B(ot)||ot,Mt.fail=B(bt)&&bt,Mt.domain=E?Ot.domain:void 0,Ht.state==0?Ht.reactions.add(Mt):H(function(){Ne(Mt,Ht)}),Mt.promise}),g=function(){var ot=new b,bt=lt(ot);this.promise=ot,this.resolve=We(dr,bt),this.reject=We(Ce,bt)},mt.f=Bt=function(ot){return ot===Ut||ot===void 0?new g(ot):qt(ot)},!j&&B(it)&&_t!==Object.prototype)){w=_t.then,Vt||A(_t,"then",function(ot,bt){var Ht=this;return new Ut(function(Mt,Kt){T(w,Ht,Mt,Kt)}).then(ot,bt)},{unsafe:!0});try{delete _t.constructor}catch{}R&&R(_t,Qt)}x({global:!0,constructor:!0,wrap:!0,forced:Et},{Promise:Ut}),I(Ut,ut,!1,!0),$(ut)},8674:(m,O,r)=>{r(3401),r(821),r(4164),r(6027),r(683),r(6294)},6027:(m,O,r)=>{var b=r(2109),g=r(6916),w=r(9662),x=r(8523),j=r(2534),E=r(408);b({target:"Promise",stat:!0,forced:r(612)},{race:function(S){var T=this,A=x.f(T),R=A.reject,I=j(function(){var $=w(T.resolve);E(S,function(M){g($,T,M).then(A.resolve,R)})});return I.error&&R(I.value),A.promise}})},683:(m,O,r)=>{var b=r(2109),g=r(6916),w=r(8523);b({target:"Promise",stat:!0,forced:r(3702).CONSTRUCTOR},{reject:function(x){var j=w.f(this);return g(j.reject,void 0,x),j.promise}})},6294:(m,O,r)=>{var b=r(2109),g=r(5005),w=r(1913),x=r(2492),j=r(3702).CONSTRUCTOR,E=r(9478),S=g("Promise"),T=w&&!j;b({target:"Promise",stat:!0,forced:w||j},{resolve:function(A){return E(T&&this===S?x:this,A)}})},2419:(m,O,r)=>{var b=r(2109),g=r(5005),w=r(2104),x=r(7065),j=r(9483),E=r(9670),S=r(111),T=r(30),A=r(7293),R=g("Reflect","construct"),I=Object.prototype,$=[].push,M=A(function(){function F(){}return!(R(function(){},[],F)instanceof F)}),B=!A(function(){R(function(){})}),q=M||B;b({target:"Reflect",stat:!0,forced:q,sham:q},{construct:function(F,N){j(F),E(N);var U=arguments.length<3?F:j(arguments[2]);if(B&&!M)return R(F,N,U);if(F==U){switch(N.length){case 0:return new F;case 1:return new F(N[0]);case 2:return new F(N[0],N[1]);case 3:return new F(N[0],N[1],N[2]);case 4:return new F(N[0],N[1],N[2],N[3])}var H=[null];return w($,H,N),new(w(x,F,H))}var X=U.prototype,Y=T(S(X)?X:I),Q=w(F,Y,N);return S(Q)?Q:Y}})},4819:(m,O,r)=>{var b=r(2109),g=r(6916),w=r(111),x=r(9670),j=r(5032),E=r(1236),S=r(9518);b({target:"Reflect",stat:!0},{get:function T(A,R){var I,$,M=arguments.length<3?A:arguments[2];return x(A)===M?A[R]:(I=E.f(A,R))?j(I)?I.value:I.get===void 0?void 0:g(I.get,M):w($=S(A))?T($,R,M):void 0}})},4603:(m,O,r)=>{var b=r(9781),g=r(7854),w=r(1702),x=r(4705),j=r(9587),E=r(8880),S=r(8006).f,T=r(7976),A=r(7850),R=r(1340),I=r(4706),$=r(2999),M=r(2626),B=r(8052),q=r(7293),F=r(2597),N=r(9909).enforce,U=r(6340),H=r(5112),X=r(9441),Y=r(7168),Q=H("match"),tt=g.RegExp,it=tt.prototype,st=g.SyntaxError,mt=w(it.exec),ut=w("".charAt),Et=w("".replace),At=w("".indexOf),Vt=w("".slice),lt=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,wt=/a/g,_t=/a/g,Ut=new tt(wt)!==wt,Qt=$.MISSED_STICKY,fe=$.UNSUPPORTED_Y;if(x("RegExp",b&&(!Ut||Qt||X||Y||q(function(){return _t[Q]=!1,tt(wt)!=wt||tt(_t)==_t||tt(wt,"i")!="/a/i"})))){for(var St=function(qt,xt){var sr,de,Ne,_e,lr,Ae,hr=T(it,this),Le=A(qt),We=xt===void 0,Ce=[],dr=qt;if(!hr&&Le&&We&&qt.constructor===St)return qt;if((Le||T(it,qt))&&(qt=qt.source,We&&(xt=I(dr))),qt=qt===void 0?"":R(qt),xt=xt===void 0?"":R(xt),dr=qt,X&&"dotAll"in wt&&(de=!!xt&&At(xt,"s")>-1)&&(xt=Et(xt,/s/g,"")),sr=xt,Qt&&"sticky"in wt&&(Ne=!!xt&&At(xt,"y")>-1)&&fe&&(xt=Et(xt,/y/g,"")),Y&&(_e=function(ot){for(var bt,Ht=ot.length,Mt=0,Kt="",Ze=[],Qe={},_r=!1,Ke=!1,pr=0,Se="";Mt<=Ht;Mt++){if((bt=ut(ot,Mt))==="\\")bt+=ut(ot,++Mt);else if(bt==="]")_r=!1;else if(!_r)switch(!0){case bt==="[":_r=!0;break;case bt==="(":mt(lt,Vt(ot,Mt+1))&&(Mt+=2,Ke=!0),Kt+=bt,pr++;continue;case(bt===">"&&Ke):if(Se===""||F(Qe,Se))throw new st("Invalid capture group name");Qe[Se]=!0,Ze[Ze.length]=[Se,pr],Ke=!1,Se="";continue}Ke?Se+=bt:Kt+=bt}return[Kt,Ze]}(qt),qt=_e[0],Ce=_e[1]),lr=j(tt(qt,xt),hr?this:it,St),(de||Ne||Ce.length)&&(Ae=N(lr),de&&(Ae.dotAll=!0,Ae.raw=St(function(ot){for(var bt,Ht=ot.length,Mt=0,Kt="",Ze=!1;Mt<=Ht;Mt++)(bt=ut(ot,Mt))!=="\\"?Ze||bt!=="."?(bt==="["?Ze=!0:bt==="]"&&(Ze=!1),Kt+=bt):Kt+="[\\s\\S]":Kt+=bt+ut(ot,++Mt);return Kt}(qt),sr)),Ne&&(Ae.sticky=!0),Ce.length&&(Ae.groups=Ce)),qt!==dr)try{E(lr,"source",dr===""?"(?:)":dr)}catch{}return lr},Ot=S(tt),Bt=0;Ot.length>Bt;)M(St,tt,Ot[Bt++]);it.constructor=St,St.prototype=it,B(g,"RegExp",St,{constructor:!0})}U("RegExp")},4916:(m,O,r)=>{var b=r(2109),g=r(2261);b({target:"RegExp",proto:!0,forced:/./.exec!==g},{exec:g})},9714:(m,O,r)=>{var b=r(6530).PROPER,g=r(8052),w=r(9670),x=r(1340),j=r(7293),E=r(4706),S="toString",T=RegExp.prototype[S],A=j(function(){return T.call({source:"a",flags:"b"})!="/a/b"}),R=b&&T.name!=S;(A||R)&&g(RegExp.prototype,S,function(){var I=w(this);return"/"+x(I.source)+"/"+x(E(I))},{unsafe:!0})},2023:(m,O,r)=>{var b=r(2109),g=r(1702),w=r(3929),x=r(4488),j=r(1340),E=r(4964),S=g("".indexOf);b({target:"String",proto:!0,forced:!E("includes")},{includes:function(T){return!!~S(j(x(this)),j(w(T)),arguments.length>1?arguments[1]:void 0)}})},8783:(m,O,r)=>{var b=r(8710).charAt,g=r(1340),w=r(9909),x=r(1656),j=r(6178),E="String Iterator",S=w.set,T=w.getterFor(E);x(String,"String",function(A){S(this,{type:E,string:g(A),index:0})},function(){var A,R=T(this),I=R.string,$=R.index;return $>=I.length?j(void 0,!0):(A=b(I,$),R.index+=A.length,j(A,!1))})},4723:(m,O,r)=>{var b=r(6916),g=r(7007),w=r(9670),x=r(8554),j=r(7466),E=r(1340),S=r(4488),T=r(8173),A=r(1530),R=r(7651);g("match",function(I,$,M){return[function(B){var q=S(this),F=x(B)?void 0:T(B,I);return F?b(F,B,q):new RegExp(B)[I](E(q))},function(B){var q=w(this),F=E(B),N=M($,q,F);if(N.done)return N.value;if(!q.global)return R(q,F);var U=q.unicode;q.lastIndex=0;for(var H,X=[],Y=0;(H=R(q,F))!==null;){var Q=E(H[0]);X[Y]=Q,Q===""&&(q.lastIndex=A(F,j(q.lastIndex),U)),Y++}return Y===0?null:X}]})},5306:(m,O,r)=>{var b=r(2104),g=r(6916),w=r(1702),x=r(7007),j=r(7293),E=r(9670),S=r(614),T=r(8554),A=r(9303),R=r(7466),I=r(1340),$=r(4488),M=r(1530),B=r(8173),q=r(647),F=r(7651),N=r(5112)("replace"),U=Math.max,H=Math.min,X=w([].concat),Y=w([].push),Q=w("".indexOf),tt=w("".slice),it="a".replace(/./,"$0")==="$0",st=!!/./[N]&&/./[N]("a","$0")==="";x("replace",function(mt,ut,Et){var At=st?"$":"$0";return[function(Vt,lt){var wt=$(this),_t=T(Vt)?void 0:B(Vt,N);return _t?g(_t,Vt,wt,lt):g(ut,I(wt),Vt,lt)},function(Vt,lt){var wt=E(this),_t=I(Vt);if(typeof lt=="string"&&Q(lt,At)===-1&&Q(lt,"$<")===-1){var Ut=Et(ut,wt,_t,lt);if(Ut.done)return Ut.value}var Qt=S(lt);Qt||(lt=I(lt));var fe=wt.global;if(fe){var St=wt.unicode;wt.lastIndex=0}for(var Ot=[];;){var Bt=F(wt,_t);if(Bt===null||(Y(Ot,Bt),!fe))break;I(Bt[0])===""&&(wt.lastIndex=M(_t,R(wt.lastIndex),St))}for(var qt,xt="",sr=0,de=0;de<Ot.length;de++){for(var Ne=I((Bt=Ot[de])[0]),_e=U(H(A(Bt.index),_t.length),0),lr=[],Ae=1;Ae<Bt.length;Ae++)Y(lr,(qt=Bt[Ae])===void 0?qt:String(qt));var hr=Bt.groups;if(Qt){var Le=X([Ne],lr,_e,_t);hr!==void 0&&Y(Le,hr);var We=I(b(lt,void 0,Le))}else We=q(Ne,_t,_e,lr,hr,lt);_e>=sr&&(xt+=tt(_t,sr,_e)+We,sr=_e+Ne.length)}return xt+tt(_t,sr)}]},!!j(function(){var mt=/./;return mt.exec=function(){var ut=[];return ut.groups={a:"7"},ut},"".replace(mt,"$<a>")!=="7"})||!it||st)},6755:(m,O,r)=>{var b,g=r(2109),w=r(1470),x=r(1236).f,j=r(7466),E=r(1340),S=r(3929),T=r(4488),A=r(4964),R=r(1913),I=w("".startsWith),$=w("".slice),M=Math.min,B=A("startsWith");g({target:"String",proto:!0,forced:!(!R&&!B&&(b=x(String.prototype,"startsWith"),b&&!b.writable)||B)},{startsWith:function(q){var F=E(T(this));S(q);var N=j(M(arguments.length>1?arguments[1]:void 0,F.length)),U=E(q);return I?I(F,U,N):$(F,N,N+U.length)===U}})},3210:(m,O,r)=>{var b=r(2109),g=r(3111).trim;b({target:"String",proto:!0,forced:r(6091)("trim")},{trim:function(){return g(this)}})},2443:(m,O,r)=>{r(6800)("asyncIterator")},4032:(m,O,r)=>{var b=r(2109),g=r(7854),w=r(6916),x=r(1702),j=r(1913),E=r(9781),S=r(6293),T=r(7293),A=r(2597),R=r(7976),I=r(9670),$=r(5656),M=r(4948),B=r(1340),q=r(9114),F=r(30),N=r(1956),U=r(8006),H=r(1156),X=r(5181),Y=r(1236),Q=r(3070),tt=r(6048),it=r(5296),st=r(8052),mt=r(7045),ut=r(2309),Et=r(6200),At=r(3501),Vt=r(9711),lt=r(5112),wt=r(6061),_t=r(6800),Ut=r(6532),Qt=r(8003),fe=r(9909),St=r(2092).forEach,Ot=Et("hidden"),Bt="Symbol",qt="prototype",xt=fe.set,sr=fe.getterFor(Bt),de=Object[qt],Ne=g.Symbol,_e=Ne&&Ne[qt],lr=g.TypeError,Ae=g.QObject,hr=Y.f,Le=Q.f,We=H.f,Ce=it.f,dr=x([].push),ot=ut("symbols"),bt=ut("op-symbols"),Ht=ut("wks"),Mt=!Ae||!Ae[qt]||!Ae[qt].findChild,Kt=E&&T(function(){return F(Le({},"a",{get:function(){return Le(this,"a",{value:7}).a}})).a!=7})?function(Nt,te,Xt){var le=hr(de,te);le&&delete de[te],Le(Nt,te,Xt),le&&Nt!==de&&Le(de,te,le)}:Le,Ze=function(Nt,te){var Xt=ot[Nt]=F(_e);return xt(Xt,{type:Bt,tag:Nt,description:te}),E||(Xt.description=te),Xt},Qe=function(Nt,te,Xt){Nt===de&&Qe(bt,te,Xt),I(Nt);var le=M(te);return I(Xt),A(ot,le)?(Xt.enumerable?(A(Nt,Ot)&&Nt[Ot][le]&&(Nt[Ot][le]=!1),Xt=F(Xt,{enumerable:q(0,!1)})):(A(Nt,Ot)||Le(Nt,Ot,q(1,{})),Nt[Ot][le]=!0),Kt(Nt,le,Xt)):Le(Nt,le,Xt)},_r=function(Nt,te){I(Nt);var Xt=$(te),le=N(Xt).concat(Dn(Xt));return St(le,function(ze){E&&!w(Ke,Xt,ze)||Qe(Nt,ze,Xt[ze])}),Nt},Ke=function(Nt){var te=M(Nt),Xt=w(Ce,this,te);return!(this===de&&A(ot,te)&&!A(bt,te))&&(!(Xt||!A(this,te)||!A(ot,te)||A(this,Ot)&&this[Ot][te])||Xt)},pr=function(Nt,te){var Xt=$(Nt),le=M(te);if(Xt!==de||!A(ot,le)||A(bt,le)){var ze=hr(Xt,le);return!ze||!A(ot,le)||A(Xt,Ot)&&Xt[Ot][le]||(ze.enumerable=!0),ze}},Se=function(Nt){var te=We($(Nt)),Xt=[];return St(te,function(le){A(ot,le)||A(At,le)||dr(Xt,le)}),Xt},Dn=function(Nt){var te=Nt===de,Xt=We(te?bt:$(Nt)),le=[];return St(Xt,function(ze){!A(ot,ze)||te&&!A(de,ze)||dr(le,ot[ze])}),le};S||(st(_e=(Ne=function(){if(R(_e,this))throw lr("Symbol is not a constructor");var Nt=arguments.length&&arguments[0]!==void 0?B(arguments[0]):void 0,te=Vt(Nt),Xt=function(le){this===de&&w(Xt,bt,le),A(this,Ot)&&A(this[Ot],te)&&(this[Ot][te]=!1),Kt(this,te,q(1,le))};return E&&Mt&&Kt(de,te,{configurable:!0,set:Xt}),Ze(te,Nt)})[qt],"toString",function(){return sr(this).tag}),st(Ne,"withoutSetter",function(Nt){return Ze(Vt(Nt),Nt)}),it.f=Ke,Q.f=Qe,tt.f=_r,Y.f=pr,U.f=H.f=Se,X.f=Dn,wt.f=function(Nt){return Ze(lt(Nt),Nt)},E&&(mt(_e,"description",{configurable:!0,get:function(){return sr(this).description}}),j||st(de,"propertyIsEnumerable",Ke,{unsafe:!0}))),b({global:!0,constructor:!0,wrap:!0,forced:!S,sham:!S},{Symbol:Ne}),St(N(Ht),function(Nt){_t(Nt)}),b({target:Bt,stat:!0,forced:!S},{useSetter:function(){Mt=!0},useSimple:function(){Mt=!1}}),b({target:"Object",stat:!0,forced:!S,sham:!E},{create:function(Nt,te){return te===void 0?F(Nt):_r(F(Nt),te)},defineProperty:Qe,defineProperties:_r,getOwnPropertyDescriptor:pr}),b({target:"Object",stat:!0,forced:!S},{getOwnPropertyNames:Se}),Ut(),Qt(Ne,Bt),At[Ot]=!0},1817:(m,O,r)=>{var b=r(2109),g=r(9781),w=r(7854),x=r(1702),j=r(2597),E=r(614),S=r(7976),T=r(1340),A=r(7045),R=r(9920),I=w.Symbol,$=I&&I.prototype;if(g&&E(I)&&(!("description"in $)||I().description!==void 0)){var M={},B=function(){var Y=arguments.length<1||arguments[0]===void 0?void 0:T(arguments[0]),Q=S($,this)?new I(Y):Y===void 0?I():I(Y);return Y===""&&(M[Q]=!0),Q};R(B,I),B.prototype=$,$.constructor=B;var q=String(I("test"))=="Symbol(test)",F=x($.valueOf),N=x($.toString),U=/^Symbol\((.*)\)[^)]+$/,H=x("".replace),X=x("".slice);A($,"description",{configurable:!0,get:function(){var Y=F(this);if(j(M,Y))return"";var Q=N(Y),tt=q?X(Q,7,-1):H(Q,U,"$1");return tt===""?void 0:tt}}),b({global:!0,constructor:!0,forced:!0},{Symbol:B})}},763:(m,O,r)=>{var b=r(2109),g=r(5005),w=r(2597),x=r(1340),j=r(2309),E=r(2015),S=j("string-to-symbol-registry"),T=j("symbol-to-string-registry");b({target:"Symbol",stat:!0,forced:!E},{for:function(A){var R=x(A);if(w(S,R))return S[R];var I=g("Symbol")(R);return S[R]=I,T[I]=R,I}})},2165:(m,O,r)=>{r(6800)("iterator")},2526:(m,O,r)=>{r(4032),r(763),r(6620),r(8862),r(9660)},6620:(m,O,r)=>{var b=r(2109),g=r(2597),w=r(2190),x=r(6330),j=r(2309),E=r(2015),S=j("symbol-to-string-registry");b({target:"Symbol",stat:!0,forced:!E},{keyFor:function(T){if(!w(T))throw TypeError(x(T)+" is not a symbol");if(g(S,T))return S[T]}})},6649:(m,O,r)=>{var b=r(6800),g=r(6532);b("toPrimitive"),g()},3680:(m,O,r)=>{var b=r(5005),g=r(6800),w=r(8003);g("toStringTag"),w(b("Symbol"),"Symbol")},4747:(m,O,r)=>{var b=r(7854),g=r(8324),w=r(8509),x=r(8533),j=r(8880),E=function(T){if(T&&T.forEach!==x)try{j(T,"forEach",x)}catch{T.forEach=x}};for(var S in g)g[S]&&E(b[S]&&b[S].prototype);E(w)},3948:(m,O,r)=>{var b=r(7854),g=r(8324),w=r(8509),x=r(6992),j=r(8880),E=r(5112),S=E("iterator"),T=E("toStringTag"),A=x.values,R=function($,M){if($){if($[S]!==A)try{j($,S,A)}catch{$[S]=A}if($[T]||j($,T,M),g[M]){for(var B in x)if($[B]!==x[B])try{j($,B,x[B])}catch{$[B]=x[B]}}}};for(var I in g)R(b[I]&&b[I].prototype,I);R(w,"DOMTokenList")},6815:(m,O,r)=>{var b=r(2109),g=r(7854),w=r(7152)(g.setInterval,!0);b({global:!0,bind:!0,forced:g.setInterval!==w},{setInterval:w})},8417:(m,O,r)=>{var b=r(2109),g=r(7854),w=r(7152)(g.setTimeout,!0);b({global:!0,bind:!0,forced:g.setTimeout!==w},{setTimeout:w})},2564:(m,O,r)=>{r(6815),r(8417)}},v={};function k(m){var O=v[m];if(O!==void 0)return O.exports;var r=v[m]={exports:{}};return p[m](r,r.exports,k),r.exports}k.d=(m,O)=>{for(var r in O)k.o(O,r)&&!k.o(m,r)&&Object.defineProperty(m,r,{enumerable:!0,get:O[r]})},k.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),k.o=(m,O)=>Object.prototype.hasOwnProperty.call(m,O),k.r=m=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(m,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(m,"__esModule",{value:!0})};var C={};return(()=>{k.r(C),k.d(C,{JSONEditor:()=>Tn}),k(3710),k(1539),k(9714),k(5827),k(6833),k(9826),k(9554),k(4747),k(7941),k(2222),k(9601),k(6649),k(6078),k(2526),k(1817),k(9653),k(9070),k(8674),k(2165),k(6992),k(8783),k(3948),k(2443),k(3680),k(3706),k(2703),k(8011),k(489),k(8309),k(8304),k(5069),k(7042),k(9753),k(1038),k(4916),k(9720),k(5306),k(4603),k(6699);var m=["actionscript","batchfile","c","c++","cpp","coffee","csharp","css","dart","django","ejs","erlang","golang","groovy","handlebars","haskell","haxe","html","ini","jade","java","javascript","json","less","lisp","lua","makefile","matlab","mysql","objectivec","pascal","perl","pgsql","php","python","prql","r","ruby","rust","sass","scala","scss","sh","smarty","sql","sqlserver","stylus","svg","typescript","twig","vbscript","xml","yaml","zig"],O=[function(u){return u.type==="string"&&u.format==="color"&&"colorpicker"},function(u){return u.type==="string"&&["ip","ipv4","ipv6","hostname"].includes(u.format)&&"ip"},function(u){return u.type==="string"&&m.includes(u.format)&&"ace"},function(u){return u.type==="string"&&["xhtml","bbcode"].includes(u.format)&&"sceditor"},function(u){return u.type==="string"&&u.format==="markdown"&&"simplemde"},function(u){return u.type==="string"&&u.format==="jodit"&&"jodit"},function(u){return u.type==="string"&&u.format==="autocomplete"&&"autocomplete"},function(u){return u.type==="string"&&u.format==="uuid"&&"uuid"},function(u){return u.format==="info"&&"info"},function(u){return u.format==="button"&&"button"},function(u){if((u.type==="integer"||u.type==="number")&&u.format==="stepper")return"stepper"},function(u){if(u.links){for(var n=0;n<u.links.length;n++)if(u.links[n].rel&&u.links[n].rel.toLowerCase()==="describedby")return"describedBy"}},function(u){return["string","integer"].includes(u.type)&&["starrating","rating"].includes(u.format)&&"starrating"},function(u){return["string","integer"].includes(u.type)&&["date","time","datetime-local"].includes(u.format)&&"datetime"},function(u){return(u.oneOf||u.anyOf)&&"multiple"},function(u){return u.if&&"multiple"},function(u,n){if(u.items&&(u.items=n.expandSchema(u.items)),u.type==="array"&&u.items&&!Array.isArray(u.items)&&["string","number","integer"].includes(u.items.type)){if(u.format==="choices")return"arrayChoices";if(u.uniqueItems){if(u.format==="selectize")return"arraySelectize";if(u.format==="select2")return"arraySelect2";if(u.items.enum)return"multiselect"}}},function(u){if(u.enum){if(u.type==="array"||u.type==="object")return"enum";if(u.type==="number"||u.type==="integer"||u.type==="string")return u.format==="radio"?"radio":u.format==="select2"?"select2":u.format==="selectize"?"selectize":u.format==="choices"?"choices":"select"}},function(u){if(u.enumSource)return u.format==="radio"?"radio":u.format==="select2"?"select2":u.format==="selectize"?"selectize":u.format==="choices"?"choices":"select"},function(u){return u.type==="array"&&u.format==="table"&&"table"},function(u){return u.type==="string"&&u.format==="url"&&window.FileReader&&u.options&&u.options.upload===Object(u.options.upload)&&"upload"},function(u){return u.type==="string"&&u.media&&u.media.binaryEncoding==="base64"&&"base64"},function(u){return u.type==="any"&&"multiple"},function(u){if(u.type==="boolean")return u.format==="checkbox"||u.options&&u.options.checkbox?"checkbox":u.format==="select2"?"select2":u.format==="selectize"?"selectize":u.format==="choices"?"choices":"select"},function(u){return u.type==="string"&&u.format==="signature"&&"signature"},function(u){return typeof u.type=="string"&&u.type},function(u){return!u.type&&u.properties&&"object"},function(u){return typeof u.type!="string"&&"multiple"}];function r(u,n,f){return(n=function(i){var h=function(a,s){if(b(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(b(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i);return b(h)==="symbol"?h:String(h)}(n))in u?Object.defineProperty(u,n,{value:f,enumerable:!0,configurable:!0,writable:!0}):u[n]=f,u}function b(u){return b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},b(u)}function g(u){return!(u===null||b(u)!=="object"||u.nodeType||u===u.window||u.constructor&&!S(u.constructor.prototype,"isPrototypeOf"))}function w(u){return g(u)?x({},u):Array.isArray(u)?u.map(w):u}function x(u){for(var n=arguments.length,f=new Array(n>1?n-1:0),i=1;i<n;i++)f[i-1]=arguments[i];return f.forEach(function(h){h&&Object.keys(h).forEach(function(a){h[a]&&g(h[a])?(S(u,a)||(u[a]={}),x(u[a],h[a])):Array.isArray(h[a])?u[a]=w(h[a]):u[a]=h[a]})}),u}function j(u,n){var f=document.createEvent("HTMLEvents");f.initEvent(n,!0,!0),u.dispatchEvent(f)}function E(u){return u&&(u.toString()==="[object ShadowRoot]"?u:E(u.parentNode))}function S(u,n){return u&&Object.prototype.hasOwnProperty.call(u,n)}k(4812),k(2419),k(4819),k(5003),k(4723),k(2023),k(9600),k(6755),k(5212),k(1249),k(4678),k(1058);var T=/^\s*(-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,A=/^\s*(-|\+)?(\d+)\s*$/;function R(){var u=new Date().getTime();return typeof performance<"u"&&typeof performance.now=="function"&&(u+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){var f=(u+16*Math.random())%16|0;return u=Math.floor(u/16),(n==="x"?f:3&f|8).toString(16)})}function I(u){return u&&b(u)==="object"&&!Array.isArray(u)}function $(u){for(var n=arguments.length,f=new Array(n>1?n-1:0),i=1;i<n;i++)f[i-1]=arguments[i];if(!f.length)return u;var h=f.shift();if(I(u)&&I(h))for(var a in h)I(h[a])?(u[a]||Object.assign(u,r({},a,{})),$(u[a],h[a])):Object.assign(u,r({},a,h[a]));return $.apply(void 0,[u].concat(f))}function M(u,n){(n==null||n>u.length)&&(n=u.length);for(var f=0,i=new Array(n);f<n;f++)i[f]=u[f];return i}function B(u){return B=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},B(u)}function q(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(B(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(B(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),B(h)==="symbol"?h:String(h)),i)}var h}var F=function(){function u(i,h){(function(a,s){if(!(a instanceof s))throw new TypeError("Cannot call a class as a function")})(this,u),this.defaults=h,this.jsoneditor=i.jsoneditor,this.theme=this.jsoneditor.theme,this.template_engine=this.jsoneditor.template,this.iconlib=this.jsoneditor.iconlib,this.translate=this.jsoneditor.translate||this.defaults.translate,this.translateProperty=this.jsoneditor.translateProperty||this.defaults.translateProperty,this.original_schema=i.schema,this.schema=this.jsoneditor.expandSchema(this.original_schema),this.active=!0,this.options=x({},this.options||{},this.schema.options||{},i.schema.options||{},i),this.formname=this.jsoneditor.options.form_name_root||"root",i.path||this.schema.id||(this.schema.id=this.formname),this.path=i.path||this.formname,this.formname=i.formname||this.path.replace(/\.([^.]+)/g,"[$1]"),this.parent=i.parent,this.key=this.parent!==void 0?this.path.split(".").slice(this.parent.path.split(".").length).join("."):this.path,this.link_watchers=[],this.watchLoop=!1,i.container&&this.setContainer(i.container),this.registerDependencies()}var n,f;return n=u,f=[{key:"onChildEditorChange",value:function(i){this.onChange(!0)}},{key:"notify",value:function(){this.path&&this.jsoneditor.notifyWatchers(this.path)}},{key:"change",value:function(){this.parent?this.parent.onChildEditorChange(this):this.jsoneditor&&this.jsoneditor.onChange()}},{key:"onChange",value:function(i){this.notify(),this.watch_listener&&this.watch_listener(),i&&this.change()}},{key:"register",value:function(){this.jsoneditor.registerEditor(this),this.onChange()}},{key:"unregister",value:function(){this.jsoneditor&&this.jsoneditor.unregisterEditor(this)}},{key:"getNumColumns",value:function(){return 12}},{key:"isActive",value:function(){return this.active}},{key:"activate",value:function(){this.active=!0,this.optInCheckbox.checked=!0,this.enable(),this.change()}},{key:"deactivate",value:function(){this.isRequired()||(this.active=!1,this.optInCheckbox.checked=!1,this.disable(),this.change())}},{key:"registerDependencies",value:function(){var i=this;this.dependenciesFulfilled=!0;var h=this.options.dependencies;h&&Object.keys(h).forEach(function(a){var s;a.startsWith(i.jsoneditor.root.path)?s=a:((s=i.path.split("."))[s.length-1]=a,s=s.join(".")),i.jsoneditor.watch(s,function(){i.evaluateDependencies()})})}},{key:"evaluateDependencies",value:function(){var i=this,h=this.container||this.control;if(h&&this.jsoneditor!==null){var a=this.options.dependencies;if(a){var s=this.dependenciesFulfilled;this.dependenciesFulfilled=!0,Object.keys(a).forEach(function(e){var o;e.startsWith(i.jsoneditor.root.path)?o=e:((o=i.path.split("."))[o.length-1]=e,o=o.join("."));var c=a[e];i.checkDependency(o,c)}),this.dependenciesFulfilled!==s&&this.notify();var t=this.dependenciesFulfilled?"block":"none";this.options.hidden&&(t="none"),h.tagName==="TD"?Object.keys(h.childNodes).forEach(function(e){return h.childNodes[e].style.display=t}):h.style.display=t}}}},{key:"checkDependency",value:function(i,h){var a=this;if(this.path!==i&&this.jsoneditor!==null){var s=this.jsoneditor.getEditor(i),t=s?s.getValue():void 0;s&&s.dependenciesFulfilled?Array.isArray(h)?this.dependenciesFulfilled=h.some(function(e){if(JSON.stringify(t)===JSON.stringify(e))return!0}):B(h)==="object"?B(t)!=="object"?this.dependenciesFulfilled=h===t:Object.keys(h).some(function(e){return!!S(h,e)&&(S(t,e)&&h[e]===t[e]?void 0:(a.dependenciesFulfilled=!1,!0))}):typeof h=="string"||typeof h=="number"?this.dependenciesFulfilled=this.dependenciesFulfilled&&t===h:typeof h=="boolean"&&(this.dependenciesFulfilled=h?this.dependenciesFulfilled&&(t||t.length>0):this.dependenciesFulfilled&&(!t||t.length===0)):this.dependenciesFulfilled=!1}}},{key:"setContainer",value:function(i){this.container=i,this.setContainerAttributes(),this.schema.id&&this.container.setAttribute("data-schemaid",this.schema.id),this.schema.type&&typeof this.schema.type=="string"&&this.container.setAttribute("data-schematype",this.schema.type),this.container.setAttribute("data-schemapath",this.path)}},{key:"setOptInCheckbox",value:function(i){var h=this;this.optInCheckbox=document.createElement("input"),this.optInCheckbox.setAttribute("type","checkbox"),this.optInCheckbox.setAttribute("style","margin: 0 10px 0 0;"),this.optInCheckbox.classList.add("json-editor-opt-in"),this.optInCheckbox.addEventListener("click",function(){h.isActive()?h.deactivate():h.activate()});var a=this.jsoneditor.options.show_opt_in,s=this.parent.options.show_opt_in!==void 0,t=s&&this.parent.options.show_opt_in===!0,e=s&&this.parent.options.show_opt_in===!1;(t||!e&&a||!s&&a)&&this.parent&&this.parent.schema.type==="object"&&!this.isRequired()&&this.header&&(this.header.appendChild(this.optInCheckbox),this.header.insertBefore(this.optInCheckbox,this.header.firstChild))}},{key:"preBuild",value:function(){}},{key:"build",value:function(){}},{key:"postBuild",value:function(){this.setupWatchListeners(),this.addLinks(),this.register(),this.setValue(this.getDefault(),!0),this.updateHeaderText(),this.onWatchedFieldChange()}},{key:"setupWatchListeners",value:function(){var i=this;if(this.watched={},this.schema.vars&&(this.schema.watch=this.schema.vars),this.watched_values={},this.watch_listener=function(){i.refreshWatchedFieldValues()&&i.onWatchedFieldChange()},S(this.schema,"watch")){var h,a,s,t,e,o=this.container.getAttribute("data-schemapath");Object.keys(this.schema.watch).forEach(function(c){if(h=i.schema.watch[c],Array.isArray(h)){if(h.length<2)return;a=[h[0]].concat(h[1].split("."))}else a=h.split("."),i.theme.closest(i.container,'[data-schemaid="'.concat(a[0],'"]'))||a.unshift("#");if((s=a.shift())==="#"&&(s=i.jsoneditor.schema.id||i.jsoneditor.root.formname),!(t=i.theme.closest(i.container,'[data-schemaid="'.concat(s,'"]'))))throw new Error("Could not find ancestor node with id ".concat(s));e="".concat(t.getAttribute("data-schemapath"),".").concat(a.join(".")),o.startsWith(e)&&(i.watchLoop=!0),i.jsoneditor.watch(e,i.watch_listener),i.watched[c]=e})}this.schema.headerTemplate&&(this.header_template=this.jsoneditor.compileTemplate(this.schema.headerTemplate,this.template_engine))}},{key:"addLinks",value:function(){if(!this.no_link_holder&&(this.link_holder=this.theme.getLinksHolder(),this.description!==void 0?this.description.parentNode.insertBefore(this.link_holder,this.description):this.container.appendChild(this.link_holder),this.schema.links))for(var i=0;i<this.schema.links.length;i++)this.addLink(this.getLink(this.schema.links[i]))}},{key:"onMove",value:function(){}},{key:"getButton",value:function(i,h,a){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[],t="json-editor-btn-".concat(h);h=this.iconlib?this.iconlib.getIcon(h):null,i=this.translate(i,s),a=this.translate(a,s),!h&&a&&(i=a,a=null);var e=this.theme.getButton(i,h,a);return e.classList.add(t),e}},{key:"setButtonText",value:function(i,h,a,s){var t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:[];return a=this.iconlib?this.iconlib.getIcon(a):null,h=this.translate(h,t),s=this.translate(s,t),!a&&s&&(h=s,s=null),this.theme.setButtonText(i,h,a,s)}},{key:"addLink",value:function(i){this.link_holder&&this.link_holder.appendChild(i)}},{key:"getLink",value:function(i){var h,a,s=(i.mediaType||"application/javascript").split("/")[0],t=this.jsoneditor.compileTemplate(i.href,this.template_engine),e=this.jsoneditor.compileTemplate(i.rel?i.rel:i.href,this.template_engine),o=null;if(i.download&&(o=i.download),o&&o!==!0&&(o=this.jsoneditor.compileTemplate(o,this.template_engine)),s==="image"){h=this.theme.getBlockLinkHolder(),(a=document.createElement("a")).setAttribute("target","_blank");var c=document.createElement("img");this.theme.createImageLink(h,a,c),this.link_watchers.push(function(_){var P=t(_),D=e(_);a.setAttribute("href",P),a.setAttribute("title",D||P),c.setAttribute("src",P)})}else if(["audio","video"].includes(s)){h=this.theme.getBlockLinkHolder(),(a=this.theme.getBlockLink()).setAttribute("target","_blank");var d=document.createElement(s);d.setAttribute("controls","controls"),this.theme.createMediaLink(h,a,d),this.link_watchers.push(function(_){var P=t(_),D=e(_);a.setAttribute("href",P),a.textContent=D||P,d.setAttribute("src",P)})}else a=h=this.theme.getBlockLink(),h.setAttribute("target","_blank"),h.textContent=i.rel,h.style.display="none",this.link_watchers.push(function(_){var P=t(_),D=e(_);P&&(h.style.display=""),h.setAttribute("href",P),h.textContent=D||P});return o&&a&&(o===!0?a.setAttribute("download",""):this.link_watchers.push(function(_){a.setAttribute("download",o(_))})),i.class&&a.classList.add(i.class),h}},{key:"refreshWatchedFieldValues",value:function(){var i=this;if(this.watched_values){var h={},a=!1;return this.watched&&Object.keys(this.watched).forEach(function(s){var t=i.jsoneditor.getEditor(i.watched[s]),e=t?t.getValue():null;i.watched_values[s]!==e&&(a=!0),h[s]=e}),h.self=this.getValue(),this.watched_values.self!==h.self&&(a=!0),this.watched_values=h,a}}},{key:"getWatchedFieldValues",value:function(){return this.watched_values}},{key:"updateHeaderText",value:function(){if(this.header){var i=this.getHeaderText();if(this.header.children.length){for(var h=0;h<this.header.childNodes.length;h++)if(this.header.childNodes[h].nodeType===3){this.header.childNodes[h].nodeValue=this.cleanText(i);break}}else window.DOMPurify?this.header.innerHTML=window.DOMPurify.sanitize(i):this.header.textContent=this.cleanText(i)}}},{key:"getHeaderText",value:function(i){return this.header_text?this.header_text:i?this.translateProperty(this.schema.title):this.getTitle()}},{key:"getPathDepth",value:function(){return this.path.split(".").length}},{key:"cleanText",value:function(i){var h=document.createElement("div");return h.innerHTML=i,h.textContent||h.innerText}},{key:"onWatchedFieldChange",value:function(){var i;if(this.header_template){i=x(this.getWatchedFieldValues(),{key:this.key,i:this.key,i0:1*this.key,i1:1*this.key+1,title:this.getTitle()});var h=this.header_template(i);h!==this.header_text&&(this.header_text=h,this.updateHeaderText(),this.notify())}if(this.link_watchers.length){i=this.getWatchedFieldValues();for(var a=0;a<this.link_watchers.length;a++)this.link_watchers[a](i)}}},{key:"setValue",value:function(i){this.value=i}},{key:"getValue",value:function(){if(this.dependenciesFulfilled)return this.value}},{key:"refreshValue",value:function(){}},{key:"getChildEditors",value:function(){return!1}},{key:"destroy",value:function(){var i=this;this.unregister(this),this.watched&&Object.values(this.watched).forEach(function(h){return i.jsoneditor.unwatch(h,i.watch_listener)}),this.watched=null,this.watched_values=null,this.watch_listener=null,this.header_text=null,this.header_template=null,this.value=null,this.container&&this.container.parentNode&&this.container.parentNode.removeChild(this.container),this.container=null,this.jsoneditor=null,this.schema=null,this.path=null,this.key=null,this.parent=null}},{key:"isDefaultRequired",value:function(){return this.isRequired()||!!this.jsoneditor.options.use_default_values}},{key:"getDefault",value:function(){if(this.schema.default!==void 0)return this.schema.default;if(this.schema.enum!==void 0)return this.schema.enum[0];var i=this.schema.type||this.schema.oneOf;if(i&&Array.isArray(i)&&(i=i[0]),i&&B(i)==="object"&&(i=i.type),i&&Array.isArray(i)&&(i=i[0]),typeof i=="string"){if(i==="number")return this.isDefaultRequired()?0:void 0;if(i==="boolean")return!this.isDefaultRequired()&&void 0;if(i==="integer")return this.isDefaultRequired()?0:void 0;if(i==="string")return this.isDefaultRequired()?"":void 0;if(i==="null")return null;if(i==="object")return{};if(i==="array")return[]}}},{key:"getTitle",value:function(){return this.translateProperty(this.schema.title||this.key)}},{key:"enable",value:function(){this.disabled=!1}},{key:"disable",value:function(){this.disabled=!0}},{key:"isEnabled",value:function(){return!this.disabled}},{key:"isRequired",value:function(){return typeof this.schema.required=="boolean"?this.schema.required:this.parent&&this.parent.schema&&Array.isArray(this.parent.schema.required)?this.parent.schema.required.includes(this.key):!!this.jsoneditor.options.required_by_default}},{key:"getDisplayText",value:function(i){var h=[],a={};i.forEach(function(t){t.title&&(a[t.title]=a[t.title]||0,a[t.title]++),t.description&&(a[t.description]=a[t.description]||0,a[t.description]++),t.format&&(a[t.format]=a[t.format]||0,a[t.format]++),t.type&&(a[t.type]=a[t.type]||0,a[t.type]++)}),i.forEach(function(t){var e;e=typeof t=="string"?t:t.title&&a[t.title]<=1?t.title:t.format&&a[t.format]<=1?t.format:t.type&&a[t.type]<=1?t.type:t.description&&a[t.description]<=1?t.description:t.title?t.title:t.format?t.format:t.type?t.type:t.description?t.description:JSON.stringify(t).length<500?JSON.stringify(t):"type",h.push(e)});var s={};return h.forEach(function(t,e){s[t]=s[t]||0,s[t]++,a[t]>1&&(h[e]="".concat(t," ").concat(s[t]))}),h}},{key:"getValidId",value:function(i){return(i=i===void 0?"":i.toString()).replace(/\s+/g,"-")}},{key:"setInputAttributes",value:function(i){var h=this;if(this.schema.options&&this.schema.options.inputAttributes){var a=this.schema.options.inputAttributes,s=["name","type"].concat(i);Object.keys(a).forEach(function(t){s.includes(t.toLowerCase())||h.input.setAttribute(t,a[t])})}}},{key:"setContainerAttributes",value:function(){var i=this;if(this.schema.options&&this.schema.options.containerAttributes){var h=this.schema.options.containerAttributes,a=["data-schemapath","data-schematype","data-schemaid"];Object.keys(h).forEach(function(s){a.includes(s.toLowerCase())||i.container.setAttribute(s,h[s])})}}},{key:"expandCallbacks",value:function(i,h){var a=this,s=this.defaults.callbacks[i];return Object.entries(h).forEach(function(t){var e,o,c=(o=2,function(P){if(Array.isArray(P))return P}(e=t)||function(P,D){var J=P==null?null:typeof Symbol<"u"&&P[Symbol.iterator]||P["@@iterator"];if(J!=null){var nt,ct,dt,kt,Ct=[],$t=!0,ne=!1;try{if(dt=(J=J.call(P)).next,D===0){if(Object(J)!==J)return;$t=!1}else for(;!($t=(nt=dt.call(J)).done)&&(Ct.push(nt.value),Ct.length!==D);$t=!0);}catch(Re){ne=!0,ct=Re}finally{try{if(!$t&&J.return!=null&&(kt=J.return(),Object(kt)!==kt))return}finally{if(ne)throw ct}}return Ct}}(e,o)||function(P,D){if(P){if(typeof P=="string")return M(P,D);var J=Object.prototype.toString.call(P).slice(8,-1);return J==="Object"&&P.constructor&&(J=P.constructor.name),J==="Map"||J==="Set"?Array.from(P):J==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(J)?M(P,D):void 0}}(e,o)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
61
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()),d=c[0],_=c[1];_===Object(_)?h[d]=a.expandCallbacks(i,_):typeof _=="string"&&B(s)==="object"&&typeof s[_]=="function"&&(h[d]=s[_].bind(null,a))}),h}},{key:"showValidationErrors",value:function(i){}}],f&&q(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),u}();function N(u){return N=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},N(u)}function U(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(N(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(N(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),N(h)==="symbol"?h:String(h)),i)}var h}function H(){return H=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=Y(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},H.apply(this,arguments)}function X(u,n){return X=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},X(u,n)}function Y(u){return Y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Y(u)}var Q=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&X(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Y(i);if(h){var o=Y(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(N(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"register",value:function(){H(Y(s.prototype),"register",this).call(this),this.input&&(this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname),this.input.setAttribute("aria-label",this.formname))}},{key:"unregister",value:function(){H(Y(s.prototype),"unregister",this).call(this),this.input&&(this.input.removeAttribute("name"),this.input.removeAttribute("aria-label"))}},{key:"setValue",value:function(t,e,o){if((!this.template||o)&&(this.shouldBeUnset()||t!=null?N(t)==="object"?t=JSON.stringify(t):this.shouldBeUnset()||typeof t=="string"||(t="".concat(t)):t="",t!==this.serialized)){var c=this.sanitize(t);if(this.input.value!==c){if(this.setValueToInputField(c),this.format==="range"){var d=this.control.querySelector("output");d&&(d.value=c)}var _=o||this.getValue()!==t;return this.refreshValue(),e?this.is_dirty=!1:this.jsoneditor.options.show_errors==="change"&&(this.is_dirty=!0),this.adjust_height&&this.adjust_height(this.input),this.onChange(_),{changed:_,value:c}}}}},{key:"setValueToInputField",value:function(t){this.input.value=t===void 0?"":t}},{key:"getNumColumns",value:function(){var t,e=Math.ceil(Math.max(this.getTitle().length,this.schema.maxLength||0,this.schema.minLength||0)/5);return t=this.input_type==="textarea"?6:["text","email"].includes(this.input_type)?4:2,Math.min(12,Math.max(e,t))}},{key:"build",value:function(){var t=this;if(this.options.compact||(this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired())),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.translateProperty(this.schema.description))),this.options.infoText&&(this.infoButton=this.theme.getInfoButton(this.translateProperty(this.options.infoText))),this.format=this.schema.format,!this.format&&this.schema.media&&this.schema.media.type&&(this.format=this.schema.media.type.replace(/(^(application|text)\/(x-)?(script\.)?)|(-source$)/g,"")),!this.format&&this.options.default_format&&(this.format=this.options.default_format),this.options.format&&(this.format=this.options.format),this.format)if(this.format==="textarea")this.input_type="textarea",this.input=this.theme.getTextareaInput();else if(this.format==="range"){this.input_type="range";var e=this.schema.minimum||0,o=this.schema.maximum||Math.max(100,e+1),c=1;this.schema.multipleOf&&(e%this.schema.multipleOf&&(e=Math.ceil(e/this.schema.multipleOf)*this.schema.multipleOf),o%this.schema.multipleOf&&(o=Math.floor(o/this.schema.multipleOf)*this.schema.multipleOf),c=this.schema.multipleOf),this.input=this.theme.getRangeInput(e,o,c)}else this.input_type="text",["button","checkbox","color","date","datetime-local","email","file","hidden","image","month","number","password","radio","reset","search","submit","tel","text","time","url","week"].includes(this.format)&&(this.input_type=this.format),this.input=this.theme.getFormInputField(this.input_type);else this.input_type="text",this.input=this.theme.getFormInputField(this.input_type);this.schema.maxLength!==void 0&&this.input.setAttribute("maxlength",this.schema.maxLength),this.schema.pattern!==void 0?this.input.setAttribute("pattern",this.schema.pattern):this.schema.minLength!==void 0&&this.input.setAttribute("pattern",".{".concat(this.schema.minLength,",}")),this.options.compact?this.container.classList.add("compact"):this.options.input_width&&(this.input.style.width=this.options.input_width),(this.schema.readOnly||this.schema.readonly||this.schema.template)&&(this.disable(!0),this.input.setAttribute("readonly","true")),this.setInputAttributes(["maxlength","pattern","readonly","min","max","step"]),this.input.addEventListener("change",function(P){if(P.preventDefault(),P.stopPropagation(),t.schema.template)P.currentTarget.value=t.value;else{var D=P.currentTarget.value,J=t.sanitize(D);D!==J&&(P.currentTarget.value=J),t.is_dirty=!0,t.refreshValue(),t.onChange(!0)}}),this.options.input_height&&(this.input.style.height=this.options.input_height),this.options.expand_height&&(this.adjust_height=function(P){if(P){var D,J=P.offsetHeight;if(P.offsetHeight<P.scrollHeight)for(D=0;P.offsetHeight<P.scrollHeight+3&&!(D>100);)D++,J++,P.style.height="".concat(J,"px");else{for(D=0;P.offsetHeight>=P.scrollHeight+3&&!(D>100);)D++,J--,P.style.height="".concat(J,"px");P.style.height="".concat(J+1,"px")}}},this.input.addEventListener("keyup",function(P){t.adjust_height(P.currentTarget)}),this.input.addEventListener("change",function(P){t.adjust_height(P.currentTarget)}),this.adjust_height()),this.format&&this.input.setAttribute("data-schemaformat",this.format);var d=this.input;if(this.format==="range"&&(d=this.theme.getRangeControl(this.input,this.theme.getRangeOutput(this.input,this.schema.default||Math.max(this.schema.minimum||0,0)))),this.control=this.theme.getFormControl(this.label,d,this.description,this.infoButton,this.formname),this.container.appendChild(this.control),window.requestAnimationFrame(function(){t.input.parentNode&&t.afterInputReady(),t.adjust_height&&t.adjust_height(t.input),t.format==="range"&&(t.control.querySelector("output").value=t.input.value)}),this.schema.template){var _=this.expandCallbacks("template",{template:this.schema.template});typeof _.template=="function"?this.template=_.template:this.template=this.jsoneditor.compileTemplate(this.schema.template,this.template_engine),this.refreshValue()}else this.refreshValue()}},{key:"setupCleave",value:function(t){var e=this.expandCallbacks("cleave",x({},this.defaults.options.cleave||{},this.options.cleave||{}));N(e)==="object"&&Object.keys(e).length>0&&(this.cleave_instance=new window.Cleave(t,e))}},{key:"setupImask",value:function(t){var e=this.expandCallbacks("imask",x({},this.defaults.options.imask||{},this.options.imask||{}));N(e)==="object"&&Object.keys(e).length>0&&(this.imask_instance=window.IMask(t,this.ajustIMaskOptions(e)))}},{key:"ajustIMaskOptions",value:function(t){var e=this;return Object.keys(t).forEach(function(o){if(t[o]===Object(t[o]))t[o]=e.ajustIMaskOptions(t[o]);else if(o==="mask")if(t[o].substr(0,6)==="regex:"){var c=t[o].match(/^regex:\/(.*)\/([gimsuy]*)$/);if(c!==null)try{t[o]=new RegExp(c[1],c[2])}catch{}}else t[o]=e.getGlobalPropertyFromString(t[o])}),t}},{key:"getGlobalPropertyFromString",value:function(t){if(t.includes(".")){var e=t.split("."),o=e[0],c=e[1];if(window[o]!==void 0&&window[o][c]!==void 0)return window[o][c]}else if(window[t]!==void 0)return window[t];return t}},{key:"shouldBeUnset",value:function(){return!this.jsoneditor.options.use_default_values&&!this.is_dirty}},{key:"getValue",value:function(){var t=!(!this.input||!this.input.value);if(!this.shouldBeUnset()||t)return this.imask_instance&&this.dependenciesFulfilled&&this.options.imask.returnUnmasked?this.imask_instance.unmaskedValue:H(Y(s.prototype),"getValue",this).call(this)}},{key:"enable",value:function(){this.always_disabled||(this.input.disabled=!1,H(Y(s.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.input.disabled=!0,H(Y(s.prototype),"disable",this).call(this)}},{key:"afterInputReady",value:function(){this.theme.afterInputReady(this.input),window.Cleave&&!this.cleave_instance?this.setupCleave(this.input):window.IMask&&!this.imask_instance&&this.setupImask(this.input)}},{key:"refreshValue",value:function(){this.input&&(this.value=this.input.value,typeof this.value=="string"||this.shouldBeUnset()||(this.value=""),this.serialized=this.value)}},{key:"destroy",value:function(){this.cleave_instance&&this.cleave_instance.destroy(),this.imask_instance&&this.imask_instance.destroy(),this.template=null,this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),this.label&&this.label.parentNode&&this.label.parentNode.removeChild(this.label),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),H(Y(s.prototype),"destroy",this).call(this)}},{key:"sanitize",value:function(t){return t}},{key:"onWatchedFieldChange",value:function(){var t;this.template&&(t=this.getWatchedFieldValues(),this.setValue(this.template(t),!1,!0)),H(Y(s.prototype),"onWatchedFieldChange",this).call(this)}},{key:"showValidationErrors",value:function(t){var e=this;if(this.jsoneditor.options.show_errors!=="always"){if(!this.is_dirty&&this.previous_error_setting===this.jsoneditor.options.show_errors)return}this.previous_error_setting=this.jsoneditor.options.show_errors;var o=t.reduce(function(c,d){return d.path===e.path&&c.push(d.message),c},[]);o.length?this.theme.addInputError(this.input,"".concat(o.join(". "),".")):this.theme.removeInputError(this.input)}}])&&U(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(F);function tt(u){return tt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},tt(u)}function it(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(tt(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(tt(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),tt(h)==="symbol"?h:String(h)),i)}var h}function st(){return st=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=ut(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},st.apply(this,arguments)}function mt(u,n){return mt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},mt(u,n)}function ut(u){return ut=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ut(u)}var Et=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&mt(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=ut(i);if(h){var o=ut(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(tt(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"setValue",value:function(t,e,o){var c=st(ut(s.prototype),"setValue",this).call(this,t,e,o);c!==void 0&&c.changed&&this.ace_editor_instance&&(this.ace_editor_instance.setValue(c.value),this.ace_editor_instance.session.getSelection().clearSelection(),this.ace_editor_instance.resize())}},{key:"build",value:function(){this.options.format="textarea",st(ut(s.prototype),"build",this).call(this),this.input_type=this.schema.format,this.input.setAttribute("data-schemaformat",this.input_type)}},{key:"afterInputReady",value:function(){var t,e=this;if(window.ace){var o=this.input_type;o!=="cpp"&&o!=="c++"&&o!=="c"||(o="c_cpp"),t=this.expandCallbacks("ace",x({},{selectionStyle:"text",minLines:30,maxLines:30},this.defaults.options.ace||{},this.options.ace||{},{mode:"ace/mode/".concat(o)})),this.ace_container=document.createElement("div"),this.ace_container.style.width="100%",this.ace_container.style.position="relative",this.input.parentNode.insertBefore(this.ace_container,this.input),this.input.style.display="none",this.ace_editor_instance=window.ace.edit(this.ace_container,t),this.ace_editor_instance.setValue(this.getValue()),this.ace_editor_instance.session.getSelection().clearSelection(),this.ace_editor_instance.resize(),(this.schema.readOnly||this.schema.readonly||this.schema.template)&&this.ace_editor_instance.setReadOnly(!0),this.ace_editor_instance.on("change",function(){e.input.value=e.ace_editor_instance.getValue(),e.refreshValue(),e.is_dirty=!0,e.onChange(!0)}),this.theme.afterInputReady(this.input)}else st(ut(s.prototype),"afterInputReady",this).call(this)}},{key:"getNumColumns",value:function(){return 6}},{key:"enable",value:function(){!this.always_disabled&&this.ace_editor_instance&&this.ace_editor_instance.setReadOnly(!1),st(ut(s.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.ace_editor_instance&&this.ace_editor_instance.setReadOnly(!0),st(ut(s.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.ace_editor_instance&&(this.ace_editor_instance.destroy(),this.ace_editor_instance=null),st(ut(s.prototype),"destroy",this).call(this)}}])&&it(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(Q);function At(u){return At=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},At(u)}function Vt(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(At(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(At(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),At(h)==="symbol"?h:String(h)),i)}var h}function lt(){return lt=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=_t(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},lt.apply(this,arguments)}function wt(u,n){return wt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},wt(u,n)}function _t(u){return _t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},_t(u)}k(7327);var Ut=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&wt(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=_t(i);if(h){var o=_t(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(At(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,f=[{key:"askConfirmation",value:function(){return this.jsoneditor.options.prompt_before_delete!==!0||window.confirm(this.translate("button_delete_node_warning"))!==!1}},{key:"getDefault",value:function(){return this.schema.default||[]}},{key:"register",value:function(){lt(_t(s.prototype),"register",this).call(this),this.rows&&this.rows.forEach(function(t){return t.register()})}},{key:"unregister",value:function(){lt(_t(s.prototype),"unregister",this).call(this),this.rows&&this.rows.forEach(function(t){return t.unregister()})}},{key:"getNumColumns",value:function(){var t=this.getItemInfo(0);return this.tabs_holder&&this.schema.format!=="tabs-top"?Math.max(Math.min(12,t.width+2),4):t.width}},{key:"enable",value:function(){var t=this;this.always_disabled||(this.setAvailability(this,!1),this.rows&&this.rows.forEach(function(e){e.enable(),t.setAvailability(e,!1)}),lt(_t(s.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){var e=this;t&&(this.always_disabled=!0),this.setAvailability(this,!0),this.rows&&this.rows.forEach(function(o){o.disable(t),e.setAvailability(o,!0)}),lt(_t(s.prototype),"disable",this).call(this)}},{key:"setAvailability",value:function(t,e){t.add_row_button&&(t.add_row_button.disabled=e),t.remove_all_rows_button&&(t.remove_all_rows_button.disabled=e),t.delete_last_row_button&&(t.delete_last_row_button.disabled=e),t.copy_button&&(t.copy_button.disabled=e),t.delete_button&&(t.delete_button.disabled=e),t.moveup_button&&(t.moveup_button.disabled=e),t.movedown_button&&(t.movedown_button.disabled=e)}},{key:"preBuild",value:function(){lt(_t(s.prototype),"preBuild",this).call(this),this.rows=[],this.row_cache=[],this.hide_delete_buttons=this.options.disable_array_delete||this.jsoneditor.options.disable_array_delete,this.hide_delete_all_rows_buttons=this.hide_delete_buttons||this.options.disable_array_delete_all_rows||this.jsoneditor.options.disable_array_delete_all_rows,this.hide_delete_last_row_buttons=this.hide_delete_buttons||this.options.disable_array_delete_last_row||this.jsoneditor.options.disable_array_delete_last_row,this.hide_move_buttons=this.options.disable_array_reorder||this.jsoneditor.options.disable_array_reorder,this.hide_add_button=this.options.disable_array_add||this.jsoneditor.options.disable_array_add,this.show_copy_button=this.options.enable_array_copy||this.jsoneditor.options.enable_array_copy,this.array_controls_top=this.options.array_controls_top||this.jsoneditor.options.array_controls_top}},{key:"build",value:function(){this.options.compact?(this.title=this.theme.getHeader("",this.getPathDepth()),this.container.appendChild(this.title),this.panel=this.theme.getIndentedPanel(),this.container.appendChild(this.panel),this.title_controls=this.theme.getHeaderButtonHolder(),this.title.appendChild(this.title_controls),this.controls=this.theme.getHeaderButtonHolder(),this.title.appendChild(this.controls),this.row_holder=document.createElement("div"),this.panel.appendChild(this.row_holder)):(this.header=document.createElement("label"),this.header.textContent=this.getTitle(),this.title=this.theme.getHeader(this.header,this.getPathDepth()),this.container.appendChild(this.title),this.options.infoText&&(this.infoButton=this.theme.getInfoButton(this.translateProperty(this.options.infoText)),this.container.appendChild(this.infoButton)),this.title_controls=this.theme.getHeaderButtonHolder(),this.title.appendChild(this.title_controls),this.schema.description&&(this.description=this.theme.getDescription(this.translateProperty(this.schema.description)),this.container.appendChild(this.description)),this.error_holder=document.createElement("div"),this.container.appendChild(this.error_holder),this.schema.format==="tabs-top"?(this.controls=this.theme.getHeaderButtonHolder(),this.title.appendChild(this.controls),this.tabs_holder=this.theme.getTopTabHolder(this.getValidId(this.getItemTitle())),this.container.appendChild(this.tabs_holder),this.row_holder=this.theme.getTopTabContentHolder(this.tabs_holder),this.active_tab=null):this.schema.format==="tabs"?(this.controls=this.theme.getHeaderButtonHolder(),this.title.appendChild(this.controls),this.tabs_holder=this.theme.getTabHolder(this.getValidId(this.getItemTitle())),this.container.appendChild(this.tabs_holder),this.row_holder=this.theme.getTabContentHolder(this.tabs_holder),this.active_tab=null):(this.panel=this.theme.getIndentedPanel(),this.container.appendChild(this.panel),this.row_holder=document.createElement("div"),this.panel.appendChild(this.row_holder),this.controls=this.theme.getButtonHolder(),this.array_controls_top?this.title.appendChild(this.controls):this.panel.appendChild(this.controls))),this.addControls()}},{key:"onChildEditorChange",value:function(t){this.refreshValue(),this.refreshTabs(!0),lt(_t(s.prototype),"onChildEditorChange",this).call(this,t)}},{key:"getItemTitle",value:function(){if(!this.item_title)if(this.schema.items&&!Array.isArray(this.schema.items)){var t=this.jsoneditor.expandRefs(this.schema.items);this.item_title=this.translateProperty(t.title)||this.translate("default_array_item_title")}else this.item_title=this.translate("default_array_item_title");return this.cleanText(this.item_title)}},{key:"getItemSchema",value:function(t){return Array.isArray(this.schema.items)?t>=this.schema.items.length?this.schema.additionalItems===!0?{}:this.schema.additionalItems?x({},this.schema.additionalItems):void 0:x({},this.schema.items[t]):this.schema.items?x({},this.schema.items):{}}},{key:"getItemInfo",value:function(t){var e=this.getItemSchema(t);this.item_info=this.item_info||{};var o=JSON.stringify(e);return this.item_info[o]!==void 0||(e=this.jsoneditor.expandRefs(e),this.item_info[o]={title:this.translateProperty(e.title)||this.translate("default_array_item_title"),default:e.default,width:12,child_editors:e.properties||e.items}),this.item_info[o]}},{key:"getElementEditor",value:function(t){var e=this.getItemInfo(t),o=this.getItemSchema(t);(o=this.jsoneditor.expandRefs(o)).title="".concat(e.title," ").concat(t+1);var c,d=this.jsoneditor.getEditorClass(o);this.tabs_holder?(c=this.schema.format==="tabs-top"?this.theme.getTopTabContent():this.theme.getTabContent()).id="".concat(this.path,".").concat(t):c=e.child_editors?this.theme.getChildEditorHolder():this.theme.getIndentedPanel(),this.row_holder.appendChild(c);var _=this.jsoneditor.createEditor(d,{jsoneditor:this.jsoneditor,schema:o,container:c,path:"".concat(this.path,".").concat(t),parent:this,required:!0});return _.preBuild(),_.build(),_.postBuild(),_.title_controls||(_.array_controls=this.theme.getButtonHolder(),c.appendChild(_.array_controls)),_}},{key:"checkParent",value:function(t){return t&&t.parentNode}},{key:"destroy",value:function(){this.empty(!0),this.checkParent(this.title)&&this.title.parentNode.removeChild(this.title),this.checkParent(this.description)&&this.description.parentNode.removeChild(this.description),this.checkParent(this.row_holder)&&this.row_holder.parentNode.removeChild(this.row_holder),this.checkParent(this.controls)&&this.controls.parentNode.removeChild(this.controls),this.checkParent(this.panel)&&this.panel.parentNode.removeChild(this.panel),this.rows=this.row_cache=this.title=this.description=this.row_holder=this.panel=this.controls=null,lt(_t(s.prototype),"destroy",this).call(this)}},{key:"empty",value:function(t){var e=this;this.rows&&(this.rows.forEach(function(o,c){t&&(e.checkParent(o.tab)&&o.tab.parentNode.removeChild(o.tab),e.destroyRow(o,!0),e.row_cache[c]=null),e.rows[c]=null}),this.rows=[],t&&(this.row_cache=[]))}},{key:"destroyRow",value:function(t,e){var o=t.container;e?(t.destroy(),o.parentNode&&o.parentNode.removeChild(o),this.checkParent(t.tab)&&t.tab.parentNode.removeChild(t.tab)):(t.tab&&(t.tab.style.display="none"),o.style.display="none",t.unregister())}},{key:"getMax",value:function(){return Array.isArray(this.schema.items)&&this.schema.additionalItems===!1?Math.min(this.schema.items.length,this.schema.maxItems||1/0):this.schema.maxItems||1/0}},{key:"refreshTabs",value:function(t){var e=this;this.rows.forEach(function(o){o.tab&&(t?o.tab_text.textContent=o.getHeaderText():o.tab===e.active_tab?e.theme.markTabActive(o):e.theme.markTabInactive(o))})}},{key:"ensureArraySize",value:function(t){if(Array.isArray(t)||(t=[t]),this.schema.minItems)for(;t.length<this.schema.minItems;)t.push(this.getItemInfo(t.length).default);return this.getMax()&&t.length>this.getMax()&&(t=t.slice(0,this.getMax())),t}},{key:"setValue",value:function(){var t=this,e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],o=arguments.length>1?arguments[1]:void 0;if(e=this.ensureArraySize(e),JSON.stringify(e)!==this.serialized){e.forEach(function(P,D){if(t.rows[D])t.rows[D].setValue(P,o);else if(t.row_cache[D])t.rows[D]=t.row_cache[D],t.rows[D].setValue(P,o),t.rows[D].container.style.display="",t.rows[D].tab&&(t.rows[D].tab.style.display=""),t.rows[D].register(),t.jsoneditor.trigger("addRow",t.rows[D]);else{var J=t.addRow(P,o);t.jsoneditor.trigger("addRow",J)}});for(var c=e.length;c<this.rows.length;c++)this.destroyRow(this.rows[c]),this.rows[c]=null;this.rows=this.rows.slice(0,e.length);var d=this.rows.find(function(P){return P.tab===t.active_tab}),_=d!==void 0?d.tab:null;!_&&this.rows.length&&(_=this.rows[0].tab),this.active_tab=_,this.refreshValue(o),this.refreshTabs(!0),this.refreshTabs(),this.onChange()}}},{key:"setButtonState",value:function(t,e){switch(this.options.button_state_mode||this.jsoneditor.options.button_state_mode){case 1:default:t.style.display=e?"":"none";break;case 2:t.disabled=!e}}},{key:"setupButtons",value:function(t){var e=[];if(this.value.length)if(this.value.length===1){this.setButtonState(this.remove_all_rows_button,!1);var o=!(t||this.hide_delete_last_row_buttons);this.setButtonState(this.delete_last_row_button,o),e.push(o)}else{var c=!(t||this.hide_delete_last_row_buttons);this.setButtonState(this.delete_last_row_button,c),e.push(c);var d=!(t||this.hide_delete_all_rows_buttons);this.setButtonState(this.remove_all_rows_button,d),e.push(d)}else this.setButtonState(this.delete_last_row_button,!1),this.setButtonState(this.remove_all_rows_button,!1);var _=!(this.getMax()&&this.getMax()<=this.rows.length||this.hide_add_button);return this.setButtonState(this.add_row_button,_),e.push(_),e.some(function(P){return P})}},{key:"refreshValue",value:function(t){var e=this,o=this.value?this.value.length:0;if(this.value=this.rows.map(function(d){return d.getValue()}),o!==this.value.length||t){var c=this.schema.minItems&&this.schema.minItems>=this.rows.length;this.rows.forEach(function(d,_){if(d.movedown_button){var P=_!==e.rows.length-1;e.setButtonState(d.movedown_button,P)}d.delete_button&&e.setButtonState(d.delete_button,!c),e.value[_]=d.getValue()}),!this.collapsed&&this.setupButtons(c)?this.controls.style.display="inline-block":this.controls.style.display="none"}this.serialized=JSON.stringify(this.value)}},{key:"addRow",value:function(t,e){var o=this,c=this.rows.length;this.rows[c]=this.getElementEditor(c),this.row_cache[c]=this.rows[c],this.tabs_holder&&(this.rows[c].tab_text=document.createElement("span"),this.rows[c].tab_text.textContent=this.rows[c].getHeaderText(),this.schema.format==="tabs-top"?(this.rows[c].tab=this.theme.getTopTab(this.rows[c].tab_text,this.getValidId(this.rows[c].path)),this.theme.addTopTab(this.tabs_holder,this.rows[c].tab)):(this.rows[c].tab=this.theme.getTab(this.rows[c].tab_text,this.getValidId(this.rows[c].path)),this.theme.addTab(this.tabs_holder,this.rows[c].tab)),this.rows[c].tab.addEventListener("click",function(_){o.active_tab=o.rows[c].tab,o.refreshTabs(),_.preventDefault(),_.stopPropagation()}));var d=this.rows[c].title_controls||this.rows[c].array_controls;return this.hide_delete_buttons||(this.rows[c].delete_button=this._createDeleteButton(c,d)),this.show_copy_button&&(this.rows[c].copy_button=this._createCopyButton(c,d)),c&&!this.hide_move_buttons&&(this.rows[c].moveup_button=this._createMoveUpButton(c,d)),this.hide_move_buttons||(this.rows[c].movedown_button=this._createMoveDownButton(c,d)),t!==void 0&&this.rows[c].setValue(t,e),this.refreshTabs(),this.rows[c]}},{key:"_createDeleteButton",value:function(t,e){var o=this,c=this.getButton(this.getItemTitle(),"delete","button_delete_row_title",[this.getItemTitle()]);return c.classList.add("delete","json-editor-btntype-delete"),c.setAttribute("data-i",t),c.addEventListener("click",function(d){if(d.preventDefault(),d.stopPropagation(),!o.askConfirmation())return!1;var _=1*d.currentTarget.getAttribute("data-i"),P=o.getValue().filter(function(nt,ct){return ct!==_}),D=null,J=o.rows[_].getValue();o.setValue(P),o.rows[_]?D=o.rows[_].tab:o.rows[_-1]&&(D=o.rows[_-1].tab),D&&(o.active_tab=D,o.refreshTabs()),o.onChange(!0),o.jsoneditor.trigger("deleteRow",J)}),e&&e.appendChild(c),c}},{key:"_createCopyButton",value:function(t,e){var o=this,c=this.getButton(this.getItemTitle(),"copy","button_copy_row_title",[this.getItemTitle()]),d=this.schema;return c.classList.add("copy","json-editor-btntype-copy"),c.setAttribute("data-i",t),c.addEventListener("click",function(_){var P=o.getValue();_.preventDefault(),_.stopPropagation();var D=1*_.currentTarget.getAttribute("data-i");P.forEach(function(J,nt){if(nt===D){if(d.items.type==="string"&&d.items.format==="uuid")J=R();else if(d.items.type==="object"&&d.items.properties)for(var ct=0,dt=Object.keys(J);ct<dt.length;ct++){var kt=dt[ct];d.items.properties&&d.items.properties[kt]&&d.items.properties[kt].format==="uuid"&&(J[kt]=R())}P.push(J)}}),o.setValue(P),o.refreshValue(!0),o.onChange(!0)}),e.appendChild(c),c}},{key:"_createMoveUpButton",value:function(t,e){var o=this,c=this.getButton("",this.schema.format==="tabs-top"?"moveleft":"moveup","button_move_up_title");return c.classList.add("moveup","json-editor-btntype-move"),c.setAttribute("data-i",t),c.addEventListener("click",function(d){d.preventDefault(),d.stopPropagation();var _=1*d.currentTarget.getAttribute("data-i");if(!(_<=0)){var P=o.getValue(),D=P[_-1];P[_-1]=P[_],P[_]=D,o.setValue(P),o.active_tab=o.rows[_-1].tab,o.refreshTabs(),o.onChange(!0),o.jsoneditor.trigger("moveRow",o.rows[_-1])}}),e&&e.appendChild(c),c}},{key:"_createMoveDownButton",value:function(t,e){var o=this,c=this.getButton("",this.schema.format==="tabs-top"?"moveright":"movedown","button_move_down_title");return c.classList.add("movedown","json-editor-btntype-move"),c.setAttribute("data-i",t),c.addEventListener("click",function(d){d.preventDefault(),d.stopPropagation();var _=1*d.currentTarget.getAttribute("data-i"),P=o.getValue();if(!(_>=P.length-1)){var D=P[_+1];P[_+1]=P[_],P[_]=D,o.setValue(P),o.active_tab=o.rows[_+1].tab,o.refreshTabs(),o.onChange(!0),o.jsoneditor.trigger("moveRow",o.rows[_+1])}}),e&&e.appendChild(c),c}},{key:"addControls",value:function(){this.collapsed=!1,this.toggle_button=this._createToggleButton(),this.options.collapsed&&j(this.toggle_button,"click"),this.schema.options&&this.schema.options.disable_collapse!==void 0?this.schema.options.disable_collapse&&(this.toggle_button.style.display="none"):this.jsoneditor.options.disable_collapse&&(this.toggle_button.style.display="none"),this.add_row_button=this._createAddRowButton(),this.delete_last_row_button=this._createDeleteLastRowButton(),this.remove_all_rows_button=this._createRemoveAllRowsButton(),this.tabs&&(this.add_row_button.classList.add("je-array-control-btn"),this.delete_last_row_button.classList.add("je-array-control-btn"),this.remove_all_rows_button.classList.add("je-array-control-btn"))}},{key:"_createToggleButton",value:function(){var t=this,e=this.getButton("","collapse","button_collapse");e.classList.add("json-editor-btntype-toggle"),this.title.insertBefore(e,this.title.childNodes[0]);var o=this.row_holder.style.display,c=this.controls.style.display;return e.addEventListener("click",function(d){d.preventDefault(),d.stopPropagation(),t.panel&&t.setButtonState(t.panel,t.collapsed),t.tabs_holder&&t.setButtonState(t.tabs_holder,t.collapsed),t.collapsed?(t.collapsed=!1,t.row_holder.style.display=o,t.controls.style.display=c,t.setButtonText(d.currentTarget,"","collapse","button_collapse")):(t.collapsed=!0,t.row_holder.style.display="none",t.controls.style.display="none",t.setButtonText(d.currentTarget,"","expand","button_expand"))}),e}},{key:"_createAddRowButton",value:function(){var t=this,e=this.getButton(this.getItemTitle(),"add","button_add_row_title",[this.getItemTitle()]);return e.classList.add("json-editor-btntype-add"),e.addEventListener("click",function(o){o.preventDefault(),o.stopPropagation();var c,d=t.rows.length;t.row_cache[d]?(c=t.rows[d]=t.row_cache[d],t.rows[d].setValue(t.rows[d].getDefault(),!0),t.rows[d].container.style.display="",t.rows[d].tab&&(t.rows[d].tab.style.display=""),t.rows[d].register()):c=t.addRow(),t.active_tab=t.rows[d].tab,t.refreshTabs(),t.refreshValue(),t.onChange(!0),t.jsoneditor.trigger("addRow",c)}),this.controls.appendChild(e),e}},{key:"_createDeleteLastRowButton",value:function(){var t=this,e=this.getButton("button_delete_last","subtract","button_delete_last_title",[this.getItemTitle()]);return e.classList.add("json-editor-btntype-deletelast"),e.addEventListener("click",function(o){if(o.preventDefault(),o.stopPropagation(),!t.askConfirmation())return!1;var c=t.getValue(),d=null,_=c.pop();t.setValue(c),t.rows[t.rows.length-1]&&(d=t.rows[t.rows.length-1].tab),d&&(t.active_tab=d,t.refreshTabs()),t.onChange(!0),t.jsoneditor.trigger("deleteRow",_)}),this.controls.appendChild(e),e}},{key:"_createRemoveAllRowsButton",value:function(){var t=this,e=this.getButton("button_delete_all","delete","button_delete_all_title");return e.classList.add("json-editor-btntype-deleteall"),e.addEventListener("click",function(o){if(o.preventDefault(),o.stopPropagation(),!t.askConfirmation())return!1;var c=t.getValue();t.empty(!0),t.setValue([]),t.onChange(!0),t.jsoneditor.trigger("deleteAllRows",c)}),this.controls.appendChild(e),e}},{key:"showValidationErrors",value:function(t){var e=this,o=[],c=[];t.forEach(function(d){d.path===e.path?o.push(d):c.push(d)}),this.error_holder&&(o.length?(this.error_holder.innerHTML="",this.error_holder.style.display="",o.forEach(function(d){e.error_holder.appendChild(e.theme.getErrorMessage(d.message))})):this.error_holder.style.display="none"),this.rows.forEach(function(d){return d.showValidationErrors(c)})}}],f&&Vt(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(F);function Qt(u){return Qt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Qt(u)}function fe(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(Qt(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Qt(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Qt(h)==="symbol"?h:String(h)),i)}var h}function St(){return St=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=Bt(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},St.apply(this,arguments)}function Ot(u,n){return Ot=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Ot(u,n)}function Bt(u){return Bt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Bt(u)}Ut.rules={".json-editor-btntype-toggle":"margin:0%2010px%200%200",".je-array-control-btn":"width:100%25;text-align:left;margin-bottom:3px"};var qt=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ot(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Bt(i);if(h){var o=Bt(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(Qt(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"onInputChange",value:function(){this.value=this.input.value,this.onChange(!0)}},{key:"register",value:function(){St(Bt(s.prototype),"register",this).call(this),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}},{key:"unregister",value:function(){St(Bt(s.prototype),"unregister",this).call(this),this.input&&this.input.removeAttribute("name")}},{key:"getNumColumns",value:function(){var t=this,e=this.getTitle().length;return Object.keys(this.select_values).forEach(function(o){return e=Math.max(e,"".concat(t.select_values[o]).length+4)}),Math.min(12,Math.max(e/7,2))}},{key:"preBuild",value:function(){var t;St(Bt(s.prototype),"preBuild",this).call(this),this.select_options={},this.select_values={},this.option_titles=[],this.option_keys=[],this.option_enum=[];var e=this.jsoneditor.expandRefs(this.schema.items||{}),o=e.enum||[],c=e.options&&e.options.enum||[],d=e.options&&e.options.enum_titles||[];for(t=0;t<o.length;t++)if(this.sanitize(o[t])===o[t]){var _=c[t]||{};"title"in _||(_.title="".concat(d[t]||o[t])),this.option_keys.push("".concat(o[t])),this.option_enum.push(_),this.select_values["".concat(o[t])]=o[t]}}},{key:"build",value:function(){var t,e=this;if(this.options.compact||(this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired())),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.translateProperty(this.schema.description))),this.options.infoText&&(this.infoButton=this.theme.getInfoButton(this.translateProperty(this.options.infoText))),this.options.compact&&this.container.classList.add("compact"),!this.schema.format&&this.option_keys.length<8||this.schema.format==="checkbox"){for(this.input_type="checkboxes",this.inputs={},this.controls={},t=0;t<this.option_keys.length;t++){var o=this.formname+t.toString();this.inputs[this.option_keys[t]]=this.theme.getCheckbox(),this.inputs[this.option_keys[t]].id=o,this.select_options[this.option_keys[t]]=this.inputs[this.option_keys[t]];var c=this.theme.getCheckboxLabel(this.option_enum[t].title);if(c.htmlFor=o,this.option_enum[t].infoText){var d=this.theme.getInfoButton(this.translateProperty(this.option_enum[t].infoText));c.appendChild(d)}this.controls["_"+this.option_keys[t]]=this.theme.getFormControl(c,this.inputs[this.option_keys[t]])}this.control=this.theme.getMultiCheckboxHolder(this.controls,this.label,this.description,this.infoButton),this.inputs.controlgroup=this.inputs.controls=this.control}else{for(this.input_type="select",this.input=this.theme.getSelectInput(this.option_keys,!0),this.theme.setSelectOptions(this.input,this.option_keys,this.option_enum.map(function(_){return _.title})),this.input.setAttribute("multiple","multiple"),this.input.size=Math.min(10,this.option_keys.length),t=0;t<this.option_keys.length;t++)this.select_options[this.option_keys[t]]=this.input.children[t];this.control=this.theme.getFormControl(this.label,this.input,this.description,this.infoButton)}(this.schema.readOnly||this.schema.readonly)&&this.disable(!0),this.container.appendChild(this.control),this.multiselectChangeHandler=function(_){var P=[];for(t=0;t<e.option_keys.length;t++)e.select_options[e.option_keys[t]]&&(e.select_options[e.option_keys[t]].selected||e.select_options[e.option_keys[t]].checked)&&P.push(e.select_values[e.option_keys[t]]);e.updateValue(P),e.onChange(!0)},this.control.addEventListener("change",this.multiselectChangeHandler,!1),window.requestAnimationFrame(function(){e.afterInputReady()})}},{key:"postBuild",value:function(){St(Bt(s.prototype),"postBuild",this).call(this)}},{key:"afterInputReady",value:function(){this.theme.afterInputReady(this.input||this.inputs)}},{key:"setValue",value:function(t,e){var o=this;t=t||[],Array.isArray(t)||(t=[t]),t=t.map(function(c){return"".concat(c)}),Object.keys(this.select_options).forEach(function(c){o.select_options[c][o.input_type==="select"?"selected":"checked"]=t.includes(c)}),this.updateValue(t),this.onChange(!0)}},{key:"removeValue",value:function(t){t=[].concat(t),this.setValue(this.getValue().filter(function(e){return!t.includes(e)}))}},{key:"addValue",value:function(t){this.setValue(this.getValue().concat(t))}},{key:"updateValue",value:function(t){for(var e=!1,o=[],c=0;c<t.length;c++)if(this.select_options["".concat(t[c])]){var d=this.sanitize(this.select_values[t[c]]);o.push(d),d!==t[c]&&(e=!0)}else e=!0;return this.value=o,e}},{key:"sanitize",value:function(t){return this.schema.items.type==="boolean"?!!t:this.schema.items.type==="number"?1*t||0:this.schema.items.type==="integer"?Math.floor(1*t||0):"".concat(t)}},{key:"enable",value:function(){var t=this;this.always_disabled||(this.input?this.input.disabled=!1:this.inputs&&Object.keys(this.inputs).forEach(function(e){return t.inputs[e].disabled=!1}),St(Bt(s.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){var e=this;t&&(this.always_disabled=!0),this.input?this.input.disabled=!0:this.inputs&&Object.keys(this.inputs).forEach(function(o){return e.inputs[o].disabled=!0}),St(Bt(s.prototype),"disable",this).call(this)}},{key:"destroy",value:function(){St(Bt(s.prototype),"destroy",this).call(this)}},{key:"escapeRegExp",value:function(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}},{key:"showValidationErrors",value:function(t){var e=new RegExp("^".concat(this.escapeRegExp(this.path),"(\\.\\d+)?$")),o=t.reduce(function(c,d){return d.path.match(e)&&c.push(d.message),c},[]);o.length?this.theme.addInputError(this.input||this.inputs,"".concat(o.join(". "),".")):this.theme.removeInputError(this.input||this.inputs)}}])&&fe(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(F);function xt(u){return xt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},xt(u)}function sr(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(xt(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(xt(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),xt(h)==="symbol"?h:String(h)),i)}var h}function de(){return de=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=_e(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},de.apply(this,arguments)}function Ne(u,n){return Ne=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Ne(u,n)}function _e(u){return _e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},_e(u)}var lr=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ne(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=_e(i);if(h){var o=_e(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(xt(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"setValue",value:function(t,e){this.choices_instance?(t=[].concat(t).map(function(o){return"".concat(o)}),this.updateValue(t),this.choices_instance.removeActiveItems(),this.choices_instance.setChoiceByValue(this.value),this.onChange(!0)):de(_e(s.prototype),"setValue",this).call(this,t,e)}},{key:"afterInputReady",value:function(){var t=this;if(window.Choices&&!this.choices_instance){var e=this.expandCallbacks("choices",x({},{removeItems:!0,removeItemButton:!0},this.defaults.options.choices||{},this.options.choices||{},{addItems:!0,editItems:!1,duplicateItemsAllowed:!1}));this.newEnumAllowed=!1,this.choices_instance=new window.Choices(this.input,e),this.control.removeEventListener("change",this.multiselectChangeHandler),this.multiselectChangeHandler=function(o){var c=t.choices_instance.getValue(!0);t.updateValue(c),t.onChange(!0)},this.control.addEventListener("change",this.multiselectChangeHandler,!1)}de(_e(s.prototype),"afterInputReady",this).call(this)}},{key:"updateValue",value:function(t){t=[].concat(t);for(var e=!1,o=[],c=0;c<t.length;c++)if(!(!this.select_values["".concat(t[c])]&&(e=!0,!this.newEnumAllowed||!this.addNewOption(t[c])))){var d=this.sanitize(this.select_values[t[c]]);o.push(d),d!==t[c]&&(e=!0)}return this.value=o,e}},{key:"addNewOption",value:function(t){return this.option_keys.push("".concat(t)),this.option_titles.push("".concat(t)),this.select_values["".concat(t)]=t,this.schema.items.enum.push(t),this.choices_instance.setChoices([{value:"".concat(t),label:"".concat(t)}],"value","label",!1),!0}},{key:"enable",value:function(){!this.always_disabled&&this.choices_instance&&this.choices_instance.enable(),de(_e(s.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.choices_instance&&this.choices_instance.disable(),de(_e(s.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.choices_instance&&(this.choices_instance.destroy(),this.choices_instance=null),de(_e(s.prototype),"destroy",this).call(this)}}])&&sr(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(qt);function Ae(u){return Ae=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Ae(u)}function hr(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(Ae(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Ae(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Ae(h)==="symbol"?h:String(h)),i)}var h}function Le(){return Le=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=Ce(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},Le.apply(this,arguments)}function We(u,n){return We=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},We(u,n)}function Ce(u){return Ce=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ce(u)}var dr=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&We(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Ce(i);if(h){var o=Ce(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(Ae(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"setValue",value:function(t,e){this.select2_instance?(t=[].concat(t).map(function(o){return"".concat(o)}),this.updateValue(t),this.select2v4?this.select2_instance.val(this.value).change():this.select2_instance.select2("val",this.value),this.onChange(!0)):Le(Ce(s.prototype),"setValue",this).call(this,t,e)}},{key:"afterInputReady",value:function(){var t,e=this;window.jQuery&&window.jQuery.fn&&window.jQuery.fn.select2&&!this.select2_instance&&(t=this.expandCallbacks("select2",x({},{tags:!0,width:"100%"},this.defaults.options.select2||{},this.options.select2||{})),this.newEnumAllowed=t.tags=!!t.tags&&this.schema.items&&this.schema.items.type==="string",this.select2_instance=window.jQuery(this.input).select2(t),this.select2v4=S(this.select2_instance.select2,"amd"),this.selectChangeHandler=function(){var o=e.select2v4?e.select2_instance.val():e.select2_instance.select2("val");e.updateValue(o),e.onChange(!0)},this.select2_instance.on("select2-blur",this.selectChangeHandler),this.select2_instance.on("change",this.selectChangeHandler)),Le(Ce(s.prototype),"afterInputReady",this).call(this)}},{key:"updateValue",value:function(t){t=[].concat(t);for(var e=!1,o=[],c=0;c<t.length;c++)if(!(!this.select_values["".concat(t[c])]&&(e=!0,!this.newEnumAllowed||!this.addNewOption(t[c])))){var d=this.sanitize(this.select_values[t[c]]);o.push(d),d!==t[c]&&(e=!0)}return this.value=o,e}},{key:"addNewOption",value:function(t){this.option_keys.push("".concat(t)),this.option_titles.push("".concat(t)),this.select_values["".concat(t)]=t,this.schema.items.enum.push(t);var e=this.input.querySelector('option[value="'.concat(t,'"]'));return e?e.removeAttribute("data-select2-tag"):this.input.appendChild(new Option(t,t,!1,!1)).trigger("change"),!0}},{key:"enable",value:function(){!this.always_disabled&&this.select2_instance&&(this.select2v4?this.select2_instance.prop("disabled",!1):this.select2_instance.select2("enable",!0)),Le(Ce(s.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.select2_instance&&(this.select2v4?this.select2_instance.prop("disabled",!0):this.select2_instance.select2("enable",!1)),Le(Ce(s.prototype),"disable",this).call(this)}},{key:"destroy",value:function(){this.select2_instance&&(this.select2_instance.select2("destroy"),this.select2_instance=null),Le(Ce(s.prototype),"destroy",this).call(this)}}])&&hr(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(qt);function ot(u){return ot=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ot(u)}function bt(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(ot(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(ot(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),ot(h)==="symbol"?h:String(h)),i)}var h}function Ht(){return Ht=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=Kt(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},Ht.apply(this,arguments)}function Mt(u,n){return Mt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Mt(u,n)}function Kt(u){return Kt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Kt(u)}var Ze=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Mt(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Kt(i);if(h){var o=Kt(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(ot(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"setValue",value:function(t,e){this.selectize_instance?(t=[].concat(t).map(function(o){return"".concat(o)}),this.updateValue(t),this.selectize_instance.setValue(this.value),this.onChange(!0)):Ht(Kt(s.prototype),"setValue",this).call(this,t,e)}},{key:"afterInputReady",value:function(){var t,e=this;window.jQuery&&window.jQuery.fn&&window.jQuery.fn.selectize&&!this.selectize_instance&&(t=this.expandCallbacks("selectize",x({},{plugins:["remove_button"],delimiter:!1,createOnBlur:!0,create:!0},this.defaults.options.selectize||{},this.options.selectize||{})),this.newEnumAllowed=t.create=!!t.create&&this.schema.items&&this.schema.items.type==="string",this.selectize_instance=window.jQuery(this.input).selectize(t)[0].selectize,this.control.removeEventListener("change",this.multiselectChangeHandler),this.multiselectChangeHandler=function(o){var c=e.selectize_instance.getValue();e.updateValue(c),e.onChange(!0)},this.selectize_instance.on("change",this.multiselectChangeHandler)),Ht(Kt(s.prototype),"afterInputReady",this).call(this)}},{key:"updateValue",value:function(t){t=[].concat(t);for(var e=!1,o=[],c=0;c<t.length;c++)if(!(!this.select_values["".concat(t[c])]&&(e=!0,!this.newEnumAllowed||!this.addNewOption(t[c])))){var d=this.sanitize(this.select_values[t[c]]);o.push(d),d!==t[c]&&(e=!0)}return this.value=o,e}},{key:"addNewOption",value:function(t){return this.option_keys.push("".concat(t)),this.option_titles.push("".concat(t)),this.select_values["".concat(t)]=t,this.selectize_instance.addOption({text:t,value:t}),!0}},{key:"enable",value:function(){!this.always_disabled&&this.selectize_instance&&this.selectize_instance.unlock(),Ht(Kt(s.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.selectize_instance&&this.selectize_instance.lock(),Ht(Kt(s.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.selectize_instance&&(this.selectize_instance.destroy(),this.selectize_instance=null),Ht(Kt(s.prototype),"destroy",this).call(this)}}])&&bt(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(qt);function Qe(u){return Qe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Qe(u)}function _r(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(Qe(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Qe(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Qe(h)==="symbol"?h:String(h)),i)}var h}function Ke(){return Ke=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=Se(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},Ke.apply(this,arguments)}function pr(u,n){return pr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},pr(u,n)}function Se(u){return Se=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Se(u)}var Dn=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&pr(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Se(i);if(h){var o=Se(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(Qe(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"postBuild",value:function(){window.Autocomplete&&(this.autocomplete_wrapper=document.createElement("div"),this.input.parentNode.insertBefore(this.autocomplete_wrapper,this.input.nextSibling),this.autocomplete_wrapper.appendChild(this.input),this.autocomplete_dropdown=document.createElement("ul"),this.input.parentNode.insertBefore(this.autocomplete_dropdown,this.input.nextSibling)),Ke(Se(s.prototype),"postBuild",this).call(this)}},{key:"afterInputReady",value:function(){var t,e=this;window.Autocomplete&&!this.autocomplete_instance&&(t=this.expandCallbacks("autocomplete",x({},{search:function(o){return console.log('No "search" callback defined for autocomplete in property "'.concat(o.key,'"')),[]},onSubmit:function(){e.input.blur()},baseClass:"autocomplete"},this.defaults.options.autocomplete||{},this.options.autocomplete||{})),this.autocomplete_wrapper.classList.add(t.baseClass),this.autocomplete_dropdown.classList.add("".concat(t.baseClass,"-result-list")),this.autocomplete_instance=new window.Autocomplete(this.autocomplete_wrapper,t)),Ke(Se(s.prototype),"afterInputReady",this).call(this)}},{key:"destroy",value:function(){this.autocomplete_instance&&(this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),this.autocomplete_dropdown&&this.autocomplete_dropdown.parentNode&&this.autocomplete_dropdown.parentNode.removeChild(this.autocomplete_dropdown),this.autocomplete_wrapper&&this.autocomplete_wrapper.parentNode&&this.autocomplete_wrapper.parentNode.removeChild(this.autocomplete_wrapper),this.autocomplete_instance=null),Ke(Se(s.prototype),"destroy",this).call(this)}}])&&_r(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(Q);function Nt(u){return Nt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Nt(u)}function te(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(Nt(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Nt(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Nt(h)==="symbol"?h:String(h)),i)}var h}function Xt(){return Xt=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=ze(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},Xt.apply(this,arguments)}function le(u,n){return le=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},le(u,n)}function ze(u){return ze=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ze(u)}k(561);var Vi=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&le(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=ze(i);if(h){var o=ze(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(Nt(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"getNumColumns",value:function(){return 4}},{key:"setFileReaderListener",value:function(t){var e=this;t.addEventListener("load",function(o){if(e.count===e.current_item_index)e.value[e.count][e.key]=o.target.result;else{var c={};for(var d in e.parent.schema.properties)c[d]="";c[e.key]=o.target.result,e.value.splice(e.count,0,c)}e.count+=1,e.count===e.total+e.current_item_index&&e.arrayEditor.setValue(e.value)})}},{key:"build",value:function(){var t=this;if(this.options.compact||(this.title=this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired())),this.options.infoText&&(this.infoButton=this.theme.getInfoButton(this.translateProperty(this.options.infoText))),this.input=this.theme.getFormInputField("hidden"),this.container.appendChild(this.input),!this.schema.readOnly&&!this.schema.readonly){if(!window.FileReader)throw new Error("FileReader required for base64 editor");this.uploader=this.theme.getFormInputField("file"),this.uploader.style.display="none",this.schema.options&&this.schema.options.multiple&&this.schema.options.multiple===!0&&this.parent&&this.parent.schema.type==="object"&&this.parent.parent&&this.parent.parent.schema.type==="array"&&this.uploader.setAttribute("multiple",""),this.uploader.addEventListener("change",function(o){if(o.preventDefault(),o.stopPropagation(),o.currentTarget.files&&o.currentTarget.files.length)if(o.currentTarget.files.length>1&&t.schema.options&&t.schema.options.multiple&&t.schema.options.multiple===!0&&t.parent&&t.parent.schema.type==="object"&&t.parent.parent&&t.parent.parent.schema.type==="array"){t.arrayEditor=t.jsoneditor.getEditor(t.parent.parent.path),t.value=t.arrayEditor.getValue(),t.total=o.currentTarget.files.length,t.current_item_index=parseInt(t.parent.key),t.count=t.current_item_index;for(var c=0;c<t.total;c++){var d=new FileReader;t.setFileReaderListener(d),d.readAsDataURL(o.currentTarget.files[c])}}else{var _=new FileReader;_.onload=function(P){t.value=P.target.result,t.refreshPreview(),t.onChange(!0),_=null},_.readAsDataURL(o.currentTarget.files[0])}})}this.preview=this.theme.getFormInputDescription(this.translateProperty(this.schema.description)),this.container.appendChild(this.preview),this.control=this.theme.getFormControl(this.label,this.uploader||this.input,this.preview,this.infoButton),this.container.appendChild(this.control);var e=this.getButton("button_upload","upload","button_upload");e.addEventListener("click",function(){t.uploader.click()}),this.control.appendChild(e)}},{key:"refreshPreview",value:function(){if(this.last_preview!==this.value&&(this.last_preview=this.value,this.preview.innerHTML="",this.value)){var t=this.value.match(/^data:([^;,]+)[;,]/);if(t&&(t=t[1]),t){if(this.preview.innerHTML="<strong>Type:</strong> ".concat(t,", <strong>Size:</strong> ").concat(Math.floor((this.value.length-this.value.split(",")[0].length-1)/1.33333)," bytes"),t.substr(0,5)==="image"){this.preview.innerHTML+="<br>";var e=document.createElement("img");e.style.maxWidth="100%",e.style.maxHeight="100px",e.src=this.value,this.preview.appendChild(e)}}else this.preview.innerHTML="<em>Invalid data URI</em>"}}},{key:"enable",value:function(){this.always_disabled||(this.uploader&&(this.uploader.disabled=!1),Xt(ze(s.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.uploader&&(this.uploader.disabled=!0),Xt(ze(s.prototype),"disable",this).call(this)}},{key:"setValue",value:function(t){this.value!==t&&(this.schema.readOnly&&this.schema.enum&&!this.schema.enum.includes(t)?this.value=this.schema.enum[0]:this.value=t,this.input.value=this.value,this.refreshPreview(),this.onChange())}},{key:"destroy",value:function(){this.preview&&this.preview.parentNode&&this.preview.parentNode.removeChild(this.preview),this.title&&this.title.parentNode&&this.title.parentNode.removeChild(this.title),this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),this.uploader&&this.uploader.parentNode&&this.uploader.parentNode.removeChild(this.uploader),Xt(ze(s.prototype),"destroy",this).call(this)}}])&&te(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(F);function Nn(u){return Nn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Nn(u)}function ls(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(Nn(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Nn(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Nn(h)==="symbol"?h:String(h)),i)}var h}function ci(){return ci=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=Gr(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},ci.apply(this,arguments)}function on(u,n){return on=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},on(u,n)}function Gr(u){return Gr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Gr(u)}var us=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&on(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Gr(i);if(h){var o=Gr(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(Nn(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(t,e){var o;return function(c,d){if(!(c instanceof d))throw new TypeError("Cannot call a class as a function")}(this,s),(o=a.call(this,t,e)).active=!1,o.parent&&o.parent.schema&&(Array.isArray(o.parent.schema.required)?o.parent.schema.required.includes(o.key)||o.parent.schema.required.push(o.key):o.parent.schema.required=[o.key]),o}return n=s,(f=[{key:"build",value:function(){var t=this;this.options.compact=!0;var e=this.translateProperty(this.schema.title)||this.key,o=this.expandCallbacks("button",x({},{icon:"",validated:!1,align:"left",action:function(c,d){window.alert('No button action defined for "'.concat(c.path,'"'))}},this.defaults.options.button||{},this.options.button||{}));this.input=this.getButton(e,o.icon,e),this.input.addEventListener("click",o.action,!1),(this.schema.readOnly||this.schema.readonly||this.schema.template)&&(this.disable(!0),this.input.setAttribute("readonly","true")),this.setInputAttributes(["readonly"]),this.control=this.theme.getFormButtonHolder(o.align),this.control.appendChild(this.input),this.container.appendChild(this.control),this.changeHandler=function(){t.jsoneditor.validate(t.jsoneditor.getValue()).length>0?t.disable():t.enable()},o.validated&&this.jsoneditor.on("change",this.changeHandler)}},{key:"enable",value:function(){this.always_disabled||(this.input.disabled=!1,ci(Gr(s.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.input.disabled=!0,ci(Gr(s.prototype),"disable",this).call(this)}},{key:"getNumColumns",value:function(){return 2}},{key:"activate",value:function(){this.active=!1,this.enable()}},{key:"deactivate",value:function(){this.isRequired()||(this.active=!1,this.disable())}},{key:"destroy",value:function(){this.jsoneditor.off("change",this.changeHandler),this.changeHandler=null,ci(Gr(s.prototype),"destroy",this).call(this)}}])&&ls(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(F);function $n(u){return $n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},$n(u)}function cs(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if($n(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if($n(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),$n(h)==="symbol"?h:String(h)),i)}var h}function kn(){return kn=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=Mr(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},kn.apply(this,arguments)}function zi(u,n){return zi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},zi(u,n)}function Mr(u){return Mr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Mr(u)}var hs=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&zi(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Mr(i);if(h){var o=Mr(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&($n(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"setValue",value:function(t,e){t=!!t;var o=this.getValue()!==t;this.value=t,this.input.checked=this.value,this.onChange(o)}},{key:"register",value:function(){kn(Mr(s.prototype),"register",this).call(this),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}},{key:"unregister",value:function(){kn(Mr(s.prototype),"unregister",this).call(this),this.input&&this.input.removeAttribute("name")}},{key:"getNumColumns",value:function(){return Math.min(12,Math.max(this.getTitle().length/7,2))}},{key:"build",value:function(){var t=this;this.parent.options.table_row||(this.label=this.header=this.theme.getCheckboxLabel(this.getTitle(),this.isRequired()),this.label.htmlFor=this.formname),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.translateProperty(this.schema.description))),this.options.infoText&&!this.options.compact&&(this.infoButton=this.theme.getInfoButton(this.translateProperty(this.options.infoText))),this.options.compact&&this.container.classList.add("compact"),this.input=this.theme.getCheckbox(),this.input.id=this.formname,this.control=this.theme.getFormControl(this.label,this.input,this.description,this.infoButton),(this.schema.readOnly||this.schema.readonly)&&(this.disable(!0),this.input.disabled=!0),this.input.addEventListener("change",function(e){e.preventDefault(),e.stopPropagation(),t.value=e.currentTarget.checked,t.onChange(!0)}),this.container.appendChild(this.control)}},{key:"enable",value:function(){this.always_disabled||(this.input.disabled=!1,kn(Mr(s.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.input.disabled=!0,kn(Mr(s.prototype),"disable",this).call(this)}},{key:"destroy",value:function(){this.label&&this.label.parentNode&&this.label.parentNode.removeChild(this.label),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),kn(Mr(s.prototype),"destroy",this).call(this)}},{key:"showValidationErrors",value:function(t){var e=this;this.previous_error_setting=this.jsoneditor.options.show_errors;var o=t.reduce(function(c,d){return d.path===e.path&&c.push(d.message),c},[]);this.input.controlgroup=this.control,o.length?this.theme.addInputError(this.input,"".concat(o.join(". "),".")):this.theme.removeInputError(this.input)}}])&&cs(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(F);function Mn(u){return Mn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Mn(u)}function ta(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(Mn(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Mn(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Mn(h)==="symbol"?h:String(h)),i)}var h}function Er(){return Er=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=Cr(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},Er.apply(this,arguments)}function an(u,n){return an=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},an(u,n)}function Cr(u){return Cr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Cr(u)}k(2772),k(2707);var hi=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&an(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Cr(i);if(h){var o=Cr(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(Mn(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"setValue",value:function(t,e){var o=this.typecast(t),c=!!this.jsoneditor.options.use_default_values||this.schema.default!==void 0;(this.enum_options.length>0&&!this.enum_values.includes(o)||e&&!this.isRequired()&&!c)&&(o=this.enum_values[0]),this.value!==o&&(e?this.is_dirty=!1:this.jsoneditor.options.show_errors==="change"&&(this.is_dirty=!0),this.input.value=this.enum_options[this.enum_values.indexOf(o)],this.value=o,this.onChange(),this.change())}},{key:"register",value:function(){Er(Cr(s.prototype),"register",this).call(this),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}},{key:"unregister",value:function(){Er(Cr(s.prototype),"unregister",this).call(this),this.input&&this.input.removeAttribute("name")}},{key:"getNumColumns",value:function(){if(!this.enum_options)return 3;for(var t=this.getTitle().length,e=0;e<this.enum_options.length;e++)t=Math.max(t,this.enum_options[e].length+4);return Math.min(12,Math.max(t/7,2))}},{key:"typecast",value:function(t){return this.schema.type==="boolean"?t==="undefined"||t===void 0?void 0:!!t:this.schema.type==="number"?1*t||0:this.schema.type==="integer"?Math.floor(1*t||0):this.schema.enum&&t===void 0?void 0:"".concat(t)}},{key:"getValue",value:function(){if(this.dependenciesFulfilled)return this.typecast(this.value)}},{key:"preBuild",value:function(){var t,e,o=this;if(this.input_type="select",this.enum_options=[],this.enum_values=[],this.enum_display=[],this.schema.enum){var c=this.schema.options&&this.schema.options.enum_titles||[];this.schema.enum.forEach(function(d,_){o.enum_options[_]="".concat(d),o.enum_display[_]="".concat(o.translateProperty(c[_])||d),o.enum_values[_]=o.typecast(d)})}else if(this.schema.type==="boolean")this.enum_display=this.schema.options&&this.schema.options.enum_titles||["true","false"],this.enum_options=["1",""],this.enum_values=[!0,!1],this.isRequired()||(this.enum_display.unshift(" "),this.enum_options.unshift("undefined"),this.enum_values.unshift(void 0));else{if(!this.schema.enumSource)throw new Error("'select' editor requires the enum property to be set.");if(this.enumSource=[],this.enum_display=[],this.enum_options=[],this.enum_values=[],Array.isArray(this.schema.enumSource))for(t=0;t<this.schema.enumSource.length;t++)typeof this.schema.enumSource[t]=="string"?this.enumSource[t]={source:this.schema.enumSource[t]}:Array.isArray(this.schema.enumSource[t])?this.enumSource[t]=this.schema.enumSource[t]:this.enumSource[t]=x({},this.schema.enumSource[t]);else this.schema.enumValue?this.enumSource=[{source:this.schema.enumSource,value:this.schema.enumValue}]:this.enumSource=[{source:this.schema.enumSource}];for(t=0;t<this.enumSource.length;t++)this.enumSource[t].value&&(typeof(e=this.expandCallbacks("template",{template:this.enumSource[t].value})).template=="function"?this.enumSource[t].value=e.template:this.enumSource[t].value=this.jsoneditor.compileTemplate(this.enumSource[t].value,this.template_engine)),this.enumSource[t].title&&(typeof(e=this.expandCallbacks("template",{template:this.enumSource[t].title})).template=="function"?this.enumSource[t].title=e.template:this.enumSource[t].title=this.jsoneditor.compileTemplate(this.enumSource[t].title,this.template_engine)),this.enumSource[t].filter&&this.enumSource[t].value&&(typeof(e=this.expandCallbacks("template",{template:this.enumSource[t].filter})).template=="function"?this.enumSource[t].filter=e.template:this.enumSource[t].filter=this.jsoneditor.compileTemplate(this.enumSource[t].filter,this.template_engine))}}},{key:"build",value:function(){var t=this;this.options.compact||(this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired())),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.translateProperty(this.schema.description))),this.options.infoText&&(this.infoButton=this.theme.getInfoButton(this.translateProperty(this.options.infoText))),this.options.compact&&this.container.classList.add("compact"),this.input=this.theme.getSelectInput(this.enum_options,!1),this.theme.setSelectOptions(this.input,this.enum_options,this.enum_display),(this.schema.readOnly||this.schema.readonly)&&(this.disable(!0),this.input.disabled=!0),this.setInputAttributes([]),this.input.addEventListener("change",function(e){e.preventDefault(),e.stopPropagation(),t.onInputChange()}),this.control=this.theme.getFormControl(this.label,this.input,this.description,this.infoButton),this.container.appendChild(this.control),this.value=this.enum_values[0],window.requestAnimationFrame(function(){t.input.parentNode&&t.afterInputReady()})}},{key:"afterInputReady",value:function(){this.theme.afterInputReady(this.input)}},{key:"onInputChange",value:function(){var t,e=this.typecast(this.input.value);(t=this.enum_values.includes(e)?this.enum_values[this.enum_values.indexOf(e)]:this.enum_values[0])!==this.value&&(this.is_dirty=!0,this.value=t,this.onChange(!0))}},{key:"onWatchedFieldChange",value:function(){var t,e,o=[],c=[];if(this.enumSource){t=this.getWatchedFieldValues();for(var d=0;d<this.enumSource.length;d++)if(Array.isArray(this.enumSource[d]))o=o.concat(this.enumSource[d]),c=c.concat(this.enumSource[d]);else{var _=[];if(_=Array.isArray(this.enumSource[d].source)?this.enumSource[d].source:t[this.enumSource[d].source]){if(this.enumSource[d].slice&&(_=Array.prototype.slice.apply(_,this.enumSource[d].slice)),this.enumSource[d].filter){var P=[];for(e=0;e<_.length;e++)this.enumSource[d].filter({i:e,item:_[e],watched:t})&&P.push(_[e]);_=P}var D=[],J=[];for(e=0;e<_.length;e++){var nt=_[e];this.enumSource[d].value?J[e]=this.typecast(this.enumSource[d].value({i:e,item:nt})):J[e]=_[e],this.enumSource[d].title?D[e]=this.enumSource[d].title({i:e,item:nt}):D[e]=J[e]}this.enumSource[d].sort&&(function(dt,kt,Ct){dt.map(function($t,ne){return{v:$t,t:kt[ne]}}).sort(function($t,ne){return $t.v<ne.v?-Ct:$t.v===ne.v?0:Ct}).forEach(function($t,ne){dt[ne]=$t.v,kt[ne]=$t.t})}).bind(null,J,D,this.enumSource[d].sort==="desc"?1:-1)(),o=o.concat(J),c=c.concat(D)}}var ct=this.value;this.theme.setSelectOptions(this.input,o,c),this.enum_options=o,this.enum_display=c,this.enum_values=o,o.includes(ct)||this.jsoneditor.options.enum_source_value_auto_select!==!1?(this.input.value=ct,this.value=ct):(this.input.value=o[0],this.value=this.typecast(o[0]||""),this.parent&&!this.watchLoop?this.parent.onChildEditorChange(this):this.jsoneditor.onChange(),this.jsoneditor.notifyWatchers(this.path))}Er(Cr(s.prototype),"onWatchedFieldChange",this).call(this)}},{key:"enable",value:function(){this.always_disabled||(this.input.disabled=!1,Er(Cr(s.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.input.disabled=!0,Er(Cr(s.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.label&&this.label.parentNode&&this.label.parentNode.removeChild(this.label),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),Er(Cr(s.prototype),"destroy",this).call(this)}},{key:"showValidationErrors",value:function(t){var e=this;this.previous_error_setting=this.jsoneditor.options.show_errors;var o=t.reduce(function(c,d){return d.path===e.path&&c.push(d.message),c},[]);o.length?this.theme.addInputError(this.input,"".concat(o.join(". "),".")):this.theme.removeInputError(this.input)}}])&&ta(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(F);function Hn(u){return Hn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Hn(u)}function dl(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(Hn(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Hn(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Hn(h)==="symbol"?h:String(h)),i)}var h}function Hr(){return Hr=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=z(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},Hr.apply(this,arguments)}function L(u,n){return L=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},L(u,n)}function z(u){return z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},z(u)}var rt=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&L(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=z(i);if(h){var o=z(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(Hn(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"setValue",value:function(t,e){if(this.choices_instance){var o=this.typecast(t||"");if(this.enum_values.includes(o)||(o=this.enum_values[0]),this.value===o)return;e?this.is_dirty=!1:this.jsoneditor.options.show_errors==="change"&&(this.is_dirty=!0),this.input.value=this.enum_options[this.enum_values.indexOf(o)],this.choices_instance.setChoiceByValue(this.input.value),this.value=o,this.onChange()}else Hr(z(s.prototype),"setValue",this).call(this,t,e)}},{key:"afterInputReady",value:function(){if(window.Choices&&!this.choices_instance){var t=this.expandCallbacks("choices",x({},this.defaults.options.choices||{},this.options.choices||{}));this.choices_instance=new window.Choices(this.input,t)}Hr(z(s.prototype),"afterInputReady",this).call(this)}},{key:"onWatchedFieldChange",value:function(){var t=this;if(Hr(z(s.prototype),"onWatchedFieldChange",this).call(this),this.choices_instance){var e=this.enum_options.map(function(o,c){return{value:o,label:t.enum_display[c]}});this.choices_instance.setChoices(e,"value","label",!0),this.choices_instance.setChoiceByValue("".concat(this.value))}}},{key:"enable",value:function(){!this.always_disabled&&this.choices_instance&&this.choices_instance.enable(),Hr(z(s.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.choices_instance&&this.choices_instance.disable(),Hr(z(s.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.choices_instance&&(this.choices_instance.destroy(),this.choices_instance=null),Hr(z(s.prototype),"destroy",this).call(this)}}])&&dl(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(hi);function K(u){return K=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},K(u)}function yt(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(K(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(K(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),K(h)==="symbol"?h:String(h)),i)}var h}function Dt(){return Dt=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=ft(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},Dt.apply(this,arguments)}function Jt(u,n){return Jt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Jt(u,n)}function ft(u){return ft=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ft(u)}rt.rules={".choices > *":"box-sizing:border-box"};var vt=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Jt(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=ft(i);if(h){var o=ft(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(K(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"build",value:function(){if(Dt(ft(s.prototype),"build",this).call(this),this.input&&(this.schema.max&&typeof this.schema.max=="string"&&this.input.setAttribute("max",this.schema.max),this.schema.min&&typeof this.schema.max=="string"&&this.input.setAttribute("min",this.schema.min),window.flatpickr&&K(this.options.flatpickr)==="object")){this.options.flatpickr.enableTime=this.schema.format!=="date",this.options.flatpickr.noCalendar=this.schema.format==="time",this.schema.type==="integer"&&(this.options.flatpickr.mode="single"),this.input.setAttribute("data-input","");var t=this.input;if(this.options.flatpickr.wrap===!0){var e=[];if(this.options.flatpickr.showToggleButton!==!1){var o=this.getButton("",this.schema.format==="time"?"time":"calendar","flatpickr_toggle_button");o.setAttribute("data-toggle",""),e.push(o)}if(this.options.flatpickr.showClearButton!==!1){var c=this.getButton("","clear","flatpickr_clear_button");c.setAttribute("data-clear",""),e.push(c)}var d=this.input.parentNode,_=this.input.nextSibling,P=this.theme.getInputGroup(this.input,e);P!==void 0?(this.options.flatpickr.inline=!1,d.insertBefore(P,_),t=P):this.options.flatpickr.wrap=!1}this.flatpickr=window.flatpickr(t,this.options.flatpickr),this.options.flatpickr.inline===!0&&this.options.flatpickr.inlineHideInput===!0&&this.input.setAttribute("type","hidden")}}},{key:"getValue",value:function(){if(this.dependenciesFulfilled){if(this.schema.type==="string")return this.value;if(this.value!==""&&this.value!==void 0){var t=this.schema.format==="time"?"1970-01-01 ".concat(this.value):this.value;return parseInt(new Date(t).getTime()/1e3)}}}},{key:"setValue",value:function(t,e,o){if(this.schema.type==="string")Dt(ft(s.prototype),"setValue",this).call(this,t,e,o),this.flatpickr&&this.flatpickr.setDate(t);else if(t>0){var c=new Date(1e3*t),d=c.getFullYear(),_=this.zeroPad(c.getMonth()+1),P=this.zeroPad(c.getDate()),D=this.zeroPad(c.getHours()),J=this.zeroPad(c.getMinutes()),nt=this.zeroPad(c.getSeconds()),ct=[d,_,P].join("-"),dt=[D,J,nt].join(":"),kt="".concat(ct,"T").concat(dt);this.schema.format==="date"?kt=ct:this.schema.format==="time"&&(kt=dt),this.input.value=kt,this.refreshValue(),this.flatpickr&&this.flatpickr.setDate(kt)}}},{key:"destroy",value:function(){this.flatpickr&&this.flatpickr.destroy(),this.flatpickr=null,Dt(ft(s.prototype),"destroy",this).call(this)}},{key:"zeroPad",value:function(t){return"0".concat(t).slice(-2)}}])&&yt(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(Q);function Wt(u){return Wt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Wt(u)}function oe(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(Wt(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Wt(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Wt(h)==="symbol"?h:String(h)),i)}var h}function Tt(){return Tt=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=Be(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},Tt.apply(this,arguments)}function ue(u,n){return ue=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},ue(u,n)}function Be(u){return Be=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Be(u)}var nr=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ue(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Be(i);if(h){var o=Be(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(Wt(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"register",value:function(){if(this.editors){for(var t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].unregister();this.editors[this.currentEditor]&&this.editors[this.currentEditor].register()}Tt(Be(s.prototype),"register",this).call(this)}},{key:"unregister",value:function(){if(Tt(Be(s.prototype),"unregister",this).call(this),this.editors)for(var t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].unregister()}},{key:"getNumColumns",value:function(){return this.editors[this.currentEditor]?Math.max(this.editors[this.currentEditor].getNumColumns(),4):4}},{key:"enable",value:function(){if(this.editors)for(var t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].enable();Tt(Be(s.prototype),"enable",this).call(this)}},{key:"disable",value:function(){if(this.editors)for(var t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].disable();Tt(Be(s.prototype),"disable",this).call(this)}},{key:"switchEditor",value:function(){var t=this,e=this.getWatchedFieldValues();if(e){var o=document.location.origin+document.location.pathname+this.template(e);this.editors[this.refs[o]]||this.buildChildEditor(o),this.currentEditor=this.refs[o],this.register(),this.editors.forEach(function(c,d){c&&(t.currentEditor===d?c.container.style.display="":c.container.style.display="none")}),this.refreshValue(),this.onChange(!0)}}},{key:"buildChildEditor",value:function(t){this.refs[t]=this.editors.length;var e=this.theme.getChildEditorHolder();this.editor_holder.appendChild(e);var o=x({},this.schema,this.jsoneditor.refs[t]),c=this.jsoneditor.getEditorClass(o,this.jsoneditor),d=this.jsoneditor.createEditor(c,{jsoneditor:this.jsoneditor,schema:o,container:e,path:this.path,parent:this,required:!0});this.editors.push(d),d.preBuild(),d.build(),d.postBuild()}},{key:"preBuild",value:function(){var t;for(this.refs={},this.editors=[],this.currentEditor="",t=0;t<this.schema.links.length;t++)if(this.schema.links[t].rel.toLowerCase()==="describedby"){this.template=this.jsoneditor.compileTemplate(this.schema.links[t].href,this.template_engine);break}this.schema.links=this.schema.links.slice(0,t).concat(this.schema.links.slice(t+1)),this.schema.links.length===0&&delete this.schema.links,this.baseSchema=x({},this.schema)}},{key:"build",value:function(){this.editor_holder=document.createElement("div"),this.container.appendChild(this.editor_holder),this.switchEditor()}},{key:"onWatchedFieldChange",value:function(){this.switchEditor()}},{key:"onChildEditorChange",value:function(t){this.editors[this.currentEditor]&&this.refreshValue(),Tt(Be(s.prototype),"onChildEditorChange",this).call(this,t)}},{key:"refreshValue",value:function(){this.editors[this.currentEditor]&&(this.value=this.editors[this.currentEditor].getValue())}},{key:"setValue",value:function(t,e){this.editors[this.currentEditor]&&(this.editors[this.currentEditor].setValue(t,e),this.refreshValue(),this.onChange())}},{key:"destroy",value:function(){this.editors.forEach(function(t){t&&t.destroy()}),this.editor_holder&&this.editor_holder.parentNode&&this.editor_holder.parentNode.removeChild(this.editor_holder),Tt(Be(s.prototype),"destroy",this).call(this)}},{key:"showValidationErrors",value:function(t){this.editors.forEach(function(e){e&&e.showValidationErrors(t)})}}])&&oe(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(F);function It(u){return It=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},It(u)}function ee(u,n){(n==null||n>u.length)&&(n=u.length);for(var f=0,i=new Array(n);f<n;f++)i[f]=u[f];return i}function zt(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(It(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(It(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),It(h)==="symbol"?h:String(h)),i)}var h}function ye(){return ye=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=Ee(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},ye.apply(this,arguments)}function Ue(u,n){return Ue=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Ue(u,n)}function Ee(u){return Ee=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ee(u)}var $e=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ue(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Ee(i);if(h){var o=Ee(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(It(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"getNumColumns",value:function(){return 4}},{key:"build",value:function(){var t=this;this.title=this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired()),this.container.appendChild(this.title),this.options.enum_titles=this.options.enum_titles||[],this.enum=this.schema.enum,this.selected=0,this.select_options=[],this.html_values=[];for(var e=0;e<this.enum.length;e++)this.select_options[e]=this.options.enum_titles[e]||"Value ".concat(e+1),this.html_values[e]=this.getHTML(this.enum[e]);this.switcher=this.theme.getSwitcher(this.select_options),this.container.appendChild(this.switcher),this.display_area=this.theme.getIndentedPanel(),this.container.appendChild(this.display_area),this.options.hide_display&&(this.display_area.style.display="none"),this.switcher.addEventListener("change",function(o){t.selected=t.select_options.indexOf(o.currentTarget.value),t.value=t.enum[t.selected],t.refreshValue(),t.onChange(!0)}),this.value=this.enum[0],this.refreshValue(),this.enum.length===1&&(this.switcher.style.display="none")}},{key:"refreshValue",value:function(){var t=this;this.selected=-1;var e=JSON.stringify(this.value);this.enum.forEach(function(o,c){if(e===JSON.stringify(o))return t.selected=c,!1}),this.selected<0?this.setValue(this.enum[0]):(this.switcher.value=this.select_options[this.selected],this.display_area.innerHTML=this.html_values[this.selected])}},{key:"enable",value:function(){this.always_disabled||(this.switcher.disabled=!1,ye(Ee(s.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.switcher.disabled=!0,ye(Ee(s.prototype),"disable",this).call(this)}},{key:"getHTML",value:function(t){var e,o,c=this;if(t===null)return"<em>null</em>";if(It(t)==="object"){var d="";return e=t,o=function(_,P){var D=c.getHTML(P);Array.isArray(t)||(D="<div><em>".concat(_,"</em>: ").concat(D,"</div>")),d+="<li>".concat(D,"</li>")},Array.isArray(e)||typeof e.length=="number"&&e.length>0&&e.length-1 in e?Array.from(e).forEach(function(_,P){return o(P,_)}):Object.entries(e).forEach(function(_){var P,D,J=(D=2,function(dt){if(Array.isArray(dt))return dt}(P=_)||function(dt,kt){var Ct=dt==null?null:typeof Symbol<"u"&&dt[Symbol.iterator]||dt["@@iterator"];if(Ct!=null){var $t,ne,Re,Gt,gt=[],Zt=!0,Ge=!1;try{if(Re=(Ct=Ct.call(dt)).next,kt===0){if(Object(Ct)!==Ct)return;Zt=!1}else for(;!(Zt=($t=Re.call(Ct)).done)&&(gt.push($t.value),gt.length!==kt);Zt=!0);}catch(W){Ge=!0,ne=W}finally{try{if(!Zt&&Ct.return!=null&&(Gt=Ct.return(),Object(Gt)!==Gt))return}finally{if(Ge)throw ne}}return gt}}(P,D)||function(dt,kt){if(dt){if(typeof dt=="string")return ee(dt,kt);var Ct=Object.prototype.toString.call(dt).slice(8,-1);return Ct==="Object"&&dt.constructor&&(Ct=dt.constructor.name),Ct==="Map"||Ct==="Set"?Array.from(dt):Ct==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ct)?ee(dt,kt):void 0}}(P,D)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
62
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()),nt=J[0],ct=J[1];return o(nt,ct)}),d=Array.isArray(t)?"<ol>".concat(d,"</ol>"):"<ul style='margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:0;'>".concat(d,"</ul>")}return typeof t=="boolean"?t?"true":"false":typeof t=="string"?t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"):t}},{key:"setValue",value:function(t){this.value!==t&&(this.value=t,this.refreshValue(),this.onChange())}},{key:"destroy",value:function(){this.display_area&&this.display_area.parentNode&&this.display_area.parentNode.removeChild(this.display_area),this.title&&this.title.parentNode&&this.title.parentNode.removeChild(this.title),this.switcher&&this.switcher.parentNode&&this.switcher.parentNode.removeChild(this.switcher),ye(Ee(s.prototype),"destroy",this).call(this)}}])&&zt(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(F);function ke(u){return ke=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ke(u)}function fr(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(ke(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(ke(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),ke(h)==="symbol"?h:String(h)),i)}var h}function Me(){return Me=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=Sr(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},Me.apply(this,arguments)}function Fr(u,n){return Fr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Fr(u,n)}function Sr(u){return Sr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Sr(u)}var ds=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Fr(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Sr(i);if(h){var o=Sr(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(ke(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"register",value:function(){Me(Sr(s.prototype),"register",this).call(this),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}},{key:"unregister",value:function(){Me(Sr(s.prototype),"unregister",this).call(this),this.input&&this.input.removeAttribute("name")}},{key:"setValue",value:function(t,e,o){if((!this.template||o)&&(t==null?t="":ke(t)==="object"?t=JSON.stringify(t):typeof t!="string"&&(t="".concat(t)),t!==this.serialized)){var c=this.sanitize(t);if(this.input.value!==c){this.input.value=c;var d=o||this.getValue()!==t;this.refreshValue(),e?this.is_dirty=!1:this.jsoneditor.options.show_errors==="change"&&(this.is_dirty=!0),this.adjust_height&&this.adjust_height(this.input),this.onChange(d)}}}},{key:"getNumColumns",value:function(){return 2}},{key:"enable",value:function(){Me(Sr(s.prototype),"enable",this).call(this)}},{key:"disable",value:function(){Me(Sr(s.prototype),"disable",this).call(this)}},{key:"refreshValue",value:function(){this.value=this.input.value,typeof this.value!="string"&&(this.value=""),this.serialized=this.value}},{key:"destroy",value:function(){this.template=null,this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),this.label&&this.label.parentNode&&this.label.parentNode.removeChild(this.label),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),Me(Sr(s.prototype),"destroy",this).call(this)}},{key:"sanitize",value:function(t){return t}},{key:"onWatchedFieldChange",value:function(){var t;this.template&&(t=this.getWatchedFieldValues(),this.setValue(this.template(t),!1,!0)),Me(Sr(s.prototype),"onWatchedFieldChange",this).call(this)}},{key:"build",value:function(){if(this.format=this.schema.format,!this.format&&this.options.default_format&&(this.format=this.options.default_format),this.options.format&&(this.format=this.options.format),this.input_type="hidden",this.input=this.theme.getFormInputField(this.input_type),this.format&&this.input.setAttribute("data-schemaformat",this.format),this.container.appendChild(this.input),this.schema.template){var t=this.expandCallbacks("template",{template:this.schema.template});typeof t.template=="function"?this.template=t.template:this.template=this.jsoneditor.compileTemplate(this.schema.template,this.template_engine),this.refreshValue()}else this.refreshValue()}}])&&fr(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(F);function Wr(u){return Wr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Wr(u)}function pl(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(Wr(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Wr(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Wr(h)==="symbol"?h:String(h)),i)}var h}function Ui(u,n){return Ui=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Ui(u,n)}function Vr(u){return Vr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Vr(u)}var qi=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ui(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Vr(i);if(h){var o=Vr(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(Wr(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"build",value:function(){this.options.compact=!1,this.header=this.label=this.theme.getFormInputLabel(this.getTitle()),this.description=this.theme.getDescription(this.schema.description||""),this.control=this.theme.getFormControl(this.label,this.description,null),this.container.appendChild(this.control)}},{key:"getTitle",value:function(){return this.translateProperty(this.schema.title)}},{key:"getNumColumns",value:function(){return 12}}])&&pl(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(us);function On(u){return On=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},On(u)}function ps(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(On(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(On(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),On(h)==="symbol"?h:String(h)),i)}var h}function Gi(){return Gi=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=Fn(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},Gi.apply(this,arguments)}function Wi(u,n){return Wi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Wi(u,n)}function Fn(u){return Fn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Fn(u)}var fs=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Wi(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Fn(i);if(h){var o=Fn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(On(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"build",value:function(){if(Gi(Fn(s.prototype),"build",this).call(this),this.schema.minimum!==void 0){var t=this.schema.minimum;this.schema.exclusiveMinimum!==void 0&&(t+=1),this.input.setAttribute("min",t)}if(this.schema.maximum!==void 0){var e=this.schema.maximum;this.schema.exclusiveMaximum!==void 0&&(e-=1),this.input.setAttribute("max",e)}if(this.schema.step!==void 0){var o=this.schema.step||1;this.input.setAttribute("step",o)}this.setInputAttributes(["maxlength","pattern","readonly","min","max","step"])}},{key:"getNumColumns",value:function(){return 2}},{key:"getValue",value:function(){if(this.dependenciesFulfilled)return this.schema.default||this.jsoneditor.options.use_default_values||this.value!==""?function(t){if(t==null)return!1;var e=t.match(T),o=parseFloat(t);return e!==null&&!isNaN(o)&&isFinite(o)}(this.value)?parseFloat(this.value):this.value:void(this.shouldBeUnset()&&(this.input.value=""))}}])&&ps(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(Q);function zr(u){return zr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},zr(u)}function di(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(zr(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(zr(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),zr(h)==="symbol"?h:String(h)),i)}var h}function Zr(u,n){return Zr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Zr(u,n)}function Zi(u){return Zi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Zi(u)}var ys=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Zr(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Zi(i);if(h){var o=Zi(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(zr(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"getNumColumns",value:function(){return 2}},{key:"getValue",value:function(){if(this.dependenciesFulfilled)return this.schema.default||this.jsoneditor.options.use_default_values||this.value!==""?function(t){if(t==null)return!1;var e=t.match(A),o=parseInt(t);return e!==null&&!isNaN(o)&&isFinite(o)}(this.value)?parseInt(this.value):this.value:void this.shouldBeUnset()}}])&&di(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(fs);function Vn(u){return Vn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Vn(u)}function Ji(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(Vn(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Vn(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Vn(h)==="symbol"?h:String(h)),i)}var h}function sn(){return sn=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=Jr(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},sn.apply(this,arguments)}function zn(u,n){return zn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},zn(u,n)}function Jr(u){return Jr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Jr(u)}var ea=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&zn(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Jr(i);if(h){var o=Jr(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(Vn(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"preBuild",value:function(){if(sn(Jr(s.prototype),"preBuild",this).call(this),this.schema.options||(this.schema.options={}),!this.schema.options.cleave)switch(this.format){case"ipv6":this.schema.options.cleave={delimiters:[":"],blocks:[4,4,4,4,4,4,4,4],uppercase:!0};break;case"ipv4":this.schema.options.cleave={delimiters:["."],blocks:[3,3,3,3],numericOnly:!0}}this.options=x(this.options,this.schema.options||{})}}])&&Ji(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(Q);function Un(u){return Un=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Un(u)}function fl(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(Un(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Un(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Un(h)==="symbol"?h:String(h)),i)}var h}function Yr(){return Yr=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=Pr(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},Yr.apply(this,arguments)}function Yi(u,n){return Yi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Yi(u,n)}function Pr(u){return Pr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Pr(u)}var ms=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Yi(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Pr(i);if(h){var o=Pr(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(Un(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"setValue",value:function(t,e,o){var c=Yr(Pr(s.prototype),"setValue",this).call(this,t,e,o);c!==void 0&&c.changed&&this.jodit_instance&&this.jodit_instance.setEditorValue(c.value)}},{key:"build",value:function(){this.options.format="textarea",Yr(Pr(s.prototype),"build",this).call(this),this.input_type=this.schema.format,this.input.setAttribute("data-schemaformat",this.input_type)}},{key:"afterInputReady",value:function(){var t,e=this;window.Jodit?(t=this.expandCallbacks("jodit",x({},{height:300},this.defaults.options.jodit||{},this.options.jodit||{})),this.jodit_instance=new window.Jodit(this.input,t),(this.schema.readOnly||this.schema.readonly||this.schema.template)&&this.jodit_instance.setReadOnly(!0),this.jodit_instance.events.on("change",function(){e.value=e.jodit_instance.getEditorValue(),e.is_dirty=!0,e.onChange(!0)}),this.theme.afterInputReady(this.input)):Yr(Pr(s.prototype),"afterInputReady",this).call(this)}},{key:"getNumColumns",value:function(){return 6}},{key:"enable",value:function(){!this.always_disabled&&this.jodit_instance&&this.jodit_instance.setReadOnly(!1),Yr(Pr(s.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.jodit_instance&&this.jodit_instance.setReadOnly(!0),Yr(Pr(s.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.jodit_instance&&(this.jodit_instance.destruct(),this.jodit_instance=null),Yr(Pr(s.prototype),"destroy",this).call(this)}}])&&fl(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(Q),bs=(k(6541),k(9337),k(3321),function(u){var n=u.split(".");if(n.length!==4)throw new Error("error_ipv4");n.forEach(function(f){if(isNaN(+f)||+f<0||+f>255)throw new Error("error_ipv4")})}),ra=function(u){if(!u.match("^(?:(?:(?:[a-fA-F0-9]{1,4}:){6}|(?=(?:[a-fA-F0-9]{0,4}:){2,6}(?:[0-9]{1,3}.){3}[0-9]{1,3}$)(([0-9a-fA-F]{1,4}:){1,5}|:)((:[0-9a-fA-F]{1,4}){1,5}:|:)|::(?:[a-fA-F0-9]{1,4}:){5})(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9]).){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])|(?:[a-fA-F0-9]{1,4}:){7}[a-fA-F0-9]{1,4}|(?=(?:[a-fA-F0-9]{0,4}:){0,7}[a-fA-F0-9]{0,4}$)(([0-9a-fA-F]{1,4}:){1,7}|:)((:[0-9a-fA-F]{1,4}){1,7}|:)|(?:[a-fA-F0-9]{1,4}:){7}:|:(:[a-fA-F0-9]{1,4}){7})$"))throw new Error("error_ipv6")},na=function(u){if(!u.match("(?=^.{4,253}$)(^((?!-)[a-zA-Z0-9-]{0,62}[a-zA-Z0-9].)+[a-zA-Z]{2,63}$)"))throw new Error("error_hostname")};function ia(u,n,f,i){try{switch(u.format){case"ipv4":bs(n);break;case"ipv6":ra(n);break;case"hostname":na(n)}return[]}catch(h){return[{path:f,property:"format",message:i(h.message)}]}}function Xi(u,n){var f=Object.keys(u);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(u);n&&(i=i.filter(function(h){return Object.getOwnPropertyDescriptor(u,h).enumerable})),f.push.apply(f,i)}return f}function oa(u,n,f){return(n=Qi(n))in u?Object.defineProperty(u,n,{value:f,enumerable:!0,configurable:!0,writable:!0}):u[n]=f,u}function pi(u,n){return function(f){if(Array.isArray(f))return f}(u)||function(f,i){var h=f==null?null:typeof Symbol<"u"&&f[Symbol.iterator]||f["@@iterator"];if(h!=null){var a,s,t,e,o=[],c=!0,d=!1;try{if(t=(h=h.call(f)).next,i===0){if(Object(h)!==h)return;c=!1}else for(;!(c=(a=t.call(h)).done)&&(o.push(a.value),o.length!==i);c=!0);}catch(_){d=!0,s=_}finally{try{if(!c&&h.return!=null&&(e=h.return(),Object(e)!==e))return}finally{if(d)throw s}}return o}}(u,n)||fi(u,n)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
63
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function yr(u){return yr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},yr(u)}function Oe(u){return function(n){if(Array.isArray(n))return yi(n)}(u)||function(n){if(typeof Symbol<"u"&&n[Symbol.iterator]!=null||n["@@iterator"]!=null)return Array.from(n)}(u)||fi(u)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
64
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function fi(u,n){if(u){if(typeof u=="string")return yi(u,n);var f=Object.prototype.toString.call(u).slice(8,-1);return f==="Object"&&u.constructor&&(f=u.constructor.name),f==="Map"||f==="Set"?Array.from(u):f==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(f)?yi(u,n):void 0}}function yi(u,n){(n==null||n>u.length)&&(n=u.length);for(var f=0,i=new Array(n);f<n;f++)i[f]=u[f];return i}function aa(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,Qi(i.key),i)}}function Qi(u){var n=function(f,i){if(yr(f)!=="object"||f===null)return f;var h=f[Symbol.toPrimitive];if(h!==void 0){var a=h.call(f,"string");if(yr(a)!=="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(f)}(u);return yr(n)==="symbol"?n:String(n)}var Ki=function(){function u(i,h,a,s){(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,u),this.jsoneditor=i,this.schema=h||this.jsoneditor.schema,this.options=a||{},this.translate=this.jsoneditor.translate||s.translate,this.translateProperty=this.jsoneditor.translateProperty||s.translateProperty,this.defaults=s,this._validateSubSchema={dependentRequired:function(t,e,o){var c=[];if(t.dependentRequired!==void 0){var d=[];Object.keys(t.dependentRequired).forEach(function(_){if(e[_]!==void 0){var P=t.dependentRequired[_];d=P.filter(function(D){return!S(e,D)})}}),d.length>0&&c.push({message:"Must have the required properties: "+d.join(", "),path:o})}return c},dependentSchemas:function(t,e,o){var c=this,d=[];return Object.keys(t.dependentSchemas).forEach(function(_){if(e[_]!==void 0){var P=t.dependentSchemas[_],D=c._validateSchema(P,e,o);d=[].concat(Oe(d),Oe(D))}}),d},contains:function(t,e,o){var c=this,d=[],_=0;e.forEach(function(D){c._validateSchema(t.contains,D,o).length===0&&_++});var P=_===0;return t.minContains!==void 0?_<t.minContains&&d.push({message:this.translate("error_minContains",[_,t.minContains],t),path:o}):P&&d.push({message:this.translate("error_contains",null,t),path:o}),t.maxContains!==void 0&&_>t.maxContains&&d.push({message:this.translate("error_maxContains",[_,t.maxContains],t),path:o}),d},if:function(t,e,o){if(t.then===void 0&&t.else===void 0)return[];var c=this._validateSchema(t.if,e,o),d=[],_=[];return t.then!==void 0&&(d=this._validateSchema(t.then,e,o)),t.else!==void 0&&(_=this._validateSchema(t.else,e,o)),t.if===!0?d:t.if===!1?_:c.length===0?d:c.length>0?_:[]},const:function(t,e,o){return JSON.stringify(t.const)!==JSON.stringify(e)||Array.isArray(e)||yr(e)==="object"?[{path:o,property:"const",message:this.translate("error_const",null,t)}]:[]},enum:function(t,e,o){var c=JSON.stringify(e);return t.enum.some(function(d){return c===JSON.stringify(d)})?[]:[{path:o,property:"enum",message:this.translate("error_enum",null,t)}]},extends:function(t,e,o){var c=this;return t.extends.reduce(function(d,_){return d.push.apply(d,Oe(c._validateSchema(_,e,o))),d},[])},allOf:function(t,e,o){var c=this;return t.allOf.reduce(function(d,_){return d.push.apply(d,Oe(c._validateSchema(_,e,o))),d},[])},anyOf:function(t,e,o){var c=this;return t.anyOf.some(function(d){return!c._validateSchema(d,e,o).length})?[]:[{path:o,property:"anyOf",message:this.translate("error_anyOf",null,t)}]},oneOf:function(t,e,o){var c=this,d=0,_=[];t.oneOf.forEach(function(D,J){var nt=c._validateSchema(D,e,o);nt.length||d++,nt.forEach(function(ct){ct.path="".concat(o,".oneOf[").concat(J,"]").concat(ct.path.substr(o.length))}),_.push.apply(_,Oe(nt))});var P=[];return d!==1&&(P.push({path:o,property:"oneOf",message:this.translate("error_oneOf",[d],t)}),P.push.apply(P,_)),P},not:function(t,e,o){return this._validateSchema(t.not,e,o).length?[]:[{path:o,property:"not",message:this.translate("error_not",null,t)}]},type:function(t,e,o){var c=this;if(Array.isArray(t.type)){if(!t.type.some(function(d){return c._checkType(d,e)}))return[{path:o,property:"type",message:this.translate("error_type_union",null,t)}]}else if(["date","time","datetime-local"].includes(t.format)&&t.type==="integer"){if(!this._checkType("string","".concat(e)))return[{path:o,property:"type",message:this.translate("error_type",[t.format],t)}]}else if(!this._checkType(t.type,e))return[{path:o,property:"type",message:this.translate("error_type",[t.type],t)}];return[]},disallow:function(t,e,o){var c=this;if(Array.isArray(t.disallow)){if(t.disallow.some(function(d){return c._checkType(d,e)}))return[{path:o,property:"disallow",message:this.translate("error_disallow_union",null,t)}]}else if(this._checkType(t.disallow,e))return[{path:o,property:"disallow",message:this.translate("error_disallow",[t.disallow],t)}];return[]}},this._validateNumberSubSchema={multipleOf:function(t,e,o){return this._validateNumberSubSchemaMultipleDivisible(t,e,o)},divisibleBy:function(t,e,o){return this._validateNumberSubSchemaMultipleDivisible(t,e,o)},maximum:function(t,e,o){var c=t.exclusiveMaximum?e<t.maximum:e<=t.maximum;return window.math?c=window.math[t.exclusiveMaximum?"smaller":"smallerEq"](window.math.bignumber(e),window.math.bignumber(t.maximum)):window.Decimal&&(c=new window.Decimal(e)[t.exclusiveMaximum?"lt":"lte"](new window.Decimal(t.maximum))),c?[]:[{path:o,property:"maximum",message:this.translate(t.exclusiveMaximum?"error_maximum_excl":"error_maximum_incl",[t.maximum],t)}]},minimum:function(t,e,o){var c=t.exclusiveMinimum?e>t.minimum:e>=t.minimum;return window.math?c=window.math[t.exclusiveMinimum?"larger":"largerEq"](window.math.bignumber(e),window.math.bignumber(t.minimum)):window.Decimal&&(c=new window.Decimal(e)[t.exclusiveMinimum?"gt":"gte"](new window.Decimal(t.minimum))),c?[]:[{path:o,property:"minimum",message:this.translate(t.exclusiveMinimum?"error_minimum_excl":"error_minimum_incl",[t.minimum],t)}]}},this._validateStringSubSchema={maxLength:function(t,e,o){var c=[];return"".concat(e).length>t.maxLength&&c.push({path:o,property:"maxLength",message:this.translate("error_maxLength",[t.maxLength],t)}),c},minLength:function(t,e,o){return"".concat(e).length<t.minLength?[{path:o,property:"minLength",message:this.translate(t.minLength===1?"error_notempty":"error_minLength",[t.minLength],t)}]:[]},pattern:function(t,e,o){return new RegExp(t.pattern).test(e)?[]:[{path:o,property:"pattern",message:t.options&&t.options.patternmessage?t.options.patternmessage:this.translate("error_pattern",[t.pattern],t)}]}},this._validateArraySubSchema={items:function(t,e,o){var c=this,d=[];if(Array.isArray(t.items))for(var _=0;_<e.length;_++)if(t.items[_])d.push.apply(d,Oe(this._validateSchema(t.items[_],e[_],"".concat(o,".").concat(_))));else{if(t.additionalItems===!0)break;if(!t.additionalItems){if(t.additionalItems===!1){d.push({path:o,property:"additionalItems",message:this.translate("error_additionalItems",null,t)});break}break}d.push.apply(d,Oe(this._validateSchema(t.additionalItems,e[_],"".concat(o,".").concat(_))))}else e.forEach(function(P,D){d.push.apply(d,Oe(c._validateSchema(t.items,P,"".concat(o,".").concat(D))))});return d},maxItems:function(t,e,o){return e.length>t.maxItems?[{path:o,property:"maxItems",message:this.translate("error_maxItems",[t.maxItems],t)}]:[]},minItems:function(t,e,o){return e.length<t.minItems?[{path:o,property:"minItems",message:this.translate("error_minItems",[t.minItems],t)}]:[]},uniqueItems:function(t,e,o){for(var c={},d=0;d<e.length;d++){var _=JSON.stringify(e[d]);if(c[_])return[{path:o,property:"uniqueItems",message:this.translate("error_uniqueItems",null,t)}];c[_]=!0}return[]}},this._validateObjectSubSchema={maxProperties:function(t,e,o){return Object.keys(e).length>t.maxProperties?[{path:o,property:"maxProperties",message:this.translate("error_maxProperties",[t.maxProperties],t)}]:[]},minProperties:function(t,e,o){return Object.keys(e).length<t.minProperties?[{path:o,property:"minProperties",message:this.translate("error_minProperties",[t.minProperties],t)}]:[]},required:function(t,e,o){var c=this,d=[];return Array.isArray(t.required)&&t.required.forEach(function(_){if(e[_]===void 0){var P=c.jsoneditor.getEditor("".concat(o,".").concat(_));P&&P.dependenciesFulfilled===!1||P&&["button","info"].includes(P.schema.format||P.schema.type)||d.push({path:o,property:"required",message:c.translate("error_required",[t&&t.properties&&t.properties[_]&&t.properties[_].title?t.properties[_].title:_],t)})}}),d},properties:function(t,e,o,c){var d=this,_=[];return Object.entries(t.properties).forEach(function(P){var D=pi(P,2),J=D[0],nt=D[1];c[J]=!0,_.push.apply(_,Oe(d._validateSchema(nt,e[J],"".concat(o,".").concat(J))))}),_},patternProperties:function(t,e,o,c){var d=this,_=[];return Object.entries(t.patternProperties).forEach(function(P){var D=pi(P,2),J=D[0],nt=D[1],ct=new RegExp(J);Object.entries(e).forEach(function(dt){var kt=pi(dt,2),Ct=kt[0],$t=kt[1];ct.test(Ct)&&(c[Ct]=!0,_.push.apply(_,Oe(d._validateSchema(nt,$t,"".concat(o,".").concat(Ct)))))})}),_}},this._validateObjectSubSchema2={propertyNames:function(t,e,o,c){for(var d=this,_=[],P=Object.keys(e),D=null,J=function(){var dt="";return D=P[nt],typeof t.propertyNames=="boolean"?t.propertyNames===!0?"continue":(_.push({path:o,property:"propertyNames",message:d.translate("error_property_names_false",[D],t)}),"break"):Object.entries(t.propertyNames).every(function(kt){var Ct=pi(kt,2),$t=Ct[0],ne=Ct[1],Re=!1;switch($t){case"maxLength":if(typeof ne!="number"){dt="error_property_names_maxlength";break}if(D.length>ne){dt="error_property_names_exceeds_maxlength";break}return!0;case"const":if(ne!==D){dt="error_property_names_const_mismatch";break}return!0;case"enum":if(!Array.isArray(ne)){dt="error_property_names_enum";break}if(ne.forEach(function(Gt){Gt===D&&(Re=!0)}),!Re){dt="error_property_names_enum_mismatch";break}return!0;case"pattern":if(typeof ne!="string"){dt="error_property_names_pattern";break}if(!new RegExp(ne).test(D)){dt="error_property_names_pattern_mismatch";break}return!0;default:return _.push({path:o,property:"propertyNames",message:d.translate("error_property_names_unsupported",[$t],t)}),!1}return _.push({path:o,property:"propertyNames",message:d.translate(dt,[D],t)}),!1})?void 0:"break"},nt=0;nt<P.length;nt++){var ct=J();if(ct!=="continue"&&ct==="break")break}return _},additionalProperties:function(t,e,o,c){for(var d=[],_=Object.keys(e),P=0;P<_.length;P++){var D=_[P];if(!c[D]){if(!t.additionalProperties){d.push({path:o,property:"additionalProperties",message:this.translate("error_additional_properties",[D],t)});break}if(t.additionalProperties===!0)break;d.push.apply(d,Oe(this._validateSchema(t.additionalProperties,e[D],"".concat(o,".").concat(D))))}}return d},dependencies:function(t,e,o){var c=this,d=[];return Object.entries(t.dependencies).forEach(function(_){var P=pi(_,2),D=P[0],J=P[1];e[D]!==void 0&&(Array.isArray(J)?J.forEach(function(nt){e[nt]===void 0&&d.push({path:o,property:"dependencies",message:c.translate("error_dependency",[nt],t)})}):d.push.apply(d,Oe(c._validateSchema(J,e,o))))}),d}}}var n,f;return n=u,f=[{key:"fitTest",value:function(i,h){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1e7,s={match:0,extra:0};if(yr(i)==="object"&&i!==null){var t=this._getSchema(h);if(t.anyOf){var e,o=function(nt){for(var ct=1;ct<arguments.length;ct++){var dt=arguments[ct]!=null?arguments[ct]:{};ct%2?Xi(Object(dt),!0).forEach(function(kt){oa(nt,kt,dt[kt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(nt,Object.getOwnPropertyDescriptors(dt)):Xi(Object(dt)).forEach(function(kt){Object.defineProperty(nt,kt,Object.getOwnPropertyDescriptor(dt,kt))})}return nt}({},s),c=function(nt,ct){var dt=typeof Symbol<"u"&&nt[Symbol.iterator]||nt["@@iterator"];if(!dt){if(Array.isArray(nt)||(dt=fi(nt))){dt&&(nt=dt);var kt=0,Ct=function(){};return{s:Ct,n:function(){return kt>=nt.length?{done:!0}:{done:!1,value:nt[kt++]}},e:function(Gt){throw Gt},f:Ct}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
65
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var $t,ne=!0,Re=!1;return{s:function(){dt=dt.call(nt)},n:function(){var Gt=dt.next();return ne=Gt.done,Gt},e:function(Gt){Re=!0,$t=Gt},f:function(){try{ne||dt.return==null||dt.return()}finally{if(Re)throw $t}}}}(t.anyOf);try{for(c.s();!(e=c.n()).done;){var d=e.value,_=this.fitTest(i,d,a);(_.match>o.match||_.match===o.match&&_.extra<o.extra)&&(o=_)}}catch(nt){c.e(nt)}finally{c.f()}return o}var P=this._getSchema(h).properties;for(var D in P)if(S(P,D)){if(yr(i[D])==="object"&&yr(P[D])==="object"&&yr(P[D].properties)==="object"){var J=this.fitTest(i[D],P[D],a/100);s.match+=J.match,s.extra+=J.extra}i[D]!==void 0&&(s.match+=a)}else s.extra+=a}return s}},{key:"_getSchema",value:function(i){return i===void 0?x({},this.jsoneditor.expandRefs(this.schema)):i}},{key:"validate",value:function(i){return this._validateSchema(this.schema,i)}},{key:"_validateSchema",value:function(i,h,a){var s=this,t=[];return a=a||this.jsoneditor.root.formname,i=x({},this.jsoneditor.expandRefs(i)),h===void 0?this._validateV3Required(i,h,a):(Object.keys(i).forEach(function(e){s._validateSubSchema[e]&&t.push.apply(t,Oe(s._validateSubSchema[e].call(s,i,h,a)))}),t.push.apply(t,Oe(this._validateByValueType(i,h,a))),i.links&&i.links.forEach(function(e,o){e.rel&&e.rel.toLowerCase()==="describedby"&&(i=s._expandSchemaLink(i,o),t.push.apply(t,Oe(s._validateSchema(i,h,a,s.translate))))}),["date","time","datetime-local"].includes(i.format)&&t.push.apply(t,Oe(this._validateDateTimeSubSchema(i,h,a))),["uuid"].includes(i.format)&&t.push.apply(t,Oe(this._validateUUIDSchema(i,h,a))),t.push.apply(t,Oe(this._validateCustomValidator(i,h,a))),this._removeDuplicateErrors(t))}},{key:"_expandSchemaLink",value:function(i,h){var a=i.links[h].href,s=this.jsoneditor.root.getValue(),t=this.jsoneditor.compileTemplate(a,this.jsoneditor.template),e=document.location.origin+document.location.pathname+t(s);return i.links=i.links.slice(0,h).concat(i.links.slice(h+1)),x({},i,this.jsoneditor.refs[e])}},{key:"_validateV3Required",value:function(i,h,a){return(i.required!==void 0&&i.required===!0||i.required===void 0&&this.jsoneditor.options.required_by_default===!0)&&i.type!=="info"?[{path:a,property:"required",message:this.translate("error_notset",null,i)}]:[]}},{key:"_validateByValueType",value:function(i,h,a){var s=this,t=[];if(h===null)return t;if(typeof h=="number")Object.keys(i).forEach(function(o){s._validateNumberSubSchema[o]&&t.push.apply(t,Oe(s._validateNumberSubSchema[o].call(s,i,h,a)))});else if(typeof h=="string")Object.keys(i).forEach(function(o){s._validateStringSubSchema[o]&&t.push.apply(t,Oe(s._validateStringSubSchema[o].call(s,i,h,a)))});else if(Array.isArray(h))Object.keys(i).forEach(function(o){s._validateArraySubSchema[o]&&t.push.apply(t,Oe(s._validateArraySubSchema[o].call(s,i,h,a)))});else if(yr(h)==="object"){var e={};Object.keys(i).forEach(function(o){s._validateObjectSubSchema[o]&&t.push.apply(t,Oe(s._validateObjectSubSchema[o].call(s,i,h,a,e)))}),i.additionalProperties!==void 0||!this.jsoneditor.options.no_additional_properties||i.oneOf||i.anyOf||i.allOf||(i.additionalProperties=!1),Object.keys(i).forEach(function(o){s._validateObjectSubSchema2[o]!==void 0&&t.push.apply(t,Oe(s._validateObjectSubSchema2[o].call(s,i,h,a,e)))})}return t}},{key:"_validateUUIDSchema",value:function(i,h,a){return/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(h)?[]:[{path:a,property:"format",message:this.translate("error_pattern",["^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"],i)}]}},{key:"_validateNumberSubSchemaMultipleDivisible",value:function(i,h,a){var s=i.multipleOf||i.divisibleBy,t=h/s===Math.floor(h/s);return window.math?t=window.math.mod(window.math.bignumber(h),window.math.bignumber(s)).equals(0):window.Decimal&&(t=new window.Decimal(h).mod(new window.Decimal(s)).equals(0)),t?[]:[{path:a,property:i.multipleOf?"multipleOf":"divisibleBy",message:this.translate("error_multipleOf",[s],i)}]}},{key:"_validateDateTimeSubSchema",value:function(i,h,a){var s=this,t=this.jsoneditor.getEditor(a),e=t&&t.flatpickr?t.flatpickr.config.dateFormat:{date:'"YYYY-MM-DD"',time:'"HH:MM"',"datetime-local":'"YYYY-MM-DD HH:MM"'}[i.format];if(i.type==="integer")return function(o,c,d){return 1*c<1?[{path:d,property:"format",message:s.translate("error_invalid_epoch",null,o)}]:c!==Math.abs(parseInt(c))?[{path:d,property:"format",message:s.translate("error_".concat(o.format.replace(/-/g,"_")),[e],o)}]:[]}(i,h,a);if(t&&t.flatpickr){if(t)return function(o,c,d,_){if(c!==""){var P;if(_.flatpickr.config.mode!=="single"){var D=_.flatpickr.config.mode==="range"?_.flatpickr.l10n.rangeSeparator:", ";P=_.flatpickr.selectedDates.map(function(nt){return _.flatpickr.formatDate(nt,_.flatpickr.config.dateFormat)}).join(D)}try{if(P){if(P!==c)throw new Error("".concat(_.flatpickr.config.mode," mismatch"))}else if(_.flatpickr.formatDate(_.flatpickr.parseDate(c,_.flatpickr.config.dateFormat),_.flatpickr.config.dateFormat)!==c)throw new Error("mismatch")}catch{var J=_.flatpickr.config.errorDateFormat!==void 0?_.flatpickr.config.errorDateFormat:_.flatpickr.config.dateFormat;return[{path:d,property:"format",message:s.translate("error_".concat(_.format.replace(/-/g,"_")),[J],o)}]}}return[]}(i,h,a,t)}else if(!{date:/^(\d{4}\D\d{2}\D\d{2})?$/,time:/^(\d{2}:\d{2}(?::\d{2})?)?$/,"datetime-local":/^(\d{4}\D\d{2}\D\d{2}[ T]\d{2}:\d{2}(?::\d{2})?)?$/}[i.format].test(h))return[{path:a,property:"format",message:this.translate("error_".concat(i.format.replace(/-/g,"_")),[e],i)}];return[]}},{key:"_validateCustomValidator",value:function(i,h,a){var s=this,t=[];t.push.apply(t,Oe(ia.call(this,i,h,a,this.translate)));var e=function(o){t.push.apply(t,Oe(o.call(s,i,h,a)))};return this.defaults.custom_validators.forEach(e),this.options.custom_validators&&this.options.custom_validators.forEach(e),t}},{key:"_removeDuplicateErrors",value:function(i){return i.reduce(function(h,a){var s=!0;return h||(h=[]),h.forEach(function(t){t.message===a.message&&t.path===a.path&&t.property===a.property&&(t.errorcount++,s=!1)}),s&&(a.errorcount=1,h.push(a)),h},[])}},{key:"_checkType",value:function(i,h){var a={string:function(s){return typeof s=="string"},number:function(s){return typeof s=="number"},integer:function(s){return typeof s=="number"&&s===Math.floor(s)},boolean:function(s){return typeof s=="boolean"},array:function(s){return Array.isArray(s)},object:function(s){return s!==null&&!Array.isArray(s)&&yr(s)==="object"},null:function(s){return s===null}};return typeof i=="string"?!a[i]||a[i](h):!this._validateSchema(i,h).length}}],f&&aa(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),u}();function qe(u){return qe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},qe(u)}function Ur(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(qe(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(qe(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),qe(h)==="symbol"?h:String(h)),i)}var h}function ln(){return ln=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=mr(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},ln.apply(this,arguments)}function sa(u,n){return sa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},sa(u,n)}function mr(u){return mr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},mr(u)}var to=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&sa(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=mr(i);if(h){var o=mr(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(qe(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"register",value:function(){if(this.editors){for(var t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].unregister();this.editors[this.type]&&this.editors[this.type].register()}ln(mr(s.prototype),"register",this).call(this)}},{key:"unregister",value:function(){if(ln(mr(s.prototype),"unregister",this).call(this),this.editors)for(var t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].unregister()}},{key:"getNumColumns",value:function(){return this.editors[this.type]?Math.max(this.editors[this.type].getNumColumns(),4):4}},{key:"enable",value:function(){if(!this.always_disabled){if(this.editors)for(var t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].enable();this.switcher.disabled=!1,ln(mr(s.prototype),"enable",this).call(this)}}},{key:"disable",value:function(t){if(t&&(this.always_disabled=!0),this.editors)for(var e=0;e<this.editors.length;e++)this.editors[e]&&this.editors[e].disable(t);this.switcher.disabled=!0,ln(mr(s.prototype),"disable",this).call(this)}},{key:"switchEditor",value:function(t){var e=this;this.lastType=this.type,this.editors[t]||this.buildChildEditor(t);var o=this.getValue();this.type=t,this.register(),this.editors.forEach(function(c,d){var _,P;c&&(e.type===d?(e.keep_only_existing_values&&(_=c.getValue(),P=o,Object.keys(P).forEach(function(D){D in _&&(_[D]=P[D])}),o=_),(e.keep_values||e.if)&&c.setValue(o,!0),c.container.style.display=""):c.container.style.display="none")}),this.refreshValue(),this.refreshHeaderText()}},{key:"buildChildEditor",value:function(t){var e,o=this,c=this.types[t],d=this.theme.getChildEditorHolder();this.editor_holder.appendChild(d),typeof c=="string"?(e=x({},this.schema)).type=c:(e=x({},this.schema,c),e=this.jsoneditor.expandRefs(e),c&&c.required&&Array.isArray(c.required)&&this.schema.required&&Array.isArray(this.schema.required)&&(e.required=this.schema.required.concat(c.required)));var _=this.jsoneditor.getEditorClass(e);this.editors[t]=this.jsoneditor.createEditor(_,{jsoneditor:this.jsoneditor,schema:e,container:d,path:this.path,parent:this,required:!0}),this.editors[t].preBuild(),this.editors[t].build(),this.editors[t].postBuild(),this.editors[t].header&&(this.editors[t].header.style.display="none"),this.editors[t].option=this.switcher_options[t],d.addEventListener("change_header_text",function(){o.refreshHeaderText()}),t!==this.type&&(d.style.display="none")}},{key:"preBuild",value:function(){if(this.types=[],this.type=0,this.editors=[],this.validators=[],this.keep_values=!0,this.jsoneditor.options.keep_oneof_values!==void 0&&(this.keep_values=this.jsoneditor.options.keep_oneof_values),this.options.keep_oneof_values!==void 0&&(this.keep_values=this.options.keep_oneof_values),this.keep_only_existing_values=!1,this.jsoneditor.options.keep_only_existing_values!==void 0&&(this.keep_only_existing_values=this.jsoneditor.options.keep_only_existing_values),this.options.keep_only_existing_values!==void 0&&(this.keep_only_existing_values=this.options.keep_only_existing_values),this.schema.oneOf)this.oneOf=!0,this.types=this.schema.oneOf,delete this.schema.oneOf;else if(this.schema.anyOf)this.anyOf=!0,this.types=this.schema.anyOf,delete this.schema.anyOf;else if(this.schema.if)this.if=!0,this.ifSchema=JSON.parse(JSON.stringify(this.schema.if)),this.thenSchema={title:"then"},this.elseSchema={title:"else"},this.types=[],this.schema.then&&$(this.thenSchema,this.schema,this.schema.then),this.schema.else&&$(this.elseSchema,this.schema,this.schema.else),this.types.push(this.thenSchema),this.types.push(this.elseSchema),this.types.forEach(function(o){delete o.if,delete o.then,delete o.else}),delete this.schema.if;else{if(this.schema.type&&this.schema.type!=="any")Array.isArray(this.schema.type)?this.types=this.schema.type:this.types=[this.schema.type];else if(this.types=["string","number","integer","boolean","object","array","null"],this.schema.disallow){var t=this.schema.disallow;qe(t)==="object"&&Array.isArray(t)||(t=[t]);var e=[];this.types.forEach(function(o){t.includes(o)||e.push(o)}),this.types=e}delete this.schema.type}this.display_text=this.getDisplayText(this.types)}},{key:"build",value:function(){var t=this,e=this.container;this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired()),this.switcher=this.theme.getSwitcher(this.display_text),this.if||(this.container.appendChild(this.header),e.appendChild(this.switcher)),this.switcher.addEventListener("change",function(c){c.preventDefault(),c.stopPropagation(),t.switchEditor(t.display_text.indexOf(c.currentTarget.value)),t.onChange(!0)}),this.editor_holder=document.createElement("div"),e.appendChild(this.editor_holder);var o={};this.jsoneditor.options.custom_validators&&(o.custom_validators=this.jsoneditor.options.custom_validators),this.switcher_options=this.theme.getSwitcherOptions(this.switcher),this.types.forEach(function(c,d){var _;t.editors[d]=!1,typeof c=="string"?(_=x({},t.schema)).type=c:(_=x({},t.schema,c),c.required&&Array.isArray(c.required)&&t.schema.required&&Array.isArray(t.schema.required)&&(_.required=t.schema.required.concat(c.required))),t.validators[d]=new Ki(t.jsoneditor,_,o,t.defaults)}),this.jsoneditor.on("change",function(){t.switchIf()}),this.switchEditor(0)}},{key:"onChildEditorChange",value:function(t){this.editors[this.type]&&(this.refreshValue(),this.refreshHeaderText()),ln(mr(s.prototype),"onChildEditorChange",this).call(this)}},{key:"refreshHeaderText",value:function(){var t=this.getDisplayText(this.types);Array.from(this.switcher_options).forEach(function(e,o){e.textContent=t[o]})}},{key:"refreshValue",value:function(){this.editors[this.type]&&(this.value=this.editors[this.type].getValue())}},{key:"switchIf",value:function(){if(this.ifSchema&&this.value){var t=this.getIfType(this.value);this.lastType!==t&&(this.switchEditor(t),this.editors[this.type].setValue(this.value,!0)),this.switcher.value=this.display_text[this.type]}}},{key:"getIfType",value:function(t){return this.jsoneditor.validator._validateSchema(this.ifSchema,t).length===0?0:1}},{key:"setValue",value:function(t,e){var o=this,c=this.type,d={match:0,extra:0,i:this.type},_={match:0,i:null};this.validators.forEach(function(J,nt){var ct=null;o.anyOf!==void 0&&o.anyOf&&(ct=J.fitTest(t),(d.match<ct.match||d.match===ct.match&&d.extra>ct.extra)&&((d=ct).i=nt)),J.validate(t).length||_.i!==null?d=_:(_.i=nt,ct!==null&&(_.match=ct.match))});var P=_.i;this.anyOf!==void 0&&this.anyOf&&_.match<d.match&&(P=d.i),this.if&&(P=this.getIfType(t)),P===null&&(P=this.type),this.type=P,this.switcher.value=this.display_text[P];var D=this.type!==c;D&&(this.switchEditor(this.type),this.editors[this.type].setValue(t,e)),t!==void 0&&this.editors[this.type].setValue(t,e),this.refreshValue(),this.onChange(D)}},{key:"destroy",value:function(){this.editors.forEach(function(t){t&&t.destroy()}),this.editor_holder&&this.editor_holder.parentNode&&this.editor_holder.parentNode.removeChild(this.editor_holder),this.switcher&&this.switcher.parentNode&&this.switcher.parentNode.removeChild(this.switcher),ln(mr(s.prototype),"destroy",this).call(this)}},{key:"showValidationErrors",value:function(t){var e=this;if(this.oneOf||this.anyOf){var o=this.oneOf?"oneOf":"anyOf";this.editors.forEach(function(c,d){if(c){var _="".concat(e.path,".").concat(o,"[").concat(d,"]");c.showValidationErrors(t.reduce(function(P,D){if(D.path.startsWith(_)||D.path===_.substr(0,D.path.length)){var J=x({},D);D.path.startsWith(_)&&(J.path=e.path+J.path.substr(_.length)),P.push(J)}return P},[]))}})}else this.editors.forEach(function(c){c&&c.showValidationErrors(t)})}},{key:"addLinks",value:function(){}}])&&Ur(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(F);function jn(u){return jn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},jn(u)}function eo(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(jn(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(jn(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),jn(h)==="symbol"?h:String(h)),i)}var h}function qn(u,n){return qn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},qn(u,n)}function Gn(u){return Gn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Gn(u)}var la=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&qn(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Gn(i);if(h){var o=Gn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(jn(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"getValue",value:function(){if(this.dependenciesFulfilled)return null}},{key:"setValue",value:function(){this.onChange()}},{key:"getNumColumns",value:function(){return 2}}])&&eo(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(F);function ro(u,n){var f=Object.keys(u);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(u);n&&(i=i.filter(function(h){return Object.getOwnPropertyDescriptor(u,h).enumerable})),f.push.apply(f,i)}return f}function un(u){for(var n=1;n<arguments.length;n++){var f=arguments[n]!=null?arguments[n]:{};n%2?ro(Object(f),!0).forEach(function(i){mi(u,i,f[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(u,Object.getOwnPropertyDescriptors(f)):ro(Object(f)).forEach(function(i){Object.defineProperty(u,i,Object.getOwnPropertyDescriptor(f,i))})}return u}function mi(u,n,f){return(n=io(n))in u?Object.defineProperty(u,n,{value:f,enumerable:!0,configurable:!0,writable:!0}):u[n]=f,u}function En(u,n){return function(f){if(Array.isArray(f))return f}(u)||function(f,i){var h=f==null?null:typeof Symbol<"u"&&f[Symbol.iterator]||f["@@iterator"];if(h!=null){var a,s,t,e,o=[],c=!0,d=!1;try{if(t=(h=h.call(f)).next,i===0){if(Object(h)!==h)return;c=!1}else for(;!(c=(a=t.call(h)).done)&&(o.push(a.value),o.length!==i);c=!0);}catch(_){d=!0,s=_}finally{try{if(!c&&h.return!=null&&(e=h.return(),Object(e)!==e))return}finally{if(d)throw s}}return o}}(u,n)||function(f,i){if(f){if(typeof f=="string")return no(f,i);var h=Object.prototype.toString.call(f).slice(8,-1);return h==="Object"&&f.constructor&&(h=f.constructor.name),h==="Map"||h==="Set"?Array.from(f):h==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(h)?no(f,i):void 0}}(u,n)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
66
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function no(u,n){(n==null||n>u.length)&&(n=u.length);for(var f=0,i=new Array(n);f<n;f++)i[f]=u[f];return i}function Ir(u){return Ir=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Ir(u)}function ua(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,io(i.key),i)}}function io(u){var n=function(f,i){if(Ir(f)!=="object"||f===null)return f;var h=f[Symbol.toPrimitive];if(h!==void 0){var a=h.call(f,"string");if(Ir(a)!=="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(f)}(u);return Ir(n)==="symbol"?n:String(n)}function Tr(){return Tr=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=br(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},Tr.apply(this,arguments)}function oo(u,n){return oo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},oo(u,n)}function br(u){return br=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},br(u)}var bi=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&oo(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=br(i);if(h){var o=br(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(Ir(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(t,e,o){var c;return function(d,_){if(!(d instanceof _))throw new TypeError("Cannot call a class as a function")}(this,s),(c=a.call(this,t,e)).currentDepth=o,c}return n=s,(f=[{key:"getDefault",value:function(){return x({},this.schema.default||{})}},{key:"getChildEditors",value:function(){return this.editors}},{key:"register",value:function(){Tr(br(s.prototype),"register",this).call(this),this.editors&&Object.values(this.editors).forEach(function(t){return t.register()})}},{key:"unregister",value:function(){Tr(br(s.prototype),"unregister",this).call(this),this.editors&&Object.values(this.editors).forEach(function(t){return t.unregister()})}},{key:"getNumColumns",value:function(){return Math.max(Math.min(12,this.maxwidth),3)}},{key:"enable",value:function(){this.always_disabled||(this.editjson_control&&(this.editjson_control.disabled=!1),this.addproperty_button&&(this.addproperty_button.disabled=!1),Tr(br(s.prototype),"enable",this).call(this),this.editors&&Object.values(this.editors).forEach(function(t){t.isActive()&&t.enable(),t.optInCheckbox.disabled=!1}))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.editjson_control&&(this.editjson_control.disabled=!0),this.addproperty_button&&(this.addproperty_button.disabled=!0),this.hideEditJSON(),Tr(br(s.prototype),"disable",this).call(this),this.editors&&Object.values(this.editors).forEach(function(e){e.isActive()&&e.disable(t),e.optInCheckbox.disabled=!0})}},{key:"layoutEditors",value:function(){var t,e,o=this;if(this.row_container){var c;this.property_order=Object.keys(this.editors),this.property_order=this.property_order.sort(function(Gt,gt){var Zt=o.editors[Gt].schema.propertyOrder,Ge=o.editors[gt].schema.propertyOrder;return typeof Zt!="number"&&(Zt=1e3),typeof Ge!="number"&&(Ge=1e3),Zt-Ge});var d,_=this.format==="categories",P=[],D=null,J=null;if(this.format==="grid-strict"){var nt=0;if(d=[],this.property_order.forEach(function(Gt){var gt=o.editors[Gt];if(!gt.property_removed){var Zt=gt.options.hidden?0:gt.options.grid_columns||gt.getNumColumns(),Ge=gt.options.hidden?0:gt.options.grid_offset||0,W=!gt.options.hidden&&(gt.options.grid_break||!1),G={key:Gt,width:Zt,offset:Ge,height:gt.options.hidden?0:gt.container.offsetHeight};d.push(G),P[nt]=d,W&&(nt++,d=[])}}),this.layout===JSON.stringify(P))return!1;for(this.layout=JSON.stringify(P),c=document.createElement("div"),t=0;t<P.length;t++)for(d=this.theme.getGridRow(),c.appendChild(d),e=0;e<P[t].length;e++)D=P[t][e].key,(J=this.editors[D]).options.hidden?J.container.style.display="none":this.theme.setGridColumnSize(J.container,P[t][e].width,P[t][e].offset),d.appendChild(J.container)}else if(this.format==="grid"){for(this.property_order.forEach(function(Gt){var gt=o.editors[Gt];if(!gt.property_removed){for(var Zt=!1,Ge=gt.options.hidden?0:gt.options.grid_columns||gt.getNumColumns(),W=gt.options.hidden?0:gt.container.offsetHeight,G=0;G<P.length;G++)P[G].width+Ge<=12&&(!W||.5*P[G].minh<W&&2*P[G].maxh>W)&&(Zt=G);Zt===!1&&(P.push({width:0,minh:999999,maxh:0,editors:[]}),Zt=P.length-1),P[Zt].editors.push({key:Gt,width:Ge,height:W}),P[Zt].width+=Ge,P[Zt].minh=Math.min(P[Zt].minh,W),P[Zt].maxh=Math.max(P[Zt].maxh,W)}}),t=0;t<P.length;t++)if(P[t].width<12){var ct=!1,dt=0;for(e=0;e<P[t].editors.length;e++)(ct===!1||P[t].editors[e].width>P[t].editors[ct].width)&&(ct=e),P[t].editors[e].width*=12/P[t].width,P[t].editors[e].width=Math.floor(P[t].editors[e].width),dt+=P[t].editors[e].width;dt<12&&(P[t].editors[ct].width+=12-dt),P[t].width=12}if(this.layout===JSON.stringify(P))return!1;for(this.layout=JSON.stringify(P),c=document.createElement("div"),t=0;t<P.length;t++)for(d=this.theme.getGridRow(),c.appendChild(d),e=0;e<P[t].editors.length;e++)D=P[t].editors[e].key,(J=this.editors[D]).options.hidden?J.container.style.display="none":this.theme.setGridColumnSize(J.container,P[t].editors[e].width),d.appendChild(J.container)}else{if(c=document.createElement("div"),_){var kt=document.createElement("div"),Ct=this.theme.getTopTabHolder(this.translateProperty(this.schema.title)),$t=this.theme.getTopTabContentHolder(Ct);for(this.property_order.forEach(function(Gt){var gt=o.editors[Gt];if(!gt.property_removed){var Zt=o.theme.getTabContent(),Ge=gt.schema&&(gt.schema.type==="object"||gt.schema.type==="array");Zt.isObjOrArray=Ge;var W=o.theme.getGridRow();gt.tab||(o.basicPane===void 0?o.addRow(gt,Ct,Zt):o.addRow(gt,Ct,o.basicPane)),Zt.id=o.getValidId(gt.tab_text.textContent),Ge?(Zt.appendChild(W),$t.appendChild(Zt),o.theme.addTopTab(Ct,gt.tab)):(kt.appendChild(W),$t.childElementCount>0?$t.firstChild.isObjOrArray&&(Zt.appendChild(kt),$t.insertBefore(Zt,$t.firstChild),o.theme.insertBasicTopTab(gt.tab,Ct),gt.basicPane=Zt):(Zt.appendChild(kt),$t.appendChild(Zt),o.theme.addTopTab(Ct,gt.tab),gt.basicPane=Zt)),gt.options.hidden?gt.container.style.display="none":o.theme.setGridColumnSize(gt.container,12),W.appendChild(gt.container),gt.rowPane=Zt}});this.tabPanesContainer.firstChild;)this.tabPanesContainer.removeChild(this.tabPanesContainer.firstChild);var ne=this.tabs_holder.parentNode;ne.removeChild(ne.firstChild),ne.appendChild(Ct),this.tabPanesContainer=$t,this.tabs_holder=Ct;var Re=this.theme.getFirstTab(this.tabs_holder);return void(Re&&j(Re,"click"))}this.property_order.forEach(function(Gt){var gt=o.editors[Gt];gt.property_removed||(d=o.theme.getGridRow(),c.appendChild(d),gt.options.hidden?gt.container.style.display="none":o.theme.setGridColumnSize(gt.container,12),d.appendChild(gt.container))})}for(;this.row_container.firstChild;)this.row_container.removeChild(this.row_container.firstChild);this.row_container.appendChild(c)}}},{key:"getPropertySchema",value:function(t){var e=this,o=this.schema.properties[t]||{};o=x({},o);var c=!!this.schema.properties[t];return this.schema.patternProperties&&Object.keys(this.schema.patternProperties).forEach(function(d){new RegExp(d).test(t)&&(o.allOf=o.allOf||[],o.allOf.push(e.schema.patternProperties[d]),c=!0)}),!c&&this.schema.additionalProperties&&Ir(this.schema.additionalProperties)==="object"&&(o=x({},this.schema.additionalProperties)),o}},{key:"preBuild",value:function(){var t=this;if(Tr(br(s.prototype),"preBuild",this).call(this),this.editors={},this.cached_editors={},this.format=this.options.layout||this.options.object_layout||this.schema.format||this.jsoneditor.options.object_layout||"normal",this.schema.properties=this.schema.properties||{},this.minwidth=0,this.maxwidth=0,this.options.table_row)Object.entries(this.schema.properties).forEach(function(e){var o=En(e,2),c=o[0],d=o[1],_=t.jsoneditor.getEditorClass(d);t.editors[c]=t.jsoneditor.createEditor(_,{jsoneditor:t.jsoneditor,schema:d,path:"".concat(t.path,".").concat(c),parent:t,compact:!0,required:!0},t.currentDepth+1),t.editors[c].preBuild();var P=t.editors[c].options.hidden?0:t.editors[c].options.grid_columns||t.editors[c].getNumColumns();t.minwidth+=P,t.maxwidth+=P}),this.no_link_holder=!0;else{if(this.options.table)throw new Error("Not supported yet");this.schema.defaultProperties||(this.jsoneditor.options.display_required_only||this.options.display_required_only?this.schema.defaultProperties=Object.keys(this.schema.properties).filter(function(e){return t.isRequiredObject({key:e,schema:t.schema.properties[e]})}):this.schema.defaultProperties=Object.keys(this.schema.properties)),this.maxwidth+=1,Array.isArray(this.schema.defaultProperties)&&this.schema.defaultProperties.forEach(function(e){t.addObjectProperty(e,!0),t.editors[e]&&(t.minwidth=Math.max(t.minwidth,t.editors[e].options.grid_columns||t.editors[e].getNumColumns()),t.maxwidth+=t.editors[e].options.grid_columns||t.editors[e].getNumColumns())})}this.property_order=Object.keys(this.editors),this.property_order=this.property_order.sort(function(e,o){var c=t.editors[e].schema.propertyOrder,d=t.editors[o].schema.propertyOrder;return typeof c!="number"&&(c=1e3),typeof d!="number"&&(d=1e3),c-d})}},{key:"addTab",value:function(t){var e=this,o=this.rows[t].schema&&(this.rows[t].schema.type==="object"||this.rows[t].schema.type==="array");this.tabs_holder&&(this.rows[t].tab_text=document.createElement("span"),this.rows[t].tab_text.textContent=o?this.rows[t].getHeaderText():this.schema.basicCategoryTitle===void 0?"Basic":this.schema.basicCategoryTitle,this.rows[t].tab=this.theme.getTopTab(this.rows[t].tab_text,this.getValidId(this.rows[t].tab_text.textContent)),this.rows[t].tab.addEventListener("click",function(c){e.active_tab=e.rows[t].tab,e.refreshTabs(),c.preventDefault(),c.stopPropagation()}))}},{key:"addRow",value:function(t,e,o){var c=this.rows.length,d=t.schema.type==="object"||t.schema.type==="array";this.rows[c]=t,this.rows[c].rowPane=o,d?(this.addTab(c),this.theme.addTopTab(e,this.rows[c].tab)):this.basicTab===void 0?(this.addTab(c),this.basicTab=c,this.basicPane=o,this.theme.addTopTab(e,this.rows[c].tab)):(this.rows[c].tab=this.rows[this.basicTab].tab,this.rows[c].tab_text=this.rows[this.basicTab].tab_text,this.rows[c].rowPane=this.rows[this.basicTab].rowPane)}},{key:"refreshTabs",value:function(t){var e=this,o=this.basicTab!==void 0,c=!1;this.rows.forEach(function(d){d.tab&&d.rowPane&&d.rowPane.parentNode&&(o&&d.tab===e.rows[e.basicTab].tab&&c||(t?d.tab_text.textContent=d.getHeaderText():(o&&d.tab===e.rows[e.basicTab].tab&&(c=!0),d.tab===e.active_tab?e.theme.markTabActive(d):e.theme.markTabInactive(d))))})}},{key:"build",value:function(){var t=this,e=this.format==="categories";if(this.rows=[],this.active_tab=null,this.options.table_row)this.editor_holder=this.container,Object.entries(this.editors).forEach(function(c){var d=En(c,2),_=d[0],P=d[1],D=t.theme.getTableCell();t.editor_holder.appendChild(D),P.setContainer(D),P.build(),P.postBuild(),P.setOptInCheckbox(P.header),P.setValue(P.getDefault(),!0),t.editors[_].options.hidden&&(D.style.display="none"),t.editors[_].options.input_width&&(D.style.width=t.editors[_].options.input_width)});else{if(this.options.table)throw new Error("Not supported yet");this.header="",this.options.compact||(this.header=document.createElement("label"),this.header.textContent=this.getTitle()),this.title=this.theme.getHeader(this.header,this.getPathDepth()),this.title.classList.add("je-object__title"),this.controls=this.theme.getButtonHolder(),this.controls.classList.add("je-object__controls"),this.container.appendChild(this.title),this.container.appendChild(this.controls),this.container.classList.add("je-object__container"),this.editjson_holder=this.theme.getModal(),this.editjson_textarea=this.theme.getTextareaInput(),this.editjson_textarea.classList.add("je-edit-json--textarea"),this.editjson_save=this.getButton("button_save","save","button_save"),this.editjson_save.classList.add("json-editor-btntype-save"),this.editjson_save.addEventListener("click",function(c){c.preventDefault(),c.stopPropagation(),t.saveJSON()}),this.editjson_copy=this.getButton("button_copy","copy","button_copy"),this.editjson_copy.classList.add("json-editor-btntype-copy"),this.editjson_copy.addEventListener("click",function(c){c.preventDefault(),c.stopPropagation(),t.copyJSON()}),this.editjson_cancel=this.getButton("button_cancel","cancel","button_cancel"),this.editjson_cancel.classList.add("json-editor-btntype-cancel"),this.editjson_cancel.addEventListener("click",function(c){c.preventDefault(),c.stopPropagation(),t.hideEditJSON()}),this.editjson_holder.appendChild(this.editjson_textarea),this.editjson_holder.appendChild(this.editjson_save),this.editjson_holder.appendChild(this.editjson_copy),this.editjson_holder.appendChild(this.editjson_cancel),this.addproperty_holder=this.theme.getModal(),this.addproperty_list=document.createElement("div"),this.addproperty_list.classList.add("property-selector"),this.addproperty_add=this.getButton("button_add","add","button_add"),this.addproperty_add.classList.add("json-editor-btntype-add"),this.addproperty_input=this.theme.getFormInputField("text"),this.addproperty_input.setAttribute("placeholder","Property name..."),this.addproperty_input.classList.add("property-selector-input"),this.addproperty_add.addEventListener("click",function(c){if(c.preventDefault(),c.stopPropagation(),t.addproperty_input.value){if(t.editors[t.addproperty_input.value])return void window.alert("there is already a property with that name");t.addObjectProperty(t.addproperty_input.value),t.editors[t.addproperty_input.value]&&t.editors[t.addproperty_input.value].disable(),t.onChange(!0)}}),this.addproperty_input.addEventListener("input",function(c){c.target.previousSibling.childNodes.forEach(function(d){var _=d.innerText,P=c.target.value;t.options.case_sensitive_property_search||t.jsoneditor.options.case_sensitive_property_search||(_=_.toLowerCase(),P=P.toLowerCase()),_.includes(P)?d.style.display="":d.style.display="none"})}),this.addproperty_holder.appendChild(this.addproperty_list),this.addproperty_holder.appendChild(this.addproperty_input),this.addproperty_holder.appendChild(this.addproperty_add);var o=document.createElement("div");o.style.clear="both",this.addproperty_holder.appendChild(o),this.onOutsideModalClickListener=this.onOutsideModalClick.bind(this),document.addEventListener("click",this.onOutsideModalClickListener,!0),this.schema.description&&(this.description=this.theme.getDescription(this.translateProperty(this.schema.description)),this.container.appendChild(this.description)),this.error_holder=document.createElement("div"),this.container.appendChild(this.error_holder),this.editor_holder=this.theme.getIndentedPanel(),this.container.appendChild(this.editor_holder),this.row_container=this.theme.getGridContainer(),e?(this.tabs_holder=this.theme.getTopTabHolder(this.getValidId(this.translateProperty(this.schema.title))),this.tabPanesContainer=this.theme.getTopTabContentHolder(this.tabs_holder),this.editor_holder.appendChild(this.tabs_holder)):(this.tabs_holder=this.theme.getTabHolder(this.getValidId(this.translateProperty(this.schema.title))),this.tabPanesContainer=this.theme.getTabContentHolder(this.tabs_holder),this.editor_holder.appendChild(this.row_container)),Object.values(this.editors).forEach(function(c){var d=t.theme.getTabContent(),_=t.theme.getGridColumn(),P=!(!c.schema||c.schema.type!=="object"&&c.schema.type!=="array");if(d.isObjOrArray=P,e){if(P){var D=t.theme.getGridContainer();D.appendChild(_),d.appendChild(D),t.tabPanesContainer.appendChild(d),t.row_container=D}else t.row_container_basic===void 0&&(t.row_container_basic=t.theme.getGridContainer(),d.appendChild(t.row_container_basic),t.tabPanesContainer.childElementCount===0?t.tabPanesContainer.appendChild(d):t.tabPanesContainer.insertBefore(d,t.tabPanesContainer.childNodes[1])),t.row_container_basic.appendChild(_);t.addRow(c,t.tabs_holder,d),d.id=t.getValidId(c.schema.title)}else t.row_container.appendChild(_);c.setContainer(_),c.build(),c.postBuild(),c.setOptInCheckbox(c.header)}),this.rows[0]&&j(this.rows[0].tab,"click"),this.collapsed=!1,this.collapse_control=this.getButton("","collapse","button_collapse"),this.collapse_control.classList.add("json-editor-btntype-toggle"),this.title.insertBefore(this.collapse_control,this.title.childNodes[0]),this.collapse_control.addEventListener("click",function(c){c.preventDefault(),c.stopPropagation(),t.collapsed?(t.editor_holder.style.display="",t.collapsed=!1,t.setButtonText(t.collapse_control,"","collapse","button_collapse")):(t.editor_holder.style.display="none",t.collapsed=!0,t.setButtonText(t.collapse_control,"","expand","button_expand"))}),this.options.collapsed&&j(this.collapse_control,"click"),this.schema.options&&this.schema.options.disable_collapse!==void 0?this.schema.options.disable_collapse&&(this.collapse_control.style.display="none"):this.jsoneditor.options.disable_collapse&&(this.collapse_control.style.display="none"),this.editjson_control=this.getButton("JSON","edit","button_edit_json"),this.editjson_control.classList.add("json-editor-btntype-editjson"),this.editjson_control.addEventListener("click",function(c){c.preventDefault(),c.stopPropagation(),t.toggleEditJSON()}),this.controls.appendChild(this.editjson_control),this.controls.insertBefore(this.editjson_holder,this.controls.childNodes[0]),this.schema.options&&this.schema.options.disable_edit_json!==void 0?this.schema.options.disable_edit_json&&(this.editjson_control.style.display="none"):this.jsoneditor.options.disable_edit_json&&(this.editjson_control.style.display="none"),this.addproperty_button=this.getButton("properties","edit_properties","button_object_properties"),this.addproperty_button.classList.add("json-editor-btntype-properties"),this.addproperty_button.addEventListener("click",function(c){c.preventDefault(),c.stopPropagation(),t.toggleAddProperty()}),this.controls.appendChild(this.addproperty_button),this.controls.insertBefore(this.addproperty_holder,this.controls.childNodes[1]),this.refreshAddProperties(),this.deactivateNonRequiredProperties()}this.options.table_row?(this.editor_holder=this.container,this.property_order.forEach(function(c){t.editor_holder.appendChild(t.editors[c].container)})):(this.layoutEditors(),this.layoutEditors())}},{key:"deactivateNonRequiredProperties",value:function(){var t=this,e=this.jsoneditor.options.show_opt_in,o=this.options.show_opt_in!==void 0,c=o&&this.options.show_opt_in===!0,d=o&&this.options.show_opt_in===!1;(c||!d&&e||!o&&e)&&Object.entries(this.editors).forEach(function(_){var P=En(_,2),D=P[0],J=P[1];t.isRequiredObject(J)||t.editors[D].deactivate()})}},{key:"showEditJSON",value:function(){this.editjson_holder&&(this.hideAddProperty(),this.editjson_holder.style.left="".concat(this.editjson_control.offsetLeft,"px"),this.editjson_holder.style.top="".concat(this.editjson_control.offsetTop+this.editjson_control.offsetHeight,"px"),this.editjson_textarea.value=JSON.stringify(this.getValue(),null,2),this.disable(),this.editjson_holder.style.display="",this.editjson_control.disabled=!1,this.editing_json=!0)}},{key:"hideEditJSON",value:function(){this.editjson_holder&&this.editing_json&&(this.editjson_holder.style.display="none",this.enable(),this.editing_json=!1)}},{key:"copyJSON",value:function(){if(this.editjson_holder){var t=document.createElement("textarea");t.value=this.editjson_textarea.value,t.setAttribute("readonly",""),t.style.position="absolute",t.style.left="-9999px",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}}},{key:"saveJSON",value:function(){if(this.editjson_holder)try{var t=JSON.parse(this.editjson_textarea.value);this.setValue(t),this.hideEditJSON(),this.onChange(!0)}catch(e){throw window.alert("invalid JSON"),e}}},{key:"toggleEditJSON",value:function(){this.editing_json?this.hideEditJSON():this.showEditJSON()}},{key:"insertPropertyControlUsingPropertyOrder",value:function(t,e,o){var c;this.schema.properties[t]&&(c=this.schema.properties[t].propertyOrder),typeof c!="number"&&(c=1e3),e.propertyOrder=c;for(var d=0;d<o.childNodes.length;d++){var _=o.childNodes[d];if(e.propertyOrder<_.propertyOrder){this.addproperty_list.insertBefore(e,_),e=null;break}}e&&this.addproperty_list.appendChild(e)}},{key:"addPropertyCheckbox",value:function(t){var e,o=this,c=this.theme.getCheckbox();e=this.schema.properties[t]&&this.schema.properties[t].title?this.schema.properties[t].title:t;var d=this.theme.getCheckboxLabel(e),_=this.theme.getFormControl(d,c);return _.style.paddingBottom=_.style.marginBottom=_.style.paddingTop=_.style.marginTop=0,_.style.height="auto",this.insertPropertyControlUsingPropertyOrder(t,_,this.addproperty_list),c.checked=t in this.editors,c.addEventListener("change",function(){c.checked?o.addObjectProperty(t):o.removeObjectProperty(t),o.onChange(!0)}),this.addproperty_checkboxes[t]=c,c}},{key:"showAddProperty",value:function(){this.addproperty_holder&&(this.hideEditJSON(),this.addproperty_holder.style.left="".concat(this.addproperty_button.offsetLeft,"px"),this.addproperty_holder.style.top="".concat(this.addproperty_button.offsetTop+this.addproperty_button.offsetHeight,"px"),this.disable(),this.adding_property=!0,this.addproperty_button.disabled=!1,this.addproperty_holder.style.display="",this.refreshAddProperties())}},{key:"hideAddProperty",value:function(){this.addproperty_holder&&this.adding_property&&(this.addproperty_holder.style.display="none",this.enable(),this.adding_property=!1)}},{key:"toggleAddProperty",value:function(){this.adding_property?this.hideAddProperty():this.showAddProperty()}},{key:"removeObjectProperty",value:function(t){this.editors[t]&&(this.editors[t].unregister(),delete this.editors[t],this.refreshValue(),this.layoutEditors())}},{key:"getSchemaOnMaxDepth",value:function(t){return Object.keys(t).reduce(function(e,o){switch(o){case"$ref":return e;case"properties":case"items":return un(un({},e),{},mi({},o,{}));case"additionalProperties":case"propertyNames":return un(un({},e),{},mi({},o,!0));default:return un(un({},e),{},mi({},o,t[o]))}},{})}},{key:"addObjectProperty",value:function(t,e){if(!this.editors[t]){if(this.cached_editors[t]){if(this.editors[t]=this.cached_editors[t],e)return;this.editors[t].register()}else{if(!(this.canHaveAdditionalProperties()||this.schema.properties&&this.schema.properties[t]||this.schema.patternProperties&&Object.keys(this.schema.patternProperties).find(function(P){return new RegExp(P).test(t)})))return;var o=this.getPropertySchema(t);typeof o.propertyOrder!="number"&&(o.propertyOrder=Object.keys(this.editors).length+1e3);var c=this.jsoneditor.getEditorClass(o),d=this.jsoneditor.options.max_depth;if(this.editors[t]=this.jsoneditor.createEditor(c,{jsoneditor:this.jsoneditor,schema:d&&this.currentDepth>=d?this.getSchemaOnMaxDepth(o):o,path:"".concat(this.path,".").concat(t),parent:this},this.currentDepth+1),this.editors[t].preBuild(),!e){var _=this.theme.getChildEditorHolder();this.editor_holder.appendChild(_),this.editors[t].setContainer(_),this.editors[t].build(),this.editors[t].postBuild(),this.editors[t].setOptInCheckbox(c.header),this.editors[t].activate()}this.cached_editors[t]=this.editors[t]}e||(this.refreshValue(),this.layoutEditors())}}},{key:"onOutsideModalClick",value:function(t){var e=t.path||t.composedPath&&t.composedPath();this.addproperty_holder&&!this.addproperty_holder.contains(e[0])&&this.adding_property&&(t.preventDefault(),t.stopPropagation(),this.toggleAddProperty())}},{key:"onChildEditorChange",value:function(t){this.refreshValue(),Tr(br(s.prototype),"onChildEditorChange",this).call(this,t)}},{key:"canHaveAdditionalProperties",value:function(){return typeof this.schema.additionalProperties=="boolean"?this.schema.additionalProperties:Ir(this.schema.additionalProperties)==="object"&&this.schema.additionalProperties!==null||(typeof this.options.no_additional_properties=="boolean"?!this.options.no_additional_properties:typeof this.jsoneditor.options.no_additional_properties!="boolean"||!this.jsoneditor.options.no_additional_properties)}},{key:"destroy",value:function(){Object.values(this.cached_editors).forEach(function(t){return t.destroy()}),this.editor_holder&&(this.editor_holder.innerHTML=""),this.title&&this.title.parentNode&&this.title.parentNode.removeChild(this.title),this.error_holder&&this.error_holder.parentNode&&this.error_holder.parentNode.removeChild(this.error_holder),this.editors=null,this.cached_editors=null,this.editor_holder&&this.editor_holder.parentNode&&this.editor_holder.parentNode.removeChild(this.editor_holder),this.editor_holder=null,document.removeEventListener("click",this.onOutsideModalClickListener,!0),Tr(br(s.prototype),"destroy",this).call(this)}},{key:"getValue",value:function(){if(this.dependenciesFulfilled){var t=Tr(br(s.prototype),"getValue",this).call(this);return t&&(this.jsoneditor.options.remove_empty_properties||this.options.remove_empty_properties)&&Object.keys(t).forEach(function(e){var o;((o=t[e])===void 0||o===""||o===Object(o)&&Object.keys(o).length===0&&o.constructor===Object)&&delete t[e]}),t}}},{key:"refreshValue",value:function(){var t=this;this.value={},this.editors&&(Object.keys(this.editors).forEach(function(e){t.editors[e].isActive()&&(t.editors[e].refreshValue(),t.value[e]=t.editors[e].getValue())}),Object.keys(this.editors).forEach(function(e){t.editors[e].isActive()&&t.activateDependentRequired(t.editors[e].key)}),this.adding_property&&this.refreshAddProperties())}},{key:"activateDependentRequired",value:function(t){var e=this;this.getDependentRequired(t).forEach(function(o){var c;Object.entries(e.cached_editors).forEach(function(d){var _=En(d,2),P=(_[0],_[1]);P.key===o&&(c=P)}),c&&!c.isActive()&&c.activate()})}},{key:"getDependentRequired",value:function(t){return this.schema.dependentRequired&&S(this.schema.dependentRequired,t)?this.schema.dependentRequired[t]:[]}},{key:"refreshAddProperties",value:function(){var t=this;if(this.options.disable_properties||this.options.disable_properties!==!1&&this.jsoneditor.options.disable_properties)this.addproperty_button.style.display="none";else{var e,o=0,c=!1;Object.keys(this.editors).forEach(function(d){return o++}),e=this.canHaveAdditionalProperties()&&!(this.schema.maxProperties!==void 0&&o>=this.schema.maxProperties),this.addproperty_checkboxes&&(this.addproperty_list.innerHTML=""),this.addproperty_checkboxes={},Object.keys(this.cached_editors).forEach(function(d){t.addPropertyCheckbox(d),t.isRequiredObject(t.cached_editors[d])&&d in t.editors&&(t.addproperty_checkboxes[d].disabled=!0),t.schema.minProperties!==void 0&&o<=t.schema.minProperties?(t.addproperty_checkboxes[d].disabled=t.addproperty_checkboxes[d].checked,t.addproperty_checkboxes[d].checked||(c=!0)):d in t.editors?c=!0:e||S(t.schema.properties,d)?(t.addproperty_checkboxes[d].disabled=!1,c=!0):t.addproperty_checkboxes[d].disabled=!0}),this.canHaveAdditionalProperties()&&(c=!0),Object.keys(this.schema.properties).forEach(function(d){t.cached_editors[d]||(c=!0,t.addPropertyCheckbox(d))}),c?this.canHaveAdditionalProperties()?this.addproperty_add.disabled=!e:(this.addproperty_add.style.display="none",this.addproperty_input.style.display="none"):(this.hideAddProperty(),this.addproperty_button.style.display="none")}}},{key:"isRequiredObject",value:function(t){if(t)return typeof t.schema.required=="boolean"?t.schema.required:Array.isArray(this.schema.required)?this.schema.required.includes(t.key):!!this.jsoneditor.options.required_by_default}},{key:"setValue",value:function(t,e){var o=this;(Ir(t=t||{})!=="object"||Array.isArray(t))&&(t={}),Object.entries(this.cached_editors).forEach(function(c){var d=En(c,2),_=d[0],P=d[1];t[_]!==void 0?(o.addObjectProperty(_),P.setValue(t[_],e),P.activate()):e||o.isRequiredObject(P)?P.setValue(P.getDefault(),e):o.jsoneditor.options.show_opt_in||o.options.show_opt_in?P.deactivate():o.removeObjectProperty(_)}),Object.entries(t).forEach(function(c){var d=En(c,2),_=d[0],P=d[1];o.cached_editors[_]||(o.addObjectProperty(_),o.editors[_]&&o.editors[_].setValue(P,e,!!o.editors[_].template))}),this.refreshValue(),this.layoutEditors(),this.onChange()}},{key:"showValidationErrors",value:function(t){var e=this,o=[],c=[];t.forEach(function(d){d.path===e.path?o.push(d):c.push(d)}),this.error_holder&&(o.length?(this.error_holder.innerHTML="",this.error_holder.style.display="",o.forEach(function(d){d.errorcount&&d.errorcount>1&&(d.message+=" (".concat(d.errorcount," errors)")),e.error_holder.appendChild(e.theme.getErrorMessage(d.message))})):this.error_holder.style.display="none"),this.options.table_row&&(o.length?this.theme.addTableRowError(this.container):this.theme.removeTableRowError(this.container)),Object.values(this.editors).forEach(function(d){d.showValidationErrors(c)})}}])&&ua(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(F);function Wn(u){return Wn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Wn(u)}function yl(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(Wn(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Wn(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Wn(h)==="symbol"?h:String(h)),i)}var h}function Zn(){return Zn=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=V(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},Zn.apply(this,arguments)}function ca(u,n){return ca=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},ca(u,n)}function V(u){return V=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},V(u)}bi.rules={".je-object__title":"display:inline-block",".je-object__controls":"margin:0%200%200%2010px",".je-object__container":"position:relative",".je-object__property-checkbox":"margin:0;height:auto",".property-selector":"width:295px;max-height:160px;padding:5px%200;overflow-y:auto;overflow-x:hidden;padding-left:5px",".property-selector-input":"width:220px;margin-bottom:0;display:inline-block",".json-editor-btntype-toggle":"margin:0%2010px%200%200",".je-edit-json--textarea":"height:170px;width:300px;display:block"};var at=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ca(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=V(i);if(h){var o=V(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(Wn(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"preBuild",value:function(){Zn(V(s.prototype),"preBuild",this).call(this)}},{key:"build",value:function(){var t=this;this.label="",this.options.compact||(this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired())),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.translateProperty(this.schema.description))),this.options.infoText&&(this.infoButton=this.theme.getInfoButton(this.translateProperty(this.options.infoText))),this.options.compact&&this.container.classList.add("compact"),this.radioContainer=document.createElement("div"),this.radioGroup=[];for(var e=function(J){t.setValue(J.currentTarget.value),t.onChange(!0)},o=0;o<this.enum_values.length;o++){var c={id:"".concat(this.formname,"[").concat(o,"]"),value:this.enum_values[o]};this.jsoneditor.options.use_name_attributes&&(c.name=this.formname),this.input=this.theme.getFormRadio(c),this.setInputAttributes(["id","value","name"]),this.input.addEventListener("change",e,!1),this.radioGroup.push(this.input);var d=this.theme.getFormRadioLabel(this.enum_display[o]);d.htmlFor=this.input.id;var _=this.theme.getFormRadioControl(d,this.input,!(this.options.layout!=="horizontal"&&!this.options.compact));this.radioContainer.appendChild(_)}if(this.schema.readOnly||this.schema.readonly){this.disable(!0);for(var P=0;P<this.radioGroup.length;P++)this.radioGroup[P].disabled=!0;this.radioContainer.classList.add("readonly")}var D=this.theme.getContainer();D.appendChild(this.radioContainer),D.dataset.containerFor="radio",this.input=D,this.control=this.theme.getFormControl(this.label,D,this.description,this.infoButton),this.container.appendChild(this.control),window.requestAnimationFrame(function(){t.input.parentNode&&t.afterInputReady()})}},{key:"enable",value:function(){if(!this.always_disabled){for(var t=0;t<this.radioGroup.length;t++)this.radioGroup[t].disabled=!1;this.radioContainer.classList.remove("readonly"),Zn(V(s.prototype),"enable",this).call(this)}}},{key:"disable",value:function(t){t&&(this.always_disabled=!0);for(var e=0;e<this.radioGroup.length;e++)this.radioGroup[e].disabled=!0;this.radioContainer.classList.add("readonly"),Zn(V(s.prototype),"disable",this).call(this)}},{key:"destroy",value:function(){this.radioContainer.parentNode&&this.radioContainer.parentNode.parentNode&&this.radioContainer.parentNode.parentNode.removeChild(this.radioContainer.parentNode),this.label&&this.label.parentNode&&this.label.parentNode.removeChild(this.label),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),Zn(V(s.prototype),"destroy",this).call(this)}},{key:"getNumColumns",value:function(){return 2}},{key:"setValue",value:function(t){typeof t!="string"&&(t=String(t));for(var e=0;e<this.radioGroup.length;e++)if(this.radioGroup[e].value===t){this.radioGroup[e].checked=!0,this.value=t,this.onChange();break}}}])&&yl(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(hi);function jt(u){return jt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},jt(u)}function ve(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(jt(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(jt(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),jt(h)==="symbol"?h:String(h)),i)}var h}function xe(){return xe=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=He(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},xe.apply(this,arguments)}function se(u,n){return se=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},se(u,n)}function He(u){return He=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},He(u)}var ao=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&se(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=He(i);if(h){var o=He(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(jt(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"setValue",value:function(t,e,o){var c=xe(He(s.prototype),"setValue",this).call(this,t,e,o);c!==void 0&&c.changed&&this.sceditor_instance&&this.sceditor_instance.val(c.value)}},{key:"build",value:function(){this.options.format="textarea",xe(He(s.prototype),"build",this).call(this),this.input_type=this.schema.format,this.input.setAttribute("data-schemaformat",this.input_type)}},{key:"afterInputReady",value:function(){var t=this;if(window.sceditor){var e=this.expandCallbacks("sceditor",x({},{format:this.input_type,emoticonsEnabled:!1,width:"100%",height:300,readOnly:this.schema.readOnly||this.schema.readonly||this.schema.template},this.defaults.options.sceditor||{},this.options.sceditor||{},{element:this.input})),o=window.sceditor.instance(this.input);o===void 0&&window.sceditor.create(this.input,e),this.sceditor_instance=o||window.sceditor.instance(this.input),this.sceditor_instance.blur(function(){t.value=t.sceditor_instance.val(),t.sceditor_instance.updateOriginal(),t.is_dirty=!0,t.onChange(!0)}),this.theme.afterInputReady(this.input)}else xe(He(s.prototype),"afterInputReady",this).call(this)}},{key:"getNumColumns",value:function(){return 6}},{key:"enable",value:function(){!this.always_disabled&&this.sceditor_instance&&this.sceditor_instance.readOnly(!1),xe(He(s.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.sceditor_instance&&this.sceditor_instance.readOnly(!0),xe(He(s.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.sceditor_instance&&(this.sceditor_instance.destroy(),this.sceditor_instance=null),xe(He(s.prototype),"destroy",this).call(this)}}])&&ve(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(Q);function so(u){return so=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},so(u)}function gp(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(so(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(so(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),so(h)==="symbol"?h:String(h)),i)}var h}function vi(){return vi=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=cn(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},vi.apply(this,arguments)}function ml(u,n){return ml=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},ml(u,n)}function cn(u){return cn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},cn(u)}var wp=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ml(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=cn(i);if(h){var o=cn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(so(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"setValue",value:function(t,e){if(this.select2_instance){e?this.is_dirty=!1:this.jsoneditor.options.show_errors==="change"&&(this.is_dirty=!0);var o=this.updateValue(t);this.input.value=o,this.select2v4?this.select2_instance.val(o).trigger("change"):this.select2_instance.select2("val",o),this.onChange(!0)}else vi(cn(s.prototype),"setValue",this).call(this,t,e)}},{key:"afterInputReady",value:function(){var t=this;if(window.jQuery&&window.jQuery.fn&&window.jQuery.fn.select2&&!this.select2_instance){var e=this.expandCallbacks("select2",x({},this.defaults.options.select2||{},this.options.select2||{}));this.newEnumAllowed=e.tags=!!e.tags&&this.schema.type==="string",this.select2_instance=window.jQuery(this.input).select2(e),this.select2v4=S(this.select2_instance.select2,"amd"),this.selectChangeHandler=function(){var o=t.select2v4?t.select2_instance.val():t.select2_instance.select2("val");t.updateValue(o),t.onChange(!0)},this.select2_instance.on("change",this.selectChangeHandler),this.select2_instance.on("select2-blur",this.selectChangeHandler)}vi(cn(s.prototype),"afterInputReady",this).call(this)}},{key:"updateValue",value:function(t){var e=this.enum_values[0];return t=this.typecast(t||""),this.enum_values.includes(t)?e=t:this.newEnumAllowed&&(e=this.addNewOption(t)?t:e),this.value=e,e}},{key:"addNewOption",value:function(t){var e,o=this.typecast(t),c=!1;return this.enum_values.includes(o)||o===""||(this.enum_options.push("".concat(o)),this.enum_display.push("".concat(o)),this.enum_values.push(o),this.schema.enum.push(o),(e=this.input.querySelector('option[value="'.concat(o,'"]')))?e.removeAttribute("data-select2-tag"):this.input.appendChild(new Option(o,o,!1,!1)).trigger("change"),c=!0),c}},{key:"enable",value:function(){this.always_disabled||this.select2_instance&&(this.select2v4?this.select2_instance.prop("disabled",!1):this.select2_instance.select2("enable",!0)),vi(cn(s.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.select2_instance&&(this.select2v4?this.select2_instance.prop("disabled",!0):this.select2_instance.select2("enable",!1)),vi(cn(s.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.select2_instance&&(this.select2_instance.select2("destroy"),this.select2_instance=null),vi(cn(s.prototype),"destroy",this).call(this)}}])&&gp(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(hi);function lo(u){return lo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},lo(u)}function _p(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(lo(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(lo(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),lo(h)==="symbol"?h:String(h)),i)}var h}function Jn(){return Jn=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=Xr(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},Jn.apply(this,arguments)}function bl(u,n){return bl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},bl(u,n)}function Xr(u){return Xr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Xr(u)}var xp=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&bl(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Xr(i);if(h){var o=Xr(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(lo(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"setValue",value:function(t,e){if(this.selectize_instance){e?this.is_dirty=!1:this.jsoneditor.options.show_errors==="change"&&(this.is_dirty=!0);var o=this.updateValue(t);this.input.value=o,this.selectize_instance.clear(!0),this.selectize_instance.setValue(o),this.onChange(!0)}else Jn(Xr(s.prototype),"setValue",this).call(this,t,e)}},{key:"afterInputReady",value:function(){var t=this;if(window.jQuery&&window.jQuery.fn&&window.jQuery.fn.selectize&&!this.selectize_instance){var e=this.expandCallbacks("selectize",x({},this.defaults.options.selectize||{},this.options.selectize||{}));this.newEnumAllowed=e.create=!!e.create&&this.schema.type==="string",this.selectize_instance=window.jQuery(this.input).selectize(e)[0].selectize,this.control.removeEventListener("change",this.multiselectChangeHandler),this.multiselectChangeHandler=function(o){t.updateValue(o),t.onChange(!0)},this.selectize_instance.on("change",this.multiselectChangeHandler)}Jn(Xr(s.prototype),"afterInputReady",this).call(this)}},{key:"updateValue",value:function(t){var e=this.enum_values[0];return t=this.typecast(t||""),this.enum_values.includes(t)?e=t:this.newEnumAllowed&&(e=this.addNewOption(t)?t:e),this.value=e,e}},{key:"addNewOption",value:function(t){var e=this.typecast(t),o=!1;return this.enum_values.includes(e)||e===""||(this.enum_options.push("".concat(e)),this.enum_display.push("".concat(e)),this.enum_values.push(e),this.schema.enum.push(e),this.selectize_instance.addItem(e),this.selectize_instance.refreshOptions(!1),o=!0),o}},{key:"onWatchedFieldChange",value:function(){var t=this;Jn(Xr(s.prototype),"onWatchedFieldChange",this).call(this),this.selectize_instance&&(this.selectize_instance.clear(!0),this.selectize_instance.clearOptions(!0),this.enum_options.forEach(function(e,o){t.selectize_instance.addOption({value:e,text:t.enum_display[o]})}),this.selectize_instance.addItem("".concat(this.value),!0))}},{key:"enable",value:function(){!this.always_disabled&&this.selectize_instance&&this.selectize_instance.unlock(),Jn(Xr(s.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.selectize_instance&&this.selectize_instance.lock(),Jn(Xr(s.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.selectize_instance&&(this.selectize_instance.destroy(),this.selectize_instance=null),Jn(Xr(s.prototype),"destroy",this).call(this)}}])&&_p(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(hi);function uo(u){return uo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},uo(u)}function kp(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(uo(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(uo(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),uo(h)==="symbol"?h:String(h)),i)}var h}function vl(u,n){return vl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},vl(u,n)}function vs(u){return vs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},vs(u)}var Op=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&vl(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=vs(i);if(h){var o=vs(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(uo(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"build",value:function(){var t=this;this.options.compact||(this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired())),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.translateProperty(this.schema.description)));var e=this.formname.replace(/\W/g,"");if(typeof SignaturePad=="function"){this.input=this.theme.getFormInputField("hidden"),this.container.appendChild(this.input);var o=document.createElement("div");o.classList.add("signature-container");var c=document.createElement("canvas");this.jsoneditor.options.use_name_attributes&&c.setAttribute("name",e),c.classList.add("signature"),o.appendChild(c),this.signaturePad=new window.SignaturePad(c),this.signaturePad.onEnd=function(){t.signaturePad.isEmpty()?t.input.value="":t.input.value=t.signaturePad.toDataURL(),t.is_dirty=!0,t.refreshValue(),t.watch_listener(),t.jsoneditor.notifyWatchers(t.path),t.parent?t.parent.onChildEditorChange(t):t.jsoneditor.onChange()};var d=document.createElement("div"),_=document.createElement("button");_.classList.add("tiny","button"),_.innerHTML="Clear signature",d.appendChild(_),o.appendChild(d),this.options.compact&&this.container.setAttribute("class","".concat(this.container.getAttribute("class")," compact")),(this.schema.readOnly||this.schema.readonly)&&(this.disable(!0),Array.from(this.inputs).forEach(function(D){c.setAttribute("readOnly","readOnly"),D.disabled=!0})),_.addEventListener("click",function(D){D.preventDefault(),D.stopPropagation(),t.signaturePad.clear(),t.signaturePad.strokeEnd()}),this.control=this.theme.getFormControl(this.label,o,this.description),this.container.appendChild(this.control),this.refreshValue(),c.width=o.offsetWidth,this.options&&this.options.canvas_height?c.height=this.options.canvas_height:c.height="300"}else{var P=document.createElement("p");P.innerHTML="Signature pad is not available, please include SignaturePad from https://github.com/szimek/signature_pad",this.container.appendChild(P)}}},{key:"setValue",value:function(t){if(typeof SignaturePad=="function"){var e=this.sanitize(t);return this.value===e?void 0:(this.value=e,this.input.value=this.value,this.signaturePad.clear(),t&&t!==""&&this.signaturePad.fromDataURL(t),this.watch_listener(),this.jsoneditor.notifyWatchers(this.path),!1)}}},{key:"destroy",value:function(){this.signaturePad.off(),delete this.signaturePad}}])&&kp(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(Q);function co(u){return co=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},co(u)}function jp(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(co(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(co(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),co(h)==="symbol"?h:String(h)),i)}var h}function Yn(){return Yn=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=Qr(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},Yn.apply(this,arguments)}function gl(u,n){return gl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},gl(u,n)}function Qr(u){return Qr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Qr(u)}k(2564);var Ep=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&gl(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Qr(i);if(h){var o=Qr(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(co(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"setValue",value:function(t,e,o){var c=Yn(Qr(s.prototype),"setValue",this).call(this,t,e,o);c!==void 0&&c.changed&&this.simplemde_instance&&this.simplemde_instance.value(c.value)}},{key:"build",value:function(){this.options.format="textarea",Yn(Qr(s.prototype),"build",this).call(this),this.input_type=this.schema.format,this.input.setAttribute("data-schemaformat",this.input_type)}},{key:"afterInputReady",value:function(){var t,e=this;window.SimpleMDE?(t=this.expandCallbacks("simplemde",x({},{height:300},this.defaults.options.simplemde||{},this.options.simplemde||{},{element:this.input})),this.simplemde_instance=new window.SimpleMDE(t),(this.schema.readOnly||this.schema.readonly||this.schema.template)&&(this.simplemde_instance.codemirror.options.readOnly=!0),this.simplemde_instance.codemirror.on("change",function(){e.value=e.simplemde_instance.value(),e.is_dirty=!0,e.onChange(!0)}),t.autorefresh&&this.startListening(this.simplemde_instance.codemirror,this.simplemde_instance.codemirror.state.autoRefresh={delay:250}),this.theme.afterInputReady(this.input)):Yn(Qr(s.prototype),"afterInputReady",this).call(this)}},{key:"getNumColumns",value:function(){return 6}},{key:"enable",value:function(){!this.always_disabled&&this.simplemde_instance&&(this.simplemde_instance.codemirror.options.readOnly=!1),Yn(Qr(s.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.simplemde_instance&&(this.simplemde_instance.codemirror.options.readOnly=!0),Yn(Qr(s.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.simplemde_instance&&(this.simplemde_instance.toTextArea(),this.simplemde_instance=null),Yn(Qr(s.prototype),"destroy",this).call(this)}},{key:"startListening",value:function(t,e){function o(){t.display.wrapper.offsetHeight?(this.stopListening(t,e),t.display.lastWrapHeight!==t.display.wrapper.clientHeight&&t.refresh()):e.timeout=window.setTimeout(o,e.delay)}e.timeout=window.setTimeout(o,e.delay),e.hurry=function(){window.clearTimeout(e.timeout),e.timeout=window.setTimeout(o,50)},t.on(window,"mouseup",e.hurry),t.on(window,"keyup",e.hurry)}},{key:"stopListening",value:function(t,e){window.clearTimeout(e.timeout),t.off(window,"mouseup",e.hurry),t.off(window,"keyup",e.hurry)}}])&&jp(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(Q);function ho(u){return ho=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ho(u)}function Cp(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(ho(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(ho(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),ho(h)==="symbol"?h:String(h)),i)}var h}function wl(){return wl=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=po(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},wl.apply(this,arguments)}function _l(u,n){return _l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},_l(u,n)}function po(u){return po=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},po(u)}var jc=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_l(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=po(i);if(h){var o=po(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(ho(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"build",value:function(){var t=this;if(this.options.compact||(this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired())),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.translateProperty(this.schema.description))),this.options.infoText&&(this.infoButton=this.theme.getInfoButton(this.translateProperty(this.options.infoText))),this.options.compact&&this.container.classList.add("compact"),this.ratingContainer=document.createElement("div"),this.ratingContainer.classList.add("starrating"),this.schema.enum===void 0){var e=this.schema.maximum?this.schema.maximum:5;this.schema.exclusiveMaximum&&e--,this.enum_values=[];for(var o=0;o<e;o++)this.enum_values.push(o+1)}else this.enum_values=this.schema.enum;this.radioGroup=[];for(var c=function(ct){ct.preventDefault(),ct.stopPropagation(),t.setValue(ct.currentTarget.value),t.onChange(!0)},d=this.enum_values.length-1;d>-1;d--){var _=this.formname+(d+1),P=this.theme.getFormInputField("radio");P.name="".concat(this.formname,"[starrating]"),P.value=this.enum_values[d],P.id=_,P.addEventListener("change",c,!1),this.radioGroup.push(P);var D=document.createElement("label");D.htmlFor=_,D.title=this.enum_values[d],this.options.displayValue&&D.classList.add("starrating-display-enabled"),this.ratingContainer.appendChild(P),this.ratingContainer.appendChild(D)}if(this.options.displayValue&&(this.displayRating=document.createElement("div"),this.displayRating.classList.add("starrating-display"),this.displayRating.innerText=this.enum_values[0],this.ratingContainer.appendChild(this.displayRating)),this.schema.readOnly||this.schema.readonly){this.disable(!0);for(var J=0;J<this.radioGroup.length;J++)this.radioGroup[J].disabled=!0;this.ratingContainer.classList.add("readonly")}var nt=this.theme.getContainer();nt.appendChild(this.ratingContainer),this.input=nt,this.control=this.theme.getFormControl(this.label,nt,this.description,this.infoButton),this.container.appendChild(this.control),this.refreshValue()}},{key:"enable",value:function(){if(!this.always_disabled){for(var t=0;t<this.radioGroup.length;t++)this.radioGroup[t].disabled=!1;this.ratingContainer.classList.remove("readonly"),this.disabled=!1}}},{key:"disable",value:function(t){t&&(this.always_disabled=!0);for(var e=0;e<this.radioGroup.length;e++)this.radioGroup[e].disabled=!0;this.ratingContainer.classList.add("readonly"),this.disabled=!0}},{key:"destroy",value:function(){this.ratingContainer.parentNode&&this.ratingContainer.parentNode.parentNode&&this.ratingContainer.parentNode.parentNode.removeChild(this.ratingContainer.parentNode),this.label&&this.label.parentNode&&this.label.parentNode.removeChild(this.label),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),wl(po(s.prototype),"destroy",this).call(this)}},{key:"getNumColumns",value:function(){return 2}},{key:"getValue",value:function(){if(this.dependenciesFulfilled)return this.schema.type==="integer"?this.value===""?void 0:1*this.value:this.value}},{key:"setValue",value:function(t){for(var e=0;e<this.radioGroup.length;e++)if(this.radioGroup[e].value==="".concat(t)){this.radioGroup[e].checked=!0,this.value=t,this.options.displayValue&&(this.displayRating.innerHTML=this.value),this.onChange(!0);break}}}])&&Cp(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(Q);function fo(u){return fo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},fo(u)}function Sp(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(fo(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(fo(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),fo(h)==="symbol"?h:String(h)),i)}var h}function ha(){return ha=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=Xn(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},ha.apply(this,arguments)}function xl(u,n){return xl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},xl(u,n)}function Xn(u){return Xn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Xn(u)}jc.rules={".starrating":"direction:rtl;display:inline-block;white-space:nowrap",".starrating > input":"display:none",".starrating > label:before":"content:'%5C2606';margin:1px;font-size:18px;font-style:normal;font-weight:400;line-height:1;font-family:'Arial';display:inline-block",".starrating > label":"color:%23888;cursor:pointer;margin:8px%200%202px%200",".starrating > label.starrating-display-enabled":"margin:1px%200%200%200",".starrating > input:checked ~ label":"color:%23ffca08",".starrating:not(.readonly) > input:hover ~ label":"color:%23ffca08",".starrating > input:checked ~ label:before":"content:'%5C2605';text-shadow:0%200%201px%20rgba(0%2C20%2C20%2C1)",".starrating:not(.readonly) > input:hover ~ label:before":"content:'%5C2605';text-shadow:0%200%201px%20rgba(0%2C20%2C20%2C1)",".starrating .starrating-display":"position:relative;direction:rtl;text-align:center;font-size:10px;line-height:0px"};var Pp=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&xl(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Xn(i);if(h){var o=Xn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(fo(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"build",value:function(){ha(Xn(s.prototype),"build",this).call(this),this.input.setAttribute("type","number"),this.input.getAttribute("step")||this.input.setAttribute("step","1");var t=this.theme.getStepperButtons(this.input);this.control.appendChild(t),this.stepperDown=this.control.querySelector(".stepper-down"),this.stepperUp=this.control.querySelector(".stepper-up")}},{key:"enable",value:function(){ha(Xn(s.prototype),"enable",this).call(this),this.stepperDown.removeAttribute("disabled"),this.stepperUp.removeAttribute("disabled")}},{key:"disable",value:function(){ha(Xn(s.prototype),"disable",this).call(this),this.stepperDown.setAttribute("disabled",!0),this.stepperUp.setAttribute("disabled",!0)}}])&&Sp(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(ys);function yo(u){return yo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},yo(u)}function Tp(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(yo(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(yo(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),yo(h)==="symbol"?h:String(h)),i)}var h}function gi(){return gi=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=hn(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},gi.apply(this,arguments)}function kl(u,n){return kl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},kl(u,n)}function hn(u){return hn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},hn(u)}var Ap=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&kl(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=hn(i);if(h){var o=hn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(yo(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,f=[{key:"register",value:function(){if(gi(hn(s.prototype),"register",this).call(this),this.rows)for(var t=0;t<this.rows.length;t++)this.rows[t].register()}},{key:"unregister",value:function(){if(gi(hn(s.prototype),"unregister",this).call(this),this.rows)for(var t=0;t<this.rows.length;t++)this.rows[t].unregister()}},{key:"getNumColumns",value:function(){return Math.max(Math.min(12,this.width),3)}},{key:"preBuild",value:function(){var t=this.jsoneditor.expandRefs(this.schema.items||{});this.item_title=t.title||"row",this.item_default=t.default||null,this.item_has_child_editors=t.properties||t.items,this.width=12,this.array_controls_top=this.options.array_controls_top||this.jsoneditor.options.array_controls_top,gi(hn(s.prototype),"preBuild",this).call(this)}},{key:"build",value:function(){this.tableContainer=this.theme.getTableContainer(),this.table=this.theme.getTable(),this.tableContainer.appendChild(this.table),this.container.appendChild(this.tableContainer),this.thead=this.theme.getTableHead(),this.table.appendChild(this.thead),this.header_row=this.theme.getTableRow(),this.thead.appendChild(this.header_row),this.row_holder=this.theme.getTableBody(),this.table.appendChild(this.row_holder);var t=this.getElementEditor(0,!0);if(this.item_default=t.getDefault(),this.width=t.getNumColumns()+2,this.options.compact?(this.panel=document.createElement("div"),this.container.appendChild(this.panel)):(this.header=document.createElement("label"),this.header.textContent=this.getTitle(),this.title=this.theme.getHeader(this.header,this.getPathDepth()),this.container.appendChild(this.title),this.options.infoText&&(this.infoButton=this.theme.getInfoButton(this.translateProperty(this.options.infoText)),this.container.appendChild(this.infoButton)),this.title_controls=this.theme.getHeaderButtonHolder(),this.title.appendChild(this.title_controls),this.schema.description&&(this.description=this.theme.getDescription(this.translateProperty(this.schema.description)),this.container.appendChild(this.description)),this.panel=this.theme.getIndentedPanel(),this.container.appendChild(this.panel),this.error_holder=document.createElement("div"),this.panel.appendChild(this.error_holder)),this.panel.appendChild(this.tableContainer),this.controls=this.theme.getButtonHolder(),this.array_controls_top?this.title.appendChild(this.controls):this.panel.appendChild(this.controls),this.item_has_child_editors)for(var e=t.getChildEditors(),o=t.property_order||Object.keys(e),c=0;c<o.length;c++){var d=this.theme.getTableHeaderCell(e[o[c]].getTitle());e[o[c]].options.hidden&&(d.style.display="none"),this.header_row.appendChild(d)}else this.header_row.appendChild(this.theme.getTableHeaderCell(this.item_title));t.destroy(),this.row_holder.innerHTML="",this.controls_header_cell=this.theme.getTableHeaderCell(" "),this.controls_header_cell.setAttribute("aria-hidden","true"),this.header_row.appendChild(this.controls_header_cell),this.addControls()}},{key:"onChildEditorChange",value:function(t){this.refreshValue(),gi(hn(s.prototype),"onChildEditorChange",this).call(this)}},{key:"getItemDefault",value:function(){return x({},{default:this.item_default}).default}},{key:"getItemTitle",value:function(){return this.item_title}},{key:"getElementEditor",value:function(t,e){var o=x({},this.schema.items),c=this.jsoneditor.getEditorClass(o,this.jsoneditor),d=this.row_holder.appendChild(this.theme.getTableRow()),_=d;this.item_has_child_editors||(_=this.theme.getTableCell(),d.appendChild(_));var P=this.jsoneditor.createEditor(c,{jsoneditor:this.jsoneditor,schema:o,container:_,path:"".concat(this.path,".").concat(t),parent:this,compact:!0,table_row:!0});return P.preBuild(),e||(P.build(),P.postBuild(),P.controls_cell=d.appendChild(this.theme.getTableCell()),P.row=d,P.table_controls=this.theme.getButtonHolder(),P.controls_cell.appendChild(P.table_controls),P.table_controls.style.margin=0,P.table_controls.style.padding=0),P}},{key:"destroy",value:function(){this.innerHTML="",this.checkParent(this.title)&&this.title.parentNode.removeChild(this.title),this.checkParent(this.description)&&this.description.parentNode.removeChild(this.description),this.checkParent(this.row_holder)&&this.row_holder.parentNode.removeChild(this.row_holder),this.checkParent(this.table)&&this.table.parentNode.removeChild(this.table),this.checkParent(this.panel)&&this.panel.parentNode.removeChild(this.panel),this.rows=this.title=this.description=this.row_holder=this.table=this.panel=null,gi(hn(s.prototype),"destroy",this).call(this)}},{key:"ensureArraySize",value:function(t){if(Array.isArray(t)||(t=[t]),this.schema.minItems)for(;t.length<this.schema.minItems;)t.push(this.getItemDefault());return this.schema.maxItems&&t.length>this.schema.maxItems&&(t=t.slice(0,this.schema.maxItems)),t}},{key:"setValue",value:function(){var t=this,e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],o=arguments.length>1?arguments[1]:void 0;if(e=this.ensureArraySize(e),JSON.stringify(e)!==this.serialized){var c=!1;e.forEach(function(P,D){t.rows[D]?t.rows[D].setValue(P):(t.addRow(P),c=!0)});for(var d=e.length;d<this.rows.length;d++){var _=this.rows[d].container;this.item_has_child_editors||this.rows[d].row.parentNode.removeChild(this.rows[d].row),this.rows[d].destroy(),_.parentNode&&_.parentNode.removeChild(_),this.rows[d]=null,c=!0}this.rows=this.rows.slice(0,e.length),this.refreshValue(),(c||o)&&this.refreshRowButtons(),this.onChange()}}},{key:"refreshRowButtons",value:function(){var t=this,e=this.schema.minItems&&this.schema.minItems>=this.rows.length,o=this.schema.maxItems&&this.schema.maxItems<=this.rows.length,c=[];this.rows.forEach(function(nt,ct){if(nt.delete_button){var dt=!e;t.setButtonState(nt.delete_button,dt),c.push(dt)}if(nt.copy_button){var kt=!o;t.setButtonState(nt.copy_button,kt),c.push(kt)}if(nt.moveup_button){var Ct=ct!==0;t.setButtonState(nt.moveup_button,Ct),c.push(Ct)}if(nt.movedown_button){var $t=ct!==t.rows.length-1;t.setButtonState(nt.movedown_button,$t),c.push($t)}});var d=c.some(function(nt){return nt});this.rows.forEach(function(nt){return t.setButtonState(nt.controls_cell,d)}),this.setButtonState(this.controls_header_cell,d),this.setButtonState(this.table,this.value.length);var _=!(o||this.hide_add_button);this.setButtonState(this.add_row_button,_);var P=!(!this.value.length||e||this.hide_delete_last_row_buttons);this.setButtonState(this.delete_last_row_button,P);var D=!(this.value.length<=1||e||this.hide_delete_all_rows_buttons);this.setButtonState(this.remove_all_rows_button,D);var J=_||P||D;this.setButtonState(this.controls,J)}},{key:"refreshValue",value:function(){var t=this;this.value=[],this.rows.forEach(function(e,o){t.value[o]=e.getValue()}),this.serialized=JSON.stringify(this.value)}},{key:"addRow",value:function(t){var e=this.rows.length;this.rows[e]=this.getElementEditor(e);var o=this.rows[e].table_controls;return this.hide_delete_buttons||(this.rows[e].delete_button=this._createDeleteButton(e,o)),this.show_copy_button&&(this.rows[e].copy_button=this._createCopyButton(e,o)),this.hide_move_buttons||(this.rows[e].moveup_button=this._createMoveUpButton(e,o)),this.hide_move_buttons||(this.rows[e].movedown_button=this._createMoveDownButton(e,o)),t!==void 0&&this.rows[e].setValue(t),this.rows[e]}},{key:"_createDeleteButton",value:function(t,e){var o=this,c=this.getButton("","delete","button_delete_row_title_short");return c.classList.add("delete","json-editor-btntype-delete"),c.setAttribute("data-i",t),c.addEventListener("click",function(d){if(d.preventDefault(),d.stopPropagation(),!o.askConfirmation())return!1;var _=1*d.currentTarget.getAttribute("data-i"),P=o.getValue(),D=o.getValue()[_];P.splice(_,1),o.setValue(P),o.onChange(!0),o.jsoneditor.trigger("deleteRow",D)}),e.appendChild(c),c}},{key:"_createCopyButton",value:function(t,e){var o=this,c=this.getButton("","copy","button_copy_row_title_short"),d=this.schema;return c.classList.add("copy","json-editor-btntype-copy"),c.setAttribute("data-i",t),c.addEventListener("click",function(_){_.preventDefault(),_.stopPropagation();var P=1*_.currentTarget.getAttribute("data-i"),D=o.getValue(),J=D[P];d.items.type==="string"&&d.items.format==="uuid"?J=R():d.items.type==="object"&&d.items.properties&&D.forEach(function(nt,ct){if(P===ct)for(var dt=0,kt=Object.keys(nt);dt<kt.length;dt++){var Ct=kt[dt];d.items.properties&&d.items.properties[Ct]&&d.items.properties[Ct].format==="uuid"&&((J=Object.assign({},D[P]))[Ct]=R())}}),D.splice(P+1,0,J),o.setValue(D),o.onChange(!0),o.jsoneditor.trigger("copyRow",o.rows[P+1])}),e.appendChild(c),c}},{key:"_createMoveUpButton",value:function(t,e){var o=this,c=this.getButton("","moveup","button_move_up_title");return c.classList.add("moveup","json-editor-btntype-move"),c.setAttribute("data-i",t),c.addEventListener("click",function(d){d.preventDefault(),d.stopPropagation();var _=1*d.currentTarget.getAttribute("data-i"),P=o.getValue();P.splice(_-1,0,P.splice(_,1)[0]),o.setValue(P),o.onChange(!0),o.jsoneditor.trigger("moveRow",o.rows[_-1])}),e.appendChild(c),c}},{key:"_createMoveDownButton",value:function(t,e){var o=this,c=this.getButton("","movedown","button_move_down_title");return c.classList.add("movedown","json-editor-btntype-move"),c.setAttribute("data-i",t),c.addEventListener("click",function(d){d.preventDefault(),d.stopPropagation();var _=1*d.currentTarget.getAttribute("data-i"),P=o.getValue();P.splice(_+1,0,P.splice(_,1)[0]),o.setValue(P),o.onChange(!0),o.jsoneditor.trigger("moveRow",o.rows[_+1])}),e.appendChild(c),c}},{key:"addControls",value:function(){var t=this;this.collapsed=!1,this.toggle_button=this._createToggleButton(),this.title_controls&&(this.title.insertBefore(this.toggle_button,this.title.childNodes[0]),this.toggle_button.addEventListener("click",function(e){e.preventDefault(),e.stopPropagation(),t.setButtonState(t.panel,t.collapsed),t.collapsed?(t.collapsed=!1,t.setButtonText(e.currentTarget,"","collapse","button_collapse")):(t.collapsed=!0,t.setButtonText(e.currentTarget,"","expand","button_expand"))}),this.options.collapsed&&j(this.toggle_button,"click"),this.schema.options&&this.schema.options.disable_collapse!==void 0?this.schema.options.disable_collapse&&(this.toggle_button.style.display="none"):this.jsoneditor.options.disable_collapse&&(this.toggle_button.style.display="none")),this.add_row_button=this._createAddRowButton(),this.delete_last_row_button=this._createDeleteLastRowButton(),this.remove_all_rows_button=this._createRemoveAllRowsButton()}},{key:"_createToggleButton",value:function(){var t=this.getButton("","collapse","button_collapse");return t.classList.add("json-editor-btntype-toggle"),t}},{key:"_createAddRowButton",value:function(){var t=this,e=this.getButton(this.getItemTitle(),"add","button_add_row_title",[this.getItemTitle()]);return e.classList.add("json-editor-btntype-add"),e.addEventListener("click",function(o){o.preventDefault(),o.stopPropagation();var c=t.addRow();t.refreshValue(),t.refreshRowButtons(),t.onChange(!0),t.jsoneditor.trigger("addRow",c)}),this.controls.appendChild(e),e}},{key:"_createDeleteLastRowButton",value:function(){var t=this,e=this.getButton("button_delete_last","subtract","button_delete_last_title",[this.getItemTitle()]);return e.classList.add("json-editor-btntype-deletelast"),e.addEventListener("click",function(o){if(o.preventDefault(),o.stopPropagation(),!t.askConfirmation())return!1;var c=t.getValue(),d=c.pop();t.setValue(c),t.onChange(!0),t.jsoneditor.trigger("deleteRow",d)}),this.controls.appendChild(e),e}},{key:"_createRemoveAllRowsButton",value:function(){var t=this,e=this.getButton("button_delete_all","delete","button_delete_all_title");return e.classList.add("json-editor-btntype-deleteall"),e.addEventListener("click",function(o){if(o.preventDefault(),o.stopPropagation(),!t.askConfirmation())return!1;var c=t.getValue();t.setValue([]),t.onChange(!0),t.jsoneditor.trigger("deleteAllRows",c)}),this.controls.appendChild(e),e}}],f&&Tp(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(Ut);function mo(u){return mo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},mo(u)}function Lp(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(mo(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(mo(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),mo(h)==="symbol"?h:String(h)),i)}var h}function da(){return da=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=Qn(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},da.apply(this,arguments)}function Ol(u,n){return Ol=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Ol(u,n)}function Qn(u){return Qn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Qn(u)}function bo(u){return bo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},bo(u)}function Rp(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(bo(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(bo(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),bo(h)==="symbol"?h:String(h)),i)}var h}function pa(){return pa=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=Kn(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},pa.apply(this,arguments)}function jl(u,n){return jl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},jl(u,n)}function Kn(u){return Kn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Kn(u)}function vo(u){return vo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},vo(u)}function Ip(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(vo(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(vo(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),vo(h)==="symbol"?h:String(h)),i)}var h}function wi(){return wi=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=dn(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},wi.apply(this,arguments)}function El(u,n){return El=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},El(u,n)}function dn(u){return dn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},dn(u)}k(6977);var gs={ace:Et,array:Ut,arrayChoices:lr,arraySelect2:dr,arraySelectize:Ze,autocomplete:Dn,base64:Vi,button:us,checkbox:hs,choices:rt,datetime:vt,describedBy:nr,enum:$e,hidden:ds,info:qi,integer:ys,ip:ea,jodit:ms,multiple:to,multiselect:qt,null:la,number:fs,object:bi,radio:at,sceditor:ao,select:hi,select2:wp,selectize:xp,signature:Op,simplemde:Ep,starrating:jc,stepper:Pp,string:Q,table:Ap,upload:function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ol(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Qn(i);if(h){var o=Qn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(mo(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"getNumColumns",value:function(){return 4}},{key:"build",value:function(){var t=this;if(this.options.compact||(this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired())),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.translateProperty(this.schema.description))),this.options.infoText&&(this.infoButton=this.theme.getInfoButton(this.translateProperty(this.options.infoText))),this.options.hidden&&(this.container.style.display="none"),this.options=this.expandCallbacks("upload",x({},{title:"Browse",icon:"",auto_upload:!1,hide_input:!1,enable_drag_drop:!1,drop_zone_text:"Drag & Drop file here",drop_zone_top:!1,alt_drop_zone:"",mime_type:"",max_upload_size:0,upload_handler:function(c,d,_,P){window.alert('No upload_handler defined for "'.concat(c.path,'". You must create your own handler to enable upload to server'))}},this.defaults.options.upload||{},this.options.upload||{})),this.options.mime_type=this.options.mime_type?[].concat(this.options.mime_type):[],this.input=this.theme.getFormInputField("hidden"),this.container.appendChild(this.input),!this.schema.readOnly&&!this.schema.readonly){if(typeof this.options.upload_handler!="function")throw new Error("Upload handler required for upload editor");if(this.uploader=this.theme.getFormInputField("file"),this.uploader.style.display="none",this.options.mime_type.length&&this.uploader.setAttribute("accept",this.options.mime_type),this.options.enable_drag_drop===!0&&this.options.hide_input===!0||(this.clickHandler=function(c){t.uploader.dispatchEvent(new window.MouseEvent("click",{view:window,bubbles:!0,cancelable:!1}))},this.browseButton=this.getButton(this.options.title,this.options.icon,this.options.title),this.browseButton.addEventListener("click",this.clickHandler),this.fileDisplay=this.theme.getFormInputField("input"),this.fileDisplay.setAttribute("readonly",!0),this.fileDisplay.value="No file selected.",this.fileDisplay.addEventListener("dblclick",this.clickHandler),this.fileUploadGroup=this.theme.getInputGroup(this.fileDisplay,[this.browseButton]),this.fileUploadGroup||(this.fileUploadGroup=document.createElement("div"),this.fileUploadGroup.appendChild(this.fileDisplay),this.fileUploadGroup.appendChild(this.browseButton))),this.options.enable_drag_drop===!0){if(this.options.alt_drop_zone!==""){if(this.altDropZone=document.querySelector(this.options.alt_drop_zone),!this.altDropZone)throw new Error('Error: alt_drop_zone selector "'.concat(this.options.alt_drop_zone,'" not found!'));this.dropZone=this.altDropZone}else this.dropZone=this.theme.getDropZone(this.options.drop_zone_text);this.dropZone&&(this.dropZone.classList.add("upload-dropzone"),this.dropZone.addEventListener("dblclick",this.clickHandler))}this.uploadHandler=function(c){c.preventDefault(),c.stopPropagation();var d=c.target.files||c.dataTransfer.files;if(d&&d.length)if(t.options.max_upload_size!==0&&d[0].size>t.options.max_upload_size)t.theme.addInputError(t.uploader,"".concat(t.translate("upload_max_size")," ").concat(t.options.max_upload_size));else if(t.options.mime_type.length===0||t.isValidMimeType(d[0].type,t.options.mime_type)){t.fileDisplay&&(t.fileDisplay.value=d[0].name);var _=new window.FileReader;_.onload=function(P){t.preview_value=P.target.result,t.refreshPreview(d),t.onChange(!0),_=null},_.readAsDataURL(d[0])}else t.theme.addInputError(t.uploader,"".concat(t.translate("upload_wrong_file_format")," ").concat(t.options.mime_type.toString()))},this.uploader.addEventListener("change",this.uploadHandler),this.dragHandler=function(c){var d=c.dataTransfer.items||c.dataTransfer.files,_=d&&d.length&&(t.options.mime_type.length===0||t.isValidMimeType(d[0].type,t.options.mime_type)),P=c.currentTarget.classList&&c.currentTarget.classList.contains("upload-dropzone")&&_;switch((c.currentTarget===window?"w_":"e_")+c.type){case"w_drop":case"w_dragover":P||(c.dataTransfer.dropEffect="none");break;case"e_dragenter":P?(t.dropZone.classList.add("valid-dropzone"),c.dataTransfer.dropEffect="copy"):t.dropZone.classList.add("invalid-dropzone");break;case"e_dragover":P&&(c.dataTransfer.dropEffect="copy");break;case"e_dragleave":t.dropZone.classList.remove("valid-dropzone","invalid-dropzone");break;case"e_drop":t.dropZone.classList.remove("valid-dropzone","invalid-dropzone"),P&&t.uploadHandler(c)}P||c.preventDefault()},this.options.enable_drag_drop===!0&&(["dragover","drop"].forEach(function(c){window.addEventListener(c,t.dragHandler,!0)}),["dragenter","dragover","dragleave","drop"].forEach(function(c){t.dropZone.addEventListener(c,t.dragHandler,!0)}))}this.preview=document.createElement("div"),this.control=this.input.controlgroup=this.theme.getFormControl(this.label,this.uploader||this.input,this.description,this.infoButton),this.uploader&&(this.uploader.controlgroup=this.control);var e=this.uploader||this.input,o=document.createElement("div");this.dropZone&&!this.altDropZone&&this.options.drop_zone_top===!0&&o.appendChild(this.dropZone),this.fileUploadGroup&&o.appendChild(this.fileUploadGroup),this.dropZone&&!this.altDropZone&&this.options.drop_zone_top!==!0&&o.appendChild(this.dropZone),o.appendChild(this.preview),e.parentNode.insertBefore(o,e.nextSibling),this.container.appendChild(this.control),window.requestAnimationFrame(function(){t.afterInputReady()})}},{key:"afterInputReady",value:function(){var t=this;if(this.value){var e=document.createElement("img");e.style.maxWidth="100%",e.style.maxHeight="100px",e.onload=function(o){t.preview.appendChild(e)},e.onerror=function(o){console.error("upload error",o,o.currentTarget)},e.src=this.container.querySelector("a").href}this.theme.afterInputReady(this.input)}},{key:"refreshPreview",value:function(t){var e=this;if(this.last_preview!==this.preview_value&&(this.last_preview=this.preview_value,this.preview.innerHTML="",this.preview_value)){var o=t[0],c=this.preview_value.match(/^data:([^;,]+)[;,]/);if(o.mimeType=c?c[1]:"unknown",o.size>0){var d=Math.floor(Math.log(o.size)/Math.log(1024));o.formattedSize="".concat(parseFloat((o.size/Math.pow(1024,d)).toFixed(2))," ").concat(["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][d])}else o.formattedSize="0 Bytes";var _=this.getButton("button_upload","upload","button_upload");_.addEventListener("click",function(P){P.preventDefault(),_.setAttribute("disabled","disabled"),e.theme.removeInputError(e.uploader),e.theme.getProgressBar&&(e.progressBar=e.theme.getProgressBar(),e.preview.appendChild(e.progressBar)),e.options.upload_handler(e.path,o,{success:function(D){e.setValue(D),e.parent?e.parent.onChildEditorChange(e):e.jsoneditor.onChange(),e.progressBar&&e.preview.removeChild(e.progressBar),_.removeAttribute("disabled")},failure:function(D){e.theme.addInputError(e.uploader,D),e.progressBar&&e.preview.removeChild(e.progressBar),_.removeAttribute("disabled")},updateProgress:function(D){e.progressBar&&(D?e.theme.updateProgressBar(e.progressBar,D):e.theme.updateProgressBarUnknown(e.progressBar))}})}),this.preview.appendChild(this.theme.getUploadPreview(o,_,this.preview_value)),this.options.auto_upload&&(_.dispatchEvent(new window.MouseEvent("click")),_.parentNode.removeChild(_))}}},{key:"enable",value:function(){this.always_disabled||(this.uploader&&(this.uploader.disabled=!1),da(Qn(s.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.uploader&&(this.uploader.disabled=!0),da(Qn(s.prototype),"disable",this).call(this)}},{key:"setValue",value:function(t){this.value!==t&&(this.value=t,this.input.value=this.value,this.onChange())}},{key:"destroy",value:function(){var t=this;this.options.enable_drag_drop===!0&&(["dragover","drop"].forEach(function(e){window.removeEventListener(e,t.dragHandler,!0)}),["dragenter","dragover","dragleave","drop"].forEach(function(e){t.dropZone.removeEventListener(e,t.dragHandler,!0)}),this.dropZone.removeEventListener("dblclick",this.clickHandler),this.dropZone&&this.dropZone.parentNode&&this.dropZone.parentNode.removeChild(this.dropZone)),this.uploader&&this.uploader.parentNode&&(this.uploader.removeEventListener("change",this.uploadHandler),this.uploader.parentNode.removeChild(this.uploader)),this.browseButton&&this.browseButton.parentNode&&(this.browseButton.removeEventListener("click",this.clickHandler),this.browseButton.parentNode.removeChild(this.browseButton)),this.fileDisplay&&this.fileDisplay.parentNode&&(this.fileDisplay.removeEventListener("dblclick",this.clickHandler),this.fileDisplay.parentNode.removeChild(this.fileDisplay)),this.fileUploadGroup&&this.fileUploadGroup.parentNode&&this.fileUploadGroup.parentNode.removeChild(this.fileUploadGroup),this.preview&&this.preview.parentNode&&this.preview.parentNode.removeChild(this.preview),this.header&&this.header.parentNode&&this.header.parentNode.removeChild(this.header),this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),da(Qn(s.prototype),"destroy",this).call(this)}},{key:"isValidMimeType",value:function(t,e){return e.reduce(function(o,c){return o||new RegExp(c.replace(/\*/g,".*"),"gi").test(t)},!1)}}])&&Lp(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(F),uuid:function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&jl(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Kn(i);if(h){var o=Kn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(bo(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"preBuild",value:function(){pa(Kn(s.prototype),"preBuild",this).call(this),this.schema.default=this.uuid=this.getUuid(),this.schema.options||(this.schema.options={}),this.schema.options.cleave||(this.schema.options.cleave={delimiters:["-"],blocks:[8,4,4,4,12]})}},{key:"build",value:function(){pa(Kn(s.prototype),"build",this).call(this),this.disable(!0),this.input.setAttribute("readonly","true")}},{key:"sanitize",value:function(t){return this.testUuid(t)||(t=this.uuid),t}},{key:"setValue",value:function(t,e,o){this.testUuid(t)||(t=this.uuid),this.uuid=t,pa(Kn(s.prototype),"setValue",this).call(this,t,e,o)}},{key:"getUuid",value:function(){return R()}},{key:"testUuid",value:function(t){return/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(t)}}])&&Rp(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(Q),colorpicker:function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&El(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=dn(i);if(h){var o=dn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(vo(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"postBuild",value:function(){window.Picker&&(this.input.type="text"),this.input.style.padding="3px"}},{key:"setValue",value:function(t,e,o){var c=wi(dn(s.prototype),"setValue",this).call(this,t,e,o);return this.picker_instance&&this.picker_instance.domElement&&c&&c.changed&&this.picker_instance.setColor(c.value,!0),c}},{key:"getNumColumns",value:function(){return 2}},{key:"afterInputReady",value:function(){wi(dn(s.prototype),"afterInputReady",this).call(this),this.createPicker(!0)}},{key:"disable",value:function(){if(wi(dn(s.prototype),"disable",this).call(this),this.picker_instance&&this.picker_instance.domElement){this.picker_instance.domElement.style.pointerEvents="none";for(var t=this.picker_instance.domElement.querySelectorAll("button"),e=0;e<t.length;e++)t[e].disabled=!0}}},{key:"enable",value:function(){if(wi(dn(s.prototype),"enable",this).call(this),this.picker_instance&&this.picker_instance.domElement){this.picker_instance.domElement.style.pointerEvents="auto";for(var t=this.picker_instance.domElement.querySelectorAll("button"),e=0;e<t.length;e++)t[e].disabled=!1}}},{key:"destroy",value:function(){this.createPicker(!1),wi(dn(s.prototype),"destroy",this).call(this)}},{key:"createPicker",value:function(t){var e=this;if(t){if(window.Picker&&!this.picker_instance){var o=this.expandCallbacks("colorpicker",x({},{editor:!1,alpha:!1,color:this.value,popup:"bottom"},this.defaults.options.colorpicker||{},this.options.colorpicker||{},{parent:this.container})),c=function(d){var _=e.picker_instance.settings.editorFormat,P=e.picker_instance.settings.alpha;e.setValue(_==="hex"?P?d.hex:d.hex.slice(0,7):d["".concat(_+(P?"a":""),"String")])};o.popup||typeof o.onChange=="function"?o.popup&&typeof o.onDone!="function"&&(o.onDone=c):o.onChange=c,this.picker_instance=new window.Picker(o),o.popup||(this.input.style.display="none",this.theme.afterInputReady(this.picker_instance.domElement))}}else this.picker_instance&&(this.picker_instance.destroy(),this.picker_instance=null,this.input.style.display="")}}])&&Ip(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(Q)};function Ec(u,n){(n==null||n>u.length)&&(n=u.length);for(var f=0,i=new Array(n);f<n;f++)i[f]=u[f];return i}var Cc={},Cl="en",Bp=Cl;Cc.en={error_notset:"Property must be set",error_notempty:"Value required",error_enum:"Value must be one of the enumerated values",error_const:"Value must be the constant value",error_anyOf:"Value must validate against at least one of the provided schemas",error_oneOf:"Value must validate against exactly one of the provided schemas. It currently validates against {{0}} of the schemas.",error_not:"Value must not validate against the provided schema",error_type_union:"Value must be one of the provided types",error_type:"Value must be of type {{0}}",error_disallow_union:"Value must not be one of the provided disallowed types",error_disallow:"Value must not be of type {{0}}",error_multipleOf:"Value must be a multiple of {{0}}",error_maximum_excl:"Value must be less than {{0}}",error_maximum_incl:"Value must be at most {{0}}",error_minimum_excl:"Value must be greater than {{0}}",error_minimum_incl:"Value must be at least {{0}}",error_maxLength:"Value must be at most {{0}} characters long",error_contains:"No items match contains",error_minContains:"Contains match count {{0}} is less than minimum contains count of {{1}}",error_maxContains:"Contains match count {{0}} exceeds maximum contains count of {{1}}",error_minLength:"Value must be at least {{0}} characters long",error_pattern:"Value must match the pattern {{0}}",error_additionalItems:"No additional items allowed in this array",error_maxItems:"Value must have at most {{0}} items",error_minItems:"Value must have at least {{0}} items",error_uniqueItems:"Array must have unique items",error_maxProperties:"Object must have at most {{0}} properties",error_minProperties:"Object must have at least {{0}} properties",error_required:"Object is missing the required property '{{0}}'",error_additional_properties:"No additional properties allowed, but property {{0}} is set",error_property_names_exceeds_maxlength:"Property name {{0}} exceeds maxLength",error_property_names_enum_mismatch:"Property name {{0}} does not match any enum values",error_property_names_const_mismatch:"Property name {{0}} does not match the const value",error_property_names_pattern_mismatch:"Property name {{0}} does not match pattern",error_property_names_false:"Property name {{0}} fails when propertyName is false",error_property_names_maxlength:"Property name {{0}} cannot match invalid maxLength",error_property_names_enum:"Property name {{0}} cannot match invalid enum",error_property_names_pattern:"Property name {{0}} cannot match invalid pattern",error_property_names_unsupported:"Unsupported propertyName {{0}}",error_dependency:"Must have property {{0}}",error_date:"Date must be in the format {{0}}",error_time:"Time must be in the format {{0}}",error_datetime_local:"Datetime must be in the format {{0}}",error_invalid_epoch:"Date must be greater than 1 January 1970",error_ipv4:"Value must be a valid IPv4 address in the form of 4 numbers between 0 and 255, separated by dots",error_ipv6:"Value must be a valid IPv6 address",error_hostname:"The hostname has the wrong format",upload_max_size:"Filesize too large. Max size is ",upload_wrong_file_format:"Wrong file format. Allowed format(s): ",button_save:"Save",button_copy:"Copy",button_cancel:"Cancel",button_add:"Add",button_delete_all:"All",button_delete_all_title:"Delete All",button_delete_last:"Last {{0}}",button_delete_last_title:"Delete Last {{0}}",button_add_row_title:"Add {{0}}",button_move_down_title:"Move down",button_move_up_title:"Move up",button_properties:"Properties",button_object_properties:"Object Properties",button_copy_row_title:"Copy {{0}}",button_delete_row_title:"Delete {{0}}",button_delete_row_title_short:"Delete",button_copy_row_title_short:"Copy",button_collapse:"Collapse",button_expand:"Expand",button_edit_json:"Edit JSON",button_upload:"Upload",flatpickr_toggle_button:"Toggle",flatpickr_clear_button:"Clear",choices_placeholder_text:"Start typing to add value",default_array_item_title:"item",button_delete_node_warning:"Are you sure you want to remove this item?"},Object.entries(gs).forEach(function(u){var n=function(h,a){return function(s){if(Array.isArray(s))return s}(h)||function(s,t){var e=s==null?null:typeof Symbol<"u"&&s[Symbol.iterator]||s["@@iterator"];if(e!=null){var o,c,d,_,P=[],D=!0,J=!1;try{if(d=(e=e.call(s)).next,t===0){if(Object(e)!==e)return;D=!1}else for(;!(D=(o=d.call(e)).done)&&(P.push(o.value),P.length!==t);D=!0);}catch(nt){J=!0,c=nt}finally{try{if(!D&&e.return!=null&&(_=e.return(),Object(_)!==_))return}finally{if(J)throw c}}return P}}(h,a)||function(s,t){if(s){if(typeof s=="string")return Ec(s,t);var e=Object.prototype.toString.call(s).slice(8,-1);return e==="Object"&&s.constructor&&(e=s.constructor.name),e==="Map"||e==="Set"?Array.from(s):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?Ec(s,t):void 0}}(h,a)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
67
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}(u,2),f=n[0],i=n[1];gs[f].options=i.options||{}});var _i={options:{upload:function(u,n,f){console.log("Upload handler required for upload editor")},use_name_attributes:!0,prompt_before_delete:!0,use_default_values:!0,max_depth:0,button_state_mode:1,case_sensitive_property_search:!0},theme:"html",template:"default",themes:{},callbacks:{},templates:{},iconlibs:{},editors:gs,languages:Cc,resolvers:O,custom_validators:[],default_language:Cl,language:Bp,translate:function(u,n,f){var i={};f&&f.options&&f.options.error_messages&&f.options.error_messages[_i.language]&&(i=f.options.error_messages[_i.language]);var h=_i.languages[_i.language];if(!h)throw new Error("Unknown language ".concat(_i.language));var a=i[u]||h[u]||_i.languages[Cl][u]||u;if(n)for(var s=0;s<n.length;s++)a=a.replace(new RegExp("\\{\\{".concat(s,"}}"),"g"),n[s]);return a},translateProperty:function(u,n){return u}};function xi(){xi=function(){return u};var u={},n=Object.prototype,f=n.hasOwnProperty,i=Object.defineProperty||function(W,G,Z){W[G]=Z.value},h=typeof Symbol=="function"?Symbol:{},a=h.iterator||"@@iterator",s=h.asyncIterator||"@@asyncIterator",t=h.toStringTag||"@@toStringTag";function e(W,G,Z){return Object.defineProperty(W,G,{value:Z,enumerable:!0,configurable:!0,writable:!0}),W[G]}try{e({},"")}catch{e=function(G,Z,pt){return G[Z]=pt}}function o(W,G,Z,pt){var et=G&&G.prototype instanceof _?G:_,Lt=Object.create(et.prototype),re=new gt(pt||[]);return i(Lt,"_invoke",{value:$t(W,Z,re)}),Lt}function c(W,G,Z){try{return{type:"normal",arg:W.call(G,Z)}}catch(pt){return{type:"throw",arg:pt}}}u.wrap=o;var d={};function _(){}function P(){}function D(){}var J={};e(J,a,function(){return this});var nt=Object.getPrototypeOf,ct=nt&&nt(nt(Zt([])));ct&&ct!==n&&f.call(ct,a)&&(J=ct);var dt=D.prototype=_.prototype=Object.create(J);function kt(W){["next","throw","return"].forEach(function(G){e(W,G,function(Z){return this._invoke(G,Z)})})}function Ct(W,G){function Z(et,Lt,re,Pe){var Te=c(W[et],W,Lt);if(Te.type!=="throw"){var Br=Te.arg,Kr=Br.value;return Kr&&ur(Kr)=="object"&&f.call(Kr,"__await")?G.resolve(Kr.__await).then(function(xr){Z("next",xr,re,Pe)},function(xr){Z("throw",xr,re,Pe)}):G.resolve(Kr).then(function(xr){Br.value=xr,re(Br)},function(xr){return Z("throw",xr,re,Pe)})}Pe(Te.arg)}var pt;i(this,"_invoke",{value:function(et,Lt){function re(){return new G(function(Pe,Te){Z(et,Lt,Pe,Te)})}return pt=pt?pt.then(re,re):re()}})}function $t(W,G,Z){var pt="suspendedStart";return function(et,Lt){if(pt==="executing")throw new Error("Generator is already running");if(pt==="completed"){if(et==="throw")throw Lt;return{value:void 0,done:!0}}for(Z.method=et,Z.arg=Lt;;){var re=Z.delegate;if(re){var Pe=ne(re,Z);if(Pe){if(Pe===d)continue;return Pe}}if(Z.method==="next")Z.sent=Z._sent=Z.arg;else if(Z.method==="throw"){if(pt==="suspendedStart")throw pt="completed",Z.arg;Z.dispatchException(Z.arg)}else Z.method==="return"&&Z.abrupt("return",Z.arg);pt="executing";var Te=c(W,G,Z);if(Te.type==="normal"){if(pt=Z.done?"completed":"suspendedYield",Te.arg===d)continue;return{value:Te.arg,done:Z.done}}Te.type==="throw"&&(pt="completed",Z.method="throw",Z.arg=Te.arg)}}}function ne(W,G){var Z=G.method,pt=W.iterator[Z];if(pt===void 0)return G.delegate=null,Z==="throw"&&W.iterator.return&&(G.method="return",G.arg=void 0,ne(W,G),G.method==="throw")||Z!=="return"&&(G.method="throw",G.arg=new TypeError("The iterator does not provide a '"+Z+"' method")),d;var et=c(pt,W.iterator,G.arg);if(et.type==="throw")return G.method="throw",G.arg=et.arg,G.delegate=null,d;var Lt=et.arg;return Lt?Lt.done?(G[W.resultName]=Lt.value,G.next=W.nextLoc,G.method!=="return"&&(G.method="next",G.arg=void 0),G.delegate=null,d):Lt:(G.method="throw",G.arg=new TypeError("iterator result is not an object"),G.delegate=null,d)}function Re(W){var G={tryLoc:W[0]};1 in W&&(G.catchLoc=W[1]),2 in W&&(G.finallyLoc=W[2],G.afterLoc=W[3]),this.tryEntries.push(G)}function Gt(W){var G=W.completion||{};G.type="normal",delete G.arg,W.completion=G}function gt(W){this.tryEntries=[{tryLoc:"root"}],W.forEach(Re,this),this.reset(!0)}function Zt(W){if(W){var G=W[a];if(G)return G.call(W);if(typeof W.next=="function")return W;if(!isNaN(W.length)){var Z=-1,pt=function et(){for(;++Z<W.length;)if(f.call(W,Z))return et.value=W[Z],et.done=!1,et;return et.value=void 0,et.done=!0,et};return pt.next=pt}}return{next:Ge}}function Ge(){return{value:void 0,done:!0}}return P.prototype=D,i(dt,"constructor",{value:D,configurable:!0}),i(D,"constructor",{value:P,configurable:!0}),P.displayName=e(D,t,"GeneratorFunction"),u.isGeneratorFunction=function(W){var G=typeof W=="function"&&W.constructor;return!!G&&(G===P||(G.displayName||G.name)==="GeneratorFunction")},u.mark=function(W){return Object.setPrototypeOf?Object.setPrototypeOf(W,D):(W.__proto__=D,e(W,t,"GeneratorFunction")),W.prototype=Object.create(dt),W},u.awrap=function(W){return{__await:W}},kt(Ct.prototype),e(Ct.prototype,s,function(){return this}),u.AsyncIterator=Ct,u.async=function(W,G,Z,pt,et){et===void 0&&(et=Promise);var Lt=new Ct(o(W,G,Z,pt),et);return u.isGeneratorFunction(G)?Lt:Lt.next().then(function(re){return re.done?re.value:Lt.next()})},kt(dt),e(dt,t,"Generator"),e(dt,a,function(){return this}),e(dt,"toString",function(){return"[object Generator]"}),u.keys=function(W){var G=Object(W),Z=[];for(var pt in G)Z.push(pt);return Z.reverse(),function et(){for(;Z.length;){var Lt=Z.pop();if(Lt in G)return et.value=Lt,et.done=!1,et}return et.done=!0,et}},u.values=Zt,gt.prototype={constructor:gt,reset:function(W){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(Gt),!W)for(var G in this)G.charAt(0)==="t"&&f.call(this,G)&&!isNaN(+G.slice(1))&&(this[G]=void 0)},stop:function(){this.done=!0;var W=this.tryEntries[0].completion;if(W.type==="throw")throw W.arg;return this.rval},dispatchException:function(W){if(this.done)throw W;var G=this;function Z(Te,Br){return Lt.type="throw",Lt.arg=W,G.next=Te,Br&&(G.method="next",G.arg=void 0),!!Br}for(var pt=this.tryEntries.length-1;pt>=0;--pt){var et=this.tryEntries[pt],Lt=et.completion;if(et.tryLoc==="root")return Z("end");if(et.tryLoc<=this.prev){var re=f.call(et,"catchLoc"),Pe=f.call(et,"finallyLoc");if(re&&Pe){if(this.prev<et.catchLoc)return Z(et.catchLoc,!0);if(this.prev<et.finallyLoc)return Z(et.finallyLoc)}else if(re){if(this.prev<et.catchLoc)return Z(et.catchLoc,!0)}else{if(!Pe)throw new Error("try statement without catch or finally");if(this.prev<et.finallyLoc)return Z(et.finallyLoc)}}}},abrupt:function(W,G){for(var Z=this.tryEntries.length-1;Z>=0;--Z){var pt=this.tryEntries[Z];if(pt.tryLoc<=this.prev&&f.call(pt,"finallyLoc")&&this.prev<pt.finallyLoc){var et=pt;break}}et&&(W==="break"||W==="continue")&&et.tryLoc<=G&&G<=et.finallyLoc&&(et=null);var Lt=et?et.completion:{};return Lt.type=W,Lt.arg=G,et?(this.method="next",this.next=et.finallyLoc,d):this.complete(Lt)},complete:function(W,G){if(W.type==="throw")throw W.arg;return W.type==="break"||W.type==="continue"?this.next=W.arg:W.type==="return"?(this.rval=this.arg=W.arg,this.method="return",this.next="end"):W.type==="normal"&&G&&(this.next=G),d},finish:function(W){for(var G=this.tryEntries.length-1;G>=0;--G){var Z=this.tryEntries[G];if(Z.finallyLoc===W)return this.complete(Z.completion,Z.afterLoc),Gt(Z),d}},catch:function(W){for(var G=this.tryEntries.length-1;G>=0;--G){var Z=this.tryEntries[G];if(Z.tryLoc===W){var pt=Z.completion;if(pt.type==="throw"){var et=pt.arg;Gt(Z)}return et}}throw new Error("illegal catch attempt")},delegateYield:function(W,G,Z){return this.delegate={iterator:Zt(W),resultName:G,nextLoc:Z},this.method==="next"&&(this.arg=void 0),d}},u}function Sc(u,n,f,i,h,a,s){try{var t=u[a](s),e=t.value}catch(o){return void f(o)}t.done?n(e):Promise.resolve(e).then(i,h)}function Pc(u){return function(){var n=this,f=arguments;return new Promise(function(i,h){var a=u.apply(n,f);function s(e){Sc(a,i,h,s,t,"next",e)}function t(e){Sc(a,i,h,s,t,"throw",e)}s(void 0)})}}function ki(u,n){return function(f){if(Array.isArray(f))return f}(u)||function(f,i){var h=f==null?null:typeof Symbol<"u"&&f[Symbol.iterator]||f["@@iterator"];if(h!=null){var a,s,t,e,o=[],c=!0,d=!1;try{if(t=(h=h.call(f)).next,i===0){if(Object(h)!==h)return;c=!1}else for(;!(c=(a=t.call(h)).done)&&(o.push(a.value),o.length!==i);c=!0);}catch(_){d=!0,s=_}finally{try{if(!c&&h.return!=null&&(e=h.return(),Object(e)!==e))return}finally{if(d)throw s}}return o}}(u,n)||function(f,i){if(f){if(typeof f=="string")return Tc(f,i);var h=Object.prototype.toString.call(f).slice(8,-1);return h==="Object"&&f.constructor&&(h=f.constructor.name),h==="Map"||h==="Set"?Array.from(f):h==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(h)?Tc(f,i):void 0}}(u,n)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
68
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Tc(u,n){(n==null||n>u.length)&&(n=u.length);for(var f=0,i=new Array(n);f<n;f++)i[f]=u[f];return i}function ur(u){return ur=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ur(u)}function Dp(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(ur(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(ur(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),ur(h)==="symbol"?h:String(h)),i)}var h}k(8733);var Np=function(){function u(a){(function(s,t){if(!(s instanceof t))throw new TypeError("Cannot call a class as a function")})(this,u),this.options=a||{},this.schema={},this.refs=this.options.refs||{},this.refs_with_info={},this.refs_prefix="#/counter/",this.refs_counter=1,this._subSchema1={type:function(s){ur(s.type)==="object"&&(s.type=this._expandSubSchema(s.type))},disallow:function(s){ur(s.disallow)==="object"&&(s.disallow=this._expandSubSchema(s.disallow))},anyOf:function(s){var t=this;Object.entries(s.anyOf).forEach(function(e){var o=ki(e,2),c=o[0],d=o[1];s.anyOf[c]=t.expandSchema(d)})},dependencies:function(s){var t=this;Object.entries(s.dependencies).forEach(function(e){var o=ki(e,2),c=o[0],d=o[1];ur(d)!=="object"||Array.isArray(d)||(s.dependencies[c]=t.expandSchema(d))})},not:function(s){s.not=this.expandSchema(s.not)}},this._subSchema2={allOf:function(s,t){var e=this,o=x({},t);return Object.entries(s.allOf).forEach(function(c){var d=ki(c,2),_=d[0],P=d[1];s.allOf[_]=e.expandRefs(P,!0),o=e.extendSchemas(o,e.expandSchema(P))}),delete o.allOf,o},extends:function(s,t){var e,o=this;return delete(e=Array.isArray(s.extends)?s.extends.reduce(function(c,d,_){return o.extendSchemas(c,o.expandSchema(d))},t):this.extendSchemas(t,this.expandSchema(s.extends))).extends,e},oneOf:function(s,t){var e=this,o=x({},t);return delete o.oneOf,s.oneOf.reduce(function(c,d,_){return c.oneOf[_]=e.extendSchemas(e.expandSchema(d),o),c},t),t}}}var n,f,i,h;return n=u,f=[{key:"load",value:(h=Pc(xi().mark(function a(s,t,e){return xi().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return this.schema=s,o.next=3,this._asyncloadExternalRefs(s,t,this._getFileBase(e),!0);case 3:return o.abrupt("return",this.expandRefs(s));case 4:case"end":return o.stop()}},a,this)})),function(a,s,t){return h.apply(this,arguments)})},{key:"expandRefs",value:function(a,s){var t=this,e=x({},a);if(!e.$ref)return e;var o=e.$ref.split("#");if(o.length===2&&!this.refs_with_info[e.$ref]){var c=this.expandRecursivePointer(this.schema,o[1]),d=this.extendSchemas(e,this.expandSchema(c));return delete d.$ref,d}var _=o.length>2?this.refs_with_info["#"+o[1]]:this.refs_with_info[e.$ref];delete e.$ref;var P=_.$ref.startsWith("#")?_.fetchUrl:"",D=this._getRef(P,_);if(this.refs[D]){if(s&&S(this.refs[D],"allOf")){var J=this.refs[D].allOf;Object.keys(J).forEach(function(nt){J[nt]=t.expandRefs(J[nt],!0)})}}else console.warn("reference:'".concat(D,"' not found!"));return o.length>2?this.extendSchemas(e,this.expandSchema(this.expandRecursivePointer(this.refs[D],o[2]))):this.extendSchemas(e,this.expandSchema(this.refs[D]))}},{key:"expandRecursivePointer",value:function(a,s){var t=a;return s.split("/").slice(1).forEach(function(e){t[e]&&(t=t[e])}),t.$refs&&t.$refs.startsWith("#")?this.expandRecursivePointer(a,t.$refs):t}},{key:"expandSchema",value:function(a){var s=this;Object.entries(this._subSchema1).forEach(function(e){var o=ki(e,2),c=o[0],d=o[1];a[c]&&d.call(s,a)});var t=x({},a);return Object.entries(this._subSchema2).forEach(function(e){var o=ki(e,2),c=o[0],d=o[1];a[c]&&(t=d.call(s,a,t))}),this.expandRefs(t)}},{key:"_getRef",value:function(a,s){var t=a+s;return this.refs[t]?t:a+decodeURIComponent(s.$ref)}},{key:"_expandSubSchema",value:function(a){var s=this;return Array.isArray(a)?a.map(function(t){return ur(t)==="object"?s.expandSchema(t):t}):this.expandSchema(a)}},{key:"_manageRecursivePointer",value:function(a,s){Object.keys(a).forEach(function(t){a[t].$ref&&a[t].$ref.indexOf("#")===0&&(a[t].$ref=s+a[t].$ref)})}},{key:"_getExternalRefs",value:function(a,s){var t=this,e=arguments.length>2&&arguments[2]!==void 0&&arguments[2];e||this._manageRecursivePointer(a,s);var o={},c=function(J){return Object.keys(J).forEach(function(nt){o[nt]=!0})};if(a.$ref&&ur(a.$ref)!=="object"&&(a.$ref.indexOf("#")!==0||!e)){var d=a.$ref,_="";d.indexOf("#")>0&&(d=d.substr(0,d.indexOf("#"))),d!==a.$ref&&(_=a.$ref.substr(a.$ref.indexOf("#")));var P=this.refs_prefix+this.refs_counter++,D=P+_;a.$ref.substr(0,1)==="#"||this.refs[a.$ref]||(o[d]=!0),this.refs_with_info[P]={fetchUrl:s,$ref:d},a.$ref=D}return Object.values(a).forEach(function(J){J&&ur(J)==="object"&&(Array.isArray(J)?Object.values(J).forEach(function(nt){nt&&ur(nt)==="object"&&c(t._getExternalRefs(nt,s,e))}):J.$ref&&typeof J.$ref=="string"&&J.$ref.startsWith("#")||c(t._getExternalRefs(J,s,e)))}),a.id&&typeof a.id=="string"&&a.id.substr(0,4)==="urn:"?this.refs[a.id]=a:a.$id&&typeof a.$id=="string"&&a.$id.substr(0,4)==="urn:"&&(this.refs[a.$id]=a),o}},{key:"_getFileBase",value:function(a){if(!a)return"/";var s=this.options.ajaxBase;return s===void 0?this._getFileBaseFromFileLocation(a):s}},{key:"_getFileBaseFromFileLocation",value:function(a){var s=a.split("/");return s.pop(),"".concat(s.join("/"),"/")}},{key:"_joinUrl",value:function(a,s){var t=a;return a.substr(0,7)!=="http://"&&a.substr(0,8)!=="https://"&&a.substr(0,5)!=="blob:"&&a.substr(0,5)!=="data:"&&a.substr(0,1)!=="#"&&a.substr(0,1)!=="/"&&(t=s+a),t.indexOf("#")>0&&(t=t.substr(0,t.indexOf("#"))),t}},{key:"_isUniformResourceName",value:function(a){return a.substr(0,4)==="urn:"}},{key:"_asyncloadExternalRefs",value:(i=Pc(xi().mark(function a(s,t,e){var o,c,d,_,P,D,J=this,nt=arguments;return xi().wrap(function(ct){for(;;)switch(ct.prev=ct.next){case 0:o=nt.length>3&&nt[3]!==void 0&&nt[3],c=this._getExternalRefs(s,t,o),d=0,_=xi().mark(function dt(){var kt,Ct,$t,ne,Re,Gt,gt,Zt,Ge,W,G;return xi().wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:if((kt=D[P])!==void 0){Z.next=3;break}return Z.abrupt("return","continue");case 3:if(!J.refs[kt]){Z.next=5;break}return Z.abrupt("return","continue");case 5:if(!J._isUniformResourceName(kt)){Z.next=40;break}if(J.refs[kt]="loading",d++,Ct=J.options.urn_resolver,$t=kt,typeof Ct=="function"){Z.next=13;break}throw console.log('No "urn_resolver" callback defined to resolve "'.concat($t,'"')),new Error("Must set urn_resolver option to a callback to resolve ".concat($t));case 13:return $t.indexOf("#")>0&&($t=$t.substr(0,$t.indexOf("#"))),Z.prev=14,Z.next=17,Ct($t);case 17:ne=Z.sent,Z.prev=18,Re=JSON.parse(ne),Z.next=26;break;case 22:throw Z.prev=22,Z.t0=Z.catch(18),console.log(Z.t0),new Error("Failed to parse external ref ".concat($t));case 26:if(!(typeof Re!="boolean"&&ur(Re)!=="object"||Re===null||Array.isArray(Re))){Z.next=28;break}throw new Error("External ref does not contain a valid schema - ".concat($t));case 28:return J.refs[kt]=Re,Z.next=31,J._asyncloadExternalRefs(Re,kt,e);case 31:Z.next=37;break;case 33:throw Z.prev=33,Z.t1=Z.catch(14),console.log(Z.t1),new Error("Failed to parse external ref ".concat($t));case 37:if(typeof ne!="boolean"){Z.next=39;break}throw new Error("External ref does not contain a valid schema - ".concat($t));case 39:return Z.abrupt("return","continue");case 40:if(J.options.ajax){Z.next=42;break}throw new Error("Must set ajax option to true to load external ref ".concat(kt));case 42:if(d++,Gt=J._joinUrl(kt,e),J.options.ajax_cache_responses&&(Zt=J.cacheGet(Gt))&&(gt=Zt),gt){Z.next=61;break}return Z.next=48,new Promise(function(pt){var et=new XMLHttpRequest;J.options.ajaxCredentials&&(et.withCredentials=J.options.ajaxCredentials),et.overrideMimeType("application/json"),et.open("GET",Gt,!0),et.onload=function(){pt(et)},et.onerror=function(Lt){pt(void 0)},et.send()});case 48:if((Ge=Z.sent)!==void 0){Z.next=51;break}throw new Error("Failed to fetch ref via ajax - ".concat(kt));case 51:Z.prev=51,gt=JSON.parse(Ge.responseText),J.onSchemaLoaded({schema:gt,schemaUrl:Gt}),J.options.ajax_cache_responses&&J.cacheSet(Gt,gt),Z.next=61;break;case 57:throw Z.prev=57,Z.t2=Z.catch(51),console.log(Z.t2),new Error("Failed to parse external ref ".concat(Gt));case 61:if(!(typeof gt!="boolean"&&ur(gt)!=="object"||gt===null||Array.isArray(gt))){Z.next=63;break}throw new Error("External ref does not contain a valid schema - ".concat(Gt));case 63:return J.refs[kt]=gt,W=J._getFileBaseFromFileLocation(Gt),Gt!==kt&&(G=Gt.split("/"),Gt=(kt.substr(0,1)==="/"?"/":"")+G.pop()),Z.next=68,J._asyncloadExternalRefs(gt,Gt,W);case 68:case"end":return Z.stop()}},dt,null,[[14,33],[18,22],[51,57]])}),P=0,D=Object.keys(c);case 5:if(!(P<D.length)){ct.next=13;break}return ct.delegateYield(_(),"t0",7);case 7:if(ct.t0!=="continue"){ct.next=10;break}return ct.abrupt("continue",10);case 10:P++,ct.next=5;break;case 13:if(d){ct.next=15;break}return ct.abrupt("return",!0);case 15:this.onAllSchemasLoaded();case 16:case"end":return ct.stop()}},a,this)})),function(a,s,t){return i.apply(this,arguments)})},{key:"onSchemaLoaded",value:function(a){}},{key:"onAllSchemasLoaded",value:function(){}},{key:"extendSchemas",value:function(a,s){var t=this;a=x({},a),s=x({},s);var e={},o=function(c){typeof c=="string"&&(c=[c]),typeof s.type=="string"&&(s.type=[s.type]),s.type&&s.type.length?e.type=c.filter(function(d){return s.type.includes(d)}):e.type=c,e.type.length===1&&typeof e.type[0]=="string"?e.type=e.type[0]:e.type.length===0&&delete e.type};return Object.entries(a).forEach(function(c){var d=ki(c,2),_=d[0],P=d[1];s[_]!==void 0?function(D,J){(function(nt,ct){return(nt==="required"||nt==="defaultProperties")&&ur(ct)==="object"&&Array.isArray(ct)})(D,J)?e[D]=J.concat(s[D]).reduce(function(nt,ct){return nt.includes(ct)||nt.push(ct),nt},[]):D!=="type"||typeof J!="string"&&!Array.isArray(J)?ur(J)!=="object"||Array.isArray(J)||J===null?e[D]=J:e[D]=t.extendSchemas(J,s[D]):o(J)}(_,P):e[_]=P}),Object.entries(s).forEach(function(c){var d=ki(c,2),_=d[0],P=d[1];a[_]===void 0&&(e[_]=P)}),e}},{key:"getCacheKey",value:function(a){return["je-cache",a].join("::")}},{key:"getCacheBuster",value:function(){return this.options.ajax_cache_buster||new Date().toISOString().slice(0,10)}},{key:"cacheSet",value:function(a,s){try{window.localStorage.setItem(this.getCacheKey(a),JSON.stringify({cacheBuster:this.getCacheBuster(),schema:s}))}catch(t){console.error(t)}}},{key:"cacheGet",value:function(a){try{var s=window.localStorage.getItem(this.getCacheKey(a));if(s){var t=JSON.parse(s);if(t.cacheBuster&&t.schema&&t.cacheBuster===this.getCacheBuster())return t.schema;this.cacheDelete(a)}}catch(e){console.error(e)}}},{key:"cacheDelete",value:function(a){window.localStorage.removeItem(this.getCacheKey(a))}}],f&&Dp(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),u}(),$p=(k(3210),{default:function(){return{compile:function(u){var n=u.match(/{{\s*([a-zA-Z0-9\-_ .]+)\s*}}/g),f=n&&n.length;if(!f)return function(){return u};for(var i=[],h=function(s){var t,e,o=n[s].replace(/[{}]+/g,"").trim().split("."),c=o.length;c>1?t=function(d){for(e=d,s=0;s<c&&(e=e[o[s]]);s++);return e}:(o=o[0],t=function(d){return d[o]}),i.push({s:n[s],r:t})},a=0;a<f;a++)h(a);return function(s){var t,e="".concat(u);for(a=0;a<f;a++)t=i[a],e=e.replace(t.s,t.r(s));return e}}}},ejs:function(){return!!window.EJS&&{compile:function(u){var n=new window.EJS({text:u});return function(f){return n.render(f)}}}},handlebars:function(){return window.Handlebars},hogan:function(){return!!window.Hogan&&{compile:function(u){var n=window.Hogan.compile(u);return function(f){return n.render(f)}}}},lodash:function(){return!!window._&&{compile:function(u){return function(n){return window._.template(u)(n)}}}},markup:function(){return!(!window.Mark||!window.Mark.up)&&{compile:function(u){return function(n){return window.Mark.up(u,n)}}}},mustache:function(){return!!window.Mustache&&{compile:function(u){return function(n){return window.Mustache.render(u,n)}}}},swig:function(){return window.swig},underscore:function(){return!!window._&&{compile:function(u){return function(n){return window._.template(u)(n)}}}}});function fa(u){return fa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},fa(u)}function Sl(u,n){(n==null||n>u.length)&&(n=u.length);for(var f=0,i=new Array(n);f<n;f++)i[f]=u[f];return i}function Mp(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(fa(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(fa(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),fa(h)==="symbol"?h:String(h)),i)}var h}var Hp={collapse:"",expand:"",delete:"",edit:"",add:"",cancel:"",save:"",moveup:"",movedown:""},Cn=function(){function u(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Hp;(function(a,s){if(!(a instanceof s))throw new TypeError("Cannot call a class as a function")})(this,u),this.mapping=h,this.icon_prefix=i}var n,f;return n=u,(f=[{key:"getIconClass",value:function(i){return this.mapping[i]?this.icon_prefix+this.mapping[i]:this.icon_prefix+i}},{key:"getIcon",value:function(i){var h,a=this.getIconClass(i);if(!a)return null;var s,t=document.createElement("i");return(h=t.classList).add.apply(h,function(e){if(Array.isArray(e))return Sl(e)}(s=a.split(" "))||function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}(s)||function(e,o){if(e){if(typeof e=="string")return Sl(e,o);var c=Object.prototype.toString.call(e).slice(8,-1);return c==="Object"&&e.constructor&&(c=e.constructor.name),c==="Map"||c==="Set"?Array.from(e):c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c)?Sl(e,o):void 0}}(s)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
69
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()),t}}])&&Mp(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),u}();function Pl(u){return Pl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Pl(u)}function Tl(u,n){return Tl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Tl(u,n)}function ws(u){return ws=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ws(u)}var Fp="glyphicon glyphicon-",Vp={collapse:"chevron-down",expand:"chevron-right",delete:"trash",edit:"pencil",add:"plus",subtract:"minus",cancel:"floppy-remove",save:"floppy-saved",moveup:"arrow-up",moveright:"arrow-right",movedown:"arrow-down",moveleft:"arrow-left",copy:"copy",clear:"remove-circle",time:"time",calendar:"calendar",edit_properties:"list"},zp=function(u){(function(s,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(t&&t.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),Object.defineProperty(s,"prototype",{writable:!1}),t&&Tl(s,t)})(a,u);var n,f,i,h=(f=a,i=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var s,t=ws(f);if(i){var e=ws(this).constructor;s=Reflect.construct(t,arguments,e)}else s=t.apply(this,arguments);return function(o,c){if(c&&(Pl(c)==="object"||typeof c=="function"))return c;if(c!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}(o)}(this,s)});function a(){return function(s,t){if(!(s instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),h.call(this,Fp,Vp)}return n=a,Object.defineProperty(n,"prototype",{writable:!1}),n}(Cn);function Al(u){return Al=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Al(u)}function Ll(u,n){return Ll=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Ll(u,n)}function _s(u){return _s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},_s(u)}var Up="icon-",qp={collapse:"chevron-down",expand:"chevron-right",delete:"trash",edit:"pencil",add:"plus",subtract:"minus",cancel:"ban-circle",save:"save",moveup:"arrow-up",moveright:"arrow-right",movedown:"arrow-down",moveleft:"arrow-left",copy:"copy",clear:"remove-circle",time:"time",calendar:"calendar",edit_properties:"list"},Gp=function(u){(function(s,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(t&&t.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),Object.defineProperty(s,"prototype",{writable:!1}),t&&Ll(s,t)})(a,u);var n,f,i,h=(f=a,i=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var s,t=_s(f);if(i){var e=_s(this).constructor;s=Reflect.construct(t,arguments,e)}else s=t.apply(this,arguments);return function(o,c){if(c&&(Al(c)==="object"||typeof c=="function"))return c;if(c!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}(o)}(this,s)});function a(){return function(s,t){if(!(s instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),h.call(this,Up,qp)}return n=a,Object.defineProperty(n,"prototype",{writable:!1}),n}(Cn);function Rl(u){return Rl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Rl(u)}function Il(u,n){return Il=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Il(u,n)}function xs(u){return xs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},xs(u)}var Wp="fa fa-",Zp={collapse:"caret-square-o-down",expand:"caret-square-o-right",delete:"times",edit:"pencil",add:"plus",subtract:"minus",cancel:"ban",save:"save",moveup:"arrow-up",moveright:"arrow-right",movedown:"arrow-down",moveleft:"arrow-left",copy:"files-o",clear:"times-circle-o",time:"clock-o",calendar:"calendar",edit_properties:"list"},Jp=function(u){(function(s,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(t&&t.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),Object.defineProperty(s,"prototype",{writable:!1}),t&&Il(s,t)})(a,u);var n,f,i,h=(f=a,i=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var s,t=xs(f);if(i){var e=xs(this).constructor;s=Reflect.construct(t,arguments,e)}else s=t.apply(this,arguments);return function(o,c){if(c&&(Rl(c)==="object"||typeof c=="function"))return c;if(c!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}(o)}(this,s)});function a(){return function(s,t){if(!(s instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),h.call(this,Wp,Zp)}return n=a,Object.defineProperty(n,"prototype",{writable:!1}),n}(Cn);function Bl(u){return Bl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Bl(u)}function Dl(u,n){return Dl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Dl(u,n)}function ks(u){return ks=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ks(u)}var Yp="fas fa-",Xp={collapse:"caret-down",expand:"caret-right",delete:"trash",edit:"pen",add:"plus",subtract:"minus",cancel:"ban",save:"save",moveup:"arrow-up",moveright:"arrow-right",movedown:"arrow-down",moveleft:"arrow-left",copy:"copy",clear:"times-circle",time:"clock",calendar:"calendar",edit_properties:"list"},Qp=function(u){(function(s,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(t&&t.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),Object.defineProperty(s,"prototype",{writable:!1}),t&&Dl(s,t)})(a,u);var n,f,i,h=(f=a,i=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var s,t=ks(f);if(i){var e=ks(this).constructor;s=Reflect.construct(t,arguments,e)}else s=t.apply(this,arguments);return function(o,c){if(c&&(Bl(c)==="object"||typeof c=="function"))return c;if(c!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}(o)}(this,s)});function a(){return function(s,t){if(!(s instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),h.call(this,Yp,Xp)}return n=a,Object.defineProperty(n,"prototype",{writable:!1}),n}(Cn);function Nl(u){return Nl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Nl(u)}function $l(u,n){return $l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},$l(u,n)}function Os(u){return Os=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Os(u)}var Kp="ui-icon ui-icon-",tf={collapse:"triangle-1-s",expand:"triangle-1-e",delete:"trash",edit:"pencil",add:"plusthick",subtract:"minusthick",cancel:"closethick",save:"disk",moveup:"arrowthick-1-n",moveright:"arrowthick-1-e",movedown:"arrowthick-1-s",moveleft:"arrowthick-1-w",copy:"copy",clear:"circle-close",time:"time",calendar:"calendar",edit_properties:"note"},ef=function(u){(function(s,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(t&&t.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),Object.defineProperty(s,"prototype",{writable:!1}),t&&$l(s,t)})(a,u);var n,f,i,h=(f=a,i=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var s,t=Os(f);if(i){var e=Os(this).constructor;s=Reflect.construct(t,arguments,e)}else s=t.apply(this,arguments);return function(o,c){if(c&&(Nl(c)==="object"||typeof c=="function"))return c;if(c!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}(o)}(this,s)});function a(){return function(s,t){if(!(s instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),h.call(this,Kp,tf)}return n=a,Object.defineProperty(n,"prototype",{writable:!1}),n}(Cn);function Ml(u){return Ml=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Ml(u)}function Hl(u,n){return Hl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Hl(u,n)}function js(u){return js=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},js(u)}var rf="oi oi-",nf={collapse:"collapse-down",expand:"expand-right",delete:"trash",edit:"pencil",add:"plus",subtract:"minus",cancel:"ban",save:"file",moveup:"arrow-thick-top",moveright:"arrow-thick-right",movedown:"arrow-thick-bottom",moveleft:"arrow-thick-left",copy:"clipboard",clear:"circle-x",time:"clock",calendar:"calendar",edit_properties:"list"},of=function(u){(function(s,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(t&&t.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),Object.defineProperty(s,"prototype",{writable:!1}),t&&Hl(s,t)})(a,u);var n,f,i,h=(f=a,i=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var s,t=js(f);if(i){var e=js(this).constructor;s=Reflect.construct(t,arguments,e)}else s=t.apply(this,arguments);return function(o,c){if(c&&(Ml(c)==="object"||typeof c=="function"))return c;if(c!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}(o)}(this,s)});function a(){return function(s,t){if(!(s instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),h.call(this,rf,nf)}return n=a,Object.defineProperty(n,"prototype",{writable:!1}),n}(Cn);function Fl(u){return Fl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Fl(u)}function Vl(u,n){return Vl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Vl(u,n)}function Es(u){return Es=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Es(u)}var af="icon icon-",sf={collapse:"arrow-down",expand:"arrow-right",delete:"delete",edit:"edit",add:"plus",subtract:"minus",cancel:"cross",save:"check",moveup:"upward",moveright:"forward",movedown:"downward",moveleft:"back",copy:"copy",clear:"close",time:"time",calendar:"bookmark",edit_properties:"menu"},lf=function(u){(function(s,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(t&&t.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),Object.defineProperty(s,"prototype",{writable:!1}),t&&Vl(s,t)})(a,u);var n,f,i,h=(f=a,i=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var s,t=Es(f);if(i){var e=Es(this).constructor;s=Reflect.construct(t,arguments,e)}else s=t.apply(this,arguments);return function(o,c){if(c&&(Fl(c)==="object"||typeof c=="function"))return c;if(c!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}(o)}(this,s)});function a(){return function(s,t){if(!(s instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),h.call(this,af,sf)}return n=a,Object.defineProperty(n,"prototype",{writable:!1}),n}(Cn);function zl(u){return zl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},zl(u)}function Ul(u,n){return Ul=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Ul(u,n)}function Cs(u){return Cs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Cs(u)}var uf="bi bi-",cf={collapse:"chevron-down",expand:"chevron-right",delete:"trash",edit:"pencil",add:"plus",subtract:"dash",cancel:"x-circle",save:"save",moveup:"arrow-up",moveright:"arrow-right",movedown:"arrow-down",moveleft:"arrow-left",copy:"clipboard",clear:"x-circle",time:"clock",calendar:"calendar",edit_properties:"list-ul"},hf={bootstrap:function(u){(function(s,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(t&&t.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),Object.defineProperty(s,"prototype",{writable:!1}),t&&Ul(s,t)})(a,u);var n,f,i,h=(f=a,i=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var s,t=Cs(f);if(i){var e=Cs(this).constructor;s=Reflect.construct(t,arguments,e)}else s=t.apply(this,arguments);return function(o,c){if(c&&(zl(c)==="object"||typeof c=="function"))return c;if(c!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}(o)}(this,s)});function a(){return function(s,t){if(!(s instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),h.call(this,uf,cf)}return n=a,Object.defineProperty(n,"prototype",{writable:!1}),n}(Cn),bootstrap3:zp,fontawesome3:Gp,fontawesome4:Jp,fontawesome5:Qp,jqueryui:ef,openiconic:of,spectre:lf};function ya(u){return ya=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ya(u)}function df(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(ya(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(ya(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),ya(h)==="symbol"?h:String(h)),i)}var h}var Ac=["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"].find(function(u){return u in document.documentElement}),Sn=function(){function u(i){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{disable_theme_rules:!1};(function(a,s){if(!(a instanceof s))throw new TypeError("Cannot call a class as a function")})(this,u),this.jsoneditor=i,Object.keys(h).forEach(function(a){i.options[a]!==void 0&&(h[a]=i.options[a])}),this.options=h}var n,f;return n=u,f=[{key:"getContainer",value:function(){return document.createElement("div")}},{key:"getFloatRightLinkHolder",value:function(){var i=document.createElement("div");return i.classList.add("je-float-right-linkholder"),i}},{key:"getModal",value:function(){var i=document.createElement("div");return i.style.display="none",i.classList.add("je-modal"),i}},{key:"getGridContainer",value:function(){return document.createElement("div")}},{key:"getGridRow",value:function(){var i=document.createElement("div");return i.classList.add("row"),i}},{key:"getGridColumn",value:function(){return document.createElement("div")}},{key:"setGridColumnSize",value:function(i,h){}},{key:"getLink",value:function(i){var h=document.createElement("a");return h.setAttribute("href","#"),h.appendChild(document.createTextNode(i)),h}},{key:"disableHeader",value:function(i){i.style.color="#ccc"}},{key:"disableLabel",value:function(i){i.style.color="#ccc"}},{key:"enableHeader",value:function(i){i.style.color=""}},{key:"enableLabel",value:function(i){i.style.color=""}},{key:"getInfoButton",value:function(i){var h=document.createElement("span");h.innerText="ⓘ",h.classList.add("je-infobutton-icon");var a=document.createElement("span");return a.classList.add("je-infobutton-tooltip"),a.innerText=i,h.onmouseover=function(){a.style.visibility="visible"},h.onmouseleave=function(){a.style.visibility="hidden"},h.appendChild(a),h}},{key:"getFormInputLabel",value:function(i,h){var a=document.createElement("label");return a.appendChild(document.createTextNode(i)),h&&a.classList.add("required"),a}},{key:"getHeader",value:function(i,h){var a=document.createElement("h3");return typeof i=="string"?a.textContent=i:a.appendChild(i),a.classList.add("je-header"),a}},{key:"getCheckbox",value:function(){var i=this.getFormInputField("checkbox");return i.classList.add("je-checkbox"),i}},{key:"getCheckboxLabel",value:function(i,h){var a=document.createElement("label");return a.appendChild(document.createTextNode(" ".concat(i))),h&&a.classList.add("required"),a}},{key:"getMultiCheckboxHolder",value:function(i,h,a,s){var t=document.createElement("div");return t.classList.add("control-group"),h&&(h.style.display="block",t.appendChild(h),s&&h.appendChild(s)),Object.values(i).forEach(function(e){e.style.display="inline-block",e.style.marginRight="20px",t.appendChild(e)}),a&&t.appendChild(a),t}},{key:"getFormCheckboxControl",value:function(i,h,a){var s=document.createElement("div");return s.appendChild(i),h.style.width="auto",i.insertBefore(h,i.firstChild),a&&s.classList.add("je-checkbox-control--compact"),s}},{key:"getFormRadio",value:function(i){var h=this.getFormInputField("radio");return Object.keys(i).forEach(function(a){return h.setAttribute(a,i[a])}),h.classList.add("je-radio"),h}},{key:"getFormRadioLabel",value:function(i,h){var a=document.createElement("label");return a.appendChild(document.createTextNode(" ".concat(i))),h&&a.classList.add("required"),a}},{key:"getFormRadioControl",value:function(i,h,a){var s=document.createElement("div");return s.appendChild(i),h.style.width="auto",i.insertBefore(h,i.firstChild),a&&s.classList.add("je-radio-control--compact"),s}},{key:"getSelectInput",value:function(i,h){var a=document.createElement("select");return i&&this.setSelectOptions(a,i),a}},{key:"getSwitcher",value:function(i){var h=this.getSelectInput(i,!1);return h.classList.add("je-switcher"),h}},{key:"getSwitcherOptions",value:function(i){return i.getElementsByTagName("option")}},{key:"setSwitcherOptions",value:function(i,h,a){this.setSelectOptions(i,h,a)}},{key:"setSelectOptions",value:function(i,h){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];i.innerHTML="";for(var s=0;s<h.length;s++){var t=document.createElement("option");t.setAttribute("value",h[s]),t.textContent=a[s]||h[s],i.appendChild(t)}}},{key:"getTextareaInput",value:function(){var i=document.createElement("textarea");return i.classList.add("je-textarea"),i}},{key:"getRangeInput",value:function(i,h,a){var s=this.getFormInputField("range");return s.setAttribute("min",i),s.setAttribute("max",h),s.setAttribute("step",a),s}},{key:"getStepperButtons",value:function(i){var h=document.createElement("div"),a=document.createElement("button");a.setAttribute("type","button"),a.classList.add("stepper-down");var s=document.createElement("button");s.setAttribute("type","button"),s.classList.add("stepper-up"),i.getAttribute("readonly")&&(a.setAttribute("disabled",!0),s.setAttribute("disabled",!0)),a.textContent="-",s.textContent="+";var t=function(c,d){c.value=Number(d||c.value),c.setAttribute("initialized","1")},e=i.getAttribute("min"),o=i.getAttribute("max");return a.addEventListener("click",function(){i.getAttribute("initialized")?e?Number(i.value)>Number(e)&&i.stepDown():i.stepDown():t(i,e),j(i,"change")}),s.addEventListener("click",function(){i.getAttribute("initialized")?o?Number(i.value)<Number(o)&&i.stepUp():i.stepUp():t(i,e),j(i,"change")}),h.appendChild(a),h.appendChild(s),h}},{key:"getRangeOutput",value:function(i,h){var a=document.createElement("output"),s=function(t){a.value=t.currentTarget.value};return i.addEventListener("change",s,!1),i.addEventListener("input",s,!1),a}},{key:"getRangeControl",value:function(i,h){var a=document.createElement("div");return a.classList.add("je-range-control"),h&&a.appendChild(h),a.appendChild(i),a}},{key:"getFormInputField",value:function(i){var h=document.createElement("input");return h.setAttribute("type",i),h}},{key:"afterInputReady",value:function(i){}},{key:"getFormControl",value:function(i,h,a,s,t){var e=document.createElement("div");return e.classList.add("form-control"),i&&(e.appendChild(i),t&&i.setAttribute("for",t)),h.type!=="checkbox"&&h.type!=="radio"||!i?(s&&i&&i.appendChild(s),e.appendChild(h)):(h.style.width="auto",i.insertBefore(h,i.firstChild),s&&i.appendChild(s)),a&&e.appendChild(a),e}},{key:"getIndentedPanel",value:function(){var i=document.createElement("div");return i.classList.add("je-indented-panel"),i}},{key:"getTopIndentedPanel",value:function(){var i=document.createElement("div");return i.classList.add("je-indented-panel--top"),i}},{key:"getChildEditorHolder",value:function(){return document.createElement("div")}},{key:"getDescription",value:function(i){var h=document.createElement("p");return window.DOMPurify?h.innerHTML=window.DOMPurify.sanitize(i):h.textContent=this.cleanText(i),h}},{key:"getCheckboxDescription",value:function(i){return this.getDescription(i)}},{key:"getFormInputDescription",value:function(i){return this.getDescription(i)}},{key:"getButtonHolder",value:function(){return document.createElement("span")}},{key:"getHeaderButtonHolder",value:function(){return this.getButtonHolder()}},{key:"getFormButtonHolder",value:function(i){return this.getButtonHolder()}},{key:"getButton",value:function(i,h,a){var s=document.createElement("button");return s.type="button",this.setButtonText(s,i,h,a),s}},{key:"getFormButton",value:function(i,h,a){return this.getButton(i,h,a)}},{key:"setButtonText",value:function(i,h,a,s){for(;i.firstChild;)i.removeChild(i.firstChild);if(a&&(i.appendChild(a),h=" ".concat(h)),!this.jsoneditor.options.iconlib||!this.jsoneditor.options.remove_button_labels||!a){var t=document.createElement("span");t.appendChild(document.createTextNode(h)),i.appendChild(t)}s&&i.setAttribute("title",s)}},{key:"getTableContainer",value:function(){return document.createElement("div")}},{key:"getTable",value:function(){return document.createElement("table")}},{key:"getTableRow",value:function(){return document.createElement("tr")}},{key:"getTableHead",value:function(){return document.createElement("thead")}},{key:"getTableBody",value:function(){return document.createElement("tbody")}},{key:"getTableHeaderCell",value:function(i){var h=document.createElement("th");return h.textContent=i,h}},{key:"getTableCell",value:function(){return document.createElement("td")}},{key:"getErrorMessage",value:function(i){var h=document.createElement("p");return h.style=h.style||{},h.style.color="red",h.appendChild(document.createTextNode(i)),h}},{key:"addInputError",value:function(i,h){}},{key:"removeInputError",value:function(i){}},{key:"addTableRowError",value:function(i){}},{key:"removeTableRowError",value:function(i){}},{key:"getTabHolder",value:function(i){var h=i===void 0?"":i,a=document.createElement("div");return a.innerHTML="<div class='je-tabholder tabs'></div><div class='content' id='".concat(h,"'></div><div class='je-tabholder--clear'></div>"),a}},{key:"getTopTabHolder",value:function(i){var h=i===void 0?"":i,a=document.createElement("div");return a.innerHTML="<div class='tabs je-tabholder--top'></div><div class='je-tabholder--clear'></div><div class='content' id='".concat(h,"'></div>"),a}},{key:"applyStyles",value:function(i,h){Object.keys(h).forEach(function(a){return i.style[a]=h[a]})}},{key:"closest",value:function(i,h){for(;i&&i!==document;){if(!i[Ac])return!1;if(i[Ac](h))return i;i=i.parentNode}return!1}},{key:"insertBasicTopTab",value:function(i,h){h.firstChild.insertBefore(i,h.firstChild.firstChild)}},{key:"getTab",value:function(i,h){var a=document.createElement("div");return a.appendChild(i),a.id=h,a.classList.add("je-tab"),a}},{key:"getTopTab",value:function(i,h){var a=document.createElement("div");return a.appendChild(i),a.id=h,a.classList.add("je-tab--top"),a}},{key:"getTabContentHolder",value:function(i){return i.children[1]}},{key:"getTopTabContentHolder",value:function(i){return i.children[1]}},{key:"getTabContent",value:function(){return this.getIndentedPanel()}},{key:"getTopTabContent",value:function(){return this.getTopIndentedPanel()}},{key:"markTabActive",value:function(i){this.applyStyles(i.tab,{opacity:1,background:"white"}),i.rowPane!==void 0?i.rowPane.style.display="":i.container.style.display=""}},{key:"markTabInactive",value:function(i){this.applyStyles(i.tab,{opacity:.5,background:""}),i.rowPane!==void 0?i.rowPane.style.display="none":i.container.style.display="none"}},{key:"addTab",value:function(i,h){i.children[0].appendChild(h)}},{key:"addTopTab",value:function(i,h){i.children[0].appendChild(h)}},{key:"getBlockLink",value:function(){var i=document.createElement("a");return i.classList.add("je-block-link"),i}},{key:"getBlockLinkHolder",value:function(){return document.createElement("div")}},{key:"getLinksHolder",value:function(){return document.createElement("div")}},{key:"createMediaLink",value:function(i,h,a){i.appendChild(h),a.classList.add("je-media"),i.appendChild(a)}},{key:"createImageLink",value:function(i,h,a){i.appendChild(h),h.appendChild(a)}},{key:"getFirstTab",value:function(i){return i.firstChild.firstChild}},{key:"getInputGroup",value:function(i,h){}},{key:"cleanText",value:function(i){var h=document.createElement("div");return h.innerHTML=i,h.textContent||h.innerText}},{key:"getDropZone",value:function(i){var h=document.createElement("div");return h.setAttribute("data-text",i),h.classList.add("je-dropzone"),h}},{key:"getUploadPreview",value:function(i,h,a){var s=document.createElement("div");if(s.classList.add("je-upload-preview"),i.mimeType.substr(0,5)==="image"){var t=document.createElement("img");t.src=a,s.appendChild(t)}var e=document.createElement("div");e.innerHTML+="<strong>Name:</strong> ".concat(i.name,"<br><strong>Type:</strong> ").concat(i.type,"<br><strong>Size:</strong> ").concat(i.formattedSize),s.appendChild(e),s.appendChild(h);var o=document.createElement("div");return o.style.clear="left",s.appendChild(o),s}},{key:"getProgressBar",value:function(){var i=document.createElement("progress");return i.setAttribute("max",100),i.setAttribute("value",0),i}},{key:"updateProgressBar",value:function(i,h){i&&i.setAttribute("value",h)}},{key:"updateProgressBarUnknown",value:function(i){i&&i.removeAttribute("value")}}],f&&df(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),u}();function go(u){return go=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},go(u)}function pf(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(go(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(go(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),go(h)==="symbol"?h:String(h)),i)}var h}function Oi(){return Oi=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=pn(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},Oi.apply(this,arguments)}function ql(u,n){return ql=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},ql(u,n)}function pn(u){return pn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},pn(u)}var Lc=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ql(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=pn(i);if(h){var o=pn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(go(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"getFormInputLabel",value:function(t,e){var o=Oi(pn(s.prototype),"getFormInputLabel",this).call(this,t,e);return o.classList.add("je-form-input-label"),o}},{key:"getFormInputDescription",value:function(t){var e=Oi(pn(s.prototype),"getFormInputDescription",this).call(this,t);return e.classList.add("je-form-input-label"),e}},{key:"getIndentedPanel",value:function(){var t=Oi(pn(s.prototype),"getIndentedPanel",this).call(this);return t.classList.add("je-indented-panel"),t}},{key:"getTopIndentedPanel",value:function(){return this.getIndentedPanel()}},{key:"getChildEditorHolder",value:function(){var t=Oi(pn(s.prototype),"getChildEditorHolder",this).call(this);return t.classList.add("je-child-editor-holder"),t}},{key:"getHeaderButtonHolder",value:function(){var t=this.getButtonHolder();return t.classList.add("je-header-button-holder"),t}},{key:"getTable",value:function(){var t=Oi(pn(s.prototype),"getTable",this).call(this);return t.classList.add("je-table"),t}},{key:"addInputError",value:function(t,e){var o=this.closest(t,".form-control")||t.controlgroup;t.errmsg?t.errmsg.style.display="block":(t.errmsg=document.createElement("div"),t.errmsg.setAttribute("class","errmsg"),t.errmsg.style=t.errmsg.style||{},t.errmsg.style.color="red",o.appendChild(t.errmsg)),t.errmsg.innerHTML="",t.errmsg.appendChild(document.createTextNode(e))}},{key:"removeInputError",value:function(t){t.style&&(t.style.borderColor=""),t.errmsg&&(t.errmsg.style.display="none")}}])&&pf(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(Sn);function wo(u){return wo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},wo(u)}function ff(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(wo(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(wo(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),wo(h)==="symbol"?h:String(h)),i)}var h}function ji(){return ji=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=fn(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},ji.apply(this,arguments)}function Gl(u,n){return Gl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Gl(u,n)}function fn(u){return fn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},fn(u)}Lc.rules={".je-form-input-label":"display:block;margin-bottom:3px;font-weight:bold",".je-form-input-description":"display:inline-block;margin:0;font-size:0.8em;font-style:italic",".je-indented-panel":"padding:5px;margin:10px;border-radius:3px;border:1px%20solid%20%23ddd",".je-child-editor-holder":"margin-bottom:8px",".je-header-button-holder":"display:inline-block;margin-left:10px;font-size:0.8em;vertical-align:middle",".je-table":"margin-bottom:5px;border-bottom:1px%20solid%20%23ccc",".je-upload-preview img":"float:left;margin:0%200.5rem%200.5rem%200;max-width:100%25;max-height:5rem",".je-dropzone":"position:relative;margin:0.5rem%200;border:2px%20dashed%20black;width:100%25;height:60px;background:teal;transition:all%200.5s",".je-dropzone:before":"position:absolute;content:attr(data-text);color:rgba(0%2C%200%2C%200%2C%200.6);left:50%25;top:50%25;transform:translate(-50%25%2C%20-50%25)",".je-dropzone.valid-dropzone":"background:green",".je-dropzone.invalid-dropzone":"background:red"};var Rc=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Gl(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=fn(i);if(h){var o=fn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(wo(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"getSelectInput",value:function(t,e){var o=ji(fn(s.prototype),"getSelectInput",this).call(this,t);return o.classList.add("form-control"),o}},{key:"setGridColumnSize",value:function(t,e,o){t.classList.add("col-md-".concat(e)),o&&t.classList.add("col-md-offset-".concat(o))}},{key:"afterInputReady",value:function(t){if(!t.controlgroup&&(t.controlgroup=this.closest(t,".form-group"),this.closest(t,".compact")&&(t.controlgroup.style.marginBottom=0),this.queuedInputErrorText)){var e=this.queuedInputErrorText;delete this.queuedInputErrorText,this.addInputError(t,e)}}},{key:"getTextareaInput",value:function(){var t=document.createElement("textarea");return t.classList.add("form-control"),t}},{key:"getRangeInput",value:function(t,e,o){return ji(fn(s.prototype),"getRangeInput",this).call(this,t,e,o)}},{key:"getFormInputField",value:function(t){var e=ji(fn(s.prototype),"getFormInputField",this).call(this,t);return t!=="checkbox"&&t!=="radio"&&e.classList.add("form-control"),e}},{key:"getFormControl",value:function(t,e,o,c){var d=document.createElement("div");return!t||e.type!=="checkbox"&&e.type!=="radio"?(d.classList.add("form-group"),t&&(t.classList.add("control-label"),d.appendChild(t),c&&t.appendChild(c)),d.appendChild(e)):(d.classList.add(e.type),c&&t.appendChild(c),t.insertBefore(e,t.firstChild),d.appendChild(t)),o&&d.appendChild(o),d}},{key:"getIndentedPanel",value:function(){var t=document.createElement("div");return t.classList.add("well","well-sm"),t.style.paddingBottom=0,t}},{key:"getInfoButton",value:function(t){var e=document.createElement("span");e.classList.add("glyphicon","glyphicon-info-sign","pull-right"),e.style.padding=".25rem",e.style.position="relative",e.style.display="inline-block";var o=document.createElement("span");return o.style["font-family"]="sans-serif",o.style.visibility="hidden",o.style["background-color"]="rgba(50, 50, 50, .75)",o.style.margin="0 .25rem",o.style.color="#FAFAFA",o.style.padding=".5rem 1rem",o.style["border-radius"]=".25rem",o.style.width="25rem",o.style.position="absolute",o.innerText=t,e.onmouseover=function(){o.style.visibility="visible"},e.onmouseleave=function(){o.style.visibility="hidden"},e.appendChild(o),e}},{key:"getFormInputDescription",value:function(t){var e=document.createElement("p");return e.classList.add("help-block"),window.DOMPurify?e.innerHTML=window.DOMPurify.sanitize(t):e.textContent=this.cleanText(t),e}},{key:"getHeaderButtonHolder",value:function(){var t=this.getButtonHolder();return t.style.marginLeft="10px",t}},{key:"getButtonHolder",value:function(){var t=document.createElement("span");return t.classList.add("btn-group"),t}},{key:"getButton",value:function(t,e,o){var c=ji(fn(s.prototype),"getButton",this).call(this,t,e,o);return c.classList.add("btn","btn-default"),c}},{key:"getTableContainer",value:function(){var t=ji(fn(s.prototype),"getTableContainer",this).call(this);return t.classList.add("table-responsive"),t}},{key:"getTable",value:function(){var t=document.createElement("table");return t.classList.add("table","table-bordered"),t.style.width="auto",t.style.maxWidth="none",t}},{key:"addInputError",value:function(t,e){t.controlgroup?(t.controlgroup.classList.add("has-error"),t.errmsg?t.errmsg.style.display="":(t.errmsg=document.createElement("p"),t.errmsg.classList.add("help-block","errormsg"),t.controlgroup.appendChild(t.errmsg)),t.errmsg.textContent=e):this.queuedInputErrorText=e}},{key:"removeInputError",value:function(t){t.controlgroup||delete this.queuedInputErrorText,t.errmsg&&(t.errmsg.style.display="none",t.controlgroup.classList.remove("has-error"))}},{key:"getTabHolder",value:function(t){var e=t===void 0?"":t,o=document.createElement("div");return o.innerHTML="<ul class='col-md-2 nav nav-pills nav-stacked' id='".concat(e,"' role='tablist'></ul><div class='col-md-10 tab-content active well well-small' id='").concat(e,"'></div>"),o}},{key:"getTopTabHolder",value:function(t){var e=t===void 0?"":t,o=document.createElement("div");return o.innerHTML="<ul class='nav nav-tabs' id='".concat(e,"' role='tablist'></ul><div class='tab-content active well well-small' id='").concat(e,"'></div>"),o}},{key:"getTab",value:function(t,e){var o=document.createElement("li");o.setAttribute("role","presentation");var c=document.createElement("a");return c.setAttribute("href","#".concat(e)),c.appendChild(t),c.setAttribute("aria-controls",e),c.setAttribute("role","tab"),c.setAttribute("data-toggle","tab"),o.appendChild(c),o}},{key:"getTopTab",value:function(t,e){var o=document.createElement("li");o.setAttribute("role","presentation");var c=document.createElement("a");return c.setAttribute("href","#".concat(e)),c.appendChild(t),c.setAttribute("aria-controls",e),c.setAttribute("role","tab"),c.setAttribute("data-toggle","tab"),o.appendChild(c),o}},{key:"getTabContent",value:function(){var t=document.createElement("div");return t.classList.add("tab-pane"),t.setAttribute("role","tabpanel"),t}},{key:"getTopTabContent",value:function(){var t=document.createElement("div");return t.classList.add("tab-pane"),t.setAttribute("role","tabpanel"),t}},{key:"markTabActive",value:function(t){t.tab.classList.add("active"),t.rowPane!==void 0?t.rowPane.classList.add("active"):t.container.classList.add("active")}},{key:"markTabInactive",value:function(t){t.tab.classList.remove("active"),t.rowPane!==void 0?t.rowPane.classList.remove("active"):t.container.classList.remove("active")}},{key:"getProgressBar",value:function(){var t=document.createElement("div");t.classList.add("progress");var e=document.createElement("div");return e.classList.add("progress-bar"),e.setAttribute("role","progressbar"),e.setAttribute("aria-valuenow",0),e.setAttribute("aria-valuemin",0),e.setAttribute("aria-valuenax",100),e.innerHTML="".concat(0,"%"),t.appendChild(e),t}},{key:"updateProgressBar",value:function(t,e){if(t){var o=t.firstChild,c="".concat(e,"%");o.setAttribute("aria-valuenow",e),o.style.width=c,o.innerHTML=c}}},{key:"updateProgressBarUnknown",value:function(t){if(t){var e=t.firstChild;t.classList.add("progress","progress-striped","active"),e.removeAttribute("aria-valuenow"),e.style.width="100%",e.innerHTML=""}}},{key:"getInputGroup",value:function(t,e){if(t){var o=document.createElement("div");o.classList.add("input-group"),o.appendChild(t);var c=document.createElement("div");c.classList.add("input-group-btn"),o.appendChild(c);for(var d=0;d<e.length;d++)c.appendChild(e[d]);return o}}}])&&ff(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(Sn);function _o(u){return _o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},_o(u)}function yf(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(_o(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(_o(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),_o(h)==="symbol"?h:String(h)),i)}var h}function Ei(){return Ei=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=yn(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},Ei.apply(this,arguments)}function Wl(u,n){return Wl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Wl(u,n)}function yn(u){return yn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},yn(u)}Rc.rules={},k(3843);var mf={disable_theme_rules:!1,input_size:"normal",custom_forms:!1,object_indent:!0,object_background:"bg-light",object_text:"",table_border:!1,table_zebrastyle:!1,tooltip:"bootstrap"},Ic=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Wl(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=yn(i);if(h){var o=yn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(_o(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(t){return function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")}(this,s),a.call(this,t,mf)}return n=s,(f=[{key:"getSelectInput",value:function(t,e){var o=Ei(yn(s.prototype),"getSelectInput",this).call(this,t);return o.classList.add("form-control"),this.options.custom_forms===!1?(this.options.input_size==="small"&&o.classList.add("form-control-sm"),this.options.input_size==="large"&&o.classList.add("form-control-lg")):(o.classList.remove("form-control"),o.classList.add("custom-select"),this.options.input_size==="small"&&o.classList.add("custom-select-sm"),this.options.input_size==="large"&&o.classList.add("custom-select-lg")),o}},{key:"getContainer",value:function(){var t=document.createElement("div");return this.options.object_indent||t.classList.add("je-noindent"),t}},{key:"setGridColumnSize",value:function(t,e,o){t.classList.add("col-md-".concat(e)),o&&t.classList.add("offset-md-".concat(o))}},{key:"afterInputReady",value:function(t){if(!t.controlgroup){var e=t.name;t.id=e;var o=t.parentNode.parentNode.getElementsByTagName("label")[0];o&&(o.htmlFor=e),t.controlgroup=this.closest(t,".form-group")}}},{key:"getTextareaInput",value:function(){var t=document.createElement("textarea");return t.classList.add("form-control"),this.options.input_size==="small"&&t.classList.add("form-control-sm"),this.options.input_size==="large"&&t.classList.add("form-control-lg"),t}},{key:"getRangeInput",value:function(t,e,o){var c=Ei(yn(s.prototype),"getRangeInput",this).call(this,t,e,o);return this.options.custom_forms===!0&&(c.classList.remove("form-control"),c.classList.add("custom-range")),c}},{key:"getStepperButtons",value:function(t){var e=document.createElement("div"),o=document.createElement("div"),c=document.createElement("div"),d=document.createElement("button");d.setAttribute("type","button");var _=document.createElement("button");_.setAttribute("type","button"),e.appendChild(o),e.appendChild(t),e.appendChild(c),o.appendChild(d),c.appendChild(_),e.classList.add("input-group"),o.classList.add("input-group-prepend"),c.classList.add("input-group-append"),d.classList.add("btn"),d.classList.add("btn-secondary"),d.classList.add("stepper-down"),_.classList.add("btn"),_.classList.add("btn-secondary"),_.classList.add("stepper-up"),t.getAttribute("readonly")&&(d.setAttribute("disabled",!0),_.setAttribute("disabled",!0)),d.textContent="-",_.textContent="+";var P=function(nt,ct){nt.value=Number(ct||nt.value),nt.setAttribute("initialized","1")},D=t.getAttribute("min"),J=t.getAttribute("max");return t.addEventListener("change",function(){t.getAttribute("initialized")||t.setAttribute("initialized","1")}),d.addEventListener("click",function(){t.getAttribute("initialized")?D?Number(t.value)>Number(D)&&t.stepDown():t.stepDown():P(t,D),j(t,"change")}),_.addEventListener("click",function(){t.getAttribute("initialized")?J?Number(t.value)<Number(J)&&t.stepUp():t.stepUp():P(t,D),j(t,"change")}),e}},{key:"getFormInputField",value:function(t){var e=Ei(yn(s.prototype),"getFormInputField",this).call(this,t);return t!=="checkbox"&&t!=="radio"&&t!=="file"&&(e.classList.add("form-control"),this.options.input_size==="small"&&e.classList.add("form-control-sm"),this.options.input_size==="large"&&e.classList.add("form-control-lg")),t==="file"&&e.classList.add("form-control-file"),e}},{key:"getFormControl",value:function(t,e,o,c){var d=document.createElement("div");if(d.classList.add("form-group"),!t||e.type!=="checkbox"&&e.type!=="radio")t&&(d.appendChild(t),c&&d.appendChild(c)),d.appendChild(e);else{var _=document.createElement("div");this.options.custom_forms===!1?(_.classList.add("form-check"),e.classList.add("form-check-input"),t.classList.add("form-check-label")):(_.classList.add("custom-control"),e.classList.add("custom-control-input"),t.classList.add("custom-control-label"),e.type==="checkbox"?_.classList.add("custom-checkbox"):_.classList.add("custom-radio"));var P=(Date.now()*Math.random()).toFixed(0);e.setAttribute("id",P),t.setAttribute("for",P),_.appendChild(e),_.appendChild(t),c&&_.appendChild(c),d.appendChild(_)}return o&&d.appendChild(o),d}},{key:"getInfoButton",value:function(t){var e=document.createElement("button");e.type="button",e.classList.add("ml-3","jsoneditor-twbs4-text-button"),e.setAttribute("data-toggle","tooltip"),e.setAttribute("data-placement","auto"),e.title=t;var o=document.createTextNode("ⓘ");return e.appendChild(o),this.options.tooltip==="bootstrap"?window.jQuery&&window.jQuery().tooltip?window.jQuery(e).tooltip():console.warn("Could not find popper jQuery plugin of Bootstrap."):this.options.tooltip==="css"&&e.classList.add("je-tooltip"),e}},{key:"getCheckbox",value:function(){return this.getFormInputField("checkbox")}},{key:"getMultiCheckboxHolder",value:function(t,e,o,c){var d=document.createElement("div");d.classList.add("form-group"),e&&(d.appendChild(e),c&&e.appendChild(c));var _=document.createElement("div");return Object.values(t).forEach(function(P){var D=P.firstChild;_.appendChild(D)}),d.appendChild(_),o&&d.appendChild(o),d}},{key:"getFormRadio",value:function(t){var e=this.getFormInputField("radio");for(var o in t)e.setAttribute(o,t[o]);return this.options.custom_forms===!1?e.classList.add("form-check-input"):e.classList.add("custom-control-input"),e}},{key:"getFormRadioLabel",value:function(t,e){var o=document.createElement("label");return this.options.custom_forms===!1?o.classList.add("form-check-label"):o.classList.add("custom-control-label"),o.appendChild(document.createTextNode(t)),o}},{key:"getFormRadioControl",value:function(t,e,o){var c=document.createElement("div");return this.options.custom_forms===!1?c.classList.add("form-check"):c.classList.add("custom-control","custom-radio"),c.appendChild(e),c.appendChild(t),o&&(this.options.custom_forms===!1?c.classList.add("form-check-inline"):c.classList.add("custom-control-inline")),c}},{key:"getIndentedPanel",value:function(){var t=document.createElement("div");return t.classList.add("card","card-body","mb-3"),this.options.object_background&&t.classList.add(this.options.object_background),this.options.object_text&&t.classList.add(this.options.object_text),t}},{key:"getFormInputDescription",value:function(t){var e=document.createElement("small");return e.classList.add("form-text"),window.DOMPurify?e.innerHTML=window.DOMPurify.sanitize(t):e.textContent=this.cleanText(t),e}},{key:"getHeader",value:function(t,e){var o=document.createElement("h3");return o.classList.add("card-title"),o.classList.add("level-"+e),typeof t=="string"?o.textContent=t:o.appendChild(t),o.style.display="inline-block",o}},{key:"getHeaderButtonHolder",value:function(){return this.getButtonHolder()}},{key:"getButtonHolder",value:function(){var t=document.createElement("span");return t.classList.add("btn-group"),t}},{key:"getFormButtonHolder",value:function(t){var e=this.getButtonHolder();return e.classList.add("d-block"),t==="center"?e.classList.add("text-center"):t==="right"&&e.classList.add("text-right"),e}},{key:"getButton",value:function(t,e,o){var c=Ei(yn(s.prototype),"getButton",this).call(this,t,e,o);return c.classList.add("btn","btn-secondary","btn-sm"),c}},{key:"getTableContainer",value:function(){var t=Ei(yn(s.prototype),"getTableContainer",this).call(this);return t.classList.add("table-responsive"),t}},{key:"getTable",value:function(){var t=document.createElement("table");return t.classList.add("table","table-sm"),this.options.table_border&&t.classList.add("table-bordered"),this.options.table_zebrastyle&&t.classList.add("table-striped"),t}},{key:"getErrorMessage",value:function(t){var e=document.createElement("div");return e.classList.add("alert","alert-danger"),e.setAttribute("role","alert"),e.appendChild(document.createTextNode(t)),e}},{key:"addInputError",value:function(t,e){t.controlgroup&&(t.controlgroup.classList.add("is-invalid"),t.errmsg||(t.errmsg=document.createElement("p"),t.errmsg.classList.add("invalid-feedback"),t.controlgroup.appendChild(t.errmsg),t.errmsg.style.display="block"),t.errmsg.style.display="block",t.errmsg.textContent=e)}},{key:"removeInputError",value:function(t){t.errmsg&&(t.errmsg.style.display="none",t.controlgroup.classList.remove("is-invalid"))}},{key:"getTabHolder",value:function(t){var e=document.createElement("div"),o=t===void 0?"":t;return e.innerHTML="<div class='col-md-2' id='".concat(o,"'><ul class='nav flex-column nav-pills'></ul></div><div class='col-md-10'><div class='tab-content' id='").concat(o,"'></div></div>"),e.classList.add("row"),e}},{key:"addTab",value:function(t,e){t.children[0].children[0].appendChild(e)}},{key:"getTabContentHolder",value:function(t){return t.children[1].children[0]}},{key:"getTopTabHolder",value:function(t){var e=t===void 0?"":t,o=document.createElement("div");return o.classList.add("card"),o.innerHTML="<div class='card-header'><ul class='nav nav-tabs card-header-tabs' id='".concat(e,"'></ul></div><div class='card-body'><div class='tab-content' id='").concat(e,"'></div></div>"),o}},{key:"getTab",value:function(t,e){var o=document.createElement("li");o.classList.add("nav-item");var c=document.createElement("a");return c.classList.add("nav-link"),c.setAttribute("href","#".concat(e)),c.setAttribute("data-toggle","tab"),c.appendChild(t),o.appendChild(c),o}},{key:"getTopTab",value:function(t,e){var o=document.createElement("li");o.classList.add("nav-item");var c=document.createElement("a");return c.classList.add("nav-link"),c.setAttribute("href","#".concat(e)),c.setAttribute("data-toggle","tab"),c.appendChild(t),o.appendChild(c),o}},{key:"getTabContent",value:function(){var t=document.createElement("div");return t.classList.add("tab-pane"),t.setAttribute("role","tabpanel"),t}},{key:"getTopTabContent",value:function(){var t=document.createElement("div");return t.classList.add("tab-pane"),t.setAttribute("role","tabpanel"),t}},{key:"markTabActive",value:function(t){t.tab.firstChild.classList.add("active"),t.rowPane!==void 0?t.rowPane.classList.add("active"):t.container.classList.add("active")}},{key:"markTabInactive",value:function(t){t.tab.firstChild.classList.remove("active"),t.rowPane!==void 0?t.rowPane.classList.remove("active"):t.container.classList.remove("active")}},{key:"insertBasicTopTab",value:function(t,e){e.children[0].children[0].insertBefore(t,e.children[0].children[0].firstChild)}},{key:"addTopTab",value:function(t,e){t.children[0].children[0].appendChild(e)}},{key:"getTopTabContentHolder",value:function(t){return t.children[1].children[0]}},{key:"getFirstTab",value:function(t){return t.firstChild.firstChild.firstChild}},{key:"getProgressBar",value:function(){var t=document.createElement("div");t.classList.add("progress");var e=document.createElement("div");return e.classList.add("progress-bar"),e.setAttribute("role","progressbar"),e.setAttribute("aria-valuenow",0),e.setAttribute("aria-valuemin",0),e.setAttribute("aria-valuenax",100),e.innerHTML="".concat(0,"%"),t.appendChild(e),t}},{key:"updateProgressBar",value:function(t,e){if(t){var o=t.firstChild,c="".concat(e,"%");o.setAttribute("aria-valuenow",e),o.style.width=c,o.innerHTML=c}}},{key:"updateProgressBarUnknown",value:function(t){if(t){var e=t.firstChild;t.classList.add("progress","progress-striped","active"),e.removeAttribute("aria-valuenow"),e.style.width="100%",e.innerHTML=""}}},{key:"getBlockLink",value:function(){var t=document.createElement("a");return t.classList.add("mb-3","d-inline-block"),t}},{key:"getLinksHolder",value:function(){return document.createElement("div")}},{key:"getInputGroup",value:function(t,e){if(t){var o=document.createElement("div");o.classList.add("input-group"),o.appendChild(t);var c=document.createElement("div");c.classList.add("input-group-append"),o.appendChild(c);for(var d=0;d<e.length;d++)e[d].classList.remove("mr-2","btn-secondary"),e[d].classList.add("btn-outline-secondary"),c.appendChild(e[d]);return o}}}])&&yf(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(Sn);function xo(u){return xo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},xo(u)}function bf(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(xo(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(xo(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),xo(h)==="symbol"?h:String(h)),i)}var h}function Ci(){return Ci=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=mn(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},Ci.apply(this,arguments)}function Zl(u,n){return Zl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Zl(u,n)}function mn(u){return mn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},mn(u)}Ic.rules={".jsoneditor-twbs4-text-button":"background:none;padding:0;border:0;color:currentColor","td > .form-group":"margin-bottom:0",".json-editor-btn-upload":"margin-top:1rem",".je-noindent .card":"padding:0;border:0",".je-tooltip:hover::before":"display:block;position:absolute;font-size:0.8em;color:%23fff;border-radius:0.2em;content:attr(title);background-color:%23000;margin-top:-2.5em;padding:0.3em",".je-tooltip:hover::after":"display:block;position:absolute;font-size:0.8em;color:%23fff",".select2-container--default .select2-selection--single":"height:calc(1.5em%20%2B%200.75rem%20%2B%202px)",".select2-container--default .select2-selection--single .select2-selection__arrow":"height:calc(1.5em%20%2B%200.75rem%20%2B%202px)",".select2-container--default .select2-selection--single .select2-selection__rendered":"line-height:calc(1.5em%20%2B%200.75rem%20%2B%202px)",".selectize-control.form-control":"padding:0",".selectize-dropdown.form-control":"padding:0;height:auto",".je-upload-preview img":"float:left;margin:0%200.5rem%200.5rem%200;max-width:100%25;max-height:5rem",".je-dropzone":"position:relative;margin:0.5rem%200;border:2px%20dashed%20black;width:100%25;height:60px;background:teal;transition:all%200.5s",".je-dropzone:before":"position:absolute;content:attr(data-text);color:rgba(0%2C%200%2C%200%2C%200.6);left:50%25;top:50%25;transform:translate(-50%25%2C%20-50%25)",".je-dropzone.valid-dropzone":"background:green",".je-dropzone.invalid-dropzone":"background:red"};var vf={disable_theme_rules:!1,input_size:"normal",object_indent:!0,object_background:"bg-light",object_text:"",table_border:!1,table_zebrastyle:!1,tooltip:"bootstrap"},Bc=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Zl(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=mn(i);if(h){var o=mn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(xo(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(t){return function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")}(this,s),a.call(this,t,vf)}return n=s,(f=[{key:"getSelectInput",value:function(t,e){var o=Ci(mn(s.prototype),"getSelectInput",this).call(this,t);return o.classList.add("form-control"),o.classList.add("form-select"),this.options.input_size==="small"&&o.classList.add("form-control-sm"),this.options.input_size==="large"&&o.classList.add("form-control-lg"),o}},{key:"getContainer",value:function(){var t=document.createElement("div");return this.options.object_indent||t.classList.add("je-noindent"),t}},{key:"setGridColumnSize",value:function(t,e,o){t.classList.add("col-md-".concat(e)),o&&t.classList.add("offset-md-".concat(o))}},{key:"afterInputReady",value:function(t){if(!t.controlgroup){var e=t.name;t.id=e;var o=t.parentNode.parentNode.getElementsByTagName("label")[0];o&&(o.classList.add("form-label"),o.htmlFor=e),t.controlgroup=this.closest(t,".form-group")}}},{key:"getTextareaInput",value:function(){var t=document.createElement("textarea");return t.classList.add("form-control"),this.options.input_size==="small"&&t.classList.add("form-control-sm"),this.options.input_size==="large"&&t.classList.add("form-control-lg"),t}},{key:"getRangeInput",value:function(t,e,o){var c=Ci(mn(s.prototype),"getRangeInput",this).call(this,t,e,o);return c.classList.remove("form-control"),c.classList.add("form-range"),c}},{key:"getStepperButtons",value:function(t){var e=document.createElement("div"),o=document.createElement("button");o.setAttribute("type","button");var c=document.createElement("button");c.setAttribute("type","button"),e.appendChild(o),e.appendChild(t),e.appendChild(c),e.classList.add("input-group"),o.classList.add("btn"),o.classList.add("btn-secondary"),o.classList.add("stepper-down"),c.classList.add("btn"),c.classList.add("btn-secondary"),c.classList.add("stepper-up"),t.getAttribute("readonly")&&(o.setAttribute("disabled",!0),c.setAttribute("disabled",!0)),o.textContent="-",c.textContent="+";var d=function(D,J){D.value=Number(J||D.value),D.setAttribute("initialized","1")},_=t.getAttribute("min"),P=t.getAttribute("max");return t.addEventListener("change",function(){t.getAttribute("initialized")||t.setAttribute("initialized","1")}),o.addEventListener("click",function(){t.getAttribute("initialized")?_?Number(t.value)>Number(_)&&t.stepDown():t.stepDown():d(t,_),j(t,"change")}),c.addEventListener("click",function(){t.getAttribute("initialized")?P?Number(t.value)<Number(P)&&t.stepUp():t.stepUp():d(t,_),j(t,"change")}),e}},{key:"getFormInputField",value:function(t){var e=Ci(mn(s.prototype),"getFormInputField",this).call(this,t);return t!=="checkbox"&&t!=="radio"&&(e.classList.add("form-control"),this.options.input_size==="small"&&e.classList.add("form-control-sm"),this.options.input_size==="large"&&e.classList.add("form-control-lg")),e}},{key:"getFormControl",value:function(t,e,o,c){var d=document.createElement("div");if(d.classList.add("form-group"),!t||e.type!=="checkbox"&&e.type!=="radio")t&&(t.classList.add("form-label"),d.appendChild(t),c&&d.appendChild(c)),d.appendChild(e);else{var _=document.createElement("div");_.classList.add("form-check"),e.classList.add("form-check-input"),t.classList.add("form-check-label");var P=(Date.now()*Math.random()).toFixed(0);e.setAttribute("id",P),t.setAttribute("for",P),_.appendChild(e),_.appendChild(t),c&&_.appendChild(c),d.appendChild(_)}return o&&d.appendChild(o),d}},{key:"getInfoButton",value:function(t){var e=document.createElement("button");e.type="button",e.classList.add("ms-3","jsoneditor-twbs5-text-button"),e.setAttribute("data-toggle","tooltip"),e.setAttribute("data-placement","auto"),e.title=t;var o=document.createTextNode("ⓘ");return e.appendChild(o),this.options.tooltip==="bootstrap"?window.jQuery&&window.jQuery().tooltip?window.jQuery(e).tooltip():console.warn("Could not find popper jQuery plugin of Bootstrap."):this.options.tooltip==="css"&&e.classList.add("je-tooltip"),e}},{key:"getCheckbox",value:function(){return this.getFormInputField("checkbox")}},{key:"getMultiCheckboxHolder",value:function(t,e,o,c){var d=document.createElement("div");d.classList.add("form-group"),e&&(d.appendChild(e),c&&e.appendChild(c));var _=document.createElement("div");return Object.values(t).forEach(function(P){var D=P.firstChild;_.appendChild(D)}),d.appendChild(_),o&&d.appendChild(o),d}},{key:"getFormRadio",value:function(t){var e=this.getFormInputField("radio");for(var o in t)e.setAttribute(o,t[o]);return e.classList.add("form-check-input"),e}},{key:"getFormRadioLabel",value:function(t,e){var o=document.createElement("label");return o.classList.add("form-check-label"),o.appendChild(document.createTextNode(t)),o}},{key:"getFormRadioControl",value:function(t,e,o){var c=document.createElement("div");return c.classList.add("form-check"),c.appendChild(e),c.appendChild(t),o&&c.classList.add("form-check-inline"),c}},{key:"getIndentedPanel",value:function(){var t=document.createElement("div");return t.classList.add("card","card-body","my-3"),this.options.object_background&&t.classList.add(this.options.object_background),this.options.object_text&&t.classList.add(this.options.object_text),t}},{key:"getFormInputDescription",value:function(t){var e=document.createElement("small");return e.classList.add("form-text"),e.classList.add("d-block"),window.DOMPurify?e.innerHTML=window.DOMPurify.sanitize(t):e.textContent=this.cleanText(t),e}},{key:"getHeader",value:function(t,e){var o=document.createElement("h3");return o.classList.add("card-title"),o.classList.add("level-"+e),typeof t=="string"?o.textContent=t:o.appendChild(t),o.style.display="inline-block",o}},{key:"getHeaderButtonHolder",value:function(){return this.getButtonHolder()}},{key:"getButtonHolder",value:function(){var t=document.createElement("span");return t.classList.add("btn-group"),t}},{key:"getFormButtonHolder",value:function(t){var e=this.getButtonHolder();return e.classList.add("d-block"),t==="center"?e.classList.add("text-center"):t==="right"&&e.classList.add("text-end"),e}},{key:"getButton",value:function(t,e,o){var c=Ci(mn(s.prototype),"getButton",this).call(this,t,e,o);return c.classList.add("btn","btn-secondary","btn-sm"),c}},{key:"getTableContainer",value:function(){var t=Ci(mn(s.prototype),"getTableContainer",this).call(this);return t.classList.add("table-responsive"),t}},{key:"getTable",value:function(){var t=document.createElement("table");return t.classList.add("table","table-sm"),this.options.table_border&&t.classList.add("table-bordered"),this.options.table_zebrastyle&&t.classList.add("table-striped"),t}},{key:"getErrorMessage",value:function(t){var e=document.createElement("div");return e.classList.add("alert","alert-danger"),e.setAttribute("role","alert"),e.appendChild(document.createTextNode(t)),e}},{key:"addInputError",value:function(t,e){t.controlgroup&&(t.controlgroup.classList.add("is-invalid"),t.errmsg||(t.errmsg=document.createElement("p"),t.errmsg.classList.add("invalid-feedback"),t.controlgroup.appendChild(t.errmsg),t.errmsg.style.display="block"),t.errmsg.style.display="block",t.errmsg.textContent=e)}},{key:"removeInputError",value:function(t){t.errmsg&&(t.errmsg.style.display="none",t.controlgroup.classList.remove("is-invalid"))}},{key:"getTabHolder",value:function(t){var e=document.createElement("div"),o=t===void 0?"":t;return e.innerHTML="<div class='col-md-2' id='".concat(o,"'><ul class='nav flex-column nav-pills'></ul></div><div class='col-md-10'><div class='tab-content' id='").concat(o,"'></div></div>"),e.classList.add("row"),e}},{key:"addTab",value:function(t,e){t.children[0].children[0].appendChild(e)}},{key:"getTabContentHolder",value:function(t){return t.children[1].children[0]}},{key:"getTopTabHolder",value:function(t){var e=t===void 0?"":t,o=document.createElement("div");return o.classList.add("card"),o.innerHTML="<div class='card-header'><ul class='nav nav-tabs card-header-tabs' id='".concat(e,"'></ul></div><div class='card-body'><div class='tab-content' id='").concat(e,"'></div></div>"),o}},{key:"getTab",value:function(t,e){var o=document.createElement("li");o.classList.add("nav-item");var c=document.createElement("a");return c.classList.add("nav-link"),c.setAttribute("href","#".concat(e)),c.setAttribute("data-toggle","tab"),c.appendChild(t),o.appendChild(c),o}},{key:"getTopTab",value:function(t,e){var o=document.createElement("li");o.classList.add("nav-item");var c=document.createElement("a");return c.classList.add("nav-link"),c.setAttribute("href","#".concat(e)),c.setAttribute("data-toggle","tab"),c.appendChild(t),o.appendChild(c),o}},{key:"getTabContent",value:function(){var t=document.createElement("div");return t.classList.add("tab-pane"),t.setAttribute("role","tabpanel"),t}},{key:"getTopTabContent",value:function(){var t=document.createElement("div");return t.classList.add("tab-pane"),t.setAttribute("role","tabpanel"),t}},{key:"markTabActive",value:function(t){t.tab.firstChild.classList.add("active"),t.rowPane!==void 0?t.rowPane.classList.add("active"):t.container.classList.add("active")}},{key:"markTabInactive",value:function(t){t.tab.firstChild.classList.remove("active"),t.rowPane!==void 0?t.rowPane.classList.remove("active"):t.container.classList.remove("active")}},{key:"insertBasicTopTab",value:function(t,e){e.children[0].children[0].insertBefore(t,e.children[0].children[0].firstChild)}},{key:"addTopTab",value:function(t,e){t.children[0].children[0].appendChild(e)}},{key:"getTopTabContentHolder",value:function(t){return t.children[1].children[0]}},{key:"getFirstTab",value:function(t){return t.firstChild.firstChild.firstChild}},{key:"getProgressBar",value:function(){var t=document.createElement("div");t.classList.add("progress");var e=document.createElement("div");return e.classList.add("progress-bar"),e.setAttribute("role","progressbar"),e.setAttribute("aria-valuenow",0),e.setAttribute("aria-valuemin",0),e.setAttribute("aria-valuenax",100),e.innerHTML="".concat(0,"%"),t.appendChild(e),t}},{key:"updateProgressBar",value:function(t,e){if(t){var o=t.firstChild,c="".concat(e,"%");o.setAttribute("aria-valuenow",e),o.style.width=c,o.innerHTML=c}}},{key:"updateProgressBarUnknown",value:function(t){if(t){var e=t.firstChild;t.classList.add("progress","progress-striped","active"),e.removeAttribute("aria-valuenow"),e.style.width="100%",e.innerHTML=""}}},{key:"getBlockLink",value:function(){var t=document.createElement("a");return t.classList.add("mb-3","d-inline-block"),t}},{key:"getLinksHolder",value:function(){return document.createElement("div")}},{key:"getInputGroup",value:function(t,e){if(t){var o=document.createElement("div");o.classList.add("input-group"),o.appendChild(t);for(var c=0;c<e.length;c++)e[c].classList.remove("me-2","btn-secondary"),e[c].classList.add("btn-outline-secondary"),o.appendChild(e[c]);return o}}}])&&bf(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(Sn);function ko(u){return ko=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ko(u)}function gf(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(ko(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(ko(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),ko(h)==="symbol"?h:String(h)),i)}var h}function Oo(){return Oo=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=Pn(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},Oo.apply(this,arguments)}function Jl(u,n){return Jl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Jl(u,n)}function Pn(u){return Pn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Pn(u)}Bc.rules={".form-group":"margin-bottom:1rem",".form-text":"display:block",".jsoneditor-twbs5-text-button":"background:none;padding:0;border:0;color:currentColor","td > .form-group":"margin-bottom:0",".json-editor-btn-upload":"margin-top:1rem",".je-noindent .card":"padding:0;border:0",".je-tooltip:hover::before":"display:block;position:absolute;font-size:0.8em;color:%23fff;border-radius:0.2em;content:attr(title);background-color:%23000;margin-top:-2.5em;padding:0.3em",".je-tooltip:hover::after":"display:block;position:absolute;font-size:0.8em;color:%23fff",".select2-container--default .select2-selection--single":"height:calc(1.5em%20%2B%200.75rem%20%2B%202px)",".select2-container--default .select2-selection--single .select2-selection__arrow":"height:calc(1.5em%20%2B%200.75rem%20%2B%202px)",".select2-container--default .select2-selection--single .select2-selection__rendered":"line-height:calc(1.5em%20%2B%200.75rem%20%2B%202px)",".selectize-control.form-control":"padding:0",".selectize-dropdown.form-control":"padding:0;height:auto",".je-upload-preview img":"float:left;margin:0%200.5rem%200.5rem%200;max-width:100%25;max-height:5rem",".je-dropzone":"position:relative;margin:0.5rem%200;border:2px%20dashed%20black;width:100%25;height:60px;background:teal;transition:all%200.5s",".je-dropzone:before":"position:absolute;content:attr(data-text);color:rgba(0%2C%200%2C%200%2C%200.6);left:50%25;top:50%25;transform:translate(-50%25%2C%20-50%25)",".je-dropzone.valid-dropzone":"background:green",".je-dropzone.invalid-dropzone":"background:red"};var Dc=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Jl(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Pn(i);if(h){var o=Pn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(ko(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"getTable",value:function(){var t=Oo(Pn(s.prototype),"getTable",this).call(this);return t.setAttribute("cellpadding",5),t.setAttribute("cellspacing",0),t}},{key:"getTableHeaderCell",value:function(t){var e=Oo(Pn(s.prototype),"getTableHeaderCell",this).call(this,t);return e.classList.add("ui-state-active"),e.style.fontWeight="bold",e}},{key:"getTableCell",value:function(){var t=Oo(Pn(s.prototype),"getTableCell",this).call(this);return t.classList.add("ui-widget-content"),t}},{key:"getHeaderButtonHolder",value:function(){var t=this.getButtonHolder();return t.style.marginLeft="10px",t.style.fontSize=".6em",t.style.display="inline-block",t}},{key:"getFormInputDescription",value:function(t){var e=this.getDescription(t);return e.style.marginLeft="10px",e.style.display="inline-block",e}},{key:"getFormControl",value:function(t,e,o,c){var d=Oo(Pn(s.prototype),"getFormControl",this).call(this,t,e,o,c);return e.type==="checkbox"?(d.style.lineHeight="25px",d.style.padding="3px 0"):d.style.padding="4px 0 8px 0",d}},{key:"getDescription",value:function(t){var e=document.createElement("span");return e.style.fontSize=".8em",e.style.fontStyle="italic",window.DOMPurify?e.innerHTML=window.DOMPurify.sanitize(t):e.textContent=this.cleanText(t),e}},{key:"getButtonHolder",value:function(){var t=document.createElement("div");return t.classList.add("ui-buttonset"),t.style.fontSize=".7em",t}},{key:"getFormInputLabel",value:function(t,e){var o=document.createElement("label");return o.style.fontWeight="bold",o.style.display="block",o.textContent=t,e&&o.classList.add("required"),o}},{key:"getButton",value:function(t,e,o){var c=document.createElement("button");c.classList.add("ui-button","ui-widget","ui-state-default","ui-corner-all"),e&&!t?(c.classList.add("ui-button-icon-only"),e.classList.add("ui-button-icon-primary","ui-icon-primary"),c.appendChild(e)):e?(c.classList.add("ui-button-text-icon-primary"),e.classList.add("ui-button-icon-primary","ui-icon-primary"),c.appendChild(e)):c.classList.add("ui-button-text-only");var d=document.createElement("span");return d.classList.add("ui-button-text"),d.textContent=t||o||".",c.appendChild(d),c.setAttribute("title",o),c}},{key:"setButtonText",value:function(t,e,o,c){t.innerHTML="",t.classList.add("ui-button","ui-widget","ui-state-default","ui-corner-all"),o&&!e?(t.classList.add("ui-button-icon-only"),o.classList.add("ui-button-icon-primary","ui-icon-primary"),t.appendChild(o)):o?(t.classList.add("ui-button-text-icon-primary"),o.classList.add("ui-button-icon-primary","ui-icon-primary"),t.appendChild(o)):t.classList.add("ui-button-text-only");var d=document.createElement("span");d.classList.add("ui-button-text"),d.textContent=e||c||".",t.appendChild(d),t.setAttribute("title",c)}},{key:"getIndentedPanel",value:function(){var t=document.createElement("div");return t.classList.add("ui-widget-content","ui-corner-all"),t.style.padding="1em 1.4em",t.style.marginBottom="20px",t}},{key:"afterInputReady",value:function(t){if(!t.controls&&(t.controls=this.closest(t,".form-control"),this.queuedInputErrorText)){var e=this.queuedInputErrorText;delete this.queuedInputErrorText,this.addInputError(t,e)}}},{key:"addInputError",value:function(t,e){t.controls?(t.errmsg?t.errmsg.style.display="":(t.errmsg=document.createElement("div"),t.errmsg.classList.add("ui-state-error"),t.controls.appendChild(t.errmsg)),t.errmsg.textContent=e):this.queuedInputErrorText=e}},{key:"removeInputError",value:function(t){t.controls||delete this.queuedInputErrorText,t.errmsg&&(t.errmsg.style.display="none")}},{key:"markTabActive",value:function(t){t.tab.classList.remove("ui-widget-header"),t.tab.classList.add("ui-state-active"),t.rowPane!==void 0?t.rowPane.style.display="":t.container.style.display=""}},{key:"markTabInactive",value:function(t){t.tab.classList.add("ui-widget-header"),t.tab.classList.remove("ui-state-active"),t.rowPane!==void 0?t.rowPane.style.display="none":t.container.style.display="none"}}])&&gf(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(Sn);function jo(u){return jo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},jo(u)}function wf(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(jo(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(jo(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),jo(h)==="symbol"?h:String(h)),i)}var h}function Yl(u,n){return Yl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Yl(u,n)}function Ss(u){return Ss=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ss(u)}Dc.rules={'div[data-schemaid="root"]:after':'position:relative;color:red;margin:10px 0;font-weight:600;display:block;width:100%;text-align:center;content:"This is an old JSON-Editor 1.x Theme and might not display elements correctly when used with the 2.x version"'};var Nc=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Yl(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=Ss(i);if(h){var o=Ss(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(jo(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.apply(this,arguments)}return n=s,(f=[{key:"addInputError",value:function(t,e){if(t.errmsg)t.errmsg.style.display="block";else{var o=this.closest(t,".form-control");t.errmsg=document.createElement("div"),t.errmsg.setAttribute("class","errmsg"),o.nodeName&&o.appendChild(t.errmsg)}t.errmsg.innerHTML="",t.errmsg.appendChild(document.createTextNode(e))}},{key:"removeInputError",value:function(t){t.style&&(t.style.borderColor=""),t.errmsg&&(t.errmsg.style.display="none")}}])&&wf(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(Sn);function Eo(u){return Eo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Eo(u)}function _f(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(Eo(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Eo(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Eo(h)==="symbol"?h:String(h)),i)}var h}function vr(){return vr=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=tr(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},vr.apply(this,arguments)}function Xl(u,n){return Xl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Xl(u,n)}function tr(u){return tr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},tr(u)}Nc.rules={".je-upload-preview img":"float:left;margin:0%200.5rem%200.5rem%200;max-width:100%25;max-height:5rem",".je-dropzone":"position:relative;margin:0.5rem%200;border:2px%20dashed%20black;width:100%25;height:60px;background:teal;transition:all%200.5s",".je-dropzone:before":"position:absolute;content:attr(data-text);color:rgba(0%2C%200%2C%200%2C%200.6);left:50%25;top:50%25;transform:translate(-50%25%2C%20-50%25)",".je-dropzone.valid-dropzone":"background:green",".je-dropzone.invalid-dropzone":"background:red"};var xf={disable_theme_rules:!1,label_bold:!0,align_bottom:!1,object_indent:!1,object_border:!1,table_border:!1,table_zebrastyle:!1,input_size:"normal"},$c=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Xl(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=tr(i);if(h){var o=tr(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(Eo(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(t){return function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")}(this,s),a.call(this,t,xf)}return n=s,(f=[{key:"setGridColumnSize",value:function(t,e,o){t.classList.add("col-".concat(e)),o&&t.classList.add("col-mx-auto")}},{key:"getGridContainer",value:function(){var t=document.createElement("div");return t.classList.add("container"),this.options.object_indent||t.classList.add("je-noindent"),t}},{key:"getGridRow",value:function(){var t=document.createElement("div");return t.classList.add("columns"),t}},{key:"getGridColumn",value:function(){var t=document.createElement("div");return t.classList.add("column"),this.options.align_bottom&&t.classList.add("je-align-bottom"),t}},{key:"getIndentedPanel",value:function(){var t=document.createElement("div");return t.classList.add("je-panel"),this.options.object_border&&t.classList.add("je-border"),t}},{key:"getTopIndentedPanel",value:function(){var t=document.createElement("div");return t.classList.add("je-panel-top"),this.options.object_border&&t.classList.add("je-border"),t}},{key:"getHeaderButtonHolder",value:function(){return this.getButtonHolder()}},{key:"getButtonHolder",value:function(){var t=vr(tr(s.prototype),"getButtonHolder",this).call(this);return t.classList.add("btn-group"),t}},{key:"getFormButtonHolder",value:function(t){var e=vr(tr(s.prototype),"getFormButtonHolder",this).call(this);return e.classList.remove("btn-group"),e.classList.add("d-block"),t==="center"?e.classList.add("text-center"):t==="right"?e.classList.add("text-right"):e.classList.add("text-left"),e}},{key:"getFormButton",value:function(t,e,o){var c=vr(tr(s.prototype),"getFormButton",this).call(this,t,e,o);return c.classList.add("btn","btn-primary","mx-2","my-1"),this.options.input_size!=="small"&&c.classList.remove("btn-sm"),this.options.input_size==="large"&&c.classList.add("btn-lg"),c}},{key:"getButton",value:function(t,e,o){var c=vr(tr(s.prototype),"getButton",this).call(this,t,e,o);return c.classList.add("btn","btn-sm","btn-primary","mr-2","my-1"),c}},{key:"getHeader",value:function(t,e){var o=document.createElement("h4");return typeof t=="string"?o.textContent=t:o.appendChild(t),o.style.display="inline-block",o}},{key:"getFormInputDescription",value:function(t){var e=vr(tr(s.prototype),"getFormInputDescription",this).call(this,t);return e.classList.add("je-desc","hide-sm"),e}},{key:"getFormInputLabel",value:function(t,e){var o=vr(tr(s.prototype),"getFormInputLabel",this).call(this,t,e);return this.options.label_bold&&o.classList.add("je-label"),o}},{key:"getCheckbox",value:function(){return this.getFormInputField("checkbox")}},{key:"getCheckboxLabel",value:function(t,e){var o=vr(tr(s.prototype),"getCheckboxLabel",this).call(this,t,e),c=document.createElement("i");return c.classList.add("form-icon"),o.classList.add("form-checkbox","pr-0"),o.insertBefore(c,o.firstChild),o}},{key:"getFormCheckboxControl",value:function(t,e,o){return t.insertBefore(e,t.firstChild),o&&t.classList.add("form-inline"),t}},{key:"getMultiCheckboxHolder",value:function(t,e,o,c){return vr(tr(s.prototype),"getMultiCheckboxHolder",this).call(this,t,e,o,c)}},{key:"getFormRadio",value:function(t){var e=this.getFormInputField("radio");for(var o in t)e.setAttribute(o,t[o]);return e}},{key:"getFormRadioLabel",value:function(t,e){var o=vr(tr(s.prototype),"getFormRadioLabel",this).call(this,t,e),c=document.createElement("i");return c.classList.add("form-icon"),o.classList.add("form-radio"),o.insertBefore(c,o.firstChild),o}},{key:"getFormRadioControl",value:function(t,e,o){return t.insertBefore(e,t.firstChild),o&&t.classList.add("form-inline"),t}},{key:"getFormInputField",value:function(t){var e=vr(tr(s.prototype),"getFormInputField",this).call(this,t);return["checkbox","radio"].includes(t)||e.classList.add("form-input"),e}},{key:"getRangeInput",value:function(t,e,o){var c=this.getFormInputField("range");return c.classList.add("slider"),c.classList.remove("form-input"),c.setAttribute("oninput",'this.setAttribute("value", this.value)'),c.setAttribute("min",t),c.setAttribute("max",e),c.setAttribute("step",o),c}},{key:"getRangeControl",value:function(t,e){var o=vr(tr(s.prototype),"getRangeControl",this).call(this,t,e);return o.classList.add("text-center"),o}},{key:"getSelectInput",value:function(t,e){var o=vr(tr(s.prototype),"getSelectInput",this).call(this,t);return o.classList.add("form-select"),o}},{key:"getTextareaInput",value:function(){var t=document.createElement("textarea");return t.classList.add("form-input"),t}},{key:"getFormControl",value:function(t,e,o,c){var d=document.createElement("div");return d.classList.add("form-group"),!t||e.type!=="checkbox"&&e.type!=="radio"?(t&&(t.classList.add("form-label"),d.appendChild(t),c&&t.appendChild(c)),d.appendChild(e)):(d.classList.add(e.type),c&&t.appendChild(c),t.insertBefore(e,t.firstChild),d.appendChild(t)),this.options.input_size==="small"?e.classList.add("input-sm","select-sm"):this.options.input_size==="large"&&e.classList.add("input-lg","select-lg"),e.type!=="checkbox"&&d.appendChild(e),o&&d.appendChild(o),d}},{key:"getInputGroup",value:function(t,e){if(t){var o=document.createElement("div");o.classList.add("input-group"),o.appendChild(t);for(var c=0;c<e.length;c++)e[c].classList.add("input-group-btn"),e[c].classList.remove("btn-sm","mr-2","my-1"),o.appendChild(e[c]);return o}}},{key:"getInfoButton",value:function(t){var e=document.createElement("div");e.classList.add("popover","popover-left","float-right");var o=document.createElement("button");o.classList.add("btn","btn-secondary","btn-info","btn-action","s-circle"),o.setAttribute("tabindex","-1"),e.appendChild(o);var c=document.createTextNode("I");o.appendChild(c);var d=document.createElement("div");d.classList.add("popover-container"),e.appendChild(d);var _=document.createElement("div");_.classList.add("card"),d.appendChild(_);var P=document.createElement("div");return P.classList.add("card-body"),P.innerHTML=t,_.appendChild(P),e}},{key:"getTable",value:function(){var t=vr(tr(s.prototype),"getTable",this).call(this);return t.classList.add("table","table-scroll"),this.options.table_border&&t.classList.add("je-table-border"),this.options.table_zebrastyle&&t.classList.add("table-striped"),t}},{key:"getProgressBar",value:function(){var t=vr(tr(s.prototype),"getProgressBar",this).call(this);return t.classList.add("progress"),t}},{key:"getTabHolder",value:function(t){var e=t===void 0?"":t,o=document.createElement("div");return o.classList.add("columns"),o.innerHTML='<div class="column col-2"></div><div class="column col-10 content" id="'.concat(e,'"></div>'),o}},{key:"getTopTabHolder",value:function(t){var e=t===void 0?"":t,o=document.createElement("div");return o.innerHTML='<ul class="tab"></ul><div class="content" id="'.concat(e,'"></div>'),o}},{key:"getTab",value:function(t,e){var o=document.createElement("a");return o.classList.add("btn","btn-secondary","btn-block"),o.setAttribute("href","#".concat(e)),o.appendChild(t),o}},{key:"getTopTab",value:function(t,e){var o=document.createElement("li");o.id=e,o.classList.add("tab-item");var c=document.createElement("a");return c.setAttribute("href","#".concat(e)),c.appendChild(t),o.appendChild(c),o}},{key:"markTabActive",value:function(t){t.tab.classList.add("active"),t.rowPane!==void 0?t.rowPane.style.display="":t.container.style.display=""}},{key:"markTabInactive",value:function(t){t.tab.classList.remove("active"),t.rowPane!==void 0?t.rowPane.style.display="none":t.container.style.display="none"}},{key:"afterInputReady",value:function(t){if(t.localName==="select"){if(t.classList.contains("selectized")){var e=t.nextSibling;e&&(e.classList.remove("form-select"),Array.from(e.querySelectorAll(".form-select")).forEach(function(c){c.classList.remove("form-select")}))}else if(t.classList.contains("select2-hidden-accessible")){var o=t.nextSibling;o&&o.querySelector(".select2-selection--single")&&o.classList.add("form-select")}}t.controlgroup||(t.controlgroup=this.closest(t,".form-group"),this.closest(t,".compact")&&(t.controlgroup.style.marginBottom=0))}},{key:"addInputError",value:function(t,e){t.controlgroup&&(t.controlgroup.classList.add("has-error"),t.errmsg||(t.errmsg=document.createElement("p"),t.errmsg.classList.add("form-input-hint"),t.controlgroup.appendChild(t.errmsg)),t.errmsg.classList.remove("d-hide"),t.errmsg.textContent=e)}},{key:"removeInputError",value:function(t){t.errmsg&&(t.errmsg.classList.add("d-hide"),t.controlgroup.classList.remove("has-error"))}}])&&_f(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(Sn);function Co(u){return Co=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Co(u)}function kf(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(Co(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Co(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Co(h)==="symbol"?h:String(h)),i)}var h}function gr(){return gr=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(u,n,f){var i=function(a,s){for(;!Object.prototype.hasOwnProperty.call(a,s)&&(a=er(a))!==null;);return a}(u,n);if(i){var h=Object.getOwnPropertyDescriptor(i,n);return h.get?h.get.call(arguments.length<3?u:f):h.value}},gr.apply(this,arguments)}function Ql(u,n){return Ql=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,i){return f.__proto__=i,f},Ql(u,n)}function er(u){return er=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},er(u)}$c.rules={"*":"--primary-color:%235755d9;--gray-color:%23bcc3ce;--light-color:%23fff",".slider:focus":"box-shadow:none","h4 > label + .btn-group":"margin-left:1rem",".text-right > button":"margin-right:0%20!important",".text-left > button":"margin-left:0%20!important",".property-selector":"font-size:0.7rem;font-weight:normal;max-height:260px%20!important;width:395px%20!important",".property-selector .form-checkbox":"margin:0",textarea:"width:100%25;min-height:2rem;resize:vertical",table:"border-collapse:collapse",".table td":"padding:0.4rem%200.4rem",".mr-5":"margin-right:1rem%20!important","div[data-schematype]:not([data-schematype='object'])":"transition:0.5s","div[data-schematype]:not([data-schematype='object']):hover":"background-color:%23eee",".je-table-border td":"border:0.05rem%20solid%20%23dadee4%20!important",".btn-info":"font-size:0.5rem;font-weight:bold;height:0.8rem;padding:0.15rem%200;line-height:0.8;margin:0.3rem%200%200.3rem%200.1rem",".je-label + select":"min-width:5rem",".je-label":"font-weight:600",".btn-action.btn-info":"width:0.8rem",".je-border":"border:0.05rem%20solid%20%23dadee4",".je-panel":"padding:0.2rem;margin:0.2rem;background-color:rgba(218%2C%20222%2C%20228%2C%200.1)",".je-panel-top":"padding:0.2rem;margin:0.2rem;background-color:rgba(218%2C%20222%2C%20228%2C%200.1)",".required:after":"content:%22%20*%22;color:red;font:inherit",".je-align-bottom":"margin-top:auto",".je-desc":"font-size:smaller;margin:0.2rem%200",".je-upload-preview img":"float:left;margin:0%200.5rem%200.5rem%200;max-width:100%25;max-height:5rem;border:3px%20solid%20white;box-shadow:0px%200px%208px%20rgba(0%2C%200%2C%200%2C%200.3);box-sizing:border-box",".je-dropzone":"position:relative;margin:0.5rem%200;border:2px%20dashed%20black;width:100%25;height:60px;background:teal;transition:all%200.5s",".je-dropzone:before":"position:absolute;content:attr(data-text);color:rgba(0%2C%200%2C%200%2C%200.6);left:50%25;top:50%25;transform:translate(-50%25%2C%20-50%25)",".je-dropzone.valid-dropzone":"background:green",".je-dropzone.invalid-dropzone":"background:red",".columns .container.je-noindent":"padding-left:0;padding-right:0",".selectize-control.multi .item":"background:var(--primary-color)%20!important",".select2-container--default .select2-selection--single .select2-selection__arrow":"display:none",".select2-container--default .select2-selection--single":"border:none",".select2-container .select2-selection--single .select2-selection__rendered":"padding:0",".select2-container .select2-search--inline .select2-search__field":"margin-top:0",".select2-container--default.select2-container--focus .select2-selection--multiple":"border:0.05rem%20solid%20var(--gray-color)",".select2-container--default .select2-selection--multiple .select2-selection__choice":"margin:0.4rem%200.2rem%200.2rem%200;padding:2px%205px;background-color:var(--primary-color);color:var(--light-color)",".select2-container--default .select2-search--inline .select2-search__field":"line-height:normal",".choices":"margin-bottom:auto",".choices__list--multiple .choices__item":"border:none;background-color:var(--primary-color);color:var(--light-color)",".choices[data-type*='select-multiple'] .choices__button":"border-left:0.05rem%20solid%20%232826a6",".choices__inner":"font-size:inherit;min-height:20px;padding:4px%207.5px%204px%203.75px",".choices[data-type*='select-one'] .choices__inner":"padding-bottom:4px",".choices__list--dropdown .choices__item":"font-size:inherit"};var Of={disable_theme_rules:!1,label_bold:!1,object_panel_default:!0,object_indent:!0,object_border:!1,table_border:!1,table_hdiv:!1,table_zebrastyle:!1,input_size:"small",enable_compact:!1},Mc=function(u){(function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ql(t,e)})(s,u);var n,f,i,h,a=(i=s,h=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var t,e=er(i);if(h){var o=er(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,d){if(d&&(Co(d)==="object"||typeof d=="function"))return d;if(d!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}(c)}(this,t)});function s(t){return function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")}(this,s),a.call(this,t,Of)}return n=s,(f=[{key:"getGridContainer",value:function(){var t=document.createElement("div");return t.classList.add("flex","flex-col","w-full"),this.options.object_indent||t.classList.add("je-noindent"),t}},{key:"getGridRow",value:function(){var t=document.createElement("div");return t.classList.add("flex","flex-wrap","w-full"),t}},{key:"getGridColumn",value:function(){var t=document.createElement("div");return t.classList.add("flex","flex-col"),t}},{key:"setGridColumnSize",value:function(t,e,o){e>0&&e<12?t.classList.add("w-".concat(e,"/12"),"px-1"):t.classList.add("w-full","px-1"),o&&(t.style.marginLeft="".concat(100/12*o,"%"))}},{key:"getIndentedPanel",value:function(){var t=document.createElement("div");return this.options.object_panel_default?t.classList.add("w-full","p-1"):t.classList.add("relative","flex","flex-col","rounded","break-words","border","bg-white","border-0","border-blue-400","p-1","shadow-md"),this.options.object_border&&t.classList.add("je-border"),t}},{key:"getTopIndentedPanel",value:function(){var t=document.createElement("div");return this.options.object_panel_default?t.classList.add("w-full","m-2"):t.classList.add("relative","flex","flex-col","rounded","break-words","border","bg-white","border-0","border-blue-400","p-1","shadow-md"),this.options.object_border&&t.classList.add("je-border"),t}},{key:"getTitle",value:function(){return this.translateProperty(this.schema.title)}},{key:"getSelectInput",value:function(t,e){var o=gr(er(s.prototype),"getSelectInput",this).call(this,t);return e?o.classList.add("form-multiselect","block","py-0","h-auto","w-full","px-1","text-sm","text-black","leading-normal","bg-white","border","border-grey","rounded"):o.classList.add("form-select","block","py-0","h-6","w-full","px-1","text-sm","text-black","leading-normal","bg-white","border","border-grey","rounded"),this.options.enable_compact&&o.classList.add("compact"),o}},{key:"afterInputReady",value:function(t){t.controlgroup||(t.controlgroup=this.closest(t,".form-group"),this.closest(t,".compact")&&(t.controlgroup.style.marginBottom=0))}},{key:"getTextareaInput",value:function(){var t=gr(er(s.prototype),"getTextareaInput",this).call(this);return t.classList.add("block","w-full","px-1","text-sm","leading-normal","bg-white","text-black","border","border-grey","rounded"),this.options.enable_compact&&t.classList.add("compact"),t.style.height=0,t}},{key:"getRangeInput",value:function(t,e,o){var c=this.getFormInputField("range");return c.classList.add("slider"),this.options.enable_compact&&c.classList.add("compact"),c.setAttribute("oninput",'this.setAttribute("value", this.value)'),c.setAttribute("min",t),c.setAttribute("max",e),c.setAttribute("step",o),c}},{key:"getRangeControl",value:function(t,e){var o=gr(er(s.prototype),"getRangeControl",this).call(this,t,e);return o.classList.add("text-center","text-black"),o}},{key:"getCheckbox",value:function(){var t=this.getFormInputField("checkbox");return t.classList.add("form-checkbox","text-red-600"),t}},{key:"getCheckboxLabel",value:function(t,e){var o=gr(er(s.prototype),"getCheckboxLabel",this).call(this,t,e);return o.classList.add("inline-flex","items-center"),o}},{key:"getFormCheckboxControl",value:function(t,e,o){return t.insertBefore(e,t.firstChild),o&&t.classList.add("inline-flex flex-row"),t}},{key:"getMultiCheckboxHolder",value:function(t,e,o,c){var d=gr(er(s.prototype),"getMultiCheckboxHolder",this).call(this,t,e,o,c);return d.classList.add("inline-flex","flex-col"),d}},{key:"getFormRadio",value:function(t){var e=this.getFormInputField("radio");for(var o in e.classList.add("form-radio","text-red-600"),t)e.setAttribute(o,t[o]);return e}},{key:"getFormRadioLabel",value:function(t,e){var o=gr(er(s.prototype),"getFormRadioLabel",this).call(this,t,e);return o.classList.add("inline-flex","items-center","mr-2"),o}},{key:"getFormRadioControl",value:function(t,e,o){return t.insertBefore(e,t.firstChild),o&&t.classList.add("form-radio"),t}},{key:"getRadioHolder",value:function(t,e,o,c,d){var _=gr(er(s.prototype),"getRadioHolder",this).call(this,e,o,c,d);return t.options.layout==="h"?_.classList.add("inline-flex","flex-row"):_.classList.add("inline-flex","flex-col"),_}},{key:"getFormInputLabel",value:function(t,e){var o=gr(er(s.prototype),"getFormInputLabel",this).call(this,t,e);return this.options.label_bold?o.classList.add("font-bold"):o.classList.add("required"),o}},{key:"getFormInputField",value:function(t){var e=gr(er(s.prototype),"getFormInputField",this).call(this,t);return["checkbox","radio"].includes(t)||e.classList.add("block","w-full","px-1","text-black","text-sm","leading-normal","bg-white","border","border-grey","rounded"),this.options.enable_compact&&e.classList.add("compact"),e}},{key:"getFormInputDescription",value:function(t){var e=document.createElement("p");return e.classList.add("block","mt-1","text-xs"),window.DOMPurify?e.innerHTML=window.DOMPurify.sanitize(t):e.textContent=this.cleanText(t),e}},{key:"getFormControl",value:function(t,e,o,c){var d=document.createElement("div");return d.classList.add("form-group","mb-1","w-full"),t&&(t.classList.add("text-xs"),e.type==="checkbox"&&(e.classList.add("form-checkbox","text-xs","text-red-600","mr-1"),t.classList.add("items-center","flex"),t=this.getFormCheckboxControl(t,e,!1,c)),e.type==="radio"&&(e.classList.add("form-radio","text-red-600","mr-1"),t.classList.add("items-center","flex"),t=this.getFormRadioControl(t,e,!1,c)),d.appendChild(t),!["checkbox","radio"].includes(e.type)&&c&&d.appendChild(c)),["checkbox","radio"].includes(e.type)||(this.options.input_size==="small"?e.classList.add("text-xs"):this.options.input_size==="normal"?e.classList.add("text-base"):this.options.input_size==="large"&&e.classList.add("text-xl"),d.appendChild(e)),o&&d.appendChild(o),d}},{key:"getHeaderButtonHolder",value:function(){var t=this.getButtonHolder();return t.classList.add("text-sm"),t}},{key:"getButtonHolder",value:function(){var t=document.createElement("div");return t.classList.add("flex","relative","inline-flex","align-middle"),t}},{key:"getButton",value:function(t,e,o){var c=gr(er(s.prototype),"getButton",this).call(this,t,e,o);return c.classList.add("inline-block","align-middle","text-center","text-sm","bg-blue-700","text-white","py-1","pr-1","m-2","shadow","select-none","whitespace-no-wrap","rounded"),c}},{key:"getInfoButton",value:function(t){var e=document.createElement("a");e.classList.add("tooltips","float-right"),e.innerHTML="ⓘ";var o=document.createElement("span");return o.innerHTML=t,e.appendChild(o),e}},{key:"getTable",value:function(){var t=gr(er(s.prototype),"getTable",this).call(this);return this.options.table_border?t.classList.add("je-table-border"):t.classList.add("table","border","p-0"),t}},{key:"getTableRow",value:function(){var t=gr(er(s.prototype),"getTableRow",this).call(this);return this.options.table_border&&t.classList.add("je-table-border"),this.options.table_zebrastyle&&t.classList.add("je-table-zebra"),t}},{key:"getTableHeaderCell",value:function(t){var e=gr(er(s.prototype),"getTableHeaderCell",this).call(this,t);return this.options.table_border?e.classList.add("je-table-border"):this.options.table_hdiv?e.classList.add("je-table-hdiv"):e.classList.add("text-xs","border","p-0","m-0"),e}},{key:"getTableCell",value:function(){var t=gr(er(s.prototype),"getTableCell",this).call(this);return this.options.table_border?t.classList.add("je-table-border"):this.options.table_hdiv?t.classList.add("je-table-hdiv"):t.classList.add("border-0","p-0","m-0"),t}},{key:"addInputError",value:function(t,e){t.controlgroup&&(t.controlgroup.classList.add("has-error"),t.controlgroup.classList.add("text-red-600"),t.errmsg?t.errmsg.style.display="":(t.errmsg=document.createElement("p"),t.errmsg.classList.add("block","mt-1","text-xs","text-red"),t.controlgroup.appendChild(t.errmsg)),t.errmsg.textContent=e)}},{key:"removeInputError",value:function(t){t.errmsg&&(t.errmsg.style.display="none",t.controlgroup.classList.remove("text-red-600"),t.controlgroup.classList.remove("has-error"))}},{key:"getTabHolder",value:function(t){var e=document.createElement("div"),o=t===void 0?"":t;return e.innerHTML="<div class='w-2/12' id='".concat(o,"'><ul class='list-reset pl-0 mb-0'></ul></div><div class='w-10/12' id='").concat(o,"'></div>"),e.classList.add("flex"),e}},{key:"addTab",value:function(t,e){t.children[0].children[0].appendChild(e)}},{key:"getTopTabHolder",value:function(t){var e=t===void 0?"":t,o=document.createElement("div");return o.innerHTML="<ul class='nav-tabs flex list-reset pl-0 mb-0 border-b border-grey-light' id='".concat(e,"'></ul><div class='p-6 block' id='").concat(e,"'></div>"),o}},{key:"getTab",value:function(t,e){var o=document.createElement("li");o.classList.add("nav-item","flex-col","text-center","text-white","bg-blue-500","shadow-md","border","p-2","mb-2","mr-2","hover:bg-blue-400","rounded");var c=document.createElement("a");return c.classList.add("nav-link","text-center"),c.setAttribute("href","#".concat(e)),c.setAttribute("data-toggle","tab"),c.appendChild(t),o.appendChild(c),o}},{key:"getTopTab",value:function(t,e){var o=document.createElement("li");o.classList.add("nav-item","flex","border-l","border-t","border-r");var c=document.createElement("a");return c.classList.add("nav-link","-mb-px","flex-row","text-center","bg-white","p-2","hover:bg-blue-400","rounded-t"),c.setAttribute("href","#".concat(e)),c.setAttribute("data-toggle","tab"),c.appendChild(t),o.appendChild(c),o}},{key:"getTabContent",value:function(){var t=document.createElement("div");return t.setAttribute("role","tabpanel"),t}},{key:"getTopTabContent",value:function(){var t=document.createElement("div");return t.setAttribute("role","tabpanel"),t}},{key:"markTabActive",value:function(t){t.tab.firstChild.classList.add("block"),t.tab.firstChild.classList.contains("border-b")===!0?(t.tab.firstChild.classList.add("border-b-0"),t.tab.firstChild.classList.remove("border-b")):t.tab.firstChild.classList.add("border-b-0"),t.container.classList.contains("hidden")===!0&&t.container.classList.remove("hidden"),t.container.classList.add("block")}},{key:"markTabInactive",value:function(t){t.tab.firstChild.classList.contains("border-b-0")===!0?(t.tab.firstChild.classList.add("border-b"),t.tab.firstChild.classList.remove("border-b-0")):t.tab.firstChild.classList.add("border-b"),t.container.classList.contains("block")===!0&&(t.container.classList.remove("block"),t.container.classList.add("hidden"))}},{key:"getProgressBar",value:function(){var t=document.createElement("div");t.classList.add("progress");var e=document.createElement("div");return e.classList.add("bg-blue","leading-none","py-1","text-xs","text-center","text-white"),e.setAttribute("role","progressbar"),e.setAttribute("aria-valuenow",0),e.setAttribute("aria-valuemin",0),e.setAttribute("aria-valuenax",100),e.innerHTML="".concat(0,"%"),t.appendChild(e),t}},{key:"updateProgressBar",value:function(t,e){if(t){var o=t.firstChild,c="".concat(e,"%");o.setAttribute("aria-valuenow",e),o.style.width=c,o.innerHTML=c}}},{key:"updateProgressBarUnknown",value:function(t){if(t){var e=t.firstChild;t.classList.add("progress","bg-blue","leading-none","py-1","text-xs","text-center","text-white","block"),e.removeAttribute("aria-valuenow"),e.classList.add("w-full"),e.innerHTML=""}}},{key:"getInputGroup",value:function(t,e){if(t){var o=document.createElement("div");o.classList.add("relative","items-stretch","w-full"),o.appendChild(t);var c=document.createElement("div");c.classList.add("-mr-1"),o.appendChild(c);for(var d=0;d<e.length;d++)c.appendChild(e[d]);return o}}}])&&kf(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),s}(Sn);Mc.rules={".slider":"-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;display:block;border:none;height:1.2rem;width:100%25",".slider:focus":"box-shadow:0%200%200%200%20rgba(87%2C%2085%2C%20217%2C%200.2);outline:none",".slider.tooltip:not([data-tooltip])::after":"content:attr(value)",".slider::-webkit-slider-thumb":"-webkit-appearance:none;background:%23f17405;border-radius:100%25;height:0.6rem;margin-top:-0.25rem;transition:transform%200.2s;width:0.6rem",".slider:active::-webkit-slider-thumb":"transform:scale(1.25);outline:none",".slider::-webkit-slider-runnable-track":"background:%23b2b4b6;border-radius:0.1rem;height:0.1rem;width:100%25","a.tooltips":"position:relative;display:inline","a.tooltips span":"position:absolute;white-space:nowrap;width:auto;padding-left:1rem;padding-right:1rem;color:%23ffffff;background:rgba(56%2C%2056%2C%2056%2C%200.85);height:1.5rem;line-height:1.5rem;text-align:center;visibility:hidden;border-radius:3px","a.tooltips span:after":"content:%22%22;position:absolute;top:50%25;left:100%25;margin-top:-5px;width:0;height:0;border-left:5px%20solid%20rgba(56%2C%2056%2C%2056%2C%200.85);border-top:5px%20solid%20transparent;border-bottom:5px%20solid%20transparent","a:hover.tooltips span":"visibility:visible;opacity:0.9;font-size:0.8rem;right:100%25;top:50%25;margin-top:-12px;margin-right:10px;z-index:999",".json-editor-btntype-properties + div":"font-size:0.8rem;font-weight:normal",textarea:"width:100%25;min-height:2rem;resize:vertical",table:"width:100%25;border-collapse:collapse",".table td":"padding:0rem%200rem","div[data-schematype]:not([data-schematype='object'])":"transition:0.5s","div[data-schematype]:not([data-schematype='object']):hover":"background-color:%23e6f4fe","div[data-schemaid='root']":"position:relative;width:inherit;display:inherit;overflow-x:hidden;z-index:10","select[multiple]":"height:auto","select[multiple].from-select":"height:auto",".je-table-zebra:nth-child(even)":"background-color:%23f2f2f2",".je-table-border":"border:0.5px%20solid%20black",".je-table-hdiv":"border-bottom:1px%20solid%20black",".je-border":"border:0.05rem%20solid%20%233182ce",".je-panel":"width:inherit;padding:0.2rem;margin:0.2rem;background-color:rgba(218%2C%20222%2C%20228%2C%200.1)",".je-panel-top":"width:100%25;padding:0.2rem;margin:0.2rem;background-color:rgba(218%2C%20222%2C%20228%2C%200.1)",".required:after":"content:%22%20*%22;color:red;font:inherit;font-weight:bold",".je-desc":"font-size:smaller;margin:0.2rem%200",".container-xl.je-noindent":"padding-left:0;padding-right:0",".json-editor-btntype-add":"color:white;margin:0.3rem;padding:0.3rem%200.8rem;background-color:%234299e1;box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-webkit-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-moz-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2)",".json-editor-btntype-deletelast":"color:white;margin:0.3rem;padding:0.3rem%200.8rem;background-color:%23e53e3e;box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-webkit-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-moz-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2)",".json-editor-btntype-deleteall":"color:white;margin:0.3rem;padding:0.3rem%200.8rem;background-color:%23000000;box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-webkit-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-moz-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2)",".json-editor-btn-save":"float:right;color:white;margin:0.3rem;padding:0.3rem%200.8rem;background-color:%232b6cb0;box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-webkit-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-moz-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2)",".json-editor-btn-back":"color:white;margin:0.3rem;padding:0.3rem%200.8rem;background-color:%232b6cb0;box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-webkit-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-moz-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2)",".json-editor-btntype-delete":"color:%23e53e3e;background-color:rgba(218%2C%20222%2C%20228%2C%200.1);margin:0.03rem;padding:0.1rem",".json-editor-btntype-move":"color:%23000000;background-color:rgba(218%2C%20222%2C%20228%2C%200.1);margin:0.03rem;padding:0.1rem",".json-editor-btn-collapse":"padding:0em%200.8rem;font-size:1.3rem;color:%23e53e3e;background-color:rgba(218%2C%20222%2C%20228%2C%200.1)",".je-upload-preview img":"float:left;margin:0%200.5rem%200.5rem%200;max-width:100%25;max-height:5rem",".je-dropzone":"position:relative;margin:0.5rem%200;border:2px%20dashed%20black;width:100%25;height:60px;background:teal;transition:all%200.5s",".je-dropzone:before":"position:absolute;content:attr(data-text);color:rgba(0%2C%200%2C%200%2C%200.6);left:50%25;top:50%25;transform:translate(-50%25%2C%20-50%25)",".je-dropzone.valid-dropzone":"background:green",".je-dropzone.invalid-dropzone":"background:red"};var jf={html:Lc,bootstrap3:Rc,bootstrap4:Ic,bootstrap5:Bc,jqueryui:Dc,barebones:Nc,spectre:$c,tailwind:Mc};const Ef={".je-float-right-linkholder":"float:right;margin-left:10px",".je-modal":"background-color:white;border:1px%20solid%20black;box-shadow:3px%203px%20black;position:absolute;z-index:10",".je-infobutton-icon":"font-size:16px;font-weight:bold;padding:0.25rem;position:relative;display:inline-block",".je-infobutton-tooltip":"font-size:12px;font-weight:normal;font-family:sans-serif;visibility:hidden;background-color:rgba(50%2C%2050%2C%2050%2C%200.75);margin:0%200.25rem;color:%23fafafa;padding:0.5rem%201rem;border-radius:0.25rem;width:20rem;position:absolute",".je-not-loaded":"pointer-events:none",".je-header":"display:inline-block",".je-upload-preview img":"float:left;margin:0%200.5rem%200.5rem%200;max-width:100%25;max-height:5rem",".je-checkbox":"display:inline-block;width:auto",".je-checkbox-control--compact":"display:inline-block;margin-right:1rem",".je-radio":"display:inline-block;width:auto",".je-radio-control--compact":"display:inline-block;margin-right:1rem",".je-switcher":"background-color:transparent;display:inline-block;font-style:italic;font-weight:normal;height:auto;width:auto;margin-bottom:0;margin-left:5px;padding:0%200%200%203px",".je-textarea":"width:100%25;height:300px;box-sizing:border-box",".je-range-control":"text-align:center",".je-indented-panel":"padding-left:10px;margin-left:10px;border-left:1px%20solid%20%23ccc",".je-indented-panel--top":"padding-left:10px;margin-left:10px",".je-tabholder":"float:left;width:130px",".je-tabholder .content":"margin-left:120px",".je-tabholder--top":"margin-left:10px",".je-tabholder--clear":"clear:both",".je-tab":"border:1px%20solid%20%23ccc;border-width:1px%200%201px%201px;text-align:center;line-height:30px;border-radius:5px;border-bottom-right-radius:0;border-top-right-radius:0;font-weight:bold;cursor:pointer",".je-tab--top":"float:left;border:1px%20solid%20%23ccc;border-width:1px%201px%200px%201px;text-align:center;line-height:30px;border-radius:5px;padding-left:5px;padding-right:5px;border-bottom-right-radius:0;border-bottom-left-radius:0;font-weight:bold;cursor:pointer",".je-block-link":"display:block",".je-media":"width:100%25"};function So(u){return So=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},So(u)}function Kl(u,n){(n==null||n>u.length)&&(n=u.length);for(var f=0,i=new Array(n);f<n;f++)i[f]=u[f];return i}function tu(){tu=function(){return u};var u={},n=Object.prototype,f=n.hasOwnProperty,i=Object.defineProperty||function(W,G,Z){W[G]=Z.value},h=typeof Symbol=="function"?Symbol:{},a=h.iterator||"@@iterator",s=h.asyncIterator||"@@asyncIterator",t=h.toStringTag||"@@toStringTag";function e(W,G,Z){return Object.defineProperty(W,G,{value:Z,enumerable:!0,configurable:!0,writable:!0}),W[G]}try{e({},"")}catch{e=function(G,Z,pt){return G[Z]=pt}}function o(W,G,Z,pt){var et=G&&G.prototype instanceof _?G:_,Lt=Object.create(et.prototype),re=new gt(pt||[]);return i(Lt,"_invoke",{value:$t(W,Z,re)}),Lt}function c(W,G,Z){try{return{type:"normal",arg:W.call(G,Z)}}catch(pt){return{type:"throw",arg:pt}}}u.wrap=o;var d={};function _(){}function P(){}function D(){}var J={};e(J,a,function(){return this});var nt=Object.getPrototypeOf,ct=nt&&nt(nt(Zt([])));ct&&ct!==n&&f.call(ct,a)&&(J=ct);var dt=D.prototype=_.prototype=Object.create(J);function kt(W){["next","throw","return"].forEach(function(G){e(W,G,function(Z){return this._invoke(G,Z)})})}function Ct(W,G){function Z(et,Lt,re,Pe){var Te=c(W[et],W,Lt);if(Te.type!=="throw"){var Br=Te.arg,Kr=Br.value;return Kr&&So(Kr)=="object"&&f.call(Kr,"__await")?G.resolve(Kr.__await).then(function(xr){Z("next",xr,re,Pe)},function(xr){Z("throw",xr,re,Pe)}):G.resolve(Kr).then(function(xr){Br.value=xr,re(Br)},function(xr){return Z("throw",xr,re,Pe)})}Pe(Te.arg)}var pt;i(this,"_invoke",{value:function(et,Lt){function re(){return new G(function(Pe,Te){Z(et,Lt,Pe,Te)})}return pt=pt?pt.then(re,re):re()}})}function $t(W,G,Z){var pt="suspendedStart";return function(et,Lt){if(pt==="executing")throw new Error("Generator is already running");if(pt==="completed"){if(et==="throw")throw Lt;return{value:void 0,done:!0}}for(Z.method=et,Z.arg=Lt;;){var re=Z.delegate;if(re){var Pe=ne(re,Z);if(Pe){if(Pe===d)continue;return Pe}}if(Z.method==="next")Z.sent=Z._sent=Z.arg;else if(Z.method==="throw"){if(pt==="suspendedStart")throw pt="completed",Z.arg;Z.dispatchException(Z.arg)}else Z.method==="return"&&Z.abrupt("return",Z.arg);pt="executing";var Te=c(W,G,Z);if(Te.type==="normal"){if(pt=Z.done?"completed":"suspendedYield",Te.arg===d)continue;return{value:Te.arg,done:Z.done}}Te.type==="throw"&&(pt="completed",Z.method="throw",Z.arg=Te.arg)}}}function ne(W,G){var Z=G.method,pt=W.iterator[Z];if(pt===void 0)return G.delegate=null,Z==="throw"&&W.iterator.return&&(G.method="return",G.arg=void 0,ne(W,G),G.method==="throw")||Z!=="return"&&(G.method="throw",G.arg=new TypeError("The iterator does not provide a '"+Z+"' method")),d;var et=c(pt,W.iterator,G.arg);if(et.type==="throw")return G.method="throw",G.arg=et.arg,G.delegate=null,d;var Lt=et.arg;return Lt?Lt.done?(G[W.resultName]=Lt.value,G.next=W.nextLoc,G.method!=="return"&&(G.method="next",G.arg=void 0),G.delegate=null,d):Lt:(G.method="throw",G.arg=new TypeError("iterator result is not an object"),G.delegate=null,d)}function Re(W){var G={tryLoc:W[0]};1 in W&&(G.catchLoc=W[1]),2 in W&&(G.finallyLoc=W[2],G.afterLoc=W[3]),this.tryEntries.push(G)}function Gt(W){var G=W.completion||{};G.type="normal",delete G.arg,W.completion=G}function gt(W){this.tryEntries=[{tryLoc:"root"}],W.forEach(Re,this),this.reset(!0)}function Zt(W){if(W){var G=W[a];if(G)return G.call(W);if(typeof W.next=="function")return W;if(!isNaN(W.length)){var Z=-1,pt=function et(){for(;++Z<W.length;)if(f.call(W,Z))return et.value=W[Z],et.done=!1,et;return et.value=void 0,et.done=!0,et};return pt.next=pt}}return{next:Ge}}function Ge(){return{value:void 0,done:!0}}return P.prototype=D,i(dt,"constructor",{value:D,configurable:!0}),i(D,"constructor",{value:P,configurable:!0}),P.displayName=e(D,t,"GeneratorFunction"),u.isGeneratorFunction=function(W){var G=typeof W=="function"&&W.constructor;return!!G&&(G===P||(G.displayName||G.name)==="GeneratorFunction")},u.mark=function(W){return Object.setPrototypeOf?Object.setPrototypeOf(W,D):(W.__proto__=D,e(W,t,"GeneratorFunction")),W.prototype=Object.create(dt),W},u.awrap=function(W){return{__await:W}},kt(Ct.prototype),e(Ct.prototype,s,function(){return this}),u.AsyncIterator=Ct,u.async=function(W,G,Z,pt,et){et===void 0&&(et=Promise);var Lt=new Ct(o(W,G,Z,pt),et);return u.isGeneratorFunction(G)?Lt:Lt.next().then(function(re){return re.done?re.value:Lt.next()})},kt(dt),e(dt,t,"Generator"),e(dt,a,function(){return this}),e(dt,"toString",function(){return"[object Generator]"}),u.keys=function(W){var G=Object(W),Z=[];for(var pt in G)Z.push(pt);return Z.reverse(),function et(){for(;Z.length;){var Lt=Z.pop();if(Lt in G)return et.value=Lt,et.done=!1,et}return et.done=!0,et}},u.values=Zt,gt.prototype={constructor:gt,reset:function(W){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(Gt),!W)for(var G in this)G.charAt(0)==="t"&&f.call(this,G)&&!isNaN(+G.slice(1))&&(this[G]=void 0)},stop:function(){this.done=!0;var W=this.tryEntries[0].completion;if(W.type==="throw")throw W.arg;return this.rval},dispatchException:function(W){if(this.done)throw W;var G=this;function Z(Te,Br){return Lt.type="throw",Lt.arg=W,G.next=Te,Br&&(G.method="next",G.arg=void 0),!!Br}for(var pt=this.tryEntries.length-1;pt>=0;--pt){var et=this.tryEntries[pt],Lt=et.completion;if(et.tryLoc==="root")return Z("end");if(et.tryLoc<=this.prev){var re=f.call(et,"catchLoc"),Pe=f.call(et,"finallyLoc");if(re&&Pe){if(this.prev<et.catchLoc)return Z(et.catchLoc,!0);if(this.prev<et.finallyLoc)return Z(et.finallyLoc)}else if(re){if(this.prev<et.catchLoc)return Z(et.catchLoc,!0)}else{if(!Pe)throw new Error("try statement without catch or finally");if(this.prev<et.finallyLoc)return Z(et.finallyLoc)}}}},abrupt:function(W,G){for(var Z=this.tryEntries.length-1;Z>=0;--Z){var pt=this.tryEntries[Z];if(pt.tryLoc<=this.prev&&f.call(pt,"finallyLoc")&&this.prev<pt.finallyLoc){var et=pt;break}}et&&(W==="break"||W==="continue")&&et.tryLoc<=G&&G<=et.finallyLoc&&(et=null);var Lt=et?et.completion:{};return Lt.type=W,Lt.arg=G,et?(this.method="next",this.next=et.finallyLoc,d):this.complete(Lt)},complete:function(W,G){if(W.type==="throw")throw W.arg;return W.type==="break"||W.type==="continue"?this.next=W.arg:W.type==="return"?(this.rval=this.arg=W.arg,this.method="return",this.next="end"):W.type==="normal"&&G&&(this.next=G),d},finish:function(W){for(var G=this.tryEntries.length-1;G>=0;--G){var Z=this.tryEntries[G];if(Z.finallyLoc===W)return this.complete(Z.completion,Z.afterLoc),Gt(Z),d}},catch:function(W){for(var G=this.tryEntries.length-1;G>=0;--G){var Z=this.tryEntries[G];if(Z.tryLoc===W){var pt=Z.completion;if(pt.type==="throw"){var et=pt.arg;Gt(Z)}return et}}throw new Error("illegal catch attempt")},delegateYield:function(W,G,Z){return this.delegate={iterator:Zt(W),resultName:G,nextLoc:Z},this.method==="next"&&(this.arg=void 0),d}},u}function Hc(u,n,f,i,h,a,s){try{var t=u[a](s),e=t.value}catch(o){return void f(o)}t.done?n(e):Promise.resolve(e).then(i,h)}function Cf(u,n){for(var f=0;f<n.length;f++){var i=n[f];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(u,(h=function(a,s){if(So(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(So(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),So(h)==="symbol"?h:String(h)),i)}var h}var Tn=function(){function u(a){var s=this,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(function(D,J){if(!(D instanceof J))throw new TypeError("Cannot call a class as a function")}(this,u),!(a instanceof Element))throw new Error("element should be an instance of Element");this.element=a,this.options=x({},u.defaults.options,t),this.ready=!1,this.copyClipboard=null,this.schema=this.options.schema,this.template=this.options.template,this.translate=this.options.translate||u.defaults.translate,this.translateProperty=this.options.translateProperty||u.defaults.translateProperty,this.uuid=0,this.__data={};var e=this.options.theme||u.defaults.theme,o=u.defaults.themes[e];if(!o)throw new Error("Unknown theme ".concat(e));this.element.setAttribute("data-theme",e),this.element.classList.add("je-not-loaded"),this.element.classList.remove("je-ready"),this.theme=new o(this);var c=x(Ef,this.getEditorsRules()),d=function(D,J,nt){return nt?s.addNewStyleRulesToShadowRoot(D,J,nt):s.addNewStyleRules(D,J)};if(!this.theme.options.disable_theme_rules){var _=E(this.element);d("default",c,_),o.rules!==void 0&&d(e,o.rules,_)}var P=u.defaults.iconlibs[this.options.iconlib||u.defaults.iconlib];P&&(this.iconlib=new P),this.root_container=this.theme.getContainer(),this.element.appendChild(this.root_container),this.promise=this.load()}var n,f,i,h;return n=u,f=[{key:"load",value:(i=tu().mark(function a(){var s,t,e,o,c,d,_=this;return tu().wrap(function(P){for(;;)switch(P.prev=P.next){case 0:return s=document.location.origin+document.location.pathname.toString(),(t=new Np(this.options)).onSchemaLoaded=function(D){_.trigger("schemaLoaded",D)},t.onAllSchemasLoaded=function(){_.trigger("allSchemasLoaded")},this.expandSchema=function(D){return t.expandSchema(D)},this.expandRefs=function(D,J){return t.expandRefs(D,J)},e=document.location.toString(),P.next=9,t.load(this.schema,s,e);case 9:o=P.sent,c=this.options.custom_validators?{custom_validators:this.options.custom_validators}:{},this.validator=new Ki(this,null,c,u.defaults),d=this.getEditorClass(o),this.root=this.createEditor(d,{jsoneditor:this,schema:o,required:!0,container:this.root_container}),this.root.preBuild(),this.root.build(),this.root.postBuild(),S(this.options,"startval")&&this.root.setValue(this.options.startval),this.validation_results=this.validator.validate(this.root.getValue()),this.root.showValidationErrors(this.validation_results),this.ready=!0,this.element.classList.remove("je-not-loaded"),this.element.classList.add("je-ready"),window.requestAnimationFrame(function(){_.ready&&(_.validation_results=_.validator.validate(_.root.getValue()),_.root.showValidationErrors(_.validation_results),_.trigger("ready"),_.trigger("change"))});case 24:case"end":return P.stop()}},a,this)}),h=function(){var a=this,s=arguments;return new Promise(function(t,e){var o=i.apply(a,s);function c(_){Hc(o,t,e,c,d,"next",_)}function d(_){Hc(o,t,e,c,d,"throw",_)}c(void 0)})},function(){return h.apply(this,arguments)})},{key:"getValue",value:function(){if(!this.ready)throw new Error("JSON Editor not ready yet. Make sure the load method is complete");return this.root.getValue()}},{key:"setValue",value:function(a){if(!this.ready)throw new Error("JSON Editor not ready yet. Make sure the load method is complete");return this.root.setValue(a),this}},{key:"validate",value:function(a){if(!this.ready)throw new Error("JSON Editor not ready yet. Make sure the load method is complete");return arguments.length===1?this.validator.validate(a):this.validation_results}},{key:"destroy",value:function(){this.destroyed||this.ready&&(this.schema=null,this.options=null,this.root.destroy(),this.root=null,this.root_container=null,this.validator=null,this.validation_results=null,this.theme=null,this.iconlib=null,this.template=null,this.__data=null,this.ready=!1,this.element.innerHTML="",this.element.removeAttribute("data-theme"),this.destroyed=!0)}},{key:"on",value:function(a,s){return this.callbacks=this.callbacks||{},this.callbacks[a]=this.callbacks[a]||[],this.callbacks[a].push(s),this}},{key:"off",value:function(a,s){if(a&&s){this.callbacks=this.callbacks||{},this.callbacks[a]=this.callbacks[a]||[];for(var t=[],e=0;e<this.callbacks[a].length;e++)this.callbacks[a][e]!==s&&t.push(this.callbacks[a][e]);this.callbacks[a]=t}else a?(this.callbacks=this.callbacks||{},this.callbacks[a]=[]):this.callbacks={};return this}},{key:"trigger",value:function(a,s){if(this.callbacks&&this.callbacks[a]&&this.callbacks[a].length)for(var t=0;t<this.callbacks[a].length;t++)this.callbacks[a][t].apply(this,[s]);return this}},{key:"setOption",value:function(a,s){if(a!=="show_errors")throw new Error("Option ".concat(a," must be set during instantiation and cannot be changed later"));return this.options.show_errors=s,this.onChange(),this}},{key:"getEditorsRules",value:function(){return Object.values(u.defaults.editors).reduce(function(a,s){return s.rules?x(a,s.rules):a},{})}},{key:"getEditorClass",value:function(a){var s,t=this;if(a=this.expandSchema(a),u.defaults.resolvers.find(function(e){return(s=e(a,t))&&u.defaults.editors[s]}),!s)throw new Error("Unknown editor for schema ".concat(JSON.stringify(a)));if(!u.defaults.editors[s])throw new Error("Unknown editor ".concat(s));return u.defaults.editors[s]}},{key:"createEditor",value:function(a,s){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;return new a(s=x({},a.options||{},s),u.defaults,t)}},{key:"onChange",value:function(){var a=this;if(this.ready&&!this.firing_change)return this.firing_change=!0,window.requestAnimationFrame(function(){a.firing_change=!1,a.ready&&(a.validation_results=a.validator.validate(a.root.getValue()),a.options.show_errors!=="never"?a.root.showValidationErrors(a.validation_results):a.root.showValidationErrors([]),a.trigger("change"))}),this}},{key:"compileTemplate",value:function(a){var s,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:u.defaults.template;if(typeof t=="string"){if(!u.defaults.templates[t])throw new Error("Unknown template engine ".concat(t));if(!(s=u.defaults.templates[t]()))throw new Error("Template engine ".concat(t," missing required library."))}else s=t;if(!s)throw new Error("No template engine set");if(!s.compile)throw new Error("Invalid template engine set");return s.compile(a)}},{key:"_data",value:function(a,s,t){if(arguments.length!==3)return a.hasAttribute("data-jsoneditor-".concat(s))?this.__data[a.getAttribute("data-jsoneditor-".concat(s))]:null;var e;a.hasAttribute("data-jsoneditor-".concat(s))?e=a.getAttribute("data-jsoneditor-".concat(s)):(e=this.uuid++,a.setAttribute("data-jsoneditor-".concat(s),e)),this.__data[e]=t}},{key:"registerEditor",value:function(a){return this.editors=this.editors||{},this.editors[a.path]=a,this}},{key:"unregisterEditor",value:function(a){return this.editors=this.editors||{},this.editors[a.path]=null,this}},{key:"getEditor",value:function(a){if(this.editors)return this.editors[a]}},{key:"watch",value:function(a,s){return this.watchlist=this.watchlist||{},this.watchlist[a]=this.watchlist[a]||[],this.watchlist[a].push(s),this}},{key:"unwatch",value:function(a,s){if(!this.watchlist||!this.watchlist[a])return this;if(!s)return this.watchlist[a]=null,this;for(var t=[],e=0;e<this.watchlist[a].length;e++)this.watchlist[a][e]!==s&&t.push(this.watchlist[a][e]);return this.watchlist[a]=t.length?t:null,this}},{key:"notifyWatchers",value:function(a){if(!this.watchlist||!this.watchlist[a])return this;for(var s=0;s<this.watchlist[a].length;s++)this.watchlist[a][s]()}},{key:"isEnabled",value:function(){return!this.root||this.root.isEnabled()}},{key:"enable",value:function(){this.root.enable()}},{key:"disable",value:function(){this.root.disable()}},{key:"setCopyClipboardContents",value:function(a){this.copyClipboard=a}},{key:"getCopyClipboardContents",value:function(){return this.copyClipboard}},{key:"addNewStyleRules",value:function(a,s){var t=document.querySelector("#theme-".concat(a));t||((t=document.createElement("style")).setAttribute("id","theme-".concat(a)),t.appendChild(document.createTextNode("")),document.head.appendChild(t));for(var e=t.sheet?t.sheet:t.styleSheet,o=this.element.nodeName.toLowerCase();e.cssRules.length>0;)e.deleteRule(0);Object.keys(s).forEach(function(c){var d=a==="default"?c:"".concat(o,'[data-theme="').concat(a,'"] ').concat(c);e.insertRule?e.insertRule(d+" {"+decodeURIComponent(s[c])+"}",0):e.addRule&&e.addRule(d,decodeURIComponent(s[c]),0)})}},{key:"addNewStyleRulesToShadowRoot",value:function(a,s,t){var e=this.element.nodeName.toLowerCase(),o="";Object.keys(s).forEach(function(_){var P=a==="default"?_:"".concat(e,'[data-theme="').concat(a,'"] ').concat(_);o+=P+" {"+decodeURIComponent(s[_])+`}
|
|
70
|
+
`});var c,d=new CSSStyleSheet;d.replaceSync(o),t.adoptedStyleSheets=[].concat(function(_){if(Array.isArray(_))return Kl(_)}(c=t.adoptedStyleSheets)||function(_){if(typeof Symbol<"u"&&_[Symbol.iterator]!=null||_["@@iterator"]!=null)return Array.from(_)}(c)||function(_,P){if(_){if(typeof _=="string")return Kl(_,P);var D=Object.prototype.toString.call(_).slice(8,-1);return D==="Object"&&_.constructor&&(D=_.constructor.name),D==="Map"||D==="Set"?Array.from(_):D==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(D)?Kl(_,P):void 0}}(c)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
71
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}(),[d])}}],f&&Cf(n.prototype,f),Object.defineProperty(n,"prototype",{writable:!1}),u}();Tn.defaults=_i,Tn.AbstractEditor=F,Tn.AbstractTheme=Sn,Tn.AbstractIconLib=Cn,Object.assign(Tn.defaults.themes,jf),Object.assign(Tn.defaults.editors,gs),Object.assign(Tn.defaults.templates,$p),Object.assign(Tn.defaults.iconlibs,hf)})(),C})())})(lc);var Da=lc.exports;const Gd=`
|
|
67
72
|
* {
|
|
68
73
|
font-family: Roboto, sans-serif;
|
|
69
74
|
}
|
|
70
|
-
`,
|
|
75
|
+
`,ll=`
|
|
71
76
|
input[type=checkbox] {
|
|
72
77
|
appearance: none;
|
|
73
78
|
-webkit-appearance: none;
|
|
@@ -90,7 +95,7 @@ input[type=checkbox]:checked:after {
|
|
|
90
95
|
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Echeckbox-marked%3C/title%3E%3Cpath d='M10,17L5,12L6.41,10.58L10,14.17L17.59,6.58L19,8M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z' /%3E%3C/svg%3E");
|
|
91
96
|
|
|
92
97
|
}
|
|
93
|
-
`,
|
|
98
|
+
`,uc=`
|
|
94
99
|
input[type=radio] {
|
|
95
100
|
appearance: none;
|
|
96
101
|
-webkit-appearance: none;
|
|
@@ -118,7 +123,7 @@ input[type=radio]:checked:after {
|
|
|
118
123
|
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Eradiobox-marked%3C/title%3E%3Cpath d='M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,7A5,5 0 0,0 7,12A5,5 0 0,0 12,17A5,5 0 0,0 17,12A5,5 0 0,0 12,7Z' /%3E%3C/svg%3E");
|
|
119
124
|
|
|
120
125
|
}
|
|
121
|
-
`,
|
|
126
|
+
`,cc=`
|
|
122
127
|
input[type="range"] {
|
|
123
128
|
-webkit-appearance: none;
|
|
124
129
|
width: 90%;
|
|
@@ -195,10 +200,10 @@ input[type="range"]:focus::-webkit-slider-thumb {
|
|
|
195
200
|
input::-moz-focus-inner, input::-moz-focus-outer {
|
|
196
201
|
border: 0;
|
|
197
202
|
}
|
|
198
|
-
`,
|
|
199
|
-
${
|
|
200
|
-
${
|
|
201
|
-
${
|
|
203
|
+
`,Wd=`
|
|
204
|
+
${ll}
|
|
205
|
+
${uc}
|
|
206
|
+
${cc}
|
|
202
207
|
|
|
203
208
|
ul {
|
|
204
209
|
padding-left: 0;
|
|
@@ -307,7 +312,7 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
307
312
|
display: block;
|
|
308
313
|
margin: 0.5rem 0;
|
|
309
314
|
}
|
|
310
|
-
`;function Cc(w){return!(w===null||typeof w!="object"||w.nodeType||w===w.window||w.constructor&&!Io(w.constructor.prototype,"isPrototypeOf"))}function Sc(w){return Cc(w)?ga({},w):Array.isArray(w)?w.map(Sc):w}function ga(w,...h){return h.forEach(f=>{f&&Object.keys(f).forEach(v=>{f[v]&&Cc(f[v])?(Io(w,v)||(w[v]={}),ga(w[v],f[v])):Array.isArray(f[v])?w[v]=Sc(f[v]):w[v]=f[v]})}),w}function Io(w,h){return w&&Object.prototype.hasOwnProperty.call(w,h)}class ah{constructor(h,f){this.defaults=f,this.jsoneditor=h.jsoneditor,this.theme=this.jsoneditor.theme,this.template_engine=this.jsoneditor.template,this.iconlib=this.jsoneditor.iconlib,this.translate=this.jsoneditor.translate||this.defaults.translate,this.translateProperty=this.jsoneditor.translateProperty||this.defaults.translateProperty,this.original_schema=h.schema,this.schema=this.jsoneditor.expandSchema(this.original_schema),this.active=!0,this.options=ga({},this.options||{},this.schema.options||{},h.schema.options||{},h),this.formname=this.jsoneditor.options.form_name_root||"root",!h.path&&!this.schema.id&&(this.schema.id=this.formname),this.path=h.path||this.formname,this.formname=h.formname||this.path.replace(/\.([^.]+)/g,"[$1]"),this.parent=h.parent,this.key=this.parent!==void 0?this.path.split(".").slice(this.parent.path.split(".").length).join("."):this.path,this.link_watchers=[],this.watchLoop=!1,h.container&&this.setContainer(h.container),this.registerDependencies()}onChildEditorChange(h){this.onChange(!0)}notify(){this.path&&this.jsoneditor.notifyWatchers(this.path)}change(){this.parent?this.parent.onChildEditorChange(this):this.jsoneditor&&this.jsoneditor.onChange()}onChange(h){this.notify(),this.watch_listener&&this.watch_listener(),h&&this.change()}register(){this.jsoneditor.registerEditor(this),this.onChange()}unregister(){this.jsoneditor&&this.jsoneditor.unregisterEditor(this)}getNumColumns(){return 12}isActive(){return this.active}activate(){this.active=!0,this.optInCheckbox.checked=!0,this.enable(),this.change()}deactivate(){this.isRequired()||(this.active=!1,this.optInCheckbox.checked=!1,this.disable(),this.change())}registerDependencies(){this.dependenciesFulfilled=!0;const h=this.options.dependencies;h&&Object.keys(h).forEach(f=>{let v;f.startsWith(this.jsoneditor.root.path)?v=f:(v=this.path.split("."),v[v.length-1]=f,v=v.join(".")),this.jsoneditor.watch(v,()=>{this.evaluateDependencies()})})}evaluateDependencies(){const h=this.container||this.control;if(!h||this.jsoneditor===null)return;const f=this.options.dependencies;if(!f)return;const v=this.dependenciesFulfilled;this.dependenciesFulfilled=!0,Object.keys(f).forEach(S=>{let m;S.startsWith(this.jsoneditor.root.path)?m=S:(m=this.path.split("."),m[m.length-1]=S,m=m.join("."));const r=f[S];this.checkDependency(m,r)}),this.dependenciesFulfilled!==v&&this.notify();let k=this.dependenciesFulfilled?"block":"none";this.options.hidden&&(k="none"),h.tagName==="TD"?Object.keys(h.childNodes).forEach(S=>h.childNodes[S].style.display=k):h.style.display=k}checkDependency(h,f){if(this.path===h||this.jsoneditor===null)return;const v=this.jsoneditor.getEditor(h),k=v?v.getValue():void 0;!v||!v.dependenciesFulfilled?this.dependenciesFulfilled=!1:Array.isArray(f)?this.dependenciesFulfilled=f.some(S=>{if(JSON.stringify(k)===JSON.stringify(S))return!0}):typeof f=="object"?typeof k!="object"?this.dependenciesFulfilled=f===k:Object.keys(f).some(S=>{if(!Io(f,S))return!1;if(!Io(k,S)||f[S]!==k[S])return this.dependenciesFulfilled=!1,!0}):typeof f=="string"||typeof f=="number"?this.dependenciesFulfilled=this.dependenciesFulfilled&&k===f:typeof f=="boolean"&&(f?this.dependenciesFulfilled=this.dependenciesFulfilled&&(k||k.length>0):this.dependenciesFulfilled=this.dependenciesFulfilled&&(!k||k.length===0))}setContainer(h){this.container=h,this.setContainerAttributes(),this.schema.id&&this.container.setAttribute("data-schemaid",this.schema.id),this.schema.type&&typeof this.schema.type=="string"&&this.container.setAttribute("data-schematype",this.schema.type),this.container.setAttribute("data-schemapath",this.path)}setOptInCheckbox(h){this.optInCheckbox=document.createElement("input"),this.optInCheckbox.setAttribute("type","checkbox"),this.optInCheckbox.setAttribute("style","margin: 0 10px 0 0;"),this.optInCheckbox.classList.add("json-editor-opt-in"),this.optInCheckbox.addEventListener("click",()=>{this.isActive()?this.deactivate():this.activate()});const f=this.jsoneditor.options.show_opt_in,v=typeof this.parent.options.show_opt_in<"u",k=v&&this.parent.options.show_opt_in===!0,S=v&&this.parent.options.show_opt_in===!1;(k||!S&&f||!v&&f)&&this.parent&&this.parent.schema.type==="object"&&!this.isRequired()&&this.header&&(this.header.appendChild(this.optInCheckbox),this.header.insertBefore(this.optInCheckbox,this.header.firstChild))}preBuild(){}build(){}postBuild(){this.setupWatchListeners(),this.addLinks(),this.register(),this.setValue(this.getDefault(),!0),this.updateHeaderText(),this.onWatchedFieldChange()}setupWatchListeners(){if(this.watched={},this.schema.vars&&(this.schema.watch=this.schema.vars),this.watched_values={},this.watch_listener=()=>{this.refreshWatchedFieldValues()&&this.onWatchedFieldChange()},Io(this.schema,"watch")){let h,f,v,k,S;const m=this.container.getAttribute("data-schemapath");Object.keys(this.schema.watch).forEach(j=>{if(h=this.schema.watch[j],Array.isArray(h)){if(h.length<2)return;f=[h[0]].concat(h[1].split("."))}else f=h.split("."),this.theme.closest(this.container,`[data-schemaid="${f[0]}"]`)||f.unshift("#");if(v=f.shift(),v==="#"&&(v=this.jsoneditor.schema.id||this.jsoneditor.root.formname),k=this.theme.closest(this.container,`[data-schemaid="${v}"]`),!k)throw new Error(`Could not find ancestor node with id ${v}`);S=`${k.getAttribute("data-schemapath")}.${f.join(".")}`,m.startsWith(S)&&(this.watchLoop=!0),this.jsoneditor.watch(S,this.watch_listener),this.watched[j]=S})}this.schema.headerTemplate&&(this.header_template=this.jsoneditor.compileTemplate(this.schema.headerTemplate,this.template_engine))}addLinks(){if(!this.no_link_holder&&(this.link_holder=this.theme.getLinksHolder(),typeof this.description<"u"?this.description.parentNode.insertBefore(this.link_holder,this.description):this.container.appendChild(this.link_holder),this.schema.links))for(let h=0;h<this.schema.links.length;h++)this.addLink(this.getLink(this.schema.links[h]))}onMove(){}getButton(h,f,v,k=[]){const S=`json-editor-btn-${f}`;this.iconlib?f=this.iconlib.getIcon(f):f=null,h=this.translate(h,k),v=this.translate(v,k),!f&&v&&(h=v,v=null);const m=this.theme.getButton(h,f,v);return m.classList.add(S),m}setButtonText(h,f,v,k,S=[]){return this.iconlib?v=this.iconlib.getIcon(v):v=null,f=this.translate(f,S),k=this.translate(k,S),!v&&k&&(f=k,k=null),this.theme.setButtonText(h,f,v,k)}addLink(h){this.link_holder&&this.link_holder.appendChild(h)}getLink(h){let f,v;const S=(h.mediaType||"application/javascript").split("/")[0],m=this.jsoneditor.compileTemplate(h.href,this.template_engine),j=this.jsoneditor.compileTemplate(h.rel?h.rel:h.href,this.template_engine);let r=null;if(h.download&&(r=h.download),r&&r!==!0&&(r=this.jsoneditor.compileTemplate(r,this.template_engine)),S==="image"){f=this.theme.getBlockLinkHolder(),v=document.createElement("a"),v.setAttribute("target","_blank");const y=document.createElement("img");this.theme.createImageLink(f,v,y),this.link_watchers.push(b=>{const g=m(b),x=j(b);v.setAttribute("href",g),v.setAttribute("title",x||g),y.setAttribute("src",g)})}else if(["audio","video"].includes(S)){f=this.theme.getBlockLinkHolder(),v=this.theme.getBlockLink(),v.setAttribute("target","_blank");const y=document.createElement(S);y.setAttribute("controls","controls"),this.theme.createMediaLink(f,v,y),this.link_watchers.push(b=>{const g=m(b),x=j(b);v.setAttribute("href",g),v.textContent=x||g,y.setAttribute("src",g)})}else v=f=this.theme.getBlockLink(),f.setAttribute("target","_blank"),f.textContent=h.rel,f.style.display="none",this.link_watchers.push(y=>{const b=m(y),g=j(y);b&&(f.style.display=""),f.setAttribute("href",b),f.textContent=g||b});return r&&v&&(r===!0?v.setAttribute("download",""):this.link_watchers.push(y=>{v.setAttribute("download",r(y))})),h.class&&v.classList.add(h.class),f}refreshWatchedFieldValues(){if(!this.watched_values)return;const h={};let f=!1;return this.watched&&Object.keys(this.watched).forEach(v=>{const k=this.jsoneditor.getEditor(this.watched[v]),S=k?k.getValue():null;this.watched_values[v]!==S&&(f=!0),h[v]=S}),h.self=this.getValue(),this.watched_values.self!==h.self&&(f=!0),this.watched_values=h,f}getWatchedFieldValues(){return this.watched_values}updateHeaderText(){if(this.header){const h=this.getHeaderText();if(this.header.children.length){for(let f=0;f<this.header.childNodes.length;f++)if(this.header.childNodes[f].nodeType===3){this.header.childNodes[f].nodeValue=this.cleanText(h);break}}else window.DOMPurify?this.header.innerHTML=window.DOMPurify.sanitize(h):this.header.textContent=this.cleanText(h)}}getHeaderText(h){return this.header_text?this.header_text:h?this.translateProperty(this.schema.title):this.getTitle()}getPathDepth(){return this.path.split(".").length}cleanText(h){const f=document.createElement("div");return f.innerHTML=h,f.textContent||f.innerText}onWatchedFieldChange(){let h;if(this.header_template){h=ga(this.getWatchedFieldValues(),{key:this.key,i:this.key,i0:this.key*1,i1:this.key*1+1,title:this.getTitle()});const f=this.header_template(h);f!==this.header_text&&(this.header_text=f,this.updateHeaderText(),this.notify())}if(this.link_watchers.length){h=this.getWatchedFieldValues();for(let f=0;f<this.link_watchers.length;f++)this.link_watchers[f](h)}}setValue(h){this.value=h}getValue(){if(this.dependenciesFulfilled)return this.value}refreshValue(){}getChildEditors(){return!1}destroy(){this.unregister(this),this.watched&&Object.values(this.watched).forEach(h=>this.jsoneditor.unwatch(h,this.watch_listener)),this.watched=null,this.watched_values=null,this.watch_listener=null,this.header_text=null,this.header_template=null,this.value=null,this.container&&this.container.parentNode&&this.container.parentNode.removeChild(this.container),this.container=null,this.jsoneditor=null,this.schema=null,this.path=null,this.key=null,this.parent=null}isDefaultRequired(){return this.isRequired()||!!this.jsoneditor.options.use_default_values}getDefault(){if(typeof this.schema.default<"u")return this.schema.default;if(typeof this.schema.enum<"u")return this.schema.enum[0];let h=this.schema.type||this.schema.oneOf;if(h&&Array.isArray(h)&&(h=h[0]),h&&typeof h=="object"&&(h=h.type),h&&Array.isArray(h)&&(h=h[0]),typeof h=="string"){if(h==="number")return this.isDefaultRequired()?0:void 0;if(h==="boolean")return this.isDefaultRequired()?!1:void 0;if(h==="integer")return this.isDefaultRequired()?0:void 0;if(h==="string")return this.isDefaultRequired()?"":void 0;if(h==="null")return null;if(h==="object")return{};if(h==="array")return[]}}getTitle(){return this.translateProperty(this.schema.title||this.key)}enable(){this.disabled=!1}disable(){this.disabled=!0}isEnabled(){return!this.disabled}isRequired(){return typeof this.schema.required=="boolean"?this.schema.required:this.parent&&this.parent.schema&&Array.isArray(this.parent.schema.required)?this.parent.schema.required.includes(this.key):!!this.jsoneditor.options.required_by_default}getDisplayText(h){const f=[],v={};h.forEach(S=>{S.title&&(v[S.title]=v[S.title]||0,v[S.title]++),S.description&&(v[S.description]=v[S.description]||0,v[S.description]++),S.format&&(v[S.format]=v[S.format]||0,v[S.format]++),S.type&&(v[S.type]=v[S.type]||0,v[S.type]++)}),h.forEach(S=>{let m;typeof S=="string"?m=S:S.title&&v[S.title]<=1?m=S.title:S.format&&v[S.format]<=1?m=S.format:S.type&&v[S.type]<=1?m=S.type:S.description&&v[S.description]<=1?m=S.description:S.title?m=S.title:S.format?m=S.format:S.type?m=S.type:S.description?m=S.description:JSON.stringify(S).length<500?m=JSON.stringify(S):m="type",f.push(m)});const k={};return f.forEach((S,m)=>{k[S]=k[S]||0,k[S]++,v[S]>1&&(f[m]=`${S} ${k[S]}`)}),f}getValidId(h){return h=h===void 0?"":h.toString(),h.replace(/\s+/g,"-")}setInputAttributes(h){if(this.schema.options&&this.schema.options.inputAttributes){const f=this.schema.options.inputAttributes,v=["name","type"].concat(h);Object.keys(f).forEach(k=>{v.includes(k.toLowerCase())||this.input.setAttribute(k,f[k])})}}setContainerAttributes(){if(this.schema.options&&this.schema.options.containerAttributes){const h=this.schema.options.containerAttributes,f=["data-schemapath","data-schematype","data-schemaid"];Object.keys(h).forEach(v=>{f.includes(v.toLowerCase())||this.container.setAttribute(v,h[v])})}}expandCallbacks(h,f){const v=this.defaults.callbacks[h];return Object.entries(f).forEach(([k,S])=>{S===Object(S)?f[k]=this.expandCallbacks(h,S):typeof S=="string"&&typeof v=="object"&&typeof v[S]=="function"&&(f[k]=v[S].bind(null,this))}),f}showValidationErrors(h){}}(()=>{var w=S=>S==null?!1:typeof S=="boolean"?S:S.trim().toLowerCase()==="true";window.tcRangeSliderPlugins=window.tcRangeSliderPlugins||[];var h="min-label",f="max-label",v="#1E293B",k=()=>{let S=null,m=null,j=null,r,y=!1,b=v,g="",x,O=null,E=null,C=null,T=[],L=()=>{var q;let F=(q=S==null?void 0:S.shadowRoot)==null?void 0:q.querySelector(".range-slider-box");O=document.createElement("div"),O.classList.add("labels-row"),F.prepend(O)},R=q=>{let F=document.createElement("label");return F.className=q,F.setAttribute("for","range-slider"),F},I=()=>{E=R(h),E.textContent=N(j==null?void 0:j.getTextMin(),g),C=R(f),C.textContent=N(j==null?void 0:j.getTextMax(),g),m==null||m.before(E),m==null||m.after(C);let q=j==null?void 0:j.getValues();if(q)for(let F=0;F<q.length;F++){let X=R(`value${F+1}-label generated-label`);X.textContent=N(q[F],g),T.push(X),O==null||O.append(X)}},$=()=>{for(let q of T)!q||q.remove();E==null||E.remove(),C==null||C.remove(),O==null||O.remove(),T=[]},M=q=>{y=q,y?(L(),I()):$()},B=q=>{b=q;for(let F of T)!F||(F.style.color=b??v);E&&(E.style.color=b??v),C&&(C.style.color=b??v)},U=q=>{g=q,r&&r()},H=()=>{!j||!O||O.classList.toggle("is-reversed",j.isRightToLeft()||j.isBottomToTop())},N=(q,F)=>{let X=`${(q??"").toString()}${F}`;return x&&typeof x=="function"?x(q):X};return{get name(){return"Generated Labels"},init:(q,F,X,Y)=>{var Q,tt,it;S=q,j=Y,m=(Q=q.shadowRoot)==null?void 0:Q.getElementById("range-slider"),r=F,b=(tt=S.getAttribute("generate-labels-text-color"))!=null?tt:v,g=(it=S.getAttribute("generate-labels-units"))!=null?it:"",M(w(S.getAttribute("generate-labels"))),H(),B(b)},update:q=>{if(!(!y||!q.values)){H();for(let F=0;F<q.values.length;F++){let X=q.values[F],Y=T[F];if(X===void 0&&Y){Y.remove(),T[F]=void 0;continue}if(X!==void 0&&!Y){let Q=R(`value${F+1}-label generated-label`);if(Q.textContent=N(X,g),T[F]=Q,q.values.length<=0)O==null||O.append(Q);else if(F===0)O==null||O.append(Q);else{let tt=T[F-1];tt==null||tt.after(Q)}continue}!Y||(Y.textContent=N(X,g))}E&&(E.textContent=N(q.textMin,g)),C&&(C.textContent=N(q.textMax,g)),B(b)}},onAttrChange:(q,F)=>{q==="generate-labels"&&M(w(F)),q==="generate-labels-text-color"&&B(F),q==="generate-labels-units"&&U(F)},gettersAndSetters:[{name:"generateLabels",attributes:{get(){return y??!1},set:q=>{M(w(q))}}},{name:"textColor",attributes:{get(){return b??""},set:q=>{B(q)}}},{name:"generateLabelsTextColor",attributes:{get(){return b??""},set:q=>{B(q)}}},{name:"units",attributes:{get(){return g??""},set:q=>{U(q)}}},{name:"generateLabelsUnits",attributes:{get(){return g??""},set:q=>{U(q)}}},{name:"generateLabelsFormat",attributes:{get(){return x},set:q=>{x=q,r&&r()}}}],css:`
|
|
315
|
+
`;function hc(y){return!(y===null||typeof y!="object"||y.nodeType||y===y.window||y.constructor&&!Jo(y.constructor.prototype,"isPrototypeOf"))}function dc(y){return hc(y)?Na({},y):Array.isArray(y)?y.map(dc):y}function Na(y,...l){return l.forEach(p=>{p&&Object.keys(p).forEach(v=>{p[v]&&hc(p[v])?(Jo(y,v)||(y[v]={}),Na(y[v],p[v])):Array.isArray(p[v])?y[v]=dc(p[v]):y[v]=p[v]})}),y}function Jo(y,l){return y&&Object.prototype.hasOwnProperty.call(y,l)}class Zd{constructor(l,p){this.defaults=p,this.jsoneditor=l.jsoneditor,this.theme=this.jsoneditor.theme,this.template_engine=this.jsoneditor.template,this.iconlib=this.jsoneditor.iconlib,this.translate=this.jsoneditor.translate||this.defaults.translate,this.translateProperty=this.jsoneditor.translateProperty||this.defaults.translateProperty,this.original_schema=l.schema,this.schema=this.jsoneditor.expandSchema(this.original_schema),this.active=!0,this.options=Na({},this.options||{},this.schema.options||{},l.schema.options||{},l),this.formname=this.jsoneditor.options.form_name_root||"root",!l.path&&!this.schema.id&&(this.schema.id=this.formname),this.path=l.path||this.formname,this.formname=l.formname||this.path.replace(/\.([^.]+)/g,"[$1]"),this.parent=l.parent,this.key=this.parent!==void 0?this.path.split(".").slice(this.parent.path.split(".").length).join("."):this.path,this.link_watchers=[],this.watchLoop=!1,l.container&&this.setContainer(l.container),this.registerDependencies()}onChildEditorChange(l){this.onChange(!0)}notify(){this.path&&this.jsoneditor.notifyWatchers(this.path)}change(){this.parent?this.parent.onChildEditorChange(this):this.jsoneditor&&this.jsoneditor.onChange()}onChange(l){this.notify(),this.watch_listener&&this.watch_listener(),l&&this.change()}register(){this.jsoneditor.registerEditor(this),this.onChange()}unregister(){this.jsoneditor&&this.jsoneditor.unregisterEditor(this)}getNumColumns(){return 12}isActive(){return this.active}activate(){this.active=!0,this.optInCheckbox.checked=!0,this.enable(),this.change()}deactivate(){this.isRequired()||(this.active=!1,this.optInCheckbox.checked=!1,this.disable(),this.change())}registerDependencies(){this.dependenciesFulfilled=!0;const l=this.options.dependencies;l&&Object.keys(l).forEach(p=>{let v;p.startsWith(this.jsoneditor.root.path)?v=p:(v=this.path.split("."),v[v.length-1]=p,v=v.join(".")),this.jsoneditor.watch(v,()=>{this.evaluateDependencies()})})}evaluateDependencies(){const l=this.container||this.control;if(!l||this.jsoneditor===null)return;const p=this.options.dependencies;if(!p)return;const v=this.dependenciesFulfilled;this.dependenciesFulfilled=!0,Object.keys(p).forEach(C=>{let m;C.startsWith(this.jsoneditor.root.path)?m=C:(m=this.path.split("."),m[m.length-1]=C,m=m.join("."));const r=p[C];this.checkDependency(m,r)}),this.dependenciesFulfilled!==v&&this.notify();let k=this.dependenciesFulfilled?"block":"none";this.options.hidden&&(k="none"),l.tagName==="TD"?Object.keys(l.childNodes).forEach(C=>l.childNodes[C].style.display=k):l.style.display=k}checkDependency(l,p){if(this.path===l||this.jsoneditor===null)return;const v=this.jsoneditor.getEditor(l),k=v?v.getValue():void 0;!v||!v.dependenciesFulfilled?this.dependenciesFulfilled=!1:Array.isArray(p)?this.dependenciesFulfilled=p.some(C=>{if(JSON.stringify(k)===JSON.stringify(C))return!0}):typeof p=="object"?typeof k!="object"?this.dependenciesFulfilled=p===k:Object.keys(p).some(C=>{if(!Jo(p,C))return!1;if(!Jo(k,C)||p[C]!==k[C])return this.dependenciesFulfilled=!1,!0}):typeof p=="string"||typeof p=="number"?this.dependenciesFulfilled=this.dependenciesFulfilled&&k===p:typeof p=="boolean"&&(p?this.dependenciesFulfilled=this.dependenciesFulfilled&&(k||k.length>0):this.dependenciesFulfilled=this.dependenciesFulfilled&&(!k||k.length===0))}setContainer(l){this.container=l,this.setContainerAttributes(),this.schema.id&&this.container.setAttribute("data-schemaid",this.schema.id),this.schema.type&&typeof this.schema.type=="string"&&this.container.setAttribute("data-schematype",this.schema.type),this.container.setAttribute("data-schemapath",this.path)}setOptInCheckbox(l){this.optInCheckbox=document.createElement("input"),this.optInCheckbox.setAttribute("type","checkbox"),this.optInCheckbox.setAttribute("style","margin: 0 10px 0 0;"),this.optInCheckbox.classList.add("json-editor-opt-in"),this.optInCheckbox.addEventListener("click",()=>{this.isActive()?this.deactivate():this.activate()});const p=this.jsoneditor.options.show_opt_in,v=typeof this.parent.options.show_opt_in<"u",k=v&&this.parent.options.show_opt_in===!0,C=v&&this.parent.options.show_opt_in===!1;(k||!C&&p||!v&&p)&&this.parent&&this.parent.schema.type==="object"&&!this.isRequired()&&this.header&&(this.header.appendChild(this.optInCheckbox),this.header.insertBefore(this.optInCheckbox,this.header.firstChild))}preBuild(){}build(){}postBuild(){this.setupWatchListeners(),this.addLinks(),this.register(),this.setValue(this.getDefault(),!0),this.updateHeaderText(),this.onWatchedFieldChange()}setupWatchListeners(){if(this.watched={},this.schema.vars&&(this.schema.watch=this.schema.vars),this.watched_values={},this.watch_listener=()=>{this.refreshWatchedFieldValues()&&this.onWatchedFieldChange()},Jo(this.schema,"watch")){let l,p,v,k,C;const m=this.container.getAttribute("data-schemapath");Object.keys(this.schema.watch).forEach(O=>{if(l=this.schema.watch[O],Array.isArray(l)){if(l.length<2)return;p=[l[0]].concat(l[1].split("."))}else p=l.split("."),this.theme.closest(this.container,`[data-schemaid="${p[0]}"]`)||p.unshift("#");if(v=p.shift(),v==="#"&&(v=this.jsoneditor.schema.id||this.jsoneditor.root.formname),k=this.theme.closest(this.container,`[data-schemaid="${v}"]`),!k)throw new Error(`Could not find ancestor node with id ${v}`);C=`${k.getAttribute("data-schemapath")}.${p.join(".")}`,m.startsWith(C)&&(this.watchLoop=!0),this.jsoneditor.watch(C,this.watch_listener),this.watched[O]=C})}this.schema.headerTemplate&&(this.header_template=this.jsoneditor.compileTemplate(this.schema.headerTemplate,this.template_engine))}addLinks(){if(!this.no_link_holder&&(this.link_holder=this.theme.getLinksHolder(),typeof this.description<"u"?this.description.parentNode.insertBefore(this.link_holder,this.description):this.container.appendChild(this.link_holder),this.schema.links))for(let l=0;l<this.schema.links.length;l++)this.addLink(this.getLink(this.schema.links[l]))}onMove(){}getButton(l,p,v,k=[]){const C=`json-editor-btn-${p}`;this.iconlib?p=this.iconlib.getIcon(p):p=null,l=this.translate(l,k),v=this.translate(v,k),!p&&v&&(l=v,v=null);const m=this.theme.getButton(l,p,v);return m.classList.add(C),m}setButtonText(l,p,v,k,C=[]){return this.iconlib?v=this.iconlib.getIcon(v):v=null,p=this.translate(p,C),k=this.translate(k,C),!v&&k&&(p=k,k=null),this.theme.setButtonText(l,p,v,k)}addLink(l){this.link_holder&&this.link_holder.appendChild(l)}getLink(l){let p,v;const C=(l.mediaType||"application/javascript").split("/")[0],m=this.jsoneditor.compileTemplate(l.href,this.template_engine),O=this.jsoneditor.compileTemplate(l.rel?l.rel:l.href,this.template_engine);let r=null;if(l.download&&(r=l.download),r&&r!==!0&&(r=this.jsoneditor.compileTemplate(r,this.template_engine)),C==="image"){p=this.theme.getBlockLinkHolder(),v=document.createElement("a"),v.setAttribute("target","_blank");const b=document.createElement("img");this.theme.createImageLink(p,v,b),this.link_watchers.push(g=>{const w=m(g),x=O(g);v.setAttribute("href",w),v.setAttribute("title",x||w),b.setAttribute("src",w)})}else if(["audio","video"].includes(C)){p=this.theme.getBlockLinkHolder(),v=this.theme.getBlockLink(),v.setAttribute("target","_blank");const b=document.createElement(C);b.setAttribute("controls","controls"),this.theme.createMediaLink(p,v,b),this.link_watchers.push(g=>{const w=m(g),x=O(g);v.setAttribute("href",w),v.textContent=x||w,b.setAttribute("src",w)})}else v=p=this.theme.getBlockLink(),p.setAttribute("target","_blank"),p.textContent=l.rel,p.style.display="none",this.link_watchers.push(b=>{const g=m(b),w=O(b);g&&(p.style.display=""),p.setAttribute("href",g),p.textContent=w||g});return r&&v&&(r===!0?v.setAttribute("download",""):this.link_watchers.push(b=>{v.setAttribute("download",r(b))})),l.class&&v.classList.add(l.class),p}refreshWatchedFieldValues(){if(!this.watched_values)return;const l={};let p=!1;return this.watched&&Object.keys(this.watched).forEach(v=>{const k=this.jsoneditor.getEditor(this.watched[v]),C=k?k.getValue():null;this.watched_values[v]!==C&&(p=!0),l[v]=C}),l.self=this.getValue(),this.watched_values.self!==l.self&&(p=!0),this.watched_values=l,p}getWatchedFieldValues(){return this.watched_values}updateHeaderText(){if(this.header){const l=this.getHeaderText();if(this.header.children.length){for(let p=0;p<this.header.childNodes.length;p++)if(this.header.childNodes[p].nodeType===3){this.header.childNodes[p].nodeValue=this.cleanText(l);break}}else window.DOMPurify?this.header.innerHTML=window.DOMPurify.sanitize(l):this.header.textContent=this.cleanText(l)}}getHeaderText(l){return this.header_text?this.header_text:l?this.translateProperty(this.schema.title):this.getTitle()}getPathDepth(){return this.path.split(".").length}cleanText(l){const p=document.createElement("div");return p.innerHTML=l,p.textContent||p.innerText}onWatchedFieldChange(){let l;if(this.header_template){l=Na(this.getWatchedFieldValues(),{key:this.key,i:this.key,i0:this.key*1,i1:this.key*1+1,title:this.getTitle()});const p=this.header_template(l);p!==this.header_text&&(this.header_text=p,this.updateHeaderText(),this.notify())}if(this.link_watchers.length){l=this.getWatchedFieldValues();for(let p=0;p<this.link_watchers.length;p++)this.link_watchers[p](l)}}setValue(l){this.value=l}getValue(){if(this.dependenciesFulfilled)return this.value}refreshValue(){}getChildEditors(){return!1}destroy(){this.unregister(this),this.watched&&Object.values(this.watched).forEach(l=>this.jsoneditor.unwatch(l,this.watch_listener)),this.watched=null,this.watched_values=null,this.watch_listener=null,this.header_text=null,this.header_template=null,this.value=null,this.container&&this.container.parentNode&&this.container.parentNode.removeChild(this.container),this.container=null,this.jsoneditor=null,this.schema=null,this.path=null,this.key=null,this.parent=null}isDefaultRequired(){return this.isRequired()||!!this.jsoneditor.options.use_default_values}getDefault(){if(typeof this.schema.default<"u")return this.schema.default;if(typeof this.schema.enum<"u")return this.schema.enum[0];let l=this.schema.type||this.schema.oneOf;if(l&&Array.isArray(l)&&(l=l[0]),l&&typeof l=="object"&&(l=l.type),l&&Array.isArray(l)&&(l=l[0]),typeof l=="string"){if(l==="number")return this.isDefaultRequired()?0:void 0;if(l==="boolean")return this.isDefaultRequired()?!1:void 0;if(l==="integer")return this.isDefaultRequired()?0:void 0;if(l==="string")return this.isDefaultRequired()?"":void 0;if(l==="null")return null;if(l==="object")return{};if(l==="array")return[]}}getTitle(){return this.translateProperty(this.schema.title||this.key)}enable(){this.disabled=!1}disable(){this.disabled=!0}isEnabled(){return!this.disabled}isRequired(){return typeof this.schema.required=="boolean"?this.schema.required:this.parent&&this.parent.schema&&Array.isArray(this.parent.schema.required)?this.parent.schema.required.includes(this.key):!!this.jsoneditor.options.required_by_default}getDisplayText(l){const p=[],v={};l.forEach(C=>{C.title&&(v[C.title]=v[C.title]||0,v[C.title]++),C.description&&(v[C.description]=v[C.description]||0,v[C.description]++),C.format&&(v[C.format]=v[C.format]||0,v[C.format]++),C.type&&(v[C.type]=v[C.type]||0,v[C.type]++)}),l.forEach(C=>{let m;typeof C=="string"?m=C:C.title&&v[C.title]<=1?m=C.title:C.format&&v[C.format]<=1?m=C.format:C.type&&v[C.type]<=1?m=C.type:C.description&&v[C.description]<=1?m=C.description:C.title?m=C.title:C.format?m=C.format:C.type?m=C.type:C.description?m=C.description:JSON.stringify(C).length<500?m=JSON.stringify(C):m="type",p.push(m)});const k={};return p.forEach((C,m)=>{k[C]=k[C]||0,k[C]++,v[C]>1&&(p[m]=`${C} ${k[C]}`)}),p}getValidId(l){return l=l===void 0?"":l.toString(),l.replace(/\s+/g,"-")}setInputAttributes(l){if(this.schema.options&&this.schema.options.inputAttributes){const p=this.schema.options.inputAttributes,v=["name","type"].concat(l);Object.keys(p).forEach(k=>{v.includes(k.toLowerCase())||this.input.setAttribute(k,p[k])})}}setContainerAttributes(){if(this.schema.options&&this.schema.options.containerAttributes){const l=this.schema.options.containerAttributes,p=["data-schemapath","data-schematype","data-schemaid"];Object.keys(l).forEach(v=>{p.includes(v.toLowerCase())||this.container.setAttribute(v,l[v])})}}expandCallbacks(l,p){const v=this.defaults.callbacks[l];return Object.entries(p).forEach(([k,C])=>{C===Object(C)?p[k]=this.expandCallbacks(l,C):typeof C=="string"&&typeof v=="object"&&typeof v[C]=="function"&&(p[k]=v[C].bind(null,this))}),p}showValidationErrors(l){}}(()=>{var y=C=>C==null?!1:typeof C=="boolean"?C:C.trim().toLowerCase()==="true";window.tcRangeSliderPlugins=window.tcRangeSliderPlugins||[];var l="min-label",p="max-label",v="#1E293B",k=()=>{let C=null,m=null,O=null,r,b=!1,g=v,w="",x,j=null,E=null,S=null,T=[],A=()=>{var U;let H=(U=C==null?void 0:C.shadowRoot)==null?void 0:U.querySelector(".range-slider-box");j=document.createElement("div"),j.classList.add("labels-row"),H.prepend(j)},R=U=>{let H=document.createElement("label");return H.className=U,H.setAttribute("for","range-slider"),H},I=()=>{E=R(l),E.textContent=N(O==null?void 0:O.getTextMin(),w),S=R(p),S.textContent=N(O==null?void 0:O.getTextMax(),w),m==null||m.before(E),m==null||m.after(S);let U=O==null?void 0:O.getValues();if(U)for(let H=0;H<U.length;H++){let X=R(`value${H+1}-label generated-label`);X.textContent=N(U[H],w),T.push(X),j==null||j.append(X)}},$=()=>{for(let U of T)!U||U.remove();E==null||E.remove(),S==null||S.remove(),j==null||j.remove(),T=[]},M=U=>{b=U,b?(A(),I()):$()},B=U=>{g=U;for(let H of T)!H||(H.style.color=g??v);E&&(E.style.color=g??v),S&&(S.style.color=g??v)},q=U=>{w=U,r&&r()},F=()=>{!O||!j||j.classList.toggle("is-reversed",O.isRightToLeft()||O.isBottomToTop())},N=(U,H)=>{let X=`${(U??"").toString()}${H}`;return x&&typeof x=="function"?x(U):X};return{get name(){return"Generated Labels"},init:(U,H,X,Y)=>{var Q,tt,it;C=U,O=Y,m=(Q=U.shadowRoot)==null?void 0:Q.getElementById("range-slider"),r=H,g=(tt=C.getAttribute("generate-labels-text-color"))!=null?tt:v,w=(it=C.getAttribute("generate-labels-units"))!=null?it:"",M(y(C.getAttribute("generate-labels"))),F(),B(g)},update:U=>{if(!(!b||!U.values)){F();for(let H=0;H<U.values.length;H++){let X=U.values[H],Y=T[H];if(X===void 0&&Y){Y.remove(),T[H]=void 0;continue}if(X!==void 0&&!Y){let Q=R(`value${H+1}-label generated-label`);if(Q.textContent=N(X,w),T[H]=Q,U.values.length<=0)j==null||j.append(Q);else if(H===0)j==null||j.append(Q);else{let tt=T[H-1];tt==null||tt.after(Q)}continue}!Y||(Y.textContent=N(X,w))}E&&(E.textContent=N(U.textMin,w)),S&&(S.textContent=N(U.textMax,w)),B(g)}},onAttrChange:(U,H)=>{U==="generate-labels"&&M(y(H)),U==="generate-labels-text-color"&&B(H),U==="generate-labels-units"&&q(H)},gettersAndSetters:[{name:"generateLabels",attributes:{get(){return b??!1},set:U=>{M(y(U))}}},{name:"textColor",attributes:{get(){return g??""},set:U=>{B(U)}}},{name:"generateLabelsTextColor",attributes:{get(){return g??""},set:U=>{B(U)}}},{name:"units",attributes:{get(){return w??""},set:U=>{q(U)}}},{name:"generateLabelsUnits",attributes:{get(){return w??""},set:U=>{q(U)}}},{name:"generateLabelsFormat",attributes:{get(){return x},set:U=>{x=U,r&&r()}}}],css:`
|
|
311
316
|
.labels-row{
|
|
312
317
|
text-align: center;
|
|
313
318
|
display: flex;
|
|
@@ -349,24 +354,24 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
349
354
|
margin: 0 0.5rem;
|
|
350
355
|
white-space: nowrap;
|
|
351
356
|
}
|
|
352
|
-
`,destroy:$}};window.tcRangeSliderPlugins.push(k)})(),(()=>{var w=Object.defineProperty,h=Math.pow,f=(A,z,rt)=>z in A?w(A,z,{enumerable:!0,configurable:!0,writable:!0,value:rt}):A[z]=rt,v=(A,z,rt)=>(f(A,typeof z!="symbol"?z+"":z,rt),rt),k=(A,z)=>` ${z&&z.length>0?z.map(rt=>`<link rel="stylesheet" href="${rt}" />`).join(""):""} <style> ${A} </style> <div class="range-slider-box"> <div class="row"> <div id="range-slider" class="range-slider"> <div class="container"> <div class="panel"></div> <div class="panel-fill"></div> <div class="container"> <div class="pointer" tabindex="0" role="slider"> <div class="pointer-shape"></div> </div> </div> </div> </div> </div> </div>`,S=":host{--width:300px;--height:.25rem;--opacity:.4;--panel-bg:#cbd5e1;--panel-bg-hover:#94a3b8;--panel-bg-fill:#475569;--panel-bg-border-radius:1rem;--pointer-width:1rem;--pointer-height:1rem;--pointer-bg:#fff;--pointer-bg-hover:#dcdcdc;--pointer-bg-focus:#dcdcdc;--pointer-shadow:0 0 2px rgba(0,0,0,0.8);--pointer-shadow-hover:0 0 2px #000;--pointer-shadow-focus:var(--pointer-shadow-hover);--pointer-border:1px solid hsla(0,0%,88%,0.5);--pointer-border-hover:1px solid #94a3b8;--pointer-border-focus:var(--pointer-border-hover);--pointer-border-radius:100%;--animate-onclick:.3s}:host{max-width:100%}.range-slider-box{display:flex;position:relative;flex-direction:column}.range-slider{position:relative;width:var(--width,100%);height:var(--height,0.25rem);touch-action:none;max-width:100%;box-sizing:border-box;cursor:pointer}.row{width:100%;display:flex;align-items:center}.range-slider.disabled{opacity:var(--opacity,0.4);cursor:default}.pointer.disabled{-webkit-filter:brightness(0.8);filter:brightness(0.8);cursor:default}.range-slider *{box-sizing:border-box}.container{position:absolute;width:100%;height:100%}.panel{position:absolute;z-index:10;width:100%;height:100%;background:var(--panel-bg,#2d4373);border-radius:var(--panel-bg-border-radius,1rem);overflow:hidden;transition:.3s all ease}.panel-fill{background:var(--panel-bg-fill,#000);border-radius:var(--panel-bg-border-radius,1rem);overflow:hidden;height:100%;position:absolute;z-index:10}.panel:hover{background:var(--panel-bg-hover,#5f79b7)}.disabled .panel:hover{background:var(--panel-bg,#5f79b7)}.pointer{position:absolute;z-index:20;outline:0;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.pointer-shape{background:var(--pointer-bg,#fff);background-size:contain;box-shadow:var(--pointer-shadow);border:var(--pointer-border);border-radius:var(--pointer-border-radius,100%);-webkit-transform:translateX(-50%);transform:translateX(-50%);width:var(--pointer-width,15px);height:var(--pointer-height,15px);transition:.3s all ease}.pointer-shape:hover{background:var(--pointer-bg-hover,#fff);background-size:contain;border:var(--pointer-border-hover);box-shadow:var(--pointer-shadow-hover)}.disabled .pointer-shape:hover{background:var(--pointer-bg,#fff);background-size:contain;border:var(--pointer-border);box-shadow:var(--pointer-shadow)}.pointer:focus .pointer-shape{background:var(--pointer-bg-focus,#fff);background-size:contain;border:var(--pointer-border-focus);box-shadow:var(--pointer-shadow-focus)}.disabled .pointer:focus .pointer-shape{background:var(--pointer-bg,#fff);background-size:contain;border:var(--pointer-border);box-shadow:var(--pointer-shadow)}.type-vertical .range-slider{--width:.25rem;--height:300px;max-height:100%}.type-vertical .range-slider .pointer{left:50%}.type-vertical .range-slider .panel-fill{width:100%}.type-vertical.range-slider-box{flex-direction:row}.type-vertical .row{flex-direction:column}.animate-on-click .pointer,.animate-on-click .panel-fill{transition:all var(--animate-onclick)}.range-dragging .panel-fill{cursor:move}",m="pointers-overlap",j="pointers-min-distance",r="pointers-max-distance",y="range-dragging",b="data",g="min",x="max",O="step",E="round",C="type",T="theme",L="rtl",R="btt",I="disabled",$="keyboard-disabled",M="mousewheel-disabled",B="slider-width",U="slider-height",H="slider-radius",N="slider-bg",q="slider-bg-hover",F="slider-bg-fill",X="pointer-width",Y="pointer-height",Q="pointer-radius",tt="pointer-bg",it="pointer-bg-hover",st="pointer-bg-focus",mt="pointer-shadow",ct="pointer-shadow-hover",Et="pointer-shadow-focus",Tt="pointer-border",Ht="pointer-border-hover",lt="pointer-border-focus",wt="animate-onclick",_t="css-links",zt="vertical",Xt="horizontal",ce=(A,z,rt,K,yt)=>{let Bt=z-A;return Bt===0?rt:(K-rt)*(yt-A)/Bt+rt},St=A=>!isNaN(parseFloat(A))&&isFinite(A),jt=(A,z)=>St(A)?Number(A):z,It=(A,z)=>z===0?0:Math.round(A/z)*z,qt=(A,z=1/0)=>{if(z===1/0)return A;let rt=h(10,z);return Math.round(A*rt)/rt},xt=A=>A==null?!1:typeof A=="boolean"?A:A.trim().toLowerCase()==="true",tr=(A,z)=>{A.dispatchEvent(new CustomEvent("onPointerClicked",{detail:{$pointer:z}}))},le=(A,z)=>{A.dispatchEvent(new CustomEvent("onMouseDown",{detail:{nativeEvent:z}}))},Ie=(A,z)=>{A.dispatchEvent(new CustomEvent("onMouseUp",{detail:{nativeEvent:z}}))},fe=(A,z)=>{A.dispatchEvent(new CustomEvent("onKeyDown",{detail:{nativeEvent:z}}))},er=(A,z)=>{if(!z||z.length<=0)return;let rt=z.map(yt=>St(yt)?jt(yt,yt):yt),K={values:rt||[]};K.value=rt[0],K.value0=rt[0],K.value1=rt[0];for(let yt=1;yt<rt.length;yt++)K[`value${yt+1}`]=rt[yt];A.dispatchEvent(new CustomEvent("change",{detail:K}))},Ce=(A,z,rt)=>{let K=0,yt,Bt,Zt,ft,bt=!1,Gt=(Vt,ue,He,we,Be,ve)=>{let sr=K;He!==void 0&&Vt>He&&(Vt=He),ue!==void 0&&Vt<ue&&(Vt=ue),K=Vt;let De=K;return(we===zt&&ve||we===Xt&&Be)&&(De=100-De),we===zt?z.style.top=`${De}%`:z.style.left=`${De}%`,sr!==K},ne=Vt=>Vt===z||z.contains(Vt),Pt=(Vt,ue,He,we)=>{yt=Vt,Bt=ue,Zt=He,ft=we},ae=Vt=>{bt=Vt,z.classList.toggle("disabled",bt),bt?z.setAttribute("aria-disabled","true"):z.hasAttribute("aria-disabled")&&z.removeAttribute("aria-disabled")},Ae=(Vt,ue)=>{ue==null?z.removeAttribute(Vt):z.setAttribute(Vt,ue)},Qe=Vt=>z.getAttribute(Vt),Rt=Vt=>{if(!bt){switch(Vt.key){case"ArrowLeft":{Vt.preventDefault(),typeof yt=="function"&&yt(rt);break}case"ArrowRight":{Vt.preventDefault(),typeof Bt=="function"&&Bt(rt);break}case"ArrowUp":{Vt.preventDefault(),typeof Zt=="function"&&Zt(rt);break}case"ArrowDown":{Vt.preventDefault(),typeof ft=="function"&&ft(rt);break}}fe(A,Vt)}},te=()=>{bt||tr(A,z)};return z.className=`pointer pointer-${rt}`,z.addEventListener("keydown",Rt),z.addEventListener("click",te),{$pointer:z,get percent(){return K},get disabled(){return bt},set disabled(Vt){ae(Vt)},updatePosition:Gt,isClicked:ne,setCallbacks:Pt,setAttr:Ae,getAttr:Qe,destroy:()=>{z.removeEventListener("keydown",Rt),z.removeEventListener("click",te),z.remove()}}},ir=A=>{if(A==null)return;if(Array.isArray(A))return A;if(A.trim()==="")return;let z=A.split(","),rt=[],K=!0;for(let yt=0;yt<z.length;yt++){let Bt=z[yt].trim();Bt!==""&&(rt.push(Bt),St(Bt)||(K=!1))}return K?rt.map(yt=>Number(yt)):rt},Se=(A,z)=>z?z.findIndex(rt=>rt===A||rt.toString().trim()===A.toString().trim()):-1,qe=A=>({updatePosition:(z,rt,K,yt)=>{if(rt.length<=0)return;let Bt=rt.length===1,Zt=rt[0],ft=rt[rt.length-1];z===zt?(A.style.removeProperty("width"),A.style.removeProperty("right"),A.style.removeProperty("left"),Bt?A.style.height=`${Zt}%`:A.style.height=`${Math.abs(Zt-ft)}%`,yt?(A.style.bottom="0%",Bt?A.style.top="auto":A.style.top=`${Math.min(100-ft,100-Zt)}%`):(A.style.bottom="auto",Bt?A.style.top="0%":A.style.top=`${Math.min(Zt,ft)}%`)):(A.style.removeProperty("height"),A.style.removeProperty("top"),A.style.removeProperty("bottom"),Bt?A.style.width=`${Zt}%`:A.style.width=`${Math.abs(Zt-ft)}%`,K?(A.style.right="0%",Bt?A.style.left="auto":A.style.left=`${Math.min(100-ft,100-Zt)}%`):(A.style.right="auto",Bt?A.style.left="0%":A.style.left=`${Math.min(Zt,ft)}%`))}}),_e="--animate-onclick",or="--width",ot="--height",vt="--panel-bg-border-radius",Mt="--panel-bg",$t="--panel-bg-hover",Qt="--panel-bg-fill",Ue="--pointer-width",Ze="--pointer-height",fr="--pointer-border-radius",Je="--pointer-bg",ar="--pointer-bg-hover",xe="--pointer-bg-focus",En="--pointer-shadow",Dt="--pointer-shadow-hover",Kt="--pointer-shadow-focus",Yt="--pointer-border",oe="--pointer-border-hover",Fe="--pointer-border-focus",Ci=(A,z,rt)=>{let K=new Map;for(let yt of A.attributes){let Bt=yt.nodeName.trim().toLowerCase();if(!z.test(Bt))continue;let Zt=Bt.replace(/\D/g,"").trim(),ft=Zt===""||Zt==="0"||Zt==="1"?0:jt(Zt,0)-1,bt=rt&&typeof rt=="function"?rt(yt.value):yt.value;K.set(ft,bt)}return K},Cn=A=>{if(!A)return null;let z=A.getAttribute(_t);if(!z)return null;let rt=z.split(";"),K=[];for(let yt of rt)yt.trim()!==""&&K.push(yt.trim());return K},$a=[[or,B,"sliderWidth",null],[ot,U,"sliderHeight",null],[vt,H,"sliderRadius",null],[Mt,N,"sliderBg",null],[$t,q,"sliderBgHover",null],[Qt,F,"sliderBgFill",null],[Ue,X,"pointer#Width",/^pointer([0-9]*)-width$/],[Ze,Y,"pointer#Height",/^pointer([0-9]*)-height$/],[fr,Q,"pointer#Radius",/^pointer([0-9]*)-radius$/],[Je,tt,"pointer#Bg",/^pointer([0-9]*)-bg$/],[ar,it,"pointer#BgHover",/^pointer([0-9]*)-bg-hover$/],[xe,st,"pointer#BgFocus",/^pointer([0-9]*)-bg-focus$/],[En,mt,"pointer#Shadow",/^pointer([0-9]*)-shadow$/],[Dt,ct,"pointer#ShadowHover",/^pointer([0-9]*)-shadow-hover$/],[Kt,Et,"pointer#ShadowFocus",/^pointer([0-9]*)-shadow-focus$/],[Yt,Tt,"pointer#Border",/^pointer([0-9]*)-border$/],[oe,Ht,"pointer#BorderHover",/^pointer([0-9]*)-border-hover$/],[Fe,lt,"pointer#BorderFocus",/^pointer([0-9]*)-border-focus$/]],Kn=(A,z,rt)=>{let K=null,yt=[],Bt=new Map,Zt=(Rt,te=z)=>{let Vt=[...te.classList];for(let ue of Vt)ue.startsWith(Rt)&&z.classList.remove(ue)},ft=()=>{Zt("shape");let Rt=z.querySelectorAll(".pointer");for(let te of Rt)Zt("shape",te)},bt=Rt=>{K=Rt,Zt("theme-"),typeof Rt=="string"&&z.classList.add(`theme-${Rt}`)},Gt=()=>{if(ft(),!(yt.length<=0)){z.classList.add("shape",`shape-${yt[0]}`);for(let Rt=1;Rt<yt.length;Rt++){let te=yt[Rt];if(!te)continue;let Vt=z.querySelector(`.pointer-${Rt}`);!Vt||Vt.classList.add("shape",`shape-${te}`)}}},ne=(Rt,te)=>{yt[Rt]=te,Gt()},Pt=()=>{ft();let Rt=Ci(A,/^pointer([0-9]*)-shape$/);if(!(Rt.size<=0)){for(let te of Rt){let Vt=te[0];yt[Vt]=te[1]}Gt()}},ae=(Rt,te)=>`${Rt}-${te}`,Ae=(Rt,te,Vt)=>{let ue=rt[Vt];if(!ue)return;let He=Vt===0?z:ue.$pointer;if(te==null){Bt.has(ae(Rt,Vt))&&Bt.delete(ae(Rt,Vt)),He.style.removeProperty(Rt);return}Bt.set(ae(Rt,Vt),te),He.style.setProperty(Rt,te)},Qe=(Rt,te)=>Bt.get(ae(Rt,te));return(()=>{for(let Rt of $a){let[te,Vt,ue,He]=Rt;if(He){let Be=Ci(A,He);for(let ve of Be){let sr=ve[0],De=ve[1];Ae(te,De,sr)}}else{let Be=A.getAttribute(Vt);Ae(te,Be,0)}let we=[];if(ue.indexOf("#")===-1)we.push([ue,0]);else{we.push([ue.replace("#",""),0]),we.push([ue.replace("#","0"),0]),we.push([ue.replace("#","1"),0]);for(let Be=1;Be<rt.length;Be++)we.push([ue.replace("#",(Be+1).toString()),Be])}for(let Be of we)try{let ve=Be[0],sr=Be[1];Object.prototype.hasOwnProperty.call(A,ve)||Object.defineProperty(A,ve,{get(){return Qe(te,sr)},set:De=>{Ae(te,De,sr)}})}catch(ve){console.error(ve)}}bt(A.getAttribute(T)),Pt()})(),{setStyle:Ae,getStyle:Qe,get theme(){return K},set theme(Rt){bt(Rt)},get pointerShapes(){return yt},setPointerShape:ne}},Jr="animate-on-click",$r="range-dragging",Ma=(A,z,rt,K)=>{let yt=[],Bt=ne=>{for(let Pt of yt)Pt.update&&typeof Pt.update=="function"&&Pt.update(ne)},Zt=()=>{for(let ne of yt)ne.destroy&&typeof ne.destroy=="function"&&ne.destroy()},ft=(ne,Pt)=>{for(let ae of yt)ae.onAttrChange&&typeof ae.onAttrChange=="function"&&ae.onAttrChange(ne,Pt)},bt=ne=>{if(ne.gettersAndSetters){for(let Pt of ne.gettersAndSetters)if(!(!Pt.name||!Pt.attributes))try{Object.prototype.hasOwnProperty.call(A,Pt.name)||Object.defineProperty(A,Pt.name,Pt.attributes)}catch(ae){console.error("defineSettersGetters error:",ae)}}},Gt=ne=>{var Pt;if(!ne.css)return;let ae=(Pt=A.shadowRoot)==null?void 0:Pt.querySelector("style");!ae||(ae.innerHTML+=ne.css)};return{init:()=>{if(window.tcRangeSliderPlugins)for(let ne of window.tcRangeSliderPlugins){let Pt=ne();yt.push(Pt),Pt.init&&typeof Pt.init=="function"&&(Pt.init(A,z,rt,K),bt(Pt),Gt(Pt))}},update:Bt,onAttrChange:ft,destroy:Zt}},Sn=10,Fa=20,pn=(A,z)=>{let rt=new Map,K=/^value([0-9]*)$/;for(let ft of A.attributes){let bt=ft.nodeName.trim().toLowerCase();if(!K.test(bt))continue;let Gt=bt.replace("value","").trim(),ne=Gt===""||Gt==="0"||Gt==="1"?0:jt(Gt,0)-1,Pt=St(ft.value)?jt(ft.value,0):ft.value;rt.set(ne,Pt)}let yt=Math.max(...Array.from(rt.keys())),Bt=[];Bt.push([Ce(A,z,0),rt.get(0)]);let Zt=z;for(let ft=1;ft<=yt;ft++){let bt=z.cloneNode(!0);Zt.after(bt),Zt=bt,Bt.push([Ce(A,bt,ft),rt.get(ft)])}return Bt},Si=(A,z,rt,K,yt,Bt,Zt)=>{try{Object.defineProperty(A,K,{configurable:!0,get(){if(!z)return;let ft=z.pointers[rt];if(!ft)return;let bt=z.getTextValue(ft.percent);return St(bt)?jt(bt,bt):bt},set:ft=>{z.pointers[rt]?z==null||z.setValue(ft,rt):z==null||z.addPointer(ft)}}),Object.defineProperty(A,yt,{configurable:!0,get(){var ft,bt;return(bt=(ft=z==null?void 0:z.pointers[rt])==null?void 0:ft.getAttr("aria-label"))!=null?bt:void 0},set:ft=>{!z||z.setAriaLabel(rt,ft)}}),Object.defineProperty(A,Bt,{configurable:!0,get(){var ft,bt;return(bt=(ft=z==null?void 0:z.styles)==null?void 0:ft.pointerShapes[rt])!=null?bt:null},set:ft=>{!z||!z.styles||z.styles.setPointerShape(rt,ft)}}),Object.defineProperty(A,Zt,{configurable:!0,get(){var ft;return(ft=z==null?void 0:z.pointers[rt].disabled)!=null?ft:!1},set:ft=>{if(!z)return;let bt=z==null?void 0:z.pointers[rt];!bt||(bt.disabled=ft)}})}catch(ft){console.error(ft)}},Lr=(A,z)=>{let rt=[["value","ariaLabel","pointerShape","pointerDisabled",0],["value0","ariaLabel0","pointerShape0","pointer0Disabled",0],["value1","ariaLabel1","pointerShape1","pointer1Disabled",0]];for(let K=2;K<Sn;K++)rt.push([`value${K}`,`ariaLabel${K}`,`pointer${K}Shape`,`pointer${K}Disabled`,K-1]);for(let K of rt)Si(A,z,K[4],K[0],K[1],K[2],K[3])},Ha=(A,z,rt)=>{var K;let yt=(K=rt.shadowRoot)==null?void 0:K.querySelector(".container");if(yt)for(let Bt of A)z?yt.prepend(Bt.$pointer):yt.append(Bt.$pointer)},Pn=(A,z)=>{if(!(!z||A.length<=1)){for(let rt of A)rt.$pointer.style.zIndex=Fa.toString();z.$pointer.style.zIndex=(Fa*2).toString()}},$o=0,br=100,Yr=2,gr="0.3s",ti=(A,z,rt)=>{let K=rt.map(V=>V[0]),yt=null,Bt=null,Zt=null,ft=null,bt=$o,Gt=br,ne,Pt,ae=Xt,Ae=Yr,Qe=!1,Rt=!1,te=!1,Vt=0,ue=1/0,He=!1,we,Be,ve=!1,sr=!1,De=!1,Rr=gr,wr=[],Va=V=>{ve||(V.preventDefault&&V.preventDefault(),Ir(V),window.addEventListener("mousemove",Ir),window.addEventListener("mouseup",Mr),le(A,V))},Mr=V=>{ve||(we=void 0,Be=void 0,window.removeEventListener("mousemove",Ir),window.removeEventListener("mouseup",Mr),Rr&&z.classList.add(Jr),Ie(A,V))},Ms=(V,at)=>{if(K.length<=0)return;if(K.length===1)return K[0].isClicked(V)&&Rr&&z.classList.remove(Jr),K[0];let Ot=qa(V);if(He){let ie=at,Ne=Ii(ie);Ne!==void 0&&(ie=It(ie,Ne)),Ot?(we=ie,Be=0,Rr&&z.classList.remove(Jr)):we!==void 0&&(Be=ie-we,we=ie)}if(!Ln(V)&&!Ot){for(let ie of K)if(!(!ie.isClicked(V)||ie.disabled))return Rr&&z.classList.remove(Jr),ie;for(let ie of K)if(yt===ie)return ie}let pe=1/0,ye=null;for(let ie of K){if(ie.disabled)continue;let Ne=Math.abs(at-ie.percent);Ne<pe&&(pe=Ne,ye=ie)}return ye},Pi=()=>K.findIndex(V=>yt===V&&!V.disabled),Ir=V=>{let at;if(ae===zt){let{height:pe,top:ye}=z.getBoundingClientRect(),ie=V.type.indexOf("mouse")!==-1?V.clientY:V.touches[0].clientY;at=Math.min(Math.max(0,ie-ye),pe)*100/pe}else{let{width:pe,left:ye}=z.getBoundingClientRect(),ie=V.type.indexOf("mouse")!==-1?V.clientX:V.touches[0].clientX;at=Math.min(Math.max(0,ie-ye),pe)*100/pe}if((Qe||Rt)&&(at=100-at),yt=Ms(V.target,at),yt&&Pn(K,yt),He&&K.length>1&&Be!==void 0){let pe=K[0],ye=K[K.length-1],ie=pe.percent+Be<0,Ne=ye.percent+Be>100;if(ie||Ne)return;for(let Ui=0;Ui<K.length;Ui++)Ve(Ui,K[Ui].percent+Be);return}let Ot=Pi();Ot!==-1&&(Ve(Ot,at),yt==null||yt.$pointer.focus())},Ti=V=>{if(ve||document.activeElement!==A||yt!=null&&yt.disabled)return;V.stopPropagation(),V.preventDefault();let at=V.deltaY<0,Ot=Qe||Rt,pe=at?!Ot:Ot,ye=Pi();ye!==-1&&(pe?Br(ye,K[ye].percent):ei(ye,K[ye].percent))},fn=V=>{ve||sr||(ae===zt?Rt?Ve(V,100):Ve(V,0):Qe?ei(V,K[V].percent):Br(V,K[V].percent))},za=V=>{ve||sr||(ae===zt?Rt?Ve(V,0):Ve(V,100):Qe?Br(V,K[V].percent):ei(V,K[V].percent))},Li=V=>{ve||sr||(ae===zt?Rt?ei(V,K[V].percent):Br(V,K[V].percent):Qe?Ve(V,100):Ve(V,0))},Ai=V=>{ve||sr||(ae===zt?Rt?Br(V,K[V].percent):ei(V,K[V].percent):Qe?Ve(V,0):Ve(V,100))},Ln=V=>V.classList.contains("panel"),qa=V=>V.classList.contains("panel-fill"),Br=(V,at)=>{if(at===void 0)return;let Ot=Ii(at);Ot==null&&(Ot=1),at-=Ot,at<0&&(at=0),Ve(V,at)},ei=(V,at)=>{if(at===void 0)return;let Ot=Ii(at);Ot==null&&(Ot=1),at+=Ot,at>100&&(at=100),Ve(V,at)},Fr=()=>{!ft||ft.update({percents:Vr(),values:Bi(),$pointers:_r(),min:Ga(),max:Wa(),data:Fo(),step:Mo(),round:Vo(),type:Ho(),textMin:Rn(),textMax:Hr(),rightToLeft:lr(),bottomToTop:be(),pointersOverlap:Ni(),pointersMinDistance:Di(),pointersMaxDistance:zo(),rangeDragging:$i(),disabled:ni(),keyboardDisabled:ii(),mousewheelDisabled:qo()})},Ri=()=>{Fr()},Ua=V=>{if(!(te||K.length<=1||Gt===bt))if(V===0){let at=ue*100/(Gt-bt);return Math.max(0,K[V+1].percent-at)}else{let at=Vt*100/(Gt-bt);return Math.min(K[V-1].percent+at,100)}},An=V=>{if(!(te||K.length<=1||Gt===bt))if(V===K.length-1){let at=ue*100/(Gt-bt);return Math.min(K[V-1].percent+at,100)}else{let at=Vt*100/(Gt-bt);return Math.max(0,K[V+1].percent-at)}},Ii=V=>{let at;if(typeof ne=="function"){let Ot=ce(0,100,bt,Gt,V);at=ne(Ot,V)}else at=ne;if(St(at)){let Ot=Gt-bt;return at=Ot===0?0:at*100/Ot,at}},Xr=V=>{if(V===void 0)return;let at=ce(0,100,bt,Gt,V);return Pt!==void 0?Pt[Math.round(at)]:qt(at,Ae)},Rn=()=>Pt!==void 0?Pt[bt]:bt,Hr=()=>Pt!==void 0?Pt[Gt]:Gt,Mo=()=>ne,In=V=>{var at;return V<=0||te?Rn():(at=Xr(K[V-1].percent))!=null?at:""},Fs=V=>{var at;return K.length<=1||V>=K.length-1||te?Hr():(at=Xr(K[V+1].percent))!=null?at:""},Vr=()=>K.map(V=>V.percent),Bi=()=>K.map(V=>Xr(V.percent)),_r=()=>K.map(V=>V.$pointer),Ga=()=>bt,Wa=()=>Gt,Fo=()=>Pt,Ho=()=>ae,Vo=()=>Ae,Di=()=>Vt,zo=()=>ue,ri=V=>wr[V],lr=()=>Qe,be=()=>Rt,ni=()=>ve,ii=()=>sr,qo=()=>De,Ni=()=>te,$i=()=>He,Ve=(V,at)=>{if(at===void 0)return;let Ot=Ii(at);Ot!==void 0&&(at=It(at,Ot));let pe=K[V];if(!pe)return;let ye=pe.updatePosition(at,Ua(V),An(V),ae,Qe,Rt);Bt==null||Bt.updatePosition(ae,K.map(ie=>ie.percent),Qe,Rt),Fr();for(let ie of K){let Ne=Xr(ie.percent);Ne!==void 0&&(ie.setAttr("aria-valuenow",Ne.toString()),ie.setAttr("aria-valuetext",Ne.toString()))}Uo(),ye&&er(A,K.map(ie=>Xr(ie.percent)))},Dr=()=>{for(let V=0;V<K.length;V++)Ve(V,K[V].percent)},Qr=(V,at)=>{bt=Pt!==void 0?0:jt(V,$o),Gt=Pt!==void 0?Pt.length-1:jt(at,br),cr(bt),Mi(Gt)},Uo=()=>{var V,at;for(let Ot=0;Ot<K.length;Ot++){let pe=K[Ot];pe.setAttr("aria-valuemin",((V=In(Ot))!=null?V:"").toString()),pe.setAttr("aria-valuemax",((at=Fs(Ot))!=null?at:"").toString())}},cr=V=>{bt=jt(V,$o),bt>Gt&&(Gt=bt+br),Dr()},Mi=V=>{Gt=jt(V,br),Gt<bt&&(Gt=bt+br),Dr()},yn=V=>{te=!0;for(let at=0;at<V.length;at++)Fi(V[at],at);te=!1;for(let at=0;at<V.length;at++)Fi(V[at],at)},Fi=(V,at)=>{let Ot;Pt!==void 0?(Ot=V==null?0:Se(V,Pt),Ot===-1&&(Ot=0)):(Ot=jt(V,bt),Ot<bt&&(Ot=bt),Ot>Gt&&(Ot=Gt));let pe=ce(bt,Gt,0,100,Ot);Ve(at,pe)},Bn=V=>{if(V==null){ne=void 0;return}if(typeof V=="function"){ne=V,Dr();return}if(St(V)){ne=jt(V,1);let at=Math.abs(Gt-bt);ne>at&&(ne=void 0),Dr();return}ne=void 0},Dn=V=>{te=V,Dr()},Go=V=>{(!St(V)||V<0)&&(V=0),Vt=V},Hi=V=>{(!St(V)||V<0)&&(V=1/0),ue=V},Kr=V=>{ve=V,z.classList.toggle("disabled",ve),ve?z.setAttribute("aria-disabled","true"):z.hasAttribute("aria-disabled")&&z.removeAttribute("aria-disabled")},oi=V=>{sr=V},mn=V=>{De=V,De?document.removeEventListener("wheel",Ti):document.addEventListener("wheel",Ti,{passive:!1})},Vi=V=>{if(V==null){Pt=void 0;return}if(Pt=ir(V),Pt===void 0||Pt.length<=0){Pt=void 0;return}cr(0),Mi(Pt.length-1),ne===void 0&&Bn(1)},Cr=V=>{var at;typeof V=="string"?ae=V.trim().toLowerCase()===zt?zt:Xt:ae=Xt;let Ot=(at=A.shadowRoot)==null?void 0:at.querySelector(".range-slider-box");if(!Ot)return;Ot.className=`range-slider-box type-${ae}`,Dr();let pe=ae===zt?"vertical":"horizontal";for(let ye of K)ye.setAttr("aria-orientation",pe)},Wo=V=>{Qe=V,K.length>1&&Ha(K,Qe,A),Dr(),Fr()},zi=V=>{Rt=V,K.length>1&&Ha(K,Rt,A),Dr(),Fr()},xr=V=>{Ae=jt(V,Yr),Ae<0&&(Ae=Yr),Fr()},qi=V=>{V==null||V.toString().trim().toLowerCase()==="false"?(Rr=void 0,z.style.removeProperty(_e),z.classList.remove(Jr)):(Rr=V.toString(),z.style.setProperty(_e,Rr),z.classList.add(Jr))},ur=(V,at)=>{let Ot=K[V];!Ot||(Ot.setAttr("aria-label",at),wr[V]=at)},ai=V=>{if(we=void 0,K.length<=1){He=!1,z.classList.remove($r);return}He=V,z.classList.toggle($r,He)},Nn=()=>{Kr(xt(A.getAttribute(I))),sr=xt(A.getAttribute($)),De=xt(A.getAttribute(M));let V=Ci(A,/^pointer([0-9]*)-disabled$/,at=>xt(at));for(let at of V){let Ot=at[0];!K[Ot]||(K[Ot].disabled=at[1])}},Hs=()=>{let V=Ci(A,/^aria-label([0-9]*)$/);for(let at of V){let Ot=at[0];ur(Ot,at[1])}},$n=V=>{let at=K.length,Ot=K[at-1].$pointer,pe=Ot.cloneNode(!0);Ot.after(pe);let ye=Ce(A,pe,at);return ye.setCallbacks(fn,za,Li,Ai),K.push(ye),Fi(V,at),Dr(),Fr(),at},Zo=()=>{let V=K.length,at=K[V-1];return at?(at.destroy(),K.pop(),K.length<=1&&ai(!1),Dr(),Fr(),V-1):-1};return(()=>{var V,at;for(let pe of K)pe.setCallbacks(fn,za,Li,Ai);let Ot=(V=A.shadowRoot)==null?void 0:V.querySelector(".panel-fill");Ot&&(Bt=qe(Ot)),Cr(A.getAttribute(C)),Wo(xt(A.getAttribute(L))),zi(xt(A.getAttribute(R))),Qr(A.getAttribute(g),A.getAttribute(x)),Bn(A.getAttribute(O)),Vi(A.getAttribute(b)),yn(rt.map(pe=>pe[1])),Dn(xt(A.getAttribute(m))),Go(jt(A.getAttribute(j),0)),Hi(jt(A.getAttribute(r),1/0)),ai(xt(A.getAttribute(y))),xr(jt(A.getAttribute(E),Yr)),Nn(),Hs(),Zt=Kn(A,z,K),qi((at=A.getAttribute(wt))!=null?at:gr),z.addEventListener("mousedown",Va),z.addEventListener("mouseup",Mr),z.addEventListener("touchmove",Ir),z.addEventListener("touchstart",Ir),De||document.addEventListener("wheel",Ti,{passive:!1}),ft=Ma(A,Ri,{setValues:yn,setMin:cr,setMax:Mi,setStep:Bn,setPointersOverlap:Dn,setPointersMinDistance:Go,setPointersMaxDistance:Hi,setDisabled:Kr,setType:Cr,setRightToLeft:Wo,setBottomToTop:zi,setRound:xr,setKeyboardDisabled:oi,setMousewheelDisabled:mn,setRangeDragging:ai,setData:Vi},{getPercents:Vr,getValues:Bi,getPointerElements:_r,getMin:Ga,getMax:Wa,getStep:Mo,getData:Fo,getType:Ho,getRound:Vo,getTextMin:Rn,getTextMax:Hr,isRightToLeft:lr,isBottomToTop:be,isDisabled:ni,isKeyboardDisabled:ii,isMousewheelDisabled:qo,isPointersOverlap:Ni,isRangeDraggingEnabled:$i,getPointersMinDistance:Di,getPointersMaxDistance:zo}),ft.init()})(),{get pointers(){return K},get styles(){return Zt},get pluginsManager(){return ft},get min(){return Rn()},get max(){return Hr()},get step(){return Mo()},get pointersOverlap(){return Ni()},set pointersOverlap(V){Dn(V)},get pointersMinDistance(){return Di()},set pointersMinDistance(V){Go(V)},get pointersMaxDistance(){return zo()},set pointersMaxDistance(V){Hi(V)},get disabled(){return ni()},set disabled(V){Kr(V)},get data(){return Fo()},get type(){return Ho()},set type(V){Cr(V)},get rightToLeft(){return lr()},set rightToLeft(V){Wo(V)},get bottomToTop(){return be()},set bottomToTop(V){zi(V)},get round(){return Vo()},set round(V){xr(V)},get animateOnClick(){return Rr},set animateOnClick(V){qi(V)},get keyboardDisabled(){return ii()},set keyboardDisabled(V){oi(V)},get mousewheelDisabled(){return qo()},set mousewheelDisabled(V){mn(V)},get rangeDragging(){return $i()},set rangeDragging(V){ai(V)},setMin:cr,setMax:Mi,setValue:Fi,setStep:Bn,setData:Vi,getTextValue:Xr,setAriaLabel:ur,getAriaLabel:ri,addPointer:$n,removePointer:Zo,destroy:()=>{z.removeEventListener("mousedown",Va),z.removeEventListener("mouseup",Mr),z.removeEventListener("touchmove",Ir),z.removeEventListener("touchstart",Ir),document.removeEventListener("wheel",Ti);for(let V of K)V.destroy();ft==null||ft.destroy()}}},Tn=(A,z,rt)=>{let K=$a.find(([ft,bt,Gt,ne])=>bt.replace("#","")===z.replace(/\d+/g,""));if(K&&A.styles){let[ft,bt,Gt,ne]=K,Pt=z.replace(/\D/g,"").trim(),ae=Pt===""||Pt==="0"||Pt==="1"?0:jt(Pt,0)-1;A.styles.setStyle(ft,rt,ae);return}switch(A&&A.pluginsManager&&A.pluginsManager.onAttrChange(z,rt),z){case g:{A.setMin(rt);break}case x:{A.setMax(rt);break}case O:{A.setStep(rt);break}case m:{A.pointersOverlap=xt(rt);break}case j:{A.pointersMinDistance=jt(rt,0);break}case y:{A.rangeDragging=xt(rt);break}case r:{A.pointersMaxDistance=jt(rt,1/0);break}case I:{A.disabled=xt(rt);break}case $:{A.keyboardDisabled=xt(rt);break}case M:{A.mousewheelDisabled=xt(rt);break}case b:{A.setData(rt);break}case C:{A.type=rt;break}case L:{A.rightToLeft=xt(rt);break}case R:{A.bottomToTop=xt(rt);break}case E:{A.round=jt(rt,Yr);break}case T:{A.styles&&(A.styles.theme=rt);break}case wt:{A.animateOnClick=rt;break}}let yt=null;if(/^value([0-9]*)$/.test(z)&&(yt="value"),/^pointer([0-9]*)-disabled$/.test(z)&&(yt="pointer-disabled"),/^aria-label([0-9]*)$/.test(z)&&(yt="aria-label"),/^pointer([0-9]*)-shape$/.test(z)&&(yt="pointer-shape"),!yt)return;let Bt=z.replace(/\D/g,"").trim(),Zt=Bt===""||Bt==="0"||Bt==="1"?0:jt(Bt,0)-1;switch(yt){case"value":{A.setValue(rt,Zt);break}case"pointer-disabled":{let ft=A==null?void 0:A.pointers[Zt];if(!ft)return;ft.disabled=xt(rt);break}case"aria-label":{A.setAriaLabel(Zt,rt);break}case"pointer-shape":{A.styles&&A.styles.setPointerShape(Zt,rt);break}}},$s=class extends HTMLElement{constructor(){super(),v(this,"slider"),v(this,"_externalCSSList",[]),v(this,"_observer",null),this.attachShadow({mode:"open"})}set step(A){this.slider&&this.slider.setStep(A)}get step(){var A;return(A=this.slider)==null?void 0:A.step}set disabled(A){this.slider&&(this.slider.disabled=A)}get disabled(){var A,z;return(z=(A=this.slider)==null?void 0:A.disabled)!=null?z:!1}set data(A){var z;(z=this.slider)==null||z.setData(A)}get data(){var A;return(A=this.slider)==null?void 0:A.data}set min(A){var z;(z=this.slider)==null||z.setMin(A)}get min(){var A;return(A=this.slider)==null?void 0:A.min}set max(A){var z;(z=this.slider)==null||z.setMax(A)}get max(){var A;return(A=this.slider)==null?void 0:A.max}set round(A){!this.slider||(this.slider.round=A)}get round(){var A,z;return(z=(A=this.slider)==null?void 0:A.round)!=null?z:Yr}set type(A){!this.slider||(this.slider.type=A??Xt)}get type(){var A;return((A=this.slider)==null?void 0:A.type)||Xt}set pointersOverlap(A){!this.slider||(this.slider.pointersOverlap=A)}get pointersOverlap(){var A,z;return(z=(A=this.slider)==null?void 0:A.pointersOverlap)!=null?z:!1}set pointersMinDistance(A){!this.slider||(this.slider.pointersMinDistance=A)}get pointersMinDistance(){var A,z;return(z=(A=this.slider)==null?void 0:A.pointersMinDistance)!=null?z:0}set pointersMaxDistance(A){!this.slider||(this.slider.pointersMaxDistance=A)}get pointersMaxDistance(){var A,z;return(z=(A=this.slider)==null?void 0:A.pointersMaxDistance)!=null?z:1/0}set theme(A){!this.slider||!this.slider.styles||(this.slider.styles.theme=A)}get theme(){var A,z,rt;return(rt=(z=(A=this.slider)==null?void 0:A.styles)==null?void 0:z.theme)!=null?rt:null}set rtl(A){!this.slider||(this.slider.rightToLeft=A)}get rtl(){var A,z;return(z=(A=this.slider)==null?void 0:A.rightToLeft)!=null?z:!1}set btt(A){!this.slider||(this.slider.bottomToTop=A)}get btt(){var A,z;return(z=(A=this.slider)==null?void 0:A.bottomToTop)!=null?z:!1}set keyboardDisabled(A){!this.slider||(this.slider.keyboardDisabled=A)}get keyboardDisabled(){var A,z;return(z=(A=this.slider)==null?void 0:A.keyboardDisabled)!=null?z:!1}set mousewheelDisabled(A){!this.slider||(this.slider.mousewheelDisabled=A)}get mousewheelDisabled(){var A,z;return(z=(A=this.slider)==null?void 0:A.mousewheelDisabled)!=null?z:!1}set animateOnClick(A){!this.slider||(this.slider.animateOnClick=A)}get animateOnClick(){var A;return(A=this.slider)==null?void 0:A.animateOnClick}get rangeDragging(){var A,z;return(z=(A=this.slider)==null?void 0:A.rangeDragging)!=null?z:!1}set rangeDragging(A){this.slider&&(this.slider.rangeDragging=xt(A))}get externalCSSList(){return this._externalCSSList}addPointer(A){var z,rt;if(!this.slider)return;let K=(rt=(z=this.slider)==null?void 0:z.addPointer(A))!=null?rt:0;Si(this,this.slider,K,`value${K+1}`,`ariaLabel${K+1}`,`pointerShape${K+1}`,`pointer${K+1}Disabled`)}removePointer(){var A;!this.slider||(A=this.slider)==null||A.removePointer()}addCSS(A){if(!this.shadowRoot)return;let z=document.createElement("style");z.textContent=A,this.shadowRoot.appendChild(z)}connectedCallback(){var A,z;if(!this.shadowRoot)return;this._externalCSSList=Cn(this),this.shadowRoot.innerHTML=k(S,this._externalCSSList);let rt=(A=this.shadowRoot)==null?void 0:A.querySelector(".pointer");if(!rt)return;let K=(z=this.shadowRoot)==null?void 0:z.getElementById("range-slider");if(!K)return;let yt=pn(this,rt);this.slider=ti(this,K,yt),Lr(this,this.slider),this._observer=new MutationObserver(Bt=>{Bt.forEach(Zt=>{var ft;if(!this.slider||Zt.type!=="attributes")return;let bt=Zt.attributeName;!bt||Tn(this.slider,bt,(ft=this.getAttribute(bt))!=null?ft:"")})}),this._observer.observe(this,{attributes:!0})}disconnectedCallback(){this._observer&&this._observer.disconnect(),this.slider&&this.slider.destroy()}},Ar=$s;window.tcRangeSlider=Ar,customElements.get("toolcool-range-slider")||customElements.define("toolcool-range-slider",Ar),customElements.get("tc-range-slider")||customElements.define("tc-range-slider",class extends Ar{})})();function sh(w,h){Object.keys(h).forEach(f=>{w.setAttribute(f,h[f])})}class lh extends ah{register(){super.register()}unregister(){super.unregister()}build(){const h=this.schema.properties,f=this.options,v=this.schema.description,k=this.theme,S=this.defaults.startVals[this.key];f.compact||(this.header=this.label=k.getFormInputLabel(this.getTitle(),this.isRequired())),v&&(this.description=k.getFormInputDescription(this.translateProperty(v))),f.infoText&&(this.infoButton=k.getInfoButton(this.translateProperty(f.infoText)));const m=document.createElement("tc-range-slider"),j=Object.keys(h).find(b=>b.includes("min")),r=Object.keys(h).find(b=>b.includes("max")),y={min:h[j].minimum,max:h[r].maximum,value1:(S==null?void 0:S[j])||h[j].default,value2:(S==null?void 0:S[r])||h[r].default,"slider-bg-fill":"#004170","generate-labels":"true","slider-width":"100%","range-dragging":"false"};sh(m,y),this.input=m,this.input.id=this.formname,this.control=k.getFormControl(this.label,this.input,this.description,this.infoButton),(this.schema.readOnly||this.schema.readonly)&&(this.disable(!0),this.input.disabled=!0),this.input.addEventListener("change",b=>{b.preventDefault(),b.stopPropagation(),this.value={[j]:b.detail.value1,[r]:b.detail.value2},this.onChange(!0)}),this.container.appendChild(this.control)}destroy(){this.label&&this.label.parentNode&&this.label.parentNode.removeChild(this.label),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),super.destroy()}}const ch=[{type:"object",format:"minmax",func:lh}],uh=w=>{ch.map(({type:h,format:f,func:v})=>{ba.JSONEditor.defaults.startVals=w,ba.JSONEditor.defaults.editors[f]=v,ba.JSONEditor.defaults.resolvers.unshift(k=>{if(k.type===h&&k.format===f)return f})})};class Pc extends kr{constructor(){super();Te(this,wa);Te(this,_a);Te(this,Oi,{});Te(this,Qn,null);this.schema,this.startVals,this.options={},this.unstyled=!1}getSchema(){return this.schema}setSchema(f){this.schema=f}getDefaultValues(){return this.startVals}setDefaultValues(f){this.startVals=f}getValues(){return Oe(this,Oi)}firstUpdated(){if(!Oe(this,Qn)){uh(this.startVals||{});const f=this.renderRoot.querySelector("form");fo(this,Qn,new ba.JSONEditor(f,{schema:this.schema,...this.startVals?{startval:this.startVals}:{},theme:"html",ajax:!0,...this.options})),os(this,_a,nu).call(this)}}render(){return me`
|
|
357
|
+
`,destroy:$}};window.tcRangeSliderPlugins.push(k)})(),(()=>{var y=Object.defineProperty,l=Math.pow,p=(L,z,rt)=>z in L?y(L,z,{enumerable:!0,configurable:!0,writable:!0,value:rt}):L[z]=rt,v=(L,z,rt)=>(p(L,typeof z!="symbol"?z+"":z,rt),rt),k=(L,z)=>` ${z&&z.length>0?z.map(rt=>`<link rel="stylesheet" href="${rt}" />`).join(""):""} <style> ${L} </style> <div class="range-slider-box"> <div class="row"> <div id="range-slider" class="range-slider"> <div class="container"> <div class="panel"></div> <div class="panel-fill"></div> <div class="container"> <div class="pointer" tabindex="0" role="slider"> <div class="pointer-shape"></div> </div> </div> </div> </div> </div> </div>`,C=":host{--width:300px;--height:.25rem;--opacity:.4;--panel-bg:#cbd5e1;--panel-bg-hover:#94a3b8;--panel-bg-fill:#475569;--panel-bg-border-radius:1rem;--pointer-width:1rem;--pointer-height:1rem;--pointer-bg:#fff;--pointer-bg-hover:#dcdcdc;--pointer-bg-focus:#dcdcdc;--pointer-shadow:0 0 2px rgba(0,0,0,0.8);--pointer-shadow-hover:0 0 2px #000;--pointer-shadow-focus:var(--pointer-shadow-hover);--pointer-border:1px solid hsla(0,0%,88%,0.5);--pointer-border-hover:1px solid #94a3b8;--pointer-border-focus:var(--pointer-border-hover);--pointer-border-radius:100%;--animate-onclick:.3s}:host{max-width:100%}.range-slider-box{display:flex;position:relative;flex-direction:column}.range-slider{position:relative;width:var(--width,100%);height:var(--height,0.25rem);touch-action:none;max-width:100%;box-sizing:border-box;cursor:pointer}.row{width:100%;display:flex;align-items:center}.range-slider.disabled{opacity:var(--opacity,0.4);cursor:default}.pointer.disabled{-webkit-filter:brightness(0.8);filter:brightness(0.8);cursor:default}.range-slider *{box-sizing:border-box}.container{position:absolute;width:100%;height:100%}.panel{position:absolute;z-index:10;width:100%;height:100%;background:var(--panel-bg,#2d4373);border-radius:var(--panel-bg-border-radius,1rem);overflow:hidden;transition:.3s all ease}.panel-fill{background:var(--panel-bg-fill,#000);border-radius:var(--panel-bg-border-radius,1rem);overflow:hidden;height:100%;position:absolute;z-index:10}.panel:hover{background:var(--panel-bg-hover,#5f79b7)}.disabled .panel:hover{background:var(--panel-bg,#5f79b7)}.pointer{position:absolute;z-index:20;outline:0;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.pointer-shape{background:var(--pointer-bg,#fff);background-size:contain;box-shadow:var(--pointer-shadow);border:var(--pointer-border);border-radius:var(--pointer-border-radius,100%);-webkit-transform:translateX(-50%);transform:translateX(-50%);width:var(--pointer-width,15px);height:var(--pointer-height,15px);transition:.3s all ease}.pointer-shape:hover{background:var(--pointer-bg-hover,#fff);background-size:contain;border:var(--pointer-border-hover);box-shadow:var(--pointer-shadow-hover)}.disabled .pointer-shape:hover{background:var(--pointer-bg,#fff);background-size:contain;border:var(--pointer-border);box-shadow:var(--pointer-shadow)}.pointer:focus .pointer-shape{background:var(--pointer-bg-focus,#fff);background-size:contain;border:var(--pointer-border-focus);box-shadow:var(--pointer-shadow-focus)}.disabled .pointer:focus .pointer-shape{background:var(--pointer-bg,#fff);background-size:contain;border:var(--pointer-border);box-shadow:var(--pointer-shadow)}.type-vertical .range-slider{--width:.25rem;--height:300px;max-height:100%}.type-vertical .range-slider .pointer{left:50%}.type-vertical .range-slider .panel-fill{width:100%}.type-vertical.range-slider-box{flex-direction:row}.type-vertical .row{flex-direction:column}.animate-on-click .pointer,.animate-on-click .panel-fill{transition:all var(--animate-onclick)}.range-dragging .panel-fill{cursor:move}",m="pointers-overlap",O="pointers-min-distance",r="pointers-max-distance",b="range-dragging",g="data",w="min",x="max",j="step",E="round",S="type",T="theme",A="rtl",R="btt",I="disabled",$="keyboard-disabled",M="mousewheel-disabled",B="slider-width",q="slider-height",F="slider-radius",N="slider-bg",U="slider-bg-hover",H="slider-bg-fill",X="pointer-width",Y="pointer-height",Q="pointer-radius",tt="pointer-bg",it="pointer-bg-hover",st="pointer-bg-focus",mt="pointer-shadow",ut="pointer-shadow-hover",Et="pointer-shadow-focus",At="pointer-border",Vt="pointer-border-hover",lt="pointer-border-focus",wt="animate-onclick",_t="css-links",Ut="vertical",Qt="horizontal",fe=(L,z,rt,K,yt)=>{let Dt=z-L;return Dt===0?rt:(K-rt)*(yt-L)/Dt+rt},St=L=>!isNaN(parseFloat(L))&&isFinite(L),Ot=(L,z)=>St(L)?Number(L):z,Bt=(L,z)=>z===0?0:Math.round(L/z)*z,qt=(L,z=1/0)=>{if(z===1/0)return L;let rt=l(10,z);return Math.round(L*rt)/rt},xt=L=>L==null?!1:typeof L=="boolean"?L:L.trim().toLowerCase()==="true",sr=(L,z)=>{L.dispatchEvent(new CustomEvent("onPointerClicked",{detail:{$pointer:z}}))},de=(L,z)=>{L.dispatchEvent(new CustomEvent("onMouseDown",{detail:{nativeEvent:z}}))},Ne=(L,z)=>{L.dispatchEvent(new CustomEvent("onMouseUp",{detail:{nativeEvent:z}}))},_e=(L,z)=>{L.dispatchEvent(new CustomEvent("onKeyDown",{detail:{nativeEvent:z}}))},lr=(L,z)=>{if(!z||z.length<=0)return;let rt=z.map(yt=>St(yt)?Ot(yt,yt):yt),K={values:rt||[]};K.value=rt[0],K.value0=rt[0],K.value1=rt[0];for(let yt=1;yt<rt.length;yt++)K[`value${yt+1}`]=rt[yt];L.dispatchEvent(new CustomEvent("change",{detail:K}))},Ae=(L,z,rt)=>{let K=0,yt,Dt,Jt,ft,vt=!1,Wt=(zt,ye,Ue,Ee,$e,ke)=>{let fr=K;Ue!==void 0&&zt>Ue&&(zt=Ue),ye!==void 0&&zt<ye&&(zt=ye),K=zt;let Me=K;return(Ee===Ut&&ke||Ee===Qt&&$e)&&(Me=100-Me),Ee===Ut?z.style.top=`${Me}%`:z.style.left=`${Me}%`,fr!==K},oe=zt=>zt===z||z.contains(zt),Tt=(zt,ye,Ue,Ee)=>{yt=zt,Dt=ye,Jt=Ue,ft=Ee},ue=zt=>{vt=zt,z.classList.toggle("disabled",vt),vt?z.setAttribute("aria-disabled","true"):z.hasAttribute("aria-disabled")&&z.removeAttribute("aria-disabled")},Be=(zt,ye)=>{ye==null?z.removeAttribute(zt):z.setAttribute(zt,ye)},nr=zt=>z.getAttribute(zt),It=zt=>{if(!vt){switch(zt.key){case"ArrowLeft":{zt.preventDefault(),typeof yt=="function"&&yt(rt);break}case"ArrowRight":{zt.preventDefault(),typeof Dt=="function"&&Dt(rt);break}case"ArrowUp":{zt.preventDefault(),typeof Jt=="function"&&Jt(rt);break}case"ArrowDown":{zt.preventDefault(),typeof ft=="function"&&ft(rt);break}}_e(L,zt)}},ee=()=>{vt||sr(L,z)};return z.className=`pointer pointer-${rt}`,z.addEventListener("keydown",It),z.addEventListener("click",ee),{$pointer:z,get percent(){return K},get disabled(){return vt},set disabled(zt){ue(zt)},updatePosition:Wt,isClicked:oe,setCallbacks:Tt,setAttr:Be,getAttr:nr,destroy:()=>{z.removeEventListener("keydown",It),z.removeEventListener("click",ee),z.remove()}}},hr=L=>{if(L==null)return;if(Array.isArray(L))return L;if(L.trim()==="")return;let z=L.split(","),rt=[],K=!0;for(let yt=0;yt<z.length;yt++){let Dt=z[yt].trim();Dt!==""&&(rt.push(Dt),St(Dt)||(K=!1))}return K?rt.map(yt=>Number(yt)):rt},Le=(L,z)=>z?z.findIndex(rt=>rt===L||rt.toString().trim()===L.toString().trim()):-1,We=L=>({updatePosition:(z,rt,K,yt)=>{if(rt.length<=0)return;let Dt=rt.length===1,Jt=rt[0],ft=rt[rt.length-1];z===Ut?(L.style.removeProperty("width"),L.style.removeProperty("right"),L.style.removeProperty("left"),Dt?L.style.height=`${Jt}%`:L.style.height=`${Math.abs(Jt-ft)}%`,yt?(L.style.bottom="0%",Dt?L.style.top="auto":L.style.top=`${Math.min(100-ft,100-Jt)}%`):(L.style.bottom="auto",Dt?L.style.top="0%":L.style.top=`${Math.min(Jt,ft)}%`)):(L.style.removeProperty("height"),L.style.removeProperty("top"),L.style.removeProperty("bottom"),Dt?L.style.width=`${Jt}%`:L.style.width=`${Math.abs(Jt-ft)}%`,K?(L.style.right="0%",Dt?L.style.left="auto":L.style.left=`${Math.min(100-ft,100-Jt)}%`):(L.style.right="auto",Dt?L.style.left="0%":L.style.left=`${Math.min(Jt,ft)}%`))}}),Ce="--animate-onclick",dr="--width",ot="--height",bt="--panel-bg-border-radius",Ht="--panel-bg",Mt="--panel-bg-hover",Kt="--panel-bg-fill",Ze="--pointer-width",Qe="--pointer-height",_r="--pointer-border-radius",Ke="--pointer-bg",pr="--pointer-bg-hover",Se="--pointer-bg-focus",Dn="--pointer-shadow",Nt="--pointer-shadow-hover",te="--pointer-shadow-focus",Xt="--pointer-border",le="--pointer-border-hover",ze="--pointer-border-focus",Vi=(L,z,rt)=>{let K=new Map;for(let yt of L.attributes){let Dt=yt.nodeName.trim().toLowerCase();if(!z.test(Dt))continue;let Jt=Dt.replace(/\D/g,"").trim(),ft=Jt===""||Jt==="0"||Jt==="1"?0:Ot(Jt,0)-1,vt=rt&&typeof rt=="function"?rt(yt.value):yt.value;K.set(ft,vt)}return K},Nn=L=>{if(!L)return null;let z=L.getAttribute(_t);if(!z)return null;let rt=z.split(";"),K=[];for(let yt of rt)yt.trim()!==""&&K.push(yt.trim());return K},ls=[[dr,B,"sliderWidth",null],[ot,q,"sliderHeight",null],[bt,F,"sliderRadius",null],[Ht,N,"sliderBg",null],[Mt,U,"sliderBgHover",null],[Kt,H,"sliderBgFill",null],[Ze,X,"pointer#Width",/^pointer([0-9]*)-width$/],[Qe,Y,"pointer#Height",/^pointer([0-9]*)-height$/],[_r,Q,"pointer#Radius",/^pointer([0-9]*)-radius$/],[Ke,tt,"pointer#Bg",/^pointer([0-9]*)-bg$/],[pr,it,"pointer#BgHover",/^pointer([0-9]*)-bg-hover$/],[Se,st,"pointer#BgFocus",/^pointer([0-9]*)-bg-focus$/],[Dn,mt,"pointer#Shadow",/^pointer([0-9]*)-shadow$/],[Nt,ut,"pointer#ShadowHover",/^pointer([0-9]*)-shadow-hover$/],[te,Et,"pointer#ShadowFocus",/^pointer([0-9]*)-shadow-focus$/],[Xt,At,"pointer#Border",/^pointer([0-9]*)-border$/],[le,Vt,"pointer#BorderHover",/^pointer([0-9]*)-border-hover$/],[ze,lt,"pointer#BorderFocus",/^pointer([0-9]*)-border-focus$/]],ci=(L,z,rt)=>{let K=null,yt=[],Dt=new Map,Jt=(It,ee=z)=>{let zt=[...ee.classList];for(let ye of zt)ye.startsWith(It)&&z.classList.remove(ye)},ft=()=>{Jt("shape");let It=z.querySelectorAll(".pointer");for(let ee of It)Jt("shape",ee)},vt=It=>{K=It,Jt("theme-"),typeof It=="string"&&z.classList.add(`theme-${It}`)},Wt=()=>{if(ft(),!(yt.length<=0)){z.classList.add("shape",`shape-${yt[0]}`);for(let It=1;It<yt.length;It++){let ee=yt[It];if(!ee)continue;let zt=z.querySelector(`.pointer-${It}`);!zt||zt.classList.add("shape",`shape-${ee}`)}}},oe=(It,ee)=>{yt[It]=ee,Wt()},Tt=()=>{ft();let It=Vi(L,/^pointer([0-9]*)-shape$/);if(!(It.size<=0)){for(let ee of It){let zt=ee[0];yt[zt]=ee[1]}Wt()}},ue=(It,ee)=>`${It}-${ee}`,Be=(It,ee,zt)=>{let ye=rt[zt];if(!ye)return;let Ue=zt===0?z:ye.$pointer;if(ee==null){Dt.has(ue(It,zt))&&Dt.delete(ue(It,zt)),Ue.style.removeProperty(It);return}Dt.set(ue(It,zt),ee),Ue.style.setProperty(It,ee)},nr=(It,ee)=>Dt.get(ue(It,ee));return(()=>{for(let It of ls){let[ee,zt,ye,Ue]=It;if(Ue){let $e=Vi(L,Ue);for(let ke of $e){let fr=ke[0],Me=ke[1];Be(ee,Me,fr)}}else{let $e=L.getAttribute(zt);Be(ee,$e,0)}let Ee=[];if(ye.indexOf("#")===-1)Ee.push([ye,0]);else{Ee.push([ye.replace("#",""),0]),Ee.push([ye.replace("#","0"),0]),Ee.push([ye.replace("#","1"),0]);for(let $e=1;$e<rt.length;$e++)Ee.push([ye.replace("#",($e+1).toString()),$e])}for(let $e of Ee)try{let ke=$e[0],fr=$e[1];Object.prototype.hasOwnProperty.call(L,ke)||Object.defineProperty(L,ke,{get(){return nr(ee,fr)},set:Me=>{Be(ee,Me,fr)}})}catch(ke){console.error(ke)}}vt(L.getAttribute(T)),Tt()})(),{setStyle:Be,getStyle:nr,get theme(){return K},set theme(It){vt(It)},get pointerShapes(){return yt},setPointerShape:oe}},on="animate-on-click",Gr="range-dragging",us=(L,z,rt,K)=>{let yt=[],Dt=oe=>{for(let Tt of yt)Tt.update&&typeof Tt.update=="function"&&Tt.update(oe)},Jt=()=>{for(let oe of yt)oe.destroy&&typeof oe.destroy=="function"&&oe.destroy()},ft=(oe,Tt)=>{for(let ue of yt)ue.onAttrChange&&typeof ue.onAttrChange=="function"&&ue.onAttrChange(oe,Tt)},vt=oe=>{if(oe.gettersAndSetters){for(let Tt of oe.gettersAndSetters)if(!(!Tt.name||!Tt.attributes))try{Object.prototype.hasOwnProperty.call(L,Tt.name)||Object.defineProperty(L,Tt.name,Tt.attributes)}catch(ue){console.error("defineSettersGetters error:",ue)}}},Wt=oe=>{var Tt;if(!oe.css)return;let ue=(Tt=L.shadowRoot)==null?void 0:Tt.querySelector("style");!ue||(ue.innerHTML+=oe.css)};return{init:()=>{if(window.tcRangeSliderPlugins)for(let oe of window.tcRangeSliderPlugins){let Tt=oe();yt.push(Tt),Tt.init&&typeof Tt.init=="function"&&(Tt.init(L,z,rt,K),vt(Tt),Wt(Tt))}},update:Dt,onAttrChange:ft,destroy:Jt}},$n=10,cs=20,kn=(L,z)=>{let rt=new Map,K=/^value([0-9]*)$/;for(let ft of L.attributes){let vt=ft.nodeName.trim().toLowerCase();if(!K.test(vt))continue;let Wt=vt.replace("value","").trim(),oe=Wt===""||Wt==="0"||Wt==="1"?0:Ot(Wt,0)-1,Tt=St(ft.value)?Ot(ft.value,0):ft.value;rt.set(oe,Tt)}let yt=Math.max(...Array.from(rt.keys())),Dt=[];Dt.push([Ae(L,z,0),rt.get(0)]);let Jt=z;for(let ft=1;ft<=yt;ft++){let vt=z.cloneNode(!0);Jt.after(vt),Jt=vt,Dt.push([Ae(L,vt,ft),rt.get(ft)])}return Dt},zi=(L,z,rt,K,yt,Dt,Jt)=>{try{Object.defineProperty(L,K,{configurable:!0,get(){if(!z)return;let ft=z.pointers[rt];if(!ft)return;let vt=z.getTextValue(ft.percent);return St(vt)?Ot(vt,vt):vt},set:ft=>{z.pointers[rt]?z==null||z.setValue(ft,rt):z==null||z.addPointer(ft)}}),Object.defineProperty(L,yt,{configurable:!0,get(){var ft,vt;return(vt=(ft=z==null?void 0:z.pointers[rt])==null?void 0:ft.getAttr("aria-label"))!=null?vt:void 0},set:ft=>{!z||z.setAriaLabel(rt,ft)}}),Object.defineProperty(L,Dt,{configurable:!0,get(){var ft,vt;return(vt=(ft=z==null?void 0:z.styles)==null?void 0:ft.pointerShapes[rt])!=null?vt:null},set:ft=>{!z||!z.styles||z.styles.setPointerShape(rt,ft)}}),Object.defineProperty(L,Jt,{configurable:!0,get(){var ft;return(ft=z==null?void 0:z.pointers[rt].disabled)!=null?ft:!1},set:ft=>{if(!z)return;let vt=z==null?void 0:z.pointers[rt];!vt||(vt.disabled=ft)}})}catch(ft){console.error(ft)}},Mr=(L,z)=>{let rt=[["value","ariaLabel","pointerShape","pointerDisabled",0],["value0","ariaLabel0","pointerShape0","pointer0Disabled",0],["value1","ariaLabel1","pointerShape1","pointer1Disabled",0]];for(let K=2;K<$n;K++)rt.push([`value${K}`,`ariaLabel${K}`,`pointer${K}Shape`,`pointer${K}Disabled`,K-1]);for(let K of rt)zi(L,z,K[4],K[0],K[1],K[2],K[3])},hs=(L,z,rt)=>{var K;let yt=(K=rt.shadowRoot)==null?void 0:K.querySelector(".container");if(yt)for(let Dt of L)z?yt.prepend(Dt.$pointer):yt.append(Dt.$pointer)},Mn=(L,z)=>{if(!(!z||L.length<=1)){for(let rt of L)rt.$pointer.style.zIndex=cs.toString();z.$pointer.style.zIndex=(cs*2).toString()}},ta=0,Er=100,an=2,Cr="0.3s",hi=(L,z,rt)=>{let K=rt.map(V=>V[0]),yt=null,Dt=null,Jt=null,ft=null,vt=ta,Wt=Er,oe,Tt,ue=Qt,Be=an,nr=!1,It=!1,ee=!1,zt=0,ye=1/0,Ue=!1,Ee,$e,ke=!1,fr=!1,Me=!1,Fr=Cr,Sr=[],ds=V=>{ke||(V.preventDefault&&V.preventDefault(),Vr(V),window.addEventListener("mousemove",Vr),window.addEventListener("mouseup",Wr),de(L,V))},Wr=V=>{ke||(Ee=void 0,$e=void 0,window.removeEventListener("mousemove",Vr),window.removeEventListener("mouseup",Wr),Fr&&z.classList.add(on),Ne(L,V))},pl=(V,at)=>{if(K.length<=0)return;if(K.length===1)return K[0].isClicked(V)&&Fr&&z.classList.remove(on),K[0];let jt=fs(V);if(Ue){let se=at,He=Ji(se);He!==void 0&&(se=Bt(se,He)),jt?(Ee=se,$e=0,Fr&&z.classList.remove(on)):Ee!==void 0&&($e=se-Ee,Ee=se)}if(!Fn(V)&&!jt){for(let se of K)if(!(!se.isClicked(V)||se.disabled))return Fr&&z.classList.remove(on),se;for(let se of K)if(yt===se)return se}let ve=1/0,xe=null;for(let se of K){if(se.disabled)continue;let He=Math.abs(at-se.percent);He<ve&&(ve=He,xe=se)}return xe},Ui=()=>K.findIndex(V=>yt===V&&!V.disabled),Vr=V=>{let at;if(ue===Ut){let{height:ve,top:xe}=z.getBoundingClientRect(),se=V.type.indexOf("mouse")!==-1?V.clientY:V.touches[0].clientY;at=Math.min(Math.max(0,se-xe),ve)*100/ve}else{let{width:ve,left:xe}=z.getBoundingClientRect(),se=V.type.indexOf("mouse")!==-1?V.clientX:V.touches[0].clientX;at=Math.min(Math.max(0,se-xe),ve)*100/ve}if((nr||It)&&(at=100-at),yt=pl(V.target,at),yt&&Mn(K,yt),Ue&&K.length>1&&$e!==void 0){let ve=K[0],xe=K[K.length-1],se=ve.percent+$e<0,He=xe.percent+$e>100;if(se||He)return;for(let ao=0;ao<K.length;ao++)qe(ao,K[ao].percent+$e);return}let jt=Ui();jt!==-1&&(qe(jt,at),yt==null||yt.$pointer.focus())},qi=V=>{if(ke||document.activeElement!==L||yt!=null&&yt.disabled)return;V.stopPropagation(),V.preventDefault();let at=V.deltaY<0,jt=nr||It,ve=at?!jt:jt,xe=Ui();xe!==-1&&(ve?zr(xe,K[xe].percent):di(xe,K[xe].percent))},On=V=>{ke||fr||(ue===Ut?It?qe(V,100):qe(V,0):nr?di(V,K[V].percent):zr(V,K[V].percent))},ps=V=>{ke||fr||(ue===Ut?It?qe(V,0):qe(V,100):nr?zr(V,K[V].percent):di(V,K[V].percent))},Gi=V=>{ke||fr||(ue===Ut?It?di(V,K[V].percent):zr(V,K[V].percent):nr?qe(V,100):qe(V,0))},Wi=V=>{ke||fr||(ue===Ut?It?zr(V,K[V].percent):di(V,K[V].percent):nr?qe(V,0):qe(V,100))},Fn=V=>V.classList.contains("panel"),fs=V=>V.classList.contains("panel-fill"),zr=(V,at)=>{if(at===void 0)return;let jt=Ji(at);jt==null&&(jt=1),at-=jt,at<0&&(at=0),qe(V,at)},di=(V,at)=>{if(at===void 0)return;let jt=Ji(at);jt==null&&(jt=1),at+=jt,at>100&&(at=100),qe(V,at)},Zr=()=>{!ft||ft.update({percents:Yr(),values:Yi(),$pointers:Pr(),min:ms(),max:bs(),data:ra(),step:ea(),round:ia(),type:na(),textMin:zn(),textMax:Jr(),rightToLeft:yr(),bottomToTop:Oe(),pointersOverlap:Qi(),pointersMinDistance:Xi(),pointersMaxDistance:oa(),rangeDragging:Ki(),disabled:fi(),keyboardDisabled:yi(),mousewheelDisabled:aa()})},Zi=()=>{Zr()},ys=V=>{if(!(ee||K.length<=1||Wt===vt))if(V===0){let at=ye*100/(Wt-vt);return Math.max(0,K[V+1].percent-at)}else{let at=zt*100/(Wt-vt);return Math.min(K[V-1].percent+at,100)}},Vn=V=>{if(!(ee||K.length<=1||Wt===vt))if(V===K.length-1){let at=ye*100/(Wt-vt);return Math.min(K[V-1].percent+at,100)}else{let at=zt*100/(Wt-vt);return Math.max(0,K[V+1].percent-at)}},Ji=V=>{let at;if(typeof oe=="function"){let jt=fe(0,100,vt,Wt,V);at=oe(jt,V)}else at=oe;if(St(at)){let jt=Wt-vt;return at=jt===0?0:at*100/jt,at}},sn=V=>{if(V===void 0)return;let at=fe(0,100,vt,Wt,V);return Tt!==void 0?Tt[Math.round(at)]:qt(at,Be)},zn=()=>Tt!==void 0?Tt[vt]:vt,Jr=()=>Tt!==void 0?Tt[Wt]:Wt,ea=()=>oe,Un=V=>{var at;return V<=0||ee?zn():(at=sn(K[V-1].percent))!=null?at:""},fl=V=>{var at;return K.length<=1||V>=K.length-1||ee?Jr():(at=sn(K[V+1].percent))!=null?at:""},Yr=()=>K.map(V=>V.percent),Yi=()=>K.map(V=>sn(V.percent)),Pr=()=>K.map(V=>V.$pointer),ms=()=>vt,bs=()=>Wt,ra=()=>Tt,na=()=>ue,ia=()=>Be,Xi=()=>zt,oa=()=>ye,pi=V=>Sr[V],yr=()=>nr,Oe=()=>It,fi=()=>ke,yi=()=>fr,aa=()=>Me,Qi=()=>ee,Ki=()=>Ue,qe=(V,at)=>{if(at===void 0)return;let jt=Ji(at);jt!==void 0&&(at=Bt(at,jt));let ve=K[V];if(!ve)return;let xe=ve.updatePosition(at,ys(V),Vn(V),ue,nr,It);Dt==null||Dt.updatePosition(ue,K.map(se=>se.percent),nr,It),Zr();for(let se of K){let He=sn(se.percent);He!==void 0&&(se.setAttr("aria-valuenow",He.toString()),se.setAttr("aria-valuetext",He.toString()))}sa(),xe&&lr(L,K.map(se=>sn(se.percent)))},Ur=()=>{for(let V=0;V<K.length;V++)qe(V,K[V].percent)},ln=(V,at)=>{vt=Tt!==void 0?0:Ot(V,ta),Wt=Tt!==void 0?Tt.length-1:Ot(at,Er),mr(vt),to(Wt)},sa=()=>{var V,at;for(let jt=0;jt<K.length;jt++){let ve=K[jt];ve.setAttr("aria-valuemin",((V=Un(jt))!=null?V:"").toString()),ve.setAttr("aria-valuemax",((at=fl(jt))!=null?at:"").toString())}},mr=V=>{vt=Ot(V,ta),vt>Wt&&(Wt=vt+Er),Ur()},to=V=>{Wt=Ot(V,Er),Wt<vt&&(Wt=vt+Er),Ur()},jn=V=>{ee=!0;for(let at=0;at<V.length;at++)eo(V[at],at);ee=!1;for(let at=0;at<V.length;at++)eo(V[at],at)},eo=(V,at)=>{let jt;Tt!==void 0?(jt=V==null?0:Le(V,Tt),jt===-1&&(jt=0)):(jt=Ot(V,vt),jt<vt&&(jt=vt),jt>Wt&&(jt=Wt));let ve=fe(vt,Wt,0,100,jt);qe(at,ve)},qn=V=>{if(V==null){oe=void 0;return}if(typeof V=="function"){oe=V,Ur();return}if(St(V)){oe=Ot(V,1);let at=Math.abs(Wt-vt);oe>at&&(oe=void 0),Ur();return}oe=void 0},Gn=V=>{ee=V,Ur()},la=V=>{(!St(V)||V<0)&&(V=0),zt=V},ro=V=>{(!St(V)||V<0)&&(V=1/0),ye=V},un=V=>{ke=V,z.classList.toggle("disabled",ke),ke?z.setAttribute("aria-disabled","true"):z.hasAttribute("aria-disabled")&&z.removeAttribute("aria-disabled")},mi=V=>{fr=V},En=V=>{Me=V,Me?document.removeEventListener("wheel",qi):document.addEventListener("wheel",qi,{passive:!1})},no=V=>{if(V==null){Tt=void 0;return}if(Tt=hr(V),Tt===void 0||Tt.length<=0){Tt=void 0;return}mr(0),to(Tt.length-1),oe===void 0&&qn(1)},Ir=V=>{var at;typeof V=="string"?ue=V.trim().toLowerCase()===Ut?Ut:Qt:ue=Qt;let jt=(at=L.shadowRoot)==null?void 0:at.querySelector(".range-slider-box");if(!jt)return;jt.className=`range-slider-box type-${ue}`,Ur();let ve=ue===Ut?"vertical":"horizontal";for(let xe of K)xe.setAttr("aria-orientation",ve)},ua=V=>{nr=V,K.length>1&&hs(K,nr,L),Ur(),Zr()},io=V=>{It=V,K.length>1&&hs(K,It,L),Ur(),Zr()},Tr=V=>{Be=Ot(V,an),Be<0&&(Be=an),Zr()},oo=V=>{V==null||V.toString().trim().toLowerCase()==="false"?(Fr=void 0,z.style.removeProperty(Ce),z.classList.remove(on)):(Fr=V.toString(),z.style.setProperty(Ce,Fr),z.classList.add(on))},br=(V,at)=>{let jt=K[V];!jt||(jt.setAttr("aria-label",at),Sr[V]=at)},bi=V=>{if(Ee=void 0,K.length<=1){Ue=!1,z.classList.remove(Gr);return}Ue=V,z.classList.toggle(Gr,Ue)},Wn=()=>{un(xt(L.getAttribute(I))),fr=xt(L.getAttribute($)),Me=xt(L.getAttribute(M));let V=Vi(L,/^pointer([0-9]*)-disabled$/,at=>xt(at));for(let at of V){let jt=at[0];!K[jt]||(K[jt].disabled=at[1])}},yl=()=>{let V=Vi(L,/^aria-label([0-9]*)$/);for(let at of V){let jt=at[0];br(jt,at[1])}},Zn=V=>{let at=K.length,jt=K[at-1].$pointer,ve=jt.cloneNode(!0);jt.after(ve);let xe=Ae(L,ve,at);return xe.setCallbacks(On,ps,Gi,Wi),K.push(xe),eo(V,at),Ur(),Zr(),at},ca=()=>{let V=K.length,at=K[V-1];return at?(at.destroy(),K.pop(),K.length<=1&&bi(!1),Ur(),Zr(),V-1):-1};return(()=>{var V,at;for(let ve of K)ve.setCallbacks(On,ps,Gi,Wi);let jt=(V=L.shadowRoot)==null?void 0:V.querySelector(".panel-fill");jt&&(Dt=We(jt)),Ir(L.getAttribute(S)),ua(xt(L.getAttribute(A))),io(xt(L.getAttribute(R))),ln(L.getAttribute(w),L.getAttribute(x)),qn(L.getAttribute(j)),no(L.getAttribute(g)),jn(rt.map(ve=>ve[1])),Gn(xt(L.getAttribute(m))),la(Ot(L.getAttribute(O),0)),ro(Ot(L.getAttribute(r),1/0)),bi(xt(L.getAttribute(b))),Tr(Ot(L.getAttribute(E),an)),Wn(),yl(),Jt=ci(L,z,K),oo((at=L.getAttribute(wt))!=null?at:Cr),z.addEventListener("mousedown",ds),z.addEventListener("mouseup",Wr),z.addEventListener("touchmove",Vr),z.addEventListener("touchstart",Vr),Me||document.addEventListener("wheel",qi,{passive:!1}),ft=us(L,Zi,{setValues:jn,setMin:mr,setMax:to,setStep:qn,setPointersOverlap:Gn,setPointersMinDistance:la,setPointersMaxDistance:ro,setDisabled:un,setType:Ir,setRightToLeft:ua,setBottomToTop:io,setRound:Tr,setKeyboardDisabled:mi,setMousewheelDisabled:En,setRangeDragging:bi,setData:no},{getPercents:Yr,getValues:Yi,getPointerElements:Pr,getMin:ms,getMax:bs,getStep:ea,getData:ra,getType:na,getRound:ia,getTextMin:zn,getTextMax:Jr,isRightToLeft:yr,isBottomToTop:Oe,isDisabled:fi,isKeyboardDisabled:yi,isMousewheelDisabled:aa,isPointersOverlap:Qi,isRangeDraggingEnabled:Ki,getPointersMinDistance:Xi,getPointersMaxDistance:oa}),ft.init()})(),{get pointers(){return K},get styles(){return Jt},get pluginsManager(){return ft},get min(){return zn()},get max(){return Jr()},get step(){return ea()},get pointersOverlap(){return Qi()},set pointersOverlap(V){Gn(V)},get pointersMinDistance(){return Xi()},set pointersMinDistance(V){la(V)},get pointersMaxDistance(){return oa()},set pointersMaxDistance(V){ro(V)},get disabled(){return fi()},set disabled(V){un(V)},get data(){return ra()},get type(){return na()},set type(V){Ir(V)},get rightToLeft(){return yr()},set rightToLeft(V){ua(V)},get bottomToTop(){return Oe()},set bottomToTop(V){io(V)},get round(){return ia()},set round(V){Tr(V)},get animateOnClick(){return Fr},set animateOnClick(V){oo(V)},get keyboardDisabled(){return yi()},set keyboardDisabled(V){mi(V)},get mousewheelDisabled(){return aa()},set mousewheelDisabled(V){En(V)},get rangeDragging(){return Ki()},set rangeDragging(V){bi(V)},setMin:mr,setMax:to,setValue:eo,setStep:qn,setData:no,getTextValue:sn,setAriaLabel:br,getAriaLabel:pi,addPointer:Zn,removePointer:ca,destroy:()=>{z.removeEventListener("mousedown",ds),z.removeEventListener("mouseup",Wr),z.removeEventListener("touchmove",Vr),z.removeEventListener("touchstart",Vr),document.removeEventListener("wheel",qi);for(let V of K)V.destroy();ft==null||ft.destroy()}}},Hn=(L,z,rt)=>{let K=ls.find(([ft,vt,Wt,oe])=>vt.replace("#","")===z.replace(/\d+/g,""));if(K&&L.styles){let[ft,vt,Wt,oe]=K,Tt=z.replace(/\D/g,"").trim(),ue=Tt===""||Tt==="0"||Tt==="1"?0:Ot(Tt,0)-1;L.styles.setStyle(ft,rt,ue);return}switch(L&&L.pluginsManager&&L.pluginsManager.onAttrChange(z,rt),z){case w:{L.setMin(rt);break}case x:{L.setMax(rt);break}case j:{L.setStep(rt);break}case m:{L.pointersOverlap=xt(rt);break}case O:{L.pointersMinDistance=Ot(rt,0);break}case b:{L.rangeDragging=xt(rt);break}case r:{L.pointersMaxDistance=Ot(rt,1/0);break}case I:{L.disabled=xt(rt);break}case $:{L.keyboardDisabled=xt(rt);break}case M:{L.mousewheelDisabled=xt(rt);break}case g:{L.setData(rt);break}case S:{L.type=rt;break}case A:{L.rightToLeft=xt(rt);break}case R:{L.bottomToTop=xt(rt);break}case E:{L.round=Ot(rt,an);break}case T:{L.styles&&(L.styles.theme=rt);break}case wt:{L.animateOnClick=rt;break}}let yt=null;if(/^value([0-9]*)$/.test(z)&&(yt="value"),/^pointer([0-9]*)-disabled$/.test(z)&&(yt="pointer-disabled"),/^aria-label([0-9]*)$/.test(z)&&(yt="aria-label"),/^pointer([0-9]*)-shape$/.test(z)&&(yt="pointer-shape"),!yt)return;let Dt=z.replace(/\D/g,"").trim(),Jt=Dt===""||Dt==="0"||Dt==="1"?0:Ot(Dt,0)-1;switch(yt){case"value":{L.setValue(rt,Jt);break}case"pointer-disabled":{let ft=L==null?void 0:L.pointers[Jt];if(!ft)return;ft.disabled=xt(rt);break}case"aria-label":{L.setAriaLabel(Jt,rt);break}case"pointer-shape":{L.styles&&L.styles.setPointerShape(Jt,rt);break}}},dl=class extends HTMLElement{constructor(){super(),v(this,"slider"),v(this,"_externalCSSList",[]),v(this,"_observer",null),this.attachShadow({mode:"open"})}set step(L){this.slider&&this.slider.setStep(L)}get step(){var L;return(L=this.slider)==null?void 0:L.step}set disabled(L){this.slider&&(this.slider.disabled=L)}get disabled(){var L,z;return(z=(L=this.slider)==null?void 0:L.disabled)!=null?z:!1}set data(L){var z;(z=this.slider)==null||z.setData(L)}get data(){var L;return(L=this.slider)==null?void 0:L.data}set min(L){var z;(z=this.slider)==null||z.setMin(L)}get min(){var L;return(L=this.slider)==null?void 0:L.min}set max(L){var z;(z=this.slider)==null||z.setMax(L)}get max(){var L;return(L=this.slider)==null?void 0:L.max}set round(L){!this.slider||(this.slider.round=L)}get round(){var L,z;return(z=(L=this.slider)==null?void 0:L.round)!=null?z:an}set type(L){!this.slider||(this.slider.type=L??Qt)}get type(){var L;return((L=this.slider)==null?void 0:L.type)||Qt}set pointersOverlap(L){!this.slider||(this.slider.pointersOverlap=L)}get pointersOverlap(){var L,z;return(z=(L=this.slider)==null?void 0:L.pointersOverlap)!=null?z:!1}set pointersMinDistance(L){!this.slider||(this.slider.pointersMinDistance=L)}get pointersMinDistance(){var L,z;return(z=(L=this.slider)==null?void 0:L.pointersMinDistance)!=null?z:0}set pointersMaxDistance(L){!this.slider||(this.slider.pointersMaxDistance=L)}get pointersMaxDistance(){var L,z;return(z=(L=this.slider)==null?void 0:L.pointersMaxDistance)!=null?z:1/0}set theme(L){!this.slider||!this.slider.styles||(this.slider.styles.theme=L)}get theme(){var L,z,rt;return(rt=(z=(L=this.slider)==null?void 0:L.styles)==null?void 0:z.theme)!=null?rt:null}set rtl(L){!this.slider||(this.slider.rightToLeft=L)}get rtl(){var L,z;return(z=(L=this.slider)==null?void 0:L.rightToLeft)!=null?z:!1}set btt(L){!this.slider||(this.slider.bottomToTop=L)}get btt(){var L,z;return(z=(L=this.slider)==null?void 0:L.bottomToTop)!=null?z:!1}set keyboardDisabled(L){!this.slider||(this.slider.keyboardDisabled=L)}get keyboardDisabled(){var L,z;return(z=(L=this.slider)==null?void 0:L.keyboardDisabled)!=null?z:!1}set mousewheelDisabled(L){!this.slider||(this.slider.mousewheelDisabled=L)}get mousewheelDisabled(){var L,z;return(z=(L=this.slider)==null?void 0:L.mousewheelDisabled)!=null?z:!1}set animateOnClick(L){!this.slider||(this.slider.animateOnClick=L)}get animateOnClick(){var L;return(L=this.slider)==null?void 0:L.animateOnClick}get rangeDragging(){var L,z;return(z=(L=this.slider)==null?void 0:L.rangeDragging)!=null?z:!1}set rangeDragging(L){this.slider&&(this.slider.rangeDragging=xt(L))}get externalCSSList(){return this._externalCSSList}addPointer(L){var z,rt;if(!this.slider)return;let K=(rt=(z=this.slider)==null?void 0:z.addPointer(L))!=null?rt:0;zi(this,this.slider,K,`value${K+1}`,`ariaLabel${K+1}`,`pointerShape${K+1}`,`pointer${K+1}Disabled`)}removePointer(){var L;!this.slider||(L=this.slider)==null||L.removePointer()}addCSS(L){if(!this.shadowRoot)return;let z=document.createElement("style");z.textContent=L,this.shadowRoot.appendChild(z)}connectedCallback(){var L,z;if(!this.shadowRoot)return;this._externalCSSList=Nn(this),this.shadowRoot.innerHTML=k(C,this._externalCSSList);let rt=(L=this.shadowRoot)==null?void 0:L.querySelector(".pointer");if(!rt)return;let K=(z=this.shadowRoot)==null?void 0:z.getElementById("range-slider");if(!K)return;let yt=kn(this,rt);this.slider=hi(this,K,yt),Mr(this,this.slider),this._observer=new MutationObserver(Dt=>{Dt.forEach(Jt=>{var ft;if(!this.slider||Jt.type!=="attributes")return;let vt=Jt.attributeName;!vt||Hn(this.slider,vt,(ft=this.getAttribute(vt))!=null?ft:"")})}),this._observer.observe(this,{attributes:!0})}disconnectedCallback(){this._observer&&this._observer.disconnect(),this.slider&&this.slider.destroy()}},Hr=dl;window.tcRangeSlider=Hr,customElements.get("toolcool-range-slider")||customElements.define("toolcool-range-slider",Hr),customElements.get("tc-range-slider")||customElements.define("tc-range-slider",class extends Hr{})})();function Jd(y,l){Object.keys(l).forEach(p=>{y.setAttribute(p,l[p])})}class Yd extends Zd{register(){super.register()}unregister(){super.unregister()}build(){const l=this.schema.properties,p=this.options,v=this.schema.description,k=this.theme,C=this.defaults.startVals[this.key];p.compact||(this.header=this.label=k.getFormInputLabel(this.getTitle(),this.isRequired())),v&&(this.description=k.getFormInputDescription(this.translateProperty(v))),p.infoText&&(this.infoButton=k.getInfoButton(this.translateProperty(p.infoText)));const m=document.createElement("tc-range-slider"),O=Object.keys(l).find(g=>g.includes("min")),r=Object.keys(l).find(g=>g.includes("max")),b={min:l[O].minimum,max:l[r].maximum,value1:(C==null?void 0:C[O])||l[O].default,value2:(C==null?void 0:C[r])||l[r].default,"slider-bg-fill":"#004170","generate-labels":"true","slider-width":"100%","range-dragging":"false"};Jd(m,b),this.input=m,this.input.id=this.formname,this.control=k.getFormControl(this.label,this.input,this.description,this.infoButton),(this.schema.readOnly||this.schema.readonly)&&(this.disable(!0),this.input.disabled=!0),this.input.addEventListener("change",g=>{g.preventDefault(),g.stopPropagation(),this.value={[O]:g.detail.value1,[r]:g.detail.value2},this.onChange(!0)}),this.container.appendChild(this.control)}destroy(){this.label&&this.label.parentNode&&this.label.parentNode.removeChild(this.label),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),super.destroy()}}const Xd=[{type:"object",format:"minmax",func:Yd}],Qd=y=>{Xd.map(({type:l,format:p,func:v})=>{Da.JSONEditor.defaults.startVals=y,Da.JSONEditor.defaults.editors[p]=v,Da.JSONEditor.defaults.resolvers.unshift(k=>{if(k.type===l&&k.format===p)return p})})};class pc extends kr{constructor(){super();ce(this,$a);ce(this,Ma);ce(this,$i,{});ce(this,ui,null);this.schema,this.startVals,this.options={},this.unstyled=!1}getSchema(){return this.schema}setSchema(p){this.schema=p}getDefaultValues(){return this.startVals}setDefaultValues(p){this.startVals=p}getValues(){return ge(this,$i)}firstUpdated(){if(!ge(this,ui)){Qd(this.startVals||{});const p=this.renderRoot.querySelector("form");Si(this,ui,new Da.JSONEditor(p,{schema:this.schema,...this.startVals?{startval:this.startVals}:{},theme:"html",ajax:!0,...this.options})),Dr(this,Ma,Vc).call(this)}}render(){return ae`
|
|
353
358
|
<style>
|
|
354
|
-
${
|
|
355
|
-
${!this.unstyled&&
|
|
359
|
+
${Gd}
|
|
360
|
+
${!this.unstyled&&Wd}
|
|
356
361
|
</style>
|
|
357
362
|
<form></form>
|
|
358
|
-
`}}
|
|
363
|
+
`}}$i=new WeakMap,ui=new WeakMap,$a=new WeakSet,Fc=function(){this.dispatchEvent(new CustomEvent("change",{detail:ge(this,$i),bubbles:!0,composed:!0})),this.requestUpdate()},Ma=new WeakSet,Vc=function(){["ready","change"].map(v=>{ge(this,ui).on(v,()=>{Si(this,$i,ge(this,ui).getValue()),Dr(this,$a,Fc).call(this)})})},Je(pc,"properties",{schema:{attribute:!1,type:Object},startVals:{attribute:!1,type:Object},options:{attribute:!1,type:Object},unstyled:{type:Boolean}}),customElements.define("eox-jsonform",pc);class fc extends kr{constructor(){super();ce(this,Ha);ce(this,Yo,{});ce(this,Xo,null);ce(this,Mi,void 0);ce(this,Fa,"");ce(this,Va,"");this.layer=null,this.unstyled=!1,this.noShadow=!0,this.layerConfig=null}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){return this.layerConfig?(Si(this,Xo,Bd(this.layer,this.layerConfig)),ae`
|
|
359
364
|
<style>
|
|
360
|
-
${
|
|
361
|
-
${!this.unstyled&&
|
|
365
|
+
${ge(this,Fa)}
|
|
366
|
+
${!this.unstyled&&ge(this,Va)}
|
|
362
367
|
</style>
|
|
363
368
|
<eox-jsonform
|
|
364
369
|
.schema=${this.layerConfig.schema}
|
|
365
|
-
.startVals=${
|
|
370
|
+
.startVals=${ge(this,Xo)}
|
|
366
371
|
.options=${{disable_edit_json:!0,disable_collapse:!0,disable_properties:!0}}
|
|
367
|
-
@change=${
|
|
372
|
+
@change=${Dr(this,Ha,zc)}
|
|
368
373
|
></eox-jsonform>
|
|
369
|
-
`):""}}
|
|
374
|
+
`):""}}Yo=new WeakMap,Xo=new WeakMap,Mi=new WeakMap,Ha=new WeakSet,zc=function(p){Si(this,Yo,p.detail),this.layer.getSource().getTileUrlFunction()&&(ge(this,Mi)||Si(this,Mi,this.layer.getSource().getTileUrlFunction()),this.layer.getSource().setTileUrlFunction((...v)=>Id(ge(this,Mi).call(this,...v),ge(this,Yo))),this.layer.getSource().setKey(new Date)),this.requestUpdate()},Fa=new WeakMap,Va=new WeakMap,Je(fc,"properties",{layer:{attribute:!1},unstyled:{type:Boolean},noShadow:{type:Boolean},layerConfig:{attribute:!1}}),customElements.define("eox-layercontrol-layerconfig",fc);class yc extends kr{constructor(){super();ce(this,za,`
|
|
370
375
|
.tabbed figure {
|
|
371
376
|
margin: 0;
|
|
372
377
|
}
|
|
@@ -386,7 +391,7 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
386
391
|
.tabbed label.highlighted {
|
|
387
392
|
background: lightgrey;
|
|
388
393
|
}
|
|
389
|
-
`);
|
|
394
|
+
`);ce(this,Ua,`
|
|
390
395
|
.tabbed {
|
|
391
396
|
font-size: small;
|
|
392
397
|
}
|
|
@@ -407,42 +412,42 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
407
412
|
background: #00417011;
|
|
408
413
|
border-top: 1px solid #0041701a;
|
|
409
414
|
}
|
|
410
|
-
`);this.actions=[],this.selectedTab=0,this.tabs=[],this.unstyled=!1,this.noShadow=!0}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){return
|
|
415
|
+
`);this.actions=[],this.selectedTab=0,this.tabs=[],this.unstyled=!1,this.noShadow=!0}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){return ae`
|
|
411
416
|
<style>
|
|
412
|
-
${
|
|
413
|
-
${!this.unstyled&&
|
|
417
|
+
${ge(this,za)}
|
|
418
|
+
${!this.unstyled&&ge(this,Ua)}
|
|
414
419
|
</style>
|
|
415
420
|
<div class="tabbed">
|
|
416
|
-
${
|
|
421
|
+
${tn(this.actions.length+this.tabs.length>1,()=>ae`
|
|
417
422
|
<nav>
|
|
418
423
|
<div>
|
|
419
|
-
${
|
|
424
|
+
${Ia(this.tabs,(p,v)=>ae`
|
|
420
425
|
<label
|
|
421
426
|
class=${this.selectedTab===v&&"highlighted"}
|
|
422
427
|
@click=${()=>this.selectedTab=v}
|
|
423
428
|
>
|
|
424
|
-
<slot name=${
|
|
429
|
+
<slot name=${p+"-icon"}>${p}</slot>
|
|
425
430
|
</label>
|
|
426
431
|
`)}
|
|
427
432
|
</div>
|
|
428
433
|
<div>
|
|
429
|
-
${
|
|
434
|
+
${Ia(this.actions,p=>ae`
|
|
430
435
|
<span>
|
|
431
|
-
<slot name=${
|
|
436
|
+
<slot name=${p+"-icon"}>${p}</slot>
|
|
432
437
|
</span>
|
|
433
438
|
`)}
|
|
434
439
|
</div>
|
|
435
440
|
</nav>
|
|
436
441
|
`)}
|
|
437
442
|
<figure>
|
|
438
|
-
${
|
|
443
|
+
${Ia(this.tabs,(p,v)=>ae`
|
|
439
444
|
<div class="tab ${this.selectedTab===v&&"highlighted"}">
|
|
440
|
-
<slot name=${
|
|
445
|
+
<slot name=${p+"-content"}>${p}</slot>
|
|
441
446
|
</div>
|
|
442
447
|
`)}
|
|
443
448
|
</figure>
|
|
444
449
|
</div>
|
|
445
|
-
`}}
|
|
450
|
+
`}}za=new WeakMap,Ua=new WeakMap,Je(yc,"properties",{actions:{attribute:!1},selectedTab:{state:!0},tabs:{attribute:!1},unstyled:{type:Boolean},noShadow:{type:Boolean}}),customElements.define("eox-layercontrol-tabs",yc);const Kd=`
|
|
446
451
|
button {
|
|
447
452
|
/* TODO: why does this only work here and not from :root? */
|
|
448
453
|
--primary-color: #004170;
|
|
@@ -531,22 +536,22 @@ button.small {
|
|
|
531
536
|
padding: 12.4px;
|
|
532
537
|
font-size: .75rem;
|
|
533
538
|
}
|
|
534
|
-
`;class
|
|
539
|
+
`;class mc extends kr{constructor(){super();Je(this,"_parseActions",p=>p==null?void 0:p.filter(v=>["remove","sort"].filter(k=>{var C;return(C=this.layer)!=null&&C.get("layerControlDisable")?k!=="sort":!0}).includes(v)));Je(this,"_parseTools",p=>p==null?void 0:p.filter(v=>{let k=!0;return["remove","sort"].includes(v)&&(k=!1),v==="info"&&(k=this.layer.get("description")),v==="config"&&(k=this.layer.get("layerConfig")),k}));Je(this,"_removeButton",ae`
|
|
535
540
|
<button
|
|
536
541
|
class="remove-icon icon"
|
|
537
|
-
@click=${()=>{var
|
|
542
|
+
@click=${()=>{var p,v;(p=this.layer)==null||p.set("layerControlOptional",!0),(v=this.layer)==null||v.setVisible(!1),this.dispatchEvent(new CustomEvent("changed",{detail:this.layer,bubbles:!0}))}}
|
|
538
543
|
>
|
|
539
|
-
${this.unstyled?"x":
|
|
544
|
+
${this.unstyled?"x":we}
|
|
540
545
|
</button>
|
|
541
|
-
`);
|
|
546
|
+
`);Je(this,"_sortButton",ae`
|
|
542
547
|
<button class="sort-icon icon drag-handle">
|
|
543
|
-
${this.unstyled?"sort":
|
|
548
|
+
${this.unstyled?"sort":we}
|
|
544
549
|
</button>
|
|
545
|
-
`);
|
|
546
|
-
${
|
|
547
|
-
${
|
|
548
|
-
${
|
|
549
|
-
${
|
|
550
|
+
`);ce(this,qa,"");ce(this,Ga,`
|
|
551
|
+
${Kd}
|
|
552
|
+
${uc}
|
|
553
|
+
${ll}
|
|
554
|
+
${cc}
|
|
550
555
|
button.icon.drag-handle {
|
|
551
556
|
cursor: n-resize;
|
|
552
557
|
}
|
|
@@ -636,22 +641,22 @@ button.small {
|
|
|
636
641
|
[slot=opacity-content] {
|
|
637
642
|
padding: 12px 6px;
|
|
638
643
|
}
|
|
639
|
-
`);this.layer=null,this.tools=[],this.unstyled=!1,this.noShadow=!0}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){var
|
|
644
|
+
`);this.layer=null,this.tools=[],this.unstyled=!1,this.noShadow=!0}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){var p,v;return ae`
|
|
640
645
|
<style>
|
|
641
|
-
${
|
|
642
|
-
${!this.unstyled&&
|
|
646
|
+
${ge(this,qa)}
|
|
647
|
+
${!this.unstyled&&ge(this,Ga)}
|
|
643
648
|
</style>
|
|
644
|
-
${
|
|
645
|
-
${
|
|
649
|
+
${tn(((p=this._parseActions(this.tools))==null?void 0:p.length)+((v=this._parseTools(this.tools))==null?void 0:v.length)>0,()=>{var k,C;return ae`
|
|
650
|
+
${tn(((k=this._parseActions(this.tools))==null?void 0:k.length)===1&&((C=this._parseTools(this.tools))==null?void 0:C.length)===0,()=>ae`
|
|
646
651
|
<div class="single-action-container">
|
|
647
652
|
<div class="single-action">
|
|
648
653
|
${this[`_${this._parseActions(this.tools)[0]}Button`]}
|
|
649
654
|
</div>
|
|
650
655
|
</div>
|
|
651
|
-
`,()=>{var m;return
|
|
656
|
+
`,()=>{var m;return ae`
|
|
652
657
|
<details
|
|
653
658
|
class="tools"
|
|
654
|
-
open=${this.layer.get("layerControlToolsExpand")||
|
|
659
|
+
open=${this.layer.get("layerControlToolsExpand")||we}
|
|
655
660
|
>
|
|
656
661
|
<summary>
|
|
657
662
|
<button
|
|
@@ -666,14 +671,14 @@ button.small {
|
|
|
666
671
|
.tabs=${this._parseTools(this.tools)}
|
|
667
672
|
.unstyled=${this.unstyled}
|
|
668
673
|
>
|
|
669
|
-
${
|
|
670
|
-
<button slot="${
|
|
671
|
-
${this.unstyled?
|
|
674
|
+
${Ia(this._parseTools(this.tools),O=>ae`
|
|
675
|
+
<button slot="${O}-icon" class="icon">
|
|
676
|
+
${this.unstyled?O:we}
|
|
672
677
|
</button>
|
|
673
678
|
`)}
|
|
674
679
|
|
|
675
680
|
<div slot="info-content">
|
|
676
|
-
${
|
|
681
|
+
${Ud(this.layer.get("description"))}
|
|
677
682
|
</div>
|
|
678
683
|
<div slot="opacity-content">
|
|
679
684
|
<input
|
|
@@ -681,8 +686,8 @@ button.small {
|
|
|
681
686
|
min="0"
|
|
682
687
|
max="1"
|
|
683
688
|
step="0.01"
|
|
684
|
-
value=${
|
|
685
|
-
@input=${
|
|
689
|
+
value=${sc((m=this.layer)==null?void 0:m.getOpacity())}
|
|
690
|
+
@input=${O=>this.layer.setOpacity(parseFloat(O.target.value))}
|
|
686
691
|
/>
|
|
687
692
|
</div>
|
|
688
693
|
<div slot="config-content">
|
|
@@ -701,8 +706,8 @@ button.small {
|
|
|
701
706
|
</details>
|
|
702
707
|
`})}
|
|
703
708
|
`})}
|
|
704
|
-
`}}
|
|
705
|
-
${
|
|
709
|
+
`}}qa=new WeakMap,Ga=new WeakMap,Je(mc,"properties",{layer:{attribute:!1},tools:{attribute:!1},unstyled:{type:Boolean},noShadow:{type:Boolean}}),customElements.define("eox-layercontrol-layer-tools",mc);class bc extends kr{constructor(){super();Je(this,"currLayerVisibilityBasedOnZoom",!0);ce(this,Wa,"");ce(this,Za,`
|
|
710
|
+
${ll}
|
|
706
711
|
eox-layercontrol-layer {
|
|
707
712
|
width: 100%;
|
|
708
713
|
}
|
|
@@ -742,12 +747,12 @@ button.small {
|
|
|
742
747
|
[data-type=draw] .title::before {
|
|
743
748
|
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%230041703a' viewBox='0 0 24 24'%3E%3Ctitle%3Evector-square-edit%3C/title%3E%3Cpath d='M22.7 14.4L21.7 15.4L19.6 13.3L20.6 12.3C20.8 12.1 21.2 12.1 21.4 12.3L22.7 13.6C22.9 13.8 22.9 14.1 22.7 14.4M13 19.9L19.1 13.8L21.2 15.9L15.1 22H13V19.9M11 19.9V19.1L11.6 18.5L12.1 18H8V16H6V8H8V6H16V8H18V12.1L19.1 11L19.3 10.8C19.5 10.6 19.8 10.4 20.1 10.3V8H22.1V2H16.1V4H8V2H2V8H4V16H2V22H8V20L11 19.9M18 4H20V6H18V4M4 4H6V6H4V4M6 20H4V18H6V20Z' /%3E%3C/svg%3E");
|
|
744
749
|
}
|
|
745
|
-
`);this.layer=null,this.map=null,this.titleProperty="title",this.showLayerZoomState=!1,this.tools=[],this.unstyled=!1,this.noShadow=!0}updateLayerZoomVisibility(){const
|
|
750
|
+
`);this.layer=null,this.map=null,this.titleProperty="title",this.showLayerZoomState=!1,this.tools=[],this.unstyled=!1,this.noShadow=!0}updateLayerZoomVisibility(){const p=Rd(this.layer,this.map,this.showLayerZoomState);let v=!1;!p&&this.currLayerVisibilityBasedOnZoom?(this.currLayerVisibilityBasedOnZoom=!1,v=!0):p&&!this.currLayerVisibilityBasedOnZoom&&(this.currLayerVisibilityBasedOnZoom=!0,v=!0),v&&(this.requestUpdate(),this.dispatchEvent(new CustomEvent("change:resolution",{bubbles:!0})))}firstUpdated(){nc(this.layer,this.showLayerZoomState)&&(this.updateLayerZoomVisibility(),this.map.getView().on("change:resolution",()=>this.updateLayerZoomVisibility()))}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){return ae`
|
|
746
751
|
<style>
|
|
747
|
-
${
|
|
748
|
-
${!this.unstyled&&
|
|
752
|
+
${ge(this,Wa)}
|
|
753
|
+
${!this.unstyled&&ge(this,Za)}
|
|
749
754
|
</style>
|
|
750
|
-
${
|
|
755
|
+
${tn(this.layer,()=>{var p;return ae`
|
|
751
756
|
<div
|
|
752
757
|
class="layer ${this.layer.getVisible()?"visible":""}
|
|
753
758
|
${this.currLayerVisibilityBasedOnZoom?"":"zoom-state-invisible"}"
|
|
@@ -757,11 +762,11 @@ button.small {
|
|
|
757
762
|
>
|
|
758
763
|
<input
|
|
759
764
|
type=${this.layer.get("layerControlExclusive")?"radio":"checkbox"}
|
|
760
|
-
.checked=${
|
|
761
|
-
@click=${v=>{this.layer.setVisible(v.target.checked),v.target.checked&&this.layer.get("layerControlExclusive")&&this.parentNode.parentNode.querySelectorAll("li > eox-layercontrol-layer").forEach(
|
|
765
|
+
.checked=${sc(this.layer.getVisible())}
|
|
766
|
+
@click=${v=>{this.layer.setVisible(v.target.checked),v.target.checked&&this.layer.get("layerControlExclusive")&&this.parentNode.parentNode.querySelectorAll("li > eox-layercontrol-layer").forEach(C=>{var m;C.layer!==this.layer&&((m=C.layer)!=null&&m.get("layerControlExclusive"))&&(C.layer.setVisible(!1),C.requestUpdate())}),this.dispatchEvent(new CustomEvent("changed",{bubbles:!0})),this.requestUpdate()}}
|
|
762
767
|
/>
|
|
763
768
|
<span class="title">${this.layer.get(this.titleProperty)}</span>
|
|
764
|
-
${
|
|
769
|
+
${tn(((p=this.tools)==null?void 0:p.length)>0,()=>ae`<span class="tools-placeholder"></span>`)}
|
|
765
770
|
</label>
|
|
766
771
|
</div>
|
|
767
772
|
<eox-layercontrol-layer-tools
|
|
@@ -771,7 +776,7 @@ button.small {
|
|
|
771
776
|
.unstyled=${this.unstyled}
|
|
772
777
|
></eox-layercontrol-layer-tools>
|
|
773
778
|
`})}
|
|
774
|
-
`}}
|
|
779
|
+
`}}Wa=new WeakMap,Za=new WeakMap,Je(bc,"properties",{layer:{attribute:!1},map:{attribute:!1,state:!0},titleProperty:{attribute:"title-property",type:String},showLayerZoomState:{attribute:"show-layer-zoom-state",type:Boolean},tools:{attribute:!1},unstyled:{type:Boolean},noShadow:{type:Boolean}}),customElements.define("eox-layercontrol-layer",bc);class vc extends kr{constructor(){super();ce(this,Ja,"");ce(this,Ya,`
|
|
775
780
|
details summary {
|
|
776
781
|
cursor: pointer;
|
|
777
782
|
display: flex;
|
|
@@ -792,13 +797,13 @@ button.small {
|
|
|
792
797
|
details[open] > summary:before {
|
|
793
798
|
transform: rotate(90deg);
|
|
794
799
|
}
|
|
795
|
-
`);this.group=null,this.idProperty="id",this.map=null,this.titleProperty="title",this.showLayerZoomState=!1,this.tools=[],this.unstyled=!1,this.noShadow=!0}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){return
|
|
800
|
+
`);this.group=null,this.idProperty="id",this.map=null,this.titleProperty="title",this.showLayerZoomState=!1,this.tools=[],this.unstyled=!1,this.noShadow=!0}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){return ae`
|
|
796
801
|
<style>
|
|
797
|
-
${
|
|
798
|
-
${!this.unstyled&&
|
|
802
|
+
${ge(this,Ja)}
|
|
803
|
+
${!this.unstyled&&ge(this,Ya)}
|
|
799
804
|
</style>
|
|
800
|
-
${
|
|
801
|
-
<details open=${this.group.get("layerControlExpand")||
|
|
805
|
+
${tn(this.group,()=>ae`
|
|
806
|
+
<details open=${this.group.get("layerControlExpand")||we}>
|
|
802
807
|
<summary>
|
|
803
808
|
<eox-layercontrol-layer
|
|
804
809
|
.noShadow=${!0}
|
|
@@ -824,9 +829,10 @@ button.small {
|
|
|
824
829
|
></eox-layercontrol-layer-list>
|
|
825
830
|
</details>
|
|
826
831
|
`)}
|
|
827
|
-
`}}
|
|
832
|
+
`}}Ja=new WeakMap,Ya=new WeakMap,Je(vc,"properties",{group:{attribute:!1},idProperty:{attribute:"id-property"},map:{attribute:!1,state:!0},titleProperty:{attribute:"title-property",type:String},showLayerZoomState:{attribute:"show-layer-zoom-state",type:Boolean},tools:{attribute:!1},unstyled:{type:Boolean},noShadow:{type:Boolean}}),customElements.define("eox-layercontrol-layer-group",vc);var tp="Expected a function",gc=NaN,ep="[object Symbol]",rp=/^\s+|\s+$/g,np=/^[-+]0x[0-9a-f]+$/i,ip=/^0b[01]+$/i,op=/^0o[0-7]+$/i,ap=parseInt,sp=typeof Ba=="object"&&Ba&&Ba.Object===Object&&Ba,lp=typeof self=="object"&&self&&self.Object===Object&&self,up=sp||lp||Function("return this")(),cp=Object.prototype,hp=cp.toString,dp=Math.max,pp=Math.min,ul=function(){return up.Date.now()};function fp(y,l,p){var v,k,C,m,O,r,b=0,g=!1,w=!1,x=!0;if(typeof y!="function")throw new TypeError(tp);l=wc(l)||0,cl(p)&&(g=!!p.leading,w="maxWait"in p,C=w?dp(wc(p.maxWait)||0,l):C,x="trailing"in p?!!p.trailing:x);function j(B){var q=v,F=k;return v=k=void 0,b=B,m=y.apply(F,q),m}function E(B){return b=B,O=setTimeout(A,l),g?j(B):m}function S(B){var q=B-r,F=B-b,N=l-q;return w?pp(N,C-F):N}function T(B){var q=B-r,F=B-b;return r===void 0||q>=l||q<0||w&&F>=C}function A(){var B=ul();if(T(B))return R(B);O=setTimeout(A,S(B))}function R(B){return O=void 0,x&&v?j(B):(v=k=void 0,m)}function I(){O!==void 0&&clearTimeout(O),b=0,v=r=k=O=void 0}function $(){return O===void 0?m:R(ul())}function M(){var B=ul(),q=T(B);if(v=arguments,k=this,r=B,q){if(O===void 0)return E(r);if(w)return O=setTimeout(A,l),j(r)}return O===void 0&&(O=setTimeout(A,l)),m}return M.cancel=I,M.flush=$,M}function cl(y){var l=typeof y;return!!y&&(l=="object"||l=="function")}function yp(y){return!!y&&typeof y=="object"}function mp(y){return typeof y=="symbol"||yp(y)&&hp.call(y)==ep}function wc(y){if(typeof y=="number")return y;if(mp(y))return gc;if(cl(y)){var l=typeof y.valueOf=="function"?y.valueOf():y;y=cl(l)?l+"":l}if(typeof y!="string")return y===0?y:+y;y=y.replace(rp,"");var p=ip.test(y);return p||op.test(y)?ap(y.slice(2),p?2:8):np.test(y)?gc:+y}var bp=fp;const vp=qd(bp);class _c extends kr{constructor(){super();ce(this,Qo,()=>{ge(this,Xa).call(this)});ce(this,Xa,vp(()=>{this.requestUpdate(),this.dispatchEvent(new CustomEvent("changed",{bubbles:!0}))},50));ce(this,Qa,"");ce(this,Ka,`
|
|
828
833
|
ul {
|
|
829
834
|
padding: 0;
|
|
835
|
+
margin: 0;
|
|
830
836
|
}
|
|
831
837
|
ul ul {
|
|
832
838
|
padding-left: 48px;
|
|
@@ -851,22 +857,22 @@ button.small {
|
|
|
851
857
|
}
|
|
852
858
|
li.sortable-ghost {
|
|
853
859
|
}
|
|
854
|
-
`);this.idProperty="id",this.layers=null,this.map=null,this.tools=void 0,this.titleProperty="title",this.showLayerZoomState=!1,this.unstyled=!1,this.noShadow=!0}firstUpdated(){this.layers&&(
|
|
860
|
+
`);this.idProperty="id",this.layers=null,this.map=null,this.tools=void 0,this.titleProperty="title",this.showLayerZoomState=!1,this.unstyled=!1,this.noShadow=!0}firstUpdated(){this.layers&&(Ad(this.layers,this.idProperty,this.titleProperty),Td(this.renderRoot.querySelector("ul"),this.layers,this.idProperty,this))}updated(){var p;this.layers&&(this.layers.hasListener("change:length")&&((p=this.layers)==null||p.un("change:length",ge(this,Qo))),this.layers.on("change:length",ge(this,Qo)))}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){return ae`
|
|
855
861
|
<style>
|
|
856
|
-
${
|
|
857
|
-
${!this.unstyled&&
|
|
862
|
+
${ge(this,Qa)}
|
|
863
|
+
${!this.unstyled&&ge(this,Ka)}
|
|
858
864
|
</style>
|
|
859
865
|
<ul>
|
|
860
|
-
${
|
|
861
|
-
${
|
|
866
|
+
${tn(this.layers,()=>ae`
|
|
867
|
+
${dh(this.layers.getArray().filter(p=>!p.get("layerControlHide")&&!p.get("layerControlOptional")).reverse(),p=>p,p=>ae`
|
|
862
868
|
<li
|
|
863
|
-
data-layer="${
|
|
864
|
-
data-type="${
|
|
869
|
+
data-layer="${p.get(this.idProperty)}"
|
|
870
|
+
data-type="${Ld(p,this.map)}"
|
|
865
871
|
>
|
|
866
|
-
${
|
|
872
|
+
${p.getLayers?ae`
|
|
867
873
|
<eox-layercontrol-layer-group
|
|
868
874
|
.noShadow=${!0}
|
|
869
|
-
.group=${
|
|
875
|
+
.group=${p}
|
|
870
876
|
.idProperty=${this.idProperty}
|
|
871
877
|
.map=${this.map}
|
|
872
878
|
.titleProperty=${this.titleProperty}
|
|
@@ -876,10 +882,10 @@ button.small {
|
|
|
876
882
|
@changed=${()=>this.requestUpdate()}
|
|
877
883
|
>
|
|
878
884
|
</eox-layercontrol-layer-group>
|
|
879
|
-
`:
|
|
885
|
+
`:ae`
|
|
880
886
|
<eox-layercontrol-layer
|
|
881
887
|
.noShadow=${!0}
|
|
882
|
-
.layer=${
|
|
888
|
+
.layer=${p}
|
|
883
889
|
.map=${this.map}
|
|
884
890
|
.titleProperty=${this.titleProperty}
|
|
885
891
|
.showLayerZoomState=${this.showLayerZoomState}
|
|
@@ -892,37 +898,246 @@ button.small {
|
|
|
892
898
|
`)}
|
|
893
899
|
`)}
|
|
894
900
|
</ul>
|
|
895
|
-
`}}
|
|
901
|
+
`}}Qo=new WeakMap,Xa=new WeakMap,Qa=new WeakMap,Ka=new WeakMap,Je(_c,"properties",{idProperty:{attribute:"id-property"},layers:{attribute:!1},map:{attribute:!1,state:!0},titleProperty:{attribute:"title-property",type:String},showLayerZoomState:{attribute:"show-layer-zoom-state",type:Boolean},tools:{attribute:!1},unstyled:{type:Boolean},noShadow:{type:Boolean}}),customElements.define("eox-layercontrol-layer-list",_c);class xc extends kr{constructor(){super(),this.idProperty="id",this.layers=null,this.titleProperty="title",this.unstyled=!1,this.noShadow=!0}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){return ae`
|
|
896
902
|
<label for="optional">Optional layers</label>
|
|
897
903
|
|
|
898
904
|
<select name="optional" data-cy="optionalLayers">
|
|
899
905
|
<option disabled selected value>
|
|
900
906
|
-- select an optional layer to add --
|
|
901
907
|
</option>
|
|
902
|
-
${
|
|
908
|
+
${ol(this.layers.getArray(),"layerControlOptional",!0).map(l=>ae`
|
|
903
909
|
<option
|
|
904
|
-
value="${
|
|
910
|
+
value="${l.get(this.idProperty)||l.ol_uid}"
|
|
905
911
|
>
|
|
906
|
-
${
|
|
912
|
+
${l.get(this.titleProperty)||`layer ${l.get(this.idProperty)}`}
|
|
907
913
|
</option>
|
|
908
914
|
`)}
|
|
909
915
|
</select>
|
|
910
916
|
<button
|
|
911
|
-
@click="${()=>{const
|
|
917
|
+
@click="${()=>{const l=ol(this.layers.getArray(),"layerControlOptional",!0).find(p=>(p.get(this.idProperty)||p.ol_uid)===this.querySelector("select[name=optional]").value);l==null||l.set("layerControlOptional",!1),l==null||l.setVisible(!0),this.dispatchEvent(new CustomEvent("changed",{bubbles:!0})),this.renderRoot.parentNode.querySelectorAll("eox-layercontrol-layer-list").forEach(p=>p.requestUpdate()),this.requestUpdate()}}"
|
|
912
918
|
>
|
|
913
919
|
add
|
|
914
920
|
</button>
|
|
915
|
-
`}}
|
|
921
|
+
`}}Je(xc,"properties",{idProperty:{attribute:"id-property"},layers:{attribute:!1},titleProperty:{attribute:"title-property",type:String},unstyled:{type:Boolean},noShadow:{type:Boolean}}),customElements.define("eox-layercontrol-optional-list",xc);class kc extends kr{constructor(){super();ce(this,ts);ce(this,es);ce(this,Ko);ce(this,rs);ce(this,ns);ce(this,Hi);Je(this,"urlInput",null);Je(this,"open",null);Je(this,"jsonInput",null);Je(this,"searchLoad",!1);Je(this,"wmsCapabilities",null);ce(this,is,"");ce(this,os,`
|
|
922
|
+
.eox-add {
|
|
923
|
+
background: #f0f2f5;
|
|
924
|
+
border-top: 1px solid #0041701a;
|
|
925
|
+
padding: 0.5rem;
|
|
926
|
+
font-size: small;
|
|
927
|
+
}
|
|
928
|
+
.eox-add-layer-col, .eox-add-layer-tab {
|
|
929
|
+
display: flex;
|
|
930
|
+
width: 100%;
|
|
931
|
+
}
|
|
932
|
+
.eox-add-layer-main .close {
|
|
933
|
+
display: none;
|
|
934
|
+
}
|
|
935
|
+
.eox-add-layer-main .open {
|
|
936
|
+
position: relative;
|
|
937
|
+
}
|
|
938
|
+
button.icon.add-icon {
|
|
939
|
+
flex-grow: 1;
|
|
940
|
+
}
|
|
941
|
+
.eox-add-layer-tab li {
|
|
942
|
+
border: 0 !important;
|
|
943
|
+
font-size: smaller;
|
|
944
|
+
padding: 0.2rem 0.7rem;
|
|
945
|
+
background: #f0f2f5;
|
|
946
|
+
border-radius: 4px 4px 0px 0px;
|
|
947
|
+
font-size: 0.8rem;
|
|
948
|
+
font-weight: 500;
|
|
949
|
+
cursor: pointer;
|
|
950
|
+
}
|
|
951
|
+
.eox-add-layer-tab li.active {
|
|
952
|
+
background: #204270;
|
|
953
|
+
color: white;
|
|
954
|
+
font-weight: 700;
|
|
955
|
+
}
|
|
956
|
+
.relative {
|
|
957
|
+
position: relative
|
|
958
|
+
}
|
|
959
|
+
.eox-add-layer-col.justify-end {
|
|
960
|
+
justify-content: end;
|
|
961
|
+
}
|
|
962
|
+
.eox-add ul {
|
|
963
|
+
max-height: 120px;
|
|
964
|
+
overflow: scroll;
|
|
965
|
+
}
|
|
966
|
+
.eox-add ul li {
|
|
967
|
+
display: flex;
|
|
968
|
+
align-items: center;
|
|
969
|
+
justify-content: space-between;
|
|
970
|
+
padding: 0.1rem 0.2rem;
|
|
971
|
+
}
|
|
972
|
+
button.icon {
|
|
973
|
+
justify-content: end;
|
|
974
|
+
transition: opacity .2s;
|
|
975
|
+
opacity: .7;
|
|
976
|
+
}
|
|
977
|
+
button.icon:hover {
|
|
978
|
+
opacity: 1;
|
|
979
|
+
}
|
|
980
|
+
button.icon.add-layer-icon::before {
|
|
981
|
+
width: 16px;
|
|
982
|
+
min-width: 16px;
|
|
983
|
+
height: 16px;
|
|
984
|
+
}
|
|
985
|
+
button.icon.add-icon::before {
|
|
986
|
+
width: 18px;
|
|
987
|
+
min-width: 18px;
|
|
988
|
+
height: 18px;
|
|
989
|
+
}
|
|
990
|
+
.add-icon.icon::before {
|
|
991
|
+
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath xmlns='http://www.w3.org/2000/svg' d='M17,14H19V17H22V19H19V22H17V19H14V17H17V14M11,16L2,9L11,2L20,9L11,16M11,18.54L12,17.75V18C12,18.71 12.12,19.39 12.35,20L11,21.07L2,14.07L3.62,12.81L11,18.54Z' fill='%23004270'/%3E%3C/svg%3E");
|
|
992
|
+
}
|
|
993
|
+
.add-layer-icon::before {
|
|
994
|
+
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ctitle%3Eplus-thick%3C/title%3E%3Cpath fill='%23004270' d='M20 14H14V20H10V14H4V10H10V4H14V10H20V14Z' /%3E%3C/svg%3E");
|
|
995
|
+
}
|
|
996
|
+
.json-add-layer {
|
|
997
|
+
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ctitle%3Eplus-thick%3C/title%3E%3Cpath fill='white' d='M20 14H14V20H10V14H4V10H10V4H14V10H20V14Z' /%3E%3C/svg%3E");
|
|
998
|
+
}
|
|
999
|
+
.search-icon::after {
|
|
1000
|
+
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ctitle%3Emagnify%3C/title%3E%3Cpath d='M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z' fill='white' /%3E%3C/svg%3E");
|
|
1001
|
+
}
|
|
1002
|
+
.search-icon::after, .json-add-layer::before {
|
|
1003
|
+
width: 14px;
|
|
1004
|
+
min-width: 14px;
|
|
1005
|
+
height: 14px;
|
|
1006
|
+
display:flex
|
|
1007
|
+
margin-right: 6px;
|
|
1008
|
+
color: white;
|
|
1009
|
+
}
|
|
1010
|
+
.search-icon, .json-add-layer {
|
|
1011
|
+
padding: 4px 6px;
|
|
1012
|
+
height: 28px;
|
|
1013
|
+
border-radius: 0px 4px 4px 0px;
|
|
1014
|
+
box-shadow: none;
|
|
1015
|
+
}
|
|
1016
|
+
.json-add-layer {
|
|
1017
|
+
position: absolute;
|
|
1018
|
+
bottom: 16px;
|
|
1019
|
+
right: 14px;
|
|
1020
|
+
border-radius: 4px;
|
|
1021
|
+
height: 24px;
|
|
1022
|
+
padding: 4px;
|
|
1023
|
+
}
|
|
1024
|
+
input.add-url, textarea.add-layer-input {
|
|
1025
|
+
box-sizing: border-box !important;
|
|
1026
|
+
width: 100%;
|
|
1027
|
+
height: 28px;
|
|
1028
|
+
padding: 5px 7px !important;
|
|
1029
|
+
border: 1px solid #0004 !important;
|
|
1030
|
+
font-size: smaller;
|
|
1031
|
+
border-radius: 4px 0px 0px 4px;
|
|
1032
|
+
}
|
|
1033
|
+
textarea.add-layer-input {
|
|
1034
|
+
height: 90px;
|
|
1035
|
+
resize: none;
|
|
1036
|
+
border-radius: 4px;
|
|
1037
|
+
}
|
|
1038
|
+
.divider {
|
|
1039
|
+
margin: 1rem 0px;
|
|
1040
|
+
height: 1px;
|
|
1041
|
+
border-top: 1.5px solid #00417059;
|
|
1042
|
+
text-align: center;
|
|
1043
|
+
position: relative;
|
|
1044
|
+
}
|
|
1045
|
+
.divider span {
|
|
1046
|
+
position: relative;
|
|
1047
|
+
top: -.6em;
|
|
1048
|
+
padding: 0px 0.5rem;
|
|
1049
|
+
background: #f0f2f5;
|
|
1050
|
+
color: #00417059;
|
|
1051
|
+
font-weight: bold;
|
|
1052
|
+
display: inline-block;
|
|
1053
|
+
}
|
|
1054
|
+
`);this.eoxMap=null,this.unstyled=!1,this.noShadow=!0}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){const p=this.open?"open":"close",v=this.open==="url",k=this.open==="json";return ae`
|
|
1055
|
+
<style>
|
|
1056
|
+
${ge(this,is)}
|
|
1057
|
+
${!this.unstyled&&ge(this,os)}
|
|
1058
|
+
</style>
|
|
1059
|
+
<div class="eox-add-layer-main">
|
|
1060
|
+
<div class="eox-add-layer-col">
|
|
1061
|
+
<!-- Tabbed interface for URL and JSON -->
|
|
1062
|
+
<ul class="eox-add-layer-tab ${p}">
|
|
1063
|
+
<li
|
|
1064
|
+
@click=${()=>Dr(this,Hi,Ps).call(this,"url")}
|
|
1065
|
+
class="${v?"active":""}"
|
|
1066
|
+
>
|
|
1067
|
+
URL
|
|
1068
|
+
</li>
|
|
1069
|
+
<li
|
|
1070
|
+
@click=${()=>Dr(this,Hi,Ps).call(this,"json")}
|
|
1071
|
+
class="${k?"active":""}"
|
|
1072
|
+
>
|
|
1073
|
+
JSON
|
|
1074
|
+
</li>
|
|
1075
|
+
</ul>
|
|
1076
|
+
|
|
1077
|
+
<!-- Button to toggle tabs -->
|
|
1078
|
+
<button
|
|
1079
|
+
class="add-icon icon"
|
|
1080
|
+
@click=${()=>Dr(this,Hi,Ps).call(this,this.open?null:"url")}
|
|
1081
|
+
></button>
|
|
1082
|
+
</div>
|
|
1083
|
+
<div class="eox-add ${p}">
|
|
1084
|
+
${v?ae`
|
|
1085
|
+
|
|
1086
|
+
<!-- Input field for URL -->
|
|
1087
|
+
<div class="eox-add-layer-col">
|
|
1088
|
+
<input type="text" class="add-url" placeholder="Add URL (WMS/XYZ)" .value="${this.urlInput}" @input=${Dr(this,ts,Uc)}></input>
|
|
1089
|
+
|
|
1090
|
+
<!-- Search button for URL -->
|
|
1091
|
+
<button class="search-icon" disabled=${!Md(this.urlInput)||this.searchLoad?!0:we} @click=${Dr(this,es,qc)}></button>
|
|
1092
|
+
</div>
|
|
1093
|
+
|
|
1094
|
+
<!-- Display layers for WMS capabilities -->
|
|
1095
|
+
${this.wmsCapabilities?ae`<ul class="search-lists">
|
|
1096
|
+
${this.wmsCapabilities.Capability.Layer.Layer.map(C=>ae`
|
|
1097
|
+
<li class="search-list">
|
|
1098
|
+
${C.Name}
|
|
1099
|
+
<!-- Button to add layer -->
|
|
1100
|
+
<button
|
|
1101
|
+
class="add-layer-icon icon"
|
|
1102
|
+
@click=${()=>Dr(this,Ko,ru).call(this,C)}
|
|
1103
|
+
></button>
|
|
1104
|
+
</li>
|
|
1105
|
+
`)}
|
|
1106
|
+
</ul>`:we}
|
|
1107
|
+
`:ae`
|
|
1108
|
+
<!-- Textarea for JSON input -->
|
|
1109
|
+
<textarea
|
|
1110
|
+
class="add-layer-input"
|
|
1111
|
+
placeholder="Please put a valid eox-map layer JSON."
|
|
1112
|
+
@input=${Dr(this,ns,Wc)}
|
|
1113
|
+
.value=${this.jsonInput}
|
|
1114
|
+
></textarea>
|
|
1115
|
+
|
|
1116
|
+
<!-- Button to add JSON layer -->
|
|
1117
|
+
<button
|
|
1118
|
+
class="add-layer-icon json-add-layer"
|
|
1119
|
+
disabled=${Dd(this.jsonInput)?we:!0}
|
|
1120
|
+
@click=${Dr(this,rs,Gc)}
|
|
1121
|
+
></button>
|
|
1122
|
+
`}
|
|
1123
|
+
</div>
|
|
1124
|
+
</div>
|
|
1125
|
+
`}}ts=new WeakSet,Uc=function(p){$d(p,this)},es=new WeakSet,qc=async function(){const p=await Fd(this);p&&Dr(this,Ko,ru).call(this,p)},Ko=new WeakSet,ru=function(p){Vd(p,this),ac(this)},rs=new WeakSet,Gc=function(){ac(this)},ns=new WeakSet,Wc=function(p){Nd(p,this)},Hi=new WeakSet,Ps=function(p){zd(p,this)},is=new WeakMap,os=new WeakMap,Je(kc,"properties",{eoxMap:{attribute:!1,state:!0},unstyled:{type:Boolean},noShadow:{type:Boolean}}),customElements.define("eox-layercontrol-add-layers",kc);class hl extends kr{constructor(){super();ce(this,Fi,void 0);ce(this,as,"");ce(this,ss,`
|
|
916
1126
|
* {
|
|
917
1127
|
font-family: Roboto, sans-serif;
|
|
918
1128
|
}
|
|
919
|
-
`);this.for="eox-map",this.idProperty="id",this.map=null,this.titleProperty="title",this.showLayerZoomState=!1,this.tools=["info","opacity","config","remove","sort"],this.unstyled=!1,this.styleOverride=""}updated(){const
|
|
1129
|
+
`);this.for="eox-map",this.idProperty="id",this.map=null,this.titleProperty="title",this.showLayerZoomState=!1,this.tools=["info","opacity","config","remove","sort"],this.addExternalLayers=!1,this.unstyled=!1,this.styleOverride=""}updated(){const p=document.querySelector(this.for);p&&(p==null?void 0:p.map)!==this.map&&(this.map=p.map)}firstUpdated(){const p=document.querySelector(this.for);Si(this,Fi,p)}render(){var p,v;return ae`
|
|
920
1130
|
<style>
|
|
921
|
-
${
|
|
922
|
-
${!this.unstyled&&
|
|
1131
|
+
${ge(this,as)}
|
|
1132
|
+
${!this.unstyled&&ge(this,ss)}
|
|
923
1133
|
${this.styleOverride}
|
|
924
1134
|
</style>
|
|
925
|
-
${
|
|
1135
|
+
${this.addExternalLayers?tn((p=ge(this,Fi))==null?void 0:p.addOrUpdateLayer,()=>ae`<eox-layercontrol-add-layers
|
|
1136
|
+
.noShadow=${!0}
|
|
1137
|
+
.eoxMap=${ge(this,Fi)}
|
|
1138
|
+
.unstyled=${this.unstyled}
|
|
1139
|
+
></eox-layercontrol-add-layers>`):we}
|
|
1140
|
+
${tn(this.map,()=>ae`
|
|
926
1141
|
<eox-layercontrol-layer-list
|
|
927
1142
|
.noShadow=${!0}
|
|
928
1143
|
class="layers"
|
|
@@ -933,10 +1148,10 @@ button.small {
|
|
|
933
1148
|
.showLayerZoomState=${this.showLayerZoomState}
|
|
934
1149
|
.tools=${this.tools}
|
|
935
1150
|
.unstyled=${this.unstyled}
|
|
936
|
-
@changed=${
|
|
1151
|
+
@changed=${k=>{if(this.requestUpdate(),k.target.tagName==="EOX-LAYERCONTROL-LAYER-TOOLS"){const C=this.renderRoot.querySelector("eox-layercontrol-optional-list");C==null||C.requestUpdate()}}}
|
|
937
1152
|
></eox-layercontrol-layer-list>
|
|
938
1153
|
`)}
|
|
939
|
-
${
|
|
1154
|
+
${tn(this.map&&((v=ol(this.map.getLayers().getArray(),"layerControlOptional",!0))==null?void 0:v.length)>0,()=>ae`
|
|
940
1155
|
<eox-layercontrol-optional-list
|
|
941
1156
|
.noShadow=${!0}
|
|
942
1157
|
.idProperty=${this.idProperty}
|
|
@@ -945,4 +1160,4 @@ button.small {
|
|
|
945
1160
|
@changed=${()=>this.requestUpdate()}
|
|
946
1161
|
></eox-layercontrol-optional-list>
|
|
947
1162
|
`)}
|
|
948
|
-
`}}
|
|
1163
|
+
`}}Fi=new WeakMap,as=new WeakMap,ss=new WeakMap,Je(hl,"properties",{for:{type:String},idProperty:{attribute:"id-property"},map:{attribute:!1,state:!0},titleProperty:{attribute:"title-property",type:String},showLayerZoomState:{attribute:"show-layer-zoom-state",type:Boolean},tools:{attribute:!1},addExternalLayers:{attribute:!1},unstyled:{type:Boolean},styleOverride:{type:String}}),customElements.define("eox-layercontrol",hl),je.EOxLayerControl=hl,Object.defineProperty(je,Symbol.toStringTag,{value:"Module"})});
|