@eox/layercontrol 0.11.0 → 0.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/eox-layercontrol.js +1641 -1640
- package/dist/eox-layercontrol.umd.cjs +102 -107
- package/package.json +1 -1
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
var
|
|
1
|
+
var rd=Object.defineProperty;var nd=(ge,he,$e)=>he in ge?rd(ge,he,{enumerable:!0,configurable:!0,writable:!0,value:$e}):ge[he]=$e;var mr=(ge,he,$e)=>(nd(ge,typeof he!="symbol"?he+"":he,$e),$e),vl=(ge,he,$e)=>{if(!he.has(ge))throw TypeError("Cannot "+$e)};var Le=(ge,he,$e)=>(vl(ge,he,"read from private field"),$e?$e.call(ge):he.get(ge)),Ne=(ge,he,$e)=>{if(he.has(ge))throw TypeError("Cannot add the same private member more than once");he instanceof WeakSet?he.add(ge):he.set(ge,$e)},ho=(ge,he,$e,po)=>(vl(ge,he,"write to private field"),po?po.call(ge,$e):he.set(ge,$e),$e);var ts=(ge,he,$e)=>(vl(ge,he,"access private method"),$e);(function(ge,he){typeof exports=="object"&&typeof module<"u"?he(exports):typeof define=="function"&&define.amd?define(["exports"],he):(ge=typeof globalThis<"u"?globalThis:ge||self,he(ge["eox-layercontrol"]={}))})(this,function(ge){var gc,ki,Yn,ma,Bc,va,Nc,Ao,Ro,ji,ba,$c,ga,wa,_a,xa,ka,ja,Oa,Ea,Ca,Sa,Pa,Ta,La,Aa;"use strict";/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/const he=globalThis
|
|
5
|
+
*/const he=globalThis,$e=he.ShadowRoot&&(he.ShadyCSS===void 0||he.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,po=Symbol(),bl=new WeakMap;let Mc=class{constructor(d,f,v){if(this._$cssResult$=!0,v!==po)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=d,this.t=f}get styleSheet(){let d=this.o;const f=this.t;if($e&&d===void 0){const v=f!==void 0&&f.length===1;v&&(d=bl.get(f)),d===void 0&&((this.o=d=new CSSStyleSheet).replaceSync(this.cssText),v&&bl.set(f,d))}return d}toString(){return this.cssText}};const Fc=x=>new Mc(typeof x=="string"?x:x+"",void 0,po),Hc=(x,d)=>{if($e)x.adoptedStyleSheets=d.map(f=>f instanceof CSSStyleSheet?f:f.styleSheet);else for(const f of d){const v=document.createElement("style"),k=he.litNonce;k!==void 0&&v.setAttribute("nonce",k),v.textContent=f.cssText,x.appendChild(v)}},gl=$e?x=>x:x=>x instanceof CSSStyleSheet?(d=>{let f="";for(const v of d.cssRules)f+=v.cssText;return Fc(f)})(x):x;/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/const{is:
|
|
9
|
+
*/const{is:Vc,defineProperty:zc,getOwnPropertyDescriptor:qc,getOwnPropertyNames:Uc,getOwnPropertySymbols:Gc,getPrototypeOf:Wc}=Object,wn=globalThis,wl=wn.trustedTypes,Zc=wl?wl.emptyScript:"",es=wn.reactiveElementPolyfillSupport,fo=(x,d)=>x,rs={toAttribute(x,d){switch(d){case Boolean:x=x?Zc:null;break;case Object:case Array:x=x==null?x:JSON.stringify(x)}return x},fromAttribute(x,d){let f=x;switch(d){case Boolean:f=x!==null;break;case Number:f=x===null?null:Number(x);break;case Object:case Array:try{f=JSON.parse(x)}catch{f=null}}return f}},_l=(x,d)=>!Vc(x,d),xl={attribute:!0,type:String,converter:rs,reflect:!1,hasChanged:_l};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),wn.litPropertyMetadata??(wn.litPropertyMetadata=new WeakMap);class yi extends HTMLElement{static addInitializer(d){this._$Ei(),(this.l??(this.l=[])).push(d)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(d,f=xl){if(f.state&&(f.attribute=!1),this._$Ei(),this.elementProperties.set(d,f),!f.noAccessor){const v=Symbol(),k=this.getPropertyDescriptor(d,v,f);k!==void 0&&zc(this.prototype,d,k)}}static getPropertyDescriptor(d,f,v){const{get:k,set:P}=qc(this.prototype,d)??{get(){return this[f]},set(m){this[f]=m}};return{get(){return k==null?void 0:k.call(this)},set(m){const j=k==null?void 0:k.call(this);P.call(this,m),this.requestUpdate(d,j,v)},configurable:!0,enumerable:!0}}static getPropertyOptions(d){return this.elementProperties.get(d)??xl}static _$Ei(){if(this.hasOwnProperty(fo("elementProperties")))return;const d=Wc(this);d.finalize(),d.l!==void 0&&(this.l=[...d.l]),this.elementProperties=new Map(d.elementProperties)}static finalize(){if(this.hasOwnProperty(fo("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(fo("properties"))){const f=this.properties,v=[...Uc(f),...Gc(f)];for(const k of v)this.createProperty(k,f[k])}const d=this[Symbol.metadata];if(d!==null){const f=litPropertyMetadata.get(d);if(f!==void 0)for(const[v,k]of f)this.elementProperties.set(v,k)}this._$Eh=new Map;for(const[f,v]of this.elementProperties){const k=this._$Eu(f,v);k!==void 0&&this._$Eh.set(k,f)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(d){const f=[];if(Array.isArray(d)){const v=new Set(d.flat(1/0).reverse());for(const k of v)f.unshift(gl(k))}else d!==void 0&&f.push(gl(d));return f}static _$Eu(d,f){const v=f.attribute;return v===!1?void 0:typeof v=="string"?v:typeof d=="string"?d.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var d;this._$Eg=new Promise(f=>this.enableUpdating=f),this._$AL=new Map,this._$E_(),this.requestUpdate(),(d=this.constructor.l)==null||d.forEach(f=>f(this))}addController(d){var f;(this._$ES??(this._$ES=[])).push(d),this.renderRoot!==void 0&&this.isConnected&&((f=d.hostConnected)==null||f.call(d))}removeController(d){var f;(f=this._$ES)==null||f.splice(this._$ES.indexOf(d)>>>0,1)}_$E_(){const d=new Map,f=this.constructor.elementProperties;for(const v of f.keys())this.hasOwnProperty(v)&&(d.set(v,this[v]),delete this[v]);d.size>0&&(this._$Ep=d)}createRenderRoot(){const d=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Hc(d,this.constructor.elementStyles),d}connectedCallback(){var d;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(d=this._$ES)==null||d.forEach(f=>{var v;return(v=f.hostConnected)==null?void 0:v.call(f)})}enableUpdating(d){}disconnectedCallback(){var d;(d=this._$ES)==null||d.forEach(f=>{var v;return(v=f.hostDisconnected)==null?void 0:v.call(f)})}attributeChangedCallback(d,f,v){this._$AK(d,v)}_$EO(d,f){var P;const v=this.constructor.elementProperties.get(d),k=this.constructor._$Eu(d,v);if(k!==void 0&&v.reflect===!0){const m=(((P=v.converter)==null?void 0:P.toAttribute)!==void 0?v.converter:rs).toAttribute(f,v.type);this._$Em=d,m==null?this.removeAttribute(k):this.setAttribute(k,m),this._$Em=null}}_$AK(d,f){var P;const v=this.constructor,k=v._$Eh.get(d);if(k!==void 0&&this._$Em!==k){const m=v.getPropertyOptions(k),j=typeof m.converter=="function"?{fromAttribute:m.converter}:((P=m.converter)==null?void 0:P.fromAttribute)!==void 0?m.converter:rs;this._$Em=k,this[k]=j.fromAttribute(f,m.type),this._$Em=null}}requestUpdate(d,f,v,k=!1,P){if(d!==void 0){if(v??(v=this.constructor.getPropertyOptions(d)),!(v.hasChanged??_l)(k?P:this[d],f))return;this.C(d,f,v)}this.isUpdatePending===!1&&(this._$Eg=this._$EP())}C(d,f,v){this._$AL.has(d)||this._$AL.set(d,f),v.reflect===!0&&this._$Em!==d&&(this._$Ej??(this._$Ej=new Set)).add(d)}async _$EP(){this.isUpdatePending=!0;try{await this._$Eg}catch(f){Promise.reject(f)}const d=this.scheduleUpdate();return d!=null&&await d,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var v;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this._$Ep){for(const[P,m]of this._$Ep)this[P]=m;this._$Ep=void 0}const k=this.constructor.elementProperties;if(k.size>0)for(const[P,m]of k)m.wrapped!==!0||this._$AL.has(P)||this[P]===void 0||this.C(P,this[P],m)}let d=!1;const f=this._$AL;try{d=this.shouldUpdate(f),d?(this.willUpdate(f),(v=this._$ES)==null||v.forEach(k=>{var P;return(P=k.hostUpdate)==null?void 0:P.call(k)}),this.update(f)):this._$ET()}catch(k){throw d=!1,this._$ET(),k}d&&this._$AE(f)}willUpdate(d){}_$AE(d){var f;(f=this._$ES)==null||f.forEach(v=>{var k;return(k=v.hostUpdated)==null?void 0:k.call(v)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(d)),this.updated(d)}_$ET(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Eg}shouldUpdate(d){return!0}update(d){this._$Ej&&(this._$Ej=this._$Ej.forEach(f=>this._$EO(f,this[f]))),this._$ET()}updated(d){}firstUpdated(d){}}yi.elementStyles=[],yi.shadowRootOptions={mode:"open"},yi[fo("elementProperties")]=new Map,yi[fo("finalized")]=new Map,es==null||es({ReactiveElement:yi}),(wn.reactiveElementVersions??(wn.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 yo=globalThis,Yo=yo.trustedTypes,kl=Yo?Yo.createPolicy("lit-html",{createHTML:x=>x}):void 0,jl="$lit$",_n=`lit$${(Math.random()+"").slice(9)}$`,Ol="?"+_n,Jc=`<${Ol}>`,zn=document,mo=()=>zn.createComment(""),vo=x=>x===null||typeof x!="object"&&typeof x!="function",El=Array.isArray,Yc=x=>El(x)||typeof(x==null?void 0:x[Symbol.iterator])=="function",ns=`[
|
|
14
|
+
\f\r]`,bo=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Cl=/-->/g,Sl=/>/g,qn=RegExp(`>|${ns}(?:([^\\s"'>=/]+)(${ns}*=${ns}*(?:[^
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Pl=/'/g,Tl=/"/g,Ll=/^(?:script|style|textarea|title)$/i,Xc=x=>(d,...f)=>({_$litType$:x,strings:d,values:f}),me=Xc(1),Br=Symbol.for("lit-noChange"),_e=Symbol.for("lit-nothing"),Al=new WeakMap,Un=zn.createTreeWalker(zn,129);function Rl(x,d){if(!Array.isArray(x)||!x.hasOwnProperty("raw"))throw Error("invalid template strings array");return kl!==void 0?kl.createHTML(d):d}const Qc=(x,d)=>{const f=x.length-1,v=[];let k,P=d===2?"<svg>":"",m=bo;for(let j=0;j<f;j++){const r=x[j];let y,b,g=-1,_=0;for(;_<r.length&&(m.lastIndex=_,b=m.exec(r),b!==null);)_=m.lastIndex,m===bo?b[1]==="!--"?m=Cl:b[1]!==void 0?m=Sl:b[2]!==void 0?(Ll.test(b[2])&&(k=RegExp("</"+b[2],"g")),m=qn):b[3]!==void 0&&(m=qn):m===qn?b[0]===">"?(m=k??bo,g=-1):b[1]===void 0?g=-2:(g=m.lastIndex-b[2].length,y=b[1],m=b[3]===void 0?qn:b[3]==='"'?Tl:Pl):m===Tl||m===Pl?m=qn:m===Cl||m===Sl?m=bo:(m=qn,k=void 0);const O=m===qn&&x[j+1].startsWith("/>")?" ":"";P+=m===bo?r+Jc:g>=0?(v.push(y),r.slice(0,g)+jl+r.slice(g)+_n+O):r+_n+(g===-2?j:O)}return[Rl(x,P+(x[f]||"<?>")+(d===2?"</svg>":"")),v]};class go{constructor({strings:d,_$litType$:f},v){let k;this.parts=[];let P=0,m=0;const j=d.length-1,r=this.parts,[y,b]=Qc(d,f);if(this.el=go.createElement(y,v),Un.currentNode=this.el.content,f===2){const g=this.el.content.firstChild;g.replaceWith(...g.childNodes)}for(;(k=Un.nextNode())!==null&&r.length<j;){if(k.nodeType===1){if(k.hasAttributes())for(const g of k.getAttributeNames())if(g.endsWith(jl)){const _=b[m++],O=k.getAttribute(g).split(_n),C=/([.?@])?(.*)/.exec(_);r.push({type:1,index:P,name:C[2],strings:O,ctor:C[1]==="."?tu:C[1]==="?"?eu:C[1]==="@"?ru:Xo}),k.removeAttribute(g)}else g.startsWith(_n)&&(r.push({type:6,index:P}),k.removeAttribute(g));if(Ll.test(k.tagName)){const g=k.textContent.split(_n),_=g.length-1;if(_>0){k.textContent=Yo?Yo.emptyScript:"";for(let O=0;O<_;O++)k.append(g[O],mo()),Un.nextNode(),r.push({type:2,index:++P});k.append(g[_],mo())}}}else if(k.nodeType===8)if(k.data===Ol)r.push({type:2,index:P});else{let g=-1;for(;(g=k.data.indexOf(_n,g+1))!==-1;)r.push({type:7,index:P}),g+=_n.length-1}P++}}static createElement(d,f){const v=zn.createElement("template");return v.innerHTML=d,v}}function mi(x,d,f=x,v){var m,j;if(d===Br)return d;let k=v!==void 0?(m=f._$Co)==null?void 0:m[v]:f._$Cl;const P=vo(d)?void 0:d._$litDirective$;return(k==null?void 0:k.constructor)!==P&&((j=k==null?void 0:k._$AO)==null||j.call(k,!1),P===void 0?k=void 0:(k=new P(x),k._$AT(x,f,v)),v!==void 0?(f._$Co??(f._$Co=[]))[v]=k:f._$Cl=k),k!==void 0&&(d=mi(x,k._$AS(x,d.values),k,v)),d}class Kc{constructor(d,f){this._$AV=[],this._$AN=void 0,this._$AD=d,this._$AM=f}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(d){const{el:{content:f},parts:v}=this._$AD,k=((d==null?void 0:d.creationScope)??zn).importNode(f,!0);Un.currentNode=k;let P=Un.nextNode(),m=0,j=0,r=v[0];for(;r!==void 0;){if(m===r.index){let y;r.type===2?y=new wo(P,P.nextSibling,this,d):r.type===1?y=new r.ctor(P,r.name,r.strings,this,d):r.type===6&&(y=new nu(P,this,d)),this._$AV.push(y),r=v[++j]}m!==(r==null?void 0:r.index)&&(P=Un.nextNode(),m++)}return Un.currentNode=zn,k}p(d){let f=0;for(const v of this._$AV)v!==void 0&&(v.strings!==void 0?(v._$AI(d,v,f),f+=v.strings.length-2):v._$AI(d[f])),f++}}class wo{get _$AU(){var d;return((d=this._$AM)==null?void 0:d._$AU)??this._$Cv}constructor(d,f,v,k){this.type=2,this._$AH=_e,this._$AN=void 0,this._$AA=d,this._$AB=f,this._$AM=v,this.options=k,this._$Cv=(k==null?void 0:k.isConnected)??!0}get parentNode(){let d=this._$AA.parentNode;const f=this._$AM;return f!==void 0&&(d==null?void 0:d.nodeType)===11&&(d=f.parentNode),d}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(d,f=this){d=mi(this,d,f),vo(d)?d===_e||d==null||d===""?(this._$AH!==_e&&this._$AR(),this._$AH=_e):d!==this._$AH&&d!==Br&&this._(d):d._$litType$!==void 0?this.g(d):d.nodeType!==void 0?this.$(d):Yc(d)?this.T(d):this._(d)}k(d){return this._$AA.parentNode.insertBefore(d,this._$AB)}$(d){this._$AH!==d&&(this._$AR(),this._$AH=this.k(d))}_(d){this._$AH!==_e&&vo(this._$AH)?this._$AA.nextSibling.data=d:this.$(zn.createTextNode(d)),this._$AH=d}g(d){var P;const{values:f,_$litType$:v}=d,k=typeof v=="number"?this._$AC(d):(v.el===void 0&&(v.el=go.createElement(Rl(v.h,v.h[0]),this.options)),v);if(((P=this._$AH)==null?void 0:P._$AD)===k)this._$AH.p(f);else{const m=new Kc(k,this),j=m.u(this.options);m.p(f),this.$(j),this._$AH=m}}_$AC(d){let f=Al.get(d.strings);return f===void 0&&Al.set(d.strings,f=new go(d)),f}T(d){El(this._$AH)||(this._$AH=[],this._$AR());const f=this._$AH;let v,k=0;for(const P of d)k===f.length?f.push(v=new wo(this.k(mo()),this.k(mo()),this,this.options)):v=f[k],v._$AI(P),k++;k<f.length&&(this._$AR(v&&v._$AB.nextSibling,k),f.length=k)}_$AR(d=this._$AA.nextSibling,f){var v;for((v=this._$AP)==null?void 0:v.call(this,!1,!0,f);d&&d!==this._$AB;){const k=d.nextSibling;d.remove(),d=k}}setConnected(d){var f;this._$AM===void 0&&(this._$Cv=d,(f=this._$AP)==null||f.call(this,d))}}class Xo{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(d,f,v,k,P){this.type=1,this._$AH=_e,this._$AN=void 0,this.element=d,this.name=f,this._$AM=k,this.options=P,v.length>2||v[0]!==""||v[1]!==""?(this._$AH=Array(v.length-1).fill(new String),this.strings=v):this._$AH=_e}_$AI(d,f=this,v,k){const P=this.strings;let m=!1;if(P===void 0)d=mi(this,d,f,0),m=!vo(d)||d!==this._$AH&&d!==Br,m&&(this._$AH=d);else{const j=d;let r,y;for(d=P[0],r=0;r<P.length-1;r++)y=mi(this,j[v+r],f,r),y===Br&&(y=this._$AH[r]),m||(m=!vo(y)||y!==this._$AH[r]),y===_e?d=_e:d!==_e&&(d+=(y??"")+P[r+1]),this._$AH[r]=y}m&&!k&&this.O(d)}O(d){d===_e?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,d??"")}}class tu extends Xo{constructor(){super(...arguments),this.type=3}O(d){this.element[this.name]=d===_e?void 0:d}}class eu extends Xo{constructor(){super(...arguments),this.type=4}O(d){this.element.toggleAttribute(this.name,!!d&&d!==_e)}}class ru extends Xo{constructor(d,f,v,k,P){super(d,f,v,k,P),this.type=5}_$AI(d,f=this){if((d=mi(this,d,f,0)??_e)===Br)return;const v=this._$AH,k=d===_e&&v!==_e||d.capture!==v.capture||d.once!==v.once||d.passive!==v.passive,P=d!==_e&&(v===_e||k);k&&this.element.removeEventListener(this.name,this,v),P&&this.element.addEventListener(this.name,this,d),this._$AH=d}handleEvent(d){var f;typeof this._$AH=="function"?this._$AH.call(((f=this.options)==null?void 0:f.host)??this.element,d):this._$AH.handleEvent(d)}}class nu{constructor(d,f,v){this.element=d,this.type=6,this._$AN=void 0,this._$AM=f,this.options=v}get _$AU(){return this._$AM._$AU}_$AI(d){mi(this,d)}}const is=yo.litHtmlPolyfillSupport;is==null||is(go,wo),(yo.litHtmlVersions??(yo.litHtmlVersions=[])).push("3.1.0");const iu=(x,d,f)=>{const v=(f==null?void 0:f.renderBefore)??d;let k=v._$litPart$;if(k===void 0){const P=(f==null?void 0:f.renderBefore)??null;v._$litPart$=k=new wo(d.insertBefore(mo(),P),P,void 0,f??{})}return k._$AI(x),k};/**
|
|
16
16
|
* @license
|
|
17
17
|
* Copyright 2017 Google LLC
|
|
18
18
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
19
|
-
*/class kr extends yi{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var f;const d=super.createRenderRoot();return(f=this.renderOptions).renderBefore??(f.renderBefore=d.firstChild),d}update(d){const f=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(d),this._$Do=
|
|
19
|
+
*/class kr extends yi{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var f;const d=super.createRenderRoot();return(f=this.renderOptions).renderBefore??(f.renderBefore=d.firstChild),d}update(d){const f=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(d),this._$Do=iu(f,this.renderRoot,this.renderOptions)}connectedCallback(){var d;super.connectedCallback(),(d=this._$Do)==null||d.setConnected(!0)}disconnectedCallback(){var d;super.disconnectedCallback(),(d=this._$Do)==null||d.setConnected(!1)}render(){return Br}}kr._$litElement$=!0,kr.finalized=!0,(gc=globalThis.litElementHydrateSupport)==null||gc.call(globalThis,{LitElement:kr});const os=globalThis.litElementPolyfillSupport;os==null||os({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
|
|
@@ -24,50 +24,50 @@ var ed=Object.defineProperty;var rd=(ge,he,Be)=>he in ge?ed(ge,he,{enumerable:!0
|
|
|
24
24
|
* @license
|
|
25
25
|
* Copyright 2017 Google LLC
|
|
26
26
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
27
|
-
*/const Gn={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},
|
|
27
|
+
*/const Gn={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},as=x=>(...d)=>({_$litDirective$:x,values:d});let ss=class{constructor(d){}get _$AU(){return this._$AM._$AU}_$AT(d,f,v){this._$Ct=d,this._$AM=f,this._$Ci=v}_$AS(d,f){return this.update(d,f)}update(d,f){return this.render(...f)}};/**
|
|
28
28
|
* @license
|
|
29
29
|
* Copyright 2020 Google LLC
|
|
30
30
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
31
|
-
*/const
|
|
31
|
+
*/const ou=x=>x.strings===void 0,au={},Il=(x,d=au)=>x._$AH=d;/**
|
|
32
32
|
* @license
|
|
33
33
|
* Copyright 2021 Google LLC
|
|
34
34
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
35
|
-
*/const
|
|
35
|
+
*/const su=as(class extends ss{constructor(){super(...arguments),this.key=_e}render(x,d){return this.key=x,d}update(x,[d,f]){return d!==this.key&&(Il(x),this.key=d),f}});/**!
|
|
36
36
|
* Sortable 1.15.0
|
|
37
37
|
* @author RubaXa <trash@rubaxa.org>
|
|
38
38
|
* @author owenm <owen23355@gmail.com>
|
|
39
39
|
* @license MIT
|
|
40
|
-
*/function Il(x,d){var f=Object.keys(x);if(Object.getOwnPropertySymbols){var v=Object.getOwnPropertySymbols(x);d&&(v=v.filter(function(k){return Object.getOwnPropertyDescriptor(x,k).enumerable})),f.push.apply(f,v)}return f}function Gr(x){for(var d=1;d<arguments.length;d++){var f=arguments[d]!=null?arguments[d]:{};d%2?Il(Object(f),!0).forEach(function(v){su(x,v,f[v])}):Object.getOwnPropertyDescriptors?Object.defineProperties(x,Object.getOwnPropertyDescriptors(f)):Il(Object(f)).forEach(function(v){Object.defineProperty(x,v,Object.getOwnPropertyDescriptor(f,v))})}return x}function Xo(x){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Xo=function(d){return typeof d}:Xo=function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},Xo(x)}function su(x,d,f){return d in x?Object.defineProperty(x,d,{value:f,enumerable:!0,configurable:!0,writable:!0}):x[d]=f,x}function cn(){return cn=Object.assign||function(x){for(var d=1;d<arguments.length;d++){var f=arguments[d];for(var v in f)Object.prototype.hasOwnProperty.call(f,v)&&(x[v]=f[v])}return x},cn.apply(this,arguments)}function lu(x,d){if(x==null)return{};var f={},v=Object.keys(x),k,P;for(P=0;P<v.length;P++)k=v[P],!(d.indexOf(k)>=0)&&(f[k]=x[k]);return f}function cu(x,d){if(x==null)return{};var f=lu(x,d),v,k;if(Object.getOwnPropertySymbols){var P=Object.getOwnPropertySymbols(x);for(k=0;k<P.length;k++)v=P[k],!(d.indexOf(v)>=0)&&Object.prototype.propertyIsEnumerable.call(x,v)&&(f[v]=x[v])}return f}var uu="1.15.0";function un(x){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(x)}var hn=un(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),go=un(/Edge/i),Dl=un(/firefox/i),wo=un(/safari/i)&&!un(/chrome/i)&&!un(/android/i),Bl=un(/iP(ad|od|hone)/i),Nl=un(/chrome/i)&&un(/android/i),$l={capture:!1,passive:!1};function de(x,d,f){x.addEventListener(d,f,!hn&&$l)}function se(x,d,f){x.removeEventListener(d,f,!hn&&$l)}function Qo(x,d){if(d){if(d[0]===">"&&(d=d.substring(1)),x)try{if(x.matches)return x.matches(d);if(x.msMatchesSelector)return x.msMatchesSelector(d);if(x.webkitMatchesSelector)return x.webkitMatchesSelector(d)}catch{return!1}return!1}}function hu(x){return x.host&&x!==document&&x.host.nodeType?x.host:x.parentNode}function Wr(x,d,f,v){if(x){f=f||document;do{if(d!=null&&(d[0]===">"?x.parentNode===f&&Qo(x,d):Qo(x,d))||v&&x===f)return x;if(x===f)break}while(x=hu(x))}return null}var Ml=/\s+/g;function jr(x,d,f){if(x&&d)if(x.classList)x.classList[f?"add":"remove"](d);else{var v=(" "+x.className+" ").replace(Ml," ").replace(" "+d+" "," ");x.className=(v+(f?" "+d:"")).replace(Ml," ")}}function Mt(x,d,f){var v=x&&x.style;if(v){if(f===void 0)return document.defaultView&&document.defaultView.getComputedStyle?f=document.defaultView.getComputedStyle(x,""):x.currentStyle&&(f=x.currentStyle),d===void 0?f:f[d];!(d in v)&&d.indexOf("webkit")===-1&&(d="-webkit-"+d),v[d]=f+(typeof f=="string"?"":"px")}}function vi(x,d){var f="";if(typeof x=="string")f=x;else do{var v=Mt(x,"transform");v&&v!=="none"&&(f=v+" "+f)}while(!d&&(x=x.parentNode));var k=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return k&&new k(f)}function Hl(x,d,f){if(x){var v=x.getElementsByTagName(d),k=0,P=v.length;if(f)for(;k<P;k++)f(v[k],k);return v}return[]}function Zr(){var x=document.scrollingElement;return x||document.documentElement}function We(x,d,f,v,k){if(!(!x.getBoundingClientRect&&x!==window)){var P,m,j,r,y,b,g;if(x!==window&&x.parentNode&&x!==Zr()?(P=x.getBoundingClientRect(),m=P.top,j=P.left,r=P.bottom,y=P.right,b=P.height,g=P.width):(m=0,j=0,r=window.innerHeight,y=window.innerWidth,b=window.innerHeight,g=window.innerWidth),(d||f)&&x!==window&&(k=k||x.parentNode,!hn))do if(k&&k.getBoundingClientRect&&(Mt(k,"transform")!=="none"||f&&Mt(k,"position")!=="static")){var _=k.getBoundingClientRect();m-=_.top+parseInt(Mt(k,"border-top-width")),j-=_.left+parseInt(Mt(k,"border-left-width")),r=m+P.height,y=j+P.width;break}while(k=k.parentNode);if(v&&x!==window){var O=vi(k||x),C=O&&O.a,E=O&&O.d;O&&(m/=E,j/=C,g/=C,b/=E,r=m+b,y=j+g)}return{top:m,left:j,bottom:r,right:y,width:g,height:b}}}function Fl(x,d,f){for(var v=xn(x,!0),k=We(x)[d];v;){var P=We(v)[f],m=void 0;if(f==="top"||f==="left"?m=k>=P:m=k<=P,!m)return v;if(v===Zr())break;v=xn(v,!1)}return!1}function bi(x,d,f,v){for(var k=0,P=0,m=x.children;P<m.length;){if(m[P].style.display!=="none"&&m[P]!==Ht.ghost&&(v||m[P]!==Ht.dragged)&&Wr(m[P],f.draggable,x,!1)){if(k===d)return m[P];k++}P++}return null}function ss(x,d){for(var f=x.lastElementChild;f&&(f===Ht.ghost||Mt(f,"display")==="none"||d&&!Qo(f,d));)f=f.previousElementSibling;return f||null}function Pr(x,d){var f=0;if(!x||!x.parentNode)return-1;for(;x=x.previousElementSibling;)x.nodeName.toUpperCase()!=="TEMPLATE"&&x!==Ht.clone&&(!d||Qo(x,d))&&f++;return f}function Vl(x){var d=0,f=0,v=Zr();if(x)do{var k=vi(x),P=k.a,m=k.d;d+=x.scrollLeft*P,f+=x.scrollTop*m}while(x!==v&&(x=x.parentNode));return[d,f]}function du(x,d){for(var f in x)if(x.hasOwnProperty(f)){for(var v in d)if(d.hasOwnProperty(v)&&d[v]===x[f][v])return Number(f)}return-1}function xn(x,d){if(!x||!x.getBoundingClientRect)return Zr();var f=x,v=!1;do if(f.clientWidth<f.scrollWidth||f.clientHeight<f.scrollHeight){var k=Mt(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||d)return f;v=!0}}while(f=f.parentNode);return Zr()}function pu(x,d){if(x&&d)for(var f in d)d.hasOwnProperty(f)&&(x[f]=d[f]);return x}function ls(x,d){return Math.round(x.top)===Math.round(d.top)&&Math.round(x.left)===Math.round(d.left)&&Math.round(x.height)===Math.round(d.height)&&Math.round(x.width)===Math.round(d.width)}var _o;function zl(x,d){return function(){if(!_o){var f=arguments,v=this;f.length===1?x.call(v,f[0]):x.apply(v,f),_o=setTimeout(function(){_o=void 0},d)}}}function fu(){clearTimeout(_o),_o=void 0}function ql(x,d,f){x.scrollLeft+=d,x.scrollTop+=f}function Ul(x){var d=window.Polymer,f=window.jQuery||window.Zepto;return d&&d.dom?d.dom(x).cloneNode(!0):f?f(x).clone(!0)[0]:x.cloneNode(!0)}var Or="Sortable"+new Date().getTime();function yu(){var x=[],d;return{captureAnimationState:function(){if(x=[],!!this.options.animation){var v=[].slice.call(this.el.children);v.forEach(function(k){if(!(Mt(k,"display")==="none"||k===Ht.ghost)){x.push({target:k,rect:We(k)});var P=Gr({},x[x.length-1].rect);if(k.thisAnimationDuration){var m=vi(k,!0);m&&(P.top-=m.f,P.left-=m.e)}k.fromRect=P}})}},addAnimationState:function(v){x.push(v)},removeAnimationState:function(v){x.splice(du(x,{target:v}),1)},animateAll:function(v){var k=this;if(!this.options.animation){clearTimeout(d),typeof v=="function"&&v();return}var P=!1,m=0;x.forEach(function(j){var r=0,y=j.target,b=y.fromRect,g=We(y),_=y.prevFromRect,O=y.prevToRect,C=j.rect,E=vi(y,!0);E&&(g.top-=E.f,g.left-=E.e),y.toRect=g,y.thisAnimationDuration&&ls(_,g)&&!ls(b,g)&&(C.top-g.top)/(C.left-g.left)===(b.top-g.top)/(b.left-g.left)&&(r=vu(C,_,O,k.options)),ls(g,b)||(y.prevFromRect=b,y.prevToRect=g,r||(r=k.options.animation),k.animate(y,C,g,r)),r&&(P=!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(d),P?d=setTimeout(function(){typeof v=="function"&&v()},m):typeof v=="function"&&v(),x=[]},animate:function(v,k,P,m){if(m){Mt(v,"transition",""),Mt(v,"transform","");var j=vi(this.el),r=j&&j.a,y=j&&j.d,b=(k.left-P.left)/(r||1),g=(k.top-P.top)/(y||1);v.animatingX=!!b,v.animatingY=!!g,Mt(v,"transform","translate3d("+b+"px,"+g+"px,0)"),this.forRepaintDummy=mu(v),Mt(v,"transition","transform "+m+"ms"+(this.options.easing?" "+this.options.easing:"")),Mt(v,"transform","translate3d(0,0,0)"),typeof v.animated=="number"&&clearTimeout(v.animated),v.animated=setTimeout(function(){Mt(v,"transition",""),Mt(v,"transform",""),v.animated=!1,v.animatingX=!1,v.animatingY=!1},m)}}}}function mu(x){return x.offsetWidth}function vu(x,d,f,v){return Math.sqrt(Math.pow(d.top-x.top,2)+Math.pow(d.left-x.left,2))/Math.sqrt(Math.pow(d.top-f.top,2)+Math.pow(d.left-f.left,2))*v.animation}var gi=[],cs={initializeByDefault:!0},xo={mount:function(d){for(var f in cs)cs.hasOwnProperty(f)&&!(f in d)&&(d[f]=cs[f]);gi.forEach(function(v){if(v.pluginName===d.pluginName)throw"Sortable: Cannot mount plugin ".concat(d.pluginName," more than once")}),gi.push(d)},pluginEvent:function(d,f,v){var k=this;this.eventCanceled=!1,v.cancel=function(){k.eventCanceled=!0};var P=d+"Global";gi.forEach(function(m){f[m.pluginName]&&(f[m.pluginName][P]&&f[m.pluginName][P](Gr({sortable:f},v)),f.options[m.pluginName]&&f[m.pluginName][d]&&f[m.pluginName][d](Gr({sortable:f},v)))})},initializePlugins:function(d,f,v,k){gi.forEach(function(j){var r=j.pluginName;if(!(!d.options[r]&&!j.initializeByDefault)){var y=new j(d,f,d.options);y.sortable=d,y.options=d.options,d[r]=y,cn(v,y.defaults)}});for(var P in d.options)if(d.options.hasOwnProperty(P)){var m=this.modifyOption(d,P,d.options[P]);typeof m<"u"&&(d.options[P]=m)}},getEventProperties:function(d,f){var v={};return gi.forEach(function(k){typeof k.eventProperties=="function"&&cn(v,k.eventProperties.call(f[k.pluginName],d))}),v},modifyOption:function(d,f,v){var k;return gi.forEach(function(P){d[P.pluginName]&&P.optionListeners&&typeof P.optionListeners[f]=="function"&&(k=P.optionListeners[f].call(d[P.pluginName],v))}),k}};function bu(x){var d=x.sortable,f=x.rootEl,v=x.name,k=x.targetEl,P=x.cloneEl,m=x.toEl,j=x.fromEl,r=x.oldIndex,y=x.newIndex,b=x.oldDraggableIndex,g=x.newDraggableIndex,_=x.originalEvent,O=x.putSortable,C=x.extraEventProperties;if(d=d||f&&f[Or],!!d){var E,T=d.options,L="on"+v.charAt(0).toUpperCase()+v.substr(1);window.CustomEvent&&!hn&&!go?E=new CustomEvent(v,{bubbles:!0,cancelable:!0}):(E=document.createEvent("Event"),E.initEvent(v,!0,!0)),E.to=m||f,E.from=j||f,E.item=k||f,E.clone=P,E.oldIndex=r,E.newIndex=y,E.oldDraggableIndex=b,E.newDraggableIndex=g,E.originalEvent=_,E.pullMode=O?O.lastPutMode:void 0;var R=Gr(Gr({},C),xo.getEventProperties(v,d));for(var I in R)E[I]=R[I];f&&f.dispatchEvent(E),T[L]&&T[L].call(d,E)}}var gu=["evt"],vr=function(d,f){var v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},k=v.evt,P=cu(v,gu);xo.pluginEvent.bind(Ht)(d,f,Gr({dragEl:ht,parentEl:Ne,ghostEl:Jt,rootEl:Pe,nextEl:Wn,lastDownEl:Ko,cloneEl:Le,cloneHidden:kn,dragStarted:jo,putSortable:Ke,activeSortable:Ht.active,originalEvent:k,oldIndex:wi,oldDraggableIndex:ko,newIndex:Er,newDraggableIndex:jn,hideGhostForTarget:Ql,unhideGhostForTarget:Kl,cloneNowHidden:function(){kn=!0},cloneNowShown:function(){kn=!1},dispatchSortableEvent:function(j){fr({sortable:f,name:j,originalEvent:k})}},P))};function fr(x){bu(Gr({putSortable:Ke,cloneEl:Le,targetEl:ht,rootEl:Pe,oldIndex:wi,oldDraggableIndex:ko,newIndex:Er,newDraggableIndex:jn},x))}var ht,Ne,Jt,Pe,Wn,Ko,Le,kn,wi,Er,ko,jn,ta,Ke,_i=!1,ea=!1,ra=[],Zn,Nr,us,hs,Gl,Wl,jo,xi,Oo,Eo=!1,na=!1,ia,nr,ds=[],ps=!1,oa=[],aa=typeof document<"u",sa=Bl,Zl=go||hn?"cssFloat":"float",wu=aa&&!Nl&&!Bl&&"draggable"in document.createElement("div"),Jl=function(){if(aa){if(hn)return!1;var x=document.createElement("x");return x.style.cssText="pointer-events:auto",x.style.pointerEvents==="auto"}}(),Yl=function(d,f){var v=Mt(d),k=parseInt(v.width)-parseInt(v.paddingLeft)-parseInt(v.paddingRight)-parseInt(v.borderLeftWidth)-parseInt(v.borderRightWidth),P=bi(d,0,f),m=bi(d,1,f),j=P&&Mt(P),r=m&&Mt(m),y=j&&parseInt(j.marginLeft)+parseInt(j.marginRight)+We(P).width,b=r&&parseInt(r.marginLeft)+parseInt(r.marginRight)+We(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(P&&j.float&&j.float!=="none"){var g=j.float==="left"?"left":"right";return m&&(r.clear==="both"||r.clear===g)?"vertical":"horizontal"}return P&&(j.display==="block"||j.display==="flex"||j.display==="table"||j.display==="grid"||y>=k&&v[Zl]==="none"||m&&v[Zl]==="none"&&y+b>k)?"vertical":"horizontal"},_u=function(d,f,v){var k=v?d.left:d.top,P=v?d.right:d.bottom,m=v?d.width:d.height,j=v?f.left:f.top,r=v?f.right:f.bottom,y=v?f.width:f.height;return k===j||P===r||k+m/2===j+y/2},xu=function(d,f){var v;return ra.some(function(k){var P=k[Or].options.emptyInsertThreshold;if(!(!P||ss(k))){var m=We(k),j=d>=m.left-P&&d<=m.right+P,r=f>=m.top-P&&f<=m.bottom+P;if(j&&r)return v=k}}),v},Xl=function(d){function f(P,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(P==null&&(m||g))return!0;if(P==null||P===!1)return!1;if(m&&P==="clone")return P;if(typeof P=="function")return f(P(j,r,y,b),m)(j,r,y,b);var _=(m?j:r).options.group.name;return P===!0||typeof P=="string"&&P===_||P.join&&P.indexOf(_)>-1}}var v={},k=d.group;(!k||Xo(k)!="object")&&(k={name:k}),v.name=k.name,v.checkPull=f(k.pull,!0),v.checkPut=f(k.put),v.revertClone=k.revertClone,d.group=v},Ql=function(){!Jl&&Jt&&Mt(Jt,"display","none")},Kl=function(){!Jl&&Jt&&Mt(Jt,"display","")};aa&&!Nl&&document.addEventListener("click",function(x){if(ea)return x.preventDefault(),x.stopPropagation&&x.stopPropagation(),x.stopImmediatePropagation&&x.stopImmediatePropagation(),ea=!1,!1},!0);var Jn=function(d){if(ht){d=d.touches?d.touches[0]:d;var f=xu(d.clientX,d.clientY);if(f){var v={};for(var k in d)d.hasOwnProperty(k)&&(v[k]=d[k]);v.target=v.rootEl=f,v.preventDefault=void 0,v.stopPropagation=void 0,f[Or]._onDragOver(v)}}},ku=function(d){ht&&ht.parentNode[Or]._isOutsideThisEl(d.target)};function Ht(x,d){if(!(x&&x.nodeType&&x.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(x));this.el=x,this.options=d=cn({},d),x[Or]=this;var f={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(x.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Yl(x,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:Ht.supportPointer!==!1&&"PointerEvent"in window&&!wo,emptyInsertThreshold:5};xo.initializePlugins(this,x,f);for(var v in f)!(v in d)&&(d[v]=f[v]);Xl(d);for(var k in this)k.charAt(0)==="_"&&typeof this[k]=="function"&&(this[k]=this[k].bind(this));this.nativeDraggable=d.forceFallback?!1:wu,this.nativeDraggable&&(this.options.touchStartThreshold=1),d.supportPointer?de(x,"pointerdown",this._onTapStart):(de(x,"mousedown",this._onTapStart),de(x,"touchstart",this._onTapStart)),this.nativeDraggable&&(de(x,"dragover",this),de(x,"dragenter",this)),ra.push(this.el),d.store&&d.store.get&&this.sort(d.store.get(this)||[]),cn(this,yu())}Ht.prototype={constructor:Ht,_isOutsideThisEl:function(d){!this.el.contains(d)&&d!==this.el&&(xi=null)},_getDirection:function(d,f){return typeof this.options.direction=="function"?this.options.direction.call(this,d,f,ht):this.options.direction},_onTapStart:function(d){if(d.cancelable){var f=this,v=this.el,k=this.options,P=k.preventOnFilter,m=d.type,j=d.touches&&d.touches[0]||d.pointerType&&d.pointerType==="touch"&&d,r=(j||d).target,y=d.target.shadowRoot&&(d.path&&d.path[0]||d.composedPath&&d.composedPath()[0])||r,b=k.filter;if(Lu(v),!ht&&!(/mousedown|pointerdown/.test(m)&&d.button!==0||k.disabled)&&!y.isContentEditable&&!(!this.nativeDraggable&&wo&&r&&r.tagName.toUpperCase()==="SELECT")&&(r=Wr(r,k.draggable,v,!1),!(r&&r.animated)&&Ko!==r)){if(wi=Pr(r),ko=Pr(r,k.draggable),typeof b=="function"){if(b.call(this,d,r,this)){fr({sortable:f,rootEl:y,name:"filter",targetEl:r,toEl:v,fromEl:v}),vr("filter",f,{evt:d}),P&&d.cancelable&&d.preventDefault();return}}else if(b&&(b=b.split(",").some(function(g){if(g=Wr(y,g.trim(),v,!1),g)return fr({sortable:f,rootEl:g,name:"filter",targetEl:r,fromEl:v,toEl:v}),vr("filter",f,{evt:d}),!0}),b)){P&&d.cancelable&&d.preventDefault();return}k.handle&&!Wr(y,k.handle,v,!1)||this._prepareDragStart(d,j,r)}}},_prepareDragStart:function(d,f,v){var k=this,P=k.el,m=k.options,j=P.ownerDocument,r;if(v&&!ht&&v.parentNode===P){var y=We(v);if(Pe=P,ht=v,Ne=ht.parentNode,Wn=ht.nextSibling,Ko=v,ta=m.group,Ht.dragged=ht,Zn={target:ht,clientX:(f||d).clientX,clientY:(f||d).clientY},Gl=Zn.clientX-y.left,Wl=Zn.clientY-y.top,this._lastX=(f||d).clientX,this._lastY=(f||d).clientY,ht.style["will-change"]="all",r=function(){if(vr("delayEnded",k,{evt:d}),Ht.eventCanceled){k._onDrop();return}k._disableDelayedDragEvents(),!Dl&&k.nativeDraggable&&(ht.draggable=!0),k._triggerDragStart(d,f),fr({sortable:k,name:"choose",originalEvent:d}),jr(ht,m.chosenClass,!0)},m.ignore.split(",").forEach(function(b){Hl(ht,b.trim(),fs)}),de(j,"dragover",Jn),de(j,"mousemove",Jn),de(j,"touchmove",Jn),de(j,"mouseup",k._onDrop),de(j,"touchend",k._onDrop),de(j,"touchcancel",k._onDrop),Dl&&this.nativeDraggable&&(this.options.touchStartThreshold=4,ht.draggable=!0),vr("delayStart",this,{evt:d}),m.delay&&(!m.delayOnTouchOnly||f)&&(!this.nativeDraggable||!(go||hn))){if(Ht.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(d){var f=d.touches?d.touches[0]:d;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&&fs(ht),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var d=this.el.ownerDocument;se(d,"mouseup",this._disableDelayedDrag),se(d,"touchend",this._disableDelayedDrag),se(d,"touchcancel",this._disableDelayedDrag),se(d,"mousemove",this._delayedDragTouchMoveHandler),se(d,"touchmove",this._delayedDragTouchMoveHandler),se(d,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(d,f){f=f||d.pointerType=="touch"&&d,!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(Pe,"dragstart",this._onDragStart));try{document.selection?ca(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(d,f){if(_i=!1,Pe&&ht){vr("dragStarted",this,{evt:f}),this.nativeDraggable&&de(document,"dragover",ku);var v=this.options;!d&&jr(ht,v.dragClass,!1),jr(ht,v.ghostClass,!0),Ht.active=this,d&&this._appendGhost(),fr({sortable:this,name:"start",originalEvent:f})}else this._nulling()},_emulateDragOver:function(){if(Nr){this._lastX=Nr.clientX,this._lastY=Nr.clientY,Ql();for(var d=document.elementFromPoint(Nr.clientX,Nr.clientY),f=d;d&&d.shadowRoot&&(d=d.shadowRoot.elementFromPoint(Nr.clientX,Nr.clientY),d!==f);)f=d;if(ht.parentNode[Or]._isOutsideThisEl(d),f)do{if(f[Or]){var v=void 0;if(v=f[Or]._onDragOver({clientX:Nr.clientX,clientY:Nr.clientY,target:d,rootEl:f}),v&&!this.options.dragoverBubble)break}d=f}while(f=f.parentNode);Kl()}},_onTouchMove:function(d){if(Zn){var f=this.options,v=f.fallbackTolerance,k=f.fallbackOffset,P=d.touches?d.touches[0]:d,m=Jt&&vi(Jt,!0),j=Jt&&m&&m.a,r=Jt&&m&&m.d,y=sa&&nr&&Vl(nr),b=(P.clientX-Zn.clientX+k.x)/(j||1)+(y?y[0]-ds[0]:0)/(j||1),g=(P.clientY-Zn.clientY+k.y)/(r||1)+(y?y[1]-ds[1]:0)/(r||1);if(!Ht.active&&!_i){if(v&&Math.max(Math.abs(P.clientX-this._lastX),Math.abs(P.clientY-this._lastY))<v)return;this._onDragStart(d,!0)}if(Jt){m?(m.e+=b-(us||0),m.f+=g-(hs||0)):m={a:1,b:0,c:0,d:1,e:b,f:g};var _="matrix(".concat(m.a,",").concat(m.b,",").concat(m.c,",").concat(m.d,",").concat(m.e,",").concat(m.f,")");Mt(Jt,"webkitTransform",_),Mt(Jt,"mozTransform",_),Mt(Jt,"msTransform",_),Mt(Jt,"transform",_),us=b,hs=g,Nr=P}d.cancelable&&d.preventDefault()}},_appendGhost:function(){if(!Jt){var d=this.options.fallbackOnBody?document.body:Pe,f=We(ht,!0,sa,!0,d),v=this.options;if(sa){for(nr=d;Mt(nr,"position")==="static"&&Mt(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(),ds=Vl(nr)}Jt=ht.cloneNode(!0),jr(Jt,v.ghostClass,!1),jr(Jt,v.fallbackClass,!0),jr(Jt,v.dragClass,!0),Mt(Jt,"transition",""),Mt(Jt,"transform",""),Mt(Jt,"box-sizing","border-box"),Mt(Jt,"margin",0),Mt(Jt,"top",f.top),Mt(Jt,"left",f.left),Mt(Jt,"width",f.width),Mt(Jt,"height",f.height),Mt(Jt,"opacity","0.8"),Mt(Jt,"position",sa?"absolute":"fixed"),Mt(Jt,"zIndex","100000"),Mt(Jt,"pointerEvents","none"),Ht.ghost=Jt,d.appendChild(Jt),Mt(Jt,"transform-origin",Gl/parseInt(Jt.style.width)*100+"% "+Wl/parseInt(Jt.style.height)*100+"%")}},_onDragStart:function(d,f){var v=this,k=d.dataTransfer,P=v.options;if(vr("dragStart",this,{evt:d}),Ht.eventCanceled){this._onDrop();return}vr("setupClone",this),Ht.eventCanceled||(Le=Ul(ht),Le.removeAttribute("id"),Le.draggable=!1,Le.style["will-change"]="",this._hideClone(),jr(Le,this.options.chosenClass,!1),Ht.clone=Le),v.cloneId=ca(function(){vr("clone",v),!Ht.eventCanceled&&(v.options.removeCloneOnHide||Pe.insertBefore(Le,ht),v._hideClone(),fr({sortable:v,name:"clone"}))}),!f&&jr(ht,P.dragClass,!0),f?(ea=!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",P.setData&&P.setData.call(v,k,ht)),de(document,"drop",v),Mt(ht,"transform","translateZ(0)")),_i=!0,v._dragStartId=ca(v._dragStarted.bind(v,f,d)),de(document,"selectstart",v),jo=!0,wo&&Mt(document.body,"user-select","none")},_onDragOver:function(d){var f=this.el,v=d.target,k,P,m,j=this.options,r=j.group,y=Ht.active,b=ta===r,g=j.sort,_=Ke||y,O,C=this,E=!1;if(ps)return;function T(mt,ct){vr(mt,C,Gr({evt:d,isOwner:b,axis:O?"vertical":"horizontal",revert:m,dragRect:k,targetRect:P,canSort:g,fromSortable:_,target:v,completed:R,onMove:function(Tt,Ft){return la(Pe,f,ht,k,Tt,We(Tt),d,Ft)},changed:I},ct))}function L(){T("dragOverAnimationCapture"),C.captureAnimationState(),C!==_&&_.captureAnimationState()}function R(mt){return T("dragOverCompleted",{insertion:mt}),mt&&(b?y._hideClone():y._showClone(C),C!==_&&(jr(ht,Ke?Ke.options.ghostClass:y.options.ghostClass,!1),jr(ht,j.ghostClass,!0)),Ke!==C&&C!==Ht.active?Ke=C:C===Ht.active&&Ke&&(Ke=null),_===C&&(C._ignoreWhileAnimating=v),C.animateAll(function(){T("dragOverAnimationComplete"),C._ignoreWhileAnimating=null}),C!==_&&(_.animateAll(),_._ignoreWhileAnimating=null)),(v===ht&&!ht.animated||v===f&&!v.animated)&&(xi=null),!j.dragoverBubble&&!d.rootEl&&v!==document&&(ht.parentNode[Or]._isOutsideThisEl(d.target),!mt&&Jn(d)),!j.dragoverBubble&&d.stopPropagation&&d.stopPropagation(),E=!0}function I(){Er=Pr(ht),jn=Pr(ht,j.draggable),fr({sortable:C,name:"change",toEl:f,newIndex:Er,newDraggableIndex:jn,originalEvent:d})}if(d.preventDefault!==void 0&&d.cancelable&&d.preventDefault(),v=Wr(v,j.draggable,f,!0),T("dragOver"),Ht.eventCanceled)return E;if(ht.contains(d.target)||v.animated&&v.animatingX&&v.animatingY||C._ignoreWhileAnimating===v)return R(!1);if(ea=!1,y&&!j.disabled&&(b?g||(m=Ne!==Pe):Ke===this||(this.lastPutMode=ta.checkPull(this,y,ht,d))&&r.checkPut(this,y,ht,d))){if(O=this._getDirection(d,v)==="vertical",k=We(ht),T("dragOverValid"),Ht.eventCanceled)return E;if(m)return Ne=Pe,L(),this._hideClone(),T("revert"),Ht.eventCanceled||(Wn?Pe.insertBefore(ht,Wn):Pe.appendChild(ht)),R(!0);var N=ss(f,j.draggable);if(!N||Cu(d,O,this)&&!N.animated){if(N===ht)return R(!1);if(N&&f===d.target&&(v=N),v&&(P=We(v)),la(Pe,f,ht,k,v,P,d,!!v)!==!1)return L(),N&&N.nextSibling?f.insertBefore(ht,N.nextSibling):f.appendChild(ht),Ne=f,I(),R(!0)}else if(N&&Eu(d,O,this)){var H=bi(f,0,j,!0);if(H===ht)return R(!1);if(v=H,P=We(v),la(Pe,f,ht,k,v,P,d,!1)!==!1)return L(),f.insertBefore(ht,H),Ne=f,I(),R(!0)}else if(v.parentNode===f){P=We(v);var $=0,U,q=ht.parentNode!==f,B=!_u(ht.animated&&ht.toRect||k,v.animated&&v.toRect||P,O),z=O?"top":"left",M=Fl(v,"top","top")||Fl(ht,"top","top"),X=M?M.scrollTop:void 0;xi!==v&&(U=P[z],Eo=!1,na=!B&&j.invertSwap||q),$=Su(d,v,P,O,B?1:j.swapThreshold,j.invertedSwapThreshold==null?j.swapThreshold:j.invertedSwapThreshold,na,xi===v);var Y;if($!==0){var Q=Pr(ht);do Q-=$,Y=Ne.children[Q];while(Y&&(Mt(Y,"display")==="none"||Y===Jt))}if($===0||Y===v)return R(!1);xi=v,Oo=$;var tt=v.nextElementSibling,it=!1;it=$===1;var st=la(Pe,f,ht,k,v,P,d,it);if(st!==!1)return(st===1||st===-1)&&(it=st===1),ps=!0,setTimeout(Ou,30),L(),it&&!tt?f.appendChild(ht):v.parentNode.insertBefore(ht,it?tt:v),M&&ql(M,0,X-M.scrollTop),Ne=ht.parentNode,U!==void 0&&!na&&(ia=Math.abs(U-We(v)[z])),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",Jn),se(document,"mousemove",Jn),se(document,"touchmove",Jn)},_offUpEvents:function(){var d=this.el.ownerDocument;se(d,"mouseup",this._onDrop),se(d,"touchend",this._onDrop),se(d,"pointerup",this._onDrop),se(d,"touchcancel",this._onDrop),se(document,"selectstart",this)},_onDrop:function(d){var f=this.el,v=this.options;if(Er=Pr(ht),jn=Pr(ht,v.draggable),vr("drop",this,{evt:d}),Ne=ht&&ht.parentNode,Er=Pr(ht),jn=Pr(ht,v.draggable),Ht.eventCanceled){this._nulling();return}_i=!1,na=!1,Eo=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),ys(this.cloneId),ys(this._dragStartId),this.nativeDraggable&&(se(document,"drop",this),se(f,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),wo&&Mt(document.body,"user-select",""),Mt(ht,"transform",""),d&&(jo&&(d.cancelable&&d.preventDefault(),!v.dropBubble&&d.stopPropagation()),Jt&&Jt.parentNode&&Jt.parentNode.removeChild(Jt),(Pe===Ne||Ke&&Ke.lastPutMode!=="clone")&&Le&&Le.parentNode&&Le.parentNode.removeChild(Le),ht&&(this.nativeDraggable&&se(ht,"dragend",this),fs(ht),ht.style["will-change"]="",jo&&!_i&&jr(ht,Ke?Ke.options.ghostClass:this.options.ghostClass,!1),jr(ht,this.options.chosenClass,!1),fr({sortable:this,name:"unchoose",toEl:Ne,newIndex:null,newDraggableIndex:null,originalEvent:d}),Pe!==Ne?(Er>=0&&(fr({rootEl:Ne,name:"add",toEl:Ne,fromEl:Pe,originalEvent:d}),fr({sortable:this,name:"remove",toEl:Ne,originalEvent:d}),fr({rootEl:Ne,name:"sort",toEl:Ne,fromEl:Pe,originalEvent:d}),fr({sortable:this,name:"sort",toEl:Ne,originalEvent:d})),Ke&&Ke.save()):Er!==wi&&Er>=0&&(fr({sortable:this,name:"update",toEl:Ne,originalEvent:d}),fr({sortable:this,name:"sort",toEl:Ne,originalEvent:d})),Ht.active&&((Er==null||Er===-1)&&(Er=wi,jn=ko),fr({sortable:this,name:"end",toEl:Ne,originalEvent:d}),this.save()))),this._nulling()},_nulling:function(){vr("nulling",this),Pe=ht=Ne=Jt=Wn=Le=Ko=kn=Zn=Nr=jo=Er=jn=wi=ko=xi=Oo=Ke=ta=Ht.dragged=Ht.ghost=Ht.clone=Ht.active=null,oa.forEach(function(d){d.checked=!0}),oa.length=us=hs=0},handleEvent:function(d){switch(d.type){case"drop":case"dragend":this._onDrop(d);break;case"dragenter":case"dragover":ht&&(this._onDragOver(d),ju(d));break;case"selectstart":d.preventDefault();break}},toArray:function(){for(var d=[],f,v=this.el.children,k=0,P=v.length,m=this.options;k<P;k++)f=v[k],Wr(f,m.draggable,this.el,!1)&&d.push(f.getAttribute(m.dataIdAttr)||Tu(f));return d},sort:function(d,f){var v={},k=this.el;this.toArray().forEach(function(P,m){var j=k.children[m];Wr(j,this.options.draggable,k,!1)&&(v[P]=j)},this),f&&this.captureAnimationState(),d.forEach(function(P){v[P]&&(k.removeChild(v[P]),k.appendChild(v[P]))}),f&&this.animateAll()},save:function(){var d=this.options.store;d&&d.set&&d.set(this)},closest:function(d,f){return Wr(d,f||this.options.draggable,this.el,!1)},option:function(d,f){var v=this.options;if(f===void 0)return v[d];var k=xo.modifyOption(this,d,f);typeof k<"u"?v[d]=k:v[d]=f,d==="group"&&Xl(v)},destroy:function(){vr("destroy",this);var d=this.el;d[Or]=null,se(d,"mousedown",this._onTapStart),se(d,"touchstart",this._onTapStart),se(d,"pointerdown",this._onTapStart),this.nativeDraggable&&(se(d,"dragover",this),se(d,"dragenter",this)),Array.prototype.forEach.call(d.querySelectorAll("[draggable]"),function(f){f.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),ra.splice(ra.indexOf(this.el),1),this.el=d=null},_hideClone:function(){if(!kn){if(vr("hideClone",this),Ht.eventCanceled)return;Mt(Le,"display","none"),this.options.removeCloneOnHide&&Le.parentNode&&Le.parentNode.removeChild(Le),kn=!0}},_showClone:function(d){if(d.lastPutMode!=="clone"){this._hideClone();return}if(kn){if(vr("showClone",this),Ht.eventCanceled)return;ht.parentNode==Pe&&!this.options.group.revertClone?Pe.insertBefore(Le,ht):Wn?Pe.insertBefore(Le,Wn):Pe.appendChild(Le),this.options.group.revertClone&&this.animate(ht,Le),Mt(Le,"display",""),kn=!1}}};function ju(x){x.dataTransfer&&(x.dataTransfer.dropEffect="move"),x.cancelable&&x.preventDefault()}function la(x,d,f,v,k,P,m,j){var r,y=x[Or],b=y.options.onMove,g;return window.CustomEvent&&!hn&&!go?r=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(r=document.createEvent("Event"),r.initEvent("move",!0,!0)),r.to=d,r.from=x,r.dragged=f,r.draggedRect=v,r.related=k||d,r.relatedRect=P||We(d),r.willInsertAfter=j,r.originalEvent=m,x.dispatchEvent(r),b&&(g=b.call(y,r,m)),g}function fs(x){x.draggable=!1}function Ou(){ps=!1}function Eu(x,d,f){var v=We(bi(f.el,0,f.options,!0)),k=10;return d?x.clientX<v.left-k||x.clientY<v.top&&x.clientX<v.right:x.clientY<v.top-k||x.clientY<v.bottom&&x.clientX<v.left}function Cu(x,d,f){var v=We(ss(f.el,f.options.draggable)),k=10;return d?x.clientX>v.right+k||x.clientX<=v.right&&x.clientY>v.bottom&&x.clientX>=v.left:x.clientX>v.right&&x.clientY>v.top||x.clientX<=v.right&&x.clientY>v.bottom+k}function Su(x,d,f,v,k,P,m,j){var r=v?x.clientY:x.clientX,y=v?f.height:f.width,b=v?f.top:f.left,g=v?f.bottom:f.right,_=!1;if(!m){if(j&&ia<y*k){if(!Eo&&(Oo===1?r>b+y*P/2:r<g-y*P/2)&&(Eo=!0),Eo)_=!0;else if(Oo===1?r<b+ia:r>g-ia)return-Oo}else if(r>b+y*(1-k)/2&&r<g-y*(1-k)/2)return Pu(d)}return _=_||m,_&&(r<b+y*P/2||r>g-y*P/2)?r>b+y/2?1:-1:0}function Pu(x){return Pr(ht)<Pr(x)?1:-1}function Tu(x){for(var d=x.tagName+x.className+x.src+x.href+x.textContent,f=d.length,v=0;f--;)v+=d.charCodeAt(f);return v.toString(36)}function Lu(x){oa.length=0;for(var d=x.getElementsByTagName("input"),f=d.length;f--;){var v=d[f];v.checked&&oa.push(v)}}function ca(x){return setTimeout(x,0)}function ys(x){return clearTimeout(x)}aa&&de(document,"touchmove",function(x){(Ht.active||_i)&&x.cancelable&&x.preventDefault()}),Ht.utils={on:de,off:se,css:Mt,find:Hl,is:function(d,f){return!!Wr(d,f,d,!1)},extend:pu,throttle:zl,closest:Wr,toggleClass:jr,clone:Ul,index:Pr,nextTick:ca,cancelNextTick:ys,detectDirection:Yl,getChild:bi},Ht.get=function(x){return x[Or]},Ht.mount=function(){for(var x=arguments.length,d=new Array(x),f=0;f<x;f++)d[f]=arguments[f];d[0].constructor===Array&&(d=d[0]),d.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&&(Ht.utils=Gr(Gr({},Ht.utils),v.utils)),xo.mount(v)})},Ht.create=function(x,d){return new Ht(x,d)},Ht.version=uu;var Ge=[],Co,ms,vs=!1,bs,gs,ua,So;function Au(){function x(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var d in this)d.charAt(0)==="_"&&typeof this[d]=="function"&&(this[d]=this[d].bind(this))}return x.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)),tc(),ha(),fu()},nulling:function(){ua=ms=Co=vs=So=bs=gs=null,Ge.length=0},_handleFallbackAutoScroll:function(f){this._handleAutoScroll(f,!0)},_handleAutoScroll:function(f,v){var k=this,P=(f.touches?f.touches[0]:f).clientX,m=(f.touches?f.touches[0]:f).clientY,j=document.elementFromPoint(P,m);if(ua=f,v||this.options.forceAutoScrollFallback||go||hn||wo){ws(f,this.options,j,v);var r=xn(j,!0);vs&&(!So||P!==bs||m!==gs)&&(So&&tc(),So=setInterval(function(){var y=xn(document.elementFromPoint(P,m),!0);y!==r&&(r=y,ha()),ws(f,k.options,y,v)},10),bs=P,gs=m)}else{if(!this.options.bubbleScroll||xn(j,!0)===Zr()){ha();return}ws(f,this.options,xn(j,!1),!1)}}},cn(x,{pluginName:"scroll",initializeByDefault:!0})}function ha(){Ge.forEach(function(x){clearInterval(x.pid)}),Ge=[]}function tc(){clearInterval(So)}var ws=zl(function(x,d,f,v){if(d.scroll){var k=(x.touches?x.touches[0]:x).clientX,P=(x.touches?x.touches[0]:x).clientY,m=d.scrollSensitivity,j=d.scrollSpeed,r=Zr(),y=!1,b;ms!==f&&(ms=f,ha(),Co=d.scroll,b=d.scrollFn,Co===!0&&(Co=xn(f,!0)));var g=0,_=Co;do{var O=_,C=We(O),E=C.top,T=C.bottom,L=C.left,R=C.right,I=C.width,N=C.height,H=void 0,$=void 0,U=O.scrollWidth,q=O.scrollHeight,B=Mt(O),z=O.scrollLeft,M=O.scrollTop;O===r?(H=I<U&&(B.overflowX==="auto"||B.overflowX==="scroll"||B.overflowX==="visible"),$=N<q&&(B.overflowY==="auto"||B.overflowY==="scroll"||B.overflowY==="visible")):(H=I<U&&(B.overflowX==="auto"||B.overflowX==="scroll"),$=N<q&&(B.overflowY==="auto"||B.overflowY==="scroll"));var X=H&&(Math.abs(R-k)<=m&&z+I<U)-(Math.abs(L-k)<=m&&!!z),Y=$&&(Math.abs(T-P)<=m&&M+N<q)-(Math.abs(E-P)<=m&&!!M);if(!Ge[g])for(var Q=0;Q<=g;Q++)Ge[Q]||(Ge[Q]={});(Ge[g].vx!=X||Ge[g].vy!=Y||Ge[g].el!==O)&&(Ge[g].el=O,Ge[g].vx=X,Ge[g].vy=Y,clearInterval(Ge[g].pid),(X!=0||Y!=0)&&(y=!0,Ge[g].pid=setInterval((function(){v&&this.layer===0&&Ht.active._onTouchMove(ua);var tt=Ge[this.layer].vy?Ge[this.layer].vy*j:0,it=Ge[this.layer].vx?Ge[this.layer].vx*j:0;typeof b=="function"&&b.call(Ht.dragged.parentNode[Or],it,tt,x,ua,Ge[this.layer].el)!=="continue"||ql(Ge[this.layer].el,it,tt)}).bind({layer:g}),24))),g++}while(d.bubbleScroll&&_!==r&&(_=xn(_,!1)));vs=y}},30),ec=function(d){var f=d.originalEvent,v=d.putSortable,k=d.dragEl,P=d.activeSortable,m=d.dispatchSortableEvent,j=d.hideGhostForTarget,r=d.unhideGhostForTarget;if(f){var y=v||P;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 _s(){}_s.prototype={startIndex:null,dragStart:function(d){var f=d.oldDraggableIndex;this.startIndex=f},onSpill:function(d){var f=d.dragEl,v=d.putSortable;this.sortable.captureAnimationState(),v&&v.captureAnimationState();var k=bi(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:ec},cn(_s,{pluginName:"revertOnSpill"});function xs(){}xs.prototype={onSpill:function(d){var f=d.dragEl,v=d.putSortable,k=v||this.sortable;k.captureAnimationState(),f.parentNode&&f.parentNode.removeChild(f),k.animateAll()},drop:ec},cn(xs,{pluginName:"removeOnSpill"}),Ht.mount(new Au),Ht.mount(xs,_s);const Ru=(x,d,f)=>{let v=[];x._sortable=Ht.create(x,{handle:".drag-handle",filter:".drag-handle.disabled",swapThreshold:.5,animation:150,easing:"cubic-bezier(1, 0, 0, 1)",onStart:k=>{const P=k.item;v=Array.prototype.slice.call(P.parentNode.childNodes),v=v.filter(m=>m.nodeType!=Node.ELEMENT_NODE||!m.classList.contains("sortable-fallback"))},onEnd:k=>{const m=k.item.parentNode;for(const r of v)m.appendChild(r);if(k.oldIndex==k.newIndex)return;const j=d.getArray().find(r=>r.ol_uid===k.item.querySelector("eox-layercontrol-layer").layer.ol_uid);d.remove(j),d.insertAt(d.getLength()-k.newIndex,j),f.requestUpdate()}})},ks=(x,d,f)=>{let v=[];const k=(P,m,j)=>{v=[...v,...P.filter(y=>y.get(m)===j)];const r=P.filter(y=>y.getLayers);return r.length>0&&r.forEach(y=>k(y.getLayers().getArray(),m,j)),v};return k(x,d,f),v},Iu=(x,d)=>{var f,v,k;if(!(!x||!d))return x.getLayers?"group":(k=(f=d.getInteractions().getArray().filter(P=>P.freehand_!==void 0).map(P=>P.source_))==null?void 0:f.ol_uid)!=null&&k.includes(x.getSource?(v=x.getSource())==null?void 0:v.ol_uid:void 0)?"draw":x.declutter_!==void 0?"vector":"raster"},rc=(x,d)=>{const f=x.get("minZoom"),v=x.get("maxZoom");return!!(d&&(f!==-1/0||v!==1/0))},Du=(x,d,f)=>{if(!x||!d)return!1;if(!rc(x,f))return!0;const v=x.get("minZoom"),k=x.get("maxZoom"),P=d.getView().getZoom();return P>v&&P<k};function Bu(x,d,f){const v=new URL(x).searchParams;Object.entries(d).forEach(([j,r])=>{typeof r=="object"&&!Array.isArray(r)&&r!==null?Object.keys(r).forEach(y=>{v.set(y,r[y])}):v.set(j,r)});const k=x.split("?")[0],P=v.toString(),m=`${k}?${P}`;f.getSource().setUrl(m)}function nc(x,d){var v;let f={};for(const k in x){const P=x[k].type;if(P&&P!=="object")f[k]=P==="number"?Number(d[k]):d[k];else if(typeof x[k]=="object"&&((v=x[k])!=null&&v.properties)){const m=nc(x[k].properties,d);Object.keys(m).length>0&&(f[k]=m)}}return f}function Nu(x,d){var P;const f=new URL(x.getSource().getUrls()[0]),v=Object.fromEntries(f.searchParams.entries()),k=nc(((P=d.schema)==null?void 0:P.properties)||d.schema,v);return Object.keys(k).length?k:null}/**
|
|
40
|
+
*/function Dl(x,d){var f=Object.keys(x);if(Object.getOwnPropertySymbols){var v=Object.getOwnPropertySymbols(x);d&&(v=v.filter(function(k){return Object.getOwnPropertyDescriptor(x,k).enumerable})),f.push.apply(f,v)}return f}function Gr(x){for(var d=1;d<arguments.length;d++){var f=arguments[d]!=null?arguments[d]:{};d%2?Dl(Object(f),!0).forEach(function(v){lu(x,v,f[v])}):Object.getOwnPropertyDescriptors?Object.defineProperties(x,Object.getOwnPropertyDescriptors(f)):Dl(Object(f)).forEach(function(v){Object.defineProperty(x,v,Object.getOwnPropertyDescriptor(f,v))})}return x}function Qo(x){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Qo=function(d){return typeof d}:Qo=function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},Qo(x)}function lu(x,d,f){return d in x?Object.defineProperty(x,d,{value:f,enumerable:!0,configurable:!0,writable:!0}):x[d]=f,x}function cn(){return cn=Object.assign||function(x){for(var d=1;d<arguments.length;d++){var f=arguments[d];for(var v in f)Object.prototype.hasOwnProperty.call(f,v)&&(x[v]=f[v])}return x},cn.apply(this,arguments)}function cu(x,d){if(x==null)return{};var f={},v=Object.keys(x),k,P;for(P=0;P<v.length;P++)k=v[P],!(d.indexOf(k)>=0)&&(f[k]=x[k]);return f}function uu(x,d){if(x==null)return{};var f=cu(x,d),v,k;if(Object.getOwnPropertySymbols){var P=Object.getOwnPropertySymbols(x);for(k=0;k<P.length;k++)v=P[k],!(d.indexOf(v)>=0)&&Object.prototype.propertyIsEnumerable.call(x,v)&&(f[v]=x[v])}return f}var hu="1.15.0";function un(x){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(x)}var hn=un(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),_o=un(/Edge/i),Bl=un(/firefox/i),xo=un(/safari/i)&&!un(/chrome/i)&&!un(/android/i),Nl=un(/iP(ad|od|hone)/i),$l=un(/chrome/i)&&un(/android/i),Ml={capture:!1,passive:!1};function de(x,d,f){x.addEventListener(d,f,!hn&&Ml)}function se(x,d,f){x.removeEventListener(d,f,!hn&&Ml)}function Ko(x,d){if(d){if(d[0]===">"&&(d=d.substring(1)),x)try{if(x.matches)return x.matches(d);if(x.msMatchesSelector)return x.msMatchesSelector(d);if(x.webkitMatchesSelector)return x.webkitMatchesSelector(d)}catch{return!1}return!1}}function du(x){return x.host&&x!==document&&x.host.nodeType?x.host:x.parentNode}function Wr(x,d,f,v){if(x){f=f||document;do{if(d!=null&&(d[0]===">"?x.parentNode===f&&Ko(x,d):Ko(x,d))||v&&x===f)return x;if(x===f)break}while(x=du(x))}return null}var Fl=/\s+/g;function jr(x,d,f){if(x&&d)if(x.classList)x.classList[f?"add":"remove"](d);else{var v=(" "+x.className+" ").replace(Fl," ").replace(" "+d+" "," ");x.className=(v+(f?" "+d:"")).replace(Fl," ")}}function Mt(x,d,f){var v=x&&x.style;if(v){if(f===void 0)return document.defaultView&&document.defaultView.getComputedStyle?f=document.defaultView.getComputedStyle(x,""):x.currentStyle&&(f=x.currentStyle),d===void 0?f:f[d];!(d in v)&&d.indexOf("webkit")===-1&&(d="-webkit-"+d),v[d]=f+(typeof f=="string"?"":"px")}}function vi(x,d){var f="";if(typeof x=="string")f=x;else do{var v=Mt(x,"transform");v&&v!=="none"&&(f=v+" "+f)}while(!d&&(x=x.parentNode));var k=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return k&&new k(f)}function Hl(x,d,f){if(x){var v=x.getElementsByTagName(d),k=0,P=v.length;if(f)for(;k<P;k++)f(v[k],k);return v}return[]}function Zr(){var x=document.scrollingElement;return x||document.documentElement}function We(x,d,f,v,k){if(!(!x.getBoundingClientRect&&x!==window)){var P,m,j,r,y,b,g;if(x!==window&&x.parentNode&&x!==Zr()?(P=x.getBoundingClientRect(),m=P.top,j=P.left,r=P.bottom,y=P.right,b=P.height,g=P.width):(m=0,j=0,r=window.innerHeight,y=window.innerWidth,b=window.innerHeight,g=window.innerWidth),(d||f)&&x!==window&&(k=k||x.parentNode,!hn))do if(k&&k.getBoundingClientRect&&(Mt(k,"transform")!=="none"||f&&Mt(k,"position")!=="static")){var _=k.getBoundingClientRect();m-=_.top+parseInt(Mt(k,"border-top-width")),j-=_.left+parseInt(Mt(k,"border-left-width")),r=m+P.height,y=j+P.width;break}while(k=k.parentNode);if(v&&x!==window){var O=vi(k||x),C=O&&O.a,E=O&&O.d;O&&(m/=E,j/=C,g/=C,b/=E,r=m+b,y=j+g)}return{top:m,left:j,bottom:r,right:y,width:g,height:b}}}function Vl(x,d,f){for(var v=xn(x,!0),k=We(x)[d];v;){var P=We(v)[f],m=void 0;if(f==="top"||f==="left"?m=k>=P:m=k<=P,!m)return v;if(v===Zr())break;v=xn(v,!1)}return!1}function bi(x,d,f,v){for(var k=0,P=0,m=x.children;P<m.length;){if(m[P].style.display!=="none"&&m[P]!==Ft.ghost&&(v||m[P]!==Ft.dragged)&&Wr(m[P],f.draggable,x,!1)){if(k===d)return m[P];k++}P++}return null}function ls(x,d){for(var f=x.lastElementChild;f&&(f===Ft.ghost||Mt(f,"display")==="none"||d&&!Ko(f,d));)f=f.previousElementSibling;return f||null}function Pr(x,d){var f=0;if(!x||!x.parentNode)return-1;for(;x=x.previousElementSibling;)x.nodeName.toUpperCase()!=="TEMPLATE"&&x!==Ft.clone&&(!d||Ko(x,d))&&f++;return f}function zl(x){var d=0,f=0,v=Zr();if(x)do{var k=vi(x),P=k.a,m=k.d;d+=x.scrollLeft*P,f+=x.scrollTop*m}while(x!==v&&(x=x.parentNode));return[d,f]}function pu(x,d){for(var f in x)if(x.hasOwnProperty(f)){for(var v in d)if(d.hasOwnProperty(v)&&d[v]===x[f][v])return Number(f)}return-1}function xn(x,d){if(!x||!x.getBoundingClientRect)return Zr();var f=x,v=!1;do if(f.clientWidth<f.scrollWidth||f.clientHeight<f.scrollHeight){var k=Mt(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||d)return f;v=!0}}while(f=f.parentNode);return Zr()}function fu(x,d){if(x&&d)for(var f in d)d.hasOwnProperty(f)&&(x[f]=d[f]);return x}function cs(x,d){return Math.round(x.top)===Math.round(d.top)&&Math.round(x.left)===Math.round(d.left)&&Math.round(x.height)===Math.round(d.height)&&Math.round(x.width)===Math.round(d.width)}var ko;function ql(x,d){return function(){if(!ko){var f=arguments,v=this;f.length===1?x.call(v,f[0]):x.apply(v,f),ko=setTimeout(function(){ko=void 0},d)}}}function yu(){clearTimeout(ko),ko=void 0}function Ul(x,d,f){x.scrollLeft+=d,x.scrollTop+=f}function Gl(x){var d=window.Polymer,f=window.jQuery||window.Zepto;return d&&d.dom?d.dom(x).cloneNode(!0):f?f(x).clone(!0)[0]:x.cloneNode(!0)}var Or="Sortable"+new Date().getTime();function mu(){var x=[],d;return{captureAnimationState:function(){if(x=[],!!this.options.animation){var v=[].slice.call(this.el.children);v.forEach(function(k){if(!(Mt(k,"display")==="none"||k===Ft.ghost)){x.push({target:k,rect:We(k)});var P=Gr({},x[x.length-1].rect);if(k.thisAnimationDuration){var m=vi(k,!0);m&&(P.top-=m.f,P.left-=m.e)}k.fromRect=P}})}},addAnimationState:function(v){x.push(v)},removeAnimationState:function(v){x.splice(pu(x,{target:v}),1)},animateAll:function(v){var k=this;if(!this.options.animation){clearTimeout(d),typeof v=="function"&&v();return}var P=!1,m=0;x.forEach(function(j){var r=0,y=j.target,b=y.fromRect,g=We(y),_=y.prevFromRect,O=y.prevToRect,C=j.rect,E=vi(y,!0);E&&(g.top-=E.f,g.left-=E.e),y.toRect=g,y.thisAnimationDuration&&cs(_,g)&&!cs(b,g)&&(C.top-g.top)/(C.left-g.left)===(b.top-g.top)/(b.left-g.left)&&(r=bu(C,_,O,k.options)),cs(g,b)||(y.prevFromRect=b,y.prevToRect=g,r||(r=k.options.animation),k.animate(y,C,g,r)),r&&(P=!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(d),P?d=setTimeout(function(){typeof v=="function"&&v()},m):typeof v=="function"&&v(),x=[]},animate:function(v,k,P,m){if(m){Mt(v,"transition",""),Mt(v,"transform","");var j=vi(this.el),r=j&&j.a,y=j&&j.d,b=(k.left-P.left)/(r||1),g=(k.top-P.top)/(y||1);v.animatingX=!!b,v.animatingY=!!g,Mt(v,"transform","translate3d("+b+"px,"+g+"px,0)"),this.forRepaintDummy=vu(v),Mt(v,"transition","transform "+m+"ms"+(this.options.easing?" "+this.options.easing:"")),Mt(v,"transform","translate3d(0,0,0)"),typeof v.animated=="number"&&clearTimeout(v.animated),v.animated=setTimeout(function(){Mt(v,"transition",""),Mt(v,"transform",""),v.animated=!1,v.animatingX=!1,v.animatingY=!1},m)}}}}function vu(x){return x.offsetWidth}function bu(x,d,f,v){return Math.sqrt(Math.pow(d.top-x.top,2)+Math.pow(d.left-x.left,2))/Math.sqrt(Math.pow(d.top-f.top,2)+Math.pow(d.left-f.left,2))*v.animation}var gi=[],us={initializeByDefault:!0},jo={mount:function(d){for(var f in us)us.hasOwnProperty(f)&&!(f in d)&&(d[f]=us[f]);gi.forEach(function(v){if(v.pluginName===d.pluginName)throw"Sortable: Cannot mount plugin ".concat(d.pluginName," more than once")}),gi.push(d)},pluginEvent:function(d,f,v){var k=this;this.eventCanceled=!1,v.cancel=function(){k.eventCanceled=!0};var P=d+"Global";gi.forEach(function(m){f[m.pluginName]&&(f[m.pluginName][P]&&f[m.pluginName][P](Gr({sortable:f},v)),f.options[m.pluginName]&&f[m.pluginName][d]&&f[m.pluginName][d](Gr({sortable:f},v)))})},initializePlugins:function(d,f,v,k){gi.forEach(function(j){var r=j.pluginName;if(!(!d.options[r]&&!j.initializeByDefault)){var y=new j(d,f,d.options);y.sortable=d,y.options=d.options,d[r]=y,cn(v,y.defaults)}});for(var P in d.options)if(d.options.hasOwnProperty(P)){var m=this.modifyOption(d,P,d.options[P]);typeof m<"u"&&(d.options[P]=m)}},getEventProperties:function(d,f){var v={};return gi.forEach(function(k){typeof k.eventProperties=="function"&&cn(v,k.eventProperties.call(f[k.pluginName],d))}),v},modifyOption:function(d,f,v){var k;return gi.forEach(function(P){d[P.pluginName]&&P.optionListeners&&typeof P.optionListeners[f]=="function"&&(k=P.optionListeners[f].call(d[P.pluginName],v))}),k}};function gu(x){var d=x.sortable,f=x.rootEl,v=x.name,k=x.targetEl,P=x.cloneEl,m=x.toEl,j=x.fromEl,r=x.oldIndex,y=x.newIndex,b=x.oldDraggableIndex,g=x.newDraggableIndex,_=x.originalEvent,O=x.putSortable,C=x.extraEventProperties;if(d=d||f&&f[Or],!!d){var E,T=d.options,L="on"+v.charAt(0).toUpperCase()+v.substr(1);window.CustomEvent&&!hn&&!_o?E=new CustomEvent(v,{bubbles:!0,cancelable:!0}):(E=document.createEvent("Event"),E.initEvent(v,!0,!0)),E.to=m||f,E.from=j||f,E.item=k||f,E.clone=P,E.oldIndex=r,E.newIndex=y,E.oldDraggableIndex=b,E.newDraggableIndex=g,E.originalEvent=_,E.pullMode=O?O.lastPutMode:void 0;var R=Gr(Gr({},C),jo.getEventProperties(v,d));for(var I in R)E[I]=R[I];f&&f.dispatchEvent(E),T[L]&&T[L].call(d,E)}}var wu=["evt"],vr=function(d,f){var v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},k=v.evt,P=uu(v,wu);jo.pluginEvent.bind(Ft)(d,f,Gr({dragEl:ht,parentEl:Me,ghostEl:Jt,rootEl:Pe,nextEl:Wn,lastDownEl:ta,cloneEl:Ae,cloneHidden:kn,dragStarted:Eo,putSortable:Ke,activeSortable:Ft.active,originalEvent:k,oldIndex:wi,oldDraggableIndex:Oo,newIndex:Er,newDraggableIndex:jn,hideGhostForTarget:Kl,unhideGhostForTarget:tc,cloneNowHidden:function(){kn=!0},cloneNowShown:function(){kn=!1},dispatchSortableEvent:function(j){pr({sortable:f,name:j,originalEvent:k})}},P))};function pr(x){gu(Gr({putSortable:Ke,cloneEl:Ae,targetEl:ht,rootEl:Pe,oldIndex:wi,oldDraggableIndex:Oo,newIndex:Er,newDraggableIndex:jn},x))}var ht,Me,Jt,Pe,Wn,ta,Ae,kn,wi,Er,Oo,jn,ea,Ke,_i=!1,ra=!1,na=[],Zn,Nr,hs,ds,Wl,Zl,Eo,xi,Co,So=!1,ia=!1,oa,nr,ps=[],fs=!1,aa=[],sa=typeof document<"u",la=Nl,Jl=_o||hn?"cssFloat":"float",_u=sa&&!$l&&!Nl&&"draggable"in document.createElement("div"),Yl=function(){if(sa){if(hn)return!1;var x=document.createElement("x");return x.style.cssText="pointer-events:auto",x.style.pointerEvents==="auto"}}(),Xl=function(d,f){var v=Mt(d),k=parseInt(v.width)-parseInt(v.paddingLeft)-parseInt(v.paddingRight)-parseInt(v.borderLeftWidth)-parseInt(v.borderRightWidth),P=bi(d,0,f),m=bi(d,1,f),j=P&&Mt(P),r=m&&Mt(m),y=j&&parseInt(j.marginLeft)+parseInt(j.marginRight)+We(P).width,b=r&&parseInt(r.marginLeft)+parseInt(r.marginRight)+We(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(P&&j.float&&j.float!=="none"){var g=j.float==="left"?"left":"right";return m&&(r.clear==="both"||r.clear===g)?"vertical":"horizontal"}return P&&(j.display==="block"||j.display==="flex"||j.display==="table"||j.display==="grid"||y>=k&&v[Jl]==="none"||m&&v[Jl]==="none"&&y+b>k)?"vertical":"horizontal"},xu=function(d,f,v){var k=v?d.left:d.top,P=v?d.right:d.bottom,m=v?d.width:d.height,j=v?f.left:f.top,r=v?f.right:f.bottom,y=v?f.width:f.height;return k===j||P===r||k+m/2===j+y/2},ku=function(d,f){var v;return na.some(function(k){var P=k[Or].options.emptyInsertThreshold;if(!(!P||ls(k))){var m=We(k),j=d>=m.left-P&&d<=m.right+P,r=f>=m.top-P&&f<=m.bottom+P;if(j&&r)return v=k}}),v},Ql=function(d){function f(P,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(P==null&&(m||g))return!0;if(P==null||P===!1)return!1;if(m&&P==="clone")return P;if(typeof P=="function")return f(P(j,r,y,b),m)(j,r,y,b);var _=(m?j:r).options.group.name;return P===!0||typeof P=="string"&&P===_||P.join&&P.indexOf(_)>-1}}var v={},k=d.group;(!k||Qo(k)!="object")&&(k={name:k}),v.name=k.name,v.checkPull=f(k.pull,!0),v.checkPut=f(k.put),v.revertClone=k.revertClone,d.group=v},Kl=function(){!Yl&&Jt&&Mt(Jt,"display","none")},tc=function(){!Yl&&Jt&&Mt(Jt,"display","")};sa&&!$l&&document.addEventListener("click",function(x){if(ra)return x.preventDefault(),x.stopPropagation&&x.stopPropagation(),x.stopImmediatePropagation&&x.stopImmediatePropagation(),ra=!1,!1},!0);var Jn=function(d){if(ht){d=d.touches?d.touches[0]:d;var f=ku(d.clientX,d.clientY);if(f){var v={};for(var k in d)d.hasOwnProperty(k)&&(v[k]=d[k]);v.target=v.rootEl=f,v.preventDefault=void 0,v.stopPropagation=void 0,f[Or]._onDragOver(v)}}},ju=function(d){ht&&ht.parentNode[Or]._isOutsideThisEl(d.target)};function Ft(x,d){if(!(x&&x.nodeType&&x.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(x));this.el=x,this.options=d=cn({},d),x[Or]=this;var f={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(x.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Xl(x,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&&!xo,emptyInsertThreshold:5};jo.initializePlugins(this,x,f);for(var v in f)!(v in d)&&(d[v]=f[v]);Ql(d);for(var k in this)k.charAt(0)==="_"&&typeof this[k]=="function"&&(this[k]=this[k].bind(this));this.nativeDraggable=d.forceFallback?!1:_u,this.nativeDraggable&&(this.options.touchStartThreshold=1),d.supportPointer?de(x,"pointerdown",this._onTapStart):(de(x,"mousedown",this._onTapStart),de(x,"touchstart",this._onTapStart)),this.nativeDraggable&&(de(x,"dragover",this),de(x,"dragenter",this)),na.push(this.el),d.store&&d.store.get&&this.sort(d.store.get(this)||[]),cn(this,mu())}Ft.prototype={constructor:Ft,_isOutsideThisEl:function(d){!this.el.contains(d)&&d!==this.el&&(xi=null)},_getDirection:function(d,f){return typeof this.options.direction=="function"?this.options.direction.call(this,d,f,ht):this.options.direction},_onTapStart:function(d){if(d.cancelable){var f=this,v=this.el,k=this.options,P=k.preventOnFilter,m=d.type,j=d.touches&&d.touches[0]||d.pointerType&&d.pointerType==="touch"&&d,r=(j||d).target,y=d.target.shadowRoot&&(d.path&&d.path[0]||d.composedPath&&d.composedPath()[0])||r,b=k.filter;if(Au(v),!ht&&!(/mousedown|pointerdown/.test(m)&&d.button!==0||k.disabled)&&!y.isContentEditable&&!(!this.nativeDraggable&&xo&&r&&r.tagName.toUpperCase()==="SELECT")&&(r=Wr(r,k.draggable,v,!1),!(r&&r.animated)&&ta!==r)){if(wi=Pr(r),Oo=Pr(r,k.draggable),typeof b=="function"){if(b.call(this,d,r,this)){pr({sortable:f,rootEl:y,name:"filter",targetEl:r,toEl:v,fromEl:v}),vr("filter",f,{evt:d}),P&&d.cancelable&&d.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:d}),!0}),b)){P&&d.cancelable&&d.preventDefault();return}k.handle&&!Wr(y,k.handle,v,!1)||this._prepareDragStart(d,j,r)}}},_prepareDragStart:function(d,f,v){var k=this,P=k.el,m=k.options,j=P.ownerDocument,r;if(v&&!ht&&v.parentNode===P){var y=We(v);if(Pe=P,ht=v,Me=ht.parentNode,Wn=ht.nextSibling,ta=v,ea=m.group,Ft.dragged=ht,Zn={target:ht,clientX:(f||d).clientX,clientY:(f||d).clientY},Wl=Zn.clientX-y.left,Zl=Zn.clientY-y.top,this._lastX=(f||d).clientX,this._lastY=(f||d).clientY,ht.style["will-change"]="all",r=function(){if(vr("delayEnded",k,{evt:d}),Ft.eventCanceled){k._onDrop();return}k._disableDelayedDragEvents(),!Bl&&k.nativeDraggable&&(ht.draggable=!0),k._triggerDragStart(d,f),pr({sortable:k,name:"choose",originalEvent:d}),jr(ht,m.chosenClass,!0)},m.ignore.split(",").forEach(function(b){Hl(ht,b.trim(),ys)}),de(j,"dragover",Jn),de(j,"mousemove",Jn),de(j,"touchmove",Jn),de(j,"mouseup",k._onDrop),de(j,"touchend",k._onDrop),de(j,"touchcancel",k._onDrop),Bl&&this.nativeDraggable&&(this.options.touchStartThreshold=4,ht.draggable=!0),vr("delayStart",this,{evt:d}),m.delay&&(!m.delayOnTouchOnly||f)&&(!this.nativeDraggable||!(_o||hn))){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(d){var f=d.touches?d.touches[0]:d;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&&ys(ht),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var d=this.el.ownerDocument;se(d,"mouseup",this._disableDelayedDrag),se(d,"touchend",this._disableDelayedDrag),se(d,"touchcancel",this._disableDelayedDrag),se(d,"mousemove",this._delayedDragTouchMoveHandler),se(d,"touchmove",this._delayedDragTouchMoveHandler),se(d,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(d,f){f=f||d.pointerType=="touch"&&d,!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(Pe,"dragstart",this._onDragStart));try{document.selection?ua(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(d,f){if(_i=!1,Pe&&ht){vr("dragStarted",this,{evt:f}),this.nativeDraggable&&de(document,"dragover",ju);var v=this.options;!d&&jr(ht,v.dragClass,!1),jr(ht,v.ghostClass,!0),Ft.active=this,d&&this._appendGhost(),pr({sortable:this,name:"start",originalEvent:f})}else this._nulling()},_emulateDragOver:function(){if(Nr){this._lastX=Nr.clientX,this._lastY=Nr.clientY,Kl();for(var d=document.elementFromPoint(Nr.clientX,Nr.clientY),f=d;d&&d.shadowRoot&&(d=d.shadowRoot.elementFromPoint(Nr.clientX,Nr.clientY),d!==f);)f=d;if(ht.parentNode[Or]._isOutsideThisEl(d),f)do{if(f[Or]){var v=void 0;if(v=f[Or]._onDragOver({clientX:Nr.clientX,clientY:Nr.clientY,target:d,rootEl:f}),v&&!this.options.dragoverBubble)break}d=f}while(f=f.parentNode);tc()}},_onTouchMove:function(d){if(Zn){var f=this.options,v=f.fallbackTolerance,k=f.fallbackOffset,P=d.touches?d.touches[0]:d,m=Jt&&vi(Jt,!0),j=Jt&&m&&m.a,r=Jt&&m&&m.d,y=la&&nr&&zl(nr),b=(P.clientX-Zn.clientX+k.x)/(j||1)+(y?y[0]-ps[0]:0)/(j||1),g=(P.clientY-Zn.clientY+k.y)/(r||1)+(y?y[1]-ps[1]:0)/(r||1);if(!Ft.active&&!_i){if(v&&Math.max(Math.abs(P.clientX-this._lastX),Math.abs(P.clientY-this._lastY))<v)return;this._onDragStart(d,!0)}if(Jt){m?(m.e+=b-(hs||0),m.f+=g-(ds||0)):m={a:1,b:0,c:0,d:1,e:b,f:g};var _="matrix(".concat(m.a,",").concat(m.b,",").concat(m.c,",").concat(m.d,",").concat(m.e,",").concat(m.f,")");Mt(Jt,"webkitTransform",_),Mt(Jt,"mozTransform",_),Mt(Jt,"msTransform",_),Mt(Jt,"transform",_),hs=b,ds=g,Nr=P}d.cancelable&&d.preventDefault()}},_appendGhost:function(){if(!Jt){var d=this.options.fallbackOnBody?document.body:Pe,f=We(ht,!0,la,!0,d),v=this.options;if(la){for(nr=d;Mt(nr,"position")==="static"&&Mt(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(),ps=zl(nr)}Jt=ht.cloneNode(!0),jr(Jt,v.ghostClass,!1),jr(Jt,v.fallbackClass,!0),jr(Jt,v.dragClass,!0),Mt(Jt,"transition",""),Mt(Jt,"transform",""),Mt(Jt,"box-sizing","border-box"),Mt(Jt,"margin",0),Mt(Jt,"top",f.top),Mt(Jt,"left",f.left),Mt(Jt,"width",f.width),Mt(Jt,"height",f.height),Mt(Jt,"opacity","0.8"),Mt(Jt,"position",la?"absolute":"fixed"),Mt(Jt,"zIndex","100000"),Mt(Jt,"pointerEvents","none"),Ft.ghost=Jt,d.appendChild(Jt),Mt(Jt,"transform-origin",Wl/parseInt(Jt.style.width)*100+"% "+Zl/parseInt(Jt.style.height)*100+"%")}},_onDragStart:function(d,f){var v=this,k=d.dataTransfer,P=v.options;if(vr("dragStart",this,{evt:d}),Ft.eventCanceled){this._onDrop();return}vr("setupClone",this),Ft.eventCanceled||(Ae=Gl(ht),Ae.removeAttribute("id"),Ae.draggable=!1,Ae.style["will-change"]="",this._hideClone(),jr(Ae,this.options.chosenClass,!1),Ft.clone=Ae),v.cloneId=ua(function(){vr("clone",v),!Ft.eventCanceled&&(v.options.removeCloneOnHide||Pe.insertBefore(Ae,ht),v._hideClone(),pr({sortable:v,name:"clone"}))}),!f&&jr(ht,P.dragClass,!0),f?(ra=!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",P.setData&&P.setData.call(v,k,ht)),de(document,"drop",v),Mt(ht,"transform","translateZ(0)")),_i=!0,v._dragStartId=ua(v._dragStarted.bind(v,f,d)),de(document,"selectstart",v),Eo=!0,xo&&Mt(document.body,"user-select","none")},_onDragOver:function(d){var f=this.el,v=d.target,k,P,m,j=this.options,r=j.group,y=Ft.active,b=ea===r,g=j.sort,_=Ke||y,O,C=this,E=!1;if(fs)return;function T(mt,ct){vr(mt,C,Gr({evt:d,isOwner:b,axis:O?"vertical":"horizontal",revert:m,dragRect:k,targetRect:P,canSort:g,fromSortable:_,target:v,completed:R,onMove:function(Tt,Ht){return ca(Pe,f,ht,k,Tt,We(Tt),d,Ht)},changed:I},ct))}function L(){T("dragOverAnimationCapture"),C.captureAnimationState(),C!==_&&_.captureAnimationState()}function R(mt){return T("dragOverCompleted",{insertion:mt}),mt&&(b?y._hideClone():y._showClone(C),C!==_&&(jr(ht,Ke?Ke.options.ghostClass:y.options.ghostClass,!1),jr(ht,j.ghostClass,!0)),Ke!==C&&C!==Ft.active?Ke=C:C===Ft.active&&Ke&&(Ke=null),_===C&&(C._ignoreWhileAnimating=v),C.animateAll(function(){T("dragOverAnimationComplete"),C._ignoreWhileAnimating=null}),C!==_&&(_.animateAll(),_._ignoreWhileAnimating=null)),(v===ht&&!ht.animated||v===f&&!v.animated)&&(xi=null),!j.dragoverBubble&&!d.rootEl&&v!==document&&(ht.parentNode[Or]._isOutsideThisEl(d.target),!mt&&Jn(d)),!j.dragoverBubble&&d.stopPropagation&&d.stopPropagation(),E=!0}function I(){Er=Pr(ht),jn=Pr(ht,j.draggable),pr({sortable:C,name:"change",toEl:f,newIndex:Er,newDraggableIndex:jn,originalEvent:d})}if(d.preventDefault!==void 0&&d.cancelable&&d.preventDefault(),v=Wr(v,j.draggable,f,!0),T("dragOver"),Ft.eventCanceled)return E;if(ht.contains(d.target)||v.animated&&v.animatingX&&v.animatingY||C._ignoreWhileAnimating===v)return R(!1);if(ra=!1,y&&!j.disabled&&(b?g||(m=Me!==Pe):Ke===this||(this.lastPutMode=ea.checkPull(this,y,ht,d))&&r.checkPut(this,y,ht,d))){if(O=this._getDirection(d,v)==="vertical",k=We(ht),T("dragOverValid"),Ft.eventCanceled)return E;if(m)return Me=Pe,L(),this._hideClone(),T("revert"),Ft.eventCanceled||(Wn?Pe.insertBefore(ht,Wn):Pe.appendChild(ht)),R(!0);var N=ls(f,j.draggable);if(!N||Su(d,O,this)&&!N.animated){if(N===ht)return R(!1);if(N&&f===d.target&&(v=N),v&&(P=We(v)),ca(Pe,f,ht,k,v,P,d,!!v)!==!1)return L(),N&&N.nextSibling?f.insertBefore(ht,N.nextSibling):f.appendChild(ht),Me=f,I(),R(!0)}else if(N&&Cu(d,O,this)){var F=bi(f,0,j,!0);if(F===ht)return R(!1);if(v=F,P=We(v),ca(Pe,f,ht,k,v,P,d,!1)!==!1)return L(),f.insertBefore(ht,F),Me=f,I(),R(!0)}else if(v.parentNode===f){P=We(v);var $=0,U,q=ht.parentNode!==f,B=!xu(ht.animated&&ht.toRect||k,v.animated&&v.toRect||P,O),z=O?"top":"left",M=Vl(v,"top","top")||Vl(ht,"top","top"),X=M?M.scrollTop:void 0;xi!==v&&(U=P[z],So=!1,ia=!B&&j.invertSwap||q),$=Pu(d,v,P,O,B?1:j.swapThreshold,j.invertedSwapThreshold==null?j.swapThreshold:j.invertedSwapThreshold,ia,xi===v);var Y;if($!==0){var Q=Pr(ht);do Q-=$,Y=Me.children[Q];while(Y&&(Mt(Y,"display")==="none"||Y===Jt))}if($===0||Y===v)return R(!1);xi=v,Co=$;var tt=v.nextElementSibling,it=!1;it=$===1;var st=ca(Pe,f,ht,k,v,P,d,it);if(st!==!1)return(st===1||st===-1)&&(it=st===1),fs=!0,setTimeout(Eu,30),L(),it&&!tt?f.appendChild(ht):v.parentNode.insertBefore(ht,it?tt:v),M&&Ul(M,0,X-M.scrollTop),Me=ht.parentNode,U!==void 0&&!ia&&(oa=Math.abs(U-We(v)[z])),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",Jn),se(document,"mousemove",Jn),se(document,"touchmove",Jn)},_offUpEvents:function(){var d=this.el.ownerDocument;se(d,"mouseup",this._onDrop),se(d,"touchend",this._onDrop),se(d,"pointerup",this._onDrop),se(d,"touchcancel",this._onDrop),se(document,"selectstart",this)},_onDrop:function(d){var f=this.el,v=this.options;if(Er=Pr(ht),jn=Pr(ht,v.draggable),vr("drop",this,{evt:d}),Me=ht&&ht.parentNode,Er=Pr(ht),jn=Pr(ht,v.draggable),Ft.eventCanceled){this._nulling();return}_i=!1,ia=!1,So=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),ms(this.cloneId),ms(this._dragStartId),this.nativeDraggable&&(se(document,"drop",this),se(f,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),xo&&Mt(document.body,"user-select",""),Mt(ht,"transform",""),d&&(Eo&&(d.cancelable&&d.preventDefault(),!v.dropBubble&&d.stopPropagation()),Jt&&Jt.parentNode&&Jt.parentNode.removeChild(Jt),(Pe===Me||Ke&&Ke.lastPutMode!=="clone")&&Ae&&Ae.parentNode&&Ae.parentNode.removeChild(Ae),ht&&(this.nativeDraggable&&se(ht,"dragend",this),ys(ht),ht.style["will-change"]="",Eo&&!_i&&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:d}),Pe!==Me?(Er>=0&&(pr({rootEl:Me,name:"add",toEl:Me,fromEl:Pe,originalEvent:d}),pr({sortable:this,name:"remove",toEl:Me,originalEvent:d}),pr({rootEl:Me,name:"sort",toEl:Me,fromEl:Pe,originalEvent:d}),pr({sortable:this,name:"sort",toEl:Me,originalEvent:d})),Ke&&Ke.save()):Er!==wi&&Er>=0&&(pr({sortable:this,name:"update",toEl:Me,originalEvent:d}),pr({sortable:this,name:"sort",toEl:Me,originalEvent:d})),Ft.active&&((Er==null||Er===-1)&&(Er=wi,jn=Oo),pr({sortable:this,name:"end",toEl:Me,originalEvent:d}),this.save()))),this._nulling()},_nulling:function(){vr("nulling",this),Pe=ht=Me=Jt=Wn=Ae=ta=kn=Zn=Nr=Eo=Er=jn=wi=Oo=xi=Co=Ke=ea=Ft.dragged=Ft.ghost=Ft.clone=Ft.active=null,aa.forEach(function(d){d.checked=!0}),aa.length=hs=ds=0},handleEvent:function(d){switch(d.type){case"drop":case"dragend":this._onDrop(d);break;case"dragenter":case"dragover":ht&&(this._onDragOver(d),Ou(d));break;case"selectstart":d.preventDefault();break}},toArray:function(){for(var d=[],f,v=this.el.children,k=0,P=v.length,m=this.options;k<P;k++)f=v[k],Wr(f,m.draggable,this.el,!1)&&d.push(f.getAttribute(m.dataIdAttr)||Lu(f));return d},sort:function(d,f){var v={},k=this.el;this.toArray().forEach(function(P,m){var j=k.children[m];Wr(j,this.options.draggable,k,!1)&&(v[P]=j)},this),f&&this.captureAnimationState(),d.forEach(function(P){v[P]&&(k.removeChild(v[P]),k.appendChild(v[P]))}),f&&this.animateAll()},save:function(){var d=this.options.store;d&&d.set&&d.set(this)},closest:function(d,f){return Wr(d,f||this.options.draggable,this.el,!1)},option:function(d,f){var v=this.options;if(f===void 0)return v[d];var k=jo.modifyOption(this,d,f);typeof k<"u"?v[d]=k:v[d]=f,d==="group"&&Ql(v)},destroy:function(){vr("destroy",this);var d=this.el;d[Or]=null,se(d,"mousedown",this._onTapStart),se(d,"touchstart",this._onTapStart),se(d,"pointerdown",this._onTapStart),this.nativeDraggable&&(se(d,"dragover",this),se(d,"dragenter",this)),Array.prototype.forEach.call(d.querySelectorAll("[draggable]"),function(f){f.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),na.splice(na.indexOf(this.el),1),this.el=d=null},_hideClone:function(){if(!kn){if(vr("hideClone",this),Ft.eventCanceled)return;Mt(Ae,"display","none"),this.options.removeCloneOnHide&&Ae.parentNode&&Ae.parentNode.removeChild(Ae),kn=!0}},_showClone:function(d){if(d.lastPutMode!=="clone"){this._hideClone();return}if(kn){if(vr("showClone",this),Ft.eventCanceled)return;ht.parentNode==Pe&&!this.options.group.revertClone?Pe.insertBefore(Ae,ht):Wn?Pe.insertBefore(Ae,Wn):Pe.appendChild(Ae),this.options.group.revertClone&&this.animate(ht,Ae),Mt(Ae,"display",""),kn=!1}}};function Ou(x){x.dataTransfer&&(x.dataTransfer.dropEffect="move"),x.cancelable&&x.preventDefault()}function ca(x,d,f,v,k,P,m,j){var r,y=x[Or],b=y.options.onMove,g;return window.CustomEvent&&!hn&&!_o?r=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(r=document.createEvent("Event"),r.initEvent("move",!0,!0)),r.to=d,r.from=x,r.dragged=f,r.draggedRect=v,r.related=k||d,r.relatedRect=P||We(d),r.willInsertAfter=j,r.originalEvent=m,x.dispatchEvent(r),b&&(g=b.call(y,r,m)),g}function ys(x){x.draggable=!1}function Eu(){fs=!1}function Cu(x,d,f){var v=We(bi(f.el,0,f.options,!0)),k=10;return d?x.clientX<v.left-k||x.clientY<v.top&&x.clientX<v.right:x.clientY<v.top-k||x.clientY<v.bottom&&x.clientX<v.left}function Su(x,d,f){var v=We(ls(f.el,f.options.draggable)),k=10;return d?x.clientX>v.right+k||x.clientX<=v.right&&x.clientY>v.bottom&&x.clientX>=v.left:x.clientX>v.right&&x.clientY>v.top||x.clientX<=v.right&&x.clientY>v.bottom+k}function Pu(x,d,f,v,k,P,m,j){var r=v?x.clientY:x.clientX,y=v?f.height:f.width,b=v?f.top:f.left,g=v?f.bottom:f.right,_=!1;if(!m){if(j&&oa<y*k){if(!So&&(Co===1?r>b+y*P/2:r<g-y*P/2)&&(So=!0),So)_=!0;else if(Co===1?r<b+oa:r>g-oa)return-Co}else if(r>b+y*(1-k)/2&&r<g-y*(1-k)/2)return Tu(d)}return _=_||m,_&&(r<b+y*P/2||r>g-y*P/2)?r>b+y/2?1:-1:0}function Tu(x){return Pr(ht)<Pr(x)?1:-1}function Lu(x){for(var d=x.tagName+x.className+x.src+x.href+x.textContent,f=d.length,v=0;f--;)v+=d.charCodeAt(f);return v.toString(36)}function Au(x){aa.length=0;for(var d=x.getElementsByTagName("input"),f=d.length;f--;){var v=d[f];v.checked&&aa.push(v)}}function ua(x){return setTimeout(x,0)}function ms(x){return clearTimeout(x)}sa&&de(document,"touchmove",function(x){(Ft.active||_i)&&x.cancelable&&x.preventDefault()}),Ft.utils={on:de,off:se,css:Mt,find:Hl,is:function(d,f){return!!Wr(d,f,d,!1)},extend:fu,throttle:ql,closest:Wr,toggleClass:jr,clone:Gl,index:Pr,nextTick:ua,cancelNextTick:ms,detectDirection:Xl,getChild:bi},Ft.get=function(x){return x[Or]},Ft.mount=function(){for(var x=arguments.length,d=new Array(x),f=0;f<x;f++)d[f]=arguments[f];d[0].constructor===Array&&(d=d[0]),d.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)),jo.mount(v)})},Ft.create=function(x,d){return new Ft(x,d)},Ft.version=hu;var Ge=[],Po,vs,bs=!1,gs,ws,ha,To;function Ru(){function x(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var d in this)d.charAt(0)==="_"&&typeof this[d]=="function"&&(this[d]=this[d].bind(this))}return x.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)),ec(),da(),yu()},nulling:function(){ha=vs=Po=bs=To=gs=ws=null,Ge.length=0},_handleFallbackAutoScroll:function(f){this._handleAutoScroll(f,!0)},_handleAutoScroll:function(f,v){var k=this,P=(f.touches?f.touches[0]:f).clientX,m=(f.touches?f.touches[0]:f).clientY,j=document.elementFromPoint(P,m);if(ha=f,v||this.options.forceAutoScrollFallback||_o||hn||xo){_s(f,this.options,j,v);var r=xn(j,!0);bs&&(!To||P!==gs||m!==ws)&&(To&&ec(),To=setInterval(function(){var y=xn(document.elementFromPoint(P,m),!0);y!==r&&(r=y,da()),_s(f,k.options,y,v)},10),gs=P,ws=m)}else{if(!this.options.bubbleScroll||xn(j,!0)===Zr()){da();return}_s(f,this.options,xn(j,!1),!1)}}},cn(x,{pluginName:"scroll",initializeByDefault:!0})}function da(){Ge.forEach(function(x){clearInterval(x.pid)}),Ge=[]}function ec(){clearInterval(To)}var _s=ql(function(x,d,f,v){if(d.scroll){var k=(x.touches?x.touches[0]:x).clientX,P=(x.touches?x.touches[0]:x).clientY,m=d.scrollSensitivity,j=d.scrollSpeed,r=Zr(),y=!1,b;vs!==f&&(vs=f,da(),Po=d.scroll,b=d.scrollFn,Po===!0&&(Po=xn(f,!0)));var g=0,_=Po;do{var O=_,C=We(O),E=C.top,T=C.bottom,L=C.left,R=C.right,I=C.width,N=C.height,F=void 0,$=void 0,U=O.scrollWidth,q=O.scrollHeight,B=Mt(O),z=O.scrollLeft,M=O.scrollTop;O===r?(F=I<U&&(B.overflowX==="auto"||B.overflowX==="scroll"||B.overflowX==="visible"),$=N<q&&(B.overflowY==="auto"||B.overflowY==="scroll"||B.overflowY==="visible")):(F=I<U&&(B.overflowX==="auto"||B.overflowX==="scroll"),$=N<q&&(B.overflowY==="auto"||B.overflowY==="scroll"));var X=F&&(Math.abs(R-k)<=m&&z+I<U)-(Math.abs(L-k)<=m&&!!z),Y=$&&(Math.abs(T-P)<=m&&M+N<q)-(Math.abs(E-P)<=m&&!!M);if(!Ge[g])for(var Q=0;Q<=g;Q++)Ge[Q]||(Ge[Q]={});(Ge[g].vx!=X||Ge[g].vy!=Y||Ge[g].el!==O)&&(Ge[g].el=O,Ge[g].vx=X,Ge[g].vy=Y,clearInterval(Ge[g].pid),(X!=0||Y!=0)&&(y=!0,Ge[g].pid=setInterval((function(){v&&this.layer===0&&Ft.active._onTouchMove(ha);var tt=Ge[this.layer].vy?Ge[this.layer].vy*j:0,it=Ge[this.layer].vx?Ge[this.layer].vx*j:0;typeof b=="function"&&b.call(Ft.dragged.parentNode[Or],it,tt,x,ha,Ge[this.layer].el)!=="continue"||Ul(Ge[this.layer].el,it,tt)}).bind({layer:g}),24))),g++}while(d.bubbleScroll&&_!==r&&(_=xn(_,!1)));bs=y}},30),rc=function(d){var f=d.originalEvent,v=d.putSortable,k=d.dragEl,P=d.activeSortable,m=d.dispatchSortableEvent,j=d.hideGhostForTarget,r=d.unhideGhostForTarget;if(f){var y=v||P;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 xs(){}xs.prototype={startIndex:null,dragStart:function(d){var f=d.oldDraggableIndex;this.startIndex=f},onSpill:function(d){var f=d.dragEl,v=d.putSortable;this.sortable.captureAnimationState(),v&&v.captureAnimationState();var k=bi(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:rc},cn(xs,{pluginName:"revertOnSpill"});function ks(){}ks.prototype={onSpill:function(d){var f=d.dragEl,v=d.putSortable,k=v||this.sortable;k.captureAnimationState(),f.parentNode&&f.parentNode.removeChild(f),k.animateAll()},drop:rc},cn(ks,{pluginName:"removeOnSpill"}),Ft.mount(new Ru),Ft.mount(ks,xs);const Iu=(x,d,f)=>{let v=[];x._sortable=Ft.create(x,{handle:".drag-handle",filter:".drag-handle.disabled",swapThreshold:.5,animation:150,easing:"cubic-bezier(1, 0, 0, 1)",onStart:k=>{const P=k.item;v=Array.prototype.slice.call(P.parentNode.childNodes),v=v.filter(m=>m.nodeType!=Node.ELEMENT_NODE||!m.classList.contains("sortable-fallback"))},onEnd:k=>{const m=k.item.parentNode;for(const r of v)m.appendChild(r);if(k.oldIndex==k.newIndex)return;const j=d.getArray().find(r=>r.ol_uid===k.item.querySelector("eox-layercontrol-layer").layer.ol_uid);d.remove(j),d.insertAt(d.getLength()-k.newIndex,j),f.requestUpdate()}})},js=(x,d,f)=>{let v=[];const k=(P,m,j)=>{v=[...v,...P.filter(y=>y.get(m)===j)];const r=P.filter(y=>y.getLayers);return r.length>0&&r.forEach(y=>k(y.getLayers().getArray(),m,j)),v};return k(x,d,f),v},Du=(x,d)=>{var f,v,k;if(!(!x||!d))return x.getLayers?"group":(k=(f=d.getInteractions().getArray().filter(P=>P.freehand_!==void 0).map(P=>P.source_))==null?void 0:f.ol_uid)!=null&&k.includes(x.getSource?(v=x.getSource())==null?void 0:v.ol_uid:void 0)?"draw":x.declutter_!==void 0?"vector":"raster"},nc=(x,d)=>{const f=x.get("minZoom"),v=x.get("maxZoom");return!!(d&&(f!==-1/0||v!==1/0))},Bu=(x,d,f)=>{if(!x||!d)return!1;if(!nc(x,f))return!0;const v=x.get("minZoom"),k=x.get("maxZoom"),P=d.getView().getZoom();return P>v&&P<k};function Nu(x,d){const f=new URL(x).searchParams;Object.entries(d).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=x.split("?")[0],k=f.toString();return`${v}?${k}`}function ic(x,d){var v;let f={};for(const k in x){const P=x[k].type;if(P&&P!=="object")f[k]=P==="number"?Number(d[k]):d[k];else if(typeof x[k]=="object"&&((v=x[k])!=null&&v.properties)){const m=ic(x[k].properties,d);Object.keys(m).length>0&&(f[k]=m)}}return f}function $u(x,d){var P;if(!x.getSource().getTileUrlFunction())return null;const f=new URL(x.getSource().getTileUrlFunction()([0,0,0])),v=Object.fromEntries(f.searchParams.entries()),k=ic(((P=d.schema)==null?void 0:P.properties)||d.schema,v);return Object.keys(k).length?k:null}/**
|
|
41
41
|
* @license
|
|
42
42
|
* Copyright 2020 Google LLC
|
|
43
43
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
44
|
-
*/const
|
|
44
|
+
*/const oc=as(class extends ss{constructor(x){if(super(x),x.type!==Gn.PROPERTY&&x.type!==Gn.ATTRIBUTE&&x.type!==Gn.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!ou(x))throw Error("`live` bindings can only contain a single expression")}render(x){return x}update(x,[d]){if(d===Br||d===_e)return d;const f=x.element,v=x.name;if(x.type===Gn.PROPERTY){if(d===f[v])return Br}else if(x.type===Gn.BOOLEAN_ATTRIBUTE){if(!!d===f.hasAttribute(v))return Br}else if(x.type===Gn.ATTRIBUTE&&f.getAttribute(v)===d+"")return Br;return Il(x),d}});/**
|
|
45
45
|
* @license
|
|
46
46
|
* Copyright 2017 Google LLC
|
|
47
47
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
48
|
-
*/class
|
|
48
|
+
*/class Os extends ss{constructor(d){if(super(d),this.et=_e,d.type!==Gn.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(d){if(d===_e||d==null)return this.vt=void 0,this.et=d;if(d===Br)return d;if(typeof d!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(d===this.et)return this.vt;this.et=d;const f=[d];return f.raw=f,this.vt={_$litType$:this.constructor.resultType,strings:f,values:[]}}}Os.directiveName="unsafeHTML",Os.resultType=1;const Mu=as(Os);/**
|
|
49
49
|
* @license
|
|
50
50
|
* Copyright 2021 Google LLC
|
|
51
51
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
52
|
-
*/function*da(x,d){if(x!==void 0){let f=0;for(const v of x)yield d(v,f++)}}var oc={exports:{}};/*! For license information please see jsoneditor.js.LICENSE.txt */(function(x,d){(function(f,v){x.exports=v()})(self,()=>(()=>{var f={9662:(m,j,r)=>{var y=r(614),b=r(6330),g=TypeError;m.exports=function(_){if(y(_))return _;throw g(b(_)+" is not a function")}},9483:(m,j,r)=>{var y=r(4411),b=r(6330),g=TypeError;m.exports=function(_){if(y(_))return _;throw g(b(_)+" is not a constructor")}},6077:(m,j,r)=>{var y=r(614),b=String,g=TypeError;m.exports=function(_){if(typeof _=="object"||y(_))return _;throw g("Can't set "+b(_)+" as a prototype")}},1223:(m,j,r)=>{var y=r(5112),b=r(30),g=r(3070).f,_=y("unscopables"),O=Array.prototype;O[_]==null&&g(O,_,{configurable:!0,value:b(null)}),m.exports=function(C){O[_][C]=!0}},1530:(m,j,r)=>{var y=r(8710).charAt;m.exports=function(b,g,_){return g+(_?y(b,g).length:1)}},5787:(m,j,r)=>{var y=r(7976),b=TypeError;m.exports=function(g,_){if(y(_,g))return g;throw b("Incorrect invocation")}},9670:(m,j,r)=>{var y=r(111),b=String,g=TypeError;m.exports=function(_){if(y(_))return _;throw g(b(_)+" 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),_=r(3411),O=r(7659),C=r(4411),E=r(6244),T=r(6135),L=r(4121),R=r(1246),I=Array;m.exports=function(N){var H=g(N),$=C(this),U=arguments.length,q=U>1?arguments[1]:void 0,B=q!==void 0;B&&(q=y(q,U>2?arguments[2]:void 0));var z,M,X,Y,Q,tt,it=R(H),st=0;if(!it||this===I&&O(it))for(z=E(H),M=$?new this(z):I(z);z>st;st++)tt=B?q(H[st],st):H[st],T(M,st,tt);else for(Q=(Y=L(H,it)).next,M=$?new this:[];!(X=b(Q,Y)).done;st++)tt=B?_(Y,q,[X.value,st],!0):X.value,T(M,st,tt);return M.length=st,M}},1318:(m,j,r)=>{var y=r(5656),b=r(1400),g=r(6244),_=function(O){return function(C,E,T){var L,R=y(C),I=g(R),N=b(T,I);if(O&&E!=E){for(;I>N;)if((L=R[N++])!=L)return!0}else for(;I>N;N++)if((O||N in R)&&R[N]===E)return O||N||0;return!O&&-1}};m.exports={includes:_(!0),indexOf:_(!1)}},2092:(m,j,r)=>{var y=r(9974),b=r(1702),g=r(8361),_=r(7908),O=r(6244),C=r(5417),E=b([].push),T=function(L){var R=L==1,I=L==2,N=L==3,H=L==4,$=L==6,U=L==7,q=L==5||$;return function(B,z,M,X){for(var Y,Q,tt=_(B),it=g(tt),st=y(z,M),mt=O(it),ct=0,Et=X||C,Tt=R?Et(B,mt):I||U?Et(B,0):void 0;mt>ct;ct++)if((q||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:E(Tt,Y)}else switch(L){case 4:return!1;case 7:E(Tt,Y)}return $?-1:N||H?H: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),_=b("species");m.exports=function(O){return g>=51||!y(function(){var C=[];return(C.constructor={})[_]=function(){return{foo:1}},C[O](Boolean).foo!==1})}},9341:(m,j,r)=>{var y=r(7293);m.exports=function(b,g){var _=[][b];return!!_&&y(function(){_.call(null,g||function(){return 1},1)})}},3671:(m,j,r)=>{var y=r(9662),b=r(7908),g=r(8361),_=r(6244),O=TypeError,C=function(E){return function(T,L,R,I){y(L);var N=b(T),H=g(N),$=_(N),U=E?$-1:0,q=E?-1:1;if(R<2)for(;;){if(U in H){I=H[U],U+=q;break}if(U+=q,E?U<0:$<=U)throw O("Reduce of empty array with no initial value")}for(;E?U>=0:$>U;U+=q)U in H&&(I=L(I,H[U],U,N));return I}};m.exports={left:C(!1),right:C(!0)}},3658:(m,j,r)=>{var y=r(9781),b=r(3157),g=TypeError,_=Object.getOwnPropertyDescriptor,O=y&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(C){return C instanceof TypeError}}();m.exports=O?function(C,E){if(b(C)&&!_(C,"length").writable)throw g("Cannot set read only .length");return C.length=E}:function(C,E){return C.length=E}},1589:(m,j,r)=>{var y=r(1400),b=r(6244),g=r(6135),_=Array,O=Math.max;m.exports=function(C,E,T){for(var L=b(C),R=y(E,L),I=y(T===void 0?L:T,L),N=_(O(I-R,0)),H=0;R<I;R++,H++)g(N,H,C[R]);return N.length=H,N}},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(C,E){var T=C.length,L=b(T/2);return T<8?_(C,E):O(C,g(y(C,0,L),E),g(y(C,L),E),E)},_=function(C,E){for(var T,L,R=C.length,I=1;I<R;){for(L=I,T=C[I];L&&E(C[L-1],T)>0;)C[L]=C[--L];L!==I++&&(C[L]=T)}return C},O=function(C,E,T,L){for(var R=E.length,I=T.length,N=0,H=0;N<R||H<I;)C[N+H]=N<R&&H<I?L(E[N],T[H])<=0?E[N++]:T[H++]:N<R?E[N++]:T[H++];return C};m.exports=g},7475:(m,j,r)=>{var y=r(3157),b=r(4411),g=r(111),_=r(5112)("species"),O=Array;m.exports=function(C){var E;return y(C)&&(E=C.constructor,(b(E)&&(E===O||y(E.prototype))||g(E)&&(E=E[_])===null)&&(E=void 0)),E===void 0?O:E}},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,_,O,C){try{return C?_(y(O)[0],O[1]):_(O)}catch(E){b(g,"throw",E)}}},7072:(m,j,r)=>{var y=r(5112)("iterator"),b=!1;try{var g=0,_={next:function(){return{done:!!g++}},return:function(){b=!0}};_[y]=function(){return this},Array.from(_,function(){throw 2})}catch{}m.exports=function(O,C){if(!C&&!b)return!1;var E=!1;try{var T={};T[y]=function(){return{next:function(){return{done:E=!0}}}},O(T)}catch{}return E}},4326:(m,j,r)=>{var y=r(1702),b=y({}.toString),g=y("".slice);m.exports=function(_){return g(b(_),8,-1)}},648:(m,j,r)=>{var y=r(1694),b=r(614),g=r(4326),_=r(5112)("toStringTag"),O=Object,C=g(function(){return arguments}())=="Arguments";m.exports=y?g:function(E){var T,L,R;return E===void 0?"Undefined":E===null?"Null":typeof(L=function(I,N){try{return I[N]}catch{}}(T=O(E),_))=="string"?L:C?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),_=r(3070);m.exports=function(O,C,E){for(var T=b(C),L=_.f,R=g.f,I=0;I<T.length;I++){var N=T[I];y(O,N)||E&&y(E,N)||L(O,N,R(C,N))}}},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(_,O,C){return b.f(_,O,g(1,C))}:function(_,O,C){return _[O]=C,_}},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(_,O,C){var E=y(O);E in _?b.f(_,E,g(0,C)):_[E]=C}},5573:(m,j,r)=>{var y=r(1702),b=r(7293),g=r(6650).start,_=RangeError,O=isFinite,C=Math.abs,E=Date.prototype,T=E.toISOString,L=y(E.getTime),R=y(E.getUTCDate),I=y(E.getUTCFullYear),N=y(E.getUTCHours),H=y(E.getUTCMilliseconds),$=y(E.getUTCMinutes),U=y(E.getUTCMonth),q=y(E.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 _("Invalid time value");var B=this,z=I(B),M=H(B),X=z<0?"-":z>9999?"+":"";return X+g(C(z),X?6:4,0)+"-"+g(U(B)+1,2,0)+"-"+g(R(B),2,0)+"T"+g(N(B),2,0)+":"+g($(B),2,0)+":"+g(q(B),2,0)+"."+g(M,3,0)+"Z"}:T},8709:(m,j,r)=>{var y=r(9670),b=r(2140),g=TypeError;m.exports=function(_){if(y(this),_==="string"||_==="default")_="string";else if(_!=="number")throw g("Incorrect hint");return b(this,_)}},7045:(m,j,r)=>{var y=r(6339),b=r(3070);m.exports=function(g,_,O){return O.get&&y(O.get,_,{getter:!0}),O.set&&y(O.set,_,{setter:!0}),b.f(g,_,O)}},8052:(m,j,r)=>{var y=r(614),b=r(3070),g=r(6339),_=r(3072);m.exports=function(O,C,E,T){T||(T={});var L=T.enumerable,R=T.name!==void 0?T.name:C;if(y(E)&&g(E,R,T),T.global)L?O[C]=E:_(C,E);else{try{T.unsafe?O[C]&&(L=!0):delete O[C]}catch{}L?O[C]=E:b.f(O,C,{value:E,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,_){try{b(y,g,{value:_,configurable:!0,writable:!0})}catch{y[g]=_}return _}},5117:(m,j,r)=>{var y=r(6330),b=TypeError;m.exports=function(g,_){if(!delete g[_])throw b("Cannot delete property "+y(_)+" 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,_=b(g)&&b(g.createElement);m.exports=function(O){return _?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),_=r(8113),O=g.process,C=g.Deno,E=O&&O.versions||C&&C.version,T=E&&E.v8;T&&(b=(y=T.split("."))[0]>0&&y[0]<4?1:+(y[0]+y[1])),!b&&_&&(!(y=_.match(/Edge\/(\d+)/))||y[1]>=74)&&(y=_.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),_=r(8052),O=r(3072),C=r(9920),E=r(4705);m.exports=function(T,L){var R,I,N,H,$,U=T.target,q=T.global,B=T.stat;if(R=q?y:B?y[U]||O(U,{}):(y[U]||{}).prototype)for(I in L){if(H=L[I],N=T.dontCallGetSet?($=b(R,I))&&$.value:R[I],!E(q?I:U+(B?".":"#")+I,T.forced)&&N!==void 0){if(typeof H==typeof N)continue;C(H,N)}(T.sham||N&&N.sham)&&g(H,"sham",!0),_(R,I,H,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),_=r(7293),O=r(5112),C=r(8880),E=O("species"),T=RegExp.prototype;m.exports=function(L,R,I,N){var H=O(L),$=!_(function(){var z={};return z[H]=function(){return 7},""[L](z)!=7}),U=$&&!_(function(){var z=!1,M=/a/;return L==="split"&&((M={}).constructor={},M.constructor[E]=function(){return M},M.flags="",M[H]=/./[H]),M.exec=function(){return z=!0,null},M[H](""),!z});if(!$||!U||I){var q=y(/./[H]),B=R(H,""[L],function(z,M,X,Y,Q){var tt=y(z),it=M.exec;return it===g||it===T.exec?$&&!Q?{done:!0,value:q(M,X,Y)}:{done:!0,value:tt(X,M,Y)}:{done:!1}});b(String.prototype,L,B[0]),b(T,H,B[1])}N&&C(T[H],"sham",!0)}},2104:(m,j,r)=>{var y=r(4374),b=Function.prototype,g=b.apply,_=b.call;m.exports=typeof Reflect=="object"&&Reflect.apply||(y?_.bind(g):function(){return _.apply(g,arguments)})},9974:(m,j,r)=>{var y=r(1470),b=r(9662),g=r(4374),_=y(y.bind);m.exports=function(O,C){return b(O),C===void 0?O:g?_(O,C):function(){return O.apply(C,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),_=r(2597),O=r(206),C=r(4374),E=Function,T=y([].concat),L=y([].join),R={},I=function(N,H,$){if(!_(R,H)){for(var U=[],q=0;q<H;q++)U[q]="a["+q+"]";R[H]=E("C,a","return new C("+L(U,",")+")")}return R[H](N,$)};m.exports=C?E.bind:function(N){var H=b(this),$=H.prototype,U=O(arguments,1),q=function(){var B=T(U,O(arguments));return this instanceof q?I(H,B.length,B):H.apply(N,B)};return g($)&&(q.prototype=$),q}},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,_=y&&Object.getOwnPropertyDescriptor,O=b(g,"name"),C=O&&(function(){}).name==="something",E=O&&(!y||y&&_(g,"name").configurable);m.exports={EXISTS:O,PROPER:C,CONFIGURABLE:E}},5668:(m,j,r)=>{var y=r(1702),b=r(9662);m.exports=function(g,_,O){try{return y(b(Object.getOwnPropertyDescriptor(g,_)[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,_=y&&b.bind.bind(g,g);m.exports=y?_:function(O){return function(){return g.apply(O,arguments)}}},5005:(m,j,r)=>{var y=r(7854),b=r(614),g=function(_){return b(_)?_:void 0};m.exports=function(_,O){return arguments.length<2?g(y[_]):y[_]&&y[_][O]}},1246:(m,j,r)=>{var y=r(648),b=r(8173),g=r(8554),_=r(7497),O=r(5112)("iterator");m.exports=function(C){if(!g(C))return b(C,O)||b(C,"@@iterator")||_[y(C)]}},4121:(m,j,r)=>{var y=r(6916),b=r(9662),g=r(9670),_=r(6330),O=r(1246),C=TypeError;m.exports=function(E,T){var L=arguments.length<2?O(E):T;if(b(L))return g(y(L,E));throw C(_(E)+" is not iterable")}},8044:(m,j,r)=>{var y=r(1702),b=r(3157),g=r(614),_=r(4326),O=r(1340),C=y([].push);m.exports=function(E){if(g(E))return E;if(b(E)){for(var T=E.length,L=[],R=0;R<T;R++){var I=E[R];typeof I=="string"?C(L,I):typeof I!="number"&&_(I)!="Number"&&_(I)!="String"||C(L,O(I))}var N=L.length,H=!0;return function($,U){if(H)return H=!1,U;if(b(this))return U;for(var q=0;q<N;q++)if(L[q]===$)return U}}}},8173:(m,j,r)=>{var y=r(9662),b=r(8554);m.exports=function(g,_){var O=g[_];return b(O)?void 0:y(O)}},647:(m,j,r)=>{var y=r(1702),b=r(7908),g=Math.floor,_=y("".charAt),O=y("".replace),C=y("".slice),E=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,T=/\$([$&'`]|\d{1,2})/g;m.exports=function(L,R,I,N,H,$){var U=I+L.length,q=N.length,B=T;return H!==void 0&&(H=b(H),B=E),O($,B,function(z,M){var X;switch(_(M,0)){case"$":return"$";case"&":return L;case"`":return C(R,0,I);case"'":return C(R,U);case"<":X=H[C(M,1,-1)];break;default:var Y=+M;if(Y===0)return z;if(Y>q){var Q=g(Y/10);return Q===0?z:Q<=q?N[Q-1]===void 0?_(M,1):N[Q-1]+_(M,1):z}X=N[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(_,O){return g(b(_),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),_=Object,O=y("".split);m.exports=b(function(){return!_("z").propertyIsEnumerable(0)})?function(C){return g(C)=="String"?O(C,""):_(C)}:_},9587:(m,j,r)=>{var y=r(614),b=r(111),g=r(7674);m.exports=function(_,O,C){var E,T;return g&&y(E=O.constructor)&&E!==C&&b(T=E.prototype)&&T!==C.prototype&&g(_,T),_}},2788:(m,j,r)=>{var y=r(1702),b=r(614),g=r(5465),_=y(Function.toString);b(g.inspectSource)||(g.inspectSource=function(O){return _(O)}),m.exports=g.inspectSource},9909:(m,j,r)=>{var y,b,g,_=r(4811),O=r(7854),C=r(111),E=r(8880),T=r(2597),L=r(5465),R=r(6200),I=r(3501),N="Object already initialized",H=O.TypeError,$=O.WeakMap;if(_||L.state){var U=L.state||(L.state=new $);U.get=U.get,U.has=U.has,U.set=U.set,y=function(B,z){if(U.has(B))throw H(N);return z.facade=B,U.set(B,z),z},b=function(B){return U.get(B)||{}},g=function(B){return U.has(B)}}else{var q=R("state");I[q]=!0,y=function(B,z){if(T(B,q))throw H(N);return z.facade=B,E(B,q,z),z},b=function(B){return T(B,q)?B[q]:{}},g=function(B){return T(B,q)}}m.exports={set:y,get:b,has:g,enforce:function(B){return g(B)?b(B):y(B,{})},getterFor:function(B){return function(z){var M;if(!C(z)||(M=b(z)).type!==B)throw H("Incompatible receiver, "+B+" required");return M}}}},7659:(m,j,r)=>{var y=r(5112),b=r(7497),g=y("iterator"),_=Array.prototype;m.exports=function(O){return O!==void 0&&(b.Array===O||_[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),_=r(648),O=r(5005),C=r(2788),E=function(){},T=[],L=O("Reflect","construct"),R=/^\s*(?:class|function)\b/,I=y(R.exec),N=!R.exec(E),H=function(U){if(!g(U))return!1;try{return L(E,T,U),!0}catch{return!1}},$=function(U){if(!g(U))return!1;switch(_(U)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return N||!!I(R,C(U))}catch{return!0}};$.sham=!0,m.exports=!L||b(function(){var U;return H(H.call)||!H(Object)||!H(function(){U=!0})||U})?$:H},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\./,_=function(L,R){var I=C[O(L)];return I==T||I!=E&&(b(R)?y(R):!!R)},O=_.normalize=function(L){return String(L).replace(g,".").toLowerCase()},C=_.data={},E=_.NATIVE="N",T=_.POLYFILL="P";m.exports=_},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(_){return typeof _=="object"?_!==null:y(_)||_===g}:function(_){return typeof _=="object"?_!==null:y(_)}},1913:m=>{m.exports=!1},7850:(m,j,r)=>{var y=r(111),b=r(4326),g=r(5112)("match");m.exports=function(_){var O;return y(_)&&((O=_[g])!==void 0?!!O:b(_)=="RegExp")}},2190:(m,j,r)=>{var y=r(5005),b=r(614),g=r(7976),_=r(3307),O=Object;m.exports=_?function(C){return typeof C=="symbol"}:function(C){var E=y("Symbol");return b(E)&&g(E.prototype,O(C))}},408:(m,j,r)=>{var y=r(9974),b=r(6916),g=r(9670),_=r(6330),O=r(7659),C=r(6244),E=r(7976),T=r(4121),L=r(1246),R=r(9212),I=TypeError,N=function($,U){this.stopped=$,this.result=U},H=N.prototype;m.exports=function($,U,q){var B,z,M,X,Y,Q,tt,it=q&&q.that,st=!(!q||!q.AS_ENTRIES),mt=!(!q||!q.IS_RECORD),ct=!(!q||!q.IS_ITERATOR),Et=!(!q||!q.INTERRUPTED),Tt=y(U,it),Ft=function(wt){return B&&R(B,"normal",wt),new N(!0,wt)},lt=function(wt){return st?(g(wt),Et?Tt(wt[0],wt[1],Ft):Tt(wt[0],wt[1])):Et?Tt(wt,Ft):Tt(wt)};if(mt)B=$.iterator;else if(ct)B=$;else{if(!(z=L($)))throw I(_($)+" is not iterable");if(O(z)){for(M=0,X=C($);X>M;M++)if((Y=lt($[M]))&&E(H,Y))return Y;return new N(!1)}B=T($,z)}for(Q=mt?$.next:B.next;!(tt=b(Q,B)).done;){try{Y=lt(tt.value)}catch(wt){R(B,"throw",wt)}if(typeof Y=="object"&&Y&&E(H,Y))return Y}return new N(!1)}},9212:(m,j,r)=>{var y=r(6916),b=r(9670),g=r(8173);m.exports=function(_,O,C){var E,T;b(_);try{if(!(E=g(_,"return"))){if(O==="throw")throw C;return C}E=y(E,_)}catch(L){T=!0,E=L}if(O==="throw")throw C;if(T)throw E;return b(E),C}},3061:(m,j,r)=>{var y=r(3383).IteratorPrototype,b=r(30),g=r(9114),_=r(8003),O=r(7497),C=function(){return this};m.exports=function(E,T,L,R){var I=T+" Iterator";return E.prototype=b(y,{next:g(+!R,L)}),_(E,I,!1,!0),O[I]=C,E}},1656:(m,j,r)=>{var y=r(2109),b=r(6916),g=r(1913),_=r(6530),O=r(614),C=r(3061),E=r(9518),T=r(7674),L=r(8003),R=r(8880),I=r(8052),N=r(5112),H=r(7497),$=r(3383),U=_.PROPER,q=_.CONFIGURABLE,B=$.IteratorPrototype,z=$.BUGGY_SAFARI_ITERATORS,M=N("iterator"),X="keys",Y="values",Q="entries",tt=function(){return this};m.exports=function(it,st,mt,ct,Et,Tt,Ft){C(mt,st,ct);var lt,wt,_t,zt=function(xt){if(xt===Et&&Rt)return Rt;if(!z&&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[M]||St["@@iterator"]||Et&&St[Et],Rt=!z&&jt||zt(Et),qt=st=="Array"&&St.entries||jt;if(qt&&(lt=E(qt.call(new it)))!==Object.prototype&<.next&&(g||E(lt)===B||(T?T(lt,B):O(lt[M])||I(lt,M,tt)),L(lt,Xt,!0,!0),g&&(H[Xt]=tt)),U&&Et==Y&&jt&&jt.name!==Y&&(!g&&q?R(St,"name",Y):(ce=!0,Rt=function(){return b(jt,this)})),Et)if(wt={values:zt(Y),keys:Tt?Rt:zt(X),entries:zt(Q)},Ft)for(_t in wt)(z||ce||!(_t in St))&&I(St,_t,wt[_t]);else y({target:st,proto:!0,forced:z||ce},wt);return g&&!Ft||St[M]===Rt||I(St,M,Rt,{name:Et}),H[st]=Rt,wt}},3383:(m,j,r)=>{var y,b,g,_=r(7293),O=r(614),C=r(111),E=r(30),T=r(9518),L=r(8052),R=r(5112),I=r(1913),N=R("iterator"),H=!1;[].keys&&("next"in(g=[].keys())?(b=T(T(g)))!==Object.prototype&&(y=b):H=!0),!C(y)||_(function(){var $={};return y[N].call($)!==$})?y={}:I&&(y=E(y)),O(y[N])||L(y,N,function(){return this}),m.exports={IteratorPrototype:y,BUGGY_SAFARI_ITERATORS:H}},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),_=r(2597),O=r(9781),C=r(6530).CONFIGURABLE,E=r(2788),T=r(9909),L=T.enforce,R=T.get,I=String,N=Object.defineProperty,H=y("".slice),$=y("".replace),U=y([].join),q=O&&!b(function(){return N(function(){},"length",{value:8}).length!==8}),B=String(String).split("String"),z=m.exports=function(M,X,Y){H(I(X),0,7)==="Symbol("&&(X="["+$(I(X),/^Symbol\(([^)]*)\)/,"$1")+"]"),Y&&Y.getter&&(X="get "+X),Y&&Y.setter&&(X="set "+X),(!_(M,"name")||C&&M.name!==X)&&(O?N(M,"name",{value:X,configurable:!0}):M.name=X),q&&Y&&_(Y,"arity")&&M.length!==Y.arity&&N(M,"length",{value:Y.arity});try{Y&&_(Y,"constructor")&&Y.constructor?O&&N(M,"prototype",{writable:!1}):M.prototype&&(M.prototype=void 0)}catch{}var Q=L(M);return _(Q,"source")||(Q.source=U(B,typeof X=="string"?X:"")),M};Function.prototype.toString=z(function(){return g(this)&&R(this).source||E(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,_,O,C=r(7854),E=r(9974),T=r(1236).f,L=r(261).set,R=r(8572),I=r(8334),N=r(1528),H=r(1036),$=r(5268),U=C.MutationObserver||C.WebKitMutationObserver,q=C.document,B=C.process,z=C.Promise,M=T(C,"queueMicrotask"),X=M&&M.value;if(!X){var Y=new R,Q=function(){var tt,it;for($&&(tt=B.domain)&&tt.exit();it=Y.get();)try{it()}catch(st){throw Y.head&&y(),st}tt&&tt.enter()};I||$||H||!U||!q?!N&&z&&z.resolve?((_=z.resolve(void 0)).constructor=z,O=E(_.then,_),y=function(){O(Q)}):$?y=function(){B.nextTick(Q)}:(L=E(L,C),y=function(){L(Q)}):(b=!0,g=q.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(_){var O,C;this.promise=new _(function(E,T){if(O!==void 0||C!==void 0)throw b("Bad Promise constructor");O=E,C=T}),this.resolve=y(O),this.reject=y(C)};m.exports.f=function(_){return new g(_)}},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),_=r(1340),O=r(3111).trim,C=r(1361),E=g("".charAt),T=y.parseFloat,L=y.Symbol,R=L&&L.iterator,I=1/T(C+"-0")!=-1/0||R&&!b(function(){T(Object(R))});m.exports=I?function(N){var H=O(_(N)),$=T(H);return $===0&&E(H,0)=="-"?-0:$}:T},3009:(m,j,r)=>{var y=r(7854),b=r(7293),g=r(1702),_=r(1340),O=r(3111).trim,C=r(1361),E=y.parseInt,T=y.Symbol,L=T&&T.iterator,R=/^[+-]?0x/i,I=g(R.exec),N=E(C+"08")!==8||E(C+"0x16")!==22||L&&!b(function(){E(Object(L))});m.exports=N?function(H,$){var U=O(_(H));return E(U,$>>>0||(I(R,U)?16:10))}:E},1574:(m,j,r)=>{var y=r(9781),b=r(1702),g=r(6916),_=r(7293),O=r(1956),C=r(5181),E=r(5296),T=r(7908),L=r(8361),R=Object.assign,I=Object.defineProperty,N=b([].concat);m.exports=!R||_(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 H={},$={},U=Symbol(),q="abcdefghijklmnopqrst";return H[U]=7,q.split("").forEach(function(B){$[B]=B}),R({},H)[U]!=7||O(R({},$)).join("")!=q})?function(H,$){for(var U=T(H),q=arguments.length,B=1,z=C.f,M=E.f;q>B;)for(var X,Y=L(arguments[B++]),Q=z?N(O(Y),z(Y)):O(Y),tt=Q.length,it=0;tt>it;)X=Q[it++],y&&!g(M,Y,X)||(U[X]=Y[X]);return U}:R},30:(m,j,r)=>{var y,b=r(9670),g=r(6048),_=r(748),O=r(3501),C=r(490),E=r(317),T=r(6200),L="prototype",R="script",I=T("IE_PROTO"),N=function(){},H=function(q){return"<"+R+">"+q+"</"+R+">"},$=function(q){q.write(H("")),q.close();var B=q.parentWindow.Object;return q=null,B},U=function(){try{y=new ActiveXObject("htmlfile")}catch{}var q,B,z;U=typeof document<"u"?document.domain&&y?$(y):(B=E("iframe"),z="java"+R+":",B.style.display="none",C.appendChild(B),B.src=String(z),(q=B.contentWindow.document).open(),q.write(H("document.F=Object")),q.close(),q.F):$(y);for(var M=_.length;M--;)delete U[L][_[M]];return U()};O[I]=!0,m.exports=Object.create||function(q,B){var z;return q!==null?(N[L]=b(q),z=new N,N[L]=null,z[I]=q):z=U(),B===void 0?z:g.f(z,B)}},6048:(m,j,r)=>{var y=r(9781),b=r(3353),g=r(3070),_=r(9670),O=r(5656),C=r(1956);j.f=y&&!b?Object.defineProperties:function(E,T){_(E);for(var L,R=O(T),I=C(T),N=I.length,H=0;N>H;)g.f(E,L=I[H++],R[L]);return E}},3070:(m,j,r)=>{var y=r(9781),b=r(4664),g=r(3353),_=r(9670),O=r(4948),C=TypeError,E=Object.defineProperty,T=Object.getOwnPropertyDescriptor,L="enumerable",R="configurable",I="writable";j.f=y?g?function(N,H,$){if(_(N),H=O(H),_($),typeof N=="function"&&H==="prototype"&&"value"in $&&I in $&&!$[I]){var U=T(N,H);U&&U[I]&&(N[H]=$.value,$={configurable:R in $?$[R]:U[R],enumerable:L in $?$[L]:U[L],writable:!1})}return E(N,H,$)}:E:function(N,H,$){if(_(N),H=O(H),_($),b)try{return E(N,H,$)}catch{}if("get"in $||"set"in $)throw C("Accessors not supported");return"value"in $&&(N[H]=$.value),N}},1236:(m,j,r)=>{var y=r(9781),b=r(6916),g=r(5296),_=r(9114),O=r(5656),C=r(4948),E=r(2597),T=r(4664),L=Object.getOwnPropertyDescriptor;j.f=y?L:function(R,I){if(R=O(R),I=C(I),T)try{return L(R,I)}catch{}if(E(R,I))return _(!b(g.f,R,I),R[I])}},1156:(m,j,r)=>{var y=r(4326),b=r(5656),g=r(8006).f,_=r(1589),O=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];m.exports.f=function(C){return O&&y(C)=="Window"?function(E){try{return g(E)}catch{return _(O)}}(C):g(b(C))}},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),_=r(6200),O=r(8544),C=_("IE_PROTO"),E=Object,T=E.prototype;m.exports=O?E.getPrototypeOf:function(L){var R=g(L);if(y(R,C))return R[C];var I=R.constructor;return b(I)&&R instanceof I?I.prototype:R instanceof E?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),_=r(1318).indexOf,O=r(3501),C=y([].push);m.exports=function(E,T){var L,R=g(E),I=0,N=[];for(L in R)!b(O,L)&&b(R,L)&&C(N,L);for(;T.length>I;)b(R,L=T[I++])&&(~_(N,L)||C(N,L));return N}},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 _=y(this,g);return!!_&&_.enumerable}:r},7674:(m,j,r)=>{var y=r(5668),b=r(9670),g=r(6077);m.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var _,O=!1,C={};try{(_=y(Object.prototype,"__proto__","set"))(C,[]),O=C instanceof Array}catch{}return function(E,T){return b(E),g(T),O?_(E,T):E.__proto__=T,E}}():void 0)},4699:(m,j,r)=>{var y=r(9781),b=r(1702),g=r(1956),_=r(5656),O=b(r(5296).f),C=b([].push),E=function(T){return function(L){for(var R,I=_(L),N=g(I),H=N.length,$=0,U=[];H>$;)R=N[$++],y&&!O(I,R)||C(U,T?[R,I[R]]:I[R]);return U}};m.exports={entries:E(!0),values:E(!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),_=TypeError;m.exports=function(O,C){var E,T;if(C==="string"&&b(E=O.toString)&&!g(T=y(E,O))||b(E=O.valueOf)&&!g(T=y(E,O))||C!=="string"&&b(E=O.toString)&&!g(T=y(E,O)))return T;throw _("Can't convert object to primitive value")}},3887:(m,j,r)=>{var y=r(5005),b=r(1702),g=r(8006),_=r(5181),O=r(9670),C=b([].concat);m.exports=y("Reflect","ownKeys")||function(E){var T=g.f(O(E)),L=_.f;return L?C(T,L(E)):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),_=r(4705),O=r(2788),C=r(5112),E=r(7871),T=r(3823),L=r(1913),R=r(7392),I=b&&b.prototype,N=C("species"),H=!1,$=g(y.PromiseRejectionEvent),U=_("Promise",function(){var q=O(b),B=q!==String(b);if(!B&&R===66||L&&(!I.catch||!I.finally))return!0;if(!R||R<51||!/native code/.test(q)){var z=new b(function(X){X(1)}),M=function(X){X(function(){},function(){})};if((z.constructor={})[N]=M,!(H=z.then(function(){})instanceof M))return!0}return!B&&(E||T)&&!$});m.exports={CONSTRUCTOR:U,REJECTION_EVENT:$,SUBCLASSING:H}},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(_,O){if(y(_),b(O)&&O.constructor===_)return O;var C=g.f(_);return(0,C.resolve)(O),C.promise}},612:(m,j,r)=>{var y=r(2492),b=r(7072),g=r(3702).CONSTRUCTOR;m.exports=g||!b(function(_){y.all(_).then(void 0,function(){})})},2626:(m,j,r)=>{var y=r(3070).f;m.exports=function(b,g,_){_ in b||y(b,_,{configurable:!0,get:function(){return g[_]},set:function(O){g[_]=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),_=r(4326),O=r(2261),C=TypeError;m.exports=function(E,T){var L=E.exec;if(g(L)){var R=y(L,E,T);return R!==null&&b(R),R}if(_(E)==="RegExp")return y(O,E,T);throw C("RegExp#exec called on incompatible receiver")}},2261:(m,j,r)=>{var y,b,g=r(6916),_=r(1702),O=r(1340),C=r(7066),E=r(2999),T=r(2309),L=r(30),R=r(9909).get,I=r(9441),N=r(7168),H=T("native-string-replace",String.prototype.replace),$=RegExp.prototype.exec,U=$,q=_("".charAt),B=_("".indexOf),z=_("".replace),M=_("".slice),X=(b=/b*/g,g($,y=/a/,"a"),g($,b,"a"),y.lastIndex!==0||b.lastIndex!==0),Y=E.BROKEN_CARET,Q=/()??/.exec("")[1]!==void 0;(X||Q||Y||I||N)&&(U=function(tt){var it,st,mt,ct,Et,Tt,Ft,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(C,lt),jt=lt.source,Rt=0,qt=_t;if(ce&&(St=z(St,"y",""),B(St,"g")===-1&&(St+="g"),qt=M(_t,lt.lastIndex),lt.lastIndex>0&&(!lt.multiline||lt.multiline&&q(_t,lt.lastIndex-1)!==`
|
|
53
|
-
`)&&(jt="(?: "+jt+")",qt=" "+qt,Rt++),st=new RegExp("^(?:"+jt+")",St)),Q&&(st=new RegExp("^"+jt+"$(?!\\s)",St)),X&&(mt=lt.lastIndex),ct=g($,ce?st:lt,qt),ce?ct?(ct.input=M(ct.input,Rt),ct[0]=M(ct[0],Rt),ct.index=lt.lastIndex,lt.lastIndex+=ct[0].length):lt.lastIndex=0:X&&ct&&(lt.lastIndex=lt.global?ct.index+ct[0].length:mt),Q&&ct&&ct.length>1&&g(
|
|
54
|
-
`)&&g.flags==="s")})},7168:(m,j,r)=>{var y=r(7293),b=r(7854).RegExp;m.exports=y(function(){var g=b("(?<a>b)","g");return g.exec("b").groups.a!=="b"||"b".replace(g,"$<a>c")!=="bc"})},4488:(m,j,r)=>{var y=r(8554),b=TypeError;m.exports=function(g){if(y(g))throw b("Can't call method on "+g);return g}},7152:(m,j,r)=>{var y,b=r(7854),g=r(2104),_=r(614),O=r(9363),C=r(8113),E=r(206),T=r(8053),L=b.Function,R=/MSIE .\./.test(C)||O&&((y=b.Bun.version.split(".")).length<3||y[0]==0&&(y[1]<3||y[1]==3&&y[2]==0));m.exports=function(I,N){var
|
|
55
|
-
\v\f\r \u2028\u2029\uFEFF`},2222:(m,j,r)=>{var y=r(2109),b=r(7293),g=r(3157),_=r(111),O=r(7908),C=r(6244),E=r(7207),T=r(6135),L=r(5417),R=r(1194),I=r(5112),N=r(7392),H=I("isConcatSpreadable"),$=N>=51||!b(function(){var q=[];return q[H]=!1,q.concat()[0]!==q}),U=function(q){if(!_(q))return!1;var B=q[H];return B!==void 0?!!B:g(q)};y({target:"Array",proto:!0,arity:1,forced:!$||!R("concat")},{concat:function(q){var B,z,M,X,Y,Q=O(this),tt=L(Q,0),it=0;for(B=-1,M=arguments.length;B<M;B++)if(U(Y=B===-1?Q:arguments[B]))for(X=C(Y),E(it+X),z=0;z<X;z++,it++)z in Y&&T(tt,it,Y[z]);else E(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),_="find",O=!0;_ in[]&&Array(1)[_](function(){O=!1}),y({target:"Array",proto:!0,forced:O},{find:function(C){return b(this,C,arguments.length>1?arguments[1]:void 0)}}),g(_)},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),_=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)}}),_("includes")},2772:(m,j,r)=>{var y=r(2109),b=r(1470),g=r(1318).indexOf,_=r(9341),O=b([].indexOf),C=!!O&&1/O([1],1,-0)<0;y({target:"Array",proto:!0,forced:C||!_("indexOf")},{indexOf:function(E){var T=arguments.length>1?arguments[1]:void 0;return C?O(this,E,T)||0:g(this,E,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),_=r(9909),O=r(3070).f,C=r(1656),E=r(6178),T=r(1913),L=r(9781),R="Array Iterator",I=_.set,N=_.getterFor(R);m.exports=C(Array,"Array",function($,U){I(this,{type:R,target:y($),index:0,kind:U})},function(){var $=N(this),U=$.target,q=$.kind,B=$.index++;return!U||B>=U.length?($.target=void 0,E(void 0,!0)):E(q=="keys"?B:q=="values"?U[B]:[B,U[B]],!1)},"values");var H=g.Arguments=g.Array;if(b("keys"),b("values"),b("entries"),!T&&L&&H.name!=="values")try{O(H,"name",{value:"values"})}catch{}},9600:(m,j,r)=>{var y=r(2109),b=r(1702),g=r(8361),_=r(5656),O=r(9341),C=b([].join);y({target:"Array",proto:!0,forced:g!=Object||!O("join",",")},{join:function(E){return C(_(this),E===void 0?",":E)}})},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),_=r(7392);y({target:"Array",proto:!0,forced:!r(5268)&&_>79&&_<83||!g("reduce")},{reduce:function(O){var C=arguments.length;return b(this,O,C,C>1?arguments[1]:void 0)}})},5069:(m,j,r)=>{var y=r(2109),b=r(1702),g=r(3157),_=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),_(this)}})},7042:(m,j,r)=>{var y=r(2109),b=r(3157),g=r(4411),_=r(111),O=r(1400),C=r(6244),E=r(5656),T=r(6135),L=r(5112),R=r(1194),I=r(206),N=R("slice"),H=L("species"),$=Array,U=Math.max;y({target:"Array",proto:!0,forced:!N},{slice:function(q,B){var z,M,X,Y=E(this),Q=C(Y),tt=O(q,Q),it=O(B===void 0?Q:B,Q);if(b(Y)&&(z=Y.constructor,(g(z)&&(z===$||b(z.prototype))||_(z)&&(z=z[H])===null)&&(z=void 0),z===$||z===void 0))return I(Y,tt,it);for(M=new(z===void 0?$:z)(U(it-tt,0)),X=0;tt<it;tt++,X++)tt in Y&&T(M,X,Y[tt]);return M.length=X,M}})},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),_=r(7908),O=r(6244),C=r(5117),E=r(1340),T=r(7293),L=r(4362),R=r(9341),I=r(8886),N=r(256),H=r(7392),$=r(8008),U=[],q=b(U.sort),B=b(U.push),z=T(function(){U.sort(void 0)}),M=T(function(){U.sort(null)}),X=R("sort"),Y=!T(function(){if(H)return H<70;if(!(I&&I>3)){if(N)return!0;if($)return $<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:z||!M||!X||!Y},{sort:function(Q){Q!==void 0&&g(Q);var tt=_(this);if(Y)return Q===void 0?q(tt):q(tt,Q);var it,st,mt=[],ct=O(tt);for(st=0;st<ct;st++)st in tt&&B(mt,tt[st]);for(L(mt,function(Et){return function(Tt,Ft){return Ft===void 0?-1:Tt===void 0?1:Et!==void 0?+Et(Tt,Ft)||0:E(Tt)>E(Ft)?1:-1}}(Q)),it=O(mt),st=0;st<it;)tt[st]=mt[st++];for(;st<ct;)C(tt,st++);return tt}})},561:(m,j,r)=>{var y=r(2109),b=r(7908),g=r(1400),_=r(9303),O=r(6244),C=r(3658),E=r(7207),T=r(5417),L=r(6135),R=r(5117),I=r(1194)("splice"),N=Math.max,H=Math.min;y({target:"Array",proto:!0,forced:!I},{splice:function($,U){var q,B,z,M,X,Y,Q=b(this),tt=O(Q),it=g($,tt),st=arguments.length;for(st===0?q=B=0:st===1?(q=0,B=tt-it):(q=st-2,B=H(N(_(U),0),tt-it)),E(tt+q-B),z=T(Q,B),M=0;M<B;M++)(X=it+M)in Q&&L(z,M,Q[X]);if(z.length=B,q<B){for(M=it;M<tt-B;M++)Y=M+q,(X=M+B)in Q?Q[Y]=Q[X]:R(Q,Y);for(M=tt;M>tt-B+q;M--)R(Q,M-1)}else if(q>B)for(M=tt-B;M>it;M--)Y=M+q-1,(X=M+B-1)in Q?Q[Y]=Q[X]:R(Q,Y);for(M=0;M<q;M++)Q[M+it]=arguments[M+2];return C(Q,tt-B+q),z}})},3843:(m,j,r)=>{var y=r(2109),b=r(1702),g=Date,_=b(g.prototype.getTime);y({target:"Date",stat:!0},{now:function(){return _(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),_=r(5112)("toPrimitive"),O=Date.prototype;y(O,_)||b(O,_,g)},3710:(m,j,r)=>{var y=r(1702),b=r(8052),g=Date.prototype,_="Invalid Date",O="toString",C=y(g[O]),E=y(g.getTime);String(new Date(NaN))!=_&&b(g,O,function(){var T=E(this);return T==T?C(this):_})},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),_=r(7045),O=Function.prototype,C=g(O.toString),E=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,T=g(E.exec);y&&!b&&_(O,"name",{configurable:!0,get:function(){try{return T(E,C(this))[1]}catch{return""}}})},8862:(m,j,r)=>{var y=r(2109),b=r(5005),g=r(2104),_=r(6916),O=r(1702),C=r(7293),E=r(614),T=r(2190),L=r(206),R=r(8044),I=r(6293),N=String,H=b("JSON","stringify"),$=O(/./.exec),U=O("".charAt),q=O("".charCodeAt),B=O("".replace),z=O(1 .toString),M=/[\uD800-\uDFFF]/g,X=/^[\uD800-\uDBFF]$/,Y=/^[\uDC00-\uDFFF]$/,Q=!I||C(function(){var mt=b("Symbol")();return H([mt])!="[null]"||H({a:mt})!="{}"||H(Object(mt))!="{}"}),tt=C(function(){return H("\uDF06\uD834")!=='"\\udf06\\ud834"'||H("\uDEAD")!=='"\\udead"'}),it=function(mt,ct){var Et=L(arguments),Tt=R(ct);if(E(Tt)||mt!==void 0&&!T(mt))return Et[1]=function(Ft,lt){if(E(Tt)&&(lt=_(Tt,this,N(Ft),lt)),!T(lt))return lt},g(H,null,Et)},st=function(mt,ct,Et){var Tt=U(Et,ct-1),Ft=U(Et,ct+1);return $(X,mt)&&!$(Y,Ft)||$(Y,mt)&&!$(X,Tt)?"\\u"+z(q(mt,0),16):mt};H&&y({target:"JSON",stat:!0,arity:3,forced:Q||tt},{stringify:function(mt,ct,Et){var Tt=L(arguments),Ft=g(Q?it:H,null,Tt);return tt&&typeof Ft=="string"?B(Ft,M,st):Ft}})},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),_=r(7854),O=r(857),C=r(1702),E=r(4705),T=r(2597),L=r(9587),R=r(7976),I=r(2190),N=r(7593),H=r(7293),$=r(8006).f,U=r(1236).f,q=r(3070).f,B=r(863),z=r(3111).trim,M="Number",X=_[M],Y=O[M],Q=X.prototype,tt=_.TypeError,it=C("".slice),st=C("".charCodeAt),mt=function(wt){var _t=N(wt,"number");return typeof _t=="bigint"?_t:ct(_t)},ct=function(wt){var _t,zt,Xt,ce,St,jt,Rt,qt,xt=N(wt,"number");if(I(xt))throw tt("Cannot convert a Symbol value to a number");if(typeof xt=="string"&&xt.length>2){if(xt=z(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,Rt=0;Rt<jt;Rt++)if((qt=st(St,Rt))<48||qt>ce)return NaN;return parseInt(St,Xt)}}return+xt},Et=E(M,!X(" 0o1")||!X("0b1")||X("+0x1")),Tt=function(wt){return R(Q,wt)&&H(function(){B(wt)})},Ft=function(wt){var _t=arguments.length<1?0:X(mt(wt));return Tt(this)?L(Object(_t),this,Ft):_t};Ft.prototype=Q,Et&&!b&&(Q.constructor=Ft),y({global:!0,constructor:!0,wrap:!0,forced:Et},{Number:Ft});var lt=function(wt,_t){for(var zt,Xt=g?$(_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)&&q(wt,zt,U(_t,zt))};b&&Y&<(O[M],Y),(Et||b)&<(O[M],X)},6977:(m,j,r)=>{var y=r(2109),b=r(1702),g=r(9303),_=r(863),O=r(8415),C=r(7293),E=RangeError,T=String,L=Math.floor,R=b(O),I=b("".slice),N=b(1 .toFixed),H=function(B,z,M){return z===0?M:z%2==1?H(B,z-1,M*B):H(B*B,z/2,M)},$=function(B,z,M){for(var X=-1,Y=M;++X<6;)Y+=z*B[X],B[X]=Y%1e7,Y=L(Y/1e7)},U=function(B,z){for(var M=6,X=0;--M>=0;)X+=B[M],B[M]=L(X/z),X=X%z*1e7},q=function(B){for(var z=6,M="";--z>=0;)if(M!==""||z===0||B[z]!==0){var X=T(B[z]);M=M===""?X:M+R("0",7-X.length)+X}return M};y({target:"Number",proto:!0,forced:C(function(){return N(8e-5,3)!=="0.000"||N(.9,0)!=="1"||N(1.255,2)!=="1.25"||N(0xde0b6b3a7640080,0)!=="1000000000000000128"})||!C(function(){N({})})},{toFixed:function(B){var z,M,X,Y,Q=_(this),tt=g(B),it=[0,0,0,0,0,0],st="",mt="0";if(tt<0||tt>20)throw E("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(M=(z=function(ct){for(var Et=0,Tt=ct;Tt>=4096;)Et+=12,Tt/=4096;for(;Tt>=2;)Et+=1,Tt/=2;return Et}(Q*H(2,69,1))-69)<0?Q*H(2,-z,1):Q/H(2,z,1),M*=4503599627370496,(z=52-z)>0){for($(it,0,M),X=tt;X>=7;)$(it,1e7,0),X-=7;for($(it,H(10,X,1),0),X=z-1;X>=23;)U(it,8388608),X-=23;U(it,1<<X),$(it,1,1),U(it,2),mt=q(it)}else $(it,0,M),$(it,1<<-z,0),mt=q(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),_=r(1236).f,O=r(9781);y({target:"Object",stat:!0,forced:!O||b(function(){_(1)}),sham:!O},{getOwnPropertyDescriptor:function(C,E){return _(g(C),E)}})},9337:(m,j,r)=>{var y=r(2109),b=r(9781),g=r(3887),_=r(5656),O=r(1236),C=r(6135);y({target:"Object",stat:!0,sham:!b},{getOwnPropertyDescriptors:function(E){for(var T,L,R=_(E),I=O.f,N=g(R),H={},$=0;N.length>$;)(L=I(R,T=N[$++]))!==void 0&&C(H,T,L);return H}})},9660:(m,j,r)=>{var y=r(2109),b=r(6293),g=r(7293),_=r(5181),O=r(7908);y({target:"Object",stat:!0,forced:!b||g(function(){_.f(1)})},{getOwnPropertySymbols:function(C){var E=_.f;return E?E(O(C)):[]}})},489:(m,j,r)=>{var y=r(2109),b=r(7293),g=r(7908),_=r(9518),O=r(8544);y({target:"Object",stat:!0,forced:b(function(){_(1)}),sham:!O},{getPrototypeOf:function(C){return _(g(C))}})},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(_){return g(b(_))}})},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),_=r(8523),O=r(2534),C=r(408);y({target:"Promise",stat:!0,forced:r(612)},{all:function(E){var T=this,L=_.f(T),R=L.resolve,I=L.reject,N=O(function(){var H=g(T.resolve),$=[],U=0,q=1;C(E,function(B){var z=U++,M=!1;q++,b(H,T,B).then(function(X){M||(M=!0,$[z]=X,--q||R($))},I)}),--q||R($)});return N.error&&I(N.value),L.promise}})},4164:(m,j,r)=>{var y=r(2109),b=r(1913),g=r(3702).CONSTRUCTOR,_=r(2492),O=r(5005),C=r(614),E=r(8052),T=_&&_.prototype;if(y({target:"Promise",proto:!0,forced:g,real:!0},{catch:function(R){return this.then(void 0,R)}}),!b&&C(_)){var L=O("Promise").prototype.catch;T.catch!==L&&E(T,"catch",L,{unsafe:!0})}},3401:(m,j,r)=>{var y,b,g,_=r(2109),O=r(1913),C=r(5268),E=r(7854),T=r(6916),L=r(8052),R=r(7674),I=r(8003),N=r(6340),H=r(9662),$=r(614),U=r(111),q=r(5787),B=r(6707),z=r(261).set,M=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,Ft=st.SUBCLASSING,lt=tt.getterFor(ct),wt=tt.set,_t=it&&it.prototype,zt=it,Xt=_t,ce=E.TypeError,St=E.document,jt=E.process,Rt=mt.f,qt=Rt,xt=!!(St&&St.createEvent&&E.dispatchEvent),tr="unhandledrejection",le=function(ot){var vt;return!(!U(ot)||!$(vt=ot.then))&&vt},Ae=function(ot,vt){var $t,Nt,Qt,Ue=vt.value,Ze=vt.state==1,yr=Ze?ot.ok:ot.fail,Je=ot.resolve,ar=ot.reject,ke=ot.domain;try{yr?(Ze||(vt.rejection===2&&Ce(vt),vt.rejection=1),yr===!0?$t=Ue:(ke&&ke.enter(),$t=yr(Ue),ke&&(ke.exit(),Qt=!0)),$t===ot.promise?ar(ce("Promise-chain cycle")):(Nt=le($t))?T(Nt,$t,Je,ar):Je($t)):ar(Ue)}catch(On){ke&&!Qt&&ke.exit(),ar(On)}},ye=function(ot,vt){ot.notified||(ot.notified=!0,M(function(){for(var $t,Nt=ot.reactions;$t=Nt.get();)Ae($t,ot);ot.notified=!1,vt&&!ot.rejection&&Ee(ot)}))},er=function(ot,vt,$t){var Nt,Qt;xt?((Nt=St.createEvent("Event")).promise=vt,Nt.reason=$t,Nt.initEvent(ot,!1,!0),E.dispatchEvent(Nt)):Nt={promise:vt,reason:$t},!Tt&&(Qt=E["on"+ot])?Qt(Nt):ot===tr&&X("Unhandled promise rejection",$t)},Ee=function(ot){T(z,E,function(){var vt,$t=ot.facade,Nt=ot.value;if(ir(ot)&&(vt=Y(function(){C?jt.emit("unhandledRejection",Nt,$t):er(tr,$t,Nt)}),ot.rejection=C||ir(ot)?2:1,vt.error))throw vt.value})},ir=function(ot){return ot.rejection!==1&&!ot.parent},Ce=function(ot){T(z,E,function(){var vt=ot.facade;C?jt.emit("rejectionHandled",vt):er("rejectionhandled",vt,ot.value)})},qe=function(ot,vt,$t){return function(Nt){ot(vt,Nt,$t)}},xe=function(ot,vt,$t){ot.done||(ot.done=!0,$t&&(ot=$t),ot.value=vt,ot.state=2,ye(ot,!0))},or=function(ot,vt,$t){if(!ot.done){ot.done=!0,$t&&(ot=$t);try{if(ot.facade===vt)throw ce("Promise can't be resolved itself");var Nt=le(vt);Nt?M(function(){var Qt={done:!1};try{T(Nt,vt,qe(or,Qt,ot),qe(xe,Qt,ot))}catch(Ue){xe(Qt,Ue,ot)}}):(ot.value=vt,ot.state=1,ye(ot,!1))}catch(Qt){xe({done:!1},Qt,ot)}}};if(Et&&(Xt=(zt=function(ot){q(this,Xt),H(ot),T(y,this);var vt=lt(this);try{ot(qe(or,vt),qe(xe,vt))}catch($t){xe(vt,$t)}}).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 $t=lt(this),Nt=Rt(B(this,zt));return $t.parent=!0,Nt.ok=!$(ot)||ot,Nt.fail=$(vt)&&vt,Nt.domain=C?jt.domain:void 0,$t.state==0?$t.reactions.add(Nt):M(function(){Ae(Nt,$t)}),Nt.promise}),b=function(){var ot=new y,vt=lt(ot);this.promise=ot,this.resolve=qe(or,vt),this.reject=qe(xe,vt)},mt.f=Rt=function(ot){return ot===zt||ot===void 0?new b(ot):qt(ot)},!O&&$(it)&&_t!==Object.prototype)){g=_t.then,Ft||L(_t,"then",function(ot,vt){var $t=this;return new zt(function(Nt,Qt){T(g,$t,Nt,Qt)}).then(ot,vt)},{unsafe:!0});try{delete _t.constructor}catch{}R&&R(_t,Xt)}_({global:!0,constructor:!0,wrap:!0,forced:Et},{Promise:zt}),I(zt,ct,!1,!0),N(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),_=r(8523),O=r(2534),C=r(408);y({target:"Promise",stat:!0,forced:r(612)},{race:function(E){var T=this,L=_.f(T),R=L.reject,I=O(function(){var N=g(T.resolve);C(E,function(H){b(N,T,H).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(_){var O=g.f(this);return b(O.reject,void 0,_),O.promise}})},6294:(m,j,r)=>{var y=r(2109),b=r(5005),g=r(1913),_=r(2492),O=r(3702).CONSTRUCTOR,C=r(9478),E=b("Promise"),T=g&&!O;y({target:"Promise",stat:!0,forced:g||O},{resolve:function(L){return C(T&&this===E?_:this,L)}})},2419:(m,j,r)=>{var y=r(2109),b=r(5005),g=r(2104),_=r(7065),O=r(9483),C=r(9670),E=r(111),T=r(30),L=r(7293),R=b("Reflect","construct"),I=Object.prototype,N=[].push,H=L(function(){function q(){}return!(R(function(){},[],q)instanceof q)}),$=!L(function(){R(function(){})}),U=H||$;y({target:"Reflect",stat:!0,forced:U,sham:U},{construct:function(q,B){O(q),C(B);var z=arguments.length<3?q:O(arguments[2]);if($&&!H)return R(q,B,z);if(q==z){switch(B.length){case 0:return new q;case 1:return new q(B[0]);case 2:return new q(B[0],B[1]);case 3:return new q(B[0],B[1],B[2]);case 4:return new q(B[0],B[1],B[2],B[3])}var M=[null];return g(N,M,B),new(g(_,q,M))}var X=z.prototype,Y=T(E(X)?X:I),Q=g(q,Y,B);return E(Q)?Q:Y}})},4819:(m,j,r)=>{var y=r(2109),b=r(6916),g=r(111),_=r(9670),O=r(5032),C=r(1236),E=r(9518);y({target:"Reflect",stat:!0},{get:function T(L,R){var I,N,H=arguments.length<3?L:arguments[2];return _(L)===H?L[R]:(I=C.f(L,R))?O(I)?I.value:I.get===void 0?void 0:b(I.get,H):g(N=E(L))?T(N,R,H):void 0}})},4603:(m,j,r)=>{var y=r(9781),b=r(7854),g=r(1702),_=r(4705),O=r(9587),C=r(8880),E=r(8006).f,T=r(7976),L=r(7850),R=r(1340),I=r(4706),N=r(2999),H=r(2626),$=r(8052),U=r(7293),q=r(2597),B=r(9909).enforce,z=r(6340),M=r(5112),X=r(9441),Y=r(7168),Q=M("match"),tt=b.RegExp,it=tt.prototype,st=b.SyntaxError,mt=g(it.exec),ct=g("".charAt),Et=g("".replace),Tt=g("".indexOf),Ft=g("".slice),lt=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,wt=/a/g,_t=/a/g,zt=new tt(wt)!==wt,Xt=N.MISSED_STICKY,ce=N.UNSUPPORTED_Y;if(_("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,Ae,ye,er,Ee,ir=T(it,this),Ce=L(qt),qe=xt===void 0,xe=[],or=qt;if(!ir&&Ce&&qe&&qt.constructor===St)return qt;if((Ce||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&&(Ae=!!xt&&Tt(xt,"y")>-1)&&ce&&(xt=Et(xt,/y/g,"")),Y&&(ye=function(ot){for(var vt,$t=ot.length,Nt=0,Qt="",Ue=[],Ze={},yr=!1,Je=!1,ar=0,ke="";Nt<=$t;Nt++){if((vt=ct(ot,Nt))==="\\")vt+=ct(ot,++Nt);else if(vt==="]")yr=!1;else if(!yr)switch(!0){case vt==="[":yr=!0;break;case vt==="(":mt(lt,Ft(ot,Nt+1))&&(Nt+=2,Je=!0),Qt+=vt,ar++;continue;case(vt===">"&&Je):if(ke===""||q(Ze,ke))throw new st("Invalid capture group name");Ze[ke]=!0,Ue[Ue.length]=[ke,ar],Je=!1,ke="";continue}Je?ke+=vt:Qt+=vt}return[Qt,Ue]}(qt),qt=ye[0],xe=ye[1]),er=O(tt(qt,xt),ir?this:it,St),(le||Ae||xe.length)&&(Ee=B(er),le&&(Ee.dotAll=!0,Ee.raw=St(function(ot){for(var vt,$t=ot.length,Nt=0,Qt="",Ue=!1;Nt<=$t;Nt++)(vt=ct(ot,Nt))!=="\\"?Ue||vt!=="."?(vt==="["?Ue=!0:vt==="]"&&(Ue=!1),Qt+=vt):Qt+="[\\s\\S]":Qt+=vt+ct(ot,++Nt);return Qt}(qt),tr)),Ae&&(Ee.sticky=!0),xe.length&&(Ee.groups=xe)),qt!==or)try{C(er,"source",or===""?"(?:)":or)}catch{}return er},jt=E(tt),Rt=0;jt.length>Rt;)H(St,tt,jt[Rt++]);it.constructor=St,St.prototype=it,$(b,"RegExp",St,{constructor:!0})}z("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),_=r(1340),O=r(7293),C=r(4706),E="toString",T=RegExp.prototype[E],L=O(function(){return T.call({source:"a",flags:"b"})!="/a/b"}),R=y&&T.name!=E;(L||R)&&b(RegExp.prototype,E,function(){var I=g(this);return"/"+_(I.source)+"/"+_(C(I))},{unsafe:!0})},2023:(m,j,r)=>{var y=r(2109),b=r(1702),g=r(3929),_=r(4488),O=r(1340),C=r(4964),E=b("".indexOf);y({target:"String",proto:!0,forced:!C("includes")},{includes:function(T){return!!~E(O(_(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),_=r(1656),O=r(6178),C="String Iterator",E=g.set,T=g.getterFor(C);_(String,"String",function(L){E(this,{type:C,string:b(L),index:0})},function(){var L,R=T(this),I=R.string,N=R.index;return N>=I.length?O(void 0,!0):(L=y(I,N),R.index+=L.length,O(L,!1))})},4723:(m,j,r)=>{var y=r(6916),b=r(7007),g=r(9670),_=r(8554),O=r(7466),C=r(1340),E=r(4488),T=r(8173),L=r(1530),R=r(7651);b("match",function(I,N,H){return[function($){var U=E(this),q=_($)?void 0:T($,I);return q?y(q,$,U):new RegExp($)[I](C(U))},function($){var U=g(this),q=C($),B=H(N,U,q);if(B.done)return B.value;if(!U.global)return R(U,q);var z=U.unicode;U.lastIndex=0;for(var M,X=[],Y=0;(M=R(U,q))!==null;){var Q=C(M[0]);X[Y]=Q,Q===""&&(U.lastIndex=L(q,O(U.lastIndex),z)),Y++}return Y===0?null:X}]})},5306:(m,j,r)=>{var y=r(2104),b=r(6916),g=r(1702),_=r(7007),O=r(7293),C=r(9670),E=r(614),T=r(8554),L=r(9303),R=r(7466),I=r(1340),N=r(4488),H=r(1530),$=r(8173),U=r(647),q=r(7651),B=r(5112)("replace"),z=Math.max,M=Math.min,X=g([].concat),Y=g([].push),Q=g("".indexOf),tt=g("".slice),it="a".replace(/./,"$0")==="$0",st=!!/./[B]&&/./[B]("a","$0")==="";_("replace",function(mt,ct,Et){var Tt=st?"$":"$0";return[function(Ft,lt){var wt=N(this),_t=T(Ft)?void 0:$(Ft,B);return _t?b(_t,Ft,wt,lt):b(ct,I(wt),Ft,lt)},function(Ft,lt){var wt=C(this),_t=I(Ft);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=E(lt);Xt||(lt=I(lt));var ce=wt.global;if(ce){var St=wt.unicode;wt.lastIndex=0}for(var jt=[];;){var Rt=q(wt,_t);if(Rt===null||(Y(jt,Rt),!ce))break;I(Rt[0])===""&&(wt.lastIndex=H(_t,R(wt.lastIndex),St))}for(var qt,xt="",tr=0,le=0;le<jt.length;le++){for(var Ae=I((Rt=jt[le])[0]),ye=z(M(L(Rt.index),_t.length),0),er=[],Ee=1;Ee<Rt.length;Ee++)Y(er,(qt=Rt[Ee])===void 0?qt:String(qt));var ir=Rt.groups;if(Xt){var Ce=X([Ae],er,ye,_t);ir!==void 0&&Y(Ce,ir);var qe=I(y(lt,void 0,Ce))}else qe=U(Ae,_t,ye,er,ir,lt);ye>=tr&&(xt+=tt(_t,tr,ye)+qe,tr=ye+Ae.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),_=r(1236).f,O=r(7466),C=r(1340),E=r(3929),T=r(4488),L=r(4964),R=r(1913),I=g("".startsWith),N=g("".slice),H=Math.min,$=L("startsWith");b({target:"String",proto:!0,forced:!(!R&&!$&&(y=_(String.prototype,"startsWith"),y&&!y.writable)||$)},{startsWith:function(U){var q=C(T(this));E(U);var B=O(H(arguments.length>1?arguments[1]:void 0,q.length)),z=C(U);return I?I(q,z,B):N(q,B,B+z.length)===z}})},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),_=r(1702),O=r(1913),C=r(9781),E=r(6293),T=r(7293),L=r(2597),R=r(7976),I=r(9670),N=r(5656),H=r(4948),$=r(1340),U=r(9114),q=r(30),B=r(1956),z=r(8006),M=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),Ft=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"),Rt="Symbol",qt="prototype",xt=ce.set,tr=ce.getterFor(Rt),le=Object[qt],Ae=b.Symbol,ye=Ae&&Ae[qt],er=b.TypeError,Ee=b.QObject,ir=Y.f,Ce=Q.f,qe=M.f,xe=it.f,or=_([].push),ot=ct("symbols"),vt=ct("op-symbols"),$t=ct("wks"),Nt=!Ee||!Ee[qt]||!Ee[qt].findChild,Qt=C&&T(function(){return q(Ce({},"a",{get:function(){return Ce(this,"a",{value:7}).a}})).a!=7})?function(Dt,Kt,Yt){var oe=ir(le,Kt);oe&&delete le[Kt],Ce(Dt,Kt,Yt),oe&&Dt!==le&&Ce(le,Kt,oe)}:Ce,Ue=function(Dt,Kt){var Yt=ot[Dt]=q(ye);return xt(Yt,{type:Rt,tag:Dt,description:Kt}),C||(Yt.description=Kt),Yt},Ze=function(Dt,Kt,Yt){Dt===le&&Ze(vt,Kt,Yt),I(Dt);var oe=H(Kt);return I(Yt),L(ot,oe)?(Yt.enumerable?(L(Dt,jt)&&Dt[jt][oe]&&(Dt[jt][oe]=!1),Yt=q(Yt,{enumerable:U(0,!1)})):(L(Dt,jt)||Ce(Dt,jt,U(1,{})),Dt[jt][oe]=!0),Qt(Dt,oe,Yt)):Ce(Dt,oe,Yt)},yr=function(Dt,Kt){I(Dt);var Yt=N(Kt),oe=B(Yt).concat(On(Yt));return St(oe,function($e){C&&!g(Je,Yt,$e)||Ze(Dt,$e,Yt[$e])}),Dt},Je=function(Dt){var Kt=H(Dt),Yt=g(xe,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=N(Dt),oe=H(Kt);if(Yt!==le||!L(ot,oe)||L(vt,oe)){var $e=ir(Yt,oe);return!$e||!L(ot,oe)||L(Yt,jt)&&Yt[jt][oe]||($e.enumerable=!0),$e}},ke=function(Dt){var Kt=qe(N(Dt)),Yt=[];return St(Kt,function(oe){L(ot,oe)||L(Tt,oe)||or(Yt,oe)}),Yt},On=function(Dt){var Kt=Dt===le,Yt=qe(Kt?vt:N(Dt)),oe=[];return St(Yt,function($e){!L(ot,$e)||Kt&&!L(le,$e)||or(oe,ot[$e])}),oe};E||(st(ye=(Ae=function(){if(R(ye,this))throw er("Symbol is not a constructor");var Dt=arguments.length&&arguments[0]!==void 0?$(arguments[0]):void 0,Kt=Ft(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 C&&Nt&&Qt(le,Kt,{configurable:!0,set:Yt}),Ue(Kt,Dt)})[qt],"toString",function(){return tr(this).tag}),st(Ae,"withoutSetter",function(Dt){return Ue(Ft(Dt),Dt)}),it.f=Je,Q.f=Ze,tt.f=yr,Y.f=ar,z.f=M.f=ke,X.f=On,wt.f=function(Dt){return Ue(lt(Dt),Dt)},C&&(mt(ye,"description",{configurable:!0,get:function(){return tr(this).description}}),O||st(le,"propertyIsEnumerable",Je,{unsafe:!0}))),y({global:!0,constructor:!0,wrap:!0,forced:!E,sham:!E},{Symbol:Ae}),St(B($t),function(Dt){_t(Dt)}),y({target:Rt,stat:!0,forced:!E},{useSetter:function(){Nt=!0},useSimple:function(){Nt=!1}}),y({target:"Object",stat:!0,forced:!E,sham:!C},{create:function(Dt,Kt){return Kt===void 0?q(Dt):yr(q(Dt),Kt)},defineProperty:Ze,defineProperties:yr,getOwnPropertyDescriptor:ar}),y({target:"Object",stat:!0,forced:!E},{getOwnPropertyNames:ke}),zt(),Xt(Ae,Rt),Tt[jt]=!0},1817:(m,j,r)=>{var y=r(2109),b=r(9781),g=r(7854),_=r(1702),O=r(2597),C=r(614),E=r(7976),T=r(1340),L=r(7045),R=r(9920),I=g.Symbol,N=I&&I.prototype;if(b&&C(I)&&(!("description"in N)||I().description!==void 0)){var H={},$=function(){var Y=arguments.length<1||arguments[0]===void 0?void 0:T(arguments[0]),Q=E(N,this)?new I(Y):Y===void 0?I():I(Y);return Y===""&&(H[Q]=!0),Q};R($,I),$.prototype=N,N.constructor=$;var U=String(I("test"))=="Symbol(test)",q=_(N.valueOf),B=_(N.toString),z=/^Symbol\((.*)\)[^)]+$/,M=_("".replace),X=_("".slice);L(N,"description",{configurable:!0,get:function(){var Y=q(this);if(O(H,Y))return"";var Q=B(Y),tt=U?X(Q,7,-1):M(Q,z,"$1");return tt===""?void 0:tt}}),y({global:!0,constructor:!0,forced:!0},{Symbol:$})}},763:(m,j,r)=>{var y=r(2109),b=r(5005),g=r(2597),_=r(1340),O=r(2309),C=r(2015),E=O("string-to-symbol-registry"),T=O("symbol-to-string-registry");y({target:"Symbol",stat:!0,forced:!C},{for:function(L){var R=_(L);if(g(E,R))return E[R];var I=b("Symbol")(R);return E[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),_=r(6330),O=r(2309),C=r(2015),E=O("symbol-to-string-registry");y({target:"Symbol",stat:!0,forced:!C},{keyFor:function(T){if(!g(T))throw TypeError(_(T)+" is not a symbol");if(b(E,T))return E[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),_=r(8533),O=r(8880),C=function(T){if(T&&T.forEach!==_)try{O(T,"forEach",_)}catch{T.forEach=_}};for(var E in b)b[E]&&C(y[E]&&y[E].prototype);C(g)},3948:(m,j,r)=>{var y=r(7854),b=r(8324),g=r(8509),_=r(6992),O=r(8880),C=r(5112),E=C("iterator"),T=C("toStringTag"),L=_.values,R=function(N,H){if(N){if(N[E]!==L)try{O(N,E,L)}catch{N[E]=L}if(N[T]||O(N,T,H),b[H]){for(var $ in _)if(N[$]!==_[$])try{O(N,$,_[$])}catch{N[$]=_[$]}}}};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 P={};return(()=>{k.r(P),k.d(P,{JSONEditor:()=>gn}),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&&!E(l.constructor.prototype,"isPrototypeOf"))}function g(l){return b(l)?_({},l):Array.isArray(l)?l.map(g):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];return p.forEach(function(u){u&&Object.keys(u).forEach(function(a){u[a]&&b(u[a])?(E(l,a)||(l[a]={}),_(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 C(l){return l&&(l.toString()==="[object ShadowRoot]"?l:C(l.parentNode))}function E(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 N(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,{})),N(l[a],u[a])):Object.assign(l,r({},a,u[a]));return N.apply(void 0,[l].concat(p))}function H(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 $(l){return $=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},$(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($(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if($(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),$(u)==="symbol"?u:String(u)),i)}var u}var q=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=_({},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}):$(u)==="object"?$(t)!=="object"?this.dependenciesFulfilled=u===t:Object.keys(u).some(function(e){return!!E(u,e)&&(E(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()},E(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(w){var S=t(w),D=e(w);a.setAttribute("href",S),a.setAttribute("title",D||S),c.setAttribute("src",S)})}else if(["audio","video"].includes(s)){u=this.theme.getBlockLinkHolder(),(a=this.theme.getBlockLink()).setAttribute("target","_blank");var h=document.createElement(s);h.setAttribute("controls","controls"),this.theme.createMediaLink(u,a,h),this.link_watchers.push(function(w){var S=t(w),D=e(w);a.setAttribute("href",S),a.textContent=D||S,h.setAttribute("src",S)})}else a=u=this.theme.getBlockLink(),u.setAttribute("target","_blank"),u.textContent=i.rel,u.style.display="none",this.link_watchers.push(function(w){var S=t(w),D=e(w);S&&(u.style.display=""),u.setAttribute("href",S),u.textContent=D||S});return o&&a&&(o===!0?a.setAttribute("download",""):this.link_watchers.push(function(w){a.setAttribute("download",o(w))})),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=_(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&&$(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(S){if(Array.isArray(S))return S}(e=t)||function(S,D){var J=S==null?null:typeof Symbol<"u"&&S[Symbol.iterator]||S["@@iterator"];if(J!=null){var nt,ut,dt,kt,Ct=[],Bt=!0,re=!1;try{if(dt=(J=J.call(S)).next,D===0){if(Object(J)!==J)return;Bt=!1}else for(;!(Bt=(nt=dt.call(J)).done)&&(Ct.push(nt.value),Ct.length!==D);Bt=!0);}catch(Se){re=!0,ut=Se}finally{try{if(!Bt&&J.return!=null&&(kt=J.return(),Object(kt)!==kt))return}finally{if(re)throw ut}}return Ct}}(e,o)||function(S,D){if(S){if(typeof S=="string")return H(S,D);var J=Object.prototype.toString.call(S).slice(8,-1);return J==="Object"&&S.constructor&&(J=S.constructor.name),J==="Map"||J==="Set"?Array.from(S):J==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(J)?H(S,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.`)}()),h=c[0],w=c[1];w===Object(w)?u[h]=a.expandCallbacks(i,w):typeof w=="string"&&$(s)==="object"&&typeof s[w]=="function"&&(u[h]=s[w].bind(null,a))}),u}},{key:"showValidationErrors",value:function(i){}}],p&&U(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),l}();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 z(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}function M(){return M=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}},M.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,h){if(h&&(B(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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(){M(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(){M(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?B(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 h=this.control.querySelector("output");h&&(h.value=c)}var w=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(w),{changed:w,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(S){if(S.preventDefault(),S.stopPropagation(),t.schema.template)S.currentTarget.value=t.value;else{var D=S.currentTarget.value,J=t.sanitize(D);D!==J&&(S.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(S){if(S){var D,J=S.offsetHeight;if(S.offsetHeight<S.scrollHeight)for(D=0;S.offsetHeight<S.scrollHeight+3&&!(D>100);)D++,J++,S.style.height="".concat(J,"px");else{for(D=0;S.offsetHeight>=S.scrollHeight+3&&!(D>100);)D++,J--,S.style.height="".concat(J,"px");S.style.height="".concat(J+1,"px")}}},this.input.addEventListener("keyup",function(S){t.adjust_height(S.currentTarget)}),this.input.addEventListener("change",function(S){t.adjust_height(S.currentTarget)}),this.adjust_height()),this.format&&this.input.setAttribute("data-schemaformat",this.format);var h=this.input;if(this.format==="range"&&(h=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,h,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 w=this.expandCallbacks("template",{template:this.schema.template});typeof w.template=="function"?this.template=w.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",_({},this.defaults.options.cleave||{},this.options.cleave||{}));B(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",_({},this.defaults.options.imask||{},this.options.imask||{}));B(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:M(Y(s.prototype),"getValue",this).call(this)}},{key:"enable",value:function(){this.always_disabled||(this.input.disabled=!1,M(Y(s.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.input.disabled=!0,M(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),M(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)),M(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,h){return h.path===e.path&&c.push(h.message),c},[]);o.length?this.theme.addInputError(this.input,"".concat(o.join(". "),".")):this.theme.removeInputError(this.input)}}])&&z(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 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,h){if(h&&(tt(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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",_({},{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 Ft(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,h){if(h&&(Tt(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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?_({},this.schema.additionalItems):void 0:_({},this.schema.items[t]):this.schema.items?_({},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,h=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 w=this.jsoneditor.createEditor(h,{jsoneditor:this.jsoneditor,schema:o,container:c,path:"".concat(this.path,".").concat(t),parent:this,required:!0});return w.preBuild(),w.build(),w.postBuild(),w.title_controls||(w.array_controls=this.theme.getButtonHolder(),c.appendChild(w.array_controls)),w}},{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(S,D){if(t.rows[D])t.rows[D].setValue(S,o);else if(t.row_cache[D])t.rows[D]=t.row_cache[D],t.rows[D].setValue(S,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(S,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 h=this.rows.find(function(S){return S.tab===t.active_tab}),w=h!==void 0?h.tab:null;!w&&this.rows.length&&(w=this.rows[0].tab),this.active_tab=w,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 h=!(t||this.hide_delete_all_rows_buttons);this.setButtonState(this.remove_all_rows_button,h),e.push(h)}else this.setButtonState(this.delete_last_row_button,!1),this.setButtonState(this.remove_all_rows_button,!1);var w=!(this.getMax()&&this.getMax()<=this.rows.length||this.hide_add_button);return this.setButtonState(this.add_row_button,w),e.push(w),e.some(function(S){return S})}},{key:"refreshValue",value:function(t){var e=this,o=this.value?this.value.length:0;if(this.value=this.rows.map(function(h){return h.getValue()}),o!==this.value.length||t){var c=this.schema.minItems&&this.schema.minItems>=this.rows.length;this.rows.forEach(function(h,w){if(h.movedown_button){var S=w!==e.rows.length-1;e.setButtonState(h.movedown_button,S)}h.delete_button&&e.setButtonState(h.delete_button,!c),e.value[w]=h.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(w){o.active_tab=o.rows[c].tab,o.refreshTabs(),w.preventDefault(),w.stopPropagation()}));var h=this.rows[c].title_controls||this.rows[c].array_controls;return this.hide_delete_buttons||(this.rows[c].delete_button=this._createDeleteButton(c,h)),this.show_copy_button&&(this.rows[c].copy_button=this._createCopyButton(c,h)),c&&!this.hide_move_buttons&&(this.rows[c].moveup_button=this._createMoveUpButton(c,h)),this.hide_move_buttons||(this.rows[c].movedown_button=this._createMoveDownButton(c,h)),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(h){if(h.preventDefault(),h.stopPropagation(),!o.askConfirmation())return!1;var w=1*h.currentTarget.getAttribute("data-i"),S=o.getValue().filter(function(nt,ut){return ut!==w}),D=null,J=o.rows[w].getValue();o.setValue(S),o.rows[w]?D=o.rows[w].tab:o.rows[w-1]&&(D=o.rows[w-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()]),h=this.schema;return c.classList.add("copy","json-editor-btntype-copy"),c.setAttribute("data-i",t),c.addEventListener("click",function(w){var S=o.getValue();w.preventDefault(),w.stopPropagation();var D=1*w.currentTarget.getAttribute("data-i");S.forEach(function(J,nt){if(nt===D){if(h.items.type==="string"&&h.items.format==="uuid")J=R();else if(h.items.type==="object"&&h.items.properties)for(var ut=0,dt=Object.keys(J);ut<dt.length;ut++){var kt=dt[ut];h.items.properties&&h.items.properties[kt]&&h.items.properties[kt].format==="uuid"&&(J[kt]=R())}S.push(J)}}),o.setValue(S),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(h){h.preventDefault(),h.stopPropagation();var w=1*h.currentTarget.getAttribute("data-i");if(!(w<=0)){var S=o.getValue(),D=S[w-1];S[w-1]=S[w],S[w]=D,o.setValue(S),o.active_tab=o.rows[w-1].tab,o.refreshTabs(),o.onChange(!0),o.jsoneditor.trigger("moveRow",o.rows[w-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(h){h.preventDefault(),h.stopPropagation();var w=1*h.currentTarget.getAttribute("data-i"),S=o.getValue();if(!(w>=S.length-1)){var D=S[w+1];S[w+1]=S[w],S[w]=D,o.setValue(S),o.active_tab=o.rows[w+1].tab,o.refreshTabs(),o.onChange(!0),o.jsoneditor.trigger("moveRow",o.rows[w+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(h){h.preventDefault(),h.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(h.currentTarget,"","collapse","button_collapse")):(t.collapsed=!0,t.row_holder.style.display="none",t.controls.style.display="none",t.setButtonText(h.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,h=t.rows.length;t.row_cache[h]?(c=t.rows[h]=t.row_cache[h],t.rows[h].setValue(t.rows[h].getDefault(),!0),t.rows[h].container.style.display="",t.rows[h].tab&&(t.rows[h].tab.style.display=""),t.rows[h].register()):c=t.addRow(),t.active_tab=t.rows[h].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(),h=null,w=c.pop();t.setValue(c),t.rows[t.rows.length-1]&&(h=t.rows[t.rows.length-1].tab),h&&(t.active_tab=h,t.refreshTabs()),t.onChange(!0),t.jsoneditor.trigger("deleteRow",w)}),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(h){h.path===e.path?o.push(h):c.push(h)}),this.error_holder&&(o.length?(this.error_holder.innerHTML="",this.error_holder.style.display="",o.forEach(function(h){e.error_holder.appendChild(e.theme.getErrorMessage(h.message))})):this.error_holder.style.display="none"),this.rows.forEach(function(h){return h.showValidationErrors(c)})}}],p&&Ft(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(q);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=Rt(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 Rt(l){return Rt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Rt(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=Rt(i);if(u){var o=Rt(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,h){if(h&&(Xt(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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(Rt(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(Rt(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(Rt(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||[],h=e.options&&e.options.enum_titles||[];for(t=0;t<o.length;t++)if(this.sanitize(o[t])===o[t]){var w=c[t]||{};"title"in w||(w.title="".concat(h[t]||o[t])),this.option_keys.push("".concat(o[t])),this.option_enum.push(w),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 h=this.theme.getInfoButton(this.translateProperty(this.option_enum[t].infoText));c.appendChild(h)}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(w){return w.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(w){var S=[];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)&&S.push(e.select_values[e.option_keys[t]]);e.updateValue(S),e.onChange(!0)},this.control.addEventListener("change",this.multiselectChangeHandler,!1),window.requestAnimationFrame(function(){e.afterInputReady()})}},{key:"postBuild",value:function(){St(Rt(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 h=this.sanitize(this.select_values[t[c]]);o.push(h),h!==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(Rt(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(Rt(s.prototype),"disable",this).call(this)}},{key:"destroy",value:function(){St(Rt(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,h){return h.path.match(e)&&c.push(h.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}(q);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=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}},le.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 ye(l){return ye=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ye(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&&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=ye(i);if(u){var o=ye(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,h){if(h&&(xt(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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(ye(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",_({},{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(ye(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 h=this.sanitize(this.select_values[t[c]]);o.push(h),h!==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(ye(s.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.choices_instance&&this.choices_instance.disable(),le(ye(s.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.choices_instance&&(this.choices_instance.destroy(),this.choices_instance=null),le(ye(s.prototype),"destroy",this).call(this)}}])&&tr(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(qt);function Ee(l){return Ee=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},Ee(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(Ee(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Ee(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Ee(u)==="symbol"?u:String(u)),i)}var u}function Ce(){return Ce=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}},Ce.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 xe(l){return xe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},xe(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=xe(i);if(u){var o=xe(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,h){if(h&&(Ee(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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)):Ce(xe(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",_({},{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=E(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)),Ce(xe(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 h=this.sanitize(this.select_values[t[c]]);o.push(h),h!==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)),Ce(xe(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)),Ce(xe(s.prototype),"disable",this).call(this)}},{key:"destroy",value:function(){this.select2_instance&&(this.select2_instance.select2("destroy"),this.select2_instance=null),Ce(xe(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 $t(){return $t=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}},$t.apply(this,arguments)}function Nt(l,n){return Nt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},Nt(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&&Nt(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,h){if(h&&(ot(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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)):$t(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",_({},{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)),$t(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 h=this.sanitize(this.select_values[t[c]]);o.push(h),h!==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(),$t(Qt(s.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.selectize_instance&&this.selectize_instance.lock(),$t(Qt(s.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.selectize_instance&&(this.selectize_instance.destroy(),this.selectize_instance=null),$t(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 yr(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=ke(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 ke(l){return ke=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ke(l)}var On=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=ke(i);if(u){var o=ke(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,h){if(h&&(Ze(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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(ke(s.prototype),"postBuild",this).call(this)}},{key:"afterInputReady",value:function(){var t,e=this;window.Autocomplete&&!this.autocomplete_instance&&(t=this.expandCallbacks("autocomplete",_({},{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(ke(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(ke(s.prototype),"destroy",this).call(this)}}])&&yr(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=$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}},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 $e(l){return $e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},$e(l)}k(561);var ji=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=$e(i);if(u){var o=$e(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,h){if(h&&(Dt(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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 h in e.parent.schema.properties)c[h]="";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 h=new FileReader;t.setFileReaderListener(h),h.readAsDataURL(o.currentTarget.files[c])}}else{var w=new FileReader;w.onload=function(S){t.value=S.target.result,t.refreshPreview(),t.onChange(!0),w=null},w.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($e(s.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.uploader&&(this.uploader.disabled=!0),Yt($e(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($e(s.prototype),"destroy",this).call(this)}}])&&Kt(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(q);function En(l){return En=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},En(l)}function Aa(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(En(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(En(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),En(u)==="symbol"?u:String(u)),i)}var u}function Xn(){return Xn=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}},Xn.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 Ra=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,h){if(h&&(En(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(c)}(this,t)});function s(t,e){var o;return function(c,h){if(!(c instanceof h))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",_({},{icon:"",validated:!1,align:"left",action:function(c,h){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,Xn($r(s.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.input.disabled=!0,Xn($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,Xn($r(s.prototype),"destroy",this).call(this)}}])&&Aa(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(q);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 Ia(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 dn(){return dn=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=Tr(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}},dn.apply(this,arguments)}function Oi(l,n){return Oi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},Oi(l,n)}function Tr(l){return Tr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Tr(l)}var Da=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&&Oi(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=Tr(i);if(u){var o=Tr(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,h){if(h&&(Cn(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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(){dn(Tr(s.prototype),"register",this).call(this),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}},{key:"unregister",value:function(){dn(Tr(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,dn(Tr(s.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.input.disabled=!0,dn(Tr(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),dn(Tr(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,h){return h.path===e.path&&c.push(h.message),c},[]);this.input.controlgroup=this.control,o.length?this.theme.addInputError(this.input,"".concat(o.join(". "),".")):this.theme.removeInputError(this.input)}}])&&Ia(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(q);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 Ao(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 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 Qn=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,h){if(h&&(Sn(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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(h,w){o.enum_options[w]="".concat(h),o.enum_display[w]="".concat(o.translateProperty(c[w])||h),o.enum_values[w]=o.typecast(h)})}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]=_({},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 h=0;h<this.enumSource.length;h++)if(Array.isArray(this.enumSource[h]))o=o.concat(this.enumSource[h]),c=c.concat(this.enumSource[h]);else{var w=[];if(w=Array.isArray(this.enumSource[h].source)?this.enumSource[h].source:t[this.enumSource[h].source]){if(this.enumSource[h].slice&&(w=Array.prototype.slice.apply(w,this.enumSource[h].slice)),this.enumSource[h].filter){var S=[];for(e=0;e<w.length;e++)this.enumSource[h].filter({i:e,item:w[e],watched:t})&&S.push(w[e]);w=S}var D=[],J=[];for(e=0;e<w.length;e++){var nt=w[e];this.enumSource[h].value?J[e]=this.typecast(this.enumSource[h].value({i:e,item:nt})):J[e]=w[e],this.enumSource[h].title?D[e]=this.enumSource[h].title({i:e,item:nt}):D[e]=J[e]}this.enumSource[h].sort&&(function(dt,kt,Ct){dt.map(function(Bt,re){return{v:Bt,t:kt[re]}}).sort(function(Bt,re){return Bt.v<re.v?-Ct:Bt.v===re.v?0:Ct}).forEach(function(Bt,re){dt[re]=Bt.v,kt[re]=Bt.t})}).bind(null,J,D,this.enumSource[h].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,h){return h.path===e.path&&c.push(h.message),c},[]);o.length?this.theme.addInputError(this.input,"".concat(o.join(". "),".")):this.theme.removeInputError(this.input)}}])&&Ao(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(q);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 Cs(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 Lr(){return Lr=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}},Lr.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 V(l){return V=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},V(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=V(i);if(u){var o=V(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,h){if(h&&(Pn(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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 Lr(V(s.prototype),"setValue",this).call(this,t,e)}},{key:"afterInputReady",value:function(){if(window.Choices&&!this.choices_instance){var t=this.expandCallbacks("choices",_({},this.defaults.options.choices||{},this.options.choices||{}));this.choices_instance=new window.Choices(this.input,t)}Lr(V(s.prototype),"afterInputReady",this).call(this)}},{key:"onWatchedFieldChange",value:function(){var t=this;if(Lr(V(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(),Lr(V(s.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.choices_instance&&this.choices_instance.disable(),Lr(V(s.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.choices_instance&&(this.choices_instance.destroy(),this.choices_instance=null),Lr(V(s.prototype),"destroy",this).call(this)}}])&&Cs(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(Qn);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 It(){return It=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}},It.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,h){if(h&&(K(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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(It(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 h=this.input.parentNode,w=this.input.nextSibling,S=this.theme.getInputGroup(this.input,e);S!==void 0?(this.options.flatpickr.inline=!1,h.insertBefore(S,w),t=S):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")It(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),h=c.getFullYear(),w=this.zeroPad(c.getMonth()+1),S=this.zeroPad(c.getDate()),D=this.zeroPad(c.getHours()),J=this.zeroPad(c.getMinutes()),nt=this.zeroPad(c.getSeconds()),ut=[h,w,S].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,It(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=Te(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 Te(l){return Te=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Te(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=Te(i);if(u){var o=Te(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,h){if(h&&(Gt(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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(Te(s.prototype),"register",this).call(this)}},{key:"unregister",value:function(){if(Pt(Te(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(Te(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(Te(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,h){c&&(t.currentEditor===h?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=_({},this.schema,this.jsoneditor.refs[t]),c=this.jsoneditor.getEditorClass(o,this.jsoneditor),h=this.jsoneditor.createEditor(c,{jsoneditor:this.jsoneditor,schema:o,container:e,path:this.path,parent:this,required:!0});this.editors.push(h),h.preBuild(),h.build(),h.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=_({},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(Te(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(Te(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}(q);function At(l){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(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(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(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=_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}},ue.apply(this,arguments)}function Me(l,n){return Me=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},Me(l,n)}function _e(l){return _e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},_e(l)}var Re=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&&Me(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,h){if(h&&(At(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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(_e(s.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.switcher.disabled=!0,ue(_e(s.prototype),"disable",this).call(this)}},{key:"getHTML",value:function(t){var e,o,c=this;if(t===null)return"<em>null</em>";if(At(t)==="object"){var h="";return e=t,o=function(w,S){var D=c.getHTML(S);Array.isArray(t)||(D="<div><em>".concat(w,"</em>: ").concat(D,"</div>")),h+="<li>".concat(D,"</li>")},Array.isArray(e)||typeof e.length=="number"&&e.length>0&&e.length-1 in e?Array.from(e).forEach(function(w,S){return o(S,w)}):Object.entries(e).forEach(function(w){var S,D,J=(D=2,function(dt){if(Array.isArray(dt))return dt}(S=w)||function(dt,kt){var Ct=dt==null?null:typeof Symbol<"u"&&dt[Symbol.iterator]||dt["@@iterator"];if(Ct!=null){var Bt,re,Se,Ut,gt=[],Wt=!0,Fe=!1;try{if(Se=(Ct=Ct.call(dt)).next,kt===0){if(Object(Ct)!==Ct)return;Wt=!1}else for(;!(Wt=(Bt=Se.call(Ct)).done)&&(gt.push(Bt.value),gt.length!==kt);Wt=!0);}catch(W){Fe=!0,re=W}finally{try{if(!Wt&&Ct.return!=null&&(Ut=Ct.return(),Object(Ut)!==Ut))return}finally{if(Fe)throw re}}return gt}}(S,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}}(S,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)}),h=Array.isArray(t)?"<ol>".concat(h,"</ol>"):"<ul style='margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:0;'>".concat(h,"</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(_e(s.prototype),"destroy",this).call(this)}}])&&Vt(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(q);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 Ie(){return Ie=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}},Ie.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 wr(l){return wr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},wr(l)}var Ba=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=wr(i);if(u){var o=wr(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,h){if(h&&(ve(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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(){Ie(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(){Ie(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 h=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(h)}}}},{key:"getNumColumns",value:function(){return 2}},{key:"enable",value:function(){Ie(wr(s.prototype),"enable",this).call(this)}},{key:"disable",value:function(){Ie(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),Ie(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)),Ie(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}(q);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 Ss(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 Ei(l,n){return Ei=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},Ei(l,n)}function Rr(l){return Rr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Rr(l)}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&&Ei(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=Rr(i);if(u){var o=Rr(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,h){if(h&&(Mr(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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}}])&&Ss(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(Ra);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 Na(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 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 Pi(l,n){return Pi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},Pi(l,n)}function Tn(l){return Tn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Tn(l)}var $a=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=Tn(i);if(u){var o=Tn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,h){if(h&&(pn(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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(Si(Tn(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=""))}}])&&Na(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(Q);function Ir(l){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(l)}function Kn(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(Ir(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Ir(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Ir(u)==="symbol"?u:String(u)),i)}var u}function Hr(l,n){return Hr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},Hr(l,n)}function Ti(l){return Ti=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ti(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&&Hr(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=Ti(i);if(u){var o=Ti(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,h){if(h&&(Ir(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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()}}])&&Kn(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}($a);function Ln(l){return Ln=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},Ln(l)}function Li(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(Ln(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Ln(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Ln(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=Fr(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 An(l,n){return An=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},An(l,n)}function Fr(l){return Fr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Fr(l)}var Ro=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&&An(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=Fr(i);if(u){var o=Fr(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,h){if(h&&(Ln(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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(Fr(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=_(this.options,this.schema.options||{})}}])&&Li(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(Q);function Rn(l){return Rn=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},Rn(l)}function Ps(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(Rn(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Rn(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Rn(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 Ai(l,n){return Ai=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},Ai(l,n)}function _r(l){return _r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},_r(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&&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=_r(i);if(u){var o=_r(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,h){if(h&&(Rn(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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",_({},{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)}}])&&Ps(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(Q),Fa=(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")})}),Io=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")},Do=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 Bo(l,n,p,i){try{switch(l.format){case"ipv4":Fa(n);break;case"ipv6":Io(n);break;case"hostname":Do(n)}return[]}catch(u){return[{path:p,property:"format",message:i(u.message)}]}}function Ri(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 No(l,n,p){return(n=Ii(n))in l?Object.defineProperty(l,n,{value:p,enumerable:!0,configurable:!0,writable:!0}):l[n]=p,l}function ti(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,h=!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(w){h=!0,s=w}finally{try{if(!c&&u.return!=null&&(e=u.return(),Object(e)!==e))return}finally{if(h)throw s}}return o}}(l,n)||ei(l,n)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
52
|
+
*/function*pa(x,d){if(x!==void 0){let f=0;for(const v of x)yield d(v,f++)}}var ac={exports:{}};/*! For license information please see jsoneditor.js.LICENSE.txt */(function(x,d){(function(f,v){x.exports=v()})(self,()=>(()=>{var f={9662:(m,j,r)=>{var y=r(614),b=r(6330),g=TypeError;m.exports=function(_){if(y(_))return _;throw g(b(_)+" is not a function")}},9483:(m,j,r)=>{var y=r(4411),b=r(6330),g=TypeError;m.exports=function(_){if(y(_))return _;throw g(b(_)+" is not a constructor")}},6077:(m,j,r)=>{var y=r(614),b=String,g=TypeError;m.exports=function(_){if(typeof _=="object"||y(_))return _;throw g("Can't set "+b(_)+" as a prototype")}},1223:(m,j,r)=>{var y=r(5112),b=r(30),g=r(3070).f,_=y("unscopables"),O=Array.prototype;O[_]==null&&g(O,_,{configurable:!0,value:b(null)}),m.exports=function(C){O[_][C]=!0}},1530:(m,j,r)=>{var y=r(8710).charAt;m.exports=function(b,g,_){return g+(_?y(b,g).length:1)}},5787:(m,j,r)=>{var y=r(7976),b=TypeError;m.exports=function(g,_){if(y(_,g))return g;throw b("Incorrect invocation")}},9670:(m,j,r)=>{var y=r(111),b=String,g=TypeError;m.exports=function(_){if(y(_))return _;throw g(b(_)+" 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),_=r(3411),O=r(7659),C=r(4411),E=r(6244),T=r(6135),L=r(4121),R=r(1246),I=Array;m.exports=function(N){var F=g(N),$=C(this),U=arguments.length,q=U>1?arguments[1]:void 0,B=q!==void 0;B&&(q=y(q,U>2?arguments[2]:void 0));var z,M,X,Y,Q,tt,it=R(F),st=0;if(!it||this===I&&O(it))for(z=E(F),M=$?new this(z):I(z);z>st;st++)tt=B?q(F[st],st):F[st],T(M,st,tt);else for(Q=(Y=L(F,it)).next,M=$?new this:[];!(X=b(Q,Y)).done;st++)tt=B?_(Y,q,[X.value,st],!0):X.value,T(M,st,tt);return M.length=st,M}},1318:(m,j,r)=>{var y=r(5656),b=r(1400),g=r(6244),_=function(O){return function(C,E,T){var L,R=y(C),I=g(R),N=b(T,I);if(O&&E!=E){for(;I>N;)if((L=R[N++])!=L)return!0}else for(;I>N;N++)if((O||N in R)&&R[N]===E)return O||N||0;return!O&&-1}};m.exports={includes:_(!0),indexOf:_(!1)}},2092:(m,j,r)=>{var y=r(9974),b=r(1702),g=r(8361),_=r(7908),O=r(6244),C=r(5417),E=b([].push),T=function(L){var R=L==1,I=L==2,N=L==3,F=L==4,$=L==6,U=L==7,q=L==5||$;return function(B,z,M,X){for(var Y,Q,tt=_(B),it=g(tt),st=y(z,M),mt=O(it),ct=0,Et=X||C,Tt=R?Et(B,mt):I||U?Et(B,0):void 0;mt>ct;ct++)if((q||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:E(Tt,Y)}else switch(L){case 4:return!1;case 7:E(Tt,Y)}return $?-1:N||F?F: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),_=b("species");m.exports=function(O){return g>=51||!y(function(){var C=[];return(C.constructor={})[_]=function(){return{foo:1}},C[O](Boolean).foo!==1})}},9341:(m,j,r)=>{var y=r(7293);m.exports=function(b,g){var _=[][b];return!!_&&y(function(){_.call(null,g||function(){return 1},1)})}},3671:(m,j,r)=>{var y=r(9662),b=r(7908),g=r(8361),_=r(6244),O=TypeError,C=function(E){return function(T,L,R,I){y(L);var N=b(T),F=g(N),$=_(N),U=E?$-1:0,q=E?-1:1;if(R<2)for(;;){if(U in F){I=F[U],U+=q;break}if(U+=q,E?U<0:$<=U)throw O("Reduce of empty array with no initial value")}for(;E?U>=0:$>U;U+=q)U in F&&(I=L(I,F[U],U,N));return I}};m.exports={left:C(!1),right:C(!0)}},3658:(m,j,r)=>{var y=r(9781),b=r(3157),g=TypeError,_=Object.getOwnPropertyDescriptor,O=y&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(C){return C instanceof TypeError}}();m.exports=O?function(C,E){if(b(C)&&!_(C,"length").writable)throw g("Cannot set read only .length");return C.length=E}:function(C,E){return C.length=E}},1589:(m,j,r)=>{var y=r(1400),b=r(6244),g=r(6135),_=Array,O=Math.max;m.exports=function(C,E,T){for(var L=b(C),R=y(E,L),I=y(T===void 0?L:T,L),N=_(O(I-R,0)),F=0;R<I;R++,F++)g(N,F,C[R]);return N.length=F,N}},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(C,E){var T=C.length,L=b(T/2);return T<8?_(C,E):O(C,g(y(C,0,L),E),g(y(C,L),E),E)},_=function(C,E){for(var T,L,R=C.length,I=1;I<R;){for(L=I,T=C[I];L&&E(C[L-1],T)>0;)C[L]=C[--L];L!==I++&&(C[L]=T)}return C},O=function(C,E,T,L){for(var R=E.length,I=T.length,N=0,F=0;N<R||F<I;)C[N+F]=N<R&&F<I?L(E[N],T[F])<=0?E[N++]:T[F++]:N<R?E[N++]:T[F++];return C};m.exports=g},7475:(m,j,r)=>{var y=r(3157),b=r(4411),g=r(111),_=r(5112)("species"),O=Array;m.exports=function(C){var E;return y(C)&&(E=C.constructor,(b(E)&&(E===O||y(E.prototype))||g(E)&&(E=E[_])===null)&&(E=void 0)),E===void 0?O:E}},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,_,O,C){try{return C?_(y(O)[0],O[1]):_(O)}catch(E){b(g,"throw",E)}}},7072:(m,j,r)=>{var y=r(5112)("iterator"),b=!1;try{var g=0,_={next:function(){return{done:!!g++}},return:function(){b=!0}};_[y]=function(){return this},Array.from(_,function(){throw 2})}catch{}m.exports=function(O,C){if(!C&&!b)return!1;var E=!1;try{var T={};T[y]=function(){return{next:function(){return{done:E=!0}}}},O(T)}catch{}return E}},4326:(m,j,r)=>{var y=r(1702),b=y({}.toString),g=y("".slice);m.exports=function(_){return g(b(_),8,-1)}},648:(m,j,r)=>{var y=r(1694),b=r(614),g=r(4326),_=r(5112)("toStringTag"),O=Object,C=g(function(){return arguments}())=="Arguments";m.exports=y?g:function(E){var T,L,R;return E===void 0?"Undefined":E===null?"Null":typeof(L=function(I,N){try{return I[N]}catch{}}(T=O(E),_))=="string"?L:C?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),_=r(3070);m.exports=function(O,C,E){for(var T=b(C),L=_.f,R=g.f,I=0;I<T.length;I++){var N=T[I];y(O,N)||E&&y(E,N)||L(O,N,R(C,N))}}},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(_,O,C){return b.f(_,O,g(1,C))}:function(_,O,C){return _[O]=C,_}},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(_,O,C){var E=y(O);E in _?b.f(_,E,g(0,C)):_[E]=C}},5573:(m,j,r)=>{var y=r(1702),b=r(7293),g=r(6650).start,_=RangeError,O=isFinite,C=Math.abs,E=Date.prototype,T=E.toISOString,L=y(E.getTime),R=y(E.getUTCDate),I=y(E.getUTCFullYear),N=y(E.getUTCHours),F=y(E.getUTCMilliseconds),$=y(E.getUTCMinutes),U=y(E.getUTCMonth),q=y(E.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 _("Invalid time value");var B=this,z=I(B),M=F(B),X=z<0?"-":z>9999?"+":"";return X+g(C(z),X?6:4,0)+"-"+g(U(B)+1,2,0)+"-"+g(R(B),2,0)+"T"+g(N(B),2,0)+":"+g($(B),2,0)+":"+g(q(B),2,0)+"."+g(M,3,0)+"Z"}:T},8709:(m,j,r)=>{var y=r(9670),b=r(2140),g=TypeError;m.exports=function(_){if(y(this),_==="string"||_==="default")_="string";else if(_!=="number")throw g("Incorrect hint");return b(this,_)}},7045:(m,j,r)=>{var y=r(6339),b=r(3070);m.exports=function(g,_,O){return O.get&&y(O.get,_,{getter:!0}),O.set&&y(O.set,_,{setter:!0}),b.f(g,_,O)}},8052:(m,j,r)=>{var y=r(614),b=r(3070),g=r(6339),_=r(3072);m.exports=function(O,C,E,T){T||(T={});var L=T.enumerable,R=T.name!==void 0?T.name:C;if(y(E)&&g(E,R,T),T.global)L?O[C]=E:_(C,E);else{try{T.unsafe?O[C]&&(L=!0):delete O[C]}catch{}L?O[C]=E:b.f(O,C,{value:E,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,_){try{b(y,g,{value:_,configurable:!0,writable:!0})}catch{y[g]=_}return _}},5117:(m,j,r)=>{var y=r(6330),b=TypeError;m.exports=function(g,_){if(!delete g[_])throw b("Cannot delete property "+y(_)+" 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,_=b(g)&&b(g.createElement);m.exports=function(O){return _?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),_=r(8113),O=g.process,C=g.Deno,E=O&&O.versions||C&&C.version,T=E&&E.v8;T&&(b=(y=T.split("."))[0]>0&&y[0]<4?1:+(y[0]+y[1])),!b&&_&&(!(y=_.match(/Edge\/(\d+)/))||y[1]>=74)&&(y=_.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),_=r(8052),O=r(3072),C=r(9920),E=r(4705);m.exports=function(T,L){var R,I,N,F,$,U=T.target,q=T.global,B=T.stat;if(R=q?y:B?y[U]||O(U,{}):(y[U]||{}).prototype)for(I in L){if(F=L[I],N=T.dontCallGetSet?($=b(R,I))&&$.value:R[I],!E(q?I:U+(B?".":"#")+I,T.forced)&&N!==void 0){if(typeof F==typeof N)continue;C(F,N)}(T.sham||N&&N.sham)&&g(F,"sham",!0),_(R,I,F,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),_=r(7293),O=r(5112),C=r(8880),E=O("species"),T=RegExp.prototype;m.exports=function(L,R,I,N){var F=O(L),$=!_(function(){var z={};return z[F]=function(){return 7},""[L](z)!=7}),U=$&&!_(function(){var z=!1,M=/a/;return L==="split"&&((M={}).constructor={},M.constructor[E]=function(){return M},M.flags="",M[F]=/./[F]),M.exec=function(){return z=!0,null},M[F](""),!z});if(!$||!U||I){var q=y(/./[F]),B=R(F,""[L],function(z,M,X,Y,Q){var tt=y(z),it=M.exec;return it===g||it===T.exec?$&&!Q?{done:!0,value:q(M,X,Y)}:{done:!0,value:tt(X,M,Y)}:{done:!1}});b(String.prototype,L,B[0]),b(T,F,B[1])}N&&C(T[F],"sham",!0)}},2104:(m,j,r)=>{var y=r(4374),b=Function.prototype,g=b.apply,_=b.call;m.exports=typeof Reflect=="object"&&Reflect.apply||(y?_.bind(g):function(){return _.apply(g,arguments)})},9974:(m,j,r)=>{var y=r(1470),b=r(9662),g=r(4374),_=y(y.bind);m.exports=function(O,C){return b(O),C===void 0?O:g?_(O,C):function(){return O.apply(C,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),_=r(2597),O=r(206),C=r(4374),E=Function,T=y([].concat),L=y([].join),R={},I=function(N,F,$){if(!_(R,F)){for(var U=[],q=0;q<F;q++)U[q]="a["+q+"]";R[F]=E("C,a","return new C("+L(U,",")+")")}return R[F](N,$)};m.exports=C?E.bind:function(N){var F=b(this),$=F.prototype,U=O(arguments,1),q=function(){var B=T(U,O(arguments));return this instanceof q?I(F,B.length,B):F.apply(N,B)};return g($)&&(q.prototype=$),q}},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,_=y&&Object.getOwnPropertyDescriptor,O=b(g,"name"),C=O&&(function(){}).name==="something",E=O&&(!y||y&&_(g,"name").configurable);m.exports={EXISTS:O,PROPER:C,CONFIGURABLE:E}},5668:(m,j,r)=>{var y=r(1702),b=r(9662);m.exports=function(g,_,O){try{return y(b(Object.getOwnPropertyDescriptor(g,_)[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,_=y&&b.bind.bind(g,g);m.exports=y?_:function(O){return function(){return g.apply(O,arguments)}}},5005:(m,j,r)=>{var y=r(7854),b=r(614),g=function(_){return b(_)?_:void 0};m.exports=function(_,O){return arguments.length<2?g(y[_]):y[_]&&y[_][O]}},1246:(m,j,r)=>{var y=r(648),b=r(8173),g=r(8554),_=r(7497),O=r(5112)("iterator");m.exports=function(C){if(!g(C))return b(C,O)||b(C,"@@iterator")||_[y(C)]}},4121:(m,j,r)=>{var y=r(6916),b=r(9662),g=r(9670),_=r(6330),O=r(1246),C=TypeError;m.exports=function(E,T){var L=arguments.length<2?O(E):T;if(b(L))return g(y(L,E));throw C(_(E)+" is not iterable")}},8044:(m,j,r)=>{var y=r(1702),b=r(3157),g=r(614),_=r(4326),O=r(1340),C=y([].push);m.exports=function(E){if(g(E))return E;if(b(E)){for(var T=E.length,L=[],R=0;R<T;R++){var I=E[R];typeof I=="string"?C(L,I):typeof I!="number"&&_(I)!="Number"&&_(I)!="String"||C(L,O(I))}var N=L.length,F=!0;return function($,U){if(F)return F=!1,U;if(b(this))return U;for(var q=0;q<N;q++)if(L[q]===$)return U}}}},8173:(m,j,r)=>{var y=r(9662),b=r(8554);m.exports=function(g,_){var O=g[_];return b(O)?void 0:y(O)}},647:(m,j,r)=>{var y=r(1702),b=r(7908),g=Math.floor,_=y("".charAt),O=y("".replace),C=y("".slice),E=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,T=/\$([$&'`]|\d{1,2})/g;m.exports=function(L,R,I,N,F,$){var U=I+L.length,q=N.length,B=T;return F!==void 0&&(F=b(F),B=E),O($,B,function(z,M){var X;switch(_(M,0)){case"$":return"$";case"&":return L;case"`":return C(R,0,I);case"'":return C(R,U);case"<":X=F[C(M,1,-1)];break;default:var Y=+M;if(Y===0)return z;if(Y>q){var Q=g(Y/10);return Q===0?z:Q<=q?N[Q-1]===void 0?_(M,1):N[Q-1]+_(M,1):z}X=N[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(_,O){return g(b(_),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),_=Object,O=y("".split);m.exports=b(function(){return!_("z").propertyIsEnumerable(0)})?function(C){return g(C)=="String"?O(C,""):_(C)}:_},9587:(m,j,r)=>{var y=r(614),b=r(111),g=r(7674);m.exports=function(_,O,C){var E,T;return g&&y(E=O.constructor)&&E!==C&&b(T=E.prototype)&&T!==C.prototype&&g(_,T),_}},2788:(m,j,r)=>{var y=r(1702),b=r(614),g=r(5465),_=y(Function.toString);b(g.inspectSource)||(g.inspectSource=function(O){return _(O)}),m.exports=g.inspectSource},9909:(m,j,r)=>{var y,b,g,_=r(4811),O=r(7854),C=r(111),E=r(8880),T=r(2597),L=r(5465),R=r(6200),I=r(3501),N="Object already initialized",F=O.TypeError,$=O.WeakMap;if(_||L.state){var U=L.state||(L.state=new $);U.get=U.get,U.has=U.has,U.set=U.set,y=function(B,z){if(U.has(B))throw F(N);return z.facade=B,U.set(B,z),z},b=function(B){return U.get(B)||{}},g=function(B){return U.has(B)}}else{var q=R("state");I[q]=!0,y=function(B,z){if(T(B,q))throw F(N);return z.facade=B,E(B,q,z),z},b=function(B){return T(B,q)?B[q]:{}},g=function(B){return T(B,q)}}m.exports={set:y,get:b,has:g,enforce:function(B){return g(B)?b(B):y(B,{})},getterFor:function(B){return function(z){var M;if(!C(z)||(M=b(z)).type!==B)throw F("Incompatible receiver, "+B+" required");return M}}}},7659:(m,j,r)=>{var y=r(5112),b=r(7497),g=y("iterator"),_=Array.prototype;m.exports=function(O){return O!==void 0&&(b.Array===O||_[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),_=r(648),O=r(5005),C=r(2788),E=function(){},T=[],L=O("Reflect","construct"),R=/^\s*(?:class|function)\b/,I=y(R.exec),N=!R.exec(E),F=function(U){if(!g(U))return!1;try{return L(E,T,U),!0}catch{return!1}},$=function(U){if(!g(U))return!1;switch(_(U)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return N||!!I(R,C(U))}catch{return!0}};$.sham=!0,m.exports=!L||b(function(){var U;return F(F.call)||!F(Object)||!F(function(){U=!0})||U})?$:F},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\./,_=function(L,R){var I=C[O(L)];return I==T||I!=E&&(b(R)?y(R):!!R)},O=_.normalize=function(L){return String(L).replace(g,".").toLowerCase()},C=_.data={},E=_.NATIVE="N",T=_.POLYFILL="P";m.exports=_},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(_){return typeof _=="object"?_!==null:y(_)||_===g}:function(_){return typeof _=="object"?_!==null:y(_)}},1913:m=>{m.exports=!1},7850:(m,j,r)=>{var y=r(111),b=r(4326),g=r(5112)("match");m.exports=function(_){var O;return y(_)&&((O=_[g])!==void 0?!!O:b(_)=="RegExp")}},2190:(m,j,r)=>{var y=r(5005),b=r(614),g=r(7976),_=r(3307),O=Object;m.exports=_?function(C){return typeof C=="symbol"}:function(C){var E=y("Symbol");return b(E)&&g(E.prototype,O(C))}},408:(m,j,r)=>{var y=r(9974),b=r(6916),g=r(9670),_=r(6330),O=r(7659),C=r(6244),E=r(7976),T=r(4121),L=r(1246),R=r(9212),I=TypeError,N=function($,U){this.stopped=$,this.result=U},F=N.prototype;m.exports=function($,U,q){var B,z,M,X,Y,Q,tt,it=q&&q.that,st=!(!q||!q.AS_ENTRIES),mt=!(!q||!q.IS_RECORD),ct=!(!q||!q.IS_ITERATOR),Et=!(!q||!q.INTERRUPTED),Tt=y(U,it),Ht=function(wt){return B&&R(B,"normal",wt),new N(!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)B=$.iterator;else if(ct)B=$;else{if(!(z=L($)))throw I(_($)+" is not iterable");if(O(z)){for(M=0,X=C($);X>M;M++)if((Y=lt($[M]))&&E(F,Y))return Y;return new N(!1)}B=T($,z)}for(Q=mt?$.next:B.next;!(tt=b(Q,B)).done;){try{Y=lt(tt.value)}catch(wt){R(B,"throw",wt)}if(typeof Y=="object"&&Y&&E(F,Y))return Y}return new N(!1)}},9212:(m,j,r)=>{var y=r(6916),b=r(9670),g=r(8173);m.exports=function(_,O,C){var E,T;b(_);try{if(!(E=g(_,"return"))){if(O==="throw")throw C;return C}E=y(E,_)}catch(L){T=!0,E=L}if(O==="throw")throw C;if(T)throw E;return b(E),C}},3061:(m,j,r)=>{var y=r(3383).IteratorPrototype,b=r(30),g=r(9114),_=r(8003),O=r(7497),C=function(){return this};m.exports=function(E,T,L,R){var I=T+" Iterator";return E.prototype=b(y,{next:g(+!R,L)}),_(E,I,!1,!0),O[I]=C,E}},1656:(m,j,r)=>{var y=r(2109),b=r(6916),g=r(1913),_=r(6530),O=r(614),C=r(3061),E=r(9518),T=r(7674),L=r(8003),R=r(8880),I=r(8052),N=r(5112),F=r(7497),$=r(3383),U=_.PROPER,q=_.CONFIGURABLE,B=$.IteratorPrototype,z=$.BUGGY_SAFARI_ITERATORS,M=N("iterator"),X="keys",Y="values",Q="entries",tt=function(){return this};m.exports=function(it,st,mt,ct,Et,Tt,Ht){C(mt,st,ct);var lt,wt,_t,zt=function(xt){if(xt===Et&&Rt)return Rt;if(!z&&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[M]||St["@@iterator"]||Et&&St[Et],Rt=!z&&jt||zt(Et),qt=st=="Array"&&St.entries||jt;if(qt&&(lt=E(qt.call(new it)))!==Object.prototype&<.next&&(g||E(lt)===B||(T?T(lt,B):O(lt[M])||I(lt,M,tt)),L(lt,Xt,!0,!0),g&&(F[Xt]=tt)),U&&Et==Y&&jt&&jt.name!==Y&&(!g&&q?R(St,"name",Y):(ce=!0,Rt=function(){return b(jt,this)})),Et)if(wt={values:zt(Y),keys:Tt?Rt:zt(X),entries:zt(Q)},Ht)for(_t in wt)(z||ce||!(_t in St))&&I(St,_t,wt[_t]);else y({target:st,proto:!0,forced:z||ce},wt);return g&&!Ht||St[M]===Rt||I(St,M,Rt,{name:Et}),F[st]=Rt,wt}},3383:(m,j,r)=>{var y,b,g,_=r(7293),O=r(614),C=r(111),E=r(30),T=r(9518),L=r(8052),R=r(5112),I=r(1913),N=R("iterator"),F=!1;[].keys&&("next"in(g=[].keys())?(b=T(T(g)))!==Object.prototype&&(y=b):F=!0),!C(y)||_(function(){var $={};return y[N].call($)!==$})?y={}:I&&(y=E(y)),O(y[N])||L(y,N,function(){return this}),m.exports={IteratorPrototype:y,BUGGY_SAFARI_ITERATORS:F}},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),_=r(2597),O=r(9781),C=r(6530).CONFIGURABLE,E=r(2788),T=r(9909),L=T.enforce,R=T.get,I=String,N=Object.defineProperty,F=y("".slice),$=y("".replace),U=y([].join),q=O&&!b(function(){return N(function(){},"length",{value:8}).length!==8}),B=String(String).split("String"),z=m.exports=function(M,X,Y){F(I(X),0,7)==="Symbol("&&(X="["+$(I(X),/^Symbol\(([^)]*)\)/,"$1")+"]"),Y&&Y.getter&&(X="get "+X),Y&&Y.setter&&(X="set "+X),(!_(M,"name")||C&&M.name!==X)&&(O?N(M,"name",{value:X,configurable:!0}):M.name=X),q&&Y&&_(Y,"arity")&&M.length!==Y.arity&&N(M,"length",{value:Y.arity});try{Y&&_(Y,"constructor")&&Y.constructor?O&&N(M,"prototype",{writable:!1}):M.prototype&&(M.prototype=void 0)}catch{}var Q=L(M);return _(Q,"source")||(Q.source=U(B,typeof X=="string"?X:"")),M};Function.prototype.toString=z(function(){return g(this)&&R(this).source||E(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,_,O,C=r(7854),E=r(9974),T=r(1236).f,L=r(261).set,R=r(8572),I=r(8334),N=r(1528),F=r(1036),$=r(5268),U=C.MutationObserver||C.WebKitMutationObserver,q=C.document,B=C.process,z=C.Promise,M=T(C,"queueMicrotask"),X=M&&M.value;if(!X){var Y=new R,Q=function(){var tt,it;for($&&(tt=B.domain)&&tt.exit();it=Y.get();)try{it()}catch(st){throw Y.head&&y(),st}tt&&tt.enter()};I||$||F||!U||!q?!N&&z&&z.resolve?((_=z.resolve(void 0)).constructor=z,O=E(_.then,_),y=function(){O(Q)}):$?y=function(){B.nextTick(Q)}:(L=E(L,C),y=function(){L(Q)}):(b=!0,g=q.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(_){var O,C;this.promise=new _(function(E,T){if(O!==void 0||C!==void 0)throw b("Bad Promise constructor");O=E,C=T}),this.resolve=y(O),this.reject=y(C)};m.exports.f=function(_){return new g(_)}},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),_=r(1340),O=r(3111).trim,C=r(1361),E=g("".charAt),T=y.parseFloat,L=y.Symbol,R=L&&L.iterator,I=1/T(C+"-0")!=-1/0||R&&!b(function(){T(Object(R))});m.exports=I?function(N){var F=O(_(N)),$=T(F);return $===0&&E(F,0)=="-"?-0:$}:T},3009:(m,j,r)=>{var y=r(7854),b=r(7293),g=r(1702),_=r(1340),O=r(3111).trim,C=r(1361),E=y.parseInt,T=y.Symbol,L=T&&T.iterator,R=/^[+-]?0x/i,I=g(R.exec),N=E(C+"08")!==8||E(C+"0x16")!==22||L&&!b(function(){E(Object(L))});m.exports=N?function(F,$){var U=O(_(F));return E(U,$>>>0||(I(R,U)?16:10))}:E},1574:(m,j,r)=>{var y=r(9781),b=r(1702),g=r(6916),_=r(7293),O=r(1956),C=r(5181),E=r(5296),T=r(7908),L=r(8361),R=Object.assign,I=Object.defineProperty,N=b([].concat);m.exports=!R||_(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 F={},$={},U=Symbol(),q="abcdefghijklmnopqrst";return F[U]=7,q.split("").forEach(function(B){$[B]=B}),R({},F)[U]!=7||O(R({},$)).join("")!=q})?function(F,$){for(var U=T(F),q=arguments.length,B=1,z=C.f,M=E.f;q>B;)for(var X,Y=L(arguments[B++]),Q=z?N(O(Y),z(Y)):O(Y),tt=Q.length,it=0;tt>it;)X=Q[it++],y&&!g(M,Y,X)||(U[X]=Y[X]);return U}:R},30:(m,j,r)=>{var y,b=r(9670),g=r(6048),_=r(748),O=r(3501),C=r(490),E=r(317),T=r(6200),L="prototype",R="script",I=T("IE_PROTO"),N=function(){},F=function(q){return"<"+R+">"+q+"</"+R+">"},$=function(q){q.write(F("")),q.close();var B=q.parentWindow.Object;return q=null,B},U=function(){try{y=new ActiveXObject("htmlfile")}catch{}var q,B,z;U=typeof document<"u"?document.domain&&y?$(y):(B=E("iframe"),z="java"+R+":",B.style.display="none",C.appendChild(B),B.src=String(z),(q=B.contentWindow.document).open(),q.write(F("document.F=Object")),q.close(),q.F):$(y);for(var M=_.length;M--;)delete U[L][_[M]];return U()};O[I]=!0,m.exports=Object.create||function(q,B){var z;return q!==null?(N[L]=b(q),z=new N,N[L]=null,z[I]=q):z=U(),B===void 0?z:g.f(z,B)}},6048:(m,j,r)=>{var y=r(9781),b=r(3353),g=r(3070),_=r(9670),O=r(5656),C=r(1956);j.f=y&&!b?Object.defineProperties:function(E,T){_(E);for(var L,R=O(T),I=C(T),N=I.length,F=0;N>F;)g.f(E,L=I[F++],R[L]);return E}},3070:(m,j,r)=>{var y=r(9781),b=r(4664),g=r(3353),_=r(9670),O=r(4948),C=TypeError,E=Object.defineProperty,T=Object.getOwnPropertyDescriptor,L="enumerable",R="configurable",I="writable";j.f=y?g?function(N,F,$){if(_(N),F=O(F),_($),typeof N=="function"&&F==="prototype"&&"value"in $&&I in $&&!$[I]){var U=T(N,F);U&&U[I]&&(N[F]=$.value,$={configurable:R in $?$[R]:U[R],enumerable:L in $?$[L]:U[L],writable:!1})}return E(N,F,$)}:E:function(N,F,$){if(_(N),F=O(F),_($),b)try{return E(N,F,$)}catch{}if("get"in $||"set"in $)throw C("Accessors not supported");return"value"in $&&(N[F]=$.value),N}},1236:(m,j,r)=>{var y=r(9781),b=r(6916),g=r(5296),_=r(9114),O=r(5656),C=r(4948),E=r(2597),T=r(4664),L=Object.getOwnPropertyDescriptor;j.f=y?L:function(R,I){if(R=O(R),I=C(I),T)try{return L(R,I)}catch{}if(E(R,I))return _(!b(g.f,R,I),R[I])}},1156:(m,j,r)=>{var y=r(4326),b=r(5656),g=r(8006).f,_=r(1589),O=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];m.exports.f=function(C){return O&&y(C)=="Window"?function(E){try{return g(E)}catch{return _(O)}}(C):g(b(C))}},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),_=r(6200),O=r(8544),C=_("IE_PROTO"),E=Object,T=E.prototype;m.exports=O?E.getPrototypeOf:function(L){var R=g(L);if(y(R,C))return R[C];var I=R.constructor;return b(I)&&R instanceof I?I.prototype:R instanceof E?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),_=r(1318).indexOf,O=r(3501),C=y([].push);m.exports=function(E,T){var L,R=g(E),I=0,N=[];for(L in R)!b(O,L)&&b(R,L)&&C(N,L);for(;T.length>I;)b(R,L=T[I++])&&(~_(N,L)||C(N,L));return N}},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 _=y(this,g);return!!_&&_.enumerable}:r},7674:(m,j,r)=>{var y=r(5668),b=r(9670),g=r(6077);m.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var _,O=!1,C={};try{(_=y(Object.prototype,"__proto__","set"))(C,[]),O=C instanceof Array}catch{}return function(E,T){return b(E),g(T),O?_(E,T):E.__proto__=T,E}}():void 0)},4699:(m,j,r)=>{var y=r(9781),b=r(1702),g=r(1956),_=r(5656),O=b(r(5296).f),C=b([].push),E=function(T){return function(L){for(var R,I=_(L),N=g(I),F=N.length,$=0,U=[];F>$;)R=N[$++],y&&!O(I,R)||C(U,T?[R,I[R]]:I[R]);return U}};m.exports={entries:E(!0),values:E(!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),_=TypeError;m.exports=function(O,C){var E,T;if(C==="string"&&b(E=O.toString)&&!g(T=y(E,O))||b(E=O.valueOf)&&!g(T=y(E,O))||C!=="string"&&b(E=O.toString)&&!g(T=y(E,O)))return T;throw _("Can't convert object to primitive value")}},3887:(m,j,r)=>{var y=r(5005),b=r(1702),g=r(8006),_=r(5181),O=r(9670),C=b([].concat);m.exports=y("Reflect","ownKeys")||function(E){var T=g.f(O(E)),L=_.f;return L?C(T,L(E)):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),_=r(4705),O=r(2788),C=r(5112),E=r(7871),T=r(3823),L=r(1913),R=r(7392),I=b&&b.prototype,N=C("species"),F=!1,$=g(y.PromiseRejectionEvent),U=_("Promise",function(){var q=O(b),B=q!==String(b);if(!B&&R===66||L&&(!I.catch||!I.finally))return!0;if(!R||R<51||!/native code/.test(q)){var z=new b(function(X){X(1)}),M=function(X){X(function(){},function(){})};if((z.constructor={})[N]=M,!(F=z.then(function(){})instanceof M))return!0}return!B&&(E||T)&&!$});m.exports={CONSTRUCTOR:U,REJECTION_EVENT:$,SUBCLASSING:F}},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(_,O){if(y(_),b(O)&&O.constructor===_)return O;var C=g.f(_);return(0,C.resolve)(O),C.promise}},612:(m,j,r)=>{var y=r(2492),b=r(7072),g=r(3702).CONSTRUCTOR;m.exports=g||!b(function(_){y.all(_).then(void 0,function(){})})},2626:(m,j,r)=>{var y=r(3070).f;m.exports=function(b,g,_){_ in b||y(b,_,{configurable:!0,get:function(){return g[_]},set:function(O){g[_]=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),_=r(4326),O=r(2261),C=TypeError;m.exports=function(E,T){var L=E.exec;if(g(L)){var R=y(L,E,T);return R!==null&&b(R),R}if(_(E)==="RegExp")return y(O,E,T);throw C("RegExp#exec called on incompatible receiver")}},2261:(m,j,r)=>{var y,b,g=r(6916),_=r(1702),O=r(1340),C=r(7066),E=r(2999),T=r(2309),L=r(30),R=r(9909).get,I=r(9441),N=r(7168),F=T("native-string-replace",String.prototype.replace),$=RegExp.prototype.exec,U=$,q=_("".charAt),B=_("".indexOf),z=_("".replace),M=_("".slice),X=(b=/b*/g,g($,y=/a/,"a"),g($,b,"a"),y.lastIndex!==0||b.lastIndex!==0),Y=E.BROKEN_CARET,Q=/()??/.exec("")[1]!==void 0;(X||Q||Y||I||N)&&(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(C,lt),jt=lt.source,Rt=0,qt=_t;if(ce&&(St=z(St,"y",""),B(St,"g")===-1&&(St+="g"),qt=M(_t,lt.lastIndex),lt.lastIndex>0&&(!lt.multiline||lt.multiline&&q(_t,lt.lastIndex-1)!==`
|
|
53
|
+
`)&&(jt="(?: "+jt+")",qt=" "+qt,Rt++),st=new RegExp("^(?:"+jt+")",St)),Q&&(st=new RegExp("^"+jt+"$(?!\\s)",St)),X&&(mt=lt.lastIndex),ct=g($,ce?st:lt,qt),ce?ct?(ct.input=M(ct.input,Rt),ct[0]=M(ct[0],Rt),ct.index=lt.lastIndex,lt.lastIndex+=ct[0].length):lt.lastIndex=0:X&&ct&&(lt.lastIndex=lt.global?ct.index+ct[0].length:mt),Q&&ct&&ct.length>1&&g(F,ct[0],st,function(){for(Et=1;Et<arguments.length-2;Et++)arguments[Et]===void 0&&(ct[Et]=void 0)}),ct&&Xt)for(ct.groups=Tt=L(null),Et=0;Et<Xt.length;Et++)Tt[(Ht=Xt[Et])[0]]=ct[Ht[1]];return ct}),m.exports=U},7066:(m,j,r)=>{var y=r(9670);m.exports=function(){var b=y(this),g="";return b.hasIndices&&(g+="d"),b.global&&(g+="g"),b.ignoreCase&&(g+="i"),b.multiline&&(g+="m"),b.dotAll&&(g+="s"),b.unicode&&(g+="u"),b.unicodeSets&&(g+="v"),b.sticky&&(g+="y"),g}},4706:(m,j,r)=>{var y=r(6916),b=r(2597),g=r(7976),_=r(7066),O=RegExp.prototype;m.exports=function(C){var E=C.flags;return E!==void 0||"flags"in O||b(C,"flags")||!g(O,C)?E:y(_,C)}},2999:(m,j,r)=>{var y=r(7293),b=r(7854).RegExp,g=y(function(){var C=b("a","y");return C.lastIndex=2,C.exec("abcd")!=null}),_=g||y(function(){return!b("a","y").sticky}),O=g||y(function(){var C=b("^r","gy");return C.lastIndex=2,C.exec("str")!=null});m.exports={BROKEN_CARET:O,MISSED_STICKY:_,UNSUPPORTED_Y:g}},9441:(m,j,r)=>{var y=r(7293),b=r(7854).RegExp;m.exports=y(function(){var g=b(".","s");return!(g.dotAll&&g.exec(`
|
|
54
|
+
`)&&g.flags==="s")})},7168:(m,j,r)=>{var y=r(7293),b=r(7854).RegExp;m.exports=y(function(){var g=b("(?<a>b)","g");return g.exec("b").groups.a!=="b"||"b".replace(g,"$<a>c")!=="bc"})},4488:(m,j,r)=>{var y=r(8554),b=TypeError;m.exports=function(g){if(y(g))throw b("Can't call method on "+g);return g}},7152:(m,j,r)=>{var y,b=r(7854),g=r(2104),_=r(614),O=r(9363),C=r(8113),E=r(206),T=r(8053),L=b.Function,R=/MSIE .\./.test(C)||O&&((y=b.Bun.version.split(".")).length<3||y[0]==0&&(y[1]<3||y[1]==3&&y[2]==0));m.exports=function(I,N){var F=N?2:1;return R?function($,U){var q=T(arguments.length,1)>F,B=_($)?$:L($),z=q?E(arguments,F):[],M=q?function(){g(B,this,z)}:B;return N?I(M,U):I(M)}:I}},6340:(m,j,r)=>{var y=r(5005),b=r(7045),g=r(5112),_=r(9781),O=g("species");m.exports=function(C){var E=y(C);_&&E&&!E[O]&&b(E,O,{configurable:!0,get:function(){return this}})}},8003:(m,j,r)=>{var y=r(3070).f,b=r(2597),g=r(5112)("toStringTag");m.exports=function(_,O,C){_&&!C&&(_=_.prototype),_&&!b(_,g)&&y(_,g,{configurable:!0,value:O})}},6200:(m,j,r)=>{var y=r(2309),b=r(9711),g=y("keys");m.exports=function(_){return g[_]||(g[_]=b(_))}},5465:(m,j,r)=>{var y=r(7854),b=r(3072),g="__core-js_shared__",_=y[g]||b(g,{});m.exports=_},2309:(m,j,r)=>{var y=r(1913),b=r(5465);(m.exports=function(g,_){return b[g]||(b[g]=_!==void 0?_:{})})("versions",[]).push({version:"3.29.0",mode:y?"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,j,r)=>{var y=r(9670),b=r(9483),g=r(8554),_=r(5112)("species");m.exports=function(O,C){var E,T=y(O).constructor;return T===void 0||g(E=y(T)[_])?C:b(E)}},8710:(m,j,r)=>{var y=r(1702),b=r(9303),g=r(1340),_=r(4488),O=y("".charAt),C=y("".charCodeAt),E=y("".slice),T=function(L){return function(R,I){var N,F,$=g(_(R)),U=b(I),q=$.length;return U<0||U>=q?L?"":void 0:(N=C($,U))<55296||N>56319||U+1===q||(F=C($,U+1))<56320||F>57343?L?O($,U):N:L?E($,U,U+2):F-56320+(N-55296<<10)+65536}};m.exports={codeAt:T(!1),charAt:T(!0)}},6650:(m,j,r)=>{var y=r(1702),b=r(7466),g=r(1340),_=r(8415),O=r(4488),C=y(_),E=y("".slice),T=Math.ceil,L=function(R){return function(I,N,F){var $,U,q=g(O(I)),B=b(N),z=q.length,M=F===void 0?" ":g(F);return B<=z||M==""?q:((U=C(M,T(($=B-z)/M.length))).length>$&&(U=E(U,0,$)),R?q+U:U+q)}};m.exports={start:L(!1),end:L(!0)}},8415:(m,j,r)=>{var y=r(9303),b=r(1340),g=r(4488),_=RangeError;m.exports=function(O){var C=b(g(this)),E="",T=y(O);if(T<0||T==1/0)throw _("Wrong number of repetitions");for(;T>0;(T>>>=1)&&(C+=C))1&T&&(E+=C);return E}},6091:(m,j,r)=>{var y=r(6530).PROPER,b=r(7293),g=r(1361);m.exports=function(_){return b(function(){return!!g[_]()||"
"[_]()!=="
"||y&&g[_].name!==_})}},3111:(m,j,r)=>{var y=r(1702),b=r(4488),g=r(1340),_=r(1361),O=y("".replace),C=RegExp("^["+_+"]+"),E=RegExp("(^|[^"+_+"])["+_+"]+$"),T=function(L){return function(R){var I=g(b(R));return 1&L&&(I=O(I,C,"")),2&L&&(I=O(I,E,"$1")),I}};m.exports={start:T(1),end:T(2),trim:T(3)}},6293:(m,j,r)=>{var y=r(7392),b=r(7293);m.exports=!!Object.getOwnPropertySymbols&&!b(function(){var g=Symbol();return!String(g)||!(Object(g)instanceof Symbol)||!Symbol.sham&&y&&y<41})},6532:(m,j,r)=>{var y=r(6916),b=r(5005),g=r(5112),_=r(8052);m.exports=function(){var O=b("Symbol"),C=O&&O.prototype,E=C&&C.valueOf,T=g("toPrimitive");C&&!C[T]&&_(C,T,function(L){return y(E,this)},{arity:1})}},2015:(m,j,r)=>{var y=r(6293);m.exports=y&&!!Symbol.for&&!!Symbol.keyFor},261:(m,j,r)=>{var y,b,g,_,O=r(7854),C=r(2104),E=r(9974),T=r(614),L=r(2597),R=r(7293),I=r(490),N=r(206),F=r(317),$=r(8053),U=r(8334),q=r(5268),B=O.setImmediate,z=O.clearImmediate,M=O.process,X=O.Dispatch,Y=O.Function,Q=O.MessageChannel,tt=O.String,it=0,st={},mt="onreadystatechange";R(function(){y=O.location});var ct=function(lt){if(L(st,lt)){var wt=st[lt];delete st[lt],wt()}},Et=function(lt){return function(){ct(lt)}},Tt=function(lt){ct(lt.data)},Ht=function(lt){O.postMessage(tt(lt),y.protocol+"//"+y.host)};B&&z||(B=function(lt){$(arguments.length,1);var wt=T(lt)?lt:Y(lt),_t=N(arguments,1);return st[++it]=function(){C(wt,void 0,_t)},b(it),it},z=function(lt){delete st[lt]},q?b=function(lt){M.nextTick(Et(lt))}:X&&X.now?b=function(lt){X.now(Et(lt))}:Q&&!U?(_=(g=new Q).port2,g.port1.onmessage=Tt,b=E(_.postMessage,_)):O.addEventListener&&T(O.postMessage)&&!O.importScripts&&y&&y.protocol!=="file:"&&!R(Ht)?(b=Ht,O.addEventListener("message",Tt,!1)):b=mt in F("script")?function(lt){I.appendChild(F("script"))[mt]=function(){I.removeChild(this),ct(lt)}}:function(lt){setTimeout(Et(lt),0)}),m.exports={set:B,clear:z}},863:(m,j,r)=>{var y=r(1702);m.exports=y(1 .valueOf)},1400:(m,j,r)=>{var y=r(9303),b=Math.max,g=Math.min;m.exports=function(_,O){var C=y(_);return C<0?b(C+O,0):g(C,O)}},5656:(m,j,r)=>{var y=r(8361),b=r(4488);m.exports=function(g){return y(b(g))}},9303:(m,j,r)=>{var y=r(4758);m.exports=function(b){var g=+b;return g!=g||g===0?0:y(g)}},7466:(m,j,r)=>{var y=r(9303),b=Math.min;m.exports=function(g){return g>0?b(y(g),9007199254740991):0}},7908:(m,j,r)=>{var y=r(4488),b=Object;m.exports=function(g){return b(y(g))}},7593:(m,j,r)=>{var y=r(6916),b=r(111),g=r(2190),_=r(8173),O=r(2140),C=r(5112),E=TypeError,T=C("toPrimitive");m.exports=function(L,R){if(!b(L)||g(L))return L;var I,N=_(L,T);if(N){if(R===void 0&&(R="default"),I=y(N,L,R),!b(I)||g(I))return I;throw E("Can't convert object to primitive value")}return R===void 0&&(R="number"),O(L,R)}},4948:(m,j,r)=>{var y=r(7593),b=r(2190);m.exports=function(g){var _=y(g,"string");return b(_)?_:_+""}},1694:(m,j,r)=>{var y={};y[r(5112)("toStringTag")]="z",m.exports=String(y)==="[object z]"},1340:(m,j,r)=>{var y=r(648),b=String;m.exports=function(g){if(y(g)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return b(g)}},6330:m=>{var j=String;m.exports=function(r){try{return j(r)}catch{return"Object"}}},9711:(m,j,r)=>{var y=r(1702),b=0,g=Math.random(),_=y(1 .toString);m.exports=function(O){return"Symbol("+(O===void 0?"":O)+")_"+_(++b+g,36)}},3307:(m,j,r)=>{var y=r(6293);m.exports=y&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},3353:(m,j,r)=>{var y=r(9781),b=r(7293);m.exports=y&&b(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42})},8053:m=>{var j=TypeError;m.exports=function(r,y){if(r<y)throw j("Not enough arguments");return r}},4811:(m,j,r)=>{var y=r(7854),b=r(614),g=y.WeakMap;m.exports=b(g)&&/native code/.test(String(g))},6800:(m,j,r)=>{var y=r(857),b=r(2597),g=r(6061),_=r(3070).f;m.exports=function(O){var C=y.Symbol||(y.Symbol={});b(C,O)||_(C,O,{value:g.f(O)})}},6061:(m,j,r)=>{var y=r(5112);j.f=y},5112:(m,j,r)=>{var y=r(7854),b=r(2309),g=r(2597),_=r(9711),O=r(6293),C=r(3307),E=y.Symbol,T=b("wks"),L=C?E.for||E:E&&E.withoutSetter||_;m.exports=function(R){return g(T,R)||(T[R]=O&&g(E,R)?E[R]:L("Symbol."+R)),T[R]}},1361:m=>{m.exports=`
|
|
55
|
+
\v\f\r \u2028\u2029\uFEFF`},2222:(m,j,r)=>{var y=r(2109),b=r(7293),g=r(3157),_=r(111),O=r(7908),C=r(6244),E=r(7207),T=r(6135),L=r(5417),R=r(1194),I=r(5112),N=r(7392),F=I("isConcatSpreadable"),$=N>=51||!b(function(){var q=[];return q[F]=!1,q.concat()[0]!==q}),U=function(q){if(!_(q))return!1;var B=q[F];return B!==void 0?!!B:g(q)};y({target:"Array",proto:!0,arity:1,forced:!$||!R("concat")},{concat:function(q){var B,z,M,X,Y,Q=O(this),tt=L(Q,0),it=0;for(B=-1,M=arguments.length;B<M;B++)if(U(Y=B===-1?Q:arguments[B]))for(X=C(Y),E(it+X),z=0;z<X;z++,it++)z in Y&&T(tt,it,Y[z]);else E(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),_="find",O=!0;_ in[]&&Array(1)[_](function(){O=!1}),y({target:"Array",proto:!0,forced:O},{find:function(C){return b(this,C,arguments.length>1?arguments[1]:void 0)}}),g(_)},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),_=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)}}),_("includes")},2772:(m,j,r)=>{var y=r(2109),b=r(1470),g=r(1318).indexOf,_=r(9341),O=b([].indexOf),C=!!O&&1/O([1],1,-0)<0;y({target:"Array",proto:!0,forced:C||!_("indexOf")},{indexOf:function(E){var T=arguments.length>1?arguments[1]:void 0;return C?O(this,E,T)||0:g(this,E,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),_=r(9909),O=r(3070).f,C=r(1656),E=r(6178),T=r(1913),L=r(9781),R="Array Iterator",I=_.set,N=_.getterFor(R);m.exports=C(Array,"Array",function($,U){I(this,{type:R,target:y($),index:0,kind:U})},function(){var $=N(this),U=$.target,q=$.kind,B=$.index++;return!U||B>=U.length?($.target=void 0,E(void 0,!0)):E(q=="keys"?B:q=="values"?U[B]:[B,U[B]],!1)},"values");var F=g.Arguments=g.Array;if(b("keys"),b("values"),b("entries"),!T&&L&&F.name!=="values")try{O(F,"name",{value:"values"})}catch{}},9600:(m,j,r)=>{var y=r(2109),b=r(1702),g=r(8361),_=r(5656),O=r(9341),C=b([].join);y({target:"Array",proto:!0,forced:g!=Object||!O("join",",")},{join:function(E){return C(_(this),E===void 0?",":E)}})},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),_=r(7392);y({target:"Array",proto:!0,forced:!r(5268)&&_>79&&_<83||!g("reduce")},{reduce:function(O){var C=arguments.length;return b(this,O,C,C>1?arguments[1]:void 0)}})},5069:(m,j,r)=>{var y=r(2109),b=r(1702),g=r(3157),_=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),_(this)}})},7042:(m,j,r)=>{var y=r(2109),b=r(3157),g=r(4411),_=r(111),O=r(1400),C=r(6244),E=r(5656),T=r(6135),L=r(5112),R=r(1194),I=r(206),N=R("slice"),F=L("species"),$=Array,U=Math.max;y({target:"Array",proto:!0,forced:!N},{slice:function(q,B){var z,M,X,Y=E(this),Q=C(Y),tt=O(q,Q),it=O(B===void 0?Q:B,Q);if(b(Y)&&(z=Y.constructor,(g(z)&&(z===$||b(z.prototype))||_(z)&&(z=z[F])===null)&&(z=void 0),z===$||z===void 0))return I(Y,tt,it);for(M=new(z===void 0?$:z)(U(it-tt,0)),X=0;tt<it;tt++,X++)tt in Y&&T(M,X,Y[tt]);return M.length=X,M}})},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),_=r(7908),O=r(6244),C=r(5117),E=r(1340),T=r(7293),L=r(4362),R=r(9341),I=r(8886),N=r(256),F=r(7392),$=r(8008),U=[],q=b(U.sort),B=b(U.push),z=T(function(){U.sort(void 0)}),M=T(function(){U.sort(null)}),X=R("sort"),Y=!T(function(){if(F)return F<70;if(!(I&&I>3)){if(N)return!0;if($)return $<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:z||!M||!X||!Y},{sort:function(Q){Q!==void 0&&g(Q);var tt=_(this);if(Y)return Q===void 0?q(tt):q(tt,Q);var it,st,mt=[],ct=O(tt);for(st=0;st<ct;st++)st in tt&&B(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:E(Tt)>E(Ht)?1:-1}}(Q)),it=O(mt),st=0;st<it;)tt[st]=mt[st++];for(;st<ct;)C(tt,st++);return tt}})},561:(m,j,r)=>{var y=r(2109),b=r(7908),g=r(1400),_=r(9303),O=r(6244),C=r(3658),E=r(7207),T=r(5417),L=r(6135),R=r(5117),I=r(1194)("splice"),N=Math.max,F=Math.min;y({target:"Array",proto:!0,forced:!I},{splice:function($,U){var q,B,z,M,X,Y,Q=b(this),tt=O(Q),it=g($,tt),st=arguments.length;for(st===0?q=B=0:st===1?(q=0,B=tt-it):(q=st-2,B=F(N(_(U),0),tt-it)),E(tt+q-B),z=T(Q,B),M=0;M<B;M++)(X=it+M)in Q&&L(z,M,Q[X]);if(z.length=B,q<B){for(M=it;M<tt-B;M++)Y=M+q,(X=M+B)in Q?Q[Y]=Q[X]:R(Q,Y);for(M=tt;M>tt-B+q;M--)R(Q,M-1)}else if(q>B)for(M=tt-B;M>it;M--)Y=M+q-1,(X=M+B-1)in Q?Q[Y]=Q[X]:R(Q,Y);for(M=0;M<q;M++)Q[M+it]=arguments[M+2];return C(Q,tt-B+q),z}})},3843:(m,j,r)=>{var y=r(2109),b=r(1702),g=Date,_=b(g.prototype.getTime);y({target:"Date",stat:!0},{now:function(){return _(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),_=r(5112)("toPrimitive"),O=Date.prototype;y(O,_)||b(O,_,g)},3710:(m,j,r)=>{var y=r(1702),b=r(8052),g=Date.prototype,_="Invalid Date",O="toString",C=y(g[O]),E=y(g.getTime);String(new Date(NaN))!=_&&b(g,O,function(){var T=E(this);return T==T?C(this):_})},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),_=r(7045),O=Function.prototype,C=g(O.toString),E=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,T=g(E.exec);y&&!b&&_(O,"name",{configurable:!0,get:function(){try{return T(E,C(this))[1]}catch{return""}}})},8862:(m,j,r)=>{var y=r(2109),b=r(5005),g=r(2104),_=r(6916),O=r(1702),C=r(7293),E=r(614),T=r(2190),L=r(206),R=r(8044),I=r(6293),N=String,F=b("JSON","stringify"),$=O(/./.exec),U=O("".charAt),q=O("".charCodeAt),B=O("".replace),z=O(1 .toString),M=/[\uD800-\uDFFF]/g,X=/^[\uD800-\uDBFF]$/,Y=/^[\uDC00-\uDFFF]$/,Q=!I||C(function(){var mt=b("Symbol")();return F([mt])!="[null]"||F({a:mt})!="{}"||F(Object(mt))!="{}"}),tt=C(function(){return F("\uDF06\uD834")!=='"\\udf06\\ud834"'||F("\uDEAD")!=='"\\udead"'}),it=function(mt,ct){var Et=L(arguments),Tt=R(ct);if(E(Tt)||mt!==void 0&&!T(mt))return Et[1]=function(Ht,lt){if(E(Tt)&&(lt=_(Tt,this,N(Ht),lt)),!T(lt))return lt},g(F,null,Et)},st=function(mt,ct,Et){var Tt=U(Et,ct-1),Ht=U(Et,ct+1);return $(X,mt)&&!$(Y,Ht)||$(Y,mt)&&!$(X,Tt)?"\\u"+z(q(mt,0),16):mt};F&&y({target:"JSON",stat:!0,arity:3,forced:Q||tt},{stringify:function(mt,ct,Et){var Tt=L(arguments),Ht=g(Q?it:F,null,Tt);return tt&&typeof Ht=="string"?B(Ht,M,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),_=r(7854),O=r(857),C=r(1702),E=r(4705),T=r(2597),L=r(9587),R=r(7976),I=r(2190),N=r(7593),F=r(7293),$=r(8006).f,U=r(1236).f,q=r(3070).f,B=r(863),z=r(3111).trim,M="Number",X=_[M],Y=O[M],Q=X.prototype,tt=_.TypeError,it=C("".slice),st=C("".charCodeAt),mt=function(wt){var _t=N(wt,"number");return typeof _t=="bigint"?_t:ct(_t)},ct=function(wt){var _t,zt,Xt,ce,St,jt,Rt,qt,xt=N(wt,"number");if(I(xt))throw tt("Cannot convert a Symbol value to a number");if(typeof xt=="string"&&xt.length>2){if(xt=z(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,Rt=0;Rt<jt;Rt++)if((qt=st(St,Rt))<48||qt>ce)return NaN;return parseInt(St,Xt)}}return+xt},Et=E(M,!X(" 0o1")||!X("0b1")||X("+0x1")),Tt=function(wt){return R(Q,wt)&&F(function(){B(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?$(_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)&&q(wt,zt,U(_t,zt))};b&&Y&<(O[M],Y),(Et||b)&<(O[M],X)},6977:(m,j,r)=>{var y=r(2109),b=r(1702),g=r(9303),_=r(863),O=r(8415),C=r(7293),E=RangeError,T=String,L=Math.floor,R=b(O),I=b("".slice),N=b(1 .toFixed),F=function(B,z,M){return z===0?M:z%2==1?F(B,z-1,M*B):F(B*B,z/2,M)},$=function(B,z,M){for(var X=-1,Y=M;++X<6;)Y+=z*B[X],B[X]=Y%1e7,Y=L(Y/1e7)},U=function(B,z){for(var M=6,X=0;--M>=0;)X+=B[M],B[M]=L(X/z),X=X%z*1e7},q=function(B){for(var z=6,M="";--z>=0;)if(M!==""||z===0||B[z]!==0){var X=T(B[z]);M=M===""?X:M+R("0",7-X.length)+X}return M};y({target:"Number",proto:!0,forced:C(function(){return N(8e-5,3)!=="0.000"||N(.9,0)!=="1"||N(1.255,2)!=="1.25"||N(0xde0b6b3a7640080,0)!=="1000000000000000128"})||!C(function(){N({})})},{toFixed:function(B){var z,M,X,Y,Q=_(this),tt=g(B),it=[0,0,0,0,0,0],st="",mt="0";if(tt<0||tt>20)throw E("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(M=(z=function(ct){for(var Et=0,Tt=ct;Tt>=4096;)Et+=12,Tt/=4096;for(;Tt>=2;)Et+=1,Tt/=2;return Et}(Q*F(2,69,1))-69)<0?Q*F(2,-z,1):Q/F(2,z,1),M*=4503599627370496,(z=52-z)>0){for($(it,0,M),X=tt;X>=7;)$(it,1e7,0),X-=7;for($(it,F(10,X,1),0),X=z-1;X>=23;)U(it,8388608),X-=23;U(it,1<<X),$(it,1,1),U(it,2),mt=q(it)}else $(it,0,M),$(it,1<<-z,0),mt=q(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),_=r(1236).f,O=r(9781);y({target:"Object",stat:!0,forced:!O||b(function(){_(1)}),sham:!O},{getOwnPropertyDescriptor:function(C,E){return _(g(C),E)}})},9337:(m,j,r)=>{var y=r(2109),b=r(9781),g=r(3887),_=r(5656),O=r(1236),C=r(6135);y({target:"Object",stat:!0,sham:!b},{getOwnPropertyDescriptors:function(E){for(var T,L,R=_(E),I=O.f,N=g(R),F={},$=0;N.length>$;)(L=I(R,T=N[$++]))!==void 0&&C(F,T,L);return F}})},9660:(m,j,r)=>{var y=r(2109),b=r(6293),g=r(7293),_=r(5181),O=r(7908);y({target:"Object",stat:!0,forced:!b||g(function(){_.f(1)})},{getOwnPropertySymbols:function(C){var E=_.f;return E?E(O(C)):[]}})},489:(m,j,r)=>{var y=r(2109),b=r(7293),g=r(7908),_=r(9518),O=r(8544);y({target:"Object",stat:!0,forced:b(function(){_(1)}),sham:!O},{getPrototypeOf:function(C){return _(g(C))}})},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(_){return g(b(_))}})},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),_=r(8523),O=r(2534),C=r(408);y({target:"Promise",stat:!0,forced:r(612)},{all:function(E){var T=this,L=_.f(T),R=L.resolve,I=L.reject,N=O(function(){var F=g(T.resolve),$=[],U=0,q=1;C(E,function(B){var z=U++,M=!1;q++,b(F,T,B).then(function(X){M||(M=!0,$[z]=X,--q||R($))},I)}),--q||R($)});return N.error&&I(N.value),L.promise}})},4164:(m,j,r)=>{var y=r(2109),b=r(1913),g=r(3702).CONSTRUCTOR,_=r(2492),O=r(5005),C=r(614),E=r(8052),T=_&&_.prototype;if(y({target:"Promise",proto:!0,forced:g,real:!0},{catch:function(R){return this.then(void 0,R)}}),!b&&C(_)){var L=O("Promise").prototype.catch;T.catch!==L&&E(T,"catch",L,{unsafe:!0})}},3401:(m,j,r)=>{var y,b,g,_=r(2109),O=r(1913),C=r(5268),E=r(7854),T=r(6916),L=r(8052),R=r(7674),I=r(8003),N=r(6340),F=r(9662),$=r(614),U=r(111),q=r(5787),B=r(6707),z=r(261).set,M=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=E.TypeError,St=E.document,jt=E.process,Rt=mt.f,qt=Rt,xt=!!(St&&St.createEvent&&E.dispatchEvent),tr="unhandledrejection",le=function(ot){var vt;return!(!U(ot)||!$(vt=ot.then))&&vt},Re=function(ot,vt){var $t,Nt,Qt,Ue=vt.value,Ze=vt.state==1,fr=Ze?ot.ok:ot.fail,Je=ot.resolve,ar=ot.reject,ke=ot.domain;try{fr?(Ze||(vt.rejection===2&&Ce(vt),vt.rejection=1),fr===!0?$t=Ue:(ke&&ke.enter(),$t=fr(Ue),ke&&(ke.exit(),Qt=!0)),$t===ot.promise?ar(ce("Promise-chain cycle")):(Nt=le($t))?T(Nt,$t,Je,ar):Je($t)):ar(Ue)}catch(On){ke&&!Qt&&ke.exit(),ar(On)}},fe=function(ot,vt){ot.notified||(ot.notified=!0,M(function(){for(var $t,Nt=ot.reactions;$t=Nt.get();)Re($t,ot);ot.notified=!1,vt&&!ot.rejection&&Ee(ot)}))},er=function(ot,vt,$t){var Nt,Qt;xt?((Nt=St.createEvent("Event")).promise=vt,Nt.reason=$t,Nt.initEvent(ot,!1,!0),E.dispatchEvent(Nt)):Nt={promise:vt,reason:$t},!Tt&&(Qt=E["on"+ot])?Qt(Nt):ot===tr&&X("Unhandled promise rejection",$t)},Ee=function(ot){T(z,E,function(){var vt,$t=ot.facade,Nt=ot.value;if(ir(ot)&&(vt=Y(function(){C?jt.emit("unhandledRejection",Nt,$t):er(tr,$t,Nt)}),ot.rejection=C||ir(ot)?2:1,vt.error))throw vt.value})},ir=function(ot){return ot.rejection!==1&&!ot.parent},Ce=function(ot){T(z,E,function(){var vt=ot.facade;C?jt.emit("rejectionHandled",vt):er("rejectionhandled",vt,ot.value)})},qe=function(ot,vt,$t){return function(Nt){ot(vt,Nt,$t)}},xe=function(ot,vt,$t){ot.done||(ot.done=!0,$t&&(ot=$t),ot.value=vt,ot.state=2,fe(ot,!0))},or=function(ot,vt,$t){if(!ot.done){ot.done=!0,$t&&(ot=$t);try{if(ot.facade===vt)throw ce("Promise can't be resolved itself");var Nt=le(vt);Nt?M(function(){var Qt={done:!1};try{T(Nt,vt,qe(or,Qt,ot),qe(xe,Qt,ot))}catch(Ue){xe(Qt,Ue,ot)}}):(ot.value=vt,ot.state=1,fe(ot,!1))}catch(Qt){xe({done:!1},Qt,ot)}}};if(Et&&(Xt=(zt=function(ot){q(this,Xt),F(ot),T(y,this);var vt=lt(this);try{ot(qe(or,vt),qe(xe,vt))}catch($t){xe(vt,$t)}}).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 $t=lt(this),Nt=Rt(B(this,zt));return $t.parent=!0,Nt.ok=!$(ot)||ot,Nt.fail=$(vt)&&vt,Nt.domain=C?jt.domain:void 0,$t.state==0?$t.reactions.add(Nt):M(function(){Re(Nt,$t)}),Nt.promise}),b=function(){var ot=new y,vt=lt(ot);this.promise=ot,this.resolve=qe(or,vt),this.reject=qe(xe,vt)},mt.f=Rt=function(ot){return ot===zt||ot===void 0?new b(ot):qt(ot)},!O&&$(it)&&_t!==Object.prototype)){g=_t.then,Ht||L(_t,"then",function(ot,vt){var $t=this;return new zt(function(Nt,Qt){T(g,$t,Nt,Qt)}).then(ot,vt)},{unsafe:!0});try{delete _t.constructor}catch{}R&&R(_t,Xt)}_({global:!0,constructor:!0,wrap:!0,forced:Et},{Promise:zt}),I(zt,ct,!1,!0),N(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),_=r(8523),O=r(2534),C=r(408);y({target:"Promise",stat:!0,forced:r(612)},{race:function(E){var T=this,L=_.f(T),R=L.reject,I=O(function(){var N=g(T.resolve);C(E,function(F){b(N,T,F).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(_){var O=g.f(this);return b(O.reject,void 0,_),O.promise}})},6294:(m,j,r)=>{var y=r(2109),b=r(5005),g=r(1913),_=r(2492),O=r(3702).CONSTRUCTOR,C=r(9478),E=b("Promise"),T=g&&!O;y({target:"Promise",stat:!0,forced:g||O},{resolve:function(L){return C(T&&this===E?_:this,L)}})},2419:(m,j,r)=>{var y=r(2109),b=r(5005),g=r(2104),_=r(7065),O=r(9483),C=r(9670),E=r(111),T=r(30),L=r(7293),R=b("Reflect","construct"),I=Object.prototype,N=[].push,F=L(function(){function q(){}return!(R(function(){},[],q)instanceof q)}),$=!L(function(){R(function(){})}),U=F||$;y({target:"Reflect",stat:!0,forced:U,sham:U},{construct:function(q,B){O(q),C(B);var z=arguments.length<3?q:O(arguments[2]);if($&&!F)return R(q,B,z);if(q==z){switch(B.length){case 0:return new q;case 1:return new q(B[0]);case 2:return new q(B[0],B[1]);case 3:return new q(B[0],B[1],B[2]);case 4:return new q(B[0],B[1],B[2],B[3])}var M=[null];return g(N,M,B),new(g(_,q,M))}var X=z.prototype,Y=T(E(X)?X:I),Q=g(q,Y,B);return E(Q)?Q:Y}})},4819:(m,j,r)=>{var y=r(2109),b=r(6916),g=r(111),_=r(9670),O=r(5032),C=r(1236),E=r(9518);y({target:"Reflect",stat:!0},{get:function T(L,R){var I,N,F=arguments.length<3?L:arguments[2];return _(L)===F?L[R]:(I=C.f(L,R))?O(I)?I.value:I.get===void 0?void 0:b(I.get,F):g(N=E(L))?T(N,R,F):void 0}})},4603:(m,j,r)=>{var y=r(9781),b=r(7854),g=r(1702),_=r(4705),O=r(9587),C=r(8880),E=r(8006).f,T=r(7976),L=r(7850),R=r(1340),I=r(4706),N=r(2999),F=r(2626),$=r(8052),U=r(7293),q=r(2597),B=r(9909).enforce,z=r(6340),M=r(5112),X=r(9441),Y=r(7168),Q=M("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=N.MISSED_STICKY,ce=N.UNSUPPORTED_Y;if(_("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,Re,fe,er,Ee,ir=T(it,this),Ce=L(qt),qe=xt===void 0,xe=[],or=qt;if(!ir&&Ce&&qe&&qt.constructor===St)return qt;if((Ce||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&&(Re=!!xt&&Tt(xt,"y")>-1)&&ce&&(xt=Et(xt,/y/g,"")),Y&&(fe=function(ot){for(var vt,$t=ot.length,Nt=0,Qt="",Ue=[],Ze={},fr=!1,Je=!1,ar=0,ke="";Nt<=$t;Nt++){if((vt=ct(ot,Nt))==="\\")vt+=ct(ot,++Nt);else if(vt==="]")fr=!1;else if(!fr)switch(!0){case vt==="[":fr=!0;break;case vt==="(":mt(lt,Ht(ot,Nt+1))&&(Nt+=2,Je=!0),Qt+=vt,ar++;continue;case(vt===">"&&Je):if(ke===""||q(Ze,ke))throw new st("Invalid capture group name");Ze[ke]=!0,Ue[Ue.length]=[ke,ar],Je=!1,ke="";continue}Je?ke+=vt:Qt+=vt}return[Qt,Ue]}(qt),qt=fe[0],xe=fe[1]),er=O(tt(qt,xt),ir?this:it,St),(le||Re||xe.length)&&(Ee=B(er),le&&(Ee.dotAll=!0,Ee.raw=St(function(ot){for(var vt,$t=ot.length,Nt=0,Qt="",Ue=!1;Nt<=$t;Nt++)(vt=ct(ot,Nt))!=="\\"?Ue||vt!=="."?(vt==="["?Ue=!0:vt==="]"&&(Ue=!1),Qt+=vt):Qt+="[\\s\\S]":Qt+=vt+ct(ot,++Nt);return Qt}(qt),tr)),Re&&(Ee.sticky=!0),xe.length&&(Ee.groups=xe)),qt!==or)try{C(er,"source",or===""?"(?:)":or)}catch{}return er},jt=E(tt),Rt=0;jt.length>Rt;)F(St,tt,jt[Rt++]);it.constructor=St,St.prototype=it,$(b,"RegExp",St,{constructor:!0})}z("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),_=r(1340),O=r(7293),C=r(4706),E="toString",T=RegExp.prototype[E],L=O(function(){return T.call({source:"a",flags:"b"})!="/a/b"}),R=y&&T.name!=E;(L||R)&&b(RegExp.prototype,E,function(){var I=g(this);return"/"+_(I.source)+"/"+_(C(I))},{unsafe:!0})},2023:(m,j,r)=>{var y=r(2109),b=r(1702),g=r(3929),_=r(4488),O=r(1340),C=r(4964),E=b("".indexOf);y({target:"String",proto:!0,forced:!C("includes")},{includes:function(T){return!!~E(O(_(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),_=r(1656),O=r(6178),C="String Iterator",E=g.set,T=g.getterFor(C);_(String,"String",function(L){E(this,{type:C,string:b(L),index:0})},function(){var L,R=T(this),I=R.string,N=R.index;return N>=I.length?O(void 0,!0):(L=y(I,N),R.index+=L.length,O(L,!1))})},4723:(m,j,r)=>{var y=r(6916),b=r(7007),g=r(9670),_=r(8554),O=r(7466),C=r(1340),E=r(4488),T=r(8173),L=r(1530),R=r(7651);b("match",function(I,N,F){return[function($){var U=E(this),q=_($)?void 0:T($,I);return q?y(q,$,U):new RegExp($)[I](C(U))},function($){var U=g(this),q=C($),B=F(N,U,q);if(B.done)return B.value;if(!U.global)return R(U,q);var z=U.unicode;U.lastIndex=0;for(var M,X=[],Y=0;(M=R(U,q))!==null;){var Q=C(M[0]);X[Y]=Q,Q===""&&(U.lastIndex=L(q,O(U.lastIndex),z)),Y++}return Y===0?null:X}]})},5306:(m,j,r)=>{var y=r(2104),b=r(6916),g=r(1702),_=r(7007),O=r(7293),C=r(9670),E=r(614),T=r(8554),L=r(9303),R=r(7466),I=r(1340),N=r(4488),F=r(1530),$=r(8173),U=r(647),q=r(7651),B=r(5112)("replace"),z=Math.max,M=Math.min,X=g([].concat),Y=g([].push),Q=g("".indexOf),tt=g("".slice),it="a".replace(/./,"$0")==="$0",st=!!/./[B]&&/./[B]("a","$0")==="";_("replace",function(mt,ct,Et){var Tt=st?"$":"$0";return[function(Ht,lt){var wt=N(this),_t=T(Ht)?void 0:$(Ht,B);return _t?b(_t,Ht,wt,lt):b(ct,I(wt),Ht,lt)},function(Ht,lt){var wt=C(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=E(lt);Xt||(lt=I(lt));var ce=wt.global;if(ce){var St=wt.unicode;wt.lastIndex=0}for(var jt=[];;){var Rt=q(wt,_t);if(Rt===null||(Y(jt,Rt),!ce))break;I(Rt[0])===""&&(wt.lastIndex=F(_t,R(wt.lastIndex),St))}for(var qt,xt="",tr=0,le=0;le<jt.length;le++){for(var Re=I((Rt=jt[le])[0]),fe=z(M(L(Rt.index),_t.length),0),er=[],Ee=1;Ee<Rt.length;Ee++)Y(er,(qt=Rt[Ee])===void 0?qt:String(qt));var ir=Rt.groups;if(Xt){var Ce=X([Re],er,fe,_t);ir!==void 0&&Y(Ce,ir);var qe=I(y(lt,void 0,Ce))}else qe=U(Re,_t,fe,er,ir,lt);fe>=tr&&(xt+=tt(_t,tr,fe)+qe,tr=fe+Re.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),_=r(1236).f,O=r(7466),C=r(1340),E=r(3929),T=r(4488),L=r(4964),R=r(1913),I=g("".startsWith),N=g("".slice),F=Math.min,$=L("startsWith");b({target:"String",proto:!0,forced:!(!R&&!$&&(y=_(String.prototype,"startsWith"),y&&!y.writable)||$)},{startsWith:function(U){var q=C(T(this));E(U);var B=O(F(arguments.length>1?arguments[1]:void 0,q.length)),z=C(U);return I?I(q,z,B):N(q,B,B+z.length)===z}})},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),_=r(1702),O=r(1913),C=r(9781),E=r(6293),T=r(7293),L=r(2597),R=r(7976),I=r(9670),N=r(5656),F=r(4948),$=r(1340),U=r(9114),q=r(30),B=r(1956),z=r(8006),M=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"),Rt="Symbol",qt="prototype",xt=ce.set,tr=ce.getterFor(Rt),le=Object[qt],Re=b.Symbol,fe=Re&&Re[qt],er=b.TypeError,Ee=b.QObject,ir=Y.f,Ce=Q.f,qe=M.f,xe=it.f,or=_([].push),ot=ct("symbols"),vt=ct("op-symbols"),$t=ct("wks"),Nt=!Ee||!Ee[qt]||!Ee[qt].findChild,Qt=C&&T(function(){return q(Ce({},"a",{get:function(){return Ce(this,"a",{value:7}).a}})).a!=7})?function(Dt,Kt,Yt){var oe=ir(le,Kt);oe&&delete le[Kt],Ce(Dt,Kt,Yt),oe&&Dt!==le&&Ce(le,Kt,oe)}:Ce,Ue=function(Dt,Kt){var Yt=ot[Dt]=q(fe);return xt(Yt,{type:Rt,tag:Dt,description:Kt}),C||(Yt.description=Kt),Yt},Ze=function(Dt,Kt,Yt){Dt===le&&Ze(vt,Kt,Yt),I(Dt);var oe=F(Kt);return I(Yt),L(ot,oe)?(Yt.enumerable?(L(Dt,jt)&&Dt[jt][oe]&&(Dt[jt][oe]=!1),Yt=q(Yt,{enumerable:U(0,!1)})):(L(Dt,jt)||Ce(Dt,jt,U(1,{})),Dt[jt][oe]=!0),Qt(Dt,oe,Yt)):Ce(Dt,oe,Yt)},fr=function(Dt,Kt){I(Dt);var Yt=N(Kt),oe=B(Yt).concat(On(Yt));return St(oe,function(Fe){C&&!g(Je,Yt,Fe)||Ze(Dt,Fe,Yt[Fe])}),Dt},Je=function(Dt){var Kt=F(Dt),Yt=g(xe,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=N(Dt),oe=F(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}},ke=function(Dt){var Kt=qe(N(Dt)),Yt=[];return St(Kt,function(oe){L(ot,oe)||L(Tt,oe)||or(Yt,oe)}),Yt},On=function(Dt){var Kt=Dt===le,Yt=qe(Kt?vt:N(Dt)),oe=[];return St(Yt,function(Fe){!L(ot,Fe)||Kt&&!L(le,Fe)||or(oe,ot[Fe])}),oe};E||(st(fe=(Re=function(){if(R(fe,this))throw er("Symbol is not a constructor");var Dt=arguments.length&&arguments[0]!==void 0?$(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 C&&Nt&&Qt(le,Kt,{configurable:!0,set:Yt}),Ue(Kt,Dt)})[qt],"toString",function(){return tr(this).tag}),st(Re,"withoutSetter",function(Dt){return Ue(Ht(Dt),Dt)}),it.f=Je,Q.f=Ze,tt.f=fr,Y.f=ar,z.f=M.f=ke,X.f=On,wt.f=function(Dt){return Ue(lt(Dt),Dt)},C&&(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:!E,sham:!E},{Symbol:Re}),St(B($t),function(Dt){_t(Dt)}),y({target:Rt,stat:!0,forced:!E},{useSetter:function(){Nt=!0},useSimple:function(){Nt=!1}}),y({target:"Object",stat:!0,forced:!E,sham:!C},{create:function(Dt,Kt){return Kt===void 0?q(Dt):fr(q(Dt),Kt)},defineProperty:Ze,defineProperties:fr,getOwnPropertyDescriptor:ar}),y({target:"Object",stat:!0,forced:!E},{getOwnPropertyNames:ke}),zt(),Xt(Re,Rt),Tt[jt]=!0},1817:(m,j,r)=>{var y=r(2109),b=r(9781),g=r(7854),_=r(1702),O=r(2597),C=r(614),E=r(7976),T=r(1340),L=r(7045),R=r(9920),I=g.Symbol,N=I&&I.prototype;if(b&&C(I)&&(!("description"in N)||I().description!==void 0)){var F={},$=function(){var Y=arguments.length<1||arguments[0]===void 0?void 0:T(arguments[0]),Q=E(N,this)?new I(Y):Y===void 0?I():I(Y);return Y===""&&(F[Q]=!0),Q};R($,I),$.prototype=N,N.constructor=$;var U=String(I("test"))=="Symbol(test)",q=_(N.valueOf),B=_(N.toString),z=/^Symbol\((.*)\)[^)]+$/,M=_("".replace),X=_("".slice);L(N,"description",{configurable:!0,get:function(){var Y=q(this);if(O(F,Y))return"";var Q=B(Y),tt=U?X(Q,7,-1):M(Q,z,"$1");return tt===""?void 0:tt}}),y({global:!0,constructor:!0,forced:!0},{Symbol:$})}},763:(m,j,r)=>{var y=r(2109),b=r(5005),g=r(2597),_=r(1340),O=r(2309),C=r(2015),E=O("string-to-symbol-registry"),T=O("symbol-to-string-registry");y({target:"Symbol",stat:!0,forced:!C},{for:function(L){var R=_(L);if(g(E,R))return E[R];var I=b("Symbol")(R);return E[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),_=r(6330),O=r(2309),C=r(2015),E=O("symbol-to-string-registry");y({target:"Symbol",stat:!0,forced:!C},{keyFor:function(T){if(!g(T))throw TypeError(_(T)+" is not a symbol");if(b(E,T))return E[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),_=r(8533),O=r(8880),C=function(T){if(T&&T.forEach!==_)try{O(T,"forEach",_)}catch{T.forEach=_}};for(var E in b)b[E]&&C(y[E]&&y[E].prototype);C(g)},3948:(m,j,r)=>{var y=r(7854),b=r(8324),g=r(8509),_=r(6992),O=r(8880),C=r(5112),E=C("iterator"),T=C("toStringTag"),L=_.values,R=function(N,F){if(N){if(N[E]!==L)try{O(N,E,L)}catch{N[E]=L}if(N[T]||O(N,T,F),b[F]){for(var $ in _)if(N[$]!==_[$])try{O(N,$,_[$])}catch{N[$]=_[$]}}}};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 P={};return(()=>{k.r(P),k.d(P,{JSONEditor:()=>gn}),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&&!E(l.constructor.prototype,"isPrototypeOf"))}function g(l){return b(l)?_({},l):Array.isArray(l)?l.map(g):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];return p.forEach(function(u){u&&Object.keys(u).forEach(function(a){u[a]&&b(u[a])?(E(l,a)||(l[a]={}),_(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 C(l){return l&&(l.toString()==="[object ShadowRoot]"?l:C(l.parentNode))}function E(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 N(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,{})),N(l[a],u[a])):Object.assign(l,r({},a,u[a]));return N.apply(void 0,[l].concat(p))}function F(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 $(l){return $=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},$(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($(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if($(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),$(u)==="symbol"?u:String(u)),i)}var u}var q=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=_({},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}):$(u)==="object"?$(t)!=="object"?this.dependenciesFulfilled=u===t:Object.keys(u).some(function(e){return!!E(u,e)&&(E(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()},E(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(w){var S=t(w),D=e(w);a.setAttribute("href",S),a.setAttribute("title",D||S),c.setAttribute("src",S)})}else if(["audio","video"].includes(s)){u=this.theme.getBlockLinkHolder(),(a=this.theme.getBlockLink()).setAttribute("target","_blank");var h=document.createElement(s);h.setAttribute("controls","controls"),this.theme.createMediaLink(u,a,h),this.link_watchers.push(function(w){var S=t(w),D=e(w);a.setAttribute("href",S),a.textContent=D||S,h.setAttribute("src",S)})}else a=u=this.theme.getBlockLink(),u.setAttribute("target","_blank"),u.textContent=i.rel,u.style.display="none",this.link_watchers.push(function(w){var S=t(w),D=e(w);S&&(u.style.display=""),u.setAttribute("href",S),u.textContent=D||S});return o&&a&&(o===!0?a.setAttribute("download",""):this.link_watchers.push(function(w){a.setAttribute("download",o(w))})),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=_(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&&$(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(S){if(Array.isArray(S))return S}(e=t)||function(S,D){var J=S==null?null:typeof Symbol<"u"&&S[Symbol.iterator]||S["@@iterator"];if(J!=null){var nt,ut,dt,kt,Ct=[],Bt=!0,re=!1;try{if(dt=(J=J.call(S)).next,D===0){if(Object(J)!==J)return;Bt=!1}else for(;!(Bt=(nt=dt.call(J)).done)&&(Ct.push(nt.value),Ct.length!==D);Bt=!0);}catch(Se){re=!0,ut=Se}finally{try{if(!Bt&&J.return!=null&&(kt=J.return(),Object(kt)!==kt))return}finally{if(re)throw ut}}return Ct}}(e,o)||function(S,D){if(S){if(typeof S=="string")return F(S,D);var J=Object.prototype.toString.call(S).slice(8,-1);return J==="Object"&&S.constructor&&(J=S.constructor.name),J==="Map"||J==="Set"?Array.from(S):J==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(J)?F(S,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.`)}()),h=c[0],w=c[1];w===Object(w)?u[h]=a.expandCallbacks(i,w):typeof w=="string"&&$(s)==="object"&&typeof s[w]=="function"&&(u[h]=s[w].bind(null,a))}),u}},{key:"showValidationErrors",value:function(i){}}],p&&U(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),l}();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 z(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}function M(){return M=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}},M.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,h){if(h&&(B(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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(){M(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(){M(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?B(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 h=this.control.querySelector("output");h&&(h.value=c)}var w=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(w),{changed:w,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(S){if(S.preventDefault(),S.stopPropagation(),t.schema.template)S.currentTarget.value=t.value;else{var D=S.currentTarget.value,J=t.sanitize(D);D!==J&&(S.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(S){if(S){var D,J=S.offsetHeight;if(S.offsetHeight<S.scrollHeight)for(D=0;S.offsetHeight<S.scrollHeight+3&&!(D>100);)D++,J++,S.style.height="".concat(J,"px");else{for(D=0;S.offsetHeight>=S.scrollHeight+3&&!(D>100);)D++,J--,S.style.height="".concat(J,"px");S.style.height="".concat(J+1,"px")}}},this.input.addEventListener("keyup",function(S){t.adjust_height(S.currentTarget)}),this.input.addEventListener("change",function(S){t.adjust_height(S.currentTarget)}),this.adjust_height()),this.format&&this.input.setAttribute("data-schemaformat",this.format);var h=this.input;if(this.format==="range"&&(h=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,h,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 w=this.expandCallbacks("template",{template:this.schema.template});typeof w.template=="function"?this.template=w.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",_({},this.defaults.options.cleave||{},this.options.cleave||{}));B(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",_({},this.defaults.options.imask||{},this.options.imask||{}));B(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:M(Y(s.prototype),"getValue",this).call(this)}},{key:"enable",value:function(){this.always_disabled||(this.input.disabled=!1,M(Y(s.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.input.disabled=!0,M(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),M(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)),M(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,h){return h.path===e.path&&c.push(h.message),c},[]);o.length?this.theme.addInputError(this.input,"".concat(o.join(". "),".")):this.theme.removeInputError(this.input)}}])&&z(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 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,h){if(h&&(tt(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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",_({},{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,h){if(h&&(Tt(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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?_({},this.schema.additionalItems):void 0:_({},this.schema.items[t]):this.schema.items?_({},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,h=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 w=this.jsoneditor.createEditor(h,{jsoneditor:this.jsoneditor,schema:o,container:c,path:"".concat(this.path,".").concat(t),parent:this,required:!0});return w.preBuild(),w.build(),w.postBuild(),w.title_controls||(w.array_controls=this.theme.getButtonHolder(),c.appendChild(w.array_controls)),w}},{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(S,D){if(t.rows[D])t.rows[D].setValue(S,o);else if(t.row_cache[D])t.rows[D]=t.row_cache[D],t.rows[D].setValue(S,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(S,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 h=this.rows.find(function(S){return S.tab===t.active_tab}),w=h!==void 0?h.tab:null;!w&&this.rows.length&&(w=this.rows[0].tab),this.active_tab=w,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 h=!(t||this.hide_delete_all_rows_buttons);this.setButtonState(this.remove_all_rows_button,h),e.push(h)}else this.setButtonState(this.delete_last_row_button,!1),this.setButtonState(this.remove_all_rows_button,!1);var w=!(this.getMax()&&this.getMax()<=this.rows.length||this.hide_add_button);return this.setButtonState(this.add_row_button,w),e.push(w),e.some(function(S){return S})}},{key:"refreshValue",value:function(t){var e=this,o=this.value?this.value.length:0;if(this.value=this.rows.map(function(h){return h.getValue()}),o!==this.value.length||t){var c=this.schema.minItems&&this.schema.minItems>=this.rows.length;this.rows.forEach(function(h,w){if(h.movedown_button){var S=w!==e.rows.length-1;e.setButtonState(h.movedown_button,S)}h.delete_button&&e.setButtonState(h.delete_button,!c),e.value[w]=h.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(w){o.active_tab=o.rows[c].tab,o.refreshTabs(),w.preventDefault(),w.stopPropagation()}));var h=this.rows[c].title_controls||this.rows[c].array_controls;return this.hide_delete_buttons||(this.rows[c].delete_button=this._createDeleteButton(c,h)),this.show_copy_button&&(this.rows[c].copy_button=this._createCopyButton(c,h)),c&&!this.hide_move_buttons&&(this.rows[c].moveup_button=this._createMoveUpButton(c,h)),this.hide_move_buttons||(this.rows[c].movedown_button=this._createMoveDownButton(c,h)),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(h){if(h.preventDefault(),h.stopPropagation(),!o.askConfirmation())return!1;var w=1*h.currentTarget.getAttribute("data-i"),S=o.getValue().filter(function(nt,ut){return ut!==w}),D=null,J=o.rows[w].getValue();o.setValue(S),o.rows[w]?D=o.rows[w].tab:o.rows[w-1]&&(D=o.rows[w-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()]),h=this.schema;return c.classList.add("copy","json-editor-btntype-copy"),c.setAttribute("data-i",t),c.addEventListener("click",function(w){var S=o.getValue();w.preventDefault(),w.stopPropagation();var D=1*w.currentTarget.getAttribute("data-i");S.forEach(function(J,nt){if(nt===D){if(h.items.type==="string"&&h.items.format==="uuid")J=R();else if(h.items.type==="object"&&h.items.properties)for(var ut=0,dt=Object.keys(J);ut<dt.length;ut++){var kt=dt[ut];h.items.properties&&h.items.properties[kt]&&h.items.properties[kt].format==="uuid"&&(J[kt]=R())}S.push(J)}}),o.setValue(S),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(h){h.preventDefault(),h.stopPropagation();var w=1*h.currentTarget.getAttribute("data-i");if(!(w<=0)){var S=o.getValue(),D=S[w-1];S[w-1]=S[w],S[w]=D,o.setValue(S),o.active_tab=o.rows[w-1].tab,o.refreshTabs(),o.onChange(!0),o.jsoneditor.trigger("moveRow",o.rows[w-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(h){h.preventDefault(),h.stopPropagation();var w=1*h.currentTarget.getAttribute("data-i"),S=o.getValue();if(!(w>=S.length-1)){var D=S[w+1];S[w+1]=S[w],S[w]=D,o.setValue(S),o.active_tab=o.rows[w+1].tab,o.refreshTabs(),o.onChange(!0),o.jsoneditor.trigger("moveRow",o.rows[w+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(h){h.preventDefault(),h.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(h.currentTarget,"","collapse","button_collapse")):(t.collapsed=!0,t.row_holder.style.display="none",t.controls.style.display="none",t.setButtonText(h.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,h=t.rows.length;t.row_cache[h]?(c=t.rows[h]=t.row_cache[h],t.rows[h].setValue(t.rows[h].getDefault(),!0),t.rows[h].container.style.display="",t.rows[h].tab&&(t.rows[h].tab.style.display=""),t.rows[h].register()):c=t.addRow(),t.active_tab=t.rows[h].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(),h=null,w=c.pop();t.setValue(c),t.rows[t.rows.length-1]&&(h=t.rows[t.rows.length-1].tab),h&&(t.active_tab=h,t.refreshTabs()),t.onChange(!0),t.jsoneditor.trigger("deleteRow",w)}),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(h){h.path===e.path?o.push(h):c.push(h)}),this.error_holder&&(o.length?(this.error_holder.innerHTML="",this.error_holder.style.display="",o.forEach(function(h){e.error_holder.appendChild(e.theme.getErrorMessage(h.message))})):this.error_holder.style.display="none"),this.rows.forEach(function(h){return h.showValidationErrors(c)})}}],p&&Ht(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(q);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=Rt(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 Rt(l){return Rt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Rt(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=Rt(i);if(u){var o=Rt(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,h){if(h&&(Xt(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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(Rt(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(Rt(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(Rt(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||[],h=e.options&&e.options.enum_titles||[];for(t=0;t<o.length;t++)if(this.sanitize(o[t])===o[t]){var w=c[t]||{};"title"in w||(w.title="".concat(h[t]||o[t])),this.option_keys.push("".concat(o[t])),this.option_enum.push(w),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 h=this.theme.getInfoButton(this.translateProperty(this.option_enum[t].infoText));c.appendChild(h)}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(w){return w.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(w){var S=[];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)&&S.push(e.select_values[e.option_keys[t]]);e.updateValue(S),e.onChange(!0)},this.control.addEventListener("change",this.multiselectChangeHandler,!1),window.requestAnimationFrame(function(){e.afterInputReady()})}},{key:"postBuild",value:function(){St(Rt(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 h=this.sanitize(this.select_values[t[c]]);o.push(h),h!==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(Rt(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(Rt(s.prototype),"disable",this).call(this)}},{key:"destroy",value:function(){St(Rt(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,h){return h.path.match(e)&&c.push(h.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}(q);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 Re(l,n){return Re=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},Re(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&&Re(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,h){if(h&&(xt(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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",_({},{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 h=this.sanitize(this.select_values[t[c]]);o.push(h),h!==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 Ee(l){return Ee=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},Ee(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(Ee(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Ee(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Ee(u)==="symbol"?u:String(u)),i)}var u}function Ce(){return Ce=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}},Ce.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 xe(l){return xe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},xe(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=xe(i);if(u){var o=xe(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,h){if(h&&(Ee(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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)):Ce(xe(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",_({},{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=E(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)),Ce(xe(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 h=this.sanitize(this.select_values[t[c]]);o.push(h),h!==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)),Ce(xe(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)),Ce(xe(s.prototype),"disable",this).call(this)}},{key:"destroy",value:function(){this.select2_instance&&(this.select2_instance.select2("destroy"),this.select2_instance=null),Ce(xe(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 $t(){return $t=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}},$t.apply(this,arguments)}function Nt(l,n){return Nt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},Nt(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&&Nt(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,h){if(h&&(ot(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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)):$t(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",_({},{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)),$t(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 h=this.sanitize(this.select_values[t[c]]);o.push(h),h!==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(),$t(Qt(s.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.selectize_instance&&this.selectize_instance.lock(),$t(Qt(s.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.selectize_instance&&(this.selectize_instance.destroy(),this.selectize_instance=null),$t(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=ke(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 ke(l){return ke=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ke(l)}var On=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=ke(i);if(u){var o=ke(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,h){if(h&&(Ze(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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(ke(s.prototype),"postBuild",this).call(this)}},{key:"afterInputReady",value:function(){var t,e=this;window.Autocomplete&&!this.autocomplete_instance&&(t=this.expandCallbacks("autocomplete",_({},{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(ke(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(ke(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 Oi=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,h){if(h&&(Dt(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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 h in e.parent.schema.properties)c[h]="";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 h=new FileReader;t.setFileReaderListener(h),h.readAsDataURL(o.currentTarget.files[c])}}else{var w=new FileReader;w.onload=function(S){t.value=S.target.result,t.refreshPreview(),t.onChange(!0),w=null},w.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}(q);function En(l){return En=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},En(l)}function Ra(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(En(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(En(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),En(u)==="symbol"?u:String(u)),i)}var u}function Xn(){return Xn=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}},Xn.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 Ia=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,h){if(h&&(En(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(c)}(this,t)});function s(t,e){var o;return function(c,h){if(!(c instanceof h))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",_({},{icon:"",validated:!1,align:"left",action:function(c,h){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,Xn($r(s.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.input.disabled=!0,Xn($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,Xn($r(s.prototype),"destroy",this).call(this)}}])&&Ra(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(q);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 Da(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 dn(){return dn=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=Tr(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}},dn.apply(this,arguments)}function Ei(l,n){return Ei=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},Ei(l,n)}function Tr(l){return Tr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Tr(l)}var Ba=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&&Ei(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=Tr(i);if(u){var o=Tr(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,h){if(h&&(Cn(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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(){dn(Tr(s.prototype),"register",this).call(this),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}},{key:"unregister",value:function(){dn(Tr(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,dn(Tr(s.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.input.disabled=!0,dn(Tr(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),dn(Tr(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,h){return h.path===e.path&&c.push(h.message),c},[]);this.input.controlgroup=this.control,o.length?this.theme.addInputError(this.input,"".concat(o.join(". "),".")):this.theme.removeInputError(this.input)}}])&&Da(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(q);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 Io(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 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 Qn=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,h){if(h&&(Sn(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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(h,w){o.enum_options[w]="".concat(h),o.enum_display[w]="".concat(o.translateProperty(c[w])||h),o.enum_values[w]=o.typecast(h)})}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]=_({},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 h=0;h<this.enumSource.length;h++)if(Array.isArray(this.enumSource[h]))o=o.concat(this.enumSource[h]),c=c.concat(this.enumSource[h]);else{var w=[];if(w=Array.isArray(this.enumSource[h].source)?this.enumSource[h].source:t[this.enumSource[h].source]){if(this.enumSource[h].slice&&(w=Array.prototype.slice.apply(w,this.enumSource[h].slice)),this.enumSource[h].filter){var S=[];for(e=0;e<w.length;e++)this.enumSource[h].filter({i:e,item:w[e],watched:t})&&S.push(w[e]);w=S}var D=[],J=[];for(e=0;e<w.length;e++){var nt=w[e];this.enumSource[h].value?J[e]=this.typecast(this.enumSource[h].value({i:e,item:nt})):J[e]=w[e],this.enumSource[h].title?D[e]=this.enumSource[h].title({i:e,item:nt}):D[e]=J[e]}this.enumSource[h].sort&&(function(dt,kt,Ct){dt.map(function(Bt,re){return{v:Bt,t:kt[re]}}).sort(function(Bt,re){return Bt.v<re.v?-Ct:Bt.v===re.v?0:Ct}).forEach(function(Bt,re){dt[re]=Bt.v,kt[re]=Bt.t})}).bind(null,J,D,this.enumSource[h].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,h){return h.path===e.path&&c.push(h.message),c},[]);o.length?this.theme.addInputError(this.input,"".concat(o.join(". "),".")):this.theme.removeInputError(this.input)}}])&&Io(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(q);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 Ss(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 Lr(){return Lr=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}},Lr.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 V(l){return V=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},V(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=V(i);if(u){var o=V(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,h){if(h&&(Pn(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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 Lr(V(s.prototype),"setValue",this).call(this,t,e)}},{key:"afterInputReady",value:function(){if(window.Choices&&!this.choices_instance){var t=this.expandCallbacks("choices",_({},this.defaults.options.choices||{},this.options.choices||{}));this.choices_instance=new window.Choices(this.input,t)}Lr(V(s.prototype),"afterInputReady",this).call(this)}},{key:"onWatchedFieldChange",value:function(){var t=this;if(Lr(V(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(),Lr(V(s.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.choices_instance&&this.choices_instance.disable(),Lr(V(s.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.choices_instance&&(this.choices_instance.destroy(),this.choices_instance=null),Lr(V(s.prototype),"destroy",this).call(this)}}])&&Ss(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(Qn);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 It(){return It=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}},It.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,h){if(h&&(K(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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(It(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 h=this.input.parentNode,w=this.input.nextSibling,S=this.theme.getInputGroup(this.input,e);S!==void 0?(this.options.flatpickr.inline=!1,h.insertBefore(S,w),t=S):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")It(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),h=c.getFullYear(),w=this.zeroPad(c.getMonth()+1),S=this.zeroPad(c.getDate()),D=this.zeroPad(c.getHours()),J=this.zeroPad(c.getMinutes()),nt=this.zeroPad(c.getSeconds()),ut=[h,w,S].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,It(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=Te(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 Te(l){return Te=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Te(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=Te(i);if(u){var o=Te(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,h){if(h&&(Gt(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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(Te(s.prototype),"register",this).call(this)}},{key:"unregister",value:function(){if(Pt(Te(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(Te(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(Te(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,h){c&&(t.currentEditor===h?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=_({},this.schema,this.jsoneditor.refs[t]),c=this.jsoneditor.getEditorClass(o,this.jsoneditor),h=this.jsoneditor.createEditor(c,{jsoneditor:this.jsoneditor,schema:o,container:e,path:this.path,parent:this,required:!0});this.editors.push(h),h.preBuild(),h.build(),h.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=_({},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(Te(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(Te(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}(q);function At(l){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(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(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(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 Ie=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,h){if(h&&(At(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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(At(t)==="object"){var h="";return e=t,o=function(w,S){var D=c.getHTML(S);Array.isArray(t)||(D="<div><em>".concat(w,"</em>: ").concat(D,"</div>")),h+="<li>".concat(D,"</li>")},Array.isArray(e)||typeof e.length=="number"&&e.length>0&&e.length-1 in e?Array.from(e).forEach(function(w,S){return o(S,w)}):Object.entries(e).forEach(function(w){var S,D,J=(D=2,function(dt){if(Array.isArray(dt))return dt}(S=w)||function(dt,kt){var Ct=dt==null?null:typeof Symbol<"u"&&dt[Symbol.iterator]||dt["@@iterator"];if(Ct!=null){var Bt,re,Se,Ut,gt=[],Wt=!0,ze=!1;try{if(Se=(Ct=Ct.call(dt)).next,kt===0){if(Object(Ct)!==Ct)return;Wt=!1}else for(;!(Wt=(Bt=Se.call(Ct)).done)&&(gt.push(Bt.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}}(S,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}}(S,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)}),h=Array.isArray(t)?"<ol>".concat(h,"</ol>"):"<ul style='margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:0;'>".concat(h,"</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}(q);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 Ar(l,n){return Ar=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},Ar(l,n)}function wr(l){return wr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},wr(l)}var Na=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=wr(i);if(u){var o=wr(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,h){if(h&&(ve(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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 h=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(h)}}}},{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}(q);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 Ps(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 Ci(l,n){return Ci=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},Ci(l,n)}function Rr(l){return Rr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Rr(l)}var Si=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&&Ci(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=Rr(i);if(u){var o=Rr(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,h){if(h&&(Mr(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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}}])&&Ps(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(Ia);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 $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(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 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=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}},Pi.apply(this,arguments)}function Ti(l,n){return Ti=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},Ti(l,n)}function Tn(l){return Tn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Tn(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&&Ti(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,h){if(h&&(pn(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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(Pi(Tn(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=""))}}])&&$a(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(Q);function Ir(l){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(l)}function Kn(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(Ir(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Ir(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Ir(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 Li(l){return Li=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Li(l)}var Fa=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=Li(i);if(u){var o=Li(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,h){if(h&&(Ir(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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()}}])&&Kn(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(Ma);function Ln(l){return Ln=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},Ln(l)}function Ai(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(Ln(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Ln(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Ln(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 An(l,n){return An=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},An(l,n)}function Hr(l){return Hr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Hr(l)}var Do=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&&An(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,h){if(h&&(Ln(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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=_(this.options,this.schema.options||{})}}])&&Ai(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(Q);function Rn(l){return Rn=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},Rn(l)}function Ts(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(Rn(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Rn(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Rn(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 Ri(l,n){return Ri=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},Ri(l,n)}function _r(l){return _r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},_r(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&&Ri(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,h){if(h&&(Rn(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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",_({},{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)}}])&&Ts(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(Q),Va=(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")})}),Bo=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")},No=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 $o(l,n,p,i){try{switch(l.format){case"ipv4":Va(n);break;case"ipv6":Bo(n);break;case"hostname":No(n)}return[]}catch(u){return[{path:p,property:"format",message:i(u.message)}]}}function Ii(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 Mo(l,n,p){return(n=Di(n))in l?Object.defineProperty(l,n,{value:p,enumerable:!0,configurable:!0,writable:!0}):l[n]=p,l}function ti(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,h=!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(w){h=!0,s=w}finally{try{if(!c&&u.return!=null&&(e=u.return(),Object(e)!==e))return}finally{if(h)throw s}}return o}}(l,n)||ei(l,n)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
58
58
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function lr(l){return lr=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},lr(l)}function be(l){return function(n){if(Array.isArray(n))return ri(n)}(l)||function(n){if(typeof Symbol<"u"&&n[Symbol.iterator]!=null||n["@@iterator"]!=null)return Array.from(n)}(l)||ei(l)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
59
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function ei(l,n){if(l){if(typeof l=="string")return ri(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)?ri(l,n):void 0}}function ri(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 $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,Ii(i.key),i)}}function Ii(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 Di=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 h=[];Object.keys(t.dependentRequired).forEach(function(w){if(e[w]!==void 0){var S=t.dependentRequired[w];h=S.filter(function(D){return!E(e,D)})}}),h.length>0&&c.push({message:"Must have the required properties: "+h.join(", "),path:o})}return c},dependentSchemas:function(t,e,o){var c=this,h=[];return Object.keys(t.dependentSchemas).forEach(function(w){if(e[w]!==void 0){var S=t.dependentSchemas[w],D=c._validateSchema(S,e,o);h=[].concat(be(h),be(D))}}),h},contains:function(t,e,o){var c=this,h=[],w=0;e.forEach(function(D){c._validateSchema(t.contains,D,o).length===0&&w++});var S=w===0;return t.minContains!==void 0?w<t.minContains&&h.push({message:this.translate("error_minContains",[w,t.minContains],t),path:o}):S&&h.push({message:this.translate("error_contains",null,t),path:o}),t.maxContains!==void 0&&w>t.maxContains&&h.push({message:this.translate("error_maxContains",[w,t.maxContains],t),path:o}),h},if:function(t,e,o){if(t.then===void 0&&t.else===void 0)return[];var c=this._validateSchema(t.if,e,o),h=[],w=[];return t.then!==void 0&&(h=this._validateSchema(t.then,e,o)),t.else!==void 0&&(w=this._validateSchema(t.else,e,o)),t.if===!0?h:t.if===!1?w:c.length===0?h:c.length>0?w:[]},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(h){return c===JSON.stringify(h)})?[]:[{path:o,property:"enum",message:this.translate("error_enum",null,t)}]},extends:function(t,e,o){var c=this;return t.extends.reduce(function(h,w){return h.push.apply(h,be(c._validateSchema(w,e,o))),h},[])},allOf:function(t,e,o){var c=this;return t.allOf.reduce(function(h,w){return h.push.apply(h,be(c._validateSchema(w,e,o))),h},[])},anyOf:function(t,e,o){var c=this;return t.anyOf.some(function(h){return!c._validateSchema(h,e,o).length})?[]:[{path:o,property:"anyOf",message:this.translate("error_anyOf",null,t)}]},oneOf:function(t,e,o){var c=this,h=0,w=[];t.oneOf.forEach(function(D,J){var nt=c._validateSchema(D,e,o);nt.length||h++,nt.forEach(function(ut){ut.path="".concat(o,".oneOf[").concat(J,"]").concat(ut.path.substr(o.length))}),w.push.apply(w,be(nt))});var S=[];return h!==1&&(S.push({path:o,property:"oneOf",message:this.translate("error_oneOf",[h],t)}),S.push.apply(S,w)),S},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(h){return c._checkType(h,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(h){return c._checkType(h,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,h=[];if(Array.isArray(t.items))for(var w=0;w<e.length;w++)if(t.items[w])h.push.apply(h,be(this._validateSchema(t.items[w],e[w],"".concat(o,".").concat(w))));else{if(t.additionalItems===!0)break;if(!t.additionalItems){if(t.additionalItems===!1){h.push({path:o,property:"additionalItems",message:this.translate("error_additionalItems",null,t)});break}break}h.push.apply(h,be(this._validateSchema(t.additionalItems,e[w],"".concat(o,".").concat(w))))}else e.forEach(function(S,D){h.push.apply(h,be(c._validateSchema(t.items,S,"".concat(o,".").concat(D))))});return h},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={},h=0;h<e.length;h++){var w=JSON.stringify(e[h]);if(c[w])return[{path:o,property:"uniqueItems",message:this.translate("error_uniqueItems",null,t)}];c[w]=!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,h=[];return Array.isArray(t.required)&&t.required.forEach(function(w){if(e[w]===void 0){var S=c.jsoneditor.getEditor("".concat(o,".").concat(w));S&&S.dependenciesFulfilled===!1||S&&["button","info"].includes(S.schema.format||S.schema.type)||h.push({path:o,property:"required",message:c.translate("error_required",[t&&t.properties&&t.properties[w]&&t.properties[w].title?t.properties[w].title:w],t)})}}),h},properties:function(t,e,o,c){var h=this,w=[];return Object.entries(t.properties).forEach(function(S){var D=ti(S,2),J=D[0],nt=D[1];c[J]=!0,w.push.apply(w,be(h._validateSchema(nt,e[J],"".concat(o,".").concat(J))))}),w},patternProperties:function(t,e,o,c){var h=this,w=[];return Object.entries(t.patternProperties).forEach(function(S){var D=ti(S,2),J=D[0],nt=D[1],ut=new RegExp(J);Object.entries(e).forEach(function(dt){var kt=ti(dt,2),Ct=kt[0],Bt=kt[1];ut.test(Ct)&&(c[Ct]=!0,w.push.apply(w,be(h._validateSchema(nt,Bt,"".concat(o,".").concat(Ct)))))})}),w}},this._validateObjectSubSchema2={propertyNames:function(t,e,o,c){for(var h=this,w=[],S=Object.keys(e),D=null,J=function(){var dt="";return D=S[nt],typeof t.propertyNames=="boolean"?t.propertyNames===!0?"continue":(w.push({path:o,property:"propertyNames",message:h.translate("error_property_names_false",[D],t)}),"break"):Object.entries(t.propertyNames).every(function(kt){var Ct=ti(kt,2),Bt=Ct[0],re=Ct[1],Se=!1;switch(Bt){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&&(Se=!0)}),!Se){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 w.push({path:o,property:"propertyNames",message:h.translate("error_property_names_unsupported",[Bt],t)}),!1}return w.push({path:o,property:"propertyNames",message:h.translate(dt,[D],t)}),!1})?void 0:"break"},nt=0;nt<S.length;nt++){var ut=J();if(ut!=="continue"&&ut==="break")break}return w},additionalProperties:function(t,e,o,c){for(var h=[],w=Object.keys(e),S=0;S<w.length;S++){var D=w[S];if(!c[D]){if(!t.additionalProperties){h.push({path:o,property:"additionalProperties",message:this.translate("error_additional_properties",[D],t)});break}if(t.additionalProperties===!0)break;h.push.apply(h,be(this._validateSchema(t.additionalProperties,e[D],"".concat(o,".").concat(D))))}}return h},dependencies:function(t,e,o){var c=this,h=[];return Object.entries(t.dependencies).forEach(function(w){var S=ti(w,2),D=S[0],J=S[1];e[D]!==void 0&&(Array.isArray(J)?J.forEach(function(nt){e[nt]===void 0&&h.push({path:o,property:"dependencies",message:c.translate("error_dependency",[nt],t)})}):h.push.apply(h,be(c._validateSchema(J,e,o))))}),h}}}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?Ri(Object(dt),!0).forEach(function(kt){No(nt,kt,dt[kt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(nt,Object.getOwnPropertyDescriptors(dt)):Ri(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=ei(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 Bt,re=!0,Se=!1;return{s:function(){dt=dt.call(nt)},n:function(){var Ut=dt.next();return re=Ut.done,Ut},e:function(Ut){Se=!0,Bt=Ut},f:function(){try{re||dt.return==null||dt.return()}finally{if(Se)throw Bt}}}}(t.anyOf);try{for(c.s();!(e=c.n()).done;){var h=e.value,w=this.fitTest(i,h,a);(w.match>o.match||w.match===o.match&&w.extra<o.extra)&&(o=w)}}catch(nt){c.e(nt)}finally{c.f()}return o}var S=this._getSchema(u).properties;for(var D in S)if(E(S,D)){if(lr(i[D])==="object"&&lr(S[D])==="object"&&lr(S[D].properties)==="object"){var J=this.fitTest(i[D],S[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?_({},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=_({},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)),_({},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,h){return 1*c<1?[{path:h,property:"format",message:s.translate("error_invalid_epoch",null,o)}]:c!==Math.abs(parseInt(c))?[{path:h,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,h,w){if(c!==""){var S;if(w.flatpickr.config.mode!=="single"){var D=w.flatpickr.config.mode==="range"?w.flatpickr.l10n.rangeSeparator:", ";S=w.flatpickr.selectedDates.map(function(nt){return w.flatpickr.formatDate(nt,w.flatpickr.config.dateFormat)}).join(D)}try{if(S){if(S!==c)throw new Error("".concat(w.flatpickr.config.mode," mismatch"))}else if(w.flatpickr.formatDate(w.flatpickr.parseDate(c,w.flatpickr.config.dateFormat),w.flatpickr.config.dateFormat)!==c)throw new Error("mismatch")}catch{var J=w.flatpickr.config.errorDateFormat!==void 0?w.flatpickr.config.errorDateFormat:w.flatpickr.config.dateFormat;return[{path:h,property:"format",message:s.translate("error_".concat(w.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(Bo.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&&$o(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),l}();function He(l){return He=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},He(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(He(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(He(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),He(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 Mo(l,n){return Mo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},Mo(l,n)}function cr(l){return cr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},cr(l)}var Bi=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&&Mo(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,h){if(h&&(He(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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,h){var w,S;c&&(e.type===h?(e.keep_only_existing_values&&(w=c.getValue(),S=o,Object.keys(S).forEach(function(D){D in w&&(w[D]=S[D])}),o=w),(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],h=this.theme.getChildEditorHolder();this.editor_holder.appendChild(h),typeof c=="string"?(e=_({},this.schema)).type=c:(e=_({},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 w=this.jsoneditor.getEditorClass(e);this.editors[t]=this.jsoneditor.createEditor(w,{jsoneditor:this.jsoneditor,schema:e,container:h,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],h.addEventListener("change_header_text",function(){o.refreshHeaderText()}),t!==this.type&&(h.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&&N(this.thenSchema,this.schema,this.schema.then),this.schema.else&&N(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;He(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,h){var w;t.editors[h]=!1,typeof c=="string"?(w=_({},t.schema)).type=c:(w=_({},t.schema,c),c.required&&Array.isArray(c.required)&&t.schema.required&&Array.isArray(t.schema.required)&&(w.required=t.schema.required.concat(c.required))),t.validators[h]=new Di(t.jsoneditor,w,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,h={match:0,extra:0,i:this.type},w={match:0,i:null};this.validators.forEach(function(J,nt){var ut=null;o.anyOf!==void 0&&o.anyOf&&(ut=J.fitTest(t),(h.match<ut.match||h.match===ut.match&&h.extra>ut.extra)&&((h=ut).i=nt)),J.validate(t).length||w.i!==null?h=w:(w.i=nt,ut!==null&&(w.match=ut.match))});var S=w.i;this.anyOf!==void 0&&this.anyOf&&w.match<h.match&&(S=h.i),this.if&&(S=this.getIfType(t)),S===null&&(S=this.type),this.type=S,this.switcher.value=this.display_text[S];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,h){if(c){var w="".concat(e.path,".").concat(o,"[").concat(h,"]");c.showValidationErrors(t.reduce(function(S,D){if(D.path.startsWith(w)||D.path===w.substr(0,D.path.length)){var J=_({},D);D.path.startsWith(w)&&(J.path=e.path+J.path.substr(w.length)),S.push(J)}return S},[]))}})}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}(q);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 Ni(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 In(l,n){return In=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},In(l,n)}function Dn(l){return Dn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Dn(l)}var Ho=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&&In(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,h){if(h&&(fn(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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}}])&&Ni(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(q);function $i(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?$i(Object(p),!0).forEach(function(i){ni(l,i,p[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(l,Object.getOwnPropertyDescriptors(p)):$i(Object(p)).forEach(function(i){Object.defineProperty(l,i,Object.getOwnPropertyDescriptor(p,i))})}return l}function ni(l,n,p){return(n=Hi(n))in l?Object.defineProperty(l,n,{value:p,enumerable:!0,configurable:!0,writable:!0}):l[n]=p,l}function yn(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,h=!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(w){h=!0,s=w}finally{try{if(!c&&u.return!=null&&(e=u.return(),Object(e)!==e))return}finally{if(h)throw s}}return o}}(l,n)||function(p,i){if(p){if(typeof p=="string")return Mi(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)?Mi(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 Mi(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 Fo(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,Hi(i.key),i)}}function Hi(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 Fi(l,n){return Fi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},Fi(l,n)}function ur(l){return ur=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ur(l)}var ii=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&&Fi(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,h){if(h&&(Cr(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(c)}(this,t)});function s(t,e,o){var c;return function(h,w){if(!(h instanceof w))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 _({},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,Fe=o.editors[gt].schema.propertyOrder;return typeof Wt!="number"&&(Wt=1e3),typeof Fe!="number"&&(Fe=1e3),Wt-Fe});var h,w=this.format==="categories",S=[],D=null,J=null;if(this.format==="grid-strict"){var nt=0;if(h=[],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(),Fe=gt.options.hidden?0:gt.options.grid_offset||0,W=!gt.options.hidden&&(gt.options.grid_break||!1),G={key:Ut,width:Wt,offset:Fe,height:gt.options.hidden?0:gt.container.offsetHeight};h.push(G),S[nt]=h,W&&(nt++,h=[])}}),this.layout===JSON.stringify(S))return!1;for(this.layout=JSON.stringify(S),c=document.createElement("div"),t=0;t<S.length;t++)for(h=this.theme.getGridRow(),c.appendChild(h),e=0;e<S[t].length;e++)D=S[t][e].key,(J=this.editors[D]).options.hidden?J.container.style.display="none":this.theme.setGridColumnSize(J.container,S[t][e].width,S[t][e].offset),h.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,Fe=gt.options.hidden?0:gt.options.grid_columns||gt.getNumColumns(),W=gt.options.hidden?0:gt.container.offsetHeight,G=0;G<S.length;G++)S[G].width+Fe<=12&&(!W||.5*S[G].minh<W&&2*S[G].maxh>W)&&(Wt=G);Wt===!1&&(S.push({width:0,minh:999999,maxh:0,editors:[]}),Wt=S.length-1),S[Wt].editors.push({key:Ut,width:Fe,height:W}),S[Wt].width+=Fe,S[Wt].minh=Math.min(S[Wt].minh,W),S[Wt].maxh=Math.max(S[Wt].maxh,W)}}),t=0;t<S.length;t++)if(S[t].width<12){var ut=!1,dt=0;for(e=0;e<S[t].editors.length;e++)(ut===!1||S[t].editors[e].width>S[t].editors[ut].width)&&(ut=e),S[t].editors[e].width*=12/S[t].width,S[t].editors[e].width=Math.floor(S[t].editors[e].width),dt+=S[t].editors[e].width;dt<12&&(S[t].editors[ut].width+=12-dt),S[t].width=12}if(this.layout===JSON.stringify(S))return!1;for(this.layout=JSON.stringify(S),c=document.createElement("div"),t=0;t<S.length;t++)for(h=this.theme.getGridRow(),c.appendChild(h),e=0;e<S[t].editors.length;e++)D=S[t].editors[e].key,(J=this.editors[D]).options.hidden?J.container.style.display="none":this.theme.setGridColumnSize(J.container,S[t].editors[e].width),h.appendChild(J.container)}else{if(c=document.createElement("div"),w){var kt=document.createElement("div"),Ct=this.theme.getTopTabHolder(this.translateProperty(this.schema.title)),Bt=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(),Fe=gt.schema&&(gt.schema.type==="object"||gt.schema.type==="array");Wt.isObjOrArray=Fe;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),Fe?(Wt.appendChild(W),Bt.appendChild(Wt),o.theme.addTopTab(Ct,gt.tab)):(kt.appendChild(W),Bt.childElementCount>0?Bt.firstChild.isObjOrArray&&(Wt.appendChild(kt),Bt.insertBefore(Wt,Bt.firstChild),o.theme.insertBasicTopTab(gt.tab,Ct),gt.basicPane=Wt):(Wt.appendChild(kt),Bt.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=Bt,this.tabs_holder=Ct;var Se=this.theme.getFirstTab(this.tabs_holder);return void(Se&&O(Se,"click"))}this.property_order.forEach(function(Ut){var gt=o.editors[Ut];gt.property_removed||(h=o.theme.getGridRow(),c.appendChild(h),gt.options.hidden?gt.container.style.display="none":o.theme.setGridColumnSize(gt.container,12),h.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=_({},o);var c=!!this.schema.properties[t];return this.schema.patternProperties&&Object.keys(this.schema.patternProperties).forEach(function(h){new RegExp(h).test(t)&&(o.allOf=o.allOf||[],o.allOf.push(e.schema.patternProperties[h]),c=!0)}),!c&&this.schema.additionalProperties&&Cr(this.schema.additionalProperties)==="object"&&(o=_({},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=yn(e,2),c=o[0],h=o[1],w=t.jsoneditor.getEditorClass(h);t.editors[c]=t.jsoneditor.createEditor(w,{jsoneditor:t.jsoneditor,schema:h,path:"".concat(t.path,".").concat(c),parent:t,compact:!0,required:!0},t.currentDepth+1),t.editors[c].preBuild();var S=t.editors[c].options.hidden?0:t.editors[c].options.grid_columns||t.editors[c].getNumColumns();t.minwidth+=S,t.maxwidth+=S}),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,h=t.editors[o].schema.propertyOrder;return typeof c!="number"&&(c=1e3),typeof h!="number"&&(h=1e3),c-h})}},{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,h=t.schema.type==="object"||t.schema.type==="array";this.rows[c]=t,this.rows[c].rowPane=o,h?(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(h){h.tab&&h.rowPane&&h.rowPane.parentNode&&(o&&h.tab===e.rows[e.basicTab].tab&&c||(t?h.tab_text.textContent=h.getHeaderText():(o&&h.tab===e.rows[e.basicTab].tab&&(c=!0),h.tab===e.active_tab?e.theme.markTabActive(h):e.theme.markTabInactive(h))))})}},{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 h=yn(c,2),w=h[0],S=h[1],D=t.theme.getTableCell();t.editor_holder.appendChild(D),S.setContainer(D),S.build(),S.postBuild(),S.setOptInCheckbox(S.header),S.setValue(S.getDefault(),!0),t.editors[w].options.hidden&&(D.style.display="none"),t.editors[w].options.input_width&&(D.style.width=t.editors[w].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(h){var w=h.innerText,S=c.target.value;t.options.case_sensitive_property_search||t.jsoneditor.options.case_sensitive_property_search||(w=w.toLowerCase(),S=S.toLowerCase()),w.includes(S)?h.style.display="":h.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 h=t.theme.getTabContent(),w=t.theme.getGridColumn(),S=!(!c.schema||c.schema.type!=="object"&&c.schema.type!=="array");if(h.isObjOrArray=S,e){if(S){var D=t.theme.getGridContainer();D.appendChild(w),h.appendChild(D),t.tabPanesContainer.appendChild(h),t.row_container=D}else t.row_container_basic===void 0&&(t.row_container_basic=t.theme.getGridContainer(),h.appendChild(t.row_container_basic),t.tabPanesContainer.childElementCount===0?t.tabPanesContainer.appendChild(h):t.tabPanesContainer.insertBefore(h,t.tabPanesContainer.childNodes[1])),t.row_container_basic.appendChild(w);t.addRow(c,t.tabs_holder,h),h.id=t.getValidId(c.schema.title)}else t.row_container.appendChild(w);c.setContainer(w),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,h=o&&this.options.show_opt_in===!1;(c||!h&&e||!o&&e)&&Object.entries(this.editors).forEach(function(w){var S=yn(w,2),D=S[0],J=S[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 h=0;h<o.childNodes.length;h++){var w=o.childNodes[h];if(e.propertyOrder<w.propertyOrder){this.addproperty_list.insertBefore(e,w),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 h=this.theme.getCheckboxLabel(e),w=this.theme.getFormControl(h,c);return w.style.paddingBottom=w.style.marginBottom=w.style.paddingTop=w.style.marginTop=0,w.style.height="auto",this.insertPropertyControlUsingPropertyOrder(t,w,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),{},ni({},o,{}));case"additionalProperties":case"propertyNames":return Kr(Kr({},e),{},ni({},o,!0));default:return Kr(Kr({},e),{},ni({},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(S){return new RegExp(S).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),h=this.jsoneditor.options.max_depth;if(this.editors[t]=this.jsoneditor.createEditor(c,{jsoneditor:this.jsoneditor,schema:h&&this.currentDepth>=h?this.getSchemaOnMaxDepth(o):o,path:"".concat(this.path,".").concat(t),parent:this},this.currentDepth+1),this.editors[t].preBuild(),!e){var w=this.theme.getChildEditorHolder();this.editor_holder.appendChild(w),this.editors[t].setContainer(w),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(h){var w=yn(h,2),S=(w[0],w[1]);S.key===o&&(c=S)}),c&&!c.isActive()&&c.activate()})}},{key:"getDependentRequired",value:function(t){return this.schema.dependentRequired&&E(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(h){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(h){t.addPropertyCheckbox(h),t.isRequiredObject(t.cached_editors[h])&&h in t.editors&&(t.addproperty_checkboxes[h].disabled=!0),t.schema.minProperties!==void 0&&o<=t.schema.minProperties?(t.addproperty_checkboxes[h].disabled=t.addproperty_checkboxes[h].checked,t.addproperty_checkboxes[h].checked||(c=!0)):h in t.editors?c=!0:e||E(t.schema.properties,h)?(t.addproperty_checkboxes[h].disabled=!1,c=!0):t.addproperty_checkboxes[h].disabled=!0}),this.canHaveAdditionalProperties()&&(c=!0),Object.keys(this.schema.properties).forEach(function(h){t.cached_editors[h]||(c=!0,t.addPropertyCheckbox(h))}),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 h=yn(c,2),w=h[0],S=h[1];t[w]!==void 0?(o.addObjectProperty(w),S.setValue(t[w],e),S.activate()):e||o.isRequiredObject(S)?S.setValue(S.getDefault(),e):o.jsoneditor.options.show_opt_in||o.options.show_opt_in?S.deactivate():o.removeObjectProperty(w)}),Object.entries(t).forEach(function(c){var h=yn(c,2),w=h[0],S=h[1];o.cached_editors[w]||(o.addObjectProperty(w),o.editors[w]&&o.editors[w].setValue(S,e,!!o.editors[w].template))}),this.refreshValue(),this.layoutEditors(),this.onChange()}},{key:"showValidationErrors",value:function(t){var e=this,o=[],c=[];t.forEach(function(h){h.path===e.path?o.push(h):c.push(h)}),this.error_holder&&(o.length?(this.error_holder.innerHTML="",this.error_holder.style.display="",o.forEach(function(h){h.errorcount&&h.errorcount>1&&(h.message+=" (".concat(h.errorcount," errors)")),e.error_holder.appendChild(e.theme.getErrorMessage(h.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(h){h.showValidationErrors(c)})}}])&&Fo(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(q);function Bn(l){return Bn=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},Bn(l)}function Ts(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(Bn(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Bn(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Bn(u)==="symbol"?u:String(u)),i)}var u}function Nn(){return Nn=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=F(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}},Nn.apply(this,arguments)}function Vo(l,n){return Vo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},Vo(l,n)}function F(l){return F=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},F(l)}ii.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&&Vo(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=F(i);if(u){var o=F(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,h){if(h&&(Bn(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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(){Nn(F(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 h=this.theme.getFormRadioLabel(this.enum_display[o]);h.htmlFor=this.input.id;var w=this.theme.getFormRadioControl(h,this.input,!(this.options.layout!=="horizontal"&&!this.options.compact));this.radioContainer.appendChild(w)}if(this.schema.readOnly||this.schema.readonly){this.disable(!0);for(var S=0;S<this.radioGroup.length;S++)this.radioGroup[S].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"),Nn(F(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"),Nn(F(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),Nn(F(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}}}])&&Ts(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(Qn);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 me(){return me=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=De(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}},me.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 De(l){return De=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},De(l)}var Vi=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=De(i);if(u){var o=De(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,h){if(h&&(Ot(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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=me(De(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",me(De(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",_({},{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 me(De(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),me(De(s.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.sceditor_instance&&this.sceditor_instance.readOnly(!0),me(De(s.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.sceditor_instance&&(this.sceditor_instance.destroy(),this.sceditor_instance=null),me(De(s.prototype),"destroy",this).call(this)}}])&&pe(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(Q);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 Wu(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 oi(){return oi=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}},oi.apply(this,arguments)}function Ls(l,n){return Ls=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},Ls(l,n)}function tn(l){return tn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},tn(l)}var Zu=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&&Ls(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,h){if(h&&(zi(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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 oi(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",_({},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=E(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)}oi(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)),oi(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)),oi(tn(s.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.select2_instance&&(this.select2_instance.select2("destroy"),this.select2_instance=null),oi(tn(s.prototype),"destroy",this).call(this)}}])&&Wu(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(Qn);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 Ju(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 $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=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}},$n.apply(this,arguments)}function As(l,n){return As=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},As(l,n)}function zr(l){return zr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},zr(l)}var Yu=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&&As(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,h){if(h&&(qi(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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 $n(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",_({},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)}$n(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;$n(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(),$n(zr(s.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.selectize_instance&&this.selectize_instance.lock(),$n(zr(s.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.selectize_instance&&(this.selectize_instance.destroy(),this.selectize_instance=null),$n(zr(s.prototype),"destroy",this).call(this)}}])&&Ju(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(Qn);function Ui(l){return Ui=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},Ui(l)}function Xu(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(Ui(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Ui(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Ui(u)==="symbol"?u:String(u)),i)}var u}function Rs(l,n){return Rs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},Rs(l,n)}function Va(l){return Va=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Va(l)}var Qu=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&&Rs(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=Va(i);if(u){var o=Va(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,h){if(h&&(Ui(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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 h=document.createElement("div"),w=document.createElement("button");w.classList.add("tiny","button"),w.innerHTML="Clear signature",h.appendChild(w),o.appendChild(h),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})),w.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 S=document.createElement("p");S.innerHTML="Signature pad is not available, please include SignaturePad from https://github.com/szimek/signature_pad",this.container.appendChild(S)}}},{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}}])&&Xu(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 Ku(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 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=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}},Mn.apply(this,arguments)}function Is(l,n){return Is=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},Is(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 th=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&&Is(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,h){if(h&&(Gi(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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=Mn(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",Mn(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",_({},{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)):Mn(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),Mn(qr(s.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.simplemde_instance&&(this.simplemde_instance.codemirror.options.readOnly=!0),Mn(qr(s.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.simplemde_instance&&(this.simplemde_instance.toTextArea(),this.simplemde_instance=null),Mn(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)}}])&&Ku(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(Q);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 eh(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 Ds(){return Ds=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=Zi(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}},Ds.apply(this,arguments)}function Bs(l,n){return Bs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},Bs(l,n)}function Zi(l){return Zi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Zi(l)}var gc=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&&Bs(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=Zi(i);if(u){var o=Zi(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,h){if(h&&(Wi(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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)},h=this.enum_values.length-1;h>-1;h--){var w=this.formname+(h+1),S=this.theme.getFormInputField("radio");S.name="".concat(this.formname,"[starrating]"),S.value=this.enum_values[h],S.id=w,S.addEventListener("change",c,!1),this.radioGroup.push(S);var D=document.createElement("label");D.htmlFor=w,D.title=this.enum_values[h],this.options.displayValue&&D.classList.add("starrating-display-enabled"),this.ratingContainer.appendChild(S),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),Ds(Zi(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}}}])&&eh(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 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(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 zo(){return zo=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}},zo.apply(this,arguments)}function Ns(l,n){return Ns=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},Ns(l,n)}function Hn(l){return Hn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Hn(l)}gc.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 nh=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&&Ns(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,h){if(h&&(Ji(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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(){zo(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(){zo(Hn(s.prototype),"enable",this).call(this),this.stepperDown.removeAttribute("disabled"),this.stepperUp.removeAttribute("disabled")}},{key:"disable",value:function(){zo(Hn(s.prototype),"disable",this).call(this),this.stepperDown.setAttribute("disabled",!0),this.stepperUp.setAttribute("disabled",!0)}}])&&rh(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(Ma);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 ih(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 ai(){return ai=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}},ai.apply(this,arguments)}function $s(l,n){return $s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},$s(l,n)}function en(l){return en=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},en(l)}var oh=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&&$s(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,h){if(h&&(Yi(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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(ai(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(ai(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,ai(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 h=this.theme.getTableHeaderCell(e[o[c]].getTitle());e[o[c]].options.hidden&&(h.style.display="none"),this.header_row.appendChild(h)}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(),ai(en(s.prototype),"onChildEditorChange",this).call(this)}},{key:"getItemDefault",value:function(){return _({},{default:this.item_default}).default}},{key:"getItemTitle",value:function(){return this.item_title}},{key:"getElementEditor",value:function(t,e){var o=_({},this.schema.items),c=this.jsoneditor.getEditorClass(o,this.jsoneditor),h=this.row_holder.appendChild(this.theme.getTableRow()),w=h;this.item_has_child_editors||(w=this.theme.getTableCell(),h.appendChild(w));var S=this.jsoneditor.createEditor(c,{jsoneditor:this.jsoneditor,schema:o,container:w,path:"".concat(this.path,".").concat(t),parent:this,compact:!0,table_row:!0});return S.preBuild(),e||(S.build(),S.postBuild(),S.controls_cell=h.appendChild(this.theme.getTableCell()),S.row=h,S.table_controls=this.theme.getButtonHolder(),S.controls_cell.appendChild(S.table_controls),S.table_controls.style.margin=0,S.table_controls.style.padding=0),S}},{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,ai(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(S,D){t.rows[D]?t.rows[D].setValue(S):(t.addRow(S),c=!0)});for(var h=e.length;h<this.rows.length;h++){var w=this.rows[h].container;this.item_has_child_editors||this.rows[h].row.parentNode.removeChild(this.rows[h].row),this.rows[h].destroy(),w.parentNode&&w.parentNode.removeChild(w),this.rows[h]=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 Bt=ut!==t.rows.length-1;t.setButtonState(nt.movedown_button,Bt),c.push(Bt)}});var h=c.some(function(nt){return nt});this.rows.forEach(function(nt){return t.setButtonState(nt.controls_cell,h)}),this.setButtonState(this.controls_header_cell,h),this.setButtonState(this.table,this.value.length);var w=!(o||this.hide_add_button);this.setButtonState(this.add_row_button,w);var S=!(!this.value.length||e||this.hide_delete_last_row_buttons);this.setButtonState(this.delete_last_row_button,S);var D=!(this.value.length<=1||e||this.hide_delete_all_rows_buttons);this.setButtonState(this.remove_all_rows_button,D);var J=w||S||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(h){if(h.preventDefault(),h.stopPropagation(),!o.askConfirmation())return!1;var w=1*h.currentTarget.getAttribute("data-i"),S=o.getValue(),D=o.getValue()[w];S.splice(w,1),o.setValue(S),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"),h=this.schema;return c.classList.add("copy","json-editor-btntype-copy"),c.setAttribute("data-i",t),c.addEventListener("click",function(w){w.preventDefault(),w.stopPropagation();var S=1*w.currentTarget.getAttribute("data-i"),D=o.getValue(),J=D[S];h.items.type==="string"&&h.items.format==="uuid"?J=R():h.items.type==="object"&&h.items.properties&&D.forEach(function(nt,ut){if(S===ut)for(var dt=0,kt=Object.keys(nt);dt<kt.length;dt++){var Ct=kt[dt];h.items.properties&&h.items.properties[Ct]&&h.items.properties[Ct].format==="uuid"&&((J=Object.assign({},D[S]))[Ct]=R())}}),D.splice(S+1,0,J),o.setValue(D),o.onChange(!0),o.jsoneditor.trigger("copyRow",o.rows[S+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(h){h.preventDefault(),h.stopPropagation();var w=1*h.currentTarget.getAttribute("data-i"),S=o.getValue();S.splice(w-1,0,S.splice(w,1)[0]),o.setValue(S),o.onChange(!0),o.jsoneditor.trigger("moveRow",o.rows[w-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(h){h.preventDefault(),h.stopPropagation();var w=1*h.currentTarget.getAttribute("data-i"),S=o.getValue();S.splice(w+1,0,S.splice(w,1)[0]),o.setValue(S),o.onChange(!0),o.jsoneditor.trigger("moveRow",o.rows[w+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(),h=c.pop();t.setValue(c),t.onChange(!0),t.jsoneditor.trigger("deleteRow",h)}),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&&ih(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(zt);function Xi(l){return Xi=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},Xi(l)}function ah(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(Xi(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Xi(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Xi(u)==="symbol"?u:String(u)),i)}var u}function qo(){return qo=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=Fn(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}},qo.apply(this,arguments)}function Ms(l,n){return Ms=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},Ms(l,n)}function Fn(l){return Fn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Fn(l)}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 sh(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 Uo(){return Uo=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}},Uo.apply(this,arguments)}function Hs(l,n){return Hs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},Hs(l,n)}function Vn(l){return Vn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Vn(l)}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 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(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 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=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}},si.apply(this,arguments)}function Fs(l,n){return Fs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},Fs(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 za={ace:Et,array:zt,arrayChoices:er,arraySelect2:or,arraySelectize:Ue,autocomplete:On,base64:ji,button:Ra,checkbox:Da,choices:rt,datetime:bt,describedBy:Qe,enum:Re,hidden:Ba,info:Ci,integer:Ma,ip:Ro,jodit:Ha,multiple:Bi,multiselect:qt,null:Ho,number:$a,object:ii,radio:at,sceditor:Vi,select:Qn,select2:Zu,selectize:Yu,signature:Qu,simplemde:th,starrating:gc,stepper:nh,string:Q,table:oh,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&&Ms(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=Fn(i);if(u){var o=Fn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,h){if(h&&(Xi(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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",_({},{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,h,w,S){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 h=c.target.files||c.dataTransfer.files;if(h&&h.length)if(t.options.max_upload_size!==0&&h[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(h[0].type,t.options.mime_type)){t.fileDisplay&&(t.fileDisplay.value=h[0].name);var w=new window.FileReader;w.onload=function(S){t.preview_value=S.target.result,t.refreshPreview(h),t.onChange(!0),w=null},w.readAsDataURL(h[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 h=c.dataTransfer.items||c.dataTransfer.files,w=h&&h.length&&(t.options.mime_type.length===0||t.isValidMimeType(h[0].type,t.options.mime_type)),S=c.currentTarget.classList&&c.currentTarget.classList.contains("upload-dropzone")&&w;switch((c.currentTarget===window?"w_":"e_")+c.type){case"w_drop":case"w_dragover":S||(c.dataTransfer.dropEffect="none");break;case"e_dragenter":S?(t.dropZone.classList.add("valid-dropzone"),c.dataTransfer.dropEffect="copy"):t.dropZone.classList.add("invalid-dropzone");break;case"e_dragover":S&&(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"),S&&t.uploadHandler(c)}S||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 h=Math.floor(Math.log(o.size)/Math.log(1024));o.formattedSize="".concat(parseFloat((o.size/Math.pow(1024,h)).toFixed(2))," ").concat(["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][h])}else o.formattedSize="0 Bytes";var w=this.getButton("button_upload","upload","button_upload");w.addEventListener("click",function(S){S.preventDefault(),w.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),w.removeAttribute("disabled")},failure:function(D){e.theme.addInputError(e.uploader,D),e.progressBar&&e.preview.removeChild(e.progressBar),w.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,w,this.preview_value)),this.options.auto_upload&&(w.dispatchEvent(new window.MouseEvent("click")),w.parentNode.removeChild(w))}}},{key:"enable",value:function(){this.always_disabled||(this.uploader&&(this.uploader.disabled=!1),qo(Fn(s.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.uploader&&(this.uploader.disabled=!0),qo(Fn(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),qo(Fn(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)}}])&&ah(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(q),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&&Hs(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,h){if(h&&(Qi(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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(){Uo(Vn(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(){Uo(Vn(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,Uo(Vn(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)}}])&&sh(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&&Fs(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,h){if(h&&(Ki(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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=si(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(){si(rn(s.prototype),"afterInputReady",this).call(this),this.createPicker(!0)}},{key:"disable",value:function(){if(si(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(si(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),si(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",_({},{editor:!1,alpha:!1,color:this.value,popup:"bottom"},this.defaults.options.colorpicker||{},this.options.colorpicker||{},{parent:this.container})),c=function(h){var w=e.picker_instance.settings.editorFormat,S=e.picker_instance.settings.alpha;e.setValue(w==="hex"?S?h.hex:h.hex.slice(0,7):h["".concat(w+(S?"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="")}}])&&lh(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(Q)};function wc(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 _c={},Vs="en",ch=Vs;_c.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(za).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,h,w,S=[],D=!0,J=!1;try{if(h=(e=e.call(s)).next,t===0){if(Object(e)!==e)return;D=!1}else for(;!(D=(o=h.call(e)).done)&&(S.push(o.value),S.length!==t);D=!0);}catch(nt){J=!0,c=nt}finally{try{if(!D&&e.return!=null&&(w=e.return(),Object(w)!==w))return}finally{if(J)throw c}}return S}}(u,a)||function(s,t){if(s){if(typeof s=="string")return wc(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)?wc(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.`)}()}(l,2),p=n[0],i=n[1];
|
|
63
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function jc(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 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(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 hh=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=ui(e,2),c=o[0],h=o[1];s.anyOf[c]=t.expandSchema(h)})},dependencies:function(s){var t=this;Object.entries(s.dependencies).forEach(function(e){var o=ui(e,2),c=o[0],h=o[1];rr(h)!=="object"||Array.isArray(h)||(s.dependencies[c]=t.expandSchema(h))})},not:function(s){s.not=this.expandSchema(s.not)}},this._subSchema2={allOf:function(s,t){var e=this,o=_({},t);return Object.entries(s.allOf).forEach(function(c){var h=ui(c,2),w=h[0],S=h[1];s.allOf[w]=e.expandRefs(S,!0),o=e.extendSchemas(o,e.expandSchema(S))}),delete o.allOf,o},extends:function(s,t){var e,o=this;return delete(e=Array.isArray(s.extends)?s.extends.reduce(function(c,h,w){return o.extendSchemas(c,o.expandSchema(h))},t):this.extendSchemas(t,this.expandSchema(s.extends))).extends,e},oneOf:function(s,t){var e=this,o=_({},t);return delete o.oneOf,s.oneOf.reduce(function(c,h,w){return c.oneOf[w]=e.extendSchemas(e.expandSchema(h),o),c},t),t}}}var n,p,i,u;return n=l,p=[{key:"load",value:(u=kc(ci().mark(function a(s,t,e){return ci().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=_({},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]),h=this.extendSchemas(e,this.expandSchema(c));return delete h.$ref,h}var w=o.length>2?this.refs_with_info["#"+o[1]]:this.refs_with_info[e.$ref];delete e.$ref;var S=w.$ref.startsWith("#")?w.fetchUrl:"",D=this._getRef(S,w);if(this.refs[D]){if(s&&E(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=ui(e,2),c=o[0],h=o[1];a[c]&&h.call(s,a)});var t=_({},a);return Object.entries(this._subSchema2).forEach(function(e){var o=ui(e,2),c=o[0],h=o[1];a[c]&&(t=h.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 h=a.$ref,w="";h.indexOf("#")>0&&(h=h.substr(0,h.indexOf("#"))),h!==a.$ref&&(w=a.$ref.substr(a.$ref.indexOf("#")));var S=this.refs_prefix+this.refs_counter++,D=S+w;a.$ref.substr(0,1)==="#"||this.refs[a.$ref]||(o[h]=!0),this.refs_with_info[S]={fetchUrl:s,$ref:h},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=kc(ci().mark(function a(s,t,e){var o,c,h,w,S,D,J=this,nt=arguments;return ci().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),h=0,w=ci().mark(function dt(){var kt,Ct,Bt,re,Se,Ut,gt,Wt,Fe,W,G;return ci().wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:if((kt=D[S])!==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",h++,Ct=J.options.urn_resolver,Bt=kt,typeof Ct=="function"){Z.next=13;break}throw console.log('No "urn_resolver" callback defined to resolve "'.concat(Bt,'"')),new Error("Must set urn_resolver option to a callback to resolve ".concat(Bt));case 13:return Bt.indexOf("#")>0&&(Bt=Bt.substr(0,Bt.indexOf("#"))),Z.prev=14,Z.next=17,Ct(Bt);case 17:re=Z.sent,Z.prev=18,Se=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(Bt));case 26:if(!(typeof Se!="boolean"&&rr(Se)!=="object"||Se===null||Array.isArray(Se))){Z.next=28;break}throw new Error("External ref does not contain a valid schema - ".concat(Bt));case 28:return J.refs[kt]=Se,Z.next=31,J._asyncloadExternalRefs(Se,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(Bt));case 37:if(typeof re!="boolean"){Z.next=39;break}throw new Error("External ref does not contain a valid schema - ".concat(Bt));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(h++,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((Fe=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(Fe.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]])}),S=0,D=Object.keys(c);case 5:if(!(S<D.length)){ut.next=13;break}return ut.delegateYield(w(),"t0",7);case 7:if(ut.t0!=="continue"){ut.next=10;break}return ut.abrupt("continue",10);case 10:S++,ut.next=5;break;case 13:if(h){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=_({},a),s=_({},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(h){return s.type.includes(h)}):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 h=ui(c,2),w=h[0],S=h[1];s[w]!==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)}(w,S):e[w]=S}),Object.entries(s).forEach(function(c){var h=ui(c,2),w=h[0],S=h[1];a[w]===void 0&&(e[w]=S)}),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&&uh(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),l}(),dh=(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(h){for(e=h,s=0;s<c&&(e=e[o[s]]);s++);return e}:(o=o[0],t=function(h){return h[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 Go(l){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(l)}function zs(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 ph(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(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(u)==="symbol"?u:String(u)),i)}var u}var fh={collapse:"",expand:"",delete:"",edit:"",add:"",cancel:"",save:"",moveup:"",movedown:""},mn=function(){function l(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:fh;(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 zs(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 zs(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)?zs(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}}])&&ph(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),l}();function qs(l){return qs=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},qs(l)}function Us(l,n){return Us=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},Us(l,n)}function qa(l){return qa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},qa(l)}var yh="glyphicon glyphicon-",mh={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"},vh=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&&Us(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&&(qs(c)==="object"||typeof c=="function"))return c;if(c!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(h){if(h===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h}(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,yh,mh)}return n=a,Object.defineProperty(n,"prototype",{writable:!1}),n}(mn);function Gs(l){return Gs=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},Gs(l)}function Ws(l,n){return Ws=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},Ws(l,n)}function Ua(l){return Ua=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ua(l)}var bh="icon-",gh={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"},wh=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&&Ws(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=Ua(p);if(i){var e=Ua(this).constructor;s=Reflect.construct(t,arguments,e)}else s=t.apply(this,arguments);return function(o,c){if(c&&(Gs(c)==="object"||typeof c=="function"))return c;if(c!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(h){if(h===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h}(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,bh,gh)}return n=a,Object.defineProperty(n,"prototype",{writable:!1}),n}(mn);function Zs(l){return Zs=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},Zs(l)}function Js(l,n){return Js=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},Js(l,n)}function Ga(l){return Ga=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ga(l)}var _h="fa fa-",xh={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"},kh=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&&Js(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=Ga(p);if(i){var e=Ga(this).constructor;s=Reflect.construct(t,arguments,e)}else s=t.apply(this,arguments);return function(o,c){if(c&&(Zs(c)==="object"||typeof c=="function"))return c;if(c!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(h){if(h===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h}(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,_h,xh)}return n=a,Object.defineProperty(n,"prototype",{writable:!1}),n}(mn);function Ys(l){return Ys=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},Ys(l)}function Xs(l,n){return Xs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},Xs(l,n)}function Wa(l){return Wa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Wa(l)}var jh="fas fa-",Oh={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"},Eh=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&&Xs(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=Wa(p);if(i){var e=Wa(this).constructor;s=Reflect.construct(t,arguments,e)}else s=t.apply(this,arguments);return function(o,c){if(c&&(Ys(c)==="object"||typeof c=="function"))return c;if(c!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(h){if(h===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h}(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,jh,Oh)}return n=a,Object.defineProperty(n,"prototype",{writable:!1}),n}(mn);function Qs(l){return Qs=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},Qs(l)}function Ks(l,n){return Ks=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},Ks(l,n)}function Za(l){return Za=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Za(l)}var Ch="ui-icon ui-icon-",Sh={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"},Ph=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&&Ks(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=Za(p);if(i){var e=Za(this).constructor;s=Reflect.construct(t,arguments,e)}else s=t.apply(this,arguments);return function(o,c){if(c&&(Qs(c)==="object"||typeof c=="function"))return c;if(c!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(h){if(h===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h}(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,Ch,Sh)}return n=a,Object.defineProperty(n,"prototype",{writable:!1}),n}(mn);function tl(l){return tl=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},tl(l)}function el(l,n){return el=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},el(l,n)}function Ja(l){return Ja=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ja(l)}var Th="oi oi-",Lh={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"},Ah=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&&el(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=Ja(p);if(i){var e=Ja(this).constructor;s=Reflect.construct(t,arguments,e)}else s=t.apply(this,arguments);return function(o,c){if(c&&(tl(c)==="object"||typeof c=="function"))return c;if(c!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(h){if(h===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h}(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,Th,Lh)}return n=a,Object.defineProperty(n,"prototype",{writable:!1}),n}(mn);function rl(l){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(l)}function nl(l,n){return nl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},nl(l,n)}function Ya(l){return Ya=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ya(l)}var Rh="icon icon-",Ih={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"},Dh=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&&nl(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&&(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(h){if(h===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h}(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,Rh,Ih)}return n=a,Object.defineProperty(n,"prototype",{writable:!1}),n}(mn);function il(l){return il=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},il(l)}function ol(l,n){return ol=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},ol(l,n)}function Xa(l){return Xa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Xa(l)}var Bh="bi bi-",Nh={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"},$h={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&&ol(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&&(il(c)==="object"||typeof c=="function"))return c;if(c!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(h){if(h===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h}(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,Bh,Nh)}return n=a,Object.defineProperty(n,"prototype",{writable:!1}),n}(mn),bootstrap3:vh,fontawesome3:wh,fontawesome4:kh,fontawesome5:Eh,jqueryui:Ph,openiconic:Ah,spectre:Dh};function Wo(l){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(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(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(u)==="symbol"?u:String(u)),i)}var u}var Oc=["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"].find(function(l){return l in document.documentElement}),vn=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,h){c.value=Number(h||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[Oc])return!1;if(i[Oc](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&&Mh(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),l}();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 Hh(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 hi(){return hi=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}},hi.apply(this,arguments)}function al(l,n){return al=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},al(l,n)}function nn(l){return nn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},nn(l)}var Ec=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&&al(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,h){if(h&&(to(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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=hi(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=hi(nn(s.prototype),"getFormInputDescription",this).call(this,t);return e.classList.add("je-form-input-label"),e}},{key:"getIndentedPanel",value:function(){var t=hi(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=hi(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=hi(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")}}])&&Hh(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(vn);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 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(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 di(){return di=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}},di.apply(this,arguments)}function sl(l,n){return sl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},sl(l,n)}function on(l){return on=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},on(l)}Ec.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 Cc=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&&sl(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,h){if(h&&(eo(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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=di(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 di(on(s.prototype),"getRangeInput",this).call(this,t,e,o)}},{key:"getFormInputField",value:function(t){var e=di(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 h=document.createElement("div");return!t||e.type!=="checkbox"&&e.type!=="radio"?(h.classList.add("form-group"),t&&(t.classList.add("control-label"),h.appendChild(t),c&&t.appendChild(c)),h.appendChild(e)):(h.classList.add(e.type),c&&t.appendChild(c),t.insertBefore(e,t.firstChild),h.appendChild(t)),o&&h.appendChild(o),h}},{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=di(on(s.prototype),"getButton",this).call(this,t,e,o);return c.classList.add("btn","btn-default"),c}},{key:"getTableContainer",value:function(){var t=di(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 h=0;h<e.length;h++)c.appendChild(e[h]);return o}}}])&&Fh(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(vn);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 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(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 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=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}},pi.apply(this,arguments)}function ll(l,n){return ll=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},ll(l,n)}function an(l){return an=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},an(l)}Cc.rules={},k(3843);var zh={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"},Sc=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&&ll(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,h){if(h&&(ro(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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,zh)}return n=s,(p=[{key:"getSelectInput",value:function(t,e){var o=pi(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=pi(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"),h=document.createElement("button");h.setAttribute("type","button");var w=document.createElement("button");w.setAttribute("type","button"),e.appendChild(o),e.appendChild(t),e.appendChild(c),o.appendChild(h),c.appendChild(w),e.classList.add("input-group"),o.classList.add("input-group-prepend"),c.classList.add("input-group-append"),h.classList.add("btn"),h.classList.add("btn-secondary"),h.classList.add("stepper-down"),w.classList.add("btn"),w.classList.add("btn-secondary"),w.classList.add("stepper-up"),t.getAttribute("readonly")&&(h.setAttribute("disabled",!0),w.setAttribute("disabled",!0)),h.textContent="-",w.textContent="+";var S=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")}),h.addEventListener("click",function(){t.getAttribute("initialized")?D?Number(t.value)>Number(D)&&t.stepDown():t.stepDown():S(t,D),O(t,"change")}),w.addEventListener("click",function(){t.getAttribute("initialized")?J?Number(t.value)<Number(J)&&t.stepUp():t.stepUp():S(t,D),O(t,"change")}),e}},{key:"getFormInputField",value:function(t){var e=pi(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 h=document.createElement("div");if(h.classList.add("form-group"),!t||e.type!=="checkbox"&&e.type!=="radio")t&&(h.appendChild(t),c&&h.appendChild(c)),h.appendChild(e);else{var w=document.createElement("div");this.options.custom_forms===!1?(w.classList.add("form-check"),e.classList.add("form-check-input"),t.classList.add("form-check-label")):(w.classList.add("custom-control"),e.classList.add("custom-control-input"),t.classList.add("custom-control-label"),e.type==="checkbox"?w.classList.add("custom-checkbox"):w.classList.add("custom-radio"));var S=(Date.now()*Math.random()).toFixed(0);e.setAttribute("id",S),t.setAttribute("for",S),w.appendChild(e),w.appendChild(t),c&&w.appendChild(c),h.appendChild(w)}return o&&h.appendChild(o),h}},{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 h=document.createElement("div");h.classList.add("form-group"),e&&(h.appendChild(e),c&&e.appendChild(c));var w=document.createElement("div");return Object.values(t).forEach(function(S){var D=S.firstChild;w.appendChild(D)}),h.appendChild(w),o&&h.appendChild(o),h}},{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=pi(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=pi(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 h=0;h<e.length;h++)e[h].classList.remove("mr-2","btn-secondary"),e[h].classList.add("btn-outline-secondary"),c.appendChild(e[h]);return o}}}])&&Vh(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(vn);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 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(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 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=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}},fi.apply(this,arguments)}function cl(l,n){return cl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},cl(l,n)}function sn(l){return sn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},sn(l)}Sc.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 Uh={disable_theme_rules:!1,input_size:"normal",object_indent:!0,object_background:"bg-light",object_text:"",table_border:!1,table_zebrastyle:!1,tooltip:"bootstrap"},Pc=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&&cl(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,h){if(h&&(no(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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,Uh)}return n=s,(p=[{key:"getSelectInput",value:function(t,e){var o=fi(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=fi(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 h=function(D,J){D.value=Number(J||D.value),D.setAttribute("initialized","1")},w=t.getAttribute("min"),S=t.getAttribute("max");return t.addEventListener("change",function(){t.getAttribute("initialized")||t.setAttribute("initialized","1")}),o.addEventListener("click",function(){t.getAttribute("initialized")?w?Number(t.value)>Number(w)&&t.stepDown():t.stepDown():h(t,w),O(t,"change")}),c.addEventListener("click",function(){t.getAttribute("initialized")?S?Number(t.value)<Number(S)&&t.stepUp():t.stepUp():h(t,w),O(t,"change")}),e}},{key:"getFormInputField",value:function(t){var e=fi(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 h=document.createElement("div");if(h.classList.add("form-group"),!t||e.type!=="checkbox"&&e.type!=="radio")t&&(t.classList.add("form-label"),h.appendChild(t),c&&h.appendChild(c)),h.appendChild(e);else{var w=document.createElement("div");w.classList.add("form-check"),e.classList.add("form-check-input"),t.classList.add("form-check-label");var S=(Date.now()*Math.random()).toFixed(0);e.setAttribute("id",S),t.setAttribute("for",S),w.appendChild(e),w.appendChild(t),c&&w.appendChild(c),h.appendChild(w)}return o&&h.appendChild(o),h}},{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 h=document.createElement("div");h.classList.add("form-group"),e&&(h.appendChild(e),c&&e.appendChild(c));var w=document.createElement("div");return Object.values(t).forEach(function(S){var D=S.firstChild;w.appendChild(D)}),h.appendChild(w),o&&h.appendChild(o),h}},{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=fi(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=fi(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}}}])&&qh(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(vn);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 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(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 oo(){return oo=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=bn(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}},oo.apply(this,arguments)}function ul(l,n){return ul=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},ul(l,n)}function bn(l){return bn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},bn(l)}Pc.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 Tc=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&&ul(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=bn(i);if(u){var o=bn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,h){if(h&&(io(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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=oo(bn(s.prototype),"getTable",this).call(this);return t.setAttribute("cellpadding",5),t.setAttribute("cellspacing",0),t}},{key:"getTableHeaderCell",value:function(t){var e=oo(bn(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(bn(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 h=oo(bn(s.prototype),"getFormControl",this).call(this,t,e,o,c);return e.type==="checkbox"?(h.style.lineHeight="25px",h.style.padding="3px 0"):h.style.padding="4px 0 8px 0",h}},{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 h=document.createElement("span");return h.classList.add("ui-button-text"),h.textContent=t||o||".",c.appendChild(h),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 h=document.createElement("span");h.classList.add("ui-button-text"),h.textContent=e||c||".",t.appendChild(h),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"}}])&&Gh(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(vn);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 Wh(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 hl(l,n){return hl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},hl(l,n)}function Qa(l){return Qa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Qa(l)}Tc.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 Lc=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&&hl(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=Qa(i);if(u){var o=Qa(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,h){if(h&&(ao(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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")}}])&&Wh(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(vn);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 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(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 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 dl(l,n){return dl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},dl(l,n)}function Ye(l){return Ye=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ye(l)}Lc.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 Jh={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"},Ac=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&&dl(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,h){if(h&&(so(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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,Jh)}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 h=document.createElement("div");return h.classList.add("form-group"),!t||e.type!=="checkbox"&&e.type!=="radio"?(t&&(t.classList.add("form-label"),h.appendChild(t),c&&t.appendChild(c)),h.appendChild(e)):(h.classList.add(e.type),c&&t.appendChild(c),t.insertBefore(e,t.firstChild),h.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"&&h.appendChild(e),o&&h.appendChild(o),h}},{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 h=document.createElement("div");h.classList.add("popover-container"),e.appendChild(h);var w=document.createElement("div");w.classList.add("card"),h.appendChild(w);var S=document.createElement("div");return S.classList.add("card-body"),S.innerHTML=t,w.appendChild(S),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"))}}])&&Zh(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(vn);function lo(l){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(l)}function Yh(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(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(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 pl(l,n){return pl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},pl(l,n)}function Xe(l){return Xe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Xe(l)}Ac.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 Xh={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},Rc=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&&pl(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,h){if(h&&(lo(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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,Xh)}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 h=dr(Xe(s.prototype),"getMultiCheckboxHolder",this).call(this,t,e,o,c);return h.classList.add("inline-flex","flex-col"),h}},{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,h){var w=dr(Xe(s.prototype),"getRadioHolder",this).call(this,e,o,c,h);return t.options.layout==="h"?w.classList.add("inline-flex","flex-row"):w.classList.add("inline-flex","flex-col"),w}},{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 h=document.createElement("div");return h.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)),h.appendChild(t),!["checkbox","radio"].includes(e.type)&&c&&h.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"),h.appendChild(e)),o&&h.appendChild(o),h}},{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 h=0;h<e.length;h++)c.appendChild(e[h]);return o}}}])&&Yh(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(vn);Rc.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 Qh={html:Ec,bootstrap3:Cc,bootstrap4:Sc,bootstrap5:Pc,jqueryui:Tc,barebones:Lc,spectre:Ac,tailwind:Rc};const Kh={".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 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 fl(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 yl(){yl=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 w?G:w,Lt=Object.create(et.prototype),ee=new gt(pt||[]);return i(Lt,"_invoke",{value:Bt(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 h={};function w(){}function S(){}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=w.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,je){var Oe=c(W[et],W,Lt);if(Oe.type!=="throw"){var Sr=Oe.arg,Ur=Sr.value;return Ur&&co(Ur)=="object"&&p.call(Ur,"__await")?G.resolve(Ur.__await).then(function(mr){Z("next",mr,ee,je)},function(mr){Z("throw",mr,ee,je)}):G.resolve(Ur).then(function(mr){Sr.value=mr,ee(Sr)},function(mr){return Z("throw",mr,ee,je)})}je(Oe.arg)}var pt;i(this,"_invoke",{value:function(et,Lt){function ee(){return new G(function(je,Oe){Z(et,Lt,je,Oe)})}return pt=pt?pt.then(ee,ee):ee()}})}function Bt(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 je=re(ee,Z);if(je){if(je===h)continue;return je}}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 Oe=c(W,G,Z);if(Oe.type==="normal"){if(pt=Z.done?"completed":"suspendedYield",Oe.arg===h)continue;return{value:Oe.arg,done:Z.done}}Oe.type==="throw"&&(pt="completed",Z.method="throw",Z.arg=Oe.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")),h;var et=c(pt,W.iterator,G.arg);if(et.type==="throw")return G.method="throw",G.arg=et.arg,G.delegate=null,h;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,h):Lt:(G.method="throw",G.arg=new TypeError("iterator result is not an object"),G.delegate=null,h)}function Se(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(Se,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:Fe}}function Fe(){return{value:void 0,done:!0}}return S.prototype=D,i(dt,"constructor",{value:D,configurable:!0}),i(D,"constructor",{value:S,configurable:!0}),S.displayName=e(D,t,"GeneratorFunction"),l.isGeneratorFunction=function(W){var G=typeof W=="function"&&W.constructor;return!!G&&(G===S||(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(Oe,Sr){return Lt.type="throw",Lt.arg=W,G.next=Oe,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"),je=p.call(et,"finallyLoc");if(ee&&je){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(!je)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,h):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),h},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),h}},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),h}},l}function Ic(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 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(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}var gn=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=_({},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=_(Kh,this.getEditorsRules()),h=function(D,J,nt){return nt?s.addNewStyleRulesToShadowRoot(D,J,nt):s.addNewStyleRules(D,J)};if(!this.theme.options.disable_theme_rules){var w=C(this.element);h("default",c,w),o.rules!==void 0&&h(e,o.rules,w)}var S=l.defaults.iconlibs[this.options.iconlib||l.defaults.iconlib];S&&(this.iconlib=new S),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=yl().mark(function a(){var s,t,e,o,c,h,w=this;return yl().wrap(function(S){for(;;)switch(S.prev=S.next){case 0:return s=document.location.origin+document.location.pathname.toString(),(t=new hh(this.options)).onSchemaLoaded=function(D){w.trigger("schemaLoaded",D)},t.onAllSchemasLoaded=function(){w.trigger("allSchemasLoaded")},this.expandSchema=function(D){return t.expandSchema(D)},this.expandRefs=function(D,J){return t.expandRefs(D,J)},e=document.location.toString(),S.next=9,t.load(this.schema,s,e);case 9:o=S.sent,c=this.options.custom_validators?{custom_validators:this.options.custom_validators}:{},this.validator=new Di(this,null,c,l.defaults),h=this.getEditorClass(o),this.root=this.createEditor(h,{jsoneditor:this,schema:o,required:!0,container:this.root_container}),this.root.preBuild(),this.root.build(),this.root.postBuild(),E(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(){w.ready&&(w.validation_results=w.validator.validate(w.root.getValue()),w.root.showValidationErrors(w.validation_results),w.trigger("ready"),w.trigger("change"))});case 24:case"end":return S.stop()}},a,this)}),u=function(){var a=this,s=arguments;return new Promise(function(t,e){var o=i.apply(a,s);function c(w){Ic(o,t,e,c,h,"next",w)}function h(w){Ic(o,t,e,c,h,"throw",w)}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?_(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=_({},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 h=a==="default"?c:"".concat(o,'[data-theme="').concat(a,'"] ').concat(c);e.insertRule?e.insertRule(h+" {"+decodeURIComponent(s[c])+"}",0):e.addRule&&e.addRule(h,decodeURIComponent(s[c]),0)})}},{key:"addNewStyleRulesToShadowRoot",value:function(a,s,t){var e=this.element.nodeName.toLowerCase(),o="";Object.keys(s).forEach(function(w){var S=a==="default"?w:"".concat(e,'[data-theme="').concat(a,'"] ').concat(w);o+=S+" {"+decodeURIComponent(s[w])+`}
|
|
65
|
-
`});var c,h=new CSSStyleSheet;h.replaceSync(o),t.adoptedStyleSheets=[].concat(function(w){if(Array.isArray(w))return
|
|
66
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}(),[h])}}],p&&
|
|
59
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function ei(l,n){if(l){if(typeof l=="string")return ri(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)?ri(l,n):void 0}}function ri(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 Fo(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,Di(i.key),i)}}function Di(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 Bi=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 h=[];Object.keys(t.dependentRequired).forEach(function(w){if(e[w]!==void 0){var S=t.dependentRequired[w];h=S.filter(function(D){return!E(e,D)})}}),h.length>0&&c.push({message:"Must have the required properties: "+h.join(", "),path:o})}return c},dependentSchemas:function(t,e,o){var c=this,h=[];return Object.keys(t.dependentSchemas).forEach(function(w){if(e[w]!==void 0){var S=t.dependentSchemas[w],D=c._validateSchema(S,e,o);h=[].concat(be(h),be(D))}}),h},contains:function(t,e,o){var c=this,h=[],w=0;e.forEach(function(D){c._validateSchema(t.contains,D,o).length===0&&w++});var S=w===0;return t.minContains!==void 0?w<t.minContains&&h.push({message:this.translate("error_minContains",[w,t.minContains],t),path:o}):S&&h.push({message:this.translate("error_contains",null,t),path:o}),t.maxContains!==void 0&&w>t.maxContains&&h.push({message:this.translate("error_maxContains",[w,t.maxContains],t),path:o}),h},if:function(t,e,o){if(t.then===void 0&&t.else===void 0)return[];var c=this._validateSchema(t.if,e,o),h=[],w=[];return t.then!==void 0&&(h=this._validateSchema(t.then,e,o)),t.else!==void 0&&(w=this._validateSchema(t.else,e,o)),t.if===!0?h:t.if===!1?w:c.length===0?h:c.length>0?w:[]},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(h){return c===JSON.stringify(h)})?[]:[{path:o,property:"enum",message:this.translate("error_enum",null,t)}]},extends:function(t,e,o){var c=this;return t.extends.reduce(function(h,w){return h.push.apply(h,be(c._validateSchema(w,e,o))),h},[])},allOf:function(t,e,o){var c=this;return t.allOf.reduce(function(h,w){return h.push.apply(h,be(c._validateSchema(w,e,o))),h},[])},anyOf:function(t,e,o){var c=this;return t.anyOf.some(function(h){return!c._validateSchema(h,e,o).length})?[]:[{path:o,property:"anyOf",message:this.translate("error_anyOf",null,t)}]},oneOf:function(t,e,o){var c=this,h=0,w=[];t.oneOf.forEach(function(D,J){var nt=c._validateSchema(D,e,o);nt.length||h++,nt.forEach(function(ut){ut.path="".concat(o,".oneOf[").concat(J,"]").concat(ut.path.substr(o.length))}),w.push.apply(w,be(nt))});var S=[];return h!==1&&(S.push({path:o,property:"oneOf",message:this.translate("error_oneOf",[h],t)}),S.push.apply(S,w)),S},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(h){return c._checkType(h,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(h){return c._checkType(h,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,h=[];if(Array.isArray(t.items))for(var w=0;w<e.length;w++)if(t.items[w])h.push.apply(h,be(this._validateSchema(t.items[w],e[w],"".concat(o,".").concat(w))));else{if(t.additionalItems===!0)break;if(!t.additionalItems){if(t.additionalItems===!1){h.push({path:o,property:"additionalItems",message:this.translate("error_additionalItems",null,t)});break}break}h.push.apply(h,be(this._validateSchema(t.additionalItems,e[w],"".concat(o,".").concat(w))))}else e.forEach(function(S,D){h.push.apply(h,be(c._validateSchema(t.items,S,"".concat(o,".").concat(D))))});return h},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={},h=0;h<e.length;h++){var w=JSON.stringify(e[h]);if(c[w])return[{path:o,property:"uniqueItems",message:this.translate("error_uniqueItems",null,t)}];c[w]=!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,h=[];return Array.isArray(t.required)&&t.required.forEach(function(w){if(e[w]===void 0){var S=c.jsoneditor.getEditor("".concat(o,".").concat(w));S&&S.dependenciesFulfilled===!1||S&&["button","info"].includes(S.schema.format||S.schema.type)||h.push({path:o,property:"required",message:c.translate("error_required",[t&&t.properties&&t.properties[w]&&t.properties[w].title?t.properties[w].title:w],t)})}}),h},properties:function(t,e,o,c){var h=this,w=[];return Object.entries(t.properties).forEach(function(S){var D=ti(S,2),J=D[0],nt=D[1];c[J]=!0,w.push.apply(w,be(h._validateSchema(nt,e[J],"".concat(o,".").concat(J))))}),w},patternProperties:function(t,e,o,c){var h=this,w=[];return Object.entries(t.patternProperties).forEach(function(S){var D=ti(S,2),J=D[0],nt=D[1],ut=new RegExp(J);Object.entries(e).forEach(function(dt){var kt=ti(dt,2),Ct=kt[0],Bt=kt[1];ut.test(Ct)&&(c[Ct]=!0,w.push.apply(w,be(h._validateSchema(nt,Bt,"".concat(o,".").concat(Ct)))))})}),w}},this._validateObjectSubSchema2={propertyNames:function(t,e,o,c){for(var h=this,w=[],S=Object.keys(e),D=null,J=function(){var dt="";return D=S[nt],typeof t.propertyNames=="boolean"?t.propertyNames===!0?"continue":(w.push({path:o,property:"propertyNames",message:h.translate("error_property_names_false",[D],t)}),"break"):Object.entries(t.propertyNames).every(function(kt){var Ct=ti(kt,2),Bt=Ct[0],re=Ct[1],Se=!1;switch(Bt){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&&(Se=!0)}),!Se){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 w.push({path:o,property:"propertyNames",message:h.translate("error_property_names_unsupported",[Bt],t)}),!1}return w.push({path:o,property:"propertyNames",message:h.translate(dt,[D],t)}),!1})?void 0:"break"},nt=0;nt<S.length;nt++){var ut=J();if(ut!=="continue"&&ut==="break")break}return w},additionalProperties:function(t,e,o,c){for(var h=[],w=Object.keys(e),S=0;S<w.length;S++){var D=w[S];if(!c[D]){if(!t.additionalProperties){h.push({path:o,property:"additionalProperties",message:this.translate("error_additional_properties",[D],t)});break}if(t.additionalProperties===!0)break;h.push.apply(h,be(this._validateSchema(t.additionalProperties,e[D],"".concat(o,".").concat(D))))}}return h},dependencies:function(t,e,o){var c=this,h=[];return Object.entries(t.dependencies).forEach(function(w){var S=ti(w,2),D=S[0],J=S[1];e[D]!==void 0&&(Array.isArray(J)?J.forEach(function(nt){e[nt]===void 0&&h.push({path:o,property:"dependencies",message:c.translate("error_dependency",[nt],t)})}):h.push.apply(h,be(c._validateSchema(J,e,o))))}),h}}}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?Ii(Object(dt),!0).forEach(function(kt){Mo(nt,kt,dt[kt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(nt,Object.getOwnPropertyDescriptors(dt)):Ii(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=ei(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 Bt,re=!0,Se=!1;return{s:function(){dt=dt.call(nt)},n:function(){var Ut=dt.next();return re=Ut.done,Ut},e:function(Ut){Se=!0,Bt=Ut},f:function(){try{re||dt.return==null||dt.return()}finally{if(Se)throw Bt}}}}(t.anyOf);try{for(c.s();!(e=c.n()).done;){var h=e.value,w=this.fitTest(i,h,a);(w.match>o.match||w.match===o.match&&w.extra<o.extra)&&(o=w)}}catch(nt){c.e(nt)}finally{c.f()}return o}var S=this._getSchema(u).properties;for(var D in S)if(E(S,D)){if(lr(i[D])==="object"&&lr(S[D])==="object"&&lr(S[D].properties)==="object"){var J=this.fitTest(i[D],S[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?_({},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=_({},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)),_({},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,h){return 1*c<1?[{path:h,property:"format",message:s.translate("error_invalid_epoch",null,o)}]:c!==Math.abs(parseInt(c))?[{path:h,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,h,w){if(c!==""){var S;if(w.flatpickr.config.mode!=="single"){var D=w.flatpickr.config.mode==="range"?w.flatpickr.l10n.rangeSeparator:", ";S=w.flatpickr.selectedDates.map(function(nt){return w.flatpickr.formatDate(nt,w.flatpickr.config.dateFormat)}).join(D)}try{if(S){if(S!==c)throw new Error("".concat(w.flatpickr.config.mode," mismatch"))}else if(w.flatpickr.formatDate(w.flatpickr.parseDate(c,w.flatpickr.config.dateFormat),w.flatpickr.config.dateFormat)!==c)throw new Error("mismatch")}catch{var J=w.flatpickr.config.errorDateFormat!==void 0?w.flatpickr.config.errorDateFormat:w.flatpickr.config.dateFormat;return[{path:h,property:"format",message:s.translate("error_".concat(w.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($o.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&&Fo(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 Ho(l,n){return Ho=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},Ho(l,n)}function cr(l){return cr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},cr(l)}var Ni=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&&Ho(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,h){if(h&&(Ve(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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,h){var w,S;c&&(e.type===h?(e.keep_only_existing_values&&(w=c.getValue(),S=o,Object.keys(S).forEach(function(D){D in w&&(w[D]=S[D])}),o=w),(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],h=this.theme.getChildEditorHolder();this.editor_holder.appendChild(h),typeof c=="string"?(e=_({},this.schema)).type=c:(e=_({},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 w=this.jsoneditor.getEditorClass(e);this.editors[t]=this.jsoneditor.createEditor(w,{jsoneditor:this.jsoneditor,schema:e,container:h,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],h.addEventListener("change_header_text",function(){o.refreshHeaderText()}),t!==this.type&&(h.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&&N(this.thenSchema,this.schema,this.schema.then),this.schema.else&&N(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,h){var w;t.editors[h]=!1,typeof c=="string"?(w=_({},t.schema)).type=c:(w=_({},t.schema,c),c.required&&Array.isArray(c.required)&&t.schema.required&&Array.isArray(t.schema.required)&&(w.required=t.schema.required.concat(c.required))),t.validators[h]=new Bi(t.jsoneditor,w,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,h={match:0,extra:0,i:this.type},w={match:0,i:null};this.validators.forEach(function(J,nt){var ut=null;o.anyOf!==void 0&&o.anyOf&&(ut=J.fitTest(t),(h.match<ut.match||h.match===ut.match&&h.extra>ut.extra)&&((h=ut).i=nt)),J.validate(t).length||w.i!==null?h=w:(w.i=nt,ut!==null&&(w.match=ut.match))});var S=w.i;this.anyOf!==void 0&&this.anyOf&&w.match<h.match&&(S=h.i),this.if&&(S=this.getIfType(t)),S===null&&(S=this.type),this.type=S,this.switcher.value=this.display_text[S];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,h){if(c){var w="".concat(e.path,".").concat(o,"[").concat(h,"]");c.showValidationErrors(t.reduce(function(S,D){if(D.path.startsWith(w)||D.path===w.substr(0,D.path.length)){var J=_({},D);D.path.startsWith(w)&&(J.path=e.path+J.path.substr(w.length)),S.push(J)}return S},[]))}})}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}(q);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 $i(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 In(l,n){return In=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},In(l,n)}function Dn(l){return Dn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Dn(l)}var Vo=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&&In(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,h){if(h&&(fn(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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}}])&&$i(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(q);function Mi(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?Mi(Object(p),!0).forEach(function(i){ni(l,i,p[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(l,Object.getOwnPropertyDescriptors(p)):Mi(Object(p)).forEach(function(i){Object.defineProperty(l,i,Object.getOwnPropertyDescriptor(p,i))})}return l}function ni(l,n,p){return(n=Hi(n))in l?Object.defineProperty(l,n,{value:p,enumerable:!0,configurable:!0,writable:!0}):l[n]=p,l}function yn(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,h=!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(w){h=!0,s=w}finally{try{if(!c&&u.return!=null&&(e=u.return(),Object(e)!==e))return}finally{if(h)throw s}}return o}}(l,n)||function(p,i){if(p){if(typeof p=="string")return Fi(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)?Fi(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 Fi(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 zo(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,Hi(i.key),i)}}function Hi(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 Vi(l,n){return Vi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},Vi(l,n)}function ur(l){return ur=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ur(l)}var ii=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&&Vi(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,h){if(h&&(Cr(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(c)}(this,t)});function s(t,e,o){var c;return function(h,w){if(!(h instanceof w))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 _({},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 h,w=this.format==="categories",S=[],D=null,J=null;if(this.format==="grid-strict"){var nt=0;if(h=[],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};h.push(G),S[nt]=h,W&&(nt++,h=[])}}),this.layout===JSON.stringify(S))return!1;for(this.layout=JSON.stringify(S),c=document.createElement("div"),t=0;t<S.length;t++)for(h=this.theme.getGridRow(),c.appendChild(h),e=0;e<S[t].length;e++)D=S[t][e].key,(J=this.editors[D]).options.hidden?J.container.style.display="none":this.theme.setGridColumnSize(J.container,S[t][e].width,S[t][e].offset),h.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<S.length;G++)S[G].width+ze<=12&&(!W||.5*S[G].minh<W&&2*S[G].maxh>W)&&(Wt=G);Wt===!1&&(S.push({width:0,minh:999999,maxh:0,editors:[]}),Wt=S.length-1),S[Wt].editors.push({key:Ut,width:ze,height:W}),S[Wt].width+=ze,S[Wt].minh=Math.min(S[Wt].minh,W),S[Wt].maxh=Math.max(S[Wt].maxh,W)}}),t=0;t<S.length;t++)if(S[t].width<12){var ut=!1,dt=0;for(e=0;e<S[t].editors.length;e++)(ut===!1||S[t].editors[e].width>S[t].editors[ut].width)&&(ut=e),S[t].editors[e].width*=12/S[t].width,S[t].editors[e].width=Math.floor(S[t].editors[e].width),dt+=S[t].editors[e].width;dt<12&&(S[t].editors[ut].width+=12-dt),S[t].width=12}if(this.layout===JSON.stringify(S))return!1;for(this.layout=JSON.stringify(S),c=document.createElement("div"),t=0;t<S.length;t++)for(h=this.theme.getGridRow(),c.appendChild(h),e=0;e<S[t].editors.length;e++)D=S[t].editors[e].key,(J=this.editors[D]).options.hidden?J.container.style.display="none":this.theme.setGridColumnSize(J.container,S[t].editors[e].width),h.appendChild(J.container)}else{if(c=document.createElement("div"),w){var kt=document.createElement("div"),Ct=this.theme.getTopTabHolder(this.translateProperty(this.schema.title)),Bt=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),Bt.appendChild(Wt),o.theme.addTopTab(Ct,gt.tab)):(kt.appendChild(W),Bt.childElementCount>0?Bt.firstChild.isObjOrArray&&(Wt.appendChild(kt),Bt.insertBefore(Wt,Bt.firstChild),o.theme.insertBasicTopTab(gt.tab,Ct),gt.basicPane=Wt):(Wt.appendChild(kt),Bt.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=Bt,this.tabs_holder=Ct;var Se=this.theme.getFirstTab(this.tabs_holder);return void(Se&&O(Se,"click"))}this.property_order.forEach(function(Ut){var gt=o.editors[Ut];gt.property_removed||(h=o.theme.getGridRow(),c.appendChild(h),gt.options.hidden?gt.container.style.display="none":o.theme.setGridColumnSize(gt.container,12),h.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=_({},o);var c=!!this.schema.properties[t];return this.schema.patternProperties&&Object.keys(this.schema.patternProperties).forEach(function(h){new RegExp(h).test(t)&&(o.allOf=o.allOf||[],o.allOf.push(e.schema.patternProperties[h]),c=!0)}),!c&&this.schema.additionalProperties&&Cr(this.schema.additionalProperties)==="object"&&(o=_({},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=yn(e,2),c=o[0],h=o[1],w=t.jsoneditor.getEditorClass(h);t.editors[c]=t.jsoneditor.createEditor(w,{jsoneditor:t.jsoneditor,schema:h,path:"".concat(t.path,".").concat(c),parent:t,compact:!0,required:!0},t.currentDepth+1),t.editors[c].preBuild();var S=t.editors[c].options.hidden?0:t.editors[c].options.grid_columns||t.editors[c].getNumColumns();t.minwidth+=S,t.maxwidth+=S}),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,h=t.editors[o].schema.propertyOrder;return typeof c!="number"&&(c=1e3),typeof h!="number"&&(h=1e3),c-h})}},{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,h=t.schema.type==="object"||t.schema.type==="array";this.rows[c]=t,this.rows[c].rowPane=o,h?(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(h){h.tab&&h.rowPane&&h.rowPane.parentNode&&(o&&h.tab===e.rows[e.basicTab].tab&&c||(t?h.tab_text.textContent=h.getHeaderText():(o&&h.tab===e.rows[e.basicTab].tab&&(c=!0),h.tab===e.active_tab?e.theme.markTabActive(h):e.theme.markTabInactive(h))))})}},{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 h=yn(c,2),w=h[0],S=h[1],D=t.theme.getTableCell();t.editor_holder.appendChild(D),S.setContainer(D),S.build(),S.postBuild(),S.setOptInCheckbox(S.header),S.setValue(S.getDefault(),!0),t.editors[w].options.hidden&&(D.style.display="none"),t.editors[w].options.input_width&&(D.style.width=t.editors[w].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(h){var w=h.innerText,S=c.target.value;t.options.case_sensitive_property_search||t.jsoneditor.options.case_sensitive_property_search||(w=w.toLowerCase(),S=S.toLowerCase()),w.includes(S)?h.style.display="":h.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 h=t.theme.getTabContent(),w=t.theme.getGridColumn(),S=!(!c.schema||c.schema.type!=="object"&&c.schema.type!=="array");if(h.isObjOrArray=S,e){if(S){var D=t.theme.getGridContainer();D.appendChild(w),h.appendChild(D),t.tabPanesContainer.appendChild(h),t.row_container=D}else t.row_container_basic===void 0&&(t.row_container_basic=t.theme.getGridContainer(),h.appendChild(t.row_container_basic),t.tabPanesContainer.childElementCount===0?t.tabPanesContainer.appendChild(h):t.tabPanesContainer.insertBefore(h,t.tabPanesContainer.childNodes[1])),t.row_container_basic.appendChild(w);t.addRow(c,t.tabs_holder,h),h.id=t.getValidId(c.schema.title)}else t.row_container.appendChild(w);c.setContainer(w),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,h=o&&this.options.show_opt_in===!1;(c||!h&&e||!o&&e)&&Object.entries(this.editors).forEach(function(w){var S=yn(w,2),D=S[0],J=S[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 h=0;h<o.childNodes.length;h++){var w=o.childNodes[h];if(e.propertyOrder<w.propertyOrder){this.addproperty_list.insertBefore(e,w),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 h=this.theme.getCheckboxLabel(e),w=this.theme.getFormControl(h,c);return w.style.paddingBottom=w.style.marginBottom=w.style.paddingTop=w.style.marginTop=0,w.style.height="auto",this.insertPropertyControlUsingPropertyOrder(t,w,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),{},ni({},o,{}));case"additionalProperties":case"propertyNames":return Kr(Kr({},e),{},ni({},o,!0));default:return Kr(Kr({},e),{},ni({},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(S){return new RegExp(S).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),h=this.jsoneditor.options.max_depth;if(this.editors[t]=this.jsoneditor.createEditor(c,{jsoneditor:this.jsoneditor,schema:h&&this.currentDepth>=h?this.getSchemaOnMaxDepth(o):o,path:"".concat(this.path,".").concat(t),parent:this},this.currentDepth+1),this.editors[t].preBuild(),!e){var w=this.theme.getChildEditorHolder();this.editor_holder.appendChild(w),this.editors[t].setContainer(w),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(h){var w=yn(h,2),S=(w[0],w[1]);S.key===o&&(c=S)}),c&&!c.isActive()&&c.activate()})}},{key:"getDependentRequired",value:function(t){return this.schema.dependentRequired&&E(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(h){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(h){t.addPropertyCheckbox(h),t.isRequiredObject(t.cached_editors[h])&&h in t.editors&&(t.addproperty_checkboxes[h].disabled=!0),t.schema.minProperties!==void 0&&o<=t.schema.minProperties?(t.addproperty_checkboxes[h].disabled=t.addproperty_checkboxes[h].checked,t.addproperty_checkboxes[h].checked||(c=!0)):h in t.editors?c=!0:e||E(t.schema.properties,h)?(t.addproperty_checkboxes[h].disabled=!1,c=!0):t.addproperty_checkboxes[h].disabled=!0}),this.canHaveAdditionalProperties()&&(c=!0),Object.keys(this.schema.properties).forEach(function(h){t.cached_editors[h]||(c=!0,t.addPropertyCheckbox(h))}),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 h=yn(c,2),w=h[0],S=h[1];t[w]!==void 0?(o.addObjectProperty(w),S.setValue(t[w],e),S.activate()):e||o.isRequiredObject(S)?S.setValue(S.getDefault(),e):o.jsoneditor.options.show_opt_in||o.options.show_opt_in?S.deactivate():o.removeObjectProperty(w)}),Object.entries(t).forEach(function(c){var h=yn(c,2),w=h[0],S=h[1];o.cached_editors[w]||(o.addObjectProperty(w),o.editors[w]&&o.editors[w].setValue(S,e,!!o.editors[w].template))}),this.refreshValue(),this.layoutEditors(),this.onChange()}},{key:"showValidationErrors",value:function(t){var e=this,o=[],c=[];t.forEach(function(h){h.path===e.path?o.push(h):c.push(h)}),this.error_holder&&(o.length?(this.error_holder.innerHTML="",this.error_holder.style.display="",o.forEach(function(h){h.errorcount&&h.errorcount>1&&(h.message+=" (".concat(h.errorcount," errors)")),e.error_holder.appendChild(e.theme.getErrorMessage(h.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(h){h.showValidationErrors(c)})}}])&&zo(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(q);function Bn(l){return Bn=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},Bn(l)}function Ls(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(Bn(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Bn(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Bn(u)==="symbol"?u:String(u)),i)}var u}function Nn(){return Nn=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=H(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}},Nn.apply(this,arguments)}function qo(l,n){return qo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},qo(l,n)}function H(l){return H=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},H(l)}ii.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&&qo(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=H(i);if(u){var o=H(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,h){if(h&&(Bn(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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(){Nn(H(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 h=this.theme.getFormRadioLabel(this.enum_display[o]);h.htmlFor=this.input.id;var w=this.theme.getFormRadioControl(h,this.input,!(this.options.layout!=="horizontal"&&!this.options.compact));this.radioContainer.appendChild(w)}if(this.schema.readOnly||this.schema.readonly){this.disable(!0);for(var S=0;S<this.radioGroup.length;S++)this.radioGroup[S].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"),Nn(H(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"),Nn(H(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),Nn(H(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}}}])&&Ls(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(Qn);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=Be(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 Be(l){return Be=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Be(l)}var zi=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=Be(i);if(u){var o=Be(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,h){if(h&&(Ot(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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(Be(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(Be(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",_({},{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(Be(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(Be(s.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.sceditor_instance&&this.sceditor_instance.readOnly(!0),ye(Be(s.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.sceditor_instance&&(this.sceditor_instance.destroy(),this.sceditor_instance=null),ye(Be(s.prototype),"destroy",this).call(this)}}])&&pe(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 Zu(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 oi(){return oi=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}},oi.apply(this,arguments)}function As(l,n){return As=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},As(l,n)}function tn(l){return tn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},tn(l)}var Ju=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&&As(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,h){if(h&&(qi(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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 oi(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",_({},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=E(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)}oi(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)),oi(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)),oi(tn(s.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.select2_instance&&(this.select2_instance.select2("destroy"),this.select2_instance=null),oi(tn(s.prototype),"destroy",this).call(this)}}])&&Zu(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(Qn);function Ui(l){return Ui=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},Ui(l)}function Yu(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(Ui(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Ui(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Ui(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=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}},$n.apply(this,arguments)}function Rs(l,n){return Rs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},Rs(l,n)}function zr(l){return zr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},zr(l)}var Xu=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&&Rs(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,h){if(h&&(Ui(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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 $n(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",_({},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)}$n(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;$n(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(),$n(zr(s.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.selectize_instance&&this.selectize_instance.lock(),$n(zr(s.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.selectize_instance&&(this.selectize_instance.destroy(),this.selectize_instance=null),$n(zr(s.prototype),"destroy",this).call(this)}}])&&Yu(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(Qn);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 Qu(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 Is(l,n){return Is=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},Is(l,n)}function za(l){return za=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},za(l)}var Ku=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&&Is(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,h){if(h&&(Gi(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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 h=document.createElement("div"),w=document.createElement("button");w.classList.add("tiny","button"),w.innerHTML="Clear signature",h.appendChild(w),o.appendChild(h),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})),w.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 S=document.createElement("p");S.innerHTML="Signature pad is not available, please include SignaturePad from https://github.com/szimek/signature_pad",this.container.appendChild(S)}}},{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}}])&&Qu(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(Q);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 th(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=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}},Mn.apply(this,arguments)}function Ds(l,n){return Ds=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},Ds(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 eh=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&&Ds(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,h){if(h&&(Wi(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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=Mn(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",Mn(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",_({},{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)):Mn(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),Mn(qr(s.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.simplemde_instance&&(this.simplemde_instance.codemirror.options.readOnly=!0),Mn(qr(s.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.simplemde_instance&&(this.simplemde_instance.toTextArea(),this.simplemde_instance=null),Mn(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)}}])&&th(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(Q);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 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(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 Bs(){return Bs=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=Ji(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}},Bs.apply(this,arguments)}function Ns(l,n){return Ns=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},Ns(l,n)}function Ji(l){return Ji=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ji(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&&Ns(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=Ji(i);if(u){var o=Ji(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,h){if(h&&(Zi(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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)},h=this.enum_values.length-1;h>-1;h--){var w=this.formname+(h+1),S=this.theme.getFormInputField("radio");S.name="".concat(this.formname,"[starrating]"),S.value=this.enum_values[h],S.id=w,S.addEventListener("change",c,!1),this.radioGroup.push(S);var D=document.createElement("label");D.htmlFor=w,D.title=this.enum_values[h],this.options.displayValue&&D.classList.add("starrating-display-enabled"),this.ratingContainer.appendChild(S),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),Bs(Ji(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}}}])&&rh(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 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(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 Uo(){return Uo=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=Fn(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}},Uo.apply(this,arguments)}function $s(l,n){return $s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},$s(l,n)}function Fn(l){return Fn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Fn(l)}wc.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 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&&$s(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=Fn(i);if(u){var o=Fn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,h){if(h&&(Yi(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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(){Uo(Fn(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(){Uo(Fn(s.prototype),"enable",this).call(this),this.stepperDown.removeAttribute("disabled"),this.stepperUp.removeAttribute("disabled")}},{key:"disable",value:function(){Uo(Fn(s.prototype),"disable",this).call(this),this.stepperDown.setAttribute("disabled",!0),this.stepperUp.setAttribute("disabled",!0)}}])&&nh(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(Fa);function Xi(l){return Xi=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},Xi(l)}function oh(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(Xi(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Xi(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Xi(u)==="symbol"?u:String(u)),i)}var u}function ai(){return ai=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}},ai.apply(this,arguments)}function Ms(l,n){return Ms=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},Ms(l,n)}function en(l){return en=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},en(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&&Ms(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,h){if(h&&(Xi(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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(ai(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(ai(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,ai(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 h=this.theme.getTableHeaderCell(e[o[c]].getTitle());e[o[c]].options.hidden&&(h.style.display="none"),this.header_row.appendChild(h)}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(),ai(en(s.prototype),"onChildEditorChange",this).call(this)}},{key:"getItemDefault",value:function(){return _({},{default:this.item_default}).default}},{key:"getItemTitle",value:function(){return this.item_title}},{key:"getElementEditor",value:function(t,e){var o=_({},this.schema.items),c=this.jsoneditor.getEditorClass(o,this.jsoneditor),h=this.row_holder.appendChild(this.theme.getTableRow()),w=h;this.item_has_child_editors||(w=this.theme.getTableCell(),h.appendChild(w));var S=this.jsoneditor.createEditor(c,{jsoneditor:this.jsoneditor,schema:o,container:w,path:"".concat(this.path,".").concat(t),parent:this,compact:!0,table_row:!0});return S.preBuild(),e||(S.build(),S.postBuild(),S.controls_cell=h.appendChild(this.theme.getTableCell()),S.row=h,S.table_controls=this.theme.getButtonHolder(),S.controls_cell.appendChild(S.table_controls),S.table_controls.style.margin=0,S.table_controls.style.padding=0),S}},{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,ai(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(S,D){t.rows[D]?t.rows[D].setValue(S):(t.addRow(S),c=!0)});for(var h=e.length;h<this.rows.length;h++){var w=this.rows[h].container;this.item_has_child_editors||this.rows[h].row.parentNode.removeChild(this.rows[h].row),this.rows[h].destroy(),w.parentNode&&w.parentNode.removeChild(w),this.rows[h]=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 Bt=ut!==t.rows.length-1;t.setButtonState(nt.movedown_button,Bt),c.push(Bt)}});var h=c.some(function(nt){return nt});this.rows.forEach(function(nt){return t.setButtonState(nt.controls_cell,h)}),this.setButtonState(this.controls_header_cell,h),this.setButtonState(this.table,this.value.length);var w=!(o||this.hide_add_button);this.setButtonState(this.add_row_button,w);var S=!(!this.value.length||e||this.hide_delete_last_row_buttons);this.setButtonState(this.delete_last_row_button,S);var D=!(this.value.length<=1||e||this.hide_delete_all_rows_buttons);this.setButtonState(this.remove_all_rows_button,D);var J=w||S||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(h){if(h.preventDefault(),h.stopPropagation(),!o.askConfirmation())return!1;var w=1*h.currentTarget.getAttribute("data-i"),S=o.getValue(),D=o.getValue()[w];S.splice(w,1),o.setValue(S),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"),h=this.schema;return c.classList.add("copy","json-editor-btntype-copy"),c.setAttribute("data-i",t),c.addEventListener("click",function(w){w.preventDefault(),w.stopPropagation();var S=1*w.currentTarget.getAttribute("data-i"),D=o.getValue(),J=D[S];h.items.type==="string"&&h.items.format==="uuid"?J=R():h.items.type==="object"&&h.items.properties&&D.forEach(function(nt,ut){if(S===ut)for(var dt=0,kt=Object.keys(nt);dt<kt.length;dt++){var Ct=kt[dt];h.items.properties&&h.items.properties[Ct]&&h.items.properties[Ct].format==="uuid"&&((J=Object.assign({},D[S]))[Ct]=R())}}),D.splice(S+1,0,J),o.setValue(D),o.onChange(!0),o.jsoneditor.trigger("copyRow",o.rows[S+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(h){h.preventDefault(),h.stopPropagation();var w=1*h.currentTarget.getAttribute("data-i"),S=o.getValue();S.splice(w-1,0,S.splice(w,1)[0]),o.setValue(S),o.onChange(!0),o.jsoneditor.trigger("moveRow",o.rows[w-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(h){h.preventDefault(),h.stopPropagation();var w=1*h.currentTarget.getAttribute("data-i"),S=o.getValue();S.splice(w+1,0,S.splice(w,1)[0]),o.setValue(S),o.onChange(!0),o.jsoneditor.trigger("moveRow",o.rows[w+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(),h=c.pop();t.setValue(c),t.onChange(!0),t.jsoneditor.trigger("deleteRow",h)}),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&&oh(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(zt);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 sh(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 Go(){return Go=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}},Go.apply(this,arguments)}function Fs(l,n){return Fs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},Fs(l,n)}function Hn(l){return Hn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Hn(l)}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 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(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 Wo(){return Wo=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}},Wo.apply(this,arguments)}function Hs(l,n){return Hs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},Hs(l,n)}function Vn(l){return Vn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Vn(l)}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 ch(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 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=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}},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 rn(l){return rn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},rn(l)}k(6977);var qa={ace:Et,array:zt,arrayChoices:er,arraySelect2:or,arraySelectize:Ue,autocomplete:On,base64:Oi,button:Ia,checkbox:Ba,choices:rt,datetime:bt,describedBy:Qe,enum:Ie,hidden:Na,info:Si,integer:Fa,ip:Do,jodit:Ha,multiple:Ni,multiselect:qt,null:Vo,number:Ma,object:ii,radio:at,sceditor:zi,select:Qn,select2:Ju,selectize:Xu,signature:Ku,simplemde:eh,starrating:wc,stepper:ih,string:Q,table:ah,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&&Fs(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,h){if(h&&(Qi(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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",_({},{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,h,w,S){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 h=c.target.files||c.dataTransfer.files;if(h&&h.length)if(t.options.max_upload_size!==0&&h[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(h[0].type,t.options.mime_type)){t.fileDisplay&&(t.fileDisplay.value=h[0].name);var w=new window.FileReader;w.onload=function(S){t.preview_value=S.target.result,t.refreshPreview(h),t.onChange(!0),w=null},w.readAsDataURL(h[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 h=c.dataTransfer.items||c.dataTransfer.files,w=h&&h.length&&(t.options.mime_type.length===0||t.isValidMimeType(h[0].type,t.options.mime_type)),S=c.currentTarget.classList&&c.currentTarget.classList.contains("upload-dropzone")&&w;switch((c.currentTarget===window?"w_":"e_")+c.type){case"w_drop":case"w_dragover":S||(c.dataTransfer.dropEffect="none");break;case"e_dragenter":S?(t.dropZone.classList.add("valid-dropzone"),c.dataTransfer.dropEffect="copy"):t.dropZone.classList.add("invalid-dropzone");break;case"e_dragover":S&&(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"),S&&t.uploadHandler(c)}S||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 h=Math.floor(Math.log(o.size)/Math.log(1024));o.formattedSize="".concat(parseFloat((o.size/Math.pow(1024,h)).toFixed(2))," ").concat(["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][h])}else o.formattedSize="0 Bytes";var w=this.getButton("button_upload","upload","button_upload");w.addEventListener("click",function(S){S.preventDefault(),w.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),w.removeAttribute("disabled")},failure:function(D){e.theme.addInputError(e.uploader,D),e.progressBar&&e.preview.removeChild(e.progressBar),w.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,w,this.preview_value)),this.options.auto_upload&&(w.dispatchEvent(new window.MouseEvent("click")),w.parentNode.removeChild(w))}}},{key:"enable",value:function(){this.always_disabled||(this.uploader&&(this.uploader.disabled=!1),Go(Hn(s.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.uploader&&(this.uploader.disabled=!0),Go(Hn(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),Go(Hn(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)}}])&&sh(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(q),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&&Hs(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,h){if(h&&(Ki(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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(){Wo(Vn(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(){Wo(Vn(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,Wo(Vn(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)}}])&&lh(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&&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=rn(i);if(u){var o=rn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,h){if(h&&(to(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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=si(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(){si(rn(s.prototype),"afterInputReady",this).call(this),this.createPicker(!0)}},{key:"disable",value:function(){if(si(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(si(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),si(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",_({},{editor:!1,alpha:!1,color:this.value,popup:"bottom"},this.defaults.options.colorpicker||{},this.options.colorpicker||{},{parent:this.container})),c=function(h){var w=e.picker_instance.settings.editorFormat,S=e.picker_instance.settings.alpha;e.setValue(w==="hex"?S?h.hex:h.hex.slice(0,7):h["".concat(w+(S?"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="")}}])&&ch(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(Q)};function _c(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 xc={},zs="en",uh=zs;xc.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(qa).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,h,w,S=[],D=!0,J=!1;try{if(h=(e=e.call(s)).next,t===0){if(Object(e)!==e)return;D=!1}else for(;!(D=(o=h.call(e)).done)&&(S.push(o.value),S.length!==t);D=!0);}catch(nt){J=!0,c=nt}finally{try{if(!D&&e.return!=null&&(w=e.return(),Object(w)!==w))return}finally{if(J)throw c}}return S}}(u,a)||function(s,t){if(s){if(typeof s=="string")return _c(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)?_c(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.`)}()}(l,2),p=n[0],i=n[1];qa[p].options=i.options||{}});var li={options:{upload:function(l,n,p){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:qa,languages:xc,resolvers:j,custom_validators:[],default_language:zs,language:uh,translate:function(l,n,p){var i={};p&&p.options&&p.options.error_messages&&p.options.error_messages[li.language]&&(i=p.options.error_messages[li.language]);var u=li.languages[li.language];if(!u)throw new Error("Unknown language ".concat(li.language));var a=i[l]||u[l]||li.languages[zs][l]||l;if(n)for(var s=0;s<n.length;s++)a=a.replace(new RegExp("\\{\\{".concat(s,"}}"),"g"),n[s]);return a},translateProperty:function(l,n){return l}};function ci(){ci=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 w?G:w,Lt=Object.create(et.prototype),ee=new gt(pt||[]);return i(Lt,"_invoke",{value:Bt(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 h={};function w(){}function S(){}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=w.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,je){var Oe=c(W[et],W,Lt);if(Oe.type!=="throw"){var Sr=Oe.arg,Ur=Sr.value;return Ur&&rr(Ur)=="object"&&p.call(Ur,"__await")?G.resolve(Ur.__await).then(function(yr){Z("next",yr,ee,je)},function(yr){Z("throw",yr,ee,je)}):G.resolve(Ur).then(function(yr){Sr.value=yr,ee(Sr)},function(yr){return Z("throw",yr,ee,je)})}je(Oe.arg)}var pt;i(this,"_invoke",{value:function(et,Lt){function ee(){return new G(function(je,Oe){Z(et,Lt,je,Oe)})}return pt=pt?pt.then(ee,ee):ee()}})}function Bt(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 je=re(ee,Z);if(je){if(je===h)continue;return je}}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 Oe=c(W,G,Z);if(Oe.type==="normal"){if(pt=Z.done?"completed":"suspendedYield",Oe.arg===h)continue;return{value:Oe.arg,done:Z.done}}Oe.type==="throw"&&(pt="completed",Z.method="throw",Z.arg=Oe.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")),h;var et=c(pt,W.iterator,G.arg);if(et.type==="throw")return G.method="throw",G.arg=et.arg,G.delegate=null,h;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,h):Lt:(G.method="throw",G.arg=new TypeError("iterator result is not an object"),G.delegate=null,h)}function Se(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(Se,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 S.prototype=D,i(dt,"constructor",{value:D,configurable:!0}),i(D,"constructor",{value:S,configurable:!0}),S.displayName=e(D,t,"GeneratorFunction"),l.isGeneratorFunction=function(W){var G=typeof W=="function"&&W.constructor;return!!G&&(G===S||(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(Oe,Sr){return Lt.type="throw",Lt.arg=W,G.next=Oe,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"),je=p.call(et,"finallyLoc");if(ee&&je){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(!je)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,h):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),h},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),h}},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),h}},l}function kc(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 jc(l){return function(){var n=this,p=arguments;return new Promise(function(i,u){var a=l.apply(n,p);function s(e){kc(a,i,u,s,t,"next",e)}function t(e){kc(a,i,u,s,t,"throw",e)}s(void 0)})}}function ui(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,h=!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(w){h=!0,s=w}finally{try{if(!c&&u.return!=null&&(e=u.return(),Object(e)!==e))return}finally{if(h)throw s}}return o}}(l,n)||function(p,i){if(p){if(typeof p=="string")return Oc(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)?Oc(p,i):void 0}}(l,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 Oc(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 hh(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 dh=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=ui(e,2),c=o[0],h=o[1];s.anyOf[c]=t.expandSchema(h)})},dependencies:function(s){var t=this;Object.entries(s.dependencies).forEach(function(e){var o=ui(e,2),c=o[0],h=o[1];rr(h)!=="object"||Array.isArray(h)||(s.dependencies[c]=t.expandSchema(h))})},not:function(s){s.not=this.expandSchema(s.not)}},this._subSchema2={allOf:function(s,t){var e=this,o=_({},t);return Object.entries(s.allOf).forEach(function(c){var h=ui(c,2),w=h[0],S=h[1];s.allOf[w]=e.expandRefs(S,!0),o=e.extendSchemas(o,e.expandSchema(S))}),delete o.allOf,o},extends:function(s,t){var e,o=this;return delete(e=Array.isArray(s.extends)?s.extends.reduce(function(c,h,w){return o.extendSchemas(c,o.expandSchema(h))},t):this.extendSchemas(t,this.expandSchema(s.extends))).extends,e},oneOf:function(s,t){var e=this,o=_({},t);return delete o.oneOf,s.oneOf.reduce(function(c,h,w){return c.oneOf[w]=e.extendSchemas(e.expandSchema(h),o),c},t),t}}}var n,p,i,u;return n=l,p=[{key:"load",value:(u=jc(ci().mark(function a(s,t,e){return ci().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=_({},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]),h=this.extendSchemas(e,this.expandSchema(c));return delete h.$ref,h}var w=o.length>2?this.refs_with_info["#"+o[1]]:this.refs_with_info[e.$ref];delete e.$ref;var S=w.$ref.startsWith("#")?w.fetchUrl:"",D=this._getRef(S,w);if(this.refs[D]){if(s&&E(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=ui(e,2),c=o[0],h=o[1];a[c]&&h.call(s,a)});var t=_({},a);return Object.entries(this._subSchema2).forEach(function(e){var o=ui(e,2),c=o[0],h=o[1];a[c]&&(t=h.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 h=a.$ref,w="";h.indexOf("#")>0&&(h=h.substr(0,h.indexOf("#"))),h!==a.$ref&&(w=a.$ref.substr(a.$ref.indexOf("#")));var S=this.refs_prefix+this.refs_counter++,D=S+w;a.$ref.substr(0,1)==="#"||this.refs[a.$ref]||(o[h]=!0),this.refs_with_info[S]={fetchUrl:s,$ref:h},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=jc(ci().mark(function a(s,t,e){var o,c,h,w,S,D,J=this,nt=arguments;return ci().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),h=0,w=ci().mark(function dt(){var kt,Ct,Bt,re,Se,Ut,gt,Wt,ze,W,G;return ci().wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:if((kt=D[S])!==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",h++,Ct=J.options.urn_resolver,Bt=kt,typeof Ct=="function"){Z.next=13;break}throw console.log('No "urn_resolver" callback defined to resolve "'.concat(Bt,'"')),new Error("Must set urn_resolver option to a callback to resolve ".concat(Bt));case 13:return Bt.indexOf("#")>0&&(Bt=Bt.substr(0,Bt.indexOf("#"))),Z.prev=14,Z.next=17,Ct(Bt);case 17:re=Z.sent,Z.prev=18,Se=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(Bt));case 26:if(!(typeof Se!="boolean"&&rr(Se)!=="object"||Se===null||Array.isArray(Se))){Z.next=28;break}throw new Error("External ref does not contain a valid schema - ".concat(Bt));case 28:return J.refs[kt]=Se,Z.next=31,J._asyncloadExternalRefs(Se,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(Bt));case 37:if(typeof re!="boolean"){Z.next=39;break}throw new Error("External ref does not contain a valid schema - ".concat(Bt));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(h++,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]])}),S=0,D=Object.keys(c);case 5:if(!(S<D.length)){ut.next=13;break}return ut.delegateYield(w(),"t0",7);case 7:if(ut.t0!=="continue"){ut.next=10;break}return ut.abrupt("continue",10);case 10:S++,ut.next=5;break;case 13:if(h){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=_({},a),s=_({},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(h){return s.type.includes(h)}):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 h=ui(c,2),w=h[0],S=h[1];s[w]!==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)}(w,S):e[w]=S}),Object.entries(s).forEach(function(c){var h=ui(c,2),w=h[0],S=h[1];a[w]===void 0&&(e[w]=S)}),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&&hh(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),l}(),ph=(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(h){for(e=h,s=0;s<c&&(e=e[o[s]]);s++);return e}:(o=o[0],t=function(h){return h[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 Zo(l){return Zo=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},Zo(l)}function qs(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 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(Zo(a)!=="object"||a===null)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var e=t.call(a,"string");if(Zo(e)!=="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(i.key),Zo(u)==="symbol"?u:String(u)),i)}var u}var yh={collapse:"",expand:"",delete:"",edit:"",add:"",cancel:"",save:"",moveup:"",movedown:""},mn=function(){function l(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:yh;(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 qs(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 qs(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)?qs(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}}])&&fh(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),l}();function Us(l){return Us=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},Us(l)}function Gs(l,n){return Gs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},Gs(l,n)}function Ua(l){return Ua=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ua(l)}var mh="glyphicon glyphicon-",vh={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"},bh=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&&Gs(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=Ua(p);if(i){var e=Ua(this).constructor;s=Reflect.construct(t,arguments,e)}else s=t.apply(this,arguments);return function(o,c){if(c&&(Us(c)==="object"||typeof c=="function"))return c;if(c!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(h){if(h===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h}(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,mh,vh)}return n=a,Object.defineProperty(n,"prototype",{writable:!1}),n}(mn);function Ws(l){return Ws=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},Ws(l)}function Zs(l,n){return Zs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},Zs(l,n)}function Ga(l){return Ga=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ga(l)}var gh="icon-",wh={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"},_h=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&&Zs(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=Ga(p);if(i){var e=Ga(this).constructor;s=Reflect.construct(t,arguments,e)}else s=t.apply(this,arguments);return function(o,c){if(c&&(Ws(c)==="object"||typeof c=="function"))return c;if(c!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(h){if(h===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h}(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,gh,wh)}return n=a,Object.defineProperty(n,"prototype",{writable:!1}),n}(mn);function Js(l){return Js=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},Js(l)}function Ys(l,n){return Ys=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},Ys(l,n)}function Wa(l){return Wa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Wa(l)}var xh="fa fa-",kh={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"},jh=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&&Ys(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=Wa(p);if(i){var e=Wa(this).constructor;s=Reflect.construct(t,arguments,e)}else s=t.apply(this,arguments);return function(o,c){if(c&&(Js(c)==="object"||typeof c=="function"))return c;if(c!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(h){if(h===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h}(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,xh,kh)}return n=a,Object.defineProperty(n,"prototype",{writable:!1}),n}(mn);function Xs(l){return Xs=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},Xs(l)}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 Oh="fas fa-",Eh={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"},Ch=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&&Qs(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=Za(p);if(i){var e=Za(this).constructor;s=Reflect.construct(t,arguments,e)}else s=t.apply(this,arguments);return function(o,c){if(c&&(Xs(c)==="object"||typeof c=="function"))return c;if(c!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(h){if(h===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h}(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,Oh,Eh)}return n=a,Object.defineProperty(n,"prototype",{writable:!1}),n}(mn);function Ks(l){return Ks=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},Ks(l)}function tl(l,n){return tl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},tl(l,n)}function Ja(l){return Ja=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ja(l)}var Sh="ui-icon ui-icon-",Ph={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"},Th=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&&tl(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=Ja(p);if(i){var e=Ja(this).constructor;s=Reflect.construct(t,arguments,e)}else s=t.apply(this,arguments);return function(o,c){if(c&&(Ks(c)==="object"||typeof c=="function"))return c;if(c!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(h){if(h===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h}(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,Sh,Ph)}return n=a,Object.defineProperty(n,"prototype",{writable:!1}),n}(mn);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 Lh="oi oi-",Ah={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"},Rh=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(h){if(h===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h}(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,Lh,Ah)}return n=a,Object.defineProperty(n,"prototype",{writable:!1}),n}(mn);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 Ih="icon icon-",Dh={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"},Bh=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(h){if(h===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h}(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,Ih,Dh)}return n=a,Object.defineProperty(n,"prototype",{writable:!1}),n}(mn);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 Nh="bi bi-",$h={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"},Mh={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&&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(h){if(h===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h}(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,Nh,$h)}return n=a,Object.defineProperty(n,"prototype",{writable:!1}),n}(mn),bootstrap3:bh,fontawesome3:_h,fontawesome4:jh,fontawesome5:Ch,jqueryui:Th,openiconic:Rh,spectre:Bh};function Jo(l){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(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(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(u)==="symbol"?u:String(u)),i)}var u}var Ec=["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"].find(function(l){return l in document.documentElement}),vn=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,h){c.value=Number(h||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[Ec])return!1;if(i[Ec](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&&Fh(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),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 Hh(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 hi(){return hi=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}},hi.apply(this,arguments)}function sl(l,n){return sl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},sl(l,n)}function nn(l){return nn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},nn(l)}var Cc=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&&sl(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,h){if(h&&(eo(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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=hi(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=hi(nn(s.prototype),"getFormInputDescription",this).call(this,t);return e.classList.add("je-form-input-label"),e}},{key:"getIndentedPanel",value:function(){var t=hi(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=hi(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=hi(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")}}])&&Hh(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(vn);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 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(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 di(){return di=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}},di.apply(this,arguments)}function ll(l,n){return ll=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},ll(l,n)}function on(l){return on=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},on(l)}Cc.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 Sc=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&&ll(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,h){if(h&&(ro(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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=di(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 di(on(s.prototype),"getRangeInput",this).call(this,t,e,o)}},{key:"getFormInputField",value:function(t){var e=di(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 h=document.createElement("div");return!t||e.type!=="checkbox"&&e.type!=="radio"?(h.classList.add("form-group"),t&&(t.classList.add("control-label"),h.appendChild(t),c&&t.appendChild(c)),h.appendChild(e)):(h.classList.add(e.type),c&&t.appendChild(c),t.insertBefore(e,t.firstChild),h.appendChild(t)),o&&h.appendChild(o),h}},{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=di(on(s.prototype),"getButton",this).call(this,t,e,o);return c.classList.add("btn","btn-default"),c}},{key:"getTableContainer",value:function(){var t=di(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 h=0;h<e.length;h++)c.appendChild(e[h]);return o}}}])&&Vh(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(vn);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 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(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=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}},pi.apply(this,arguments)}function cl(l,n){return cl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},cl(l,n)}function an(l){return an=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},an(l)}Sc.rules={},k(3843);var qh={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"},Pc=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&&cl(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,h){if(h&&(no(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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,qh)}return n=s,(p=[{key:"getSelectInput",value:function(t,e){var o=pi(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=pi(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"),h=document.createElement("button");h.setAttribute("type","button");var w=document.createElement("button");w.setAttribute("type","button"),e.appendChild(o),e.appendChild(t),e.appendChild(c),o.appendChild(h),c.appendChild(w),e.classList.add("input-group"),o.classList.add("input-group-prepend"),c.classList.add("input-group-append"),h.classList.add("btn"),h.classList.add("btn-secondary"),h.classList.add("stepper-down"),w.classList.add("btn"),w.classList.add("btn-secondary"),w.classList.add("stepper-up"),t.getAttribute("readonly")&&(h.setAttribute("disabled",!0),w.setAttribute("disabled",!0)),h.textContent="-",w.textContent="+";var S=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")}),h.addEventListener("click",function(){t.getAttribute("initialized")?D?Number(t.value)>Number(D)&&t.stepDown():t.stepDown():S(t,D),O(t,"change")}),w.addEventListener("click",function(){t.getAttribute("initialized")?J?Number(t.value)<Number(J)&&t.stepUp():t.stepUp():S(t,D),O(t,"change")}),e}},{key:"getFormInputField",value:function(t){var e=pi(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 h=document.createElement("div");if(h.classList.add("form-group"),!t||e.type!=="checkbox"&&e.type!=="radio")t&&(h.appendChild(t),c&&h.appendChild(c)),h.appendChild(e);else{var w=document.createElement("div");this.options.custom_forms===!1?(w.classList.add("form-check"),e.classList.add("form-check-input"),t.classList.add("form-check-label")):(w.classList.add("custom-control"),e.classList.add("custom-control-input"),t.classList.add("custom-control-label"),e.type==="checkbox"?w.classList.add("custom-checkbox"):w.classList.add("custom-radio"));var S=(Date.now()*Math.random()).toFixed(0);e.setAttribute("id",S),t.setAttribute("for",S),w.appendChild(e),w.appendChild(t),c&&w.appendChild(c),h.appendChild(w)}return o&&h.appendChild(o),h}},{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 h=document.createElement("div");h.classList.add("form-group"),e&&(h.appendChild(e),c&&e.appendChild(c));var w=document.createElement("div");return Object.values(t).forEach(function(S){var D=S.firstChild;w.appendChild(D)}),h.appendChild(w),o&&h.appendChild(o),h}},{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=pi(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=pi(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 h=0;h<e.length;h++)e[h].classList.remove("mr-2","btn-secondary"),e[h].classList.add("btn-outline-secondary"),c.appendChild(e[h]);return o}}}])&&zh(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(vn);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 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(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=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}},fi.apply(this,arguments)}function ul(l,n){return ul=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},ul(l,n)}function sn(l){return sn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},sn(l)}Pc.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 Gh={disable_theme_rules:!1,input_size:"normal",object_indent:!0,object_background:"bg-light",object_text:"",table_border:!1,table_zebrastyle:!1,tooltip:"bootstrap"},Tc=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&&ul(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,h){if(h&&(io(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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,Gh)}return n=s,(p=[{key:"getSelectInput",value:function(t,e){var o=fi(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=fi(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 h=function(D,J){D.value=Number(J||D.value),D.setAttribute("initialized","1")},w=t.getAttribute("min"),S=t.getAttribute("max");return t.addEventListener("change",function(){t.getAttribute("initialized")||t.setAttribute("initialized","1")}),o.addEventListener("click",function(){t.getAttribute("initialized")?w?Number(t.value)>Number(w)&&t.stepDown():t.stepDown():h(t,w),O(t,"change")}),c.addEventListener("click",function(){t.getAttribute("initialized")?S?Number(t.value)<Number(S)&&t.stepUp():t.stepUp():h(t,w),O(t,"change")}),e}},{key:"getFormInputField",value:function(t){var e=fi(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 h=document.createElement("div");if(h.classList.add("form-group"),!t||e.type!=="checkbox"&&e.type!=="radio")t&&(t.classList.add("form-label"),h.appendChild(t),c&&h.appendChild(c)),h.appendChild(e);else{var w=document.createElement("div");w.classList.add("form-check"),e.classList.add("form-check-input"),t.classList.add("form-check-label");var S=(Date.now()*Math.random()).toFixed(0);e.setAttribute("id",S),t.setAttribute("for",S),w.appendChild(e),w.appendChild(t),c&&w.appendChild(c),h.appendChild(w)}return o&&h.appendChild(o),h}},{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 h=document.createElement("div");h.classList.add("form-group"),e&&(h.appendChild(e),c&&e.appendChild(c));var w=document.createElement("div");return Object.values(t).forEach(function(S){var D=S.firstChild;w.appendChild(D)}),h.appendChild(w),o&&h.appendChild(o),h}},{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=fi(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=fi(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}}}])&&Uh(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(vn);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 Wh(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 ao(){return ao=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=bn(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}},ao.apply(this,arguments)}function hl(l,n){return hl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},hl(l,n)}function bn(l){return bn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},bn(l)}Tc.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 Lc=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&&hl(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=bn(i);if(u){var o=bn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,h){if(h&&(oo(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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=ao(bn(s.prototype),"getTable",this).call(this);return t.setAttribute("cellpadding",5),t.setAttribute("cellspacing",0),t}},{key:"getTableHeaderCell",value:function(t){var e=ao(bn(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=ao(bn(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 h=ao(bn(s.prototype),"getFormControl",this).call(this,t,e,o,c);return e.type==="checkbox"?(h.style.lineHeight="25px",h.style.padding="3px 0"):h.style.padding="4px 0 8px 0",h}},{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 h=document.createElement("span");return h.classList.add("ui-button-text"),h.textContent=t||o||".",c.appendChild(h),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 h=document.createElement("span");h.classList.add("ui-button-text"),h.textContent=e||c||".",t.appendChild(h),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"}}])&&Wh(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(vn);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 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(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 dl(l,n){return dl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},dl(l,n)}function Ka(l){return Ka=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ka(l)}Lc.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 Ac=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&&dl(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=Ka(i);if(u){var o=Ka(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(c,h){if(h&&(so(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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")}}])&&Zh(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(vn);function lo(l){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(l)}function Jh(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(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(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 pl(l,n){return pl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},pl(l,n)}function Ye(l){return Ye=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ye(l)}Ac.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 Yh={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"},Rc=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&&pl(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,h){if(h&&(lo(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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,Yh)}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 h=document.createElement("div");return h.classList.add("form-group"),!t||e.type!=="checkbox"&&e.type!=="radio"?(t&&(t.classList.add("form-label"),h.appendChild(t),c&&t.appendChild(c)),h.appendChild(e)):(h.classList.add(e.type),c&&t.appendChild(c),t.insertBefore(e,t.firstChild),h.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"&&h.appendChild(e),o&&h.appendChild(o),h}},{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 h=document.createElement("div");h.classList.add("popover-container"),e.appendChild(h);var w=document.createElement("div");w.classList.add("card"),h.appendChild(w);var S=document.createElement("div");return S.classList.add("card-body"),S.innerHTML=t,w.appendChild(S),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"))}}])&&Jh(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(vn);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 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(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 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 fl(l,n){return fl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,i){return p.__proto__=i,p},fl(l,n)}function Xe(l){return Xe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Xe(l)}Rc.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 Qh={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},Ic=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&&fl(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,h){if(h&&(co(h)==="object"||typeof h=="function"))return h;if(h!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(w){if(w===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}(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,Qh)}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 h=dr(Xe(s.prototype),"getMultiCheckboxHolder",this).call(this,t,e,o,c);return h.classList.add("inline-flex","flex-col"),h}},{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,h){var w=dr(Xe(s.prototype),"getRadioHolder",this).call(this,e,o,c,h);return t.options.layout==="h"?w.classList.add("inline-flex","flex-row"):w.classList.add("inline-flex","flex-col"),w}},{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 h=document.createElement("div");return h.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)),h.appendChild(t),!["checkbox","radio"].includes(e.type)&&c&&h.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"),h.appendChild(e)),o&&h.appendChild(o),h}},{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 h=0;h<e.length;h++)c.appendChild(e[h]);return o}}}])&&Xh(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),s}(vn);Ic.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 Kh={html:Cc,bootstrap3:Sc,bootstrap4:Pc,bootstrap5:Tc,jqueryui:Lc,barebones:Ac,spectre:Rc,tailwind:Ic};const td={".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 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 yl(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 ml(){ml=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 w?G:w,Lt=Object.create(et.prototype),ee=new gt(pt||[]);return i(Lt,"_invoke",{value:Bt(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 h={};function w(){}function S(){}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=w.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,je){var Oe=c(W[et],W,Lt);if(Oe.type!=="throw"){var Sr=Oe.arg,Ur=Sr.value;return Ur&&uo(Ur)=="object"&&p.call(Ur,"__await")?G.resolve(Ur.__await).then(function(yr){Z("next",yr,ee,je)},function(yr){Z("throw",yr,ee,je)}):G.resolve(Ur).then(function(yr){Sr.value=yr,ee(Sr)},function(yr){return Z("throw",yr,ee,je)})}je(Oe.arg)}var pt;i(this,"_invoke",{value:function(et,Lt){function ee(){return new G(function(je,Oe){Z(et,Lt,je,Oe)})}return pt=pt?pt.then(ee,ee):ee()}})}function Bt(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 je=re(ee,Z);if(je){if(je===h)continue;return je}}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 Oe=c(W,G,Z);if(Oe.type==="normal"){if(pt=Z.done?"completed":"suspendedYield",Oe.arg===h)continue;return{value:Oe.arg,done:Z.done}}Oe.type==="throw"&&(pt="completed",Z.method="throw",Z.arg=Oe.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")),h;var et=c(pt,W.iterator,G.arg);if(et.type==="throw")return G.method="throw",G.arg=et.arg,G.delegate=null,h;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,h):Lt:(G.method="throw",G.arg=new TypeError("iterator result is not an object"),G.delegate=null,h)}function Se(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(Se,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 S.prototype=D,i(dt,"constructor",{value:D,configurable:!0}),i(D,"constructor",{value:S,configurable:!0}),S.displayName=e(D,t,"GeneratorFunction"),l.isGeneratorFunction=function(W){var G=typeof W=="function"&&W.constructor;return!!G&&(G===S||(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(Oe,Sr){return Lt.type="throw",Lt.arg=W,G.next=Oe,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"),je=p.call(et,"finallyLoc");if(ee&&je){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(!je)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,h):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),h},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),h}},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),h}},l}function Dc(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 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(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}var gn=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=_({},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=_(td,this.getEditorsRules()),h=function(D,J,nt){return nt?s.addNewStyleRulesToShadowRoot(D,J,nt):s.addNewStyleRules(D,J)};if(!this.theme.options.disable_theme_rules){var w=C(this.element);h("default",c,w),o.rules!==void 0&&h(e,o.rules,w)}var S=l.defaults.iconlibs[this.options.iconlib||l.defaults.iconlib];S&&(this.iconlib=new S),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=ml().mark(function a(){var s,t,e,o,c,h,w=this;return ml().wrap(function(S){for(;;)switch(S.prev=S.next){case 0:return s=document.location.origin+document.location.pathname.toString(),(t=new dh(this.options)).onSchemaLoaded=function(D){w.trigger("schemaLoaded",D)},t.onAllSchemasLoaded=function(){w.trigger("allSchemasLoaded")},this.expandSchema=function(D){return t.expandSchema(D)},this.expandRefs=function(D,J){return t.expandRefs(D,J)},e=document.location.toString(),S.next=9,t.load(this.schema,s,e);case 9:o=S.sent,c=this.options.custom_validators?{custom_validators:this.options.custom_validators}:{},this.validator=new Bi(this,null,c,l.defaults),h=this.getEditorClass(o),this.root=this.createEditor(h,{jsoneditor:this,schema:o,required:!0,container:this.root_container}),this.root.preBuild(),this.root.build(),this.root.postBuild(),E(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(){w.ready&&(w.validation_results=w.validator.validate(w.root.getValue()),w.root.showValidationErrors(w.validation_results),w.trigger("ready"),w.trigger("change"))});case 24:case"end":return S.stop()}},a,this)}),u=function(){var a=this,s=arguments;return new Promise(function(t,e){var o=i.apply(a,s);function c(w){Dc(o,t,e,c,h,"next",w)}function h(w){Dc(o,t,e,c,h,"throw",w)}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?_(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=_({},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 h=a==="default"?c:"".concat(o,'[data-theme="').concat(a,'"] ').concat(c);e.insertRule?e.insertRule(h+" {"+decodeURIComponent(s[c])+"}",0):e.addRule&&e.addRule(h,decodeURIComponent(s[c]),0)})}},{key:"addNewStyleRulesToShadowRoot",value:function(a,s,t){var e=this.element.nodeName.toLowerCase(),o="";Object.keys(s).forEach(function(w){var S=a==="default"?w:"".concat(e,'[data-theme="').concat(a,'"] ').concat(w);o+=S+" {"+decodeURIComponent(s[w])+`}
|
|
65
|
+
`});var c,h=new CSSStyleSheet;h.replaceSync(o),t.adoptedStyleSheets=[].concat(function(w){if(Array.isArray(w))return yl(w)}(c=t.adoptedStyleSheets)||function(w){if(typeof Symbol<"u"&&w[Symbol.iterator]!=null||w["@@iterator"]!=null)return Array.from(w)}(c)||function(w,S){if(w){if(typeof w=="string")return yl(w,S);var D=Object.prototype.toString.call(w).slice(8,-1);return D==="Object"&&w.constructor&&(D=w.constructor.name),D==="Map"||D==="Set"?Array.from(w):D==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(D)?yl(w,S):void 0}}(c)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
66
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}(),[h])}}],p&&ed(n.prototype,p),Object.defineProperty(n,"prototype",{writable:!1}),l}();gn.defaults=li,gn.AbstractEditor=q,gn.AbstractTheme=vn,gn.AbstractIconLib=mn,Object.assign(gn.defaults.themes,Kh),Object.assign(gn.defaults.editors,qa),Object.assign(gn.defaults.templates,ph),Object.assign(gn.defaults.iconlibs,Mh)})(),P})())})(ac);var fa=ac.exports;const Fu=`
|
|
67
67
|
* {
|
|
68
68
|
font-family: Roboto, sans-serif;
|
|
69
69
|
}
|
|
70
|
-
`,
|
|
70
|
+
`,Es=`
|
|
71
71
|
input[type=checkbox] {
|
|
72
72
|
appearance: none;
|
|
73
73
|
-webkit-appearance: none;
|
|
@@ -90,7 +90,7 @@ input[type=checkbox]:checked:after {
|
|
|
90
90
|
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
91
|
|
|
92
92
|
}
|
|
93
|
-
`,
|
|
93
|
+
`,sc=`
|
|
94
94
|
input[type=radio] {
|
|
95
95
|
appearance: none;
|
|
96
96
|
-webkit-appearance: none;
|
|
@@ -118,7 +118,7 @@ input[type=radio]:checked:after {
|
|
|
118
118
|
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
119
|
|
|
120
120
|
}
|
|
121
|
-
`,
|
|
121
|
+
`,lc=`
|
|
122
122
|
input[type="range"] {
|
|
123
123
|
-webkit-appearance: none;
|
|
124
124
|
width: 90%;
|
|
@@ -196,9 +196,9 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
196
196
|
border: 0;
|
|
197
197
|
}
|
|
198
198
|
`,Hu=`
|
|
199
|
-
${
|
|
200
|
-
${ac}
|
|
199
|
+
${Es}
|
|
201
200
|
${sc}
|
|
201
|
+
${lc}
|
|
202
202
|
|
|
203
203
|
ul {
|
|
204
204
|
padding-left: 0;
|
|
@@ -307,7 +307,7 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
307
307
|
display: block;
|
|
308
308
|
margin: 0.5rem 0;
|
|
309
309
|
}
|
|
310
|
-
`;function lc(x){return!(x===null||typeof x!="object"||x.nodeType||x===x.window||x.constructor&&!Po(x.constructor.prototype,"isPrototypeOf"))}function cc(x){return lc(x)?fa({},x):Array.isArray(x)?x.map(cc):x}function fa(x,...d){return d.forEach(f=>{f&&Object.keys(f).forEach(v=>{f[v]&&lc(f[v])?(Po(x,v)||(x[v]={}),fa(x[v],f[v])):Array.isArray(f[v])?x[v]=cc(f[v]):x[v]=f[v]})}),x}function Po(x,d){return x&&Object.prototype.hasOwnProperty.call(x,d)}class Fu{constructor(d,f){this.defaults=f,this.jsoneditor=d.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=d.schema,this.schema=this.jsoneditor.expandSchema(this.original_schema),this.active=!0,this.options=fa({},this.options||{},this.schema.options||{},d.schema.options||{},d),this.formname=this.jsoneditor.options.form_name_root||"root",!d.path&&!this.schema.id&&(this.schema.id=this.formname),this.path=d.path||this.formname,this.formname=d.formname||this.path.replace(/\.([^.]+)/g,"[$1]"),this.parent=d.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,d.container&&this.setContainer(d.container),this.registerDependencies()}onChildEditorChange(d){this.onChange(!0)}notify(){this.path&&this.jsoneditor.notifyWatchers(this.path)}change(){this.parent?this.parent.onChildEditorChange(this):this.jsoneditor&&this.jsoneditor.onChange()}onChange(d){this.notify(),this.watch_listener&&this.watch_listener(),d&&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 d=this.options.dependencies;d&&Object.keys(d).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 d=this.container||this.control;if(!d||this.jsoneditor===null)return;const f=this.options.dependencies;if(!f)return;const v=this.dependenciesFulfilled;this.dependenciesFulfilled=!0,Object.keys(f).forEach(P=>{let m;P.startsWith(this.jsoneditor.root.path)?m=P:(m=this.path.split("."),m[m.length-1]=P,m=m.join("."));const r=f[P];this.checkDependency(m,r)}),this.dependenciesFulfilled!==v&&this.notify();let k=this.dependenciesFulfilled?"block":"none";this.options.hidden&&(k="none"),d.tagName==="TD"?Object.keys(d.childNodes).forEach(P=>d.childNodes[P].style.display=k):d.style.display=k}checkDependency(d,f){if(this.path===d||this.jsoneditor===null)return;const v=this.jsoneditor.getEditor(d),k=v?v.getValue():void 0;!v||!v.dependenciesFulfilled?this.dependenciesFulfilled=!1:Array.isArray(f)?this.dependenciesFulfilled=f.some(P=>{if(JSON.stringify(k)===JSON.stringify(P))return!0}):typeof f=="object"?typeof k!="object"?this.dependenciesFulfilled=f===k:Object.keys(f).some(P=>{if(!Po(f,P))return!1;if(!Po(k,P)||f[P]!==k[P])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(d){this.container=d,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(d){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,P=v&&this.parent.options.show_opt_in===!1;(k||!P&&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()},Po(this.schema,"watch")){let d,f,v,k,P;const m=this.container.getAttribute("data-schemapath");Object.keys(this.schema.watch).forEach(j=>{if(d=this.schema.watch[j],Array.isArray(d)){if(d.length<2)return;f=[d[0]].concat(d[1].split("."))}else f=d.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}`);P=`${k.getAttribute("data-schemapath")}.${f.join(".")}`,m.startsWith(P)&&(this.watchLoop=!0),this.jsoneditor.watch(P,this.watch_listener),this.watched[j]=P})}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 d=0;d<this.schema.links.length;d++)this.addLink(this.getLink(this.schema.links[d]))}onMove(){}getButton(d,f,v,k=[]){const P=`json-editor-btn-${f}`;this.iconlib?f=this.iconlib.getIcon(f):f=null,d=this.translate(d,k),v=this.translate(v,k),!f&&v&&(d=v,v=null);const m=this.theme.getButton(d,f,v);return m.classList.add(P),m}setButtonText(d,f,v,k,P=[]){return this.iconlib?v=this.iconlib.getIcon(v):v=null,f=this.translate(f,P),k=this.translate(k,P),!v&&k&&(f=k,k=null),this.theme.setButtonText(d,f,v,k)}addLink(d){this.link_holder&&this.link_holder.appendChild(d)}getLink(d){let f,v;const P=(d.mediaType||"application/javascript").split("/")[0],m=this.jsoneditor.compileTemplate(d.href,this.template_engine),j=this.jsoneditor.compileTemplate(d.rel?d.rel:d.href,this.template_engine);let r=null;if(d.download&&(r=d.download),r&&r!==!0&&(r=this.jsoneditor.compileTemplate(r,this.template_engine)),P==="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),_=j(b);v.setAttribute("href",g),v.setAttribute("title",_||g),y.setAttribute("src",g)})}else if(["audio","video"].includes(P)){f=this.theme.getBlockLinkHolder(),v=this.theme.getBlockLink(),v.setAttribute("target","_blank");const y=document.createElement(P);y.setAttribute("controls","controls"),this.theme.createMediaLink(f,v,y),this.link_watchers.push(b=>{const g=m(b),_=j(b);v.setAttribute("href",g),v.textContent=_||g,y.setAttribute("src",g)})}else v=f=this.theme.getBlockLink(),f.setAttribute("target","_blank"),f.textContent=d.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))})),d.class&&v.classList.add(d.class),f}refreshWatchedFieldValues(){if(!this.watched_values)return;const d={};let f=!1;return this.watched&&Object.keys(this.watched).forEach(v=>{const k=this.jsoneditor.getEditor(this.watched[v]),P=k?k.getValue():null;this.watched_values[v]!==P&&(f=!0),d[v]=P}),d.self=this.getValue(),this.watched_values.self!==d.self&&(f=!0),this.watched_values=d,f}getWatchedFieldValues(){return this.watched_values}updateHeaderText(){if(this.header){const d=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(d);break}}else window.DOMPurify?this.header.innerHTML=window.DOMPurify.sanitize(d):this.header.textContent=this.cleanText(d)}}getHeaderText(d){return this.header_text?this.header_text:d?this.translateProperty(this.schema.title):this.getTitle()}getPathDepth(){return this.path.split(".").length}cleanText(d){const f=document.createElement("div");return f.innerHTML=d,f.textContent||f.innerText}onWatchedFieldChange(){let d;if(this.header_template){d=fa(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(d);f!==this.header_text&&(this.header_text=f,this.updateHeaderText(),this.notify())}if(this.link_watchers.length){d=this.getWatchedFieldValues();for(let f=0;f<this.link_watchers.length;f++)this.link_watchers[f](d)}}setValue(d){this.value=d}getValue(){if(this.dependenciesFulfilled)return this.value}refreshValue(){}getChildEditors(){return!1}destroy(){this.unregister(this),this.watched&&Object.values(this.watched).forEach(d=>this.jsoneditor.unwatch(d,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 d=this.schema.type||this.schema.oneOf;if(d&&Array.isArray(d)&&(d=d[0]),d&&typeof d=="object"&&(d=d.type),d&&Array.isArray(d)&&(d=d[0]),typeof d=="string"){if(d==="number")return this.isDefaultRequired()?0:void 0;if(d==="boolean")return this.isDefaultRequired()?!1:void 0;if(d==="integer")return this.isDefaultRequired()?0:void 0;if(d==="string")return this.isDefaultRequired()?"":void 0;if(d==="null")return null;if(d==="object")return{};if(d==="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(d){const f=[],v={};d.forEach(P=>{P.title&&(v[P.title]=v[P.title]||0,v[P.title]++),P.description&&(v[P.description]=v[P.description]||0,v[P.description]++),P.format&&(v[P.format]=v[P.format]||0,v[P.format]++),P.type&&(v[P.type]=v[P.type]||0,v[P.type]++)}),d.forEach(P=>{let m;typeof P=="string"?m=P:P.title&&v[P.title]<=1?m=P.title:P.format&&v[P.format]<=1?m=P.format:P.type&&v[P.type]<=1?m=P.type:P.description&&v[P.description]<=1?m=P.description:P.title?m=P.title:P.format?m=P.format:P.type?m=P.type:P.description?m=P.description:JSON.stringify(P).length<500?m=JSON.stringify(P):m="type",f.push(m)});const k={};return f.forEach((P,m)=>{k[P]=k[P]||0,k[P]++,v[P]>1&&(f[m]=`${P} ${k[P]}`)}),f}getValidId(d){return d=d===void 0?"":d.toString(),d.replace(/\s+/g,"-")}setInputAttributes(d){if(this.schema.options&&this.schema.options.inputAttributes){const f=this.schema.options.inputAttributes,v=["name","type"].concat(d);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 d=this.schema.options.containerAttributes,f=["data-schemapath","data-schematype","data-schemaid"];Object.keys(d).forEach(v=>{f.includes(v.toLowerCase())||this.container.setAttribute(v,d[v])})}}expandCallbacks(d,f){const v=this.defaults.callbacks[d];return Object.entries(f).forEach(([k,P])=>{P===Object(P)?f[k]=this.expandCallbacks(d,P):typeof P=="string"&&typeof v=="object"&&typeof v[P]=="function"&&(f[k]=v[P].bind(null,this))}),f}showValidationErrors(d){}}(()=>{var x=P=>P==null?!1:typeof P=="boolean"?P:P.trim().toLowerCase()==="true";window.tcRangeSliderPlugins=window.tcRangeSliderPlugins||[];var d="min-label",f="max-label",v="#1E293B",k=()=>{let P=null,m=null,j=null,r,y=!1,b=v,g="",_,O=null,C=null,E=null,T=[],L=()=>{var z;let M=(z=P==null?void 0:P.shadowRoot)==null?void 0:z.querySelector(".range-slider-box");O=document.createElement("div"),O.classList.add("labels-row"),M.prepend(O)},R=z=>{let M=document.createElement("label");return M.className=z,M.setAttribute("for","range-slider"),M},I=()=>{C=R(d),C.textContent=B(j==null?void 0:j.getTextMin(),g),E=R(f),E.textContent=B(j==null?void 0:j.getTextMax(),g),m==null||m.before(C),m==null||m.after(E);let z=j==null?void 0:j.getValues();if(z)for(let M=0;M<z.length;M++){let X=R(`value${M+1}-label generated-label`);X.textContent=B(z[M],g),T.push(X),O==null||O.append(X)}},N=()=>{for(let z of T)!z||z.remove();C==null||C.remove(),E==null||E.remove(),O==null||O.remove(),T=[]},H=z=>{y=z,y?(L(),I()):N()},$=z=>{b=z;for(let M of T)!M||(M.style.color=b??v);C&&(C.style.color=b??v),E&&(E.style.color=b??v)},U=z=>{g=z,r&&r()},q=()=>{!j||!O||O.classList.toggle("is-reversed",j.isRightToLeft()||j.isBottomToTop())},B=(z,M)=>{let X=`${(z??"").toString()}${M}`;return _&&typeof _=="function"?_(z):X};return{get name(){return"Generated Labels"},init:(z,M,X,Y)=>{var Q,tt,it;P=z,j=Y,m=(Q=z.shadowRoot)==null?void 0:Q.getElementById("range-slider"),r=M,b=(tt=P.getAttribute("generate-labels-text-color"))!=null?tt:v,g=(it=P.getAttribute("generate-labels-units"))!=null?it:"",H(x(P.getAttribute("generate-labels"))),q(),$(b)},update:z=>{if(!(!y||!z.values)){q();for(let M=0;M<z.values.length;M++){let X=z.values[M],Y=T[M];if(X===void 0&&Y){Y.remove(),T[M]=void 0;continue}if(X!==void 0&&!Y){let Q=R(`value${M+1}-label generated-label`);if(Q.textContent=B(X,g),T[M]=Q,z.values.length<=0)O==null||O.append(Q);else if(M===0)O==null||O.append(Q);else{let tt=T[M-1];tt==null||tt.after(Q)}continue}!Y||(Y.textContent=B(X,g))}C&&(C.textContent=B(z.textMin,g)),E&&(E.textContent=B(z.textMax,g)),$(b)}},onAttrChange:(z,M)=>{z==="generate-labels"&&H(x(M)),z==="generate-labels-text-color"&&$(M),z==="generate-labels-units"&&U(M)},gettersAndSetters:[{name:"generateLabels",attributes:{get(){return y??!1},set:z=>{H(x(z))}}},{name:"textColor",attributes:{get(){return b??""},set:z=>{$(z)}}},{name:"generateLabelsTextColor",attributes:{get(){return b??""},set:z=>{$(z)}}},{name:"units",attributes:{get(){return g??""},set:z=>{U(z)}}},{name:"generateLabelsUnits",attributes:{get(){return g??""},set:z=>{U(z)}}},{name:"generateLabelsFormat",attributes:{get(){return _},set:z=>{_=z,r&&r()}}}],css:`
|
|
310
|
+
`;function cc(x){return!(x===null||typeof x!="object"||x.nodeType||x===x.window||x.constructor&&!Lo(x.constructor.prototype,"isPrototypeOf"))}function uc(x){return cc(x)?ya({},x):Array.isArray(x)?x.map(uc):x}function ya(x,...d){return d.forEach(f=>{f&&Object.keys(f).forEach(v=>{f[v]&&cc(f[v])?(Lo(x,v)||(x[v]={}),ya(x[v],f[v])):Array.isArray(f[v])?x[v]=uc(f[v]):x[v]=f[v]})}),x}function Lo(x,d){return x&&Object.prototype.hasOwnProperty.call(x,d)}class Vu{constructor(d,f){this.defaults=f,this.jsoneditor=d.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=d.schema,this.schema=this.jsoneditor.expandSchema(this.original_schema),this.active=!0,this.options=ya({},this.options||{},this.schema.options||{},d.schema.options||{},d),this.formname=this.jsoneditor.options.form_name_root||"root",!d.path&&!this.schema.id&&(this.schema.id=this.formname),this.path=d.path||this.formname,this.formname=d.formname||this.path.replace(/\.([^.]+)/g,"[$1]"),this.parent=d.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,d.container&&this.setContainer(d.container),this.registerDependencies()}onChildEditorChange(d){this.onChange(!0)}notify(){this.path&&this.jsoneditor.notifyWatchers(this.path)}change(){this.parent?this.parent.onChildEditorChange(this):this.jsoneditor&&this.jsoneditor.onChange()}onChange(d){this.notify(),this.watch_listener&&this.watch_listener(),d&&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 d=this.options.dependencies;d&&Object.keys(d).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 d=this.container||this.control;if(!d||this.jsoneditor===null)return;const f=this.options.dependencies;if(!f)return;const v=this.dependenciesFulfilled;this.dependenciesFulfilled=!0,Object.keys(f).forEach(P=>{let m;P.startsWith(this.jsoneditor.root.path)?m=P:(m=this.path.split("."),m[m.length-1]=P,m=m.join("."));const r=f[P];this.checkDependency(m,r)}),this.dependenciesFulfilled!==v&&this.notify();let k=this.dependenciesFulfilled?"block":"none";this.options.hidden&&(k="none"),d.tagName==="TD"?Object.keys(d.childNodes).forEach(P=>d.childNodes[P].style.display=k):d.style.display=k}checkDependency(d,f){if(this.path===d||this.jsoneditor===null)return;const v=this.jsoneditor.getEditor(d),k=v?v.getValue():void 0;!v||!v.dependenciesFulfilled?this.dependenciesFulfilled=!1:Array.isArray(f)?this.dependenciesFulfilled=f.some(P=>{if(JSON.stringify(k)===JSON.stringify(P))return!0}):typeof f=="object"?typeof k!="object"?this.dependenciesFulfilled=f===k:Object.keys(f).some(P=>{if(!Lo(f,P))return!1;if(!Lo(k,P)||f[P]!==k[P])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(d){this.container=d,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(d){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,P=v&&this.parent.options.show_opt_in===!1;(k||!P&&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()},Lo(this.schema,"watch")){let d,f,v,k,P;const m=this.container.getAttribute("data-schemapath");Object.keys(this.schema.watch).forEach(j=>{if(d=this.schema.watch[j],Array.isArray(d)){if(d.length<2)return;f=[d[0]].concat(d[1].split("."))}else f=d.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}`);P=`${k.getAttribute("data-schemapath")}.${f.join(".")}`,m.startsWith(P)&&(this.watchLoop=!0),this.jsoneditor.watch(P,this.watch_listener),this.watched[j]=P})}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 d=0;d<this.schema.links.length;d++)this.addLink(this.getLink(this.schema.links[d]))}onMove(){}getButton(d,f,v,k=[]){const P=`json-editor-btn-${f}`;this.iconlib?f=this.iconlib.getIcon(f):f=null,d=this.translate(d,k),v=this.translate(v,k),!f&&v&&(d=v,v=null);const m=this.theme.getButton(d,f,v);return m.classList.add(P),m}setButtonText(d,f,v,k,P=[]){return this.iconlib?v=this.iconlib.getIcon(v):v=null,f=this.translate(f,P),k=this.translate(k,P),!v&&k&&(f=k,k=null),this.theme.setButtonText(d,f,v,k)}addLink(d){this.link_holder&&this.link_holder.appendChild(d)}getLink(d){let f,v;const P=(d.mediaType||"application/javascript").split("/")[0],m=this.jsoneditor.compileTemplate(d.href,this.template_engine),j=this.jsoneditor.compileTemplate(d.rel?d.rel:d.href,this.template_engine);let r=null;if(d.download&&(r=d.download),r&&r!==!0&&(r=this.jsoneditor.compileTemplate(r,this.template_engine)),P==="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),_=j(b);v.setAttribute("href",g),v.setAttribute("title",_||g),y.setAttribute("src",g)})}else if(["audio","video"].includes(P)){f=this.theme.getBlockLinkHolder(),v=this.theme.getBlockLink(),v.setAttribute("target","_blank");const y=document.createElement(P);y.setAttribute("controls","controls"),this.theme.createMediaLink(f,v,y),this.link_watchers.push(b=>{const g=m(b),_=j(b);v.setAttribute("href",g),v.textContent=_||g,y.setAttribute("src",g)})}else v=f=this.theme.getBlockLink(),f.setAttribute("target","_blank"),f.textContent=d.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))})),d.class&&v.classList.add(d.class),f}refreshWatchedFieldValues(){if(!this.watched_values)return;const d={};let f=!1;return this.watched&&Object.keys(this.watched).forEach(v=>{const k=this.jsoneditor.getEditor(this.watched[v]),P=k?k.getValue():null;this.watched_values[v]!==P&&(f=!0),d[v]=P}),d.self=this.getValue(),this.watched_values.self!==d.self&&(f=!0),this.watched_values=d,f}getWatchedFieldValues(){return this.watched_values}updateHeaderText(){if(this.header){const d=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(d);break}}else window.DOMPurify?this.header.innerHTML=window.DOMPurify.sanitize(d):this.header.textContent=this.cleanText(d)}}getHeaderText(d){return this.header_text?this.header_text:d?this.translateProperty(this.schema.title):this.getTitle()}getPathDepth(){return this.path.split(".").length}cleanText(d){const f=document.createElement("div");return f.innerHTML=d,f.textContent||f.innerText}onWatchedFieldChange(){let d;if(this.header_template){d=ya(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(d);f!==this.header_text&&(this.header_text=f,this.updateHeaderText(),this.notify())}if(this.link_watchers.length){d=this.getWatchedFieldValues();for(let f=0;f<this.link_watchers.length;f++)this.link_watchers[f](d)}}setValue(d){this.value=d}getValue(){if(this.dependenciesFulfilled)return this.value}refreshValue(){}getChildEditors(){return!1}destroy(){this.unregister(this),this.watched&&Object.values(this.watched).forEach(d=>this.jsoneditor.unwatch(d,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 d=this.schema.type||this.schema.oneOf;if(d&&Array.isArray(d)&&(d=d[0]),d&&typeof d=="object"&&(d=d.type),d&&Array.isArray(d)&&(d=d[0]),typeof d=="string"){if(d==="number")return this.isDefaultRequired()?0:void 0;if(d==="boolean")return this.isDefaultRequired()?!1:void 0;if(d==="integer")return this.isDefaultRequired()?0:void 0;if(d==="string")return this.isDefaultRequired()?"":void 0;if(d==="null")return null;if(d==="object")return{};if(d==="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(d){const f=[],v={};d.forEach(P=>{P.title&&(v[P.title]=v[P.title]||0,v[P.title]++),P.description&&(v[P.description]=v[P.description]||0,v[P.description]++),P.format&&(v[P.format]=v[P.format]||0,v[P.format]++),P.type&&(v[P.type]=v[P.type]||0,v[P.type]++)}),d.forEach(P=>{let m;typeof P=="string"?m=P:P.title&&v[P.title]<=1?m=P.title:P.format&&v[P.format]<=1?m=P.format:P.type&&v[P.type]<=1?m=P.type:P.description&&v[P.description]<=1?m=P.description:P.title?m=P.title:P.format?m=P.format:P.type?m=P.type:P.description?m=P.description:JSON.stringify(P).length<500?m=JSON.stringify(P):m="type",f.push(m)});const k={};return f.forEach((P,m)=>{k[P]=k[P]||0,k[P]++,v[P]>1&&(f[m]=`${P} ${k[P]}`)}),f}getValidId(d){return d=d===void 0?"":d.toString(),d.replace(/\s+/g,"-")}setInputAttributes(d){if(this.schema.options&&this.schema.options.inputAttributes){const f=this.schema.options.inputAttributes,v=["name","type"].concat(d);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 d=this.schema.options.containerAttributes,f=["data-schemapath","data-schematype","data-schemaid"];Object.keys(d).forEach(v=>{f.includes(v.toLowerCase())||this.container.setAttribute(v,d[v])})}}expandCallbacks(d,f){const v=this.defaults.callbacks[d];return Object.entries(f).forEach(([k,P])=>{P===Object(P)?f[k]=this.expandCallbacks(d,P):typeof P=="string"&&typeof v=="object"&&typeof v[P]=="function"&&(f[k]=v[P].bind(null,this))}),f}showValidationErrors(d){}}(()=>{var x=P=>P==null?!1:typeof P=="boolean"?P:P.trim().toLowerCase()==="true";window.tcRangeSliderPlugins=window.tcRangeSliderPlugins||[];var d="min-label",f="max-label",v="#1E293B",k=()=>{let P=null,m=null,j=null,r,y=!1,b=v,g="",_,O=null,C=null,E=null,T=[],L=()=>{var z;let M=(z=P==null?void 0:P.shadowRoot)==null?void 0:z.querySelector(".range-slider-box");O=document.createElement("div"),O.classList.add("labels-row"),M.prepend(O)},R=z=>{let M=document.createElement("label");return M.className=z,M.setAttribute("for","range-slider"),M},I=()=>{C=R(d),C.textContent=B(j==null?void 0:j.getTextMin(),g),E=R(f),E.textContent=B(j==null?void 0:j.getTextMax(),g),m==null||m.before(C),m==null||m.after(E);let z=j==null?void 0:j.getValues();if(z)for(let M=0;M<z.length;M++){let X=R(`value${M+1}-label generated-label`);X.textContent=B(z[M],g),T.push(X),O==null||O.append(X)}},N=()=>{for(let z of T)!z||z.remove();C==null||C.remove(),E==null||E.remove(),O==null||O.remove(),T=[]},F=z=>{y=z,y?(L(),I()):N()},$=z=>{b=z;for(let M of T)!M||(M.style.color=b??v);C&&(C.style.color=b??v),E&&(E.style.color=b??v)},U=z=>{g=z,r&&r()},q=()=>{!j||!O||O.classList.toggle("is-reversed",j.isRightToLeft()||j.isBottomToTop())},B=(z,M)=>{let X=`${(z??"").toString()}${M}`;return _&&typeof _=="function"?_(z):X};return{get name(){return"Generated Labels"},init:(z,M,X,Y)=>{var Q,tt,it;P=z,j=Y,m=(Q=z.shadowRoot)==null?void 0:Q.getElementById("range-slider"),r=M,b=(tt=P.getAttribute("generate-labels-text-color"))!=null?tt:v,g=(it=P.getAttribute("generate-labels-units"))!=null?it:"",F(x(P.getAttribute("generate-labels"))),q(),$(b)},update:z=>{if(!(!y||!z.values)){q();for(let M=0;M<z.values.length;M++){let X=z.values[M],Y=T[M];if(X===void 0&&Y){Y.remove(),T[M]=void 0;continue}if(X!==void 0&&!Y){let Q=R(`value${M+1}-label generated-label`);if(Q.textContent=B(X,g),T[M]=Q,z.values.length<=0)O==null||O.append(Q);else if(M===0)O==null||O.append(Q);else{let tt=T[M-1];tt==null||tt.after(Q)}continue}!Y||(Y.textContent=B(X,g))}C&&(C.textContent=B(z.textMin,g)),E&&(E.textContent=B(z.textMax,g)),$(b)}},onAttrChange:(z,M)=>{z==="generate-labels"&&F(x(M)),z==="generate-labels-text-color"&&$(M),z==="generate-labels-units"&&U(M)},gettersAndSetters:[{name:"generateLabels",attributes:{get(){return y??!1},set:z=>{F(x(z))}}},{name:"textColor",attributes:{get(){return b??""},set:z=>{$(z)}}},{name:"generateLabelsTextColor",attributes:{get(){return b??""},set:z=>{$(z)}}},{name:"units",attributes:{get(){return g??""},set:z=>{U(z)}}},{name:"generateLabelsUnits",attributes:{get(){return g??""},set:z=>{U(z)}}},{name:"generateLabelsFormat",attributes:{get(){return _},set:z=>{_=z,r&&r()}}}],css:`
|
|
311
311
|
.labels-row{
|
|
312
312
|
text-align: center;
|
|
313
313
|
display: flex;
|
|
@@ -349,24 +349,24 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
349
349
|
margin: 0 0.5rem;
|
|
350
350
|
white-space: nowrap;
|
|
351
351
|
}
|
|
352
|
-
`,destroy:N}};window.tcRangeSliderPlugins.push(k)})(),(()=>{var x=Object.defineProperty,d=Math.pow,f=(A,V,rt)=>V in A?x(A,V,{enumerable:!0,configurable:!0,writable:!0,value:rt}):A[V]=rt,v=(A,V,rt)=>(f(A,typeof V!="symbol"?V+"":V,rt),rt),k=(A,V)=>` ${V&&V.length>0?V.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>`,P=":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",_="max",O="step",C="round",E="type",T="theme",L="rtl",R="btt",I="disabled",N="keyboard-disabled",H="mousewheel-disabled",$="slider-width",U="slider-height",q="slider-radius",B="slider-bg",z="slider-bg-hover",M="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",Ft="pointer-border-hover",lt="pointer-border-focus",wt="animate-onclick",_t="css-links",zt="vertical",Xt="horizontal",ce=(A,V,rt,K,yt)=>{let It=V-A;return It===0?rt:(K-rt)*(yt-A)/It+rt},St=A=>!isNaN(parseFloat(A))&&isFinite(A),jt=(A,V)=>St(A)?Number(A):V,Rt=(A,V)=>V===0?0:Math.round(A/V)*V,qt=(A,V=1/0)=>{if(V===1/0)return A;let rt=d(10,V);return Math.round(A*rt)/rt},xt=A=>A==null?!1:typeof A=="boolean"?A:A.trim().toLowerCase()==="true",tr=(A,V)=>{A.dispatchEvent(new CustomEvent("onPointerClicked",{detail:{$pointer:V}}))},le=(A,V)=>{A.dispatchEvent(new CustomEvent("onMouseDown",{detail:{nativeEvent:V}}))},Ae=(A,V)=>{A.dispatchEvent(new CustomEvent("onMouseUp",{detail:{nativeEvent:V}}))},ye=(A,V)=>{A.dispatchEvent(new CustomEvent("onKeyDown",{detail:{nativeEvent:V}}))},er=(A,V)=>{if(!V||V.length<=0)return;let rt=V.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}))},Ee=(A,V,rt)=>{let K=0,yt,It,Zt,ft,bt=!1,Gt=(Vt,ue,Me,_e,Re,ve)=>{let sr=K;Me!==void 0&&Vt>Me&&(Vt=Me),ue!==void 0&&Vt<ue&&(Vt=ue),K=Vt;let Ie=K;return(_e===zt&&ve||_e===Xt&&Re)&&(Ie=100-Ie),_e===zt?V.style.top=`${Ie}%`:V.style.left=`${Ie}%`,sr!==K},ne=Vt=>Vt===V||V.contains(Vt),Pt=(Vt,ue,Me,_e)=>{yt=Vt,It=ue,Zt=Me,ft=_e},ae=Vt=>{bt=Vt,V.classList.toggle("disabled",bt),bt?V.setAttribute("aria-disabled","true"):V.hasAttribute("aria-disabled")&&V.removeAttribute("aria-disabled")},Te=(Vt,ue)=>{ue==null?V.removeAttribute(Vt):V.setAttribute(Vt,ue)},Qe=Vt=>V.getAttribute(Vt),At=Vt=>{if(!bt){switch(Vt.key){case"ArrowLeft":{Vt.preventDefault(),typeof yt=="function"&&yt(rt);break}case"ArrowRight":{Vt.preventDefault(),typeof It=="function"&&It(rt);break}case"ArrowUp":{Vt.preventDefault(),typeof Zt=="function"&&Zt(rt);break}case"ArrowDown":{Vt.preventDefault(),typeof ft=="function"&&ft(rt);break}}ye(A,Vt)}},te=()=>{bt||tr(A,V)};return V.className=`pointer pointer-${rt}`,V.addEventListener("keydown",At),V.addEventListener("click",te),{$pointer:V,get percent(){return K},get disabled(){return bt},set disabled(Vt){ae(Vt)},updatePosition:Gt,isClicked:ne,setCallbacks:Pt,setAttr:Te,getAttr:Qe,destroy:()=>{V.removeEventListener("keydown",At),V.removeEventListener("click",te),V.remove()}}},ir=A=>{if(A==null)return;if(Array.isArray(A))return A;if(A.trim()==="")return;let V=A.split(","),rt=[],K=!0;for(let yt=0;yt<V.length;yt++){let It=V[yt].trim();It!==""&&(rt.push(It),St(It)||(K=!1))}return K?rt.map(yt=>Number(yt)):rt},Ce=(A,V)=>V?V.findIndex(rt=>rt===A||rt.toString().trim()===A.toString().trim()):-1,qe=A=>({updatePosition:(V,rt,K,yt)=>{if(rt.length<=0)return;let It=rt.length===1,Zt=rt[0],ft=rt[rt.length-1];V===zt?(A.style.removeProperty("width"),A.style.removeProperty("right"),A.style.removeProperty("left"),It?A.style.height=`${Zt}%`:A.style.height=`${Math.abs(Zt-ft)}%`,yt?(A.style.bottom="0%",It?A.style.top="auto":A.style.top=`${Math.min(100-ft,100-Zt)}%`):(A.style.bottom="auto",It?A.style.top="0%":A.style.top=`${Math.min(Zt,ft)}%`)):(A.style.removeProperty("height"),A.style.removeProperty("top"),A.style.removeProperty("bottom"),It?A.style.width=`${Zt}%`:A.style.width=`${Math.abs(Zt-ft)}%`,K?(A.style.right="0%",It?A.style.left="auto":A.style.left=`${Math.min(100-ft,100-Zt)}%`):(A.style.right="auto",It?A.style.left="0%":A.style.left=`${Math.min(Zt,ft)}%`))}}),xe="--animate-onclick",or="--width",ot="--height",vt="--panel-bg-border-radius",$t="--panel-bg",Nt="--panel-bg-hover",Qt="--panel-bg-fill",Ue="--pointer-width",Ze="--pointer-height",yr="--pointer-border-radius",Je="--pointer-bg",ar="--pointer-bg-hover",ke="--pointer-bg-focus",On="--pointer-shadow",Dt="--pointer-shadow-hover",Kt="--pointer-shadow-focus",Yt="--pointer-border",oe="--pointer-border-hover",$e="--pointer-border-focus",ji=(A,V,rt)=>{let K=new Map;for(let yt of A.attributes){let It=yt.nodeName.trim().toLowerCase();if(!V.test(It))continue;let Zt=It.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},En=A=>{if(!A)return null;let V=A.getAttribute(_t);if(!V)return null;let rt=V.split(";"),K=[];for(let yt of rt)yt.trim()!==""&&K.push(yt.trim());return K},Aa=[[or,$,"sliderWidth",null],[ot,U,"sliderHeight",null],[vt,q,"sliderRadius",null],[$t,B,"sliderBg",null],[Nt,z,"sliderBgHover",null],[Qt,M,"sliderBgFill",null],[Ue,X,"pointer#Width",/^pointer([0-9]*)-width$/],[Ze,Y,"pointer#Height",/^pointer([0-9]*)-height$/],[yr,Q,"pointer#Radius",/^pointer([0-9]*)-radius$/],[Je,tt,"pointer#Bg",/^pointer([0-9]*)-bg$/],[ar,it,"pointer#BgHover",/^pointer([0-9]*)-bg-hover$/],[ke,st,"pointer#BgFocus",/^pointer([0-9]*)-bg-focus$/],[On,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,Ft,"pointer#BorderHover",/^pointer([0-9]*)-border-hover$/],[$e,lt,"pointer#BorderFocus",/^pointer([0-9]*)-border-focus$/]],Xn=(A,V,rt)=>{let K=null,yt=[],It=new Map,Zt=(At,te=V)=>{let Vt=[...te.classList];for(let ue of Vt)ue.startsWith(At)&&V.classList.remove(ue)},ft=()=>{Zt("shape");let At=V.querySelectorAll(".pointer");for(let te of At)Zt("shape",te)},bt=At=>{K=At,Zt("theme-"),typeof At=="string"&&V.classList.add(`theme-${At}`)},Gt=()=>{if(ft(),!(yt.length<=0)){V.classList.add("shape",`shape-${yt[0]}`);for(let At=1;At<yt.length;At++){let te=yt[At];if(!te)continue;let Vt=V.querySelector(`.pointer-${At}`);!Vt||Vt.classList.add("shape",`shape-${te}`)}}},ne=(At,te)=>{yt[At]=te,Gt()},Pt=()=>{ft();let At=ji(A,/^pointer([0-9]*)-shape$/);if(!(At.size<=0)){for(let te of At){let Vt=te[0];yt[Vt]=te[1]}Gt()}},ae=(At,te)=>`${At}-${te}`,Te=(At,te,Vt)=>{let ue=rt[Vt];if(!ue)return;let Me=Vt===0?V:ue.$pointer;if(te==null){It.has(ae(At,Vt))&&It.delete(ae(At,Vt)),Me.style.removeProperty(At);return}It.set(ae(At,Vt),te),Me.style.setProperty(At,te)},Qe=(At,te)=>It.get(ae(At,te));return(()=>{for(let At of Aa){let[te,Vt,ue,Me]=At;if(Me){let Re=ji(A,Me);for(let ve of Re){let sr=ve[0],Ie=ve[1];Te(te,Ie,sr)}}else{let Re=A.getAttribute(Vt);Te(te,Re,0)}let _e=[];if(ue.indexOf("#")===-1)_e.push([ue,0]);else{_e.push([ue.replace("#",""),0]),_e.push([ue.replace("#","0"),0]),_e.push([ue.replace("#","1"),0]);for(let Re=1;Re<rt.length;Re++)_e.push([ue.replace("#",(Re+1).toString()),Re])}for(let Re of _e)try{let ve=Re[0],sr=Re[1];Object.prototype.hasOwnProperty.call(A,ve)||Object.defineProperty(A,ve,{get(){return Qe(te,sr)},set:Ie=>{Te(te,Ie,sr)}})}catch(ve){console.error(ve)}}bt(A.getAttribute(T)),Pt()})(),{setStyle:Te,getStyle:Qe,get theme(){return K},set theme(At){bt(At)},get pointerShapes(){return yt},setPointerShape:ne}},Jr="animate-on-click",$r="range-dragging",Ra=(A,V,rt,K)=>{let yt=[],It=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,V,rt,K),bt(Pt),Gt(Pt))}},update:It,onAttrChange:ft,destroy:Zt}},Cn=10,Ia=20,dn=(A,V)=>{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())),It=[];It.push([Ee(A,V,0),rt.get(0)]);let Zt=V;for(let ft=1;ft<=yt;ft++){let bt=V.cloneNode(!0);Zt.after(bt),Zt=bt,It.push([Ee(A,bt,ft),rt.get(ft)])}return It},Oi=(A,V,rt,K,yt,It,Zt)=>{try{Object.defineProperty(A,K,{configurable:!0,get(){if(!V)return;let ft=V.pointers[rt];if(!ft)return;let bt=V.getTextValue(ft.percent);return St(bt)?jt(bt,bt):bt},set:ft=>{V.pointers[rt]?V==null||V.setValue(ft,rt):V==null||V.addPointer(ft)}}),Object.defineProperty(A,yt,{configurable:!0,get(){var ft,bt;return(bt=(ft=V==null?void 0:V.pointers[rt])==null?void 0:ft.getAttr("aria-label"))!=null?bt:void 0},set:ft=>{!V||V.setAriaLabel(rt,ft)}}),Object.defineProperty(A,It,{configurable:!0,get(){var ft,bt;return(bt=(ft=V==null?void 0:V.styles)==null?void 0:ft.pointerShapes[rt])!=null?bt:null},set:ft=>{!V||!V.styles||V.styles.setPointerShape(rt,ft)}}),Object.defineProperty(A,Zt,{configurable:!0,get(){var ft;return(ft=V==null?void 0:V.pointers[rt].disabled)!=null?ft:!1},set:ft=>{if(!V)return;let bt=V==null?void 0:V.pointers[rt];!bt||(bt.disabled=ft)}})}catch(ft){console.error(ft)}},Tr=(A,V)=>{let rt=[["value","ariaLabel","pointerShape","pointerDisabled",0],["value0","ariaLabel0","pointerShape0","pointer0Disabled",0],["value1","ariaLabel1","pointerShape1","pointer1Disabled",0]];for(let K=2;K<Cn;K++)rt.push([`value${K}`,`ariaLabel${K}`,`pointer${K}Shape`,`pointer${K}Disabled`,K-1]);for(let K of rt)Oi(A,V,K[4],K[0],K[1],K[2],K[3])},Da=(A,V,rt)=>{var K;let yt=(K=rt.shadowRoot)==null?void 0:K.querySelector(".container");if(yt)for(let It of A)V?yt.prepend(It.$pointer):yt.append(It.$pointer)},Sn=(A,V)=>{if(!(!V||A.length<=1)){for(let rt of A)rt.$pointer.style.zIndex=Ia.toString();V.$pointer.style.zIndex=(Ia*2).toString()}},Ao=0,br=100,Yr=2,gr="0.3s",Qn=(A,V,rt)=>{let K=rt.map(F=>F[0]),yt=null,It=null,Zt=null,ft=null,bt=Ao,Gt=br,ne,Pt,ae=Xt,Te=Yr,Qe=!1,At=!1,te=!1,Vt=0,ue=1/0,Me=!1,_e,Re,ve=!1,sr=!1,Ie=!1,Ar=gr,wr=[],Ba=F=>{ve||(F.preventDefault&&F.preventDefault(),Rr(F),window.addEventListener("mousemove",Rr),window.addEventListener("mouseup",Mr),le(A,F))},Mr=F=>{ve||(_e=void 0,Re=void 0,window.removeEventListener("mousemove",Rr),window.removeEventListener("mouseup",Mr),Ar&&V.classList.add(Jr),Ae(A,F))},Ss=(F,at)=>{if(K.length<=0)return;if(K.length===1)return K[0].isClicked(F)&&Ar&&V.classList.remove(Jr),K[0];let Ot=$a(F);if(Me){let ie=at,De=Li(ie);De!==void 0&&(ie=Rt(ie,De)),Ot?(_e=ie,Re=0,Ar&&V.classList.remove(Jr)):_e!==void 0&&(Re=ie-_e,_e=ie)}if(!Tn(F)&&!Ot){for(let ie of K)if(!(!ie.isClicked(F)||ie.disabled))return Ar&&V.classList.remove(Jr),ie;for(let ie of K)if(yt===ie)return ie}let pe=1/0,me=null;for(let ie of K){if(ie.disabled)continue;let De=Math.abs(at-ie.percent);De<pe&&(pe=De,me=ie)}return me},Ei=()=>K.findIndex(F=>yt===F&&!F.disabled),Rr=F=>{let at;if(ae===zt){let{height:pe,top:me}=V.getBoundingClientRect(),ie=F.type.indexOf("mouse")!==-1?F.clientY:F.touches[0].clientY;at=Math.min(Math.max(0,ie-me),pe)*100/pe}else{let{width:pe,left:me}=V.getBoundingClientRect(),ie=F.type.indexOf("mouse")!==-1?F.clientX:F.touches[0].clientX;at=Math.min(Math.max(0,ie-me),pe)*100/pe}if((Qe||At)&&(at=100-at),yt=Ss(F.target,at),yt&&Sn(K,yt),Me&&K.length>1&&Re!==void 0){let pe=K[0],me=K[K.length-1],ie=pe.percent+Re<0,De=me.percent+Re>100;if(ie||De)return;for(let Vi=0;Vi<K.length;Vi++)He(Vi,K[Vi].percent+Re);return}let Ot=Ei();Ot!==-1&&(He(Ot,at),yt==null||yt.$pointer.focus())},Ci=F=>{if(ve||document.activeElement!==A||yt!=null&&yt.disabled)return;F.stopPropagation(),F.preventDefault();let at=F.deltaY<0,Ot=Qe||At,pe=at?!Ot:Ot,me=Ei();me!==-1&&(pe?Ir(me,K[me].percent):Kn(me,K[me].percent))},pn=F=>{ve||sr||(ae===zt?At?He(F,100):He(F,0):Qe?Kn(F,K[F].percent):Ir(F,K[F].percent))},Na=F=>{ve||sr||(ae===zt?At?He(F,0):He(F,100):Qe?Ir(F,K[F].percent):Kn(F,K[F].percent))},Si=F=>{ve||sr||(ae===zt?At?Kn(F,K[F].percent):Ir(F,K[F].percent):Qe?He(F,100):He(F,0))},Pi=F=>{ve||sr||(ae===zt?At?Ir(F,K[F].percent):Kn(F,K[F].percent):Qe?He(F,0):He(F,100))},Tn=F=>F.classList.contains("panel"),$a=F=>F.classList.contains("panel-fill"),Ir=(F,at)=>{if(at===void 0)return;let Ot=Li(at);Ot==null&&(Ot=1),at-=Ot,at<0&&(at=0),He(F,at)},Kn=(F,at)=>{if(at===void 0)return;let Ot=Li(at);Ot==null&&(Ot=1),at+=Ot,at>100&&(at=100),He(F,at)},Hr=()=>{!ft||ft.update({percents:Vr(),values:Ai(),$pointers:_r(),min:Ha(),max:Fa(),data:Io(),step:Ro(),round:Bo(),type:Do(),textMin:An(),textMax:Fr(),rightToLeft:lr(),bottomToTop:be(),pointersOverlap:Ii(),pointersMinDistance:Ri(),pointersMaxDistance:No(),rangeDragging:Di(),disabled:ei(),keyboardDisabled:ri(),mousewheelDisabled:$o()})},Ti=()=>{Hr()},Ma=F=>{if(!(te||K.length<=1||Gt===bt))if(F===0){let at=ue*100/(Gt-bt);return Math.max(0,K[F+1].percent-at)}else{let at=Vt*100/(Gt-bt);return Math.min(K[F-1].percent+at,100)}},Ln=F=>{if(!(te||K.length<=1||Gt===bt))if(F===K.length-1){let at=ue*100/(Gt-bt);return Math.min(K[F-1].percent+at,100)}else{let at=Vt*100/(Gt-bt);return Math.max(0,K[F+1].percent-at)}},Li=F=>{let at;if(typeof ne=="function"){let Ot=ce(0,100,bt,Gt,F);at=ne(Ot,F)}else at=ne;if(St(at)){let Ot=Gt-bt;return at=Ot===0?0:at*100/Ot,at}},Xr=F=>{if(F===void 0)return;let at=ce(0,100,bt,Gt,F);return Pt!==void 0?Pt[Math.round(at)]:qt(at,Te)},An=()=>Pt!==void 0?Pt[bt]:bt,Fr=()=>Pt!==void 0?Pt[Gt]:Gt,Ro=()=>ne,Rn=F=>{var at;return F<=0||te?An():(at=Xr(K[F-1].percent))!=null?at:""},Ps=F=>{var at;return K.length<=1||F>=K.length-1||te?Fr():(at=Xr(K[F+1].percent))!=null?at:""},Vr=()=>K.map(F=>F.percent),Ai=()=>K.map(F=>Xr(F.percent)),_r=()=>K.map(F=>F.$pointer),Ha=()=>bt,Fa=()=>Gt,Io=()=>Pt,Do=()=>ae,Bo=()=>Te,Ri=()=>Vt,No=()=>ue,ti=F=>wr[F],lr=()=>Qe,be=()=>At,ei=()=>ve,ri=()=>sr,$o=()=>Ie,Ii=()=>te,Di=()=>Me,He=(F,at)=>{if(at===void 0)return;let Ot=Li(at);Ot!==void 0&&(at=Rt(at,Ot));let pe=K[F];if(!pe)return;let me=pe.updatePosition(at,Ma(F),Ln(F),ae,Qe,At);It==null||It.updatePosition(ae,K.map(ie=>ie.percent),Qe,At),Hr();for(let ie of K){let De=Xr(ie.percent);De!==void 0&&(ie.setAttr("aria-valuenow",De.toString()),ie.setAttr("aria-valuetext",De.toString()))}Mo(),me&&er(A,K.map(ie=>Xr(ie.percent)))},Dr=()=>{for(let F=0;F<K.length;F++)He(F,K[F].percent)},Qr=(F,at)=>{bt=Pt!==void 0?0:jt(F,Ao),Gt=Pt!==void 0?Pt.length-1:jt(at,br),cr(bt),Bi(Gt)},Mo=()=>{var F,at;for(let Ot=0;Ot<K.length;Ot++){let pe=K[Ot];pe.setAttr("aria-valuemin",((F=Rn(Ot))!=null?F:"").toString()),pe.setAttr("aria-valuemax",((at=Ps(Ot))!=null?at:"").toString())}},cr=F=>{bt=jt(F,Ao),bt>Gt&&(Gt=bt+br),Dr()},Bi=F=>{Gt=jt(F,br),Gt<bt&&(Gt=bt+br),Dr()},fn=F=>{te=!0;for(let at=0;at<F.length;at++)Ni(F[at],at);te=!1;for(let at=0;at<F.length;at++)Ni(F[at],at)},Ni=(F,at)=>{let Ot;Pt!==void 0?(Ot=F==null?0:Ce(F,Pt),Ot===-1&&(Ot=0)):(Ot=jt(F,bt),Ot<bt&&(Ot=bt),Ot>Gt&&(Ot=Gt));let pe=ce(bt,Gt,0,100,Ot);He(at,pe)},In=F=>{if(F==null){ne=void 0;return}if(typeof F=="function"){ne=F,Dr();return}if(St(F)){ne=jt(F,1);let at=Math.abs(Gt-bt);ne>at&&(ne=void 0),Dr();return}ne=void 0},Dn=F=>{te=F,Dr()},Ho=F=>{(!St(F)||F<0)&&(F=0),Vt=F},$i=F=>{(!St(F)||F<0)&&(F=1/0),ue=F},Kr=F=>{ve=F,V.classList.toggle("disabled",ve),ve?V.setAttribute("aria-disabled","true"):V.hasAttribute("aria-disabled")&&V.removeAttribute("aria-disabled")},ni=F=>{sr=F},yn=F=>{Ie=F,Ie?document.removeEventListener("wheel",Ci):document.addEventListener("wheel",Ci,{passive:!1})},Mi=F=>{if(F==null){Pt=void 0;return}if(Pt=ir(F),Pt===void 0||Pt.length<=0){Pt=void 0;return}cr(0),Bi(Pt.length-1),ne===void 0&&In(1)},Cr=F=>{var at;typeof F=="string"?ae=F.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 me of K)me.setAttr("aria-orientation",pe)},Fo=F=>{Qe=F,K.length>1&&Da(K,Qe,A),Dr(),Hr()},Hi=F=>{At=F,K.length>1&&Da(K,At,A),Dr(),Hr()},xr=F=>{Te=jt(F,Yr),Te<0&&(Te=Yr),Hr()},Fi=F=>{F==null||F.toString().trim().toLowerCase()==="false"?(Ar=void 0,V.style.removeProperty(xe),V.classList.remove(Jr)):(Ar=F.toString(),V.style.setProperty(xe,Ar),V.classList.add(Jr))},ur=(F,at)=>{let Ot=K[F];!Ot||(Ot.setAttr("aria-label",at),wr[F]=at)},ii=F=>{if(_e=void 0,K.length<=1){Me=!1,V.classList.remove($r);return}Me=F,V.classList.toggle($r,Me)},Bn=()=>{Kr(xt(A.getAttribute(I))),sr=xt(A.getAttribute(N)),Ie=xt(A.getAttribute(H));let F=ji(A,/^pointer([0-9]*)-disabled$/,at=>xt(at));for(let at of F){let Ot=at[0];!K[Ot]||(K[Ot].disabled=at[1])}},Ts=()=>{let F=ji(A,/^aria-label([0-9]*)$/);for(let at of F){let Ot=at[0];ur(Ot,at[1])}},Nn=F=>{let at=K.length,Ot=K[at-1].$pointer,pe=Ot.cloneNode(!0);Ot.after(pe);let me=Ee(A,pe,at);return me.setCallbacks(pn,Na,Si,Pi),K.push(me),Ni(F,at),Dr(),Hr(),at},Vo=()=>{let F=K.length,at=K[F-1];return at?(at.destroy(),K.pop(),K.length<=1&&ii(!1),Dr(),Hr(),F-1):-1};return(()=>{var F,at;for(let pe of K)pe.setCallbacks(pn,Na,Si,Pi);let Ot=(F=A.shadowRoot)==null?void 0:F.querySelector(".panel-fill");Ot&&(It=qe(Ot)),Cr(A.getAttribute(E)),Fo(xt(A.getAttribute(L))),Hi(xt(A.getAttribute(R))),Qr(A.getAttribute(g),A.getAttribute(_)),In(A.getAttribute(O)),Mi(A.getAttribute(b)),fn(rt.map(pe=>pe[1])),Dn(xt(A.getAttribute(m))),Ho(jt(A.getAttribute(j),0)),$i(jt(A.getAttribute(r),1/0)),ii(xt(A.getAttribute(y))),xr(jt(A.getAttribute(C),Yr)),Bn(),Ts(),Zt=Xn(A,V,K),Fi((at=A.getAttribute(wt))!=null?at:gr),V.addEventListener("mousedown",Ba),V.addEventListener("mouseup",Mr),V.addEventListener("touchmove",Rr),V.addEventListener("touchstart",Rr),Ie||document.addEventListener("wheel",Ci,{passive:!1}),ft=Ra(A,Ti,{setValues:fn,setMin:cr,setMax:Bi,setStep:In,setPointersOverlap:Dn,setPointersMinDistance:Ho,setPointersMaxDistance:$i,setDisabled:Kr,setType:Cr,setRightToLeft:Fo,setBottomToTop:Hi,setRound:xr,setKeyboardDisabled:ni,setMousewheelDisabled:yn,setRangeDragging:ii,setData:Mi},{getPercents:Vr,getValues:Ai,getPointerElements:_r,getMin:Ha,getMax:Fa,getStep:Ro,getData:Io,getType:Do,getRound:Bo,getTextMin:An,getTextMax:Fr,isRightToLeft:lr,isBottomToTop:be,isDisabled:ei,isKeyboardDisabled:ri,isMousewheelDisabled:$o,isPointersOverlap:Ii,isRangeDraggingEnabled:Di,getPointersMinDistance:Ri,getPointersMaxDistance:No}),ft.init()})(),{get pointers(){return K},get styles(){return Zt},get pluginsManager(){return ft},get min(){return An()},get max(){return Fr()},get step(){return Ro()},get pointersOverlap(){return Ii()},set pointersOverlap(F){Dn(F)},get pointersMinDistance(){return Ri()},set pointersMinDistance(F){Ho(F)},get pointersMaxDistance(){return No()},set pointersMaxDistance(F){$i(F)},get disabled(){return ei()},set disabled(F){Kr(F)},get data(){return Io()},get type(){return Do()},set type(F){Cr(F)},get rightToLeft(){return lr()},set rightToLeft(F){Fo(F)},get bottomToTop(){return be()},set bottomToTop(F){Hi(F)},get round(){return Bo()},set round(F){xr(F)},get animateOnClick(){return Ar},set animateOnClick(F){Fi(F)},get keyboardDisabled(){return ri()},set keyboardDisabled(F){ni(F)},get mousewheelDisabled(){return $o()},set mousewheelDisabled(F){yn(F)},get rangeDragging(){return Di()},set rangeDragging(F){ii(F)},setMin:cr,setMax:Bi,setValue:Ni,setStep:In,setData:Mi,getTextValue:Xr,setAriaLabel:ur,getAriaLabel:ti,addPointer:Nn,removePointer:Vo,destroy:()=>{V.removeEventListener("mousedown",Ba),V.removeEventListener("mouseup",Mr),V.removeEventListener("touchmove",Rr),V.removeEventListener("touchstart",Rr),document.removeEventListener("wheel",Ci);for(let F of K)F.destroy();ft==null||ft.destroy()}}},Pn=(A,V,rt)=>{let K=Aa.find(([ft,bt,Gt,ne])=>bt.replace("#","")===V.replace(/\d+/g,""));if(K&&A.styles){let[ft,bt,Gt,ne]=K,Pt=V.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(V,rt),V){case g:{A.setMin(rt);break}case _:{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 N:{A.keyboardDisabled=xt(rt);break}case H:{A.mousewheelDisabled=xt(rt);break}case b:{A.setData(rt);break}case E:{A.type=rt;break}case L:{A.rightToLeft=xt(rt);break}case R:{A.bottomToTop=xt(rt);break}case C:{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(V)&&(yt="value"),/^pointer([0-9]*)-disabled$/.test(V)&&(yt="pointer-disabled"),/^aria-label([0-9]*)$/.test(V)&&(yt="aria-label"),/^pointer([0-9]*)-shape$/.test(V)&&(yt="pointer-shape"),!yt)return;let It=V.replace(/\D/g,"").trim(),Zt=It===""||It==="0"||It==="1"?0:jt(It,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}}},Cs=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,V;return(V=(A=this.slider)==null?void 0:A.disabled)!=null?V:!1}set data(A){var V;(V=this.slider)==null||V.setData(A)}get data(){var A;return(A=this.slider)==null?void 0:A.data}set min(A){var V;(V=this.slider)==null||V.setMin(A)}get min(){var A;return(A=this.slider)==null?void 0:A.min}set max(A){var V;(V=this.slider)==null||V.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,V;return(V=(A=this.slider)==null?void 0:A.round)!=null?V: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,V;return(V=(A=this.slider)==null?void 0:A.pointersOverlap)!=null?V:!1}set pointersMinDistance(A){!this.slider||(this.slider.pointersMinDistance=A)}get pointersMinDistance(){var A,V;return(V=(A=this.slider)==null?void 0:A.pointersMinDistance)!=null?V:0}set pointersMaxDistance(A){!this.slider||(this.slider.pointersMaxDistance=A)}get pointersMaxDistance(){var A,V;return(V=(A=this.slider)==null?void 0:A.pointersMaxDistance)!=null?V:1/0}set theme(A){!this.slider||!this.slider.styles||(this.slider.styles.theme=A)}get theme(){var A,V,rt;return(rt=(V=(A=this.slider)==null?void 0:A.styles)==null?void 0:V.theme)!=null?rt:null}set rtl(A){!this.slider||(this.slider.rightToLeft=A)}get rtl(){var A,V;return(V=(A=this.slider)==null?void 0:A.rightToLeft)!=null?V:!1}set btt(A){!this.slider||(this.slider.bottomToTop=A)}get btt(){var A,V;return(V=(A=this.slider)==null?void 0:A.bottomToTop)!=null?V:!1}set keyboardDisabled(A){!this.slider||(this.slider.keyboardDisabled=A)}get keyboardDisabled(){var A,V;return(V=(A=this.slider)==null?void 0:A.keyboardDisabled)!=null?V:!1}set mousewheelDisabled(A){!this.slider||(this.slider.mousewheelDisabled=A)}get mousewheelDisabled(){var A,V;return(V=(A=this.slider)==null?void 0:A.mousewheelDisabled)!=null?V:!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,V;return(V=(A=this.slider)==null?void 0:A.rangeDragging)!=null?V:!1}set rangeDragging(A){this.slider&&(this.slider.rangeDragging=xt(A))}get externalCSSList(){return this._externalCSSList}addPointer(A){var V,rt;if(!this.slider)return;let K=(rt=(V=this.slider)==null?void 0:V.addPointer(A))!=null?rt:0;Oi(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 V=document.createElement("style");V.textContent=A,this.shadowRoot.appendChild(V)}connectedCallback(){var A,V;if(!this.shadowRoot)return;this._externalCSSList=En(this),this.shadowRoot.innerHTML=k(P,this._externalCSSList);let rt=(A=this.shadowRoot)==null?void 0:A.querySelector(".pointer");if(!rt)return;let K=(V=this.shadowRoot)==null?void 0:V.getElementById("range-slider");if(!K)return;let yt=dn(this,rt);this.slider=Qn(this,K,yt),Tr(this,this.slider),this._observer=new MutationObserver(It=>{It.forEach(Zt=>{var ft;if(!this.slider||Zt.type!=="attributes")return;let bt=Zt.attributeName;!bt||Pn(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()}},Lr=Cs;window.tcRangeSlider=Lr,customElements.get("toolcool-range-slider")||customElements.define("toolcool-range-slider",Lr),customElements.get("tc-range-slider")||customElements.define("tc-range-slider",class extends Lr{})})();function Vu(x,d){Object.keys(d).forEach(f=>{x.setAttribute(f,d[f])})}class zu extends Fu{register(){super.register()}unregister(){super.unregister()}build(){const d=this.schema.properties,f=this.options,v=this.schema.description,k=this.theme,P=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(d).find(b=>b.includes("min")),r=Object.keys(d).find(b=>b.includes("max")),y={min:d[j].minimum,max:d[r].maximum,value1:(P==null?void 0:P[j])||d[j].default,value2:(P==null?void 0:P[r])||d[r].default,"slider-bg-fill":"#004170","generate-labels":"true","slider-width":"100%","range-dragging":"false"};Vu(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 qu=[{type:"object",format:"minmax",func:zu}],Uu=x=>{qu.map(({type:d,format:f,func:v})=>{pa.JSONEditor.defaults.startVals=x,pa.JSONEditor.defaults.editors[f]=v,pa.JSONEditor.defaults.resolvers.unshift(k=>{if(k.type===d&&k.format===f)return f})})};class uc extends kr{constructor(){super();ze(this,ya);ze(this,ma);ze(this,ki,{});ze(this,Yn,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 Ve(this,ki)}firstUpdated(){if(!Ve(this,Yn)){Uu(this.startVals||{});const f=this.renderRoot.querySelector("form");Zo(this,Yn,new pa.JSONEditor(f,{schema:this.schema,...this.startVals?{startval:this.startVals}:{},theme:"html",ajax:!0,...this.options})),Ka(this,ma,Bc).call(this)}}render(){return fe`
|
|
352
|
+
`,destroy:N}};window.tcRangeSliderPlugins.push(k)})(),(()=>{var x=Object.defineProperty,d=Math.pow,f=(A,V,rt)=>V in A?x(A,V,{enumerable:!0,configurable:!0,writable:!0,value:rt}):A[V]=rt,v=(A,V,rt)=>(f(A,typeof V!="symbol"?V+"":V,rt),rt),k=(A,V)=>` ${V&&V.length>0?V.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>`,P=":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",_="max",O="step",C="round",E="type",T="theme",L="rtl",R="btt",I="disabled",N="keyboard-disabled",F="mousewheel-disabled",$="slider-width",U="slider-height",q="slider-radius",B="slider-bg",z="slider-bg-hover",M="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,V,rt,K,yt)=>{let It=V-A;return It===0?rt:(K-rt)*(yt-A)/It+rt},St=A=>!isNaN(parseFloat(A))&&isFinite(A),jt=(A,V)=>St(A)?Number(A):V,Rt=(A,V)=>V===0?0:Math.round(A/V)*V,qt=(A,V=1/0)=>{if(V===1/0)return A;let rt=d(10,V);return Math.round(A*rt)/rt},xt=A=>A==null?!1:typeof A=="boolean"?A:A.trim().toLowerCase()==="true",tr=(A,V)=>{A.dispatchEvent(new CustomEvent("onPointerClicked",{detail:{$pointer:V}}))},le=(A,V)=>{A.dispatchEvent(new CustomEvent("onMouseDown",{detail:{nativeEvent:V}}))},Re=(A,V)=>{A.dispatchEvent(new CustomEvent("onMouseUp",{detail:{nativeEvent:V}}))},fe=(A,V)=>{A.dispatchEvent(new CustomEvent("onKeyDown",{detail:{nativeEvent:V}}))},er=(A,V)=>{if(!V||V.length<=0)return;let rt=V.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}))},Ee=(A,V,rt)=>{let K=0,yt,It,Zt,ft,bt=!1,Gt=(Vt,ue,He,we,Ie,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&&Ie)&&(De=100-De),we===zt?V.style.top=`${De}%`:V.style.left=`${De}%`,sr!==K},ne=Vt=>Vt===V||V.contains(Vt),Pt=(Vt,ue,He,we)=>{yt=Vt,It=ue,Zt=He,ft=we},ae=Vt=>{bt=Vt,V.classList.toggle("disabled",bt),bt?V.setAttribute("aria-disabled","true"):V.hasAttribute("aria-disabled")&&V.removeAttribute("aria-disabled")},Te=(Vt,ue)=>{ue==null?V.removeAttribute(Vt):V.setAttribute(Vt,ue)},Qe=Vt=>V.getAttribute(Vt),At=Vt=>{if(!bt){switch(Vt.key){case"ArrowLeft":{Vt.preventDefault(),typeof yt=="function"&&yt(rt);break}case"ArrowRight":{Vt.preventDefault(),typeof It=="function"&&It(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,V)};return V.className=`pointer pointer-${rt}`,V.addEventListener("keydown",At),V.addEventListener("click",te),{$pointer:V,get percent(){return K},get disabled(){return bt},set disabled(Vt){ae(Vt)},updatePosition:Gt,isClicked:ne,setCallbacks:Pt,setAttr:Te,getAttr:Qe,destroy:()=>{V.removeEventListener("keydown",At),V.removeEventListener("click",te),V.remove()}}},ir=A=>{if(A==null)return;if(Array.isArray(A))return A;if(A.trim()==="")return;let V=A.split(","),rt=[],K=!0;for(let yt=0;yt<V.length;yt++){let It=V[yt].trim();It!==""&&(rt.push(It),St(It)||(K=!1))}return K?rt.map(yt=>Number(yt)):rt},Ce=(A,V)=>V?V.findIndex(rt=>rt===A||rt.toString().trim()===A.toString().trim()):-1,qe=A=>({updatePosition:(V,rt,K,yt)=>{if(rt.length<=0)return;let It=rt.length===1,Zt=rt[0],ft=rt[rt.length-1];V===zt?(A.style.removeProperty("width"),A.style.removeProperty("right"),A.style.removeProperty("left"),It?A.style.height=`${Zt}%`:A.style.height=`${Math.abs(Zt-ft)}%`,yt?(A.style.bottom="0%",It?A.style.top="auto":A.style.top=`${Math.min(100-ft,100-Zt)}%`):(A.style.bottom="auto",It?A.style.top="0%":A.style.top=`${Math.min(Zt,ft)}%`)):(A.style.removeProperty("height"),A.style.removeProperty("top"),A.style.removeProperty("bottom"),It?A.style.width=`${Zt}%`:A.style.width=`${Math.abs(Zt-ft)}%`,K?(A.style.right="0%",It?A.style.left="auto":A.style.left=`${Math.min(100-ft,100-Zt)}%`):(A.style.right="auto",It?A.style.left="0%":A.style.left=`${Math.min(Zt,ft)}%`))}}),xe="--animate-onclick",or="--width",ot="--height",vt="--panel-bg-border-radius",$t="--panel-bg",Nt="--panel-bg-hover",Qt="--panel-bg-fill",Ue="--pointer-width",Ze="--pointer-height",fr="--pointer-border-radius",Je="--pointer-bg",ar="--pointer-bg-hover",ke="--pointer-bg-focus",On="--pointer-shadow",Dt="--pointer-shadow-hover",Kt="--pointer-shadow-focus",Yt="--pointer-border",oe="--pointer-border-hover",Fe="--pointer-border-focus",Oi=(A,V,rt)=>{let K=new Map;for(let yt of A.attributes){let It=yt.nodeName.trim().toLowerCase();if(!V.test(It))continue;let Zt=It.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},En=A=>{if(!A)return null;let V=A.getAttribute(_t);if(!V)return null;let rt=V.split(";"),K=[];for(let yt of rt)yt.trim()!==""&&K.push(yt.trim());return K},Ra=[[or,$,"sliderWidth",null],[ot,U,"sliderHeight",null],[vt,q,"sliderRadius",null],[$t,B,"sliderBg",null],[Nt,z,"sliderBgHover",null],[Qt,M,"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$/],[ke,st,"pointer#BgFocus",/^pointer([0-9]*)-bg-focus$/],[On,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$/]],Xn=(A,V,rt)=>{let K=null,yt=[],It=new Map,Zt=(At,te=V)=>{let Vt=[...te.classList];for(let ue of Vt)ue.startsWith(At)&&V.classList.remove(ue)},ft=()=>{Zt("shape");let At=V.querySelectorAll(".pointer");for(let te of At)Zt("shape",te)},bt=At=>{K=At,Zt("theme-"),typeof At=="string"&&V.classList.add(`theme-${At}`)},Gt=()=>{if(ft(),!(yt.length<=0)){V.classList.add("shape",`shape-${yt[0]}`);for(let At=1;At<yt.length;At++){let te=yt[At];if(!te)continue;let Vt=V.querySelector(`.pointer-${At}`);!Vt||Vt.classList.add("shape",`shape-${te}`)}}},ne=(At,te)=>{yt[At]=te,Gt()},Pt=()=>{ft();let At=Oi(A,/^pointer([0-9]*)-shape$/);if(!(At.size<=0)){for(let te of At){let Vt=te[0];yt[Vt]=te[1]}Gt()}},ae=(At,te)=>`${At}-${te}`,Te=(At,te,Vt)=>{let ue=rt[Vt];if(!ue)return;let He=Vt===0?V:ue.$pointer;if(te==null){It.has(ae(At,Vt))&&It.delete(ae(At,Vt)),He.style.removeProperty(At);return}It.set(ae(At,Vt),te),He.style.setProperty(At,te)},Qe=(At,te)=>It.get(ae(At,te));return(()=>{for(let At of Ra){let[te,Vt,ue,He]=At;if(He){let Ie=Oi(A,He);for(let ve of Ie){let sr=ve[0],De=ve[1];Te(te,De,sr)}}else{let Ie=A.getAttribute(Vt);Te(te,Ie,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 Ie=1;Ie<rt.length;Ie++)we.push([ue.replace("#",(Ie+1).toString()),Ie])}for(let Ie of we)try{let ve=Ie[0],sr=Ie[1];Object.prototype.hasOwnProperty.call(A,ve)||Object.defineProperty(A,ve,{get(){return Qe(te,sr)},set:De=>{Te(te,De,sr)}})}catch(ve){console.error(ve)}}bt(A.getAttribute(T)),Pt()})(),{setStyle:Te,getStyle:Qe,get theme(){return K},set theme(At){bt(At)},get pointerShapes(){return yt},setPointerShape:ne}},Jr="animate-on-click",$r="range-dragging",Ia=(A,V,rt,K)=>{let yt=[],It=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,V,rt,K),bt(Pt),Gt(Pt))}},update:It,onAttrChange:ft,destroy:Zt}},Cn=10,Da=20,dn=(A,V)=>{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())),It=[];It.push([Ee(A,V,0),rt.get(0)]);let Zt=V;for(let ft=1;ft<=yt;ft++){let bt=V.cloneNode(!0);Zt.after(bt),Zt=bt,It.push([Ee(A,bt,ft),rt.get(ft)])}return It},Ei=(A,V,rt,K,yt,It,Zt)=>{try{Object.defineProperty(A,K,{configurable:!0,get(){if(!V)return;let ft=V.pointers[rt];if(!ft)return;let bt=V.getTextValue(ft.percent);return St(bt)?jt(bt,bt):bt},set:ft=>{V.pointers[rt]?V==null||V.setValue(ft,rt):V==null||V.addPointer(ft)}}),Object.defineProperty(A,yt,{configurable:!0,get(){var ft,bt;return(bt=(ft=V==null?void 0:V.pointers[rt])==null?void 0:ft.getAttr("aria-label"))!=null?bt:void 0},set:ft=>{!V||V.setAriaLabel(rt,ft)}}),Object.defineProperty(A,It,{configurable:!0,get(){var ft,bt;return(bt=(ft=V==null?void 0:V.styles)==null?void 0:ft.pointerShapes[rt])!=null?bt:null},set:ft=>{!V||!V.styles||V.styles.setPointerShape(rt,ft)}}),Object.defineProperty(A,Zt,{configurable:!0,get(){var ft;return(ft=V==null?void 0:V.pointers[rt].disabled)!=null?ft:!1},set:ft=>{if(!V)return;let bt=V==null?void 0:V.pointers[rt];!bt||(bt.disabled=ft)}})}catch(ft){console.error(ft)}},Tr=(A,V)=>{let rt=[["value","ariaLabel","pointerShape","pointerDisabled",0],["value0","ariaLabel0","pointerShape0","pointer0Disabled",0],["value1","ariaLabel1","pointerShape1","pointer1Disabled",0]];for(let K=2;K<Cn;K++)rt.push([`value${K}`,`ariaLabel${K}`,`pointer${K}Shape`,`pointer${K}Disabled`,K-1]);for(let K of rt)Ei(A,V,K[4],K[0],K[1],K[2],K[3])},Ba=(A,V,rt)=>{var K;let yt=(K=rt.shadowRoot)==null?void 0:K.querySelector(".container");if(yt)for(let It of A)V?yt.prepend(It.$pointer):yt.append(It.$pointer)},Sn=(A,V)=>{if(!(!V||A.length<=1)){for(let rt of A)rt.$pointer.style.zIndex=Da.toString();V.$pointer.style.zIndex=(Da*2).toString()}},Io=0,br=100,Yr=2,gr="0.3s",Qn=(A,V,rt)=>{let K=rt.map(H=>H[0]),yt=null,It=null,Zt=null,ft=null,bt=Io,Gt=br,ne,Pt,ae=Xt,Te=Yr,Qe=!1,At=!1,te=!1,Vt=0,ue=1/0,He=!1,we,Ie,ve=!1,sr=!1,De=!1,Ar=gr,wr=[],Na=H=>{ve||(H.preventDefault&&H.preventDefault(),Rr(H),window.addEventListener("mousemove",Rr),window.addEventListener("mouseup",Mr),le(A,H))},Mr=H=>{ve||(we=void 0,Ie=void 0,window.removeEventListener("mousemove",Rr),window.removeEventListener("mouseup",Mr),Ar&&V.classList.add(Jr),Re(A,H))},Ps=(H,at)=>{if(K.length<=0)return;if(K.length===1)return K[0].isClicked(H)&&Ar&&V.classList.remove(Jr),K[0];let Ot=Ma(H);if(He){let ie=at,Be=Ai(ie);Be!==void 0&&(ie=Rt(ie,Be)),Ot?(we=ie,Ie=0,Ar&&V.classList.remove(Jr)):we!==void 0&&(Ie=ie-we,we=ie)}if(!Tn(H)&&!Ot){for(let ie of K)if(!(!ie.isClicked(H)||ie.disabled))return Ar&&V.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 Be=Math.abs(at-ie.percent);Be<pe&&(pe=Be,ye=ie)}return ye},Ci=()=>K.findIndex(H=>yt===H&&!H.disabled),Rr=H=>{let at;if(ae===zt){let{height:pe,top:ye}=V.getBoundingClientRect(),ie=H.type.indexOf("mouse")!==-1?H.clientY:H.touches[0].clientY;at=Math.min(Math.max(0,ie-ye),pe)*100/pe}else{let{width:pe,left:ye}=V.getBoundingClientRect(),ie=H.type.indexOf("mouse")!==-1?H.clientX:H.touches[0].clientX;at=Math.min(Math.max(0,ie-ye),pe)*100/pe}if((Qe||At)&&(at=100-at),yt=Ps(H.target,at),yt&&Sn(K,yt),He&&K.length>1&&Ie!==void 0){let pe=K[0],ye=K[K.length-1],ie=pe.percent+Ie<0,Be=ye.percent+Ie>100;if(ie||Be)return;for(let zi=0;zi<K.length;zi++)Ve(zi,K[zi].percent+Ie);return}let Ot=Ci();Ot!==-1&&(Ve(Ot,at),yt==null||yt.$pointer.focus())},Si=H=>{if(ve||document.activeElement!==A||yt!=null&&yt.disabled)return;H.stopPropagation(),H.preventDefault();let at=H.deltaY<0,Ot=Qe||At,pe=at?!Ot:Ot,ye=Ci();ye!==-1&&(pe?Ir(ye,K[ye].percent):Kn(ye,K[ye].percent))},pn=H=>{ve||sr||(ae===zt?At?Ve(H,100):Ve(H,0):Qe?Kn(H,K[H].percent):Ir(H,K[H].percent))},$a=H=>{ve||sr||(ae===zt?At?Ve(H,0):Ve(H,100):Qe?Ir(H,K[H].percent):Kn(H,K[H].percent))},Pi=H=>{ve||sr||(ae===zt?At?Kn(H,K[H].percent):Ir(H,K[H].percent):Qe?Ve(H,100):Ve(H,0))},Ti=H=>{ve||sr||(ae===zt?At?Ir(H,K[H].percent):Kn(H,K[H].percent):Qe?Ve(H,0):Ve(H,100))},Tn=H=>H.classList.contains("panel"),Ma=H=>H.classList.contains("panel-fill"),Ir=(H,at)=>{if(at===void 0)return;let Ot=Ai(at);Ot==null&&(Ot=1),at-=Ot,at<0&&(at=0),Ve(H,at)},Kn=(H,at)=>{if(at===void 0)return;let Ot=Ai(at);Ot==null&&(Ot=1),at+=Ot,at>100&&(at=100),Ve(H,at)},Fr=()=>{!ft||ft.update({percents:Vr(),values:Ri(),$pointers:_r(),min:Ha(),max:Va(),data:Bo(),step:Do(),round:$o(),type:No(),textMin:An(),textMax:Hr(),rightToLeft:lr(),bottomToTop:be(),pointersOverlap:Di(),pointersMinDistance:Ii(),pointersMaxDistance:Mo(),rangeDragging:Bi(),disabled:ei(),keyboardDisabled:ri(),mousewheelDisabled:Fo()})},Li=()=>{Fr()},Fa=H=>{if(!(te||K.length<=1||Gt===bt))if(H===0){let at=ue*100/(Gt-bt);return Math.max(0,K[H+1].percent-at)}else{let at=Vt*100/(Gt-bt);return Math.min(K[H-1].percent+at,100)}},Ln=H=>{if(!(te||K.length<=1||Gt===bt))if(H===K.length-1){let at=ue*100/(Gt-bt);return Math.min(K[H-1].percent+at,100)}else{let at=Vt*100/(Gt-bt);return Math.max(0,K[H+1].percent-at)}},Ai=H=>{let at;if(typeof ne=="function"){let Ot=ce(0,100,bt,Gt,H);at=ne(Ot,H)}else at=ne;if(St(at)){let Ot=Gt-bt;return at=Ot===0?0:at*100/Ot,at}},Xr=H=>{if(H===void 0)return;let at=ce(0,100,bt,Gt,H);return Pt!==void 0?Pt[Math.round(at)]:qt(at,Te)},An=()=>Pt!==void 0?Pt[bt]:bt,Hr=()=>Pt!==void 0?Pt[Gt]:Gt,Do=()=>ne,Rn=H=>{var at;return H<=0||te?An():(at=Xr(K[H-1].percent))!=null?at:""},Ts=H=>{var at;return K.length<=1||H>=K.length-1||te?Hr():(at=Xr(K[H+1].percent))!=null?at:""},Vr=()=>K.map(H=>H.percent),Ri=()=>K.map(H=>Xr(H.percent)),_r=()=>K.map(H=>H.$pointer),Ha=()=>bt,Va=()=>Gt,Bo=()=>Pt,No=()=>ae,$o=()=>Te,Ii=()=>Vt,Mo=()=>ue,ti=H=>wr[H],lr=()=>Qe,be=()=>At,ei=()=>ve,ri=()=>sr,Fo=()=>De,Di=()=>te,Bi=()=>He,Ve=(H,at)=>{if(at===void 0)return;let Ot=Ai(at);Ot!==void 0&&(at=Rt(at,Ot));let pe=K[H];if(!pe)return;let ye=pe.updatePosition(at,Fa(H),Ln(H),ae,Qe,At);It==null||It.updatePosition(ae,K.map(ie=>ie.percent),Qe,At),Fr();for(let ie of K){let Be=Xr(ie.percent);Be!==void 0&&(ie.setAttr("aria-valuenow",Be.toString()),ie.setAttr("aria-valuetext",Be.toString()))}Ho(),ye&&er(A,K.map(ie=>Xr(ie.percent)))},Dr=()=>{for(let H=0;H<K.length;H++)Ve(H,K[H].percent)},Qr=(H,at)=>{bt=Pt!==void 0?0:jt(H,Io),Gt=Pt!==void 0?Pt.length-1:jt(at,br),cr(bt),Ni(Gt)},Ho=()=>{var H,at;for(let Ot=0;Ot<K.length;Ot++){let pe=K[Ot];pe.setAttr("aria-valuemin",((H=Rn(Ot))!=null?H:"").toString()),pe.setAttr("aria-valuemax",((at=Ts(Ot))!=null?at:"").toString())}},cr=H=>{bt=jt(H,Io),bt>Gt&&(Gt=bt+br),Dr()},Ni=H=>{Gt=jt(H,br),Gt<bt&&(Gt=bt+br),Dr()},fn=H=>{te=!0;for(let at=0;at<H.length;at++)$i(H[at],at);te=!1;for(let at=0;at<H.length;at++)$i(H[at],at)},$i=(H,at)=>{let Ot;Pt!==void 0?(Ot=H==null?0:Ce(H,Pt),Ot===-1&&(Ot=0)):(Ot=jt(H,bt),Ot<bt&&(Ot=bt),Ot>Gt&&(Ot=Gt));let pe=ce(bt,Gt,0,100,Ot);Ve(at,pe)},In=H=>{if(H==null){ne=void 0;return}if(typeof H=="function"){ne=H,Dr();return}if(St(H)){ne=jt(H,1);let at=Math.abs(Gt-bt);ne>at&&(ne=void 0),Dr();return}ne=void 0},Dn=H=>{te=H,Dr()},Vo=H=>{(!St(H)||H<0)&&(H=0),Vt=H},Mi=H=>{(!St(H)||H<0)&&(H=1/0),ue=H},Kr=H=>{ve=H,V.classList.toggle("disabled",ve),ve?V.setAttribute("aria-disabled","true"):V.hasAttribute("aria-disabled")&&V.removeAttribute("aria-disabled")},ni=H=>{sr=H},yn=H=>{De=H,De?document.removeEventListener("wheel",Si):document.addEventListener("wheel",Si,{passive:!1})},Fi=H=>{if(H==null){Pt=void 0;return}if(Pt=ir(H),Pt===void 0||Pt.length<=0){Pt=void 0;return}cr(0),Ni(Pt.length-1),ne===void 0&&In(1)},Cr=H=>{var at;typeof H=="string"?ae=H.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)},zo=H=>{Qe=H,K.length>1&&Ba(K,Qe,A),Dr(),Fr()},Hi=H=>{At=H,K.length>1&&Ba(K,At,A),Dr(),Fr()},xr=H=>{Te=jt(H,Yr),Te<0&&(Te=Yr),Fr()},Vi=H=>{H==null||H.toString().trim().toLowerCase()==="false"?(Ar=void 0,V.style.removeProperty(xe),V.classList.remove(Jr)):(Ar=H.toString(),V.style.setProperty(xe,Ar),V.classList.add(Jr))},ur=(H,at)=>{let Ot=K[H];!Ot||(Ot.setAttr("aria-label",at),wr[H]=at)},ii=H=>{if(we=void 0,K.length<=1){He=!1,V.classList.remove($r);return}He=H,V.classList.toggle($r,He)},Bn=()=>{Kr(xt(A.getAttribute(I))),sr=xt(A.getAttribute(N)),De=xt(A.getAttribute(F));let H=Oi(A,/^pointer([0-9]*)-disabled$/,at=>xt(at));for(let at of H){let Ot=at[0];!K[Ot]||(K[Ot].disabled=at[1])}},Ls=()=>{let H=Oi(A,/^aria-label([0-9]*)$/);for(let at of H){let Ot=at[0];ur(Ot,at[1])}},Nn=H=>{let at=K.length,Ot=K[at-1].$pointer,pe=Ot.cloneNode(!0);Ot.after(pe);let ye=Ee(A,pe,at);return ye.setCallbacks(pn,$a,Pi,Ti),K.push(ye),$i(H,at),Dr(),Fr(),at},qo=()=>{let H=K.length,at=K[H-1];return at?(at.destroy(),K.pop(),K.length<=1&&ii(!1),Dr(),Fr(),H-1):-1};return(()=>{var H,at;for(let pe of K)pe.setCallbacks(pn,$a,Pi,Ti);let Ot=(H=A.shadowRoot)==null?void 0:H.querySelector(".panel-fill");Ot&&(It=qe(Ot)),Cr(A.getAttribute(E)),zo(xt(A.getAttribute(L))),Hi(xt(A.getAttribute(R))),Qr(A.getAttribute(g),A.getAttribute(_)),In(A.getAttribute(O)),Fi(A.getAttribute(b)),fn(rt.map(pe=>pe[1])),Dn(xt(A.getAttribute(m))),Vo(jt(A.getAttribute(j),0)),Mi(jt(A.getAttribute(r),1/0)),ii(xt(A.getAttribute(y))),xr(jt(A.getAttribute(C),Yr)),Bn(),Ls(),Zt=Xn(A,V,K),Vi((at=A.getAttribute(wt))!=null?at:gr),V.addEventListener("mousedown",Na),V.addEventListener("mouseup",Mr),V.addEventListener("touchmove",Rr),V.addEventListener("touchstart",Rr),De||document.addEventListener("wheel",Si,{passive:!1}),ft=Ia(A,Li,{setValues:fn,setMin:cr,setMax:Ni,setStep:In,setPointersOverlap:Dn,setPointersMinDistance:Vo,setPointersMaxDistance:Mi,setDisabled:Kr,setType:Cr,setRightToLeft:zo,setBottomToTop:Hi,setRound:xr,setKeyboardDisabled:ni,setMousewheelDisabled:yn,setRangeDragging:ii,setData:Fi},{getPercents:Vr,getValues:Ri,getPointerElements:_r,getMin:Ha,getMax:Va,getStep:Do,getData:Bo,getType:No,getRound:$o,getTextMin:An,getTextMax:Hr,isRightToLeft:lr,isBottomToTop:be,isDisabled:ei,isKeyboardDisabled:ri,isMousewheelDisabled:Fo,isPointersOverlap:Di,isRangeDraggingEnabled:Bi,getPointersMinDistance:Ii,getPointersMaxDistance:Mo}),ft.init()})(),{get pointers(){return K},get styles(){return Zt},get pluginsManager(){return ft},get min(){return An()},get max(){return Hr()},get step(){return Do()},get pointersOverlap(){return Di()},set pointersOverlap(H){Dn(H)},get pointersMinDistance(){return Ii()},set pointersMinDistance(H){Vo(H)},get pointersMaxDistance(){return Mo()},set pointersMaxDistance(H){Mi(H)},get disabled(){return ei()},set disabled(H){Kr(H)},get data(){return Bo()},get type(){return No()},set type(H){Cr(H)},get rightToLeft(){return lr()},set rightToLeft(H){zo(H)},get bottomToTop(){return be()},set bottomToTop(H){Hi(H)},get round(){return $o()},set round(H){xr(H)},get animateOnClick(){return Ar},set animateOnClick(H){Vi(H)},get keyboardDisabled(){return ri()},set keyboardDisabled(H){ni(H)},get mousewheelDisabled(){return Fo()},set mousewheelDisabled(H){yn(H)},get rangeDragging(){return Bi()},set rangeDragging(H){ii(H)},setMin:cr,setMax:Ni,setValue:$i,setStep:In,setData:Fi,getTextValue:Xr,setAriaLabel:ur,getAriaLabel:ti,addPointer:Nn,removePointer:qo,destroy:()=>{V.removeEventListener("mousedown",Na),V.removeEventListener("mouseup",Mr),V.removeEventListener("touchmove",Rr),V.removeEventListener("touchstart",Rr),document.removeEventListener("wheel",Si);for(let H of K)H.destroy();ft==null||ft.destroy()}}},Pn=(A,V,rt)=>{let K=Ra.find(([ft,bt,Gt,ne])=>bt.replace("#","")===V.replace(/\d+/g,""));if(K&&A.styles){let[ft,bt,Gt,ne]=K,Pt=V.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(V,rt),V){case g:{A.setMin(rt);break}case _:{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 N:{A.keyboardDisabled=xt(rt);break}case F:{A.mousewheelDisabled=xt(rt);break}case b:{A.setData(rt);break}case E:{A.type=rt;break}case L:{A.rightToLeft=xt(rt);break}case R:{A.bottomToTop=xt(rt);break}case C:{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(V)&&(yt="value"),/^pointer([0-9]*)-disabled$/.test(V)&&(yt="pointer-disabled"),/^aria-label([0-9]*)$/.test(V)&&(yt="aria-label"),/^pointer([0-9]*)-shape$/.test(V)&&(yt="pointer-shape"),!yt)return;let It=V.replace(/\D/g,"").trim(),Zt=It===""||It==="0"||It==="1"?0:jt(It,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}}},Ss=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,V;return(V=(A=this.slider)==null?void 0:A.disabled)!=null?V:!1}set data(A){var V;(V=this.slider)==null||V.setData(A)}get data(){var A;return(A=this.slider)==null?void 0:A.data}set min(A){var V;(V=this.slider)==null||V.setMin(A)}get min(){var A;return(A=this.slider)==null?void 0:A.min}set max(A){var V;(V=this.slider)==null||V.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,V;return(V=(A=this.slider)==null?void 0:A.round)!=null?V: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,V;return(V=(A=this.slider)==null?void 0:A.pointersOverlap)!=null?V:!1}set pointersMinDistance(A){!this.slider||(this.slider.pointersMinDistance=A)}get pointersMinDistance(){var A,V;return(V=(A=this.slider)==null?void 0:A.pointersMinDistance)!=null?V:0}set pointersMaxDistance(A){!this.slider||(this.slider.pointersMaxDistance=A)}get pointersMaxDistance(){var A,V;return(V=(A=this.slider)==null?void 0:A.pointersMaxDistance)!=null?V:1/0}set theme(A){!this.slider||!this.slider.styles||(this.slider.styles.theme=A)}get theme(){var A,V,rt;return(rt=(V=(A=this.slider)==null?void 0:A.styles)==null?void 0:V.theme)!=null?rt:null}set rtl(A){!this.slider||(this.slider.rightToLeft=A)}get rtl(){var A,V;return(V=(A=this.slider)==null?void 0:A.rightToLeft)!=null?V:!1}set btt(A){!this.slider||(this.slider.bottomToTop=A)}get btt(){var A,V;return(V=(A=this.slider)==null?void 0:A.bottomToTop)!=null?V:!1}set keyboardDisabled(A){!this.slider||(this.slider.keyboardDisabled=A)}get keyboardDisabled(){var A,V;return(V=(A=this.slider)==null?void 0:A.keyboardDisabled)!=null?V:!1}set mousewheelDisabled(A){!this.slider||(this.slider.mousewheelDisabled=A)}get mousewheelDisabled(){var A,V;return(V=(A=this.slider)==null?void 0:A.mousewheelDisabled)!=null?V:!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,V;return(V=(A=this.slider)==null?void 0:A.rangeDragging)!=null?V:!1}set rangeDragging(A){this.slider&&(this.slider.rangeDragging=xt(A))}get externalCSSList(){return this._externalCSSList}addPointer(A){var V,rt;if(!this.slider)return;let K=(rt=(V=this.slider)==null?void 0:V.addPointer(A))!=null?rt:0;Ei(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 V=document.createElement("style");V.textContent=A,this.shadowRoot.appendChild(V)}connectedCallback(){var A,V;if(!this.shadowRoot)return;this._externalCSSList=En(this),this.shadowRoot.innerHTML=k(P,this._externalCSSList);let rt=(A=this.shadowRoot)==null?void 0:A.querySelector(".pointer");if(!rt)return;let K=(V=this.shadowRoot)==null?void 0:V.getElementById("range-slider");if(!K)return;let yt=dn(this,rt);this.slider=Qn(this,K,yt),Tr(this,this.slider),this._observer=new MutationObserver(It=>{It.forEach(Zt=>{var ft;if(!this.slider||Zt.type!=="attributes")return;let bt=Zt.attributeName;!bt||Pn(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()}},Lr=Ss;window.tcRangeSlider=Lr,customElements.get("toolcool-range-slider")||customElements.define("toolcool-range-slider",Lr),customElements.get("tc-range-slider")||customElements.define("tc-range-slider",class extends Lr{})})();function zu(x,d){Object.keys(d).forEach(f=>{x.setAttribute(f,d[f])})}class qu extends Vu{register(){super.register()}unregister(){super.unregister()}build(){const d=this.schema.properties,f=this.options,v=this.schema.description,k=this.theme,P=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(d).find(b=>b.includes("min")),r=Object.keys(d).find(b=>b.includes("max")),y={min:d[j].minimum,max:d[r].maximum,value1:(P==null?void 0:P[j])||d[j].default,value2:(P==null?void 0:P[r])||d[r].default,"slider-bg-fill":"#004170","generate-labels":"true","slider-width":"100%","range-dragging":"false"};zu(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 Uu=[{type:"object",format:"minmax",func:qu}],Gu=x=>{Uu.map(({type:d,format:f,func:v})=>{fa.JSONEditor.defaults.startVals=x,fa.JSONEditor.defaults.editors[f]=v,fa.JSONEditor.defaults.resolvers.unshift(k=>{if(k.type===d&&k.format===f)return f})})};class hc extends kr{constructor(){super();Ne(this,ma);Ne(this,va);Ne(this,ki,{});Ne(this,Yn,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 Le(this,ki)}firstUpdated(){if(!Le(this,Yn)){Gu(this.startVals||{});const f=this.renderRoot.querySelector("form");ho(this,Yn,new fa.JSONEditor(f,{schema:this.schema,...this.startVals?{startval:this.startVals}:{},theme:"html",ajax:!0,...this.options})),ts(this,va,Nc).call(this)}}render(){return me`
|
|
353
353
|
<style>
|
|
354
|
-
${
|
|
354
|
+
${Fu}
|
|
355
355
|
${!this.unstyled&&Hu}
|
|
356
356
|
</style>
|
|
357
357
|
<form></form>
|
|
358
|
-
`}}ki=new WeakMap,Yn=new WeakMap,
|
|
358
|
+
`}}ki=new WeakMap,Yn=new WeakMap,ma=new WeakSet,Bc=function(){this.dispatchEvent(new CustomEvent("change",{detail:Le(this,ki),bubbles:!0,composed:!0})),this.requestUpdate()},va=new WeakSet,Nc=function(){["ready","change"].map(v=>{Le(this,Yn).on(v,()=>{ho(this,ki,Le(this,Yn).getValue()),ts(this,ma,Bc).call(this)})})},mr(hc,"properties",{schema:{attribute:!1,type:Object},startVals:{attribute:!1,type:Object},options:{attribute:!1,type:Object},unstyled:{type:Boolean}}),customElements.define("eox-jsonform",hc);class dc extends kr{constructor(){super();Ne(this,ba);Ne(this,Ao,{});Ne(this,Ro,null);Ne(this,ji,void 0);Ne(this,ga,"");Ne(this,wa,"");this.layer=null,this.unstyled=!1,this.noShadow=!0,this.layerConfig=null}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){return this.layerConfig?(ho(this,Ro,$u(this.layer,this.layerConfig)),me`
|
|
359
359
|
<style>
|
|
360
|
-
${
|
|
361
|
-
${!this.unstyled&&
|
|
360
|
+
${Le(this,ga)}
|
|
361
|
+
${!this.unstyled&&Le(this,wa)}
|
|
362
362
|
</style>
|
|
363
363
|
<eox-jsonform
|
|
364
364
|
.schema=${this.layerConfig.schema}
|
|
365
|
-
.startVals=${
|
|
365
|
+
.startVals=${Le(this,Ro)}
|
|
366
366
|
.options=${{disable_edit_json:!0,disable_collapse:!0,disable_properties:!0}}
|
|
367
|
-
@change=${
|
|
367
|
+
@change=${ts(this,ba,$c)}
|
|
368
368
|
></eox-jsonform>
|
|
369
|
-
`):""}}
|
|
369
|
+
`):""}}Ao=new WeakMap,Ro=new WeakMap,ji=new WeakMap,ba=new WeakSet,$c=function(f){ho(this,Ao,f.detail),this.layer.getSource().getTileUrlFunction()&&(Le(this,ji)||ho(this,ji,this.layer.getSource().getTileUrlFunction()),this.layer.getSource().setTileUrlFunction((...v)=>Nu(Le(this,ji).call(this,...v),Le(this,Ao))),this.layer.getSource().setKey(new Date)),this.requestUpdate()},ga=new WeakMap,wa=new WeakMap,mr(dc,"properties",{layer:{attribute:!1},unstyled:{type:Boolean},noShadow:{type:Boolean},layerConfig:{attribute:!1}}),customElements.define("eox-layercontrol-layerconfig",dc);class pc extends kr{constructor(){super();Ne(this,_a,`
|
|
370
370
|
.tabbed figure {
|
|
371
371
|
margin: 0;
|
|
372
372
|
}
|
|
@@ -386,7 +386,7 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
386
386
|
.tabbed label.highlighted {
|
|
387
387
|
background: lightgrey;
|
|
388
388
|
}
|
|
389
|
-
`);
|
|
389
|
+
`);Ne(this,xa,`
|
|
390
390
|
.tabbed {
|
|
391
391
|
font-size: small;
|
|
392
392
|
}
|
|
@@ -406,16 +406,16 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
406
406
|
background: #00417011;
|
|
407
407
|
border-top: 1px solid #0041701a;
|
|
408
408
|
}
|
|
409
|
-
`);this.actions=[],this.selectedTab=0,this.tabs=[],this.unstyled=!1,this.noShadow=!0}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){return
|
|
409
|
+
`);this.actions=[],this.selectedTab=0,this.tabs=[],this.unstyled=!1,this.noShadow=!0}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){return me`
|
|
410
410
|
<style>
|
|
411
|
-
${
|
|
412
|
-
${!this.unstyled&&
|
|
411
|
+
${Le(this,_a)}
|
|
412
|
+
${!this.unstyled&&Le(this,xa)}
|
|
413
413
|
</style>
|
|
414
414
|
<div class="tabbed">
|
|
415
|
-
${ln(this.actions.length+this.tabs.length>1,()=>
|
|
415
|
+
${ln(this.actions.length+this.tabs.length>1,()=>me`
|
|
416
416
|
<nav>
|
|
417
417
|
<div>
|
|
418
|
-
${
|
|
418
|
+
${pa(this.tabs,(f,v)=>me`
|
|
419
419
|
<label
|
|
420
420
|
class=${this.selectedTab===v&&"highlighted"}
|
|
421
421
|
@click=${()=>this.selectedTab=v}
|
|
@@ -425,7 +425,7 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
425
425
|
`)}
|
|
426
426
|
</div>
|
|
427
427
|
<div>
|
|
428
|
-
${
|
|
428
|
+
${pa(this.actions,f=>me`
|
|
429
429
|
<span>
|
|
430
430
|
<slot name=${f+"-icon"}>${f}</slot>
|
|
431
431
|
</span>
|
|
@@ -434,14 +434,14 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
434
434
|
</nav>
|
|
435
435
|
`)}
|
|
436
436
|
<figure>
|
|
437
|
-
${
|
|
437
|
+
${pa(this.tabs,(f,v)=>me`
|
|
438
438
|
<div class="tab ${this.selectedTab===v&&"highlighted"}">
|
|
439
439
|
<slot name=${f+"-content"}>${f}</slot>
|
|
440
440
|
</div>
|
|
441
441
|
`)}
|
|
442
442
|
</figure>
|
|
443
443
|
</div>
|
|
444
|
-
`}}
|
|
444
|
+
`}}_a=new WeakMap,xa=new WeakMap,mr(pc,"properties",{actions:{attribute:!1},selectedTab:{state:!0},tabs:{attribute:!1},unstyled:{type:Boolean},noShadow:{type:Boolean}}),customElements.define("eox-layercontrol-tabs",pc);const Wu=`
|
|
445
445
|
button {
|
|
446
446
|
/* TODO: why does this only work here and not from :root? */
|
|
447
447
|
--primary-color: #004170;
|
|
@@ -530,26 +530,22 @@ button.small {
|
|
|
530
530
|
padding: 12.4px;
|
|
531
531
|
font-size: .75rem;
|
|
532
532
|
}
|
|
533
|
-
`;class
|
|
533
|
+
`;class fc extends kr{constructor(){super();mr(this,"_parseActions",f=>f==null?void 0:f.filter(v=>["remove","sort"].filter(k=>{var P;return(P=this.layer)!=null&&P.get("layerControlDisable")?k!=="sort":!0}).includes(v)));mr(this,"_parseTools",f=>f==null?void 0:f.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}));mr(this,"_removeButton",me`
|
|
534
534
|
<button
|
|
535
535
|
class="remove-icon icon"
|
|
536
536
|
@click=${()=>{var f,v;(f=this.layer)==null||f.set("layerControlOptional",!0),(v=this.layer)==null||v.setVisible(!1),this.dispatchEvent(new CustomEvent("changed",{detail:this.layer,bubbles:!0}))}}
|
|
537
537
|
>
|
|
538
|
-
${this.unstyled?"x":
|
|
538
|
+
${this.unstyled?"x":_e}
|
|
539
539
|
</button>
|
|
540
|
-
`);
|
|
540
|
+
`);mr(this,"_sortButton",me`
|
|
541
541
|
<button class="sort-icon icon drag-handle">
|
|
542
|
-
${this.unstyled?"sort":
|
|
543
|
-
</button>
|
|
544
|
-
`);pr(this,"_configButton",fe`
|
|
545
|
-
<button class="config-icon icon">
|
|
546
|
-
${this.unstyled?"config":we}
|
|
542
|
+
${this.unstyled?"sort":_e}
|
|
547
543
|
</button>
|
|
548
|
-
`);
|
|
549
|
-
${
|
|
550
|
-
${ac}
|
|
551
|
-
${Os}
|
|
544
|
+
`);Ne(this,ka,"");Ne(this,ja,`
|
|
545
|
+
${Wu}
|
|
552
546
|
${sc}
|
|
547
|
+
${Es}
|
|
548
|
+
${lc}
|
|
553
549
|
button.icon.drag-handle {
|
|
554
550
|
cursor: n-resize;
|
|
555
551
|
}
|
|
@@ -639,22 +635,22 @@ button.small {
|
|
|
639
635
|
[slot=opacity-content] {
|
|
640
636
|
padding: 12px 6px;
|
|
641
637
|
}
|
|
642
|
-
`);this.layer=null,this.tools=[],this.unstyled=!1,this.noShadow=!0}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){var f,v;return
|
|
638
|
+
`);this.layer=null,this.tools=[],this.unstyled=!1,this.noShadow=!0}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){var f,v;return me`
|
|
643
639
|
<style>
|
|
644
|
-
${
|
|
645
|
-
${!this.unstyled&&
|
|
640
|
+
${Le(this,ka)}
|
|
641
|
+
${!this.unstyled&&Le(this,ja)}
|
|
646
642
|
</style>
|
|
647
|
-
${ln(((f=this._parseActions(this.tools))==null?void 0:f.length)+((v=this._parseTools(this.tools))==null?void 0:v.length)>0,()=>{var k,P;return
|
|
648
|
-
${ln(((k=this._parseActions(this.tools))==null?void 0:k.length)===1&&((P=this._parseTools(this.tools))==null?void 0:P.length)===0,()=>
|
|
643
|
+
${ln(((f=this._parseActions(this.tools))==null?void 0:f.length)+((v=this._parseTools(this.tools))==null?void 0:v.length)>0,()=>{var k,P;return me`
|
|
644
|
+
${ln(((k=this._parseActions(this.tools))==null?void 0:k.length)===1&&((P=this._parseTools(this.tools))==null?void 0:P.length)===0,()=>me`
|
|
649
645
|
<div class="single-action-container">
|
|
650
646
|
<div class="single-action">
|
|
651
647
|
${this[`_${this._parseActions(this.tools)[0]}Button`]}
|
|
652
648
|
</div>
|
|
653
649
|
</div>
|
|
654
|
-
`,()=>{var m;return
|
|
650
|
+
`,()=>{var m;return me`
|
|
655
651
|
<details
|
|
656
652
|
class="tools"
|
|
657
|
-
open=${this.layer.get("layerControlToolsExpand")||
|
|
653
|
+
open=${this.layer.get("layerControlToolsExpand")||_e}
|
|
658
654
|
>
|
|
659
655
|
<summary>
|
|
660
656
|
<button
|
|
@@ -669,14 +665,14 @@ button.small {
|
|
|
669
665
|
.tabs=${this._parseTools(this.tools)}
|
|
670
666
|
.unstyled=${this.unstyled}
|
|
671
667
|
>
|
|
672
|
-
${
|
|
668
|
+
${pa(this._parseTools(this.tools),j=>me`
|
|
673
669
|
<button slot="${j}-icon" class="icon">
|
|
674
|
-
${this.unstyled?j:
|
|
670
|
+
${this.unstyled?j:_e}
|
|
675
671
|
</button>
|
|
676
672
|
`)}
|
|
677
673
|
|
|
678
674
|
<div slot="info-content">
|
|
679
|
-
${
|
|
675
|
+
${Mu(this.layer.get("description"))}
|
|
680
676
|
</div>
|
|
681
677
|
<div slot="opacity-content">
|
|
682
678
|
<input
|
|
@@ -684,7 +680,7 @@ button.small {
|
|
|
684
680
|
min="0"
|
|
685
681
|
max="1"
|
|
686
682
|
step="0.01"
|
|
687
|
-
value=${
|
|
683
|
+
value=${oc((m=this.layer)==null?void 0:m.getOpacity())}
|
|
688
684
|
@input=${j=>this.layer.setOpacity(parseFloat(j.target.value))}
|
|
689
685
|
/>
|
|
690
686
|
</div>
|
|
@@ -700,13 +696,12 @@ button.small {
|
|
|
700
696
|
</div>
|
|
701
697
|
<div slot="remove-icon">${this._removeButton}</div>
|
|
702
698
|
<div slot="sort-icon">${this._sortButton}</div>
|
|
703
|
-
<div slot="config-icon">${this._configButton}</div>
|
|
704
699
|
</eox-layercontrol-tabs>
|
|
705
700
|
</details>
|
|
706
701
|
`})}
|
|
707
702
|
`})}
|
|
708
|
-
`}}
|
|
709
|
-
${
|
|
703
|
+
`}}ka=new WeakMap,ja=new WeakMap,mr(fc,"properties",{layer:{attribute:!1},tools:{attribute:!1},unstyled:{type:Boolean},noShadow:{type:Boolean}}),customElements.define("eox-layercontrol-layer-tools",fc);class yc extends kr{constructor(){super();mr(this,"currLayerVisibilityBasedOnZoom",!0);Ne(this,Oa,"");Ne(this,Ea,`
|
|
704
|
+
${Es}
|
|
710
705
|
eox-layercontrol-layer {
|
|
711
706
|
width: 100%;
|
|
712
707
|
}
|
|
@@ -746,12 +741,12 @@ button.small {
|
|
|
746
741
|
[data-type=draw] .title::before {
|
|
747
742
|
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");
|
|
748
743
|
}
|
|
749
|
-
`);this.layer=null,this.map=null,this.titleProperty="title",this.showLayerZoomState=!1,this.tools=[],this.unstyled=!1,this.noShadow=!0}updateLayerZoomVisibility(){const f=
|
|
744
|
+
`);this.layer=null,this.map=null,this.titleProperty="title",this.showLayerZoomState=!1,this.tools=[],this.unstyled=!1,this.noShadow=!0}updateLayerZoomVisibility(){const f=Bu(this.layer,this.map,this.showLayerZoomState);let v=!1;!f&&this.currLayerVisibilityBasedOnZoom?(this.currLayerVisibilityBasedOnZoom=!1,v=!0):f&&!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 me`
|
|
750
745
|
<style>
|
|
751
|
-
${
|
|
752
|
-
${!this.unstyled&&
|
|
746
|
+
${Le(this,Oa)}
|
|
747
|
+
${!this.unstyled&&Le(this,Ea)}
|
|
753
748
|
</style>
|
|
754
|
-
${ln(this.layer,()=>{var f;return
|
|
749
|
+
${ln(this.layer,()=>{var f;return me`
|
|
755
750
|
<div
|
|
756
751
|
class="layer ${this.layer.getVisible()?"visible":""}
|
|
757
752
|
${this.currLayerVisibilityBasedOnZoom?"":"zoom-state-invisible"}"
|
|
@@ -761,11 +756,11 @@ button.small {
|
|
|
761
756
|
>
|
|
762
757
|
<input
|
|
763
758
|
type=${this.layer.get("layerControlExclusive")?"radio":"checkbox"}
|
|
764
|
-
.checked=${
|
|
759
|
+
.checked=${oc(this.layer.getVisible())}
|
|
765
760
|
@click=${v=>{this.layer.setVisible(v.target.checked),v.target.checked&&this.layer.get("layerControlExclusive")&&this.parentNode.parentNode.querySelectorAll("li > eox-layercontrol-layer").forEach(P=>{var m;P.layer!==this.layer&&((m=P.layer)!=null&&m.get("layerControlExclusive"))&&(P.layer.setVisible(!1),P.requestUpdate())}),this.dispatchEvent(new CustomEvent("changed",{bubbles:!0})),this.requestUpdate()}}
|
|
766
761
|
/>
|
|
767
762
|
<span class="title">${this.layer.get(this.titleProperty)}</span>
|
|
768
|
-
${ln(((f=this.tools)==null?void 0:f.length)>0,()=>
|
|
763
|
+
${ln(((f=this.tools)==null?void 0:f.length)>0,()=>me`<span class="tools-placeholder"></span>`)}
|
|
769
764
|
</label>
|
|
770
765
|
</div>
|
|
771
766
|
<eox-layercontrol-layer-tools
|
|
@@ -775,7 +770,7 @@ button.small {
|
|
|
775
770
|
.unstyled=${this.unstyled}
|
|
776
771
|
></eox-layercontrol-layer-tools>
|
|
777
772
|
`})}
|
|
778
|
-
`}}
|
|
773
|
+
`}}Oa=new WeakMap,Ea=new WeakMap,mr(yc,"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",yc);class mc extends kr{constructor(){super();Ne(this,Ca,"");Ne(this,Sa,`
|
|
779
774
|
details summary {
|
|
780
775
|
cursor: pointer;
|
|
781
776
|
display: flex;
|
|
@@ -796,13 +791,13 @@ button.small {
|
|
|
796
791
|
details[open] > summary:before {
|
|
797
792
|
transform: rotate(90deg);
|
|
798
793
|
}
|
|
799
|
-
`);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
|
|
794
|
+
`);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 me`
|
|
800
795
|
<style>
|
|
801
|
-
${
|
|
802
|
-
${!this.unstyled&&
|
|
796
|
+
${Le(this,Ca)}
|
|
797
|
+
${!this.unstyled&&Le(this,Sa)}
|
|
803
798
|
</style>
|
|
804
|
-
${ln(this.group,()=>
|
|
805
|
-
<details open=${this.group.get("layerControlExpand")||
|
|
799
|
+
${ln(this.group,()=>me`
|
|
800
|
+
<details open=${this.group.get("layerControlExpand")||_e}>
|
|
806
801
|
<summary>
|
|
807
802
|
<eox-layercontrol-layer
|
|
808
803
|
.noShadow=${!0}
|
|
@@ -828,7 +823,7 @@ button.small {
|
|
|
828
823
|
></eox-layercontrol-layer-list>
|
|
829
824
|
</details>
|
|
830
825
|
`)}
|
|
831
|
-
`}}
|
|
826
|
+
`}}Ca=new WeakMap,Sa=new WeakMap,mr(mc,"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",mc);class vc extends kr{constructor(){super();Ne(this,Pa,"");Ne(this,Ta,`
|
|
832
827
|
ul {
|
|
833
828
|
padding: 0;
|
|
834
829
|
}
|
|
@@ -855,19 +850,19 @@ button.small {
|
|
|
855
850
|
}
|
|
856
851
|
li.sortable-ghost {
|
|
857
852
|
}
|
|
858
|
-
`);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}updated(){this.layers&&(this.layers.on("change:length",()=>{this.requestUpdate(),this.dispatchEvent(new CustomEvent("changed",{bubbles:!0}))}),
|
|
853
|
+
`);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}updated(){this.layers&&(this.layers.on("change:length",()=>{this.requestUpdate(),this.dispatchEvent(new CustomEvent("changed",{bubbles:!0}))}),Iu(this.renderRoot.querySelector("ul"),this.layers,this))}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){return me`
|
|
859
854
|
<style>
|
|
860
|
-
${
|
|
861
|
-
${!this.unstyled&&
|
|
855
|
+
${Le(this,Pa)}
|
|
856
|
+
${!this.unstyled&&Le(this,Ta)}
|
|
862
857
|
</style>
|
|
863
858
|
<ul>
|
|
864
|
-
${ln(this.layers,()=>
|
|
865
|
-
${this.layers.getArray().filter(f=>!f.get("layerControlHide")&&!f.get("layerControlOptional")).reverse().map(f=>
|
|
859
|
+
${ln(this.layers,()=>me`
|
|
860
|
+
${this.layers.getArray().filter(f=>!f.get("layerControlHide")&&!f.get("layerControlOptional")).reverse().map(f=>su(f.get(this.idProperty),me`
|
|
866
861
|
<li
|
|
867
862
|
data-layer="${f.get(this.idProperty)}"
|
|
868
|
-
data-type="${
|
|
863
|
+
data-type="${Du(f,this.map)}"
|
|
869
864
|
>
|
|
870
|
-
${f.getLayers?
|
|
865
|
+
${f.getLayers?me`
|
|
871
866
|
<eox-layercontrol-layer-group
|
|
872
867
|
.noShadow=${!0}
|
|
873
868
|
.group=${f}
|
|
@@ -880,7 +875,7 @@ button.small {
|
|
|
880
875
|
@changed=${()=>this.requestUpdate()}
|
|
881
876
|
>
|
|
882
877
|
</eox-layercontrol-layer-group>
|
|
883
|
-
`:
|
|
878
|
+
`:me`
|
|
884
879
|
<eox-layercontrol-layer
|
|
885
880
|
.noShadow=${!0}
|
|
886
881
|
.layer=${f}
|
|
@@ -896,14 +891,14 @@ button.small {
|
|
|
896
891
|
`))}
|
|
897
892
|
`)}
|
|
898
893
|
</ul>
|
|
899
|
-
`}}
|
|
894
|
+
`}}Pa=new WeakMap,Ta=new WeakMap,mr(vc,"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",vc);class bc 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 me`
|
|
900
895
|
<label for="optional">Optional layers</label>
|
|
901
896
|
|
|
902
897
|
<select name="optional" data-cy="optionalLayers">
|
|
903
898
|
<option disabled selected value>
|
|
904
899
|
-- select an optional layer to add --
|
|
905
900
|
</option>
|
|
906
|
-
${
|
|
901
|
+
${js(this.layers.getArray(),"layerControlOptional",!0).map(d=>me`
|
|
907
902
|
<option
|
|
908
903
|
value="${d.get(this.idProperty)||d.ol_uid}"
|
|
909
904
|
>
|
|
@@ -912,21 +907,21 @@ button.small {
|
|
|
912
907
|
`)}
|
|
913
908
|
</select>
|
|
914
909
|
<button
|
|
915
|
-
@click="${()=>{const d=
|
|
910
|
+
@click="${()=>{const d=js(this.layers.getArray(),"layerControlOptional",!0).find(f=>(f.get(this.idProperty)||f.ol_uid)===this.querySelector("select[name=optional]").value);d==null||d.set("layerControlOptional",!1),d==null||d.setVisible(!0),this.dispatchEvent(new CustomEvent("changed",{bubbles:!0})),this.renderRoot.parentNode.querySelectorAll("eox-layercontrol-layer-list").forEach(f=>f.requestUpdate()),this.requestUpdate()}}"
|
|
916
911
|
>
|
|
917
912
|
add
|
|
918
913
|
</button>
|
|
919
|
-
`}}
|
|
914
|
+
`}}mr(bc,"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",bc);class Cs extends kr{constructor(){super();Ne(this,La,"");Ne(this,Aa,`
|
|
920
915
|
* {
|
|
921
916
|
font-family: Roboto, sans-serif;
|
|
922
917
|
}
|
|
923
|
-
`);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 f=document.querySelector(this.for);f&&(this.map=f.map)}render(){var f;return
|
|
918
|
+
`);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 f=document.querySelector(this.for);f&&(this.map=f.map)}render(){var f;return me`
|
|
924
919
|
<style>
|
|
925
|
-
${
|
|
926
|
-
${!this.unstyled&&
|
|
920
|
+
${Le(this,La)}
|
|
921
|
+
${!this.unstyled&&Le(this,Aa)}
|
|
927
922
|
${this.styleOverride}
|
|
928
923
|
</style>
|
|
929
|
-
${ln(this.map,()=>
|
|
924
|
+
${ln(this.map,()=>me`
|
|
930
925
|
<eox-layercontrol-layer-list
|
|
931
926
|
.noShadow=${!0}
|
|
932
927
|
class="layers"
|
|
@@ -940,7 +935,7 @@ button.small {
|
|
|
940
935
|
@changed=${v=>{if(this.requestUpdate(),v.target.tagName==="EOX-LAYERCONTROL-LAYER-TOOLS"){const k=this.renderRoot.querySelector("eox-layercontrol-optional-list");k==null||k.requestUpdate()}}}
|
|
941
936
|
></eox-layercontrol-layer-list>
|
|
942
937
|
`)}
|
|
943
|
-
${ln(this.map&&((f=
|
|
938
|
+
${ln(this.map&&((f=js(this.map.getLayers().getArray(),"layerControlOptional",!0))==null?void 0:f.length)>0,()=>me`
|
|
944
939
|
<eox-layercontrol-optional-list
|
|
945
940
|
.noShadow=${!0}
|
|
946
941
|
.idProperty=${this.idProperty}
|
|
@@ -949,4 +944,4 @@ button.small {
|
|
|
949
944
|
@changed=${()=>this.requestUpdate()}
|
|
950
945
|
></eox-layercontrol-optional-list>
|
|
951
946
|
`)}
|
|
952
|
-
`}}
|
|
947
|
+
`}}La=new WeakMap,Aa=new WeakMap,mr(Cs,"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},unstyled:{type:Boolean},styleOverride:{type:String}}),customElements.define("eox-layercontrol",Cs),ge.EOxLayerControl=Cs,Object.defineProperty(ge,Symbol.toStringTag,{value:"Module"})});
|